diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..4655299 --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,7 @@ +{ + "ExpandedNodes": [ + "" + ], + "SelectedNode": "\\SCP.sln", + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite index 00279bb..efe54c9 100644 Binary files a/.vs/slnx.sqlite and b/.vs/slnx.sqlite differ diff --git a/.vs/新建文件夹 (2)/v16/.suo b/.vs/新建文件夹 (2)/v16/.suo new file mode 100644 index 0000000..1a151b7 Binary files /dev/null and b/.vs/新建文件夹 (2)/v16/.suo differ diff --git a/北京北汽/Common/CK.SCP.Common.csproj b/北京北汽/Common/CK.SCP.Common.csproj index add89b3..e8af561 100644 --- a/北京北汽/Common/CK.SCP.Common.csproj +++ b/北京北汽/Common/CK.SCP.Common.csproj @@ -11,7 +11,6 @@ CK.SCP.Common v4.5.2 512 - true diff --git a/北京北汽/Common/app.config b/北京北汽/Common/app.config index 5573142..b5d2fd5 100644 --- a/北京北汽/Common/app.config +++ b/北京北汽/Common/app.config @@ -1,11 +1,11 @@ - + - - + + - + \ No newline at end of file diff --git a/北京北汽/Controller/CK.SCP.Controller.csproj b/北京北汽/Controller/CK.SCP.Controller.csproj index 38c2f8f..fecd84b 100644 --- a/北京北汽/Controller/CK.SCP.Controller.csproj +++ b/北京北汽/Controller/CK.SCP.Controller.csproj @@ -11,7 +11,6 @@ CK.SCP.Controller v4.5.2 512 - true @@ -54,6 +53,9 @@ + + ..\SCP\bin\Z.EntityFramework.Extensions.dll + @@ -72,6 +74,7 @@ + diff --git a/北京北汽/Controller/SCP_ASK_CONTROLLER.cs b/北京北汽/Controller/SCP_ASK_CONTROLLER.cs index 768ac29..08fbb4c 100644 --- a/北京北汽/Controller/SCP_ASK_CONTROLLER.cs +++ b/北京北汽/Controller/SCP_ASK_CONTROLLER.cs @@ -157,7 +157,14 @@ namespace CK.SCP.Controller throw e; } } - + public static TB_ASK Getask(string ASK) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var site=db.TB_ASK.FirstOrDefault(p=>p.AskBillNum==ASK); + return site; + } + } /// /// 要货看板减产数量 /// @@ -1234,7 +1241,8 @@ namespace CK.SCP.Controller using (ScpEntities db = EntitiesFactory.CreateScpInstance()) { TB_ASN _t = new TB_ASN(); - _t.AsnBillNum = SCP_BILLCODE_CONTROLLER.MakeASNCode(); + string str1 = "N" + p_ask.VendId; + _t.AsnBillNum = SCP_BILLCODE_CONTROLLER.MakeASNCode_BJBQ(str1); _t.AskBillNum = p_ask.AskBillNum; _t.PoBillNum = p_ask.PoBillNum; _t.ReceivedPort = p_ask.ReceivedPort; @@ -1301,6 +1309,11 @@ namespace CK.SCP.Controller { _tDetail.Batch = "000000"; } + String str2 = itm.PartCode.Substring(0, 5); + if(str2== "SPABJ"&&_t.Site== "BJBMPT") + { + _tDetail.Batch = "000000"; + } db.TB_ASN_DETAIL.Add(_tDetail); var _order_detail = db.TB_ASK_DETAIL.Where(p => p.UID == itm.UID).FirstOrDefault(); _order_detail.ShippedQty = (decimal)itm.ShippedQty; @@ -2214,7 +2227,7 @@ namespace CK.SCP.Controller using (ScpEntities db = EntitiesFactory.CreateScpInstance()) { if (p_state == AskState.Confirm) - { + { var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); int count = _ls.Count(p => p.State == (int)AskState.Release); if (count == _ls.Count && _ls.Count > 0) @@ -2354,7 +2367,7 @@ namespace CK.SCP.Controller } if (p_state == AskState.CompleteForce) - { + { var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum) && p.IsDeleted == false).ToList(); int count = _ls.Count(p => p.State == (int)AskState.Confirm || p.State == (int)AskState.Ship); if (count == _ls.Count && _ls.Count > 0) @@ -2602,7 +2615,7 @@ namespace CK.SCP.Controller return _ret; } - public static ResultObject Save_TB_ASK_STATE_BJBQ(List p_list, AskState p_state) + public static ResultObject Save_TB_ASK_STATE_BMPT(List p_list, AskState p_state,string site) { ResultObject _ret = new ResultObject(); try @@ -2751,7 +2764,7 @@ namespace CK.SCP.Controller } if (p_state == AskState.CompleteForce) { - var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum) && p.IsDeleted == false).ToList(); + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum) && p.IsDeleted == false&&p.Site==site).ToList(); int count = _ls.Count(p => p.State == (int)AskState.Confirm || p.State == (int)AskState.Ship); if (count == _ls.Count && _ls.Count > 0) { @@ -2764,12 +2777,12 @@ namespace CK.SCP.Controller } // p.State = (int)AskState.CompleteForce; #region 修改发货单 - var _asnList = db.TB_ASN.Where(itm => itm.IsDeleted == false && itm.AskBillNum == p.AskBillNum && itm.State == 0).ToList(); + var _asnList = db.TB_ASN.Where(itm => itm.IsDeleted == false && itm.AskBillNum == p.AskBillNum && itm.State == 0 && p.Site == site).ToList(); _asnList.ForEach(itm => { itm.State = (int)AsnState.Reject; itm.IsDeleted = true; - var _asnDetailList = db.TB_ASN_DETAIL.Where(asn => asn.IsDeleted == false && asn.AsnBillNum == itm.AsnBillNum).ToList(); + var _asnDetailList = db.TB_ASN_DETAIL.Where(asn => asn.IsDeleted == false && asn.AsnBillNum == itm.AsnBillNum && asn.Site == site).ToList(); _asnDetailList.ForEach(ad => { itm.State = (int)AsnState.Reject; @@ -2780,13 +2793,13 @@ namespace CK.SCP.Controller }); db.TB_ASN.AddOrUpdate(_asnList.ToArray()); #endregion - var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum && itm.IsDeleted == false).ToList(); + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum && itm.IsDeleted == false && itm.Site == site).ToList(); _list.ForEach(itm => { itm.AskQty = 0; - var asn = db.V_TB_ASN_DETAIL.Where(ask => ask.AskBillNum == itm.AskBillNum && ask.IsDeleted == false && (ask.State == (int)AsnState.Ship || ask.State == (int)AsnState.Receive)) - .GroupBy(ask => new { ask.AskBillNum, ask.PoLine, ask.PartCode }) - .Select(ask => new { AsSum = ask.Sum(itm1 => itm1.Qty), PoLine = ask.Key.PoLine, AskBillNum = ask.Key.AskBillNum, PartCode = ask.Key.PartCode }).ToList(); + var asn = db.V_TB_ASN_DETAIL.Where(ask => ask.AskBillNum == itm.AskBillNum && ask.IsDeleted == false && ask.Site == site && (ask.State == (int)AsnState.Ship || ask.State == (int)AsnState.Receive)) + .GroupBy(ask => new { ask.AskBillNum, ask.PoLine, ask.PartCode,ask.Site }) + .Select(ask => new { AsSum = ask.Sum(itm1 => itm1.Qty), PoLine = ask.Key.PoLine, AskBillNum = ask.Key.AskBillNum, PartCode = ask.Key.PartCode, Site=ask.Key.Site}).ToList(); asn.ForEach(itm1 => { @@ -2801,7 +2814,7 @@ namespace CK.SCP.Controller db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); } ); - db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + db.TB_ASK.AddOrUpdate(p => p.UID, _ls.ToArray()); } else { @@ -3075,9 +3088,9 @@ namespace CK.SCP.Controller } if (p_state == AskState.Release) { - var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)&&p.State== (int)AskState.New).ToList(); int count = _ls.Count(p => p.State == (int)AskState.New); - if (count == _ls.Count && _ls.Count > 0) + if (count > 0) { _ls.ForEach(p => { @@ -3115,7 +3128,7 @@ namespace CK.SCP.Controller { _ret.State = ReturnStatus.Failed; _ret.Result = false; - _ret.Message = "选择的记录,有不是新建状态记录!"; + _ret.Message = "选择的记录,都不是新建状态记录!"; } } if (p_state == AskState.Reject) diff --git a/北京北汽/Controller/SCP_ASN_CONTROLLER.cs b/北京北汽/Controller/SCP_ASN_CONTROLLER.cs index ec0c424..c486305 100644 --- a/北京北汽/Controller/SCP_ASN_CONTROLLER.cs +++ b/北京北汽/Controller/SCP_ASN_CONTROLLER.cs @@ -725,7 +725,7 @@ namespace CK.SCP.Controller _print.MaterialPlanner = _asn.Buyer; _print.CAAIPhone = ""; _print.CAAIFax = ""; - + using (AppBoxContext _appdb = EntitiesFactory.CreateAppBoxInstance()) { @@ -741,7 +741,7 @@ namespace CK.SCP.Controller { using (ScpEntities db = EntitiesFactory.CreateScpInstance()) { - var ask = db.TB_ASK.SingleOrDefault(t => t.AskBillNum == _asn.AskBillNum); + var ask = db.TB_ASK.SingleOrDefault(t => t.AskBillNum == _asn.AskBillNum&&t.Site==_asn.Site); _print.EnglishAddress = ask.Extend1; var phone1 = db.TB_ADDRESS.Count(t => t.Address == ask.Extend1); if (phone1 > 0) @@ -749,7 +749,7 @@ namespace CK.SCP.Controller var phone = db.TB_ADDRESS.SingleOrDefault(t => t.Address == ask.Extend1); _print.CAAIPhone = phone.NamePone; } - + _print.CAAIFax = ask.Remark; } } var dt = ConvertHelper.ToDataTable(new List { _print }); diff --git a/北京北汽/Controller/SCP_BARCODE_CONTROLLER.cs b/北京北汽/Controller/SCP_BARCODE_CONTROLLER.cs index 239c1cd..bcd8c08 100644 --- a/北京北汽/Controller/SCP_BARCODE_CONTROLLER.cs +++ b/北京北汽/Controller/SCP_BARCODE_CONTROLLER.cs @@ -188,6 +188,13 @@ namespace CK.SCP.Controller return db.TB_ASN.Where(p => p.AsnBillNum==asn).FirstOrDefault(); } } + public static List GetBacode(string asn) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TS_BARCODE.Where(p => p.BillNum == asn).ToList(); + } + } public static void Get_TS_BARCODE_List(TS_BARCODE p_entity, Action>> p_action) { ResultObject> _ret = new ResultObject>(); diff --git a/北京北汽/Controller/SCP_BILLCODE_CONTROLLER.cs b/北京北汽/Controller/SCP_BILLCODE_CONTROLLER.cs index 508c4b8..cf23a48 100644 --- a/北京北汽/Controller/SCP_BILLCODE_CONTROLLER.cs +++ b/北京北汽/Controller/SCP_BILLCODE_CONTROLLER.cs @@ -42,6 +42,12 @@ namespace CK.SCP.Controller return GetTablePK("N", "TB_ASN", "AsnBillNum", "yyMMdd", 4); + } + public static string MakeASNCode_BJBQ(string str) + { + + return GetTablePK(str, "TB_ASN", "AsnBillNum", "yyMMdd", 4); + } public static string MakePalletCode() { diff --git a/北京北汽/Controller/SCP_DC_UNI_CONTROLLER.cs b/北京北汽/Controller/SCP_DC_UNI_CONTROLLER.cs index 74df8c3..4ef0196 100644 --- a/北京北汽/Controller/SCP_DC_UNI_CONTROLLER.cs +++ b/北京北汽/Controller/SCP_DC_UNI_CONTROLLER.cs @@ -401,19 +401,13 @@ namespace CK.SCP.Controller case "TED_RECEIPT_MSTR": if (_task.Creator == "QAD") { - TimeSpan nowDt = DateTime.Now.TimeOfDay; - TimeSpan workstartDT = DateTime.Parse("1:00").TimeOfDay; - TimeSpan workendDT = DateTime.Parse("4:00").TimeOfDay; - if (nowDt < workstartDT || nowDt > workendDT) - { - result = UpdateRecive(db, scpdb, _task); - Update_TEA_TASK_SUB(db, _task); - EntitiesFactory.SaveDb(scpdb); - EntitiesFactory.SaveDb(db); - EntitiesFactory.SaveDb(dc); - scope.Complete(); - result.Message = _task.TaskID.ToString(); - } + result = UpdateRecive(db, scpdb, _task); + Update_TEA_TASK_SUB(db, _task); + EntitiesFactory.SaveDb(scpdb); + EntitiesFactory.SaveDb(db); + EntitiesFactory.SaveDb(dc); + scope.Complete(); + result.Message = _task.TaskID.ToString(); } else { @@ -446,10 +440,7 @@ namespace CK.SCP.Controller EntitiesFactory.SaveDb(authdb); scope.Complete(); UpdateSupplierExtend(_supplierlist); - break; - //case "TES_SUPPLIER_PART": - // result = UpdateSupplierPart(dc, db, scpdb, _task); - // break; + break; case "TES_PART_MSTR": result = UpdatePart(db, scpdb, _task); result.Message = _task.TaskID.ToString(); @@ -528,8 +519,8 @@ namespace CK.SCP.Controller { ScpEntities scpdb = EntitiesFactory.CreateScpInstance(); ExchangeCenterContext db = EntitiesFactory.CreateExchangeCenterInstance(); - var _list = scpdb.TS_UNI_API.Where(p => p.State == (int)DataState.Enabled&&p.Domain== "CQBMPT").OrderBy(p => p.UID).ToList(); - var _list1 = scpdb.TS_UNI_API.Where(p => p.State == (int)DataState.Enabled && p.Domain == "CQBMPT" && p.InterfaceType== "Price").OrderBy(p => p.UID).ToList(); + var _list = scpdb.TS_UNI_API.Where(p => p.State == (int)DataState.Enabled&&p.Domain== "BJBMPT").OrderBy(p => p.UID).ToList(); + var _list1 = scpdb.TS_UNI_API.Where(p => p.State == (int)DataState.Enabled && p.Domain == "BJBMPT" && p.InterfaceType== "Price").OrderBy(p => p.UID).ToList(); var apiii = _list1.Count(); if (apiii > 0) { @@ -1080,7 +1071,8 @@ namespace CK.SCP.Controller _entity.Domain = _po.Domain; _entity.Site = _po.Site; _entity.Scheduleweeks = 2; - _entity.DueDate = detail.PutTime; + _entity.DueDate = detail.PutTime; + _entity.PoType = detail.ModType; db.TED_POD_DET.Add(_entity); _ls.Add(_entity); detail.State = (int)BillState.Finish; @@ -2033,72 +2025,69 @@ namespace CK.SCP.Controller /// public static ResultObject UpdateSupplier(List p_list, ScpEntities scpdb, AppBoxContext authdb, TEA_TASK_SUB p_entity) { + Dictionary _dic = new Dictionary(); + _dic.Add("BJBMPT", "BJ01"); + _dic.Add("CQBMPT", "CQ01"); + _dic.Add("ZZBMPT", "ZZ01"); + _dic.Add("HFBMPT", "HF01"); ResultObject _ret = new ResultObject(); try - { - + { var _venderlist = new List(); foreach (var supplier in p_list) - { - var _supplier = scpdb.TA_VENDER.SingleOrDefault(p => p.VendId == supplier.SupplierCode ); - if (_supplier == null) + { + foreach (var item in _dic) { - _supplier = new TA_VENDER - { - VendId = supplier.SupplierCode.ToUpper(), - VendAbbCode = "0", - State = 1, - }; - } - _supplier.VendName = string.IsNullOrEmpty(supplier.SupplierName) ? supplier.SupplierName : supplier.SupplierName;//供应商名称 - //_supplier.VendType = supplier.SupplierType.ToUpper().ToString();//供应商类型 - //_supplier.Country = supplier.Country;//国家 - //_supplier.City = supplier.City;//城市 - //_supplier.Currency = supplier.Currency.ToUpper();//币总 - //_supplier.Address = supplier.Address1 + supplier.Address2 + supplier.Address3;//地址 - //_supplier.ZipCode = supplier.ZipCode.ToString();//邮编 - //_supplier.Contacter = supplier.ContactName;//联系人 - //_supplier.Phone = supplier.Telephone.ToString();//电话 - //_supplier.Fax = supplier.Fax.ToString();//传真 - _supplier.SubSite = string.IsNullOrEmpty(supplier.Site)?"BJ01" : supplier.Site;//域 - _supplier.Site = string.IsNullOrEmpty(supplier.Domain)?"BJBMPT": supplier.Domain;//域 - //_supplier.Tax = Convert.ToDecimal(supplier.TaxInCity);//税率 - - _supplier.Remark = supplier.TaskID.ToString();//任务ID - - var vendname = string.Format("{0}@{1}",_supplier.VendId.ToUpper(), _supplier.Site.ToUpper()); - var _first = authdb.Users.Where(p => p.Name == vendname).FirstOrDefault(); - var _vend = authdb.Roles.Where(p => p.Name == "供应商").FirstOrDefault(); - var _factory = authdb.TA_FACTORY.Where(p => p.ErpDomain == _supplier.Site.ToUpper()).FirstOrDefault(); - if (_first == null && _vend != null && _factory != null) - { - User _entity = new User(); - _entity.Name = vendname; - _entity.Remark = _supplier.Site.ToUpper(); - _entity.Password = PasswordUtil.CreateDbPassword("99999999"); - _entity.ChineseName = _supplier.VendName; - _entity.Email = _supplier.VendId + "@163.com"; - _entity.Gender = "男"; - _entity.Enabled = true; - _entity.Roles = new List(); - Role t = authdb.Set().Local.Where(x => x.ID == _vend.ID).FirstOrDefault(); - if (t == null) + var _supplier = scpdb.TA_VENDER.FirstOrDefault(p => p.VendId == supplier.SupplierCode && p.Site == item.Key); + if (_supplier == null) { - t = new Role { ID = _vend.ID }; - authdb.Set().Attach(t); + _supplier = new TA_VENDER + { + VendId = supplier.SupplierCode.ToUpper(), + VendAbbCode = "0", + State = 1, + }; } - _entity.Roles.Add(t); - _entity.TA_FACTORY = new List(); - TA_FACTORY f = authdb.Set().Local.Where(x => x.ID == _factory.ID).FirstOrDefault(); - if (f == null) + _supplier.VendName = string.IsNullOrEmpty(supplier.SupplierName) ? supplier.SupplierName : supplier.SupplierName; + + _supplier.SubSite = item.Value;//地点 + _supplier.Site = item.Key;//域 + _supplier.Remark = supplier.TaskID.ToString();//任务ID + + var vendname = string.Format("{0}@{1}", _supplier.VendId.ToUpper(), _supplier.Site.ToUpper()); + var _first = authdb.Users.Where(p => p.Name == vendname).FirstOrDefault(); + var _vend = authdb.Roles.Where(p => p.Name == "供应商").FirstOrDefault(); + var _factory = authdb.TA_FACTORY.Where(p => p.ErpDomain == _supplier.Site.ToUpper()).FirstOrDefault(); + if (_first == null && _vend != null && _factory != null) { - f = new TA_FACTORY { ID = _factory.ID }; - authdb.Set().Attach(f); + User _entity = new User(); + _entity.Name = vendname; + _entity.Remark = _supplier.Site.ToUpper(); + _entity.Password = PasswordUtil.CreateDbPassword("99999999"); + _entity.ChineseName = _supplier.VendName; + _entity.Email = _supplier.VendId + "@163.com"; + _entity.Gender = "男"; + _entity.Enabled = true; + _entity.Roles = new List(); + Role t = authdb.Set().Local.Where(x => x.ID == _vend.ID).FirstOrDefault(); + if (t == null) + { + t = new Role { ID = _vend.ID }; + authdb.Set().Attach(t); + } + _entity.Roles.Add(t); + _entity.TA_FACTORY = new List(); + TA_FACTORY f = authdb.Set().Local.Where(x => x.ID == _factory.ID).FirstOrDefault(); + if (f == null) + { + f = new TA_FACTORY { ID = _factory.ID }; + authdb.Set().Attach(f); + } + _entity.TA_FACTORY.Add(f); + authdb.Users.Add(_entity); } - _entity.TA_FACTORY.Add(f); - authdb.Users.Add(_entity); + _venderlist.Add(_supplier); } - _venderlist.Add(_supplier); } scpdb.TA_VENDER.AddOrUpdate(_venderlist.ToArray()); _ret.State = ReturnStatus.Succeed; @@ -2223,11 +2212,14 @@ namespace CK.SCP.Controller ResultObject _ret = new ResultObject(); try { - var _partmstrlist = db.TES_PART_MSTR.Where(p => p.TaskID == p_entity.TaskID).ToList(); + var _partmstrlist = db.TES_PART_MSTR.Where(p => p.TaskID == p_entity.TaskID&&p.CommandType!="D").ToList(); + var _partmstrlistD = db.TES_PART_MSTR.Where(p => p.TaskID == p_entity.TaskID&&p.CommandType=="D").ToList(); var _partlist = new List(); + var _partlistD = new List(); foreach (var part in _partmstrlist) - { + { var _part = scpdb.TA_PART.SingleOrDefault(p => p.PartCode == part.PartCode && p.Site == part.Domain ); + if (_part == null) { _part = new TA_PART @@ -2268,15 +2260,31 @@ namespace CK.SCP.Controller } _part.Qlevel = string.IsNullOrEmpty(part.Qgrade)?string.Empty: part.Qgrade; _part.State = part.Status; - _part.Site = part.Domain; + _part.Site = part.Domain; // _part.SubSite = part.Site; _part.Remark = part.TaskID.ToString(); _partlist.Add(_part); } - + if (_partmstrlistD.Count() > 0) + { + foreach (var depart in _partmstrlistD) + { + var _part = scpdb.TA_PART.FirstOrDefault(p => p.PartCode == depart.PartCode && p.Site == depart.Domain); + if (_part != null) + { + _partlistD.Add(_part); + } + } + } + var str= JsonHelper.GetJson>(_partlist); scpdb.TA_PART.AddOrUpdate(_partlist.ToArray()); + if (_partlistD.Count() > 0) + { + scpdb.TA_PART.DeleteRangeByKey(_partlistD.ToArray()); + } + _ret.State = ReturnStatus.Succeed; _ret.MessageList.Add(string.Format("更新表{0}任务ID{1}成功!", "TES_PART_MSTR", p_entity.TaskID)); } @@ -2429,22 +2437,24 @@ namespace CK.SCP.Controller _item.PoUnit = _price.Unit;//单位 } - //_item.CreateUser = "scp";//_price.CreateUser;//创建人 - // _item.CreateTime = DateTime.Now;//_price.CreateTime;//创建时间 - // _item.GUID = Guid.NewGuid();//GUID - // _item.PriceList = (_vend + _site.Substring(1, 1) + _site.Substring(3, 1)).Trim(); //价目表代码 - - // } - ////说明 - // _item.ProductLine = "";//产品类 - + if(_domain == "BJBMPT") + { - // _item.AmountType = "P";//金额类型 - // _item.Amount = _price.Amt+_price.SharingPrice;//金额(零件单价—+分摊单价) - // _item.TaskID = _taskguid;//任务编号 - // _item.Remark = _price.Remarks;//备注 - // _item.SupplierCode = _vend;//供应商 - // _item.VendAmount = _price.Amt;//供应商金额 + var po = scpdb.V_TB_PO_DETAIL.Count(p => p.PartCode == _partCode&&p.Site== "BJBMPT"&&p.VendId== _vend.Trim()); + if (po > 0) + { + var _list = scpdb.V_TB_PO_DETAIL.Where(p => p.PartCode == _partCode && p.Site == "BJBMPT" && p.VendId == _vend.Trim()).ToList(); + foreach(var b in _list) + { + var PP = scpdb.TB_PO_DETAIL.FirstOrDefault(p => p.PartCode == b.PartCode && p.Site == "BJBMPT" && p.PoBillNum == b.PoBillNum); + PP.Price = _item.Price; + scpdb.TB_PO_DETAIL.AddOrUpdate(PP); + } + + + } + + } _teslist.Add(_item); } @@ -2471,6 +2481,84 @@ namespace CK.SCP.Controller } return _ret; } + + public static ResultObject UpdateTES_PURCHASE_PRICE_TemporaryPrice(List p_list, string domain, string site, string name, bool flag) + { + + ResultObject _ret = new ResultObject(); + + try + { + ScpEntities scpdb = EntitiesFactory.CreateScpInstance(); + ExchangeCenterContext db = EntitiesFactory.CreateExchangeCenterInstance(); + List _teslist = new List(); + var _ls = scpdb.V_TB_PRICE_TemporaryPrice.Where(p => p_list.Contains(p.UID)).ToList(); + + foreach (var _price in _ls) + { + Guid _taskguid = Guid.NewGuid(); + TS_UNI_API _item = new TS_UNI_API(); + + + var _vend = _price.VendId.Trim(); + var _partCode = _price.PartCode.Trim(); + var _domain = _price.Site.Trim(); + var _site = _price.SubSite.Trim(); + _item.BillNum = (_vend + _site.Substring(1, 1) + _site.Substring(3, 1)).Trim(); + _item.InterfaceType = "Price"; + + _item.Batch = "No"; + + _item.Qty = _price.Amt + _price.SharingPrice; + _item.Price = _price.Amt; + _item.State = 1; + _item.ValidDate = DateTime.Now; + _item.ErpLineNum = 1; + _item.PartCode = _partCode;//零件编号 + _item.Domain = _domain;//域 + _item.Site = _site;//地点 + _item.Extend1 = _price.Remarks; + _item.CreateTime = Convert.ToDateTime(_price.StartTime);//开始时间 + _item.PutTime = Convert.ToDateTime(_price.EndTime);//结束时间 + _item.CreateOper = _price.Creator; + _item.Currency = _price.Curr;//货币 + var _first = scpdb.TA_PART.Where(itm => itm.PartCode == _partCode).FirstOrDefault(); + if (_first != null) + { + _item.PoUnit = _first.Unit; + } + else + { + + _item.PoUnit = _price.Unit;//单位 + } + + _teslist.Add(_item); + + } + + scpdb.TS_UNI_API.AddOrUpdate(_teslist.ToArray()); + + if (scpdb.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = e.InnerException.Message; + } + return _ret; + } public static ResultObject WritePo(List p_order_list, string site, string p_creator, DateTime p_time, BillModType p_modtype, string subsite, string p_chineseName, string p_buyerPhone) { ResultObject _ret = new ResultObject(); @@ -2510,6 +2598,7 @@ namespace CK.SCP.Controller _po.BuyerPhone = p_buyerPhone; _po.Remark = _entity.备注; _po.IsDeleted = false; + _po.State = (int)PoState.Open; _po.CreateTime = DateTime.Now; _po.CreateUser = p_creator; _po.BeginTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间); @@ -2524,7 +2613,7 @@ namespace CK.SCP.Controller TB_PO_DETAIL _PO_Detail = new TB_PO_DETAIL(); _PO_Detail.Currency = "CNY"; _PO_Detail.PoBillNum = _po.PoBillNum; - _PO_Detail.PartCode = itm.零件号; + _PO_Detail.PartCode = itm.零件号.Trim(); var part = scpdb.TA_PART.FirstOrDefault(t => t.PartCode == itm.零件号 && t.Site == _po.Site); _PO_Detail.PoLine =int.Parse(itm.行号); _PO_Detail.PoUnit = part.Unit; @@ -2536,6 +2625,7 @@ namespace CK.SCP.Controller _PO_Detail.IsDeleted = false; _PO_Detail.LocUnit = part.Unit; _PO_Detail.UnConv = 1; + _PO_Detail.State= (int)PoState.Open; _PO_Detail.Remark = itm.备注; _PO_Detail.Price = string.IsNullOrEmpty(itm.单价) ? 0 : decimal.Parse(itm.单价); _PO_Detail.Workorderlot = string.IsNullOrEmpty(itm.加工单号) ? 0 : int.Parse(itm.加工单号); @@ -2555,17 +2645,17 @@ namespace CK.SCP.Controller TS_UNI_API Ts = new TS_UNI_API(); Ts.InterfaceType = "PO"; Ts.TableName = "TS_UNI_API"; - Ts.Batch = _entity.供应商编号; + Ts.Batch = _entity.供应商编号.Trim().ToUpper(); Ts.BillType = 702; Ts.SubBillType = 1; Ts.BillNum = _entity.订单编号.Trim().ToUpper(); - Ts.PartCode = _PO_Detail.PartCode; + Ts.PartCode = _PO_Detail.PartCode.Trim(); Ts.Qty = decimal.Parse(_entity.数量); Ts.State = 1; Ts.CreateOper = _entity.联系人; Ts.CreateTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间); Ts.PutTime = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now : DateTime.Parse(_entity.要求到货日期); - Ts.VendId = _entity.供应商编号; + Ts.VendId = _entity.供应商编号.Trim().ToUpper(); Ts.PoUnit = part.Unit; Ts.LocUnit = part.Unit; Ts.ValidDate = string.IsNullOrEmpty(_entity.订单截至日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(_entity.订单截至日期); @@ -2579,7 +2669,11 @@ namespace CK.SCP.Controller Ts.Extend2 = _entity.备注; Ts.CreateOper= _entity.采购员; Ts.VendBatch= p_creator; - Ts.ErpLineNum = _PO_Detail.PoLine; + Ts.ErpLineNum = _PO_Detail.PoLine; + if (_entity.订单类型.ToUpper() == "S") + { + Ts.ModType = _entity.订单类型.ToUpper(); + } scpdb.TB_PO_DETAIL.AddOrUpdate(_PO_Detail); scpdb.TS_UNI_API.Add(Ts); }); @@ -2699,17 +2793,17 @@ namespace CK.SCP.Controller TS_UNI_API Ts = new TS_UNI_API(); Ts.InterfaceType = "PO"; Ts.TableName = "TS_UNI_API"; - Ts.Batch = _entity.供应商编号; + Ts.Batch = _entity.供应商编号.Trim().ToUpper(); Ts.BillType = 702; Ts.SubBillType = 2; Ts.BillNum = _po.PoBillNum.Trim().ToUpper(); - Ts.PartCode = _tDetail.PartCode; + Ts.PartCode = _tDetail.PartCode.Trim().ToUpper(); Ts.Qty = _tDetail.AskQty; Ts.State = 1; Ts.CreateOper = _entity.联系人; Ts.CreateTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间); Ts.PutTime = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now : DateTime.Parse(_entity.要求到货日期); - Ts.VendId = _entity.供应商编号; + Ts.VendId = _entity.供应商编号.Trim().ToUpper(); Ts.PoUnit = part.Unit; Ts.LocUnit = part.Unit; Ts.ValidDate = string.IsNullOrEmpty(_entity.订单截至日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(_entity.订单截至日期); @@ -2723,7 +2817,15 @@ namespace CK.SCP.Controller Ts.CreateOper = _entity.采购员; Ts.VendBatch = p_creator; Ts.ErpBillNum= _po.PoBillNum; - Ts.ErpLineNum = _PO_Detail.PoLine; + Ts.ErpLineNum = _PO_Detail.PoLine; + if (!string.IsNullOrEmpty(_entity.订单类型)) + { + if (_entity.订单类型.ToUpper() == "S") + { + Ts.ModType = _entity.订单类型.ToUpper(); + } + } + scpdb.TB_ASK_DETAIL.Add(_tDetail); scpdb.TB_PO_DETAIL.AddOrUpdate(_PO_Detail); scpdb.TS_UNI_API.Add(Ts); @@ -2804,6 +2906,7 @@ namespace CK.SCP.Controller _po.Contacter = p_chineseName;// _entity.联系人; _po.Buyer = p_chineseName;// _entity.联系人; _po.Site = site.Trim().ToUpper(); + _po.State= (int)PoState.Open; _po.BuyerPhone = p_buyerPhone; _po.Remark = _entity.备注; _po.IsDeleted = false; @@ -2853,21 +2956,21 @@ namespace CK.SCP.Controller TS_UNI_API Ts = new TS_UNI_API(); Ts.InterfaceType = "PO"; Ts.TableName = "TS_UNI_API"; - Ts.Batch = _entity.供应商编号; + Ts.Batch = _entity.供应商编号.Trim(); Ts.BillType = 702; Ts.SubBillType = 1; Ts.BillNum = _entity.订单编号.Trim().ToUpper(); - Ts.PartCode = _PO_Detail.PartCode; + Ts.PartCode = _PO_Detail.PartCode.Trim(); Ts.Qty = decimal.Parse(_entity.数量); Ts.State = 1; Ts.CreateOper = _entity.联系人; Ts.CreateTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间); Ts.PutTime = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now : DateTime.Parse(_entity.要求到货日期); - Ts.VendId = _entity.供应商编号; + Ts.VendId = _entity.供应商编号.Trim(); Ts.PoUnit = part.Unit; Ts.LocUnit = part.Unit; Ts.ValidDate = string.IsNullOrEmpty(_entity.订单截至日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(_entity.订单截至日期); - Ts.ErpBillNum = _entity.订单编号; + Ts.ErpBillNum = _entity.订单编号.Trim(); Ts.Buyer = _entity.采购员; Ts.BuyerPhone = _entity.采购员电话; Ts.Price = decimal.Parse(_entity.单价); @@ -2920,7 +3023,7 @@ namespace CK.SCP.Controller _PO_Detail.PartCode = itm.零件号.Trim().ToUpper(); var part = scpdb.TA_PART.FirstOrDefault(t => t.PartCode == itm.零件号 && t.Site == _po.Site); _PO_Detail.PoLine = _number; - _PO_Detail.PoBillNum = _po.PoBillNum; + _PO_Detail.PoBillNum = _po.PoBillNum.Trim(); _PO_Detail.State = (int)PoState.Open; _PO_Detail.Site = site.Trim().ToUpper(); _PO_Detail.SubSite = subsite.Trim().ToUpper(); @@ -2954,17 +3057,17 @@ namespace CK.SCP.Controller TS_UNI_API Ts = new TS_UNI_API(); Ts.InterfaceType = "PO"; Ts.TableName = "TS_UNI_API"; - Ts.Batch = _entity.供应商编号; + Ts.Batch = _entity.供应商编号.Trim(); Ts.BillType = 702; Ts.SubBillType = 2; Ts.BillNum = _po.PoBillNum.Trim().ToUpper(); - Ts.PartCode = _PO_Detail.PartCode; + Ts.PartCode = _PO_Detail.PartCode.Trim(); Ts.Qty = _PO_Detail.PlanQty; Ts.State = 1; Ts.CreateOper = _entity.联系人; Ts.CreateTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间); Ts.PutTime = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now : DateTime.Parse(_entity.要求到货日期); - Ts.VendId = _entity.供应商编号; + Ts.VendId = _entity.供应商编号.Trim(); Ts.PoUnit = part.Unit; Ts.LocUnit = part.Unit; Ts.ValidDate = string.IsNullOrEmpty(_entity.订单截至日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(_entity.订单截至日期); @@ -2977,13 +3080,13 @@ namespace CK.SCP.Controller Ts.Extend2 = _entity.备注; Ts.CreateOper = _entity.采购员; Ts.VendBatch = p_creator; - Ts.ErpBillNum = _po.PoBillNum; + Ts.ErpBillNum = _po.PoBillNum.Trim(); Ts.ErpLineNum = _number; scpdb.TB_PO_DETAIL.AddOrUpdate(_PO_Detail); scpdb.TS_UNI_API.Add(Ts); _number++; }); - _polist = _polist + _po.PoBillNum + ","; + _polist = _polist + _po.PoBillNum.Trim() + ","; } #endregion } diff --git a/北京北汽/Controller/SCP_EXCEL_CONTROLLER.cs b/北京北汽/Controller/SCP_EXCEL_CONTROLLER.cs index 999814b..9ec769f 100644 --- a/北京北汽/Controller/SCP_EXCEL_CONTROLLER.cs +++ b/北京北汽/Controller/SCP_EXCEL_CONTROLLER.cs @@ -53,6 +53,8 @@ namespace CK.SCP.Controller { var po_detail = new SCP_PO_DETAIL_EXPORT(); po_detail.订单编号 = itm.PoBillNum; + po_detail.供应商编码 = itm.VendId; + po_detail.供应商名称 = itm.VendName; po_detail.状态 = itm.State_DESC; po_detail.行号 = itm.PoLine.ToString(); po_detail.零件名 = itm.PartDesc1; @@ -190,7 +192,7 @@ namespace CK.SCP.Controller _detailList.ForEach(itm => { SCP_ASK_DETAIL_EXPORT _entity = new SCP_ASK_DETAIL_EXPORT(); - _entity.要货单号 = itm.AskBillNum; + _entity.要货单号 = itm.AskBillNum; _entity.行号 = itm.PoLine.ToString(); _entity.零件名称 = itm.PartDesc1; _entity.零件号 = itm.PartCode; @@ -200,6 +202,7 @@ namespace CK.SCP.Controller _entity.价格 = itm.Price.ToString(); _entity.要货数量 = itm.AskQty.ToString(); _entity.说明 = string.IsNullOrEmpty(itm.Remark)?string.Empty:itm.Remark.ToString(); + _entity.订货日期 = itm.BeginTime == null ? string.Empty : itm.BeginTime.Value.ToString("yyyyMMdd"); _exportDetailList.Add(_entity); }); @@ -267,10 +270,7 @@ namespace CK.SCP.Controller var _po = db.TB_PRICE.Where(p => p_lst.Contains(p.UID.ToString())).ToList(); - var _po1 = _po.Select(p => p_lst.Contains(p.UID.ToString())).ToList(); - - - //var _ls = polist.Where(itm => partlist.Contains(itm)); + _po.ForEach(itm => { diff --git a/北京北汽/Controller/SCP_LOGINNUMBER_CONTROLLER.cs b/北京北汽/Controller/SCP_LOGINNUMBER_CONTROLLER.cs new file mode 100644 index 0000000..8a818b0 --- /dev/null +++ b/北京北汽/Controller/SCP_LOGINNUMBER_CONTROLLER.cs @@ -0,0 +1,155 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Infrastructure; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System.Data.Entity.Core; +using CK.SCP.Models.Enums; +using CK.SCP.Models.AppBoxEntity; + +namespace CK.SCP.Controller +{ + public class SCP_LOGINNUMBER_CONTROLLER + { + public static TA_LOGINNUMBER GetlistUserNumber(string username) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TA_LOGINNUMBER.Where(p => p.Name == username).FirstOrDefault(); + } + } + public static ResultObject Save_TA_LOGINNUMBER(string username, LoginNumer p_state,string date) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + using (AppBoxContext _appdb = EntitiesFactory.CreateAppBoxInstance()) + { + var user = _appdb.Users.FirstOrDefault(t => t.Name == username); + + if (user == null) + { + _ret.MessageList.Add("用户名"+ username+"不存在,请输入正确用户名"); + } + else + { + var login = db.TA_LOGINNUMBER.FirstOrDefault(p => p.Name == username); + if (p_state == LoginNumer.Sussess && login != null) + { + db.TA_LOGINNUMBER.Remove(login); + } + + if (login != null && p_state == LoginNumer.Faile) + { + if (login.Number == 4&&login.Time==date) + { + login.Number = 5; + db.TA_LOGINNUMBER.AddOrUpdate(login); + + user.Enabled = false; + _appdb.Users.AddOrUpdate(user); + _appdb.SaveChanges(); + + _ret.MessageList.Add("因您连续五次输入密码错误,该账号已经被设为未启用状态,请联系系统管理员"); + } + else if(login.Number <4 && login.Time == date) + { + login.Number = login.Number + 1; + db.TA_LOGINNUMBER.AddOrUpdate(login); + }else if(login.Time != date) + { + login.Time = date; + login.Number = 1; + db.TA_LOGINNUMBER.AddOrUpdate(login); + } + } + else if (login == null && p_state == LoginNumer.Faile) + { + TA_LOGINNUMBER log = new TA_LOGINNUMBER(); + log.Name = username; + log.Number = 1; + log.Time = DateTime.Now.ToShortDateString(); + db.TA_LOGINNUMBER.AddOrUpdate(log); + } + } + } + + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_LOGINNUMBER_CONTROLLER), "Save_TA_LOGINNUMBER", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_LOGINNUMBER_CONTROLLER), "Save_TA_LOGINNUMBER", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_LOGINNUMBER_CONTROLLER), "Save_TA_LOGINNUMBER", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_LOGINNUMBER_CONTROLLER), "Save_TA_LOGINNUMBER", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + } +} diff --git a/北京北汽/Controller/SCP_PO_CONTROLLER.cs b/北京北汽/Controller/SCP_PO_CONTROLLER.cs index 8dea5f5..540b479 100644 --- a/北京北汽/Controller/SCP_PO_CONTROLLER.cs +++ b/北京北汽/Controller/SCP_PO_CONTROLLER.cs @@ -96,10 +96,10 @@ namespace CK.SCP.Controller { q = q.Where(p => p.BeginTime <= p_entity.EndTime); } - if (p_entity.UserInAddress.FirstOrDefault() != null && p_entity.UserInAddress.Count > 0) - { - q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); - } + //if (p_entity.UserInAddress.FirstOrDefault() != null && p_entity.UserInAddress.Count > 0) + //{ + // q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + //} if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) { q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); @@ -1053,7 +1053,7 @@ namespace CK.SCP.Controller } else { - if (p_excel.币种 != "CNY" && p_excel.币种 != "EUR" &&p_excel.币种 != "USD") + if (p_excel.币种 != "CNY" && p_excel.币种 != "EUR" && p_excel.币种 != "USD") { ErrorList.Add(string.Format("供应商编号为【{0}】的零件编号【{1}】币种填写错误,只能是CNY或者EUR或者USD!", p_excel.供应商编号, p_excel.零件编码)); } @@ -1071,7 +1071,7 @@ namespace CK.SCP.Controller DateTime dd1 = st1.AddYears(10); int b = int.Parse(p_excel.是否临时价格); var Th = db.TB_PRICE.SingleOrDefault(p => p.UID.ToString() == p_excel.标识 && p.VendId == p_excel.供应商编号 && p.PartCode == p_excel.零件编码 - && p.Amt == st4 && p.SubSite == p_excel.地点 && p.EndTime == st6 && p.StartTime == st5&&p.Curr==p_excel.币种&&p.Unit==p_excel.单位 + && p.Amt == st4 && p.SubSite == p_excel.地点 &&p.Curr==p_excel.币种&&p.Unit==p_excel.单位 ); if (Th == null) { @@ -1079,6 +1079,15 @@ namespace CK.SCP.Controller } else { + if ((DateTime.Parse(Th.StartTime.ToString())).ToShortDateString()!=st3.ToShortDateString()|| (DateTime.Parse(Th.EndTime.ToString())).ToShortDateString() != st2.ToShortDateString()) + { + ErrorList.Add(string.Format("标识【{0}】供应商编号【{1}】的导出数据不能修改!", p_excel.标识, p_excel.供应商编号)); + } + DateTime STA =DateTime.Parse(Th.StartTime.ToString()); + if(DateTime.Parse(STA.ToShortDateString())!= st3) + { + ErrorList.Add(string.Format("标识【{0}】供应商编号【{1}】的导出数据不能修改!", p_excel.标识, p_excel.供应商编号)); + } if (Th.State != (int)PriceState.FConfirm) { ErrorList.Add(string.Format("标识【{0}】供应商编号【{1}】不是财务已审核的数据,不能导入!", p_excel.标识, p_excel.供应商编号)); @@ -1138,12 +1147,12 @@ namespace CK.SCP.Controller } else { - if(p_excel.币种 != "CNY" && p_excel.币种 != "EUR" && p_excel.币种 != "USD") + if (p_excel.币种 != "CNY"&& p_excel.币种 != "EUR" && p_excel.币种 != "USD") { - ErrorList.Add(string.Format("供应商编号为【{0}】的零件编号【{1}】币种填写错误,只能是CNY!", p_excel.供应商编号, p_excel.零件编码)); + ErrorList.Add(string.Format("供应商编号为【{0}】的零件编号【{1}】币种填写错误,只能是CNY或者EUR或者USD!", p_excel.供应商编号, p_excel.零件编码)); } var Site = db.TB_FACTORY.Where(p=>p.ErpSite== p_excel.域).FirstOrDefault(); - var _first = db.TA_PART.Where(p => p.PartCode == p_excel.零件编码 && p.State.ToUpper() != "SP"&&p.Site== p_excel.域).FirstOrDefault(); + var _first = db.TA_PART.Where(p => p.PartCode == p_excel.零件编码 &&p.Site== p_excel.域).FirstOrDefault(); if (_first == null) { ErrorList.Add(string.Format("供应商编号为【{0}】的零件编号【{1}】零件表里无数据,无法导入!", p_excel.供应商编号, p_excel.零件编码)); @@ -1151,8 +1160,12 @@ namespace CK.SCP.Controller else { p_excel.单位 = _first.Unit; + if (_first.State == "SP") + { + ErrorList.Add(string.Format("零件编号【{0}】状态为SP,无法导入!", p_excel.零件编码)); + } } - + p_excel.供应商编号 = !string.IsNullOrEmpty(p_excel.供应商编号) ? p_excel.供应商编号.Trim() : string.Empty; var _count = db.TA_VENDER.Where(p => p.VendId == p_excel.供应商编号&&p.Site== p_excel.域).Count(); @@ -1161,7 +1174,7 @@ namespace CK.SCP.Controller ErrorList.Add(string.Format("未找到供应商编号为【{0}】无法导入!", p_excel.供应商编号)); } - + DateTime st = DateTime.Parse(p_excel.开始时间); DateTime et = DateTime.Parse(p_excel.结束时间); DateTime st_st = Convert.ToDateTime(st.ToShortDateString()); @@ -1170,6 +1183,15 @@ namespace CK.SCP.Controller var _SubSite = new SqlParameter("@SubSite", p_excel.地点); var _VendId = new SqlParameter("@VendId", p_excel.供应商编号); var _PartCode = new SqlParameter("@PartCode", p_excel.零件编码); + if (st > et) + { + ErrorList.Add(string.Format("供应商{0}零件编号{1}的结束时间需要大于开始时间!", p_excel.供应商编号, p_excel.零件编码)); + } + //var price = db.TB_PRICE.Count(p => p.PartCode == p_excel.零件编码.Trim() && p.VendId == p_excel.供应商编号.Trim() && p.StartTime == st && p.EndTime == et && p.Site == p_excel.域&&p.State!=-1); + //if (price > 0) + //{ + // ErrorList.Add(string.Format("供应商{0}零件编号{1}价格单已经存在!", p_excel.供应商编号, p_excel.零件编码)); + //} string check = "select * from tb_price where uid in\n" + "(\n" + " select max(uid) uid\n" + @@ -1178,39 +1200,29 @@ namespace CK.SCP.Controller " group by vendid,partcode,subsite,site\n" + ") "; var _price = db.Database.SqlQuery(check, _Site, _SubSite, _VendId, _PartCode).FirstOrDefault(); + if (_price != null) { - if (st_st < Convert.ToDateTime(_price.StartTime.Value.ToShortDateString()) || st_st > et_st || st_st == et_st)//更新价格时间判断 - { - ErrorList.Add(string.Format("供应商{0}零件编号{1}开始时间结束时间不正确!", p_excel.供应商编号, p_excel.零件编码)); - } - if (st_st > Convert.ToDateTime(_price.StartTime.Value.ToShortDateString()))//添加价格记录时间判断 - { - if (st.ToShortDateString() != (_price.EndTime.Value.AddDays(1)).ToShortDateString()) - { - ErrorList.Add(string.Format("供应商{0}零件编号{1}开始日期必须为{2}", p_excel.供应商编号, p_excel.零件编码, _price.EndTime.Value.AddDays(1).ToShortDateString().Replace("-", "/"))); - } - if (_price.State != (int)PriceState.FConfirm) - { - ErrorList.Add(string.Format("供应商{0}零件编号{1},新添价格的上期价格不是审批状态", p_excel.供应商编号, p_excel.零件编码)); - } + ErrorList.Add(string.Format("供应商{0}零件编号{1}价格单已经存在,如要修改价格单信息请到价格单修改菜单进行操作!", p_excel.供应商编号, p_excel.零件编码)); + //if (st_st < Convert.ToDateTime(_price.StartTime.Value.ToShortDateString()) || st_st > et_st || st_st == et_st)//更新价格时间判断 + //{ + // ErrorList.Add(string.Format("供应商{0}零件编号{1}开始时间结束时间不正确!", p_excel.供应商编号, p_excel.零件编码)); + //} + //if (st_st > Convert.ToDateTime(_price.StartTime.Value.ToShortDateString()))//添加价格记录时间判断 + //{ + // if (st.ToShortDateString() != (_price.EndTime.Value.AddDays(1)).ToShortDateString()) + // { + // ErrorList.Add(string.Format("供应商{0}零件编号{1}开始日期必须为{2}", p_excel.供应商编号, p_excel.零件编码, _price.EndTime.Value.AddDays(1).ToShortDateString().Replace("-", "/"))); + // } + // if (_price.State != (int)PriceState.FConfirm) + // { + // ErrorList.Add(string.Format("供应商{0}零件编号{1},新添价格的上期价格不是审批状态", p_excel.供应商编号, p_excel.零件编码)); + // } - //if (_price.EndTime.ToString() == p_excel.结束时间) - //{ - // ErrorList.Add(string.Format("供应商{0}零件编号{1}结束时间不正确,结束时间应大于现有最新结束时间!", p_excel.供应商编号, p_excel.零件编码)); - //} - //if (et < _price.EndTime) - //{ - // ErrorList.Add(string.Format("供应商{0}零件编号{1}结束日期和!", p_excel.供应商编号, p_excel.零件编码)); - //} - } + + //} } - //var _ls = db.TB_PRICE.Where(p => p.State != (int)PriceState.Reject && p.Site == p_excel.域 && p.SubSite == p_excel.地点 && p.VendId == p_excel.供应商编号 && p.PartCode == p_excel.零件编码 && - //p.EndTime > st && p.StartTime < et && (p.StartTime != st || p.EndTime != et)).ToList(); - //if (_ls.Count > 0) - //{ - // ErrorList.Add(string.Format("供应商{0}零件编号{1}开始时间{2}结束时间{3}存在时间重复,请修改为开始时间:{4} 结束时间:{5}!", p_excel.供应商编号, p_excel.零件编码, p_excel.开始时间, p_excel.结束时间, Convert.ToDateTime(_ls[0].StartTime).ToString("yyyy/MM/dd"), Convert.ToDateTime(_ls[0].EndTime).ToString("yyyy/MM/dd"))); - //} + } return ErrorList; } @@ -1352,7 +1364,10 @@ namespace CK.SCP.Controller p_excel.单位 = checkcount[0].Unit; p_excel.币种 = checkcount[0].Curr; } - + if (string.IsNullOrEmpty(p_excel.订单类型)) + { + ErrorList.Add(string.Format("订单编号【{0}】行号【{1}】订单类型为空,委外订单填 S,普通订单填 M!", p_excel.订单编号, p_excel.行号)); + } if (p_excel.数量 != "0") { ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的要货数量应该为零!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); @@ -1385,26 +1400,26 @@ namespace CK.SCP.Controller { ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】税率最大应为2位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); } - if (!string.IsNullOrEmpty(p_excel.订单类型)) - { - if (p_excel.订单类型.ToUpper() == "S") - { - if (string.IsNullOrEmpty(p_excel.加工单号) || !Regex.IsMatch(p_excel.加工单号, "^[0-9]{1,8}$")) - { - ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】加工单最大8位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); - } - if (string.IsNullOrEmpty(p_excel.工序) || !Regex.IsMatch(p_excel.工序, "^[0-9]{1,6}$")) - { - ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】工序最大6位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); - } - } - else - { - ErrorList.Add(string.Format("{0}订单类型必须填写为S为转包订单,不填写为正常订单", p_excel.订单编号)); - } - //注释结束 + //if (!string.IsNullOrEmpty(p_excel.订单类型)) + //{ + // if (p_excel.订单类型.ToUpper() == "S") + // { + // if (string.IsNullOrEmpty(p_excel.加工单号) || !Regex.IsMatch(p_excel.加工单号, "^[0-9]{1,8}$")) + // { + // ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】加工单最大8位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + // } + // if (string.IsNullOrEmpty(p_excel.工序) || !Regex.IsMatch(p_excel.工序, "^[0-9]{1,6}$")) + // { + // ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】工序最大6位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + // } + // } + // else + // { + // ErrorList.Add(string.Format("{0}订单类型必须填写为S为转包订单,不填写为正常订单", p_excel.订单编号)); + // } + // //注释结束 - } + //} if (!string.IsNullOrEmpty(p_excel.库位) && p_excel.库位.Length > 8) { ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】库位最大8位字符!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); @@ -1703,26 +1718,26 @@ namespace CK.SCP.Controller { ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】税率最大应为2位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); } - if (!string.IsNullOrEmpty(p_excel.订单类型)) - { - if (p_excel.订单类型.ToUpper() == "S") - { - if (string.IsNullOrEmpty(p_excel.加工单号) || !Regex.IsMatch(p_excel.加工单号, "^[0-9]{1,8}$")) - { - ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】加工单最大8位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); - } - if (string.IsNullOrEmpty(p_excel.工序) || !Regex.IsMatch(p_excel.工序, "^[0-9]{1,6}$")) - { - ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】工序最大6位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); - } - } - else - { - ErrorList.Add(string.Format("{0}订单类型必须填写为S为转包订单,不填写为正常订单", p_excel.订单编号)); - } - //注释结束 + //if (!string.IsNullOrEmpty(p_excel.订单类型)) + //{ + // if (p_excel.订单类型.ToUpper() == "S") + // { + // if (string.IsNullOrEmpty(p_excel.加工单号) || !Regex.IsMatch(p_excel.加工单号, "^[0-9]{1,8}$")) + // { + // ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】加工单最大8位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + // } + // if (string.IsNullOrEmpty(p_excel.工序) || !Regex.IsMatch(p_excel.工序, "^[0-9]{1,6}$")) + // { + // ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】工序最大6位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + // } + // } + // else + // { + // ErrorList.Add(string.Format("{0}订单类型必须填写为S为转包订单,不填写为正常订单", p_excel.订单编号)); + // } + // //注释结束 - } + //} if (!string.IsNullOrEmpty(p_excel.库位) && p_excel.库位.Length > 8) { ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】库位最大8位字符!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); @@ -2108,6 +2123,236 @@ namespace CK.SCP.Controller return _ret; } + + + /// + /// 北汽模塑 + /// + /// + /// + /// + /// + /// + /// + public static ResultObject EXCEL_PO_TO_ASK_MOD_BJMS(List p_order_list, string p_creator, string str1, string p_buyer, DateTime p_time, BillModType p_modtype, bool IsAutoPublish = false) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + p_order_list.ForEach(p => + { + if (string.IsNullOrEmpty(p.订单数)) + { + p.订单数 = "0"; + } + }); + + int number = 1; + List lineError = new List(); + List ErrorList = new List(); + var _lst = p_order_list.Where(p => p.订单数 != "0").ToList(); + _lst.ForEach + (p => + { + var _ls = CheckExcelMode(db, p); + if (_ls.Count > 0) + { + lineError.Add(number.ToString()); + ErrorList.Add(string.Join("
", _ls.ToArray())); + } + number++; + }); + if (lineError.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.MessageList.AddRange(ErrorList); + _ret.Result = false; + } + else + { + var VenderList = _lst.Select(p => p.供应商编码).Distinct(); + var PartCodeList = _lst.Select(p => p.零件编码).Distinct(); + var OrderList = _lst.GroupBy(p => new { p.订单编号, p.订货日期 }).ToList(); + OrderList.ForEach((p) => + { + var list = p.ToList(); + if (list.Count > 0) + { + var _entity = list.FirstOrDefault(); + TB_ASK _ask = new TB_ASK(); + _ask.AskBillNum = SCP_BILLCODE_CONTROLLER.MakeASKCode(); + _ask.VendId = _entity.供应商编码; + _ask.State = (int)AskState.New; + _ask.PoBillNum = _entity.订单编号; + _ask.ModType = (int)BillModType.Contract; + _ask.Site = _entity.域名; + _ask.SubSite = _entity.地点; + if (IsAutoPublish) + { + _ask.State = (int)AskState.Release; + } + else + { + _ask.State = (int)AskState.New; + } + _ask.BeginTime = DateTime.Parse(_entity.订货日期); + _ask.Buyer = p_buyer; + _ask.BuyerPhone = _entity.计划员电话; + _ask.ErpBillNum = _entity.订单编号; + _ask.EndTime = DateTime.Parse(_entity.到货日期); + _ask.CreateTime = DateTime.Now; + _ask.CreateUser = p_creator; + _ask.VendId = _entity.供应商编码; + _ask.GUID = Guid.NewGuid(); + _ask.ReceivedPort = _entity.收货口; + _ask.IsDeleted = false; + _ask.Extend1 = str1; + _ask.Remark = _entity.备注; + db.TB_ASK.Add(_ask); + #region 供应商新任务代办接口 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "供应商"; + _item.ITEM_NO = _ask.AskBillNum; + _item.ITEM_CONTENT = "要货看盘有信息"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.NEW_ASK; + _item.VEND_ID = _ask.VendId; + _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + _item.SENDER = _entity.计划员; + _item.SENDING_TIME = DateTime.Now; + db.TB_PENING_ITEMS.Add(_item); + #endregion + // int _number = 1; + List _ls = new List(); + list.ForEach((itm) => + { + var _number = _ls.Count(p1 => p1.PoBillNum == _ask.PoBillNum + && p1.PoLine == Int32.Parse(itm.行号) && p1.PartCode == itm.零件编码 && itm.域名 == p1.Remark); + if (_number > 0) + { + _ret.MessageList.Add(string.Format("已经存在订单为{0}行号为{1}零件编码为{2}", itm.订单编号, itm.行号, itm.零件编码)); + } + + TB_ASK_DETAIL _t_ASK_Detail = new TB_ASK_DETAIL(); + //_t_ASK_Detail.PoLine = _number; + _t_ASK_Detail.PoLine = Int32.Parse(itm.行号); + _t_ASK_Detail.Currency = itm.币种; + _t_ASK_Detail.AskBillNum = _ask.AskBillNum; + _t_ASK_Detail.PoBillNum = _ask.PoBillNum; + _t_ASK_Detail.PoUnit = itm.单位; + _t_ASK_Detail.CreateTime = DateTime.Now; + _t_ASK_Detail.CreateUser = _ask.CreateUser; + _t_ASK_Detail.PartCode = itm.零件编码; + _t_ASK_Detail.BeginTime = DateTime.Parse(itm.订货日期); + _t_ASK_Detail.EndTime = DateTime.Parse(itm.到货日期); + _t_ASK_Detail.TempQty = decimal.Parse(itm.订单数); + _t_ASK_Detail.AskQty = decimal.Parse(itm.订单数); + _t_ASK_Detail.IsDeleted = false; + _t_ASK_Detail.LocUnit = itm.单位; + _t_ASK_Detail.UnConv = 1; + _t_ASK_Detail.Site = _ask.Site; + _t_ASK_Detail.SubSite = _ask.SubSite; + _t_ASK_Detail.DockCode = itm.收货口; + _t_ASK_Detail.State = _ask.State; + _t_ASK_Detail.Price = string.IsNullOrEmpty(itm.价格) ? 0 : decimal.Parse(itm.价格); + _t_ASK_Detail.GUID = Guid.NewGuid(); + _t_ASK_Detail.Remark = _ask.Site; + db.TB_ASK_DETAIL.Add(_t_ASK_Detail); + _ls.Add(_t_ASK_Detail); + // _number++; + }); + + } + else + { + _ret.MessageList.Add("ERP订单编号已存在,请重新导入!"); + + } + if (_ret.MessageList.Count == 0) + { + int state = db.SaveChanges(); + if (state != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + ); + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + + } /// /// 供应商零件导入 /// @@ -2475,7 +2720,10 @@ namespace CK.SCP.Controller _lst.ForEach(p => { var _price = new TB_PRICE(); + string starttime = DateTime.Parse(p.开始时间).ToShortDateString(); + string endtime = DateTime.Parse(p.结束时间).ToShortDateString(); DateTime st = DateTime.Parse(p.开始时间); + DateTime et = DateTime.Parse(p.结束时间); #region 201909011修改 var _Site = new SqlParameter("@Site", p.域); @@ -2498,8 +2746,8 @@ namespace CK.SCP.Controller _price.State = _state; _price.VendId = p.供应商编号.Trim(); _price.PartCode = p.零件编码.Trim(); - _price.StartTime = DateTime.Parse(p.开始时间); - _price.EndTime = DateTime.Parse(p.结束时间); + _price.StartTime = DateTime.Parse(starttime); + _price.EndTime = DateTime.Parse(endtime); _price.Curr = p.币种; _price.Unit = p.单位; _price.Amt = decimal.Parse(p.零件基础价格); @@ -2796,6 +3044,8 @@ namespace CK.SCP.Controller _lst.ForEach(p => { + string starttime = Convert.ToDateTime(p.最新开始时间).ToShortDateString(); + string endtime = Convert.ToDateTime(p.最新结束时间).ToShortDateString(); var _vender = db.TB_PRICE.SingleOrDefault(t => t.VendId == p.供应商编号.ToUpper() && t.PartCode == p.零件编码 && t.UID.ToString() == p.标识 && t.SubSite == p.地点 && t.Site == p.域); if (_vender == null) { @@ -2805,11 +3055,49 @@ namespace CK.SCP.Controller if (DateTime.Parse(p.最新开始时间)< DateTime.Parse(p.结束时间) && DateTime.Parse(p.最新开始时间) >DateTime.Parse(p.开始时间)) { - _vender.EndTime = Convert.ToDateTime(DateTime.Parse(p.最新开始时间).AddDays(-1)); + _vender.EndTime = Convert.ToDateTime(DateTime.Parse(starttime).AddDays(-1)); _vender.Extend3 = "价格表修改"; + var _PR = db.V_TB_PRICE.FirstOrDefault(t => t.VendId == p.供应商编号.ToUpper() && t.PartCode == p.零件编码 && t.UID.ToString() == p.标识 && t.SubSite == p.地点 && t.Site == p.域); + if (_PR != null) + { + TS_UNI_API TS = new TS_UNI_API(); + TS.InterfaceType = "Price"; + TS.BillNum = (_PR.VendId + _PR.SubSite.Substring(1, 1) + _PR.SubSite.Substring(3, 1)).Trim(); + TS.PartCode = _PR.PartCode; + if (_PR.TemporaryPrice == 0) + { + TS.Batch = "No"; + } + else + { + TS.Batch = "Yes"; + } + TS.Qty = _PR.Amt + _PR.SharingPrice; + TS.Price = _PR.Amt; + TS.State = 1; + TS.ValidDate = DateTime.Now; + TS.ErpLineNum = 1; + TS.Domain = _PR.Site;//域 + TS.Site = _PR.SubSite;//地点 + TS.Extend1 = _PR.Remarks; + TS.CreateTime = Convert.ToDateTime(_PR.StartTime);//开始时间 + TS.PutTime = Convert.ToDateTime(DateTime.Parse(starttime).AddDays(-1));//结束时间 + TS.CreateOper = _PR.Creator; + TS.Currency = _PR.Curr;//货币 + var _first = db.TA_PART.Where(itm => itm.PartCode == p.零件编码).FirstOrDefault(); + if (_first != null) + { + TS.PoUnit = _first.Unit; + } + else + { + TS.PoUnit = _PR.Unit;//单位 + } + db.TS_UNI_API.Add(TS); + } + db.TB_PRICE.AddOrUpdate(_vender); - } - // var sr = p.零件最新价格.ToString().Trim(); + } TB_PRICE tb = new TB_PRICE(); tb.State = 0; tb.Extend3 = "价格表修改增加"; @@ -2821,8 +3109,8 @@ namespace CK.SCP.Controller tb.Amt = Convert.ToDecimal(p.零件最新价格); tb.Site = p.域; tb.SubSite = p.地点; - tb.StartTime = Convert.ToDateTime(p.最新开始时间); - tb.EndTime = Convert.ToDateTime(p.最新结束时间); + tb.StartTime = Convert.ToDateTime(starttime); + tb.EndTime = Convert.ToDateTime(endtime); tb.Creator = p_createuser; tb.IsPost = 0; tb.TemporaryPrice = Int32.Parse(p.是否临时价格); @@ -2833,17 +3121,16 @@ namespace CK.SCP.Controller if (_ret.MessageList.Count == 0) { - int state = db.SaveChanges(); - if (state != -1) - { + db.BulkSaveChanges(); + _ret.State = ReturnStatus.Succeed; _ret.Result = true; - } - else - { - _ret.State = ReturnStatus.Failed; - _ret.Result = false; - } + //} + //else + //{ + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + //} } else { @@ -3383,7 +3670,7 @@ namespace CK.SCP.Controller { using (ScpEntities db = EntitiesFactory.CreateScpInstance()) { - int number = 1; + //int number = 1; List lineError = new List(); List ErrorList = new List(); @@ -3399,6 +3686,16 @@ namespace CK.SCP.Controller //} //注释结束 var _lst = p_order_list; + var PoList = _lst.Select(itm => itm.订单编号).Distinct().ToList(); + foreach (var po in PoList) + { + var vendcount = _lst.Where(itm => itm.订单编号 == po).Select(itm => itm.供应商编号).Distinct().ToList(); + if (vendcount.Count() > 1) + { + lineError.Add(string.Format("导入订单编号【{0}】对应两个供应商了,麻烦修改", po)); + ErrorList = lineError; + } + } p_order_list.ForEach(p => { var _count1 = _lst.Count(itm => itm.订单编号 == p.订单编号 && itm.行号 == p.行号); @@ -3413,19 +3710,19 @@ namespace CK.SCP.Controller lineError.Add(string.Format("导入订单编号【{0}】零件编码【{1}】有重复", p.订单编号, p.零件号)); ErrorList = lineError; } + + }); p_order_list.ForEach (p => { var _ls = CheckExcelMode_Po(db, p, p_modtype, site, subsite); if (_ls.Count > 0) - { - lineError.Add(number.ToString()); + { ErrorList.Add(string.Join("
", _ls.ToArray())); - } - number++; + } }); - if (lineError.Count > 0) + if (ErrorList.Count > 0) { _ret.State = ReturnStatus.Failed; _ret.MessageList.AddRange(ErrorList); @@ -3520,11 +3817,19 @@ namespace CK.SCP.Controller //} //注释结束 var _lst = p_order_list; + var VenderList = _lst.Select(itm => itm.订单编号).Distinct().ToList(); + var PartCodeList = _lst.Select(itm => itm.供应商编号).Distinct().ToList(); + if (VenderList.Count != PartCodeList.Count) + { + lineError.Add(string.Format("存在多个供应商编号对应一个订单号")); + ErrorList = lineError; + } p_order_list.ForEach(p => { var _count1 = _lst.Count(itm => itm.订单编号 == p.订单编号 && itm.行号 == p.行号); var _count2 = _lst.Count(itm => itm.订单编号 == p.订单编号 && itm.零件号 == p.零件号); - //var _count3 = _lst.Count(itm => itm.订单编号 == p.订单编号 && itm.供应商编号 == p.供应商编号); + + if (_count1 > 1 && p_modtype == BillModType.Contract) { lineError.Add(string.Format("导入订单编号【{0}】行号【{1}】有重复", p.订单编号, p.行号)); @@ -3534,13 +3839,8 @@ namespace CK.SCP.Controller { lineError.Add(string.Format("导入订单编号【{0}】零件编码【{1}】有重复", p.订单编号, p.零件号)); ErrorList = lineError; - } - - //if (_count3 > 1) - //{ - // lineError.Add(string.Format("导入订单编号【{0}】供应商编号【{1}】有重复", p.订单编号, p.供应商编号)); - // ErrorList = lineError; - //} + } + }); p_order_list.ForEach (p => @@ -4348,7 +4648,17 @@ namespace CK.SCP.Controller _tDetail.State = (int)p_order.State; _tDetail.SubSite = itm.SubSite; _tDetail.Site = itm.Site; - _tDetail.Price = itm.Price; + if (itm.Site == "BJBMPT") + { + var price = db.TB_PRICE.Where(p => p.PartCode == itm.PartCode&&p.State>-1&&p.VendId== p_order.VendId).Max(p => p.UID); + var pri = db.TB_PRICE.FirstOrDefault(t=>t.UID==price); + _tDetail.Price = pri.Amt; + } + else + { + _tDetail.Price = itm.Price; + } + _tDetail.Remark = itm.Remark; _tDetail.GUID = Guid.NewGuid(); _tDetail.Currency = itm.Currency; diff --git a/北京北汽/Controller/SCP_RECEIVE_CONTROLLER.cs b/北京北汽/Controller/SCP_RECEIVE_CONTROLLER.cs index 1ee004c..f458646 100644 --- a/北京北汽/Controller/SCP_RECEIVE_CONTROLLER.cs +++ b/北京北汽/Controller/SCP_RECEIVE_CONTROLLER.cs @@ -1091,10 +1091,10 @@ namespace CK.SCP.Controller { q = q.Where(p => p_entity.UIDList.Contains(p.UID)); } - if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) - { - q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); - } + //if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + //{ + // q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + //} if (p_entity.UserInSubSite != null && p_entity.UserInSubSite.Count > 0) { q = q.Where(p => p_entity.UserInSubSite.Contains(p.SubSite)); diff --git a/北京北汽/Controller/SCP_TA_LANGUAGE_CONTROLLER.cs b/北京北汽/Controller/SCP_TA_LANGUAGE_CONTROLLER.cs index 3896726..b3c7840 100644 --- a/北京北汽/Controller/SCP_TA_LANGUAGE_CONTROLLER.cs +++ b/北京北汽/Controller/SCP_TA_LANGUAGE_CONTROLLER.cs @@ -10,6 +10,7 @@ using CK.SCP.Models.ScpEntity; using CK.SCP.Utils; using System.Data.Entity.Core; using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity.ExcelExportEnttity; namespace CK.SCP.Controller { @@ -122,8 +123,129 @@ namespace CK.SCP.Controller } return _ret; } - + public static ResultObject EXCEL_ADRESS_LIST_CQ(List p_order_list, string site, string p_creator) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + int number = 1; + List lineError = new List(); + List ErrorList = new List(); + var _lst = p_order_list; + + + if (lineError.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.MessageList.AddRange(ErrorList); + _ret.Result = false; + } + else + { + _lst.ForEach(p => + { + + var _Sitelist = db.TB_ADDRESS.Count(t => t.Address == p.收货地址); + if (_Sitelist == 0) + { + TB_ADDRESS Price = new TB_ADDRESS(); + Price.Address = p.收货地址; + Price.NamePone = p.收货人信息; + + db.TB_ADDRESS.AddOrUpdate(Price); + } + else if (_Sitelist == 1) + { + var _PAlist = db.TB_ADDRESS.SingleOrDefault(t => t.Address == p.收货地址); + _PAlist.NamePone = p.收货人信息; + db.TB_ADDRESS.AddOrUpdate(_PAlist); + } + + }); + if (_ret.MessageList.Count == 0) + { + int state = db.SaveChanges(); + if (state != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_VENDER_PART_MOD", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_VENDER_PART_MOD", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_VENDER_PART_MOD", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_VENDER_PART_MOD", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } public static ResultObject Save_TA_LANGUAGE(List p_entitys) { ResultObject _ret = new ResultObject(); diff --git a/北京北汽/Controller/SCP_TB_PRICE_CONTROLLER.cs b/北京北汽/Controller/SCP_TB_PRICE_CONTROLLER.cs index b9b93c9..7f457db 100644 --- a/北京北汽/Controller/SCP_TB_PRICE_CONTROLLER.cs +++ b/北京北汽/Controller/SCP_TB_PRICE_CONTROLLER.cs @@ -209,6 +209,224 @@ namespace CK.SCP.Controller q = q.Where(p => p.SubSite == p_entity.SubSite); } + if (p_entity.UIDList != null && p_entity.UIDList.Count > 0) + { + q = q.Where(p => p_entity.UIDList.Contains(p.UID)); + } + if (p_entity.UserInSubSite != null && p_entity.UserInSubSite.Count > 0) + { + q = q.Where(p => p_entity.UserInSubSite.Contains(p.SubSite)); + } + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", e.Message); + throw e; + } + } + + public static void Get_TB_PRICEDC_List( V_TB_PRICE p_entity, Action>> p_action) + { + + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_PRICE; + + if (p_entity.UIDList != null && p_entity.UIDList.Count > 0) + { + q = q.Where(p => p_entity.UIDList.Contains(p.UID)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", e.Message); + throw e; + } + } + + public static void Get_TB_PRICE_TemporaryPrice_CQ_List(bool p_flag, V_TB_PRICE_TemporaryPrice p_entity, Action>> p_action) + { + + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_PRICE_TemporaryPrice; + if (p_flag) + { + q = q.Where(p => p.Amt == 0); + } + + + + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (p_entity.Amt > 0) + { + q = q.Where(p => p.Amt == p_entity.Amt); + } + if (p_entity.TemporaryPrice > 0) + { + q = q.Where(p => p.TemporaryPrice == p_entity.TemporaryPrice); + } + if (p_entity.SharingPrice > 0) + { + q = q.Where(p => p.SharingPrice == p_entity.SharingPrice); + } + if (!string.IsNullOrEmpty(p_entity.Extend3)) + { + q = q.Where(p => p.Extend3.Contains(p_entity.Extend3)); + } + if (!string.IsNullOrEmpty(p_entity.Extend2)) + { + q = q.Where(p => p.Extend2.Contains(p_entity.Extend2)); + } + + + if (!string.IsNullOrEmpty(p_entity.Extend3)) + { + q = q.Where(p => p.Extend3.Contains(p_entity.Extend3)); + } + if (!string.IsNullOrEmpty(p_entity.PartName)) + { + q = q.Where(p => p.PartName.Contains(p_entity.PartName)); + } + if (!string.IsNullOrEmpty(p_entity.Creator)) + { + q = q.Where(p => p.Creator == p_entity.Creator); + } + if (p_entity.StartTime != null) + { + q = q.Where(p => p.StartTime >= p_entity.StartTime); + } + if (p_entity.EndTime != null) + { + q = q.Where(p => p.EndTime <= p_entity.EndTime); + } + if (p_entity.State != 3)//3是查询所有 + { + q = q.Where(p => p.State == p_entity.State); + } + + if (!string.IsNullOrEmpty(p_entity.SubSite)) + { + q = q.Where(p => p.SubSite == p_entity.SubSite); + } + //if (p_entity.UserInAddress.FirstOrDefault() != null && p_entity.UserInAddress.Count > 0) //{ @@ -278,7 +496,6 @@ namespace CK.SCP.Controller } } - public static ResultObject Save_TB_PRICE(List p_entitys,PriceState p_state) { ResultObject _ret = new ResultObject(); @@ -394,7 +611,7 @@ namespace CK.SCP.Controller _entity.TemporaryPrice = itm.TemporaryPrice; _entity.Creator = itm.Creator; _entity.EndTime = itm.EndTime; - _entity.StartTime = DateTime.Now; + _entity.StartTime = itm.StartTime; //_entity.UpdateTime = itm.UpdateTime; //_entity.UpdateUser = itm.UpdateUser; //_entity.UpdateInfo = itm.UpdateInfo; @@ -489,6 +706,102 @@ namespace CK.SCP.Controller } return p_entitys; } + + public static ResultObject Save_TB_PRICE_TemporaryPrice(List p_list, string p_user) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + + var _ls = db.TB_PRICE.Where(p => p_list.Contains(p.UID)).ToList(); + _ls.ForEach(p => + { + p.TemporaryPrice=0; + + } + ); + db.TB_PRICE.AddOrUpdate(p => p.UID, _ls.ToArray()); + + + + if (_ret.MessageList.Count == 0) + { + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + + return _ret; + } public static ResultObject Save_TB_PRICE_STATE(List p_list, string p_user, int State) { ResultObject _ret = new ResultObject(); diff --git a/北京北汽/Controller/SCP_TB_VENDER_CONTROLLER.cs b/北京北汽/Controller/SCP_TB_VENDER_CONTROLLER.cs index 7298bf1..8d70310 100644 --- a/北京北汽/Controller/SCP_TB_VENDER_CONTROLLER.cs +++ b/北京北汽/Controller/SCP_TB_VENDER_CONTROLLER.cs @@ -30,6 +30,22 @@ namespace CK.SCP.Controller return db.TA_VENDER.ToList(); } } + public static TB_FACTORY GetFactory(string site) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + return db.TB_FACTORY.Where(p=>p.ErpSite== site).FirstOrDefault(); + } + } + public static List Getlist1(string site) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + return db.TA_VENDER.Where(p=>p.Site== site).ToList(); + } + } public static List Getlist(List lsVenderID ) { diff --git a/北京北汽/Controller/app.config b/北京北汽/Controller/app.config index 36106a3..72f696a 100644 --- a/北京北汽/Controller/app.config +++ b/北京北汽/Controller/app.config @@ -1,32 +1,32 @@ - + -
+
-
+
- - + + - - + + - + - + @@ -36,4 +36,4 @@ - + \ No newline at end of file diff --git a/北京北汽/Models/App.config b/北京北汽/Models/App.config index f906a42..134d7fd 100644 --- a/北京北汽/Models/App.config +++ b/北京北汽/Models/App.config @@ -1,28 +1,28 @@ - + -
+
- + - + - + - - + + - + \ No newline at end of file diff --git a/北京北汽/Models/CK.SCP.Models.csproj b/北京北汽/Models/CK.SCP.Models.csproj index a1527fa..6b7e46e 100644 --- a/北京北汽/Models/CK.SCP.Models.csproj +++ b/北京北汽/Models/CK.SCP.Models.csproj @@ -11,7 +11,6 @@ CK.SCP.Models v4.5.2 512 - true @@ -348,6 +347,7 @@ + @@ -444,6 +444,7 @@ + diff --git a/北京北汽/Models/Enums/SCP_ENUM.cs.cs b/北京北汽/Models/Enums/SCP_ENUM.cs.cs index 16e195c..361dba4 100644 --- a/北京北汽/Models/Enums/SCP_ENUM.cs.cs +++ b/北京北汽/Models/Enums/SCP_ENUM.cs.cs @@ -194,10 +194,18 @@ namespace CK.SCP.Models.Enums FinanceReceive = 5, [Description("财务退回")] FinanceFail = 6, + [Description("财务手工收票")] + CustomReceive = 8, [Description("发票作废")] Reject = -1, } - + public enum LoginNumer + { + [Description("成功登录")] + Sussess = 0, + [Description("登录失败")] + Faile = 1, + } public enum ConfigState { diff --git a/北京北汽/Models/ScpEntities.cs b/北京北汽/Models/ScpEntities.cs index fa7943d..40bfcde 100644 --- a/北京北汽/Models/ScpEntities.cs +++ b/北京北汽/Models/ScpEntities.cs @@ -88,6 +88,7 @@ namespace CK.SCP.Models public virtual DbSet V_TB_ASN { get; set; } public virtual DbSet V_TB_ASN_DETAIL { get; set; } public virtual DbSet TA_LANGUAGE { get; set; } + public virtual DbSet TA_LOGINNUMBER { get; set; } public virtual DbSet TB_CONTRACT { get; set; } public virtual DbSet TB_CONTRACT_DETAIL { get; set; } public virtual DbSet TB_CONTRACT_DETAIL_PRICE { get; set; } @@ -127,6 +128,7 @@ namespace CK.SCP.Models public virtual DbSet V_TA_VEND_PART { get; set; } public virtual DbSet TB_PRICE { get; set; } public virtual DbSet V_TB_PRICE { get; set; } + public virtual DbSet V_TB_PRICE_TemporaryPrice { get; set; } public virtual DbSet TB_FORECAST { get; set; } public virtual DbSet V_TB_PRICE_DETAIL { get; set; } diff --git a/北京北汽/Models/ScpEntity/ExcelExportEnttity/SCP_ASK_DETAIL_EXPORT.cs b/北京北汽/Models/ScpEntity/ExcelExportEnttity/SCP_ASK_DETAIL_EXPORT.cs index 723c6b5..d930460 100644 --- a/北京北汽/Models/ScpEntity/ExcelExportEnttity/SCP_ASK_DETAIL_EXPORT.cs +++ b/北京北汽/Models/ScpEntity/ExcelExportEnttity/SCP_ASK_DETAIL_EXPORT.cs @@ -19,7 +19,8 @@ namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity public string 价格 { get; set; } //"Price" public string 要货数量 {get;set;} //"AskQty" public string 说明 { get; set; } //"ReMark" + public string 供应商 { get; set; } + public string 订货日期 { get; set; } - } } diff --git a/北京北汽/Models/ScpEntity/ExcelExportEnttity/SCP_PO_DETAIL_EXPORT.cs b/北京北汽/Models/ScpEntity/ExcelExportEnttity/SCP_PO_DETAIL_EXPORT.cs index 4678110..4a77e1d 100644 --- a/北京北汽/Models/ScpEntity/ExcelExportEnttity/SCP_PO_DETAIL_EXPORT.cs +++ b/北京北汽/Models/ScpEntity/ExcelExportEnttity/SCP_PO_DETAIL_EXPORT.cs @@ -21,8 +21,9 @@ namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity public string 退货数 { get; set; } //RejectQty" public string 到货日期 { get; set; } //EndTime" public string 单位 {get;set; } //PoUnit" + public string 供应商名称 { get; set; } + public string 供应商编码 { get; set; } - } public class SCP_PO_DETAIL_EXPORT_MODEL { @@ -46,7 +47,7 @@ namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity public string 收货口 { get; set; } - + public string 备注 { get; set; } diff --git a/北京北汽/Models/ScpEntity/ExcelExportEnttity/SCP_VENDER_EXPORT.cs b/北京北汽/Models/ScpEntity/ExcelExportEnttity/SCP_VENDER_EXPORT.cs index f97b2c9..f9f67b2 100644 --- a/北京北汽/Models/ScpEntity/ExcelExportEnttity/SCP_VENDER_EXPORT.cs +++ b/北京北汽/Models/ScpEntity/ExcelExportEnttity/SCP_VENDER_EXPORT.cs @@ -25,5 +25,7 @@ namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity public string 备注 { get; set; } public string 税率 { get; set; } public string 域 { get; set; } + public string 收货地址 { get; set; } + public string 收货人信息 { get; set; } } } diff --git a/北京北汽/Models/ScpEntity/SCP_OTD_EXPORT.cs b/北京北汽/Models/ScpEntity/SCP_OTD_EXPORT.cs index eb2833e..ec2fecb 100644 --- a/北京北汽/Models/ScpEntity/SCP_OTD_EXPORT.cs +++ b/北京北汽/Models/ScpEntity/SCP_OTD_EXPORT.cs @@ -6,6 +6,18 @@ using System.Threading.Tasks; namespace CK.SCP.Models.ScpEntity { + public class InvoiceCreateQueryParm + { + public string ReceiveID { set; get; } + public string VendId { set; get; } + public string Modify { set; get; } + public string IsAll { set; get; } + public string Tax { set; get; } + public string CJ { set; get; } + public string TZ { set; get; } + + + } public class SCP_OTD_EXPORT { public string VendId { get; set; } //供应商编号 diff --git a/北京北汽/Models/ScpEntity/TA_LOGINNUMBER.cs b/北京北汽/Models/ScpEntity/TA_LOGINNUMBER.cs new file mode 100644 index 0000000..4e7c2f8 --- /dev/null +++ b/北京北汽/Models/ScpEntity/TA_LOGINNUMBER.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TA_LOGINNUMBER + { + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [Key] + public string Name { get; set; } + + public string Time { get; set; } + public int Number { get; set; } + + } +} diff --git a/北京北汽/Models/ScpEntity/V_TB_PRICE.cs b/北京北汽/Models/ScpEntity/V_TB_PRICE.cs index b3cb147..3856f5e 100644 --- a/北京北汽/Models/ScpEntity/V_TB_PRICE.cs +++ b/北京北汽/Models/ScpEntity/V_TB_PRICE.cs @@ -57,6 +57,15 @@ namespace CK.SCP.Models.ScpEntity public List UserInVendIds { set; get; } [NotMapped] public List UserInSubSite { set; get; } + + [NotMapped] + public List UIDList { set; get; } public string Flag { get; set; } + [NotMapped] + public string NewStartTime { get; set; } + [NotMapped] + public string NewEndTime { get; set; } + [NotMapped] + public string NewPrice { get; set; } } } diff --git a/北京北汽/Models/ScpEntity/V_TB_PRICE_TemporaryPrice.cs b/北京北汽/Models/ScpEntity/V_TB_PRICE_TemporaryPrice.cs new file mode 100644 index 0000000..020fb3a --- /dev/null +++ b/北京北汽/Models/ScpEntity/V_TB_PRICE_TemporaryPrice.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models; + + +namespace CK.SCP.Models.ScpEntity +{ + public partial class V_TB_PRICE_TemporaryPrice + { + [Key] + public int UID { get; set; } + public string VendId { get; set; } + public string Site { get; set; } + public string SubSite { get; set; } + public string PartCode { get; set; } + public Nullable StartTime { get; set; } + public Nullable EndTime { get; set; } + public string Curr { get; set; } + public string Unit { get; set; } + [DecimalPrecision(18, 5)] + public decimal Amt { get; set; } + public string Remarks { get; set; } + /// + /// 状态(已用) + /// + public string Extend1 { get; set; } + /// + /// 是否是临时价格(0:否 1:是) + /// + public string Extend2 { get; set; } + /// + /// 供应商名称 + /// + public string Extend3 { get; set; } + [DecimalPrecision(18, 5)] + public decimal SharingPrice { get; set; } + public int TemporaryPrice { get; set; } + public string PartName { get; set; } + /// + /// 状态 + /// + public int State { get; set; } + /// + /// 是否传接口 1是 + /// + public int IsPost { get; set; } + public string Creator { get; set; } + [NotMapped] + public List UserInAddress { set; get; } + + [NotMapped] + public List UserInVendIds { set; get; } + [NotMapped] + public List UserInSubSite { set; get; } + public string Flag { get; set; } + } +} diff --git a/北京北汽/Models/WmsEntity/TableSchema1.cs b/北京北汽/Models/WmsEntity/TableSchema1.cs index 5f28270..69c6b92 100644 --- a/北京北汽/Models/WmsEntity/TableSchema1.cs +++ b/北京北汽/Models/WmsEntity/TableSchema1.cs @@ -1 +1,9 @@ - \ No newline at end of file +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + diff --git a/北京北汽/SCP/Business/PageBase.cs b/北京北汽/SCP/Business/PageBase.cs index e0d55d7..6fa39bc 100644 --- a/北京北汽/SCP/Business/PageBase.cs +++ b/北京北汽/SCP/Business/PageBase.cs @@ -613,6 +613,10 @@ namespace SCP _currentUser.VenderList = _userVerders; _currentUser.ConfigList = new Dictionary(); if (_currentUser.FactoryList.Count > 0) + { + _currentUser.UsedDomain = string.IsNullOrEmpty(_currentUser.Remark) ? _currentUser.FactoryList.FirstOrDefault() : _currentUser.Remark.Trim(); + } + if (_currentUser.FactoryList.Count > 0) { if (SCPDB.TA_FACTORY_CONFIG != null) { @@ -631,7 +635,7 @@ namespace SCP } } } - } + } Session["CurrentUser"] = _currentUser; } return (User)Session["CurrentUser"]; diff --git a/北京北汽/SCP/CK.SCP.Controller/ASNController.cs b/北京北汽/SCP/CK.SCP.Controller/ASNController.cs new file mode 100644 index 0000000..ec46575 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/ASNController.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; + +namespace CK.SCP.Controller +{ + public class ASNController + { + public static TF_ASN GetDetaillistByuid(int uid) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TF_ASN.SingleOrDefault(p => p.UID == uid); + } + } + + public static TF_ASN GetASNlist(string billnum, string vendid) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TF_ASN.SingleOrDefault(p => p.PoBillNum == billnum && p.VendId == vendid); + } + } + public static TF_ASN_DETAIL GetASNlistDetail(string billnum) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TF_ASN_DETAIL.SingleOrDefault(p => p.PoBillNum == billnum); + } + } + public static TF_ASN_DETAIL GetASNlistDetailByLine(string billnum, int linenum) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TF_ASN_DETAIL.SingleOrDefault(p => p.BillNum == billnum && p.PoLineNum == linenum); + } + } + } +} diff --git a/北京北汽/SCP/CK.SCP.Controller/BaseDocContoller.cs b/北京北汽/SCP/CK.SCP.Controller/BaseDocContoller.cs new file mode 100644 index 0000000..0b66180 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/BaseDocContoller.cs @@ -0,0 +1,114 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity; +using System.Data.Entity.Core.Common.CommandTrees; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using System.Data.Entity.Migrations; +using System.Linq.Expressions; +using CK.SCP.Models; + + +namespace CK.SCP.Controller +{ + public static class EntitiesHelper + { + + public static List GetModeList_genaral(Expression> select, + Expression> where, Expression> order, out int count) + where T : class + { + List list = null; + count = 0; + using (DbContext db = EntitiesFactory.CreateScpInstance()) + { + count = db.Set().Where(where).Count(); + list = + db.Set() + .Where(where) + .OrderBy(order) + .Select(select).ToList(); + } + return list; + } + + public static List GetPagedModelListAsc(Expression> select, + Expression> where, Expression> order, int pageIndex, int pageSize, out int total) + where T : class + { + List list = null; + total = 0; + using (DbContext db = EntitiesFactory.CreateScpInstance()) + { + total = db.Set().Where(where).Count(); + list = + db.Set() + .Where(where) + .OrderBy(order) + .Select(select) + .Skip((pageIndex - 1) * pageSize) + .Take(pageSize).ToList(); + } + return list; + } + + public static List GetPagedDataAsc(Expression> select, + Expression> where, Expression> order, int pageIndex, int pageSize, out int total) + where T : class + { + List list = null; + total = 0; + using (DbContext db = EntitiesFactory.CreateScpInstance()) + { + total = db.Set().Where(where.Compile()).AsQueryable().Count(); + list = + db.Set() + .Where(where.Compile()).AsQueryable() + .OrderBy(order) + .Select(select) + .Skip((pageIndex - 1) * pageSize) + .Take(pageSize).ToList(); + } + return list; + } + + //TODO 分页 原来 pageIndex-1 + public static List GetPagedDataDesc(DbContext db, Expression> select, + Expression> where, Expression> order, int pageIndex, int pageSize, out int total) + where T : class + { + List list = null; + total = 0; + + total = db.Set().Where(where).Count(); + list = + db.Set() + .Where(where) + .OrderByDescending(order) + .Select(select) + .Skip((pageIndex) * pageSize) + .Take(pageSize).ToList(); + + + return list; + } + public static List GetPagedList(DbContext db, Expression> order, int pageIndex, int pageSize, out int total) + where T : class + { + List list = null; + total = 0; + + total = db.Set().Count(); + list = + db.Set() + .OrderByDescending(order) + .Skip((pageIndex) * pageSize) + .Take(pageSize).ToList(); + + + return list; + } + } +} diff --git a/北京北汽/SCP/CK.SCP.Controller/CK.SCP.Controller.csproj b/北京北汽/SCP/CK.SCP.Controller/CK.SCP.Controller.csproj new file mode 100644 index 0000000..e0b9acd --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/CK.SCP.Controller.csproj @@ -0,0 +1,99 @@ + + + + + Debug + AnyCPU + {0C706E36-C79D-467C-91CA-DDF39BC43113} + Library + Properties + CK.SCP.Controller + CK.SCP.Controller + v4.5.2 + 512 + + + true + full + false + ..\DLL\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll + + + ..\packages\EntityFramework.Extensions.0.0.2\lib\net40\EntityFramework.Extensions.dll + + + ..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {dd7c0def-71e7-443f-b0b7-db2f5b12a506} + CK.SCP.Models + + + {74DCE5F2-A501-45F2-B4F9-494AA1867226} + Models + + + + + + + + + \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Controller/Class1.cs b/北京北汽/SCP/CK.SCP.Controller/Class1.cs new file mode 100644 index 0000000..f33df14 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/Class1.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ + public class Class1 + { + } +} diff --git a/北京北汽/SCP/CK.SCP.Controller/InfoController.cs b/北京北汽/SCP/CK.SCP.Controller/InfoController.cs new file mode 100644 index 0000000..b9d0957 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/InfoController.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; + + +namespace CK.SCP.Controller +{ + public class InfoController + { + public static bool SaveInfo(TA_Info model) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + db.TA_Info.AddOrUpdate(model); + db.SaveChanges(); + } + return true; + } + + public static bool UpdateInfo(TA_Info model) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + db.TA_Info.AddOrUpdate(p => p.ID, model); + db.SaveChanges(); + } + return true; + } + public static TA_Info GetlistByBillNo(int id) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TA_Info.SingleOrDefault(p => p.ID == id); + } + } + public static V_Info GetInfoByBillNo(int id) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.V_Info.SingleOrDefault(p => p.ID == id); + } + } + + public static void DeleteById(int id) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var info = db.TA_Info.SingleOrDefault(p => p.ID == id); + if (info != null) db.TA_Info.Remove(info); + db.SaveChanges(); + } + } + } +} diff --git a/北京北汽/SCP/CK.SCP.Controller/InvoiceController.cs b/北京北汽/SCP/CK.SCP.Controller/InvoiceController.cs new file mode 100644 index 0000000..b3c3727 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/InvoiceController.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; + + +namespace CK.SCP.Controller +{ + public class InvoiceController + { + public static List GetDataByBillInvoice( string billnum) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.V_BillInvoice.Where(p => p.BillNum == billnum).ToList(); + } + } + + + public static V_BillInvoice GetDataByBillInvoiceDetailModel(string billnum) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.V_BillInvoice.SingleOrDefault(p => p.BillNum == billnum); + } + } + + public static bool UpdateData(int state, TB_INVOICE model) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + model.State = state; + + db.TB_INVOICE.AddOrUpdate(p => p.UID, model); + EntitiesFactory.SaveDb(db); + } + return true; + } + public static bool UpdateDataRemark(string remark, TB_INVOICE model) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + model.Remark = remark; + + db.TB_INVOICE.AddOrUpdate(p => p.UID, model); + EntitiesFactory.SaveDb(db); + } + return true; + } + + public static bool UpdateDataReason(string remark, string billnum) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + TB_INVOICE model = new TB_INVOICE + { + Remark = remark, + BillNum = billnum + }; + db.TB_INVOICE.AddOrUpdate(p => p.BillNum, model); + } + return true; + } + public static TB_INVOICE GetDataByBillInvoiceBillNum(string id) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TB_INVOICE.SingleOrDefault(p => p.BillNum == id); + } + } + + public static V_BillInvoice GetBillInvoiceByBillNum(string id) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.V_BillInvoice.SingleOrDefault(p => p.BillNum == id); + } + } + } +} diff --git a/北京北汽/SCP/CK.SCP.Controller/InvoiceDetailController.cs b/北京北汽/SCP/CK.SCP.Controller/InvoiceDetailController.cs new file mode 100644 index 0000000..9f53b4d --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/InvoiceDetailController.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; + + +namespace CK.SCP.Controller +{ + public class InvoiceDetailController + { + public static List GetDataByBillInvoiceDetail(string billnum) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.V_BillInvoiceDetail.Where(p => p.BillNum == billnum).ToList(); + } + } + + public static V_BillInvoiceDetail GetDataByBillInvoiceDetailModel(string billnum) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.V_BillInvoiceDetail.SingleOrDefault(p => p.BillNum == billnum); + } + } + public static V_BillInvoiceDetail GetDataByBillInvoiceDetailBillNum(string id) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.V_BillInvoiceDetail.SingleOrDefault(p => p.BillNum == id); + } + } + } +} diff --git a/北京北汽/SCP/CK.SCP.Controller/OadOrderController.cs b/北京北汽/SCP/CK.SCP.Controller/OadOrderController.cs new file mode 100644 index 0000000..b7fd682 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/OadOrderController.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; + +namespace CK.SCP.Controller +{ + public class OadOrderController + { +// public List GetList() +// { +// using (ScpEntities db = EntitiesFactory.CreateScpInstance()) +// { +// // db.TB_QadOrder.Where(p=>p.BillNo==db.) +// var query = db.TB_QadOrder.Join(db.TB_QadOrderDetail, a => a.BillNo, g => g.BillNo, (a, g) => new +// { +// a.BillNo, +// a.SupplierCode, +// a.StartDate, +// a.Address, +// a.ProductCode, +// a.Qty, +// }).ToList(); +//// return query; +// // return db.V_BillInvoice.Where(p => p.BillNum == billnum).ToList(); +// +// } +// } + } +} diff --git a/北京北汽/SCP/CK.SCP.Controller/POController.cs b/北京北汽/SCP/CK.SCP.Controller/POController.cs new file mode 100644 index 0000000..481dde4 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/POController.cs @@ -0,0 +1,115 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.Entity.Migrations; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; + + +namespace CK.SCP.Controller +{ + public class POController + { + public static List Getlist() + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.V_POAll.ToList(); + } + } + public static bool UpdatePOState(TF_PO model) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + db.TF_PO.AddOrUpdate(p => p.UID, model); + EntitiesFactory.SaveDb(db); + } + return true; + } + + public static TF_PO GetlistByID(int uid) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TF_PO.SingleOrDefault(p => p.UID == uid); + } + } + + public static TF_PO GetlistByBillNum(string billnum) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TF_PO.SingleOrDefault(p => p.BillNum == billnum); + } + } + public static V_POAll GetPOAlllistByBillNum(string billnum) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.V_POAll.SingleOrDefault(p => p.BillNum == billnum); + } + } + public static void UpdateOrderByUID(int state, int uid) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + TF_PO model = new TF_PO(); + model.State = state; + model.UID = uid; + db.SaveChanges(); + } + } + + public static void UpdatePOOBybillno(TF_PO model) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + model.State = (int)PlanState.Confirm; + + db.TF_PO.AddOrUpdate(p => p.UID, model); + db.SaveChanges(); + } + } + public static List GetlistByBillNum(V_POAll model) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.V_POAll.Where(p => p.BillNum == model.BillNum).ToList(); + } + } + public static TF_PO GetASNlist(string billnum, string vendid) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TF_PO.SingleOrDefault(p => p.BillNum == billnum && p.VendId == vendid); + } + } + public static TF_PO GetPOModel(int id) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TF_PO.SingleOrDefault(p => p.UID == id); + } + } + public static List GetASNlist() + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TF_PO.ToList(); + } + } + public static void DeletePO(TF_PO model) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + db.TF_PO.Remove(model); + db.SaveChanges(); + } + } + } +} diff --git a/北京北汽/SCP/CK.SCP.Controller/PODetailController.cs b/北京北汽/SCP/CK.SCP.Controller/PODetailController.cs new file mode 100644 index 0000000..68951d7 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/PODetailController.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; + + +namespace CK.SCP.Controller +{ + public class PODetailController + { + public static V_POAllDetail GetlistByBillNum(string billnum) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.V_POAllDetail.SingleOrDefault(p => p.BillNum == billnum); + } + } + + public static TA_VENDER GetlistBySupplierCode(string VendId) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TA_VENDER.SingleOrDefault(p => p.VendId == VendId); + } + } + + public static List GetDetaillistByBillNum(string billnum) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TF_PO_DETAIL.Where(p => p.BillNum == billnum).ToList(); + } + } + + public static TF_PO_DETAIL GetDetaillistByuid(int uid) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TF_PO_DETAIL.SingleOrDefault(p => p.UID == uid); + } + } + public static List GetDetaillistBybillnos(string billno) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TF_PO_DETAIL.Where(p => p.BillNum == billno).ToList(); + } + } + public static void Delete(TF_PO_DETAIL model) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + db.TF_PO_DETAIL.Remove(model); + } + } + public static TF_PO_DETAIL GetDetaillistBybillidandline(string bill, int linenum) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TF_PO_DETAIL.SingleOrDefault(p => p.BillNum == bill && p.ErpLineNum == linenum); + } + } + } +} + diff --git a/北京北汽/SCP/CK.SCP.Controller/PartController.cs b/北京北汽/SCP/CK.SCP.Controller/PartController.cs new file mode 100644 index 0000000..518ddb6 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/PartController.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; + + +namespace CK.SCP.Controller +{ + public class PartController + { + public static List Getlist() + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TA_PART.ToList(); + } + } + public static List GetlistByPartCode(TA_PART model) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TA_PART.Where(p=>p.PartCode==model.PartCode).ToList(); + } + } + } +} diff --git a/北京北汽/SCP/CK.SCP.Controller/PlanMonthController.cs b/北京北汽/SCP/CK.SCP.Controller/PlanMonthController.cs new file mode 100644 index 0000000..6ae3765 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/PlanMonthController.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; + + +namespace CK.SCP.Controller +{ + public class PlanMonthController + { + public static TB_PlanMonth GetPlanMonthById(int id) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TB_PlanMonth.SingleOrDefault(p => p.ID == id); + } + } + + public static bool UpdatePlanMonthById(TB_PlanMonth model) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + model.IsSend = "是"; + model.SendTime = DateTime.Now; + db.TB_PlanMonth.AddOrUpdate(model); + db.SaveChanges(); + } + return true; + } + public static TA_VENDER GetVend() + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TA_VENDER.OrderByDescending(p => p.Email).SingleOrDefault(p => p.Email != null); + } + } + + public static List GetVendList() + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TA_VENDER.ToList(); + } + } + + public static bool SaveTbPlanMonth(TB_PlanMonth model) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + db.TB_PlanMonth.AddOrUpdate(model); + db.SaveChanges(); + } + return true; + } + } +} diff --git a/北京北汽/SCP/CK.SCP.Controller/Properties/AssemblyInfo.cs b/北京北汽/SCP/CK.SCP.Controller/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..ab041bf --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("CK.SCP.CK.SCP.Controller")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("CK.SCP.CK.SCP.Controller")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +//将 ComVisible 设置为 false 将使此程序集中的类型 +//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("0c706e36-c79d-467c-91ca-ddf39bc43113")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/北京北汽/SCP/CK.SCP.Controller/PublicDataController.cs b/北京北汽/SCP/CK.SCP.Controller/PublicDataController.cs new file mode 100644 index 0000000..e0839fb --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/PublicDataController.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; + + +namespace CK.SCP.Controller +{ + public class PublicDataController + { + public static TB_PublicData GetlistByBillNo(int id) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TB_PublicData.SingleOrDefault(p => p.ID == id); + } + } + public static bool SaveInfo(TB_PublicData model) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + db.TB_PublicData.AddOrUpdate(model); + db.SaveChanges(); + } + return true; + } + + + public static bool UpdateInfo(TB_PublicData model) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + db.TB_PublicData.AddOrUpdate(p => p.ID, model); + db.SaveChanges(); + } + return true; + } + + public static void DeleteById(int id) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var info = db.TB_PublicData.SingleOrDefault(p => p.ID == id); + if (info != null) db.TB_PublicData.Remove(info); + db.SaveChanges(); + } + } + } + +} diff --git a/北京北汽/SCP/CK.SCP.Controller/ReceiveController.cs b/北京北汽/SCP/CK.SCP.Controller/ReceiveController.cs new file mode 100644 index 0000000..43ef80b --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/ReceiveController.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; + + +namespace CK.SCP.Controller +{ + public class ReceiveController + { + public static V_Receive GetlistByBillNum(string billnum) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.V_Receive.SingleOrDefault(p => p.BillNum == billnum); + } + } + } +} diff --git a/北京北汽/SCP/CK.SCP.Controller/ReceiveDetailController.cs b/北京北汽/SCP/CK.SCP.Controller/ReceiveDetailController.cs new file mode 100644 index 0000000..ce6ab9a --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/ReceiveDetailController.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; + + +namespace CK.SCP.Controller +{ + public class ReceiveDetailController + { + public static V_ReceiveDetail GetlistByBillNum(string billnum) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.V_ReceiveDetail.SingleOrDefault(p => p.BillNum == billnum); + } + } + + public static bool UpdateReceive(V_ReceiveDetail model) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + db.V_ReceiveDetail.AddOrUpdate(p => p.UID, model); + EntitiesFactory.SaveDb(db); + } + return true; + } + } +} diff --git a/北京北汽/SCP/CK.SCP.Controller/ResultObject.cs b/北京北汽/SCP/CK.SCP.Controller/ResultObject.cs new file mode 100644 index 0000000..270f538 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/ResultObject.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ +/// +///返回结果类 +/// +/// + public class ResultObject + { + public ResultObject() + { + ErrorList = new List(); + } + /// + /// 返回结果 + /// + public T Result { set; get; } + /// + /// 错误列表 + /// + public List ErrorList { set; get; } + /// + /// 返回状态 + /// + public ReturnStatus State + {private set; get; } + } + public enum ReturnStatus + { + [Description("失败")] + Failed, + [Description("成功")] + Succeed + + } +} diff --git a/北京北汽/SCP/CK.SCP.Controller/ShipController.cs b/北京北汽/SCP/CK.SCP.Controller/ShipController.cs new file mode 100644 index 0000000..87fed15 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/ShipController.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; + + +namespace CK.SCP.Controller +{ + public class ShipController + { + public static void DeleteById(int id) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var asn = db.TF_ASN.SingleOrDefault(p => p.UID == id); + if (asn != null) db.TF_ASN.Remove(asn); + db.SaveChanges(); + } + } + } +} diff --git a/北京北汽/SCP/CK.SCP.Controller/ShipDetailController.cs b/北京北汽/SCP/CK.SCP.Controller/ShipDetailController.cs new file mode 100644 index 0000000..40435df --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/ShipDetailController.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; + + +namespace CK.SCP.Controller +{ + public class ShipDetailController + { + public static V_BillShipDetail GetlistByBillNum(string billnum) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.V_BillShipDetail.SingleOrDefault(p => p.BillNum == billnum); + } + } + + public static V_BillShip GetBillShiplistByBillNo(string billnum) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.V_BillShip.SingleOrDefault(p => p.Bill == billnum); + } + } + + public static TF_ASN GetlistByBillNo(string billnum) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TF_ASN.SingleOrDefault(p => p.BillNum == billnum); + } + } + public static TF_ASN_DETAIL GetDeatillistByBillNo(string billnum) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TF_ASN_DETAIL.SingleOrDefault(p => p.BillNum == billnum); + } + } + public static bool UpdateShip(TF_ASN model) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + db.TF_ASN.AddOrUpdate(p => p.UID, model); + + EntitiesFactory.SaveDb(db); + } + return true; + + } + } +} diff --git a/北京北汽/SCP/CK.SCP.Controller/SupplierController.cs b/北京北汽/SCP/CK.SCP.Controller/SupplierController.cs new file mode 100644 index 0000000..558e4a0 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/SupplierController.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; + + + +namespace CK.SCP.Controller +{ + public class SupplierController + { + public static List GetlistByName(TA_VENDER model) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TA_VENDER.Where(p => p.VendName == model.VendName).ToList(); + } + } + public static List Getlist() + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TA_VENDER.ToList(); + } + } + + } +} diff --git a/北京北汽/SCP/CK.SCP.Controller/SupplierPartController.cs b/北京北汽/SCP/CK.SCP.Controller/SupplierPartController.cs new file mode 100644 index 0000000..773337f --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/SupplierPartController.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; + + +namespace CK.SCP.Controller +{ + public class SupplierPartController + { +// public static List Getlist() +// { +// using (ScpEntities db = EntitiesFactory.CreateScpInstance()) +// { +// return db.V_VenderPart.ToList(); +// } +// } +// public static List GetlistByPartCode(V_VenderPart model) +// { +// using (ScpEntities db = EntitiesFactory.CreateScpInstance()) +// { +// return db.V_VenderPart.Where(p => p.PartCode == model.PartCode).ToList(); +// } +// } + } +} diff --git a/北京北汽/SCP/CK.SCP.Controller/UniApiController.cs b/北京北汽/SCP/CK.SCP.Controller/UniApiController.cs new file mode 100644 index 0000000..96a1117 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/UniApiController.cs @@ -0,0 +1,253 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Models.UniApiEntity; + +namespace CK.SCP.Controller +{ + public static class UniApiController + { + + public static void RemoveList(ScpEntities db, List uniApiList) + { + db.TS_UNI_API.RemoveRange(uniApiList); + } + public static void AddHisList(ScpEntities db, List uniApiHisList) + { + + db.TS_UNI_API_HIS.AddRange(uniApiHisList); + } + + public static void AddApiData(ScpEntities wdb, TS_UNI_API apiData) + { + wdb.TS_UNI_API.Add(apiData); + } + + + public static void AddApiDataList(ScpEntities wdb, List apiDataList) + { + wdb.TS_UNI_API.AddRange(apiDataList); + } + + + public static WmsTableName GetTableName(UniApiType uniApiType) + { + WmsTableName tableName; + switch (uniApiType) + { + case UniApiType.PO: + tableName = WmsTableName.TS_UNI_API;//中间表的名字 + break; + case UniApiType.Receive: + tableName = WmsTableName.TS_UNI_API; + break; + case UniApiType.BarCode: + tableName = WmsTableName.TS_UNI_API; + break; + case UniApiType.Invoice: + tableName = WmsTableName.TS_UNI_API; + break; + default: + throw new ArgumentOutOfRangeException(nameof(uniApiType), uniApiType, null); + } + return tableName; + } + + //创建采购订单 + public static TS_UNI_API CreateBy(TF_PO bill, TF_PO_DETAIL detail, UniApiType uniApiType) + { + var tableName = GetTableName(uniApiType); + var apiData = new TS_UNI_API + { + InterfaceType = uniApiType.ToString(), + TableName = tableName.ToString(), + BillNum = bill.BillNum, + PartCode = detail.PartCode, + Batch = "", + Qty = detail.BillQty, + PoUnit = detail.PoUnit, + LocUnit = detail.LocUnit, + State = detail.State, + CreateOper = bill.OperName, + CreateTime = bill.BillTime, + PutTime = ScpCache.GetServerTime(), + VendId = bill.VendId, + BillType = (int)BillType.PuchaseOrder, + SubBillType = 0, + ValidDate = detail.DueDate, + ErpBillNum = bill.ErpBillNum, + ErpLineNum = detail.ErpLineNum, + VendBatch = "", + SourceBillNum = "", + Price = detail.Price, + PackQty = detail.PackQty, + Currency = detail.Currency, + Attn = "",//TODO + Buyer = bill.Buyer, + BuyerPhone = bill.BuyerPhone, + ModType = bill.ModType, + Receiver = "",//TODO + UmConv = (decimal)detail.UmConv, + }; + return apiData; + } + + private static ScpEntities db = EntitiesFactory.CreateScpInstance(); + public static TS_UNI_API CreateBy(TF_PO bill, List detail, UniApiType uniApiType) + { + var tableName = GetTableName(uniApiType); + TS_UNI_API asp = new TS_UNI_API(); + foreach (var item in detail) + { + asp.InterfaceType = uniApiType.ToString(); + asp.TableName = tableName.ToString(); + + asp.BillNum = bill.BillNum; + asp.Batch = string.Empty; + asp.CreateOper = bill.OperName; + asp.CreateTime = bill.BillTime; + asp.PutTime = ScpCache.GetServerTime(); + asp.VendId = bill.VendId; + asp.BillType = (int)BillType.PO; + asp.SubBillType = 0; + asp.VendBatch = string.Empty; + asp.SourceBillNum = string.Empty; + asp.Attn = "";//TODO + asp.Buyer = bill.Buyer; + asp.BuyerPhone = bill.BuyerPhone; + asp.ModType = bill.ModType; + asp.Receiver = "";//TODO + asp.PartCode = item.PartCode; + + asp.Qty = item.BillQty; + asp.PoUnit = item.PoUnit; + asp.LocUnit = item.LocUnit; + asp.State = item.State; + + asp.ValidDate = item.DueDate; + asp.ErpBillNum = bill.BillNum;//暂时跟billnum 一样 后期可能会改 预留 + asp.ErpLineNum = item.ErpLineNum; + + asp.Price = item.Price; + asp.PackQty = item.PackQty; + asp.Currency = item.Currency; + + asp.UmConv = (decimal)item.UmConv; + + db.TS_UNI_API.Add(asp); + db.SaveChanges(); + } + + return asp; + } + + //创建发货单 + public static TS_UNI_API CreateBy(TF_ASN bill, TF_ASN_DETAIL detail, UniApiType uniApiType) + { + var tableName = GetTableName(uniApiType); + var apiData = new TS_UNI_API + { + InterfaceType = uniApiType.ToString(), + TableName = tableName.ToString(), + BillNum = bill.BillNum, + PartCode = detail.PartCode, + Batch = detail.Batch, + Qty = detail.BillQty, + PoUnit = detail.PoUnit, + LocUnit = detail.LocUnit, + State = detail.State, + CreateOper = bill.OperName, + CreateTime = bill.BillTime, + PutTime = ScpCache.GetServerTime(), + VendId = bill.VendId, + BillType = (int)BillType.PuchaseOrder, + SubBillType = 0, + ValidDate = detail.ProduceDate, + ErpBillNum = bill.PoBillNum, + ErpLineNum = detail.PoLineNum, + VendBatch = detail.VendBatch, + Price = detail.Price, + PackQty = detail.PackQty, + Currency = detail.Currency, + UmConv = (decimal) detail.UmConv, + }; + return apiData; + } + + //创建条码 + public static TS_UNI_API CreateBy(TF_ASN bill, TS_BARCODE detail, UniApiType uniApiType) + { + var tableName = GetTableName(uniApiType); + var apiData = new TS_UNI_API + { + Barcode = detail.BarCode, + InterfaceType = uniApiType.ToString(), + TableName = tableName.ToString(), + BillNum = bill.BillNum, + PartCode = detail.PartCode, + Batch = detail.Batch, + Qty = detail.Qty, + PoUnit = detail.PoUnit, + LocUnit = detail.LocUnit, + State = detail.State, + CreateOper = bill.OperName, + CreateTime = bill.BillTime, + PutTime = ScpCache.GetServerTime(), + VendId = bill.VendId, + BillType = (int)BillType.PuchaseOrder, + SubBillType = 0, + ValidDate = detail.ProduceDate, + ErpBillNum = bill.PoBillNum, + ErpLineNum = detail.PoBillLine, + VendBatch = detail.VendBatch, + SourceBillNum = detail.FullBarCode, + PackQty = detail.PackQty, + }; + return apiData; + } + + //创建发票 + public static TS_UNI_API CreateBy(TB_INVOICE bill, TB_INVOICE_DETAIL detail, UniApiType uniApiType) + { + var tableName = GetTableName(uniApiType); + var apiData = new TS_UNI_API + { + InterfaceType = uniApiType.ToString(), + TableName = tableName.ToString(), + BillNum = bill.BillNum, + PartCode = detail.PartCode, + Batch = "", + Qty = detail.Qty, + PoUnit = detail.PoUnit, + LocUnit = detail.LocUnit, + State = detail.State, + CreateOper = bill.OperName, + CreateTime = bill.BillTime, + PutTime = ScpCache.GetServerTime(), + VendId = bill.VendId, + BillType = (int)BillType.PuchaseOrder, + SubBillType = 0, + ValidDate = detail.ProduceDate, + ErpBillNum = detail.PoBillNum, + ErpLineNum = detail.PoLineNum, + VendBatch = "", + SourceBillNum = "", + Price = detail.Price, + PackQty = detail.PackQty, + Currency = detail.Currency, + Invoice = bill.InvoiceNum, + Tax = detail.Tax, + TaxAmt = detail.TaxAmt, + }; + return apiData; + } + + public static List GetNewInterfaceList(ScpEntities wdb) + { + return wdb.TS_UNI_API.Where(p => p.State == (int)BillState.New).OrderBy(p => p.UID).ToList(); + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Controller/UserController.cs b/北京北汽/SCP/CK.SCP.Controller/UserController.cs new file mode 100644 index 0000000..004fb3a --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/UserController.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + + +namespace CK.SCP.Controller +{ + public class UserController + { + + } +} diff --git a/北京北汽/SCP/CK.SCP.Controller/VEND_USERController.cs b/北京北汽/SCP/CK.SCP.Controller/VEND_USERController.cs new file mode 100644 index 0000000..a8a73a4 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/VEND_USERController.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; + +namespace CK.SCP.Controller +{ + public class VEND_USERController + { + public static TA_VEND_USER GetVendUserModel(int id) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TA_VEND_USER.SingleOrDefault(p => p.UID == id); + } + } + } +} diff --git a/北京北汽/SCP/CK.SCP.Controller/app.config b/北京北汽/SCP/CK.SCP.Controller/app.config new file mode 100644 index 0000000..23349b1 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/app.config @@ -0,0 +1,25 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Controller/packages.config b/北京北汽/SCP/CK.SCP.Controller/packages.config new file mode 100644 index 0000000..33e13d6 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Controller/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.DCUNI/App.config b/北京北汽/SCP/CK.SCP.DCUNI/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.DCUNI/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.DCUNI/CK.SCP.DCUNI.csproj b/北京北汽/SCP/CK.SCP.DCUNI/CK.SCP.DCUNI.csproj new file mode 100644 index 0000000..00bb699 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.DCUNI/CK.SCP.DCUNI.csproj @@ -0,0 +1,87 @@ + + + + + Debug + AnyCPU + {1EE718E2-C8BA-4DD5-80EC-A1DE0449A58D} + WinExe + Properties + CK.SCP.DCUNI + CK.SCP.DCUNI + v4.5.2 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.DCUNI/Form1.Designer.cs b/北京北汽/SCP/CK.SCP.DCUNI/Form1.Designer.cs new file mode 100644 index 0000000..c7504a6 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.DCUNI/Form1.Designer.cs @@ -0,0 +1,39 @@ +namespace CK.SCP.DCUNI +{ + partial class Form1 + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows 窗体设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Text = "Form1"; + } + + #endregion + } +} + diff --git a/北京北汽/SCP/CK.SCP.DCUNI/Form1.cs b/北京北汽/SCP/CK.SCP.DCUNI/Form1.cs new file mode 100644 index 0000000..ef267f7 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.DCUNI/Form1.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace CK.SCP.DCUNI +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + } +} diff --git a/北京北汽/SCP/CK.SCP.DCUNI/Program.cs b/北京北汽/SCP/CK.SCP.DCUNI/Program.cs new file mode 100644 index 0000000..ee396e0 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.DCUNI/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace CK.SCP.DCUNI +{ + static class Program + { + /// + /// 应用程序的主入口点。 + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/北京北汽/SCP/CK.SCP.DCUNI/Properties/AssemblyInfo.cs b/北京北汽/SCP/CK.SCP.DCUNI/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..8d2c91e --- /dev/null +++ b/北京北汽/SCP/CK.SCP.DCUNI/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("CK.SCP.DCUNI")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CK.SCP.DCUNI")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +//将 ComVisible 设置为 false 将使此程序集中的类型 +//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("1ee718e2-c8ba-4dd5-80ec-a1de0449a58d")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/北京北汽/SCP/CK.SCP.DCUNI/Properties/Resources.Designer.cs b/北京北汽/SCP/CK.SCP.DCUNI/Properties/Resources.Designer.cs new file mode 100644 index 0000000..bd1b915 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.DCUNI/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本: 4.0.30319.42000 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace CK.SCP.DCUNI.Properties +{ + + + /// + /// 强类型资源类,用于查找本地化字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// 返回此类使用的缓存 ResourceManager 实例。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CK.SCP.DCUNI.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 覆盖当前线程的 CurrentUICulture 属性 + /// 使用此强类型的资源类的资源查找。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/北京北汽/SCP/CK.SCP.DCUNI/Properties/Resources.resx b/北京北汽/SCP/CK.SCP.DCUNI/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/北京北汽/SCP/CK.SCP.DCUNI/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.DCUNI/Properties/Settings.Designer.cs b/北京北汽/SCP/CK.SCP.DCUNI/Properties/Settings.Designer.cs new file mode 100644 index 0000000..47a6aac --- /dev/null +++ b/北京北汽/SCP/CK.SCP.DCUNI/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace CK.SCP.DCUNI.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/北京北汽/SCP/CK.SCP.DCUNI/Properties/Settings.settings b/北京北汽/SCP/CK.SCP.DCUNI/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.DCUNI/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/北京北汽/SCP/CK.SCP.Models/App.config b/北京北汽/SCP/CK.SCP.Models/App.config new file mode 100644 index 0000000..d696498 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/App.config @@ -0,0 +1,20 @@ + + + + +
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/AppBoxContext.cs b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/AppBoxContext.cs new file mode 100644 index 0000000..abe3209 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/AppBoxContext.cs @@ -0,0 +1,94 @@ +using System.Data.Entity; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class AppBoxContext : DbContext + { + public AppBoxContext() : base(EntitiesFactory.GetEfConnectionString(GlobalConfig.AppBoxDatabase)) + { + + } + + public AppBoxContext(string strConn) : base(strConn) + { + + } + + public DbSet Configs { get; set; } + public DbSet Depts { get; set; } + public DbSet Users { get; set; } + public DbSet Roles { get; set; } + public DbSet Titles { get; set; } + public DbSet<Online> Onlines { get; set; } + public DbSet<Log> Logs { get; set; } + public DbSet<Power> Powers { get; set; } + public DbSet<Menu> Menus { get; set; } + + protected override void OnModelCreating(DbModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + + + modelBuilder.Entity<Role>() + .HasMany(r => r.Users) + .WithMany(u => u.Roles) + .Map(x => x.ToTable("RoleUsers") + .MapLeftKey("RoleID") + .MapRightKey("UserID")); + + modelBuilder.Entity<Title>() + .HasMany(t => t.Users) + .WithMany(u => u.Titles) + .Map(x => x.ToTable("TitleUsers") + .MapLeftKey("TitleID") + .MapRightKey("UserID")); + + modelBuilder.Entity<Dept>() + .HasOptional(d => d.Parent) + .WithMany(d => d.Children) + .Map(x => x.MapKey("ParentID")); + + modelBuilder.Entity<Dept>() + .HasMany(d => d.Users) + .WithOptional(u => u.Dept) + .Map(x => x.MapKey("DeptID")); + + modelBuilder.Entity<Online>() + .HasRequired(o => o.User) + .WithMany() + .Map(x => x.MapKey("UserID")); + + modelBuilder.Entity<Menu>() + .HasOptional(m => m.Parent) + .WithMany(m => m.Children) + .Map(x => x.MapKey("ParentID")); + + //modelBuilder.Entity<Menu>() + // .HasOptional(m => m.Module) + // .WithMany() + // .Map(x => x.MapKey("ModuleID")); + + //modelBuilder.Entity<Module>() + // .HasMany(m => m.ModulePowers) + // .WithRequired(mp => mp.Module); + + //modelBuilder.Entity<Power>() + // .HasMany(p => p.ModulePowers) + // .WithRequired(mp => mp.Power); + + modelBuilder.Entity<Menu>() + .HasOptional(m => m.ViewPower) + .WithMany() + .Map(x => x.MapKey("ViewPowerID")); + + modelBuilder.Entity<Role>() + .HasMany(r => r.Powers) + .WithMany(p => p.Roles) + .Map(x => x.ToTable("RolePowers") + .MapLeftKey("RoleID") + .MapRightKey("PowerID")); + + + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/AppBoxDatabaseInitializer.cs b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/AppBoxDatabaseInitializer.cs new file mode 100644 index 0000000..ea78572 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/AppBoxDatabaseInitializer.cs @@ -0,0 +1,686 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity; +using System.Linq; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class AppBoxDatabaseInitializer : DropCreateDatabaseIfModelChanges<AppBoxContext> // DropCreateDatabaseAlways<AppBoxContext> DropCreateDatabaseIfModelChanges<AppBoxContext> + { + protected override void Seed(AppBoxContext context) + { + GetConfigs().ForEach(c => context.Configs.Add(c)); + GetDepts().ForEach(d => context.Depts.Add(d)); + GetUsers().ForEach(u => context.Users.Add(u)); + + GetRoles().ForEach(r => context.Roles.Add(r)); + GetPowers().ForEach(p => context.Powers.Add(p)); + GetTitles().ForEach(t => context.Titles.Add(t)); + + context.SaveChanges(); + // 添加菜单时需要指定ViewPower,所以上面需要先保存到数据库 + GetMenus(context).ForEach(m => context.Menus.Add(m)); + } + + private static List<Menu> GetMenus(AppBoxContext context) + { + var menus = new List<Menu> { + new Menu + { + Name = "系统管理", + SortIndex = 1, + Remark = "顶级菜单", + Children = new List<Menu> { + new Menu + { + Name = "用户管理", + SortIndex = 10, + Remark = "二级菜单", + NavigateUrl = "~/admin/user.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CoreUserView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "职称管理", + SortIndex = 20, + Remark = "二级菜单", + NavigateUrl = "~/admin/title.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CoreTitleView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "职称用户管理", + SortIndex = 30, + Remark = "二级菜单", + NavigateUrl = "~/admin/title_user.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CoreTitleUserView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "部门管理", + SortIndex = 40, + Remark = "二级菜单", + NavigateUrl = "~/admin/dept.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CoreDeptView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "部门用户管理", + SortIndex = 50, + Remark = "二级菜单", + NavigateUrl = "~/admin/dept_user.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CoreDeptUserView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "角色管理", + SortIndex = 60, + Remark = "二级菜单", + NavigateUrl = "~/admin/role.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CoreRoleView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "角色用户管理", + SortIndex = 70, + Remark = "二级菜单", + NavigateUrl = "~/admin/role_user.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CoreRoleUserView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "权限管理", + SortIndex = 80, + Remark = "二级菜单", + NavigateUrl = "~/admin/power.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CorePowerView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "角色权限管理", + SortIndex = 90, + Remark = "二级菜单", + NavigateUrl = "~/admin/role_power.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CoreRolePowerView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "菜单管理", + SortIndex = 100, + Remark = "二级菜单", + NavigateUrl = "~/admin/menu.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CoreMenuView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "在线统计", + SortIndex = 110, + Remark = "二级菜单", + NavigateUrl = "~/admin/online.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CoreOnlineView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "系统配置", + SortIndex = 120, + Remark = "二级菜单", + NavigateUrl = "~/admin/config.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CoreConfigView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "用户设置", + SortIndex = 130, + Remark = "二级菜单", + NavigateUrl = "~/admin/profile.aspx", + ImageUrl = "~/res/icon/tag_blue.png" + } + } + } + }; + + return menus; + } + + + private static List<Title> GetTitles() + { + var titles = new List<Title>() + { + new Title() + { + Name = "总经理" + }, + new Title() + { + Name = "部门经理" + }, + new Title() + { + Name = "高级工程师" + }, + new Title() + { + Name = "工程师" + } + }; + + return titles; + } + + private static List<Power> GetPowers() + { + var powers = new List<Power> + { + new Power + { + Name = "CoreUserView", + Title = "浏览用户列表", + GroupName = "CoreUser" + }, + new Power + { + Name = "CoreUserNew", + Title = "新增用户", + GroupName = "CoreUser" + }, + new Power + { + Name = "CoreUserEdit", + Title = "编辑用户", + GroupName = "CoreUser" + }, + new Power + { + Name = "CoreUserDelete", + Title = "删除用户", + GroupName = "CoreUser" + }, + new Power + { + Name = "CoreUserChangePassword", + Title = "修改用户登陆密码", + GroupName = "CoreUser" + }, + new Power + { + Name = "CoreRoleView", + Title = "浏览角色列表", + GroupName = "CoreRole" + }, + new Power + { + Name = "CoreRoleNew", + Title = "新增角色", + GroupName = "CoreRole" + }, + new Power + { + Name = "CoreRoleEdit", + Title = "编辑角色", + GroupName = "CoreRole" + }, + new Power + { + Name = "CoreRoleDelete", + Title = "删除角色", + GroupName = "CoreRole" + }, + new Power + { + Name = "CoreRoleUserView", + Title = "浏览角色用户列表", + GroupName = "CoreRoleUser" + }, + new Power + { + Name = "CoreRoleUserNew", + Title = "向角色添加用户", + GroupName = "CoreRoleUser" + }, + new Power + { + Name = "CoreRoleUserDelete", + Title = "从角色中删除用户", + GroupName = "CoreRoleUser" + }, + new Power + { + Name = "CoreOnlineView", + Title = "浏览在线用户列表", + GroupName = "CoreOnline" + }, + new Power + { + Name = "CoreConfigView", + Title = "浏览全局配置参数", + GroupName = "CoreConfig" + }, + new Power + { + Name = "CoreConfigEdit", + Title = "修改全局配置参数", + GroupName = "CoreConfig" + }, + new Power + { + Name = "CoreMenuView", + Title = "浏览菜单列表", + GroupName = "CoreMenu" + }, + new Power + { + Name = "CoreMenuNew", + Title = "新增菜单", + GroupName = "CoreMenu" + }, + new Power + { + Name = "CoreMenuEdit", + Title = "编辑菜单", + GroupName = "CoreMenu" + }, + new Power + { + Name = "CoreMenuDelete", + Title = "删除菜单", + GroupName = "CoreMenu" + }, + new Power + { + Name = "CoreLogView", + Title = "浏览日志列表", + GroupName = "CoreLog" + }, + new Power + { + Name = "CoreLogDelete", + Title = "删除日志", + GroupName = "CoreLog" + }, + new Power + { + Name = "CoreTitleView", + Title = "浏览职务列表", + GroupName = "CoreTitle" + }, + new Power + { + Name = "CoreTitleNew", + Title = "新增职务", + GroupName = "CoreTitle" + }, + new Power + { + Name = "CoreTitleEdit", + Title = "编辑职务", + GroupName = "CoreTitle" + }, + new Power + { + Name = "CoreTitleDelete", + Title = "删除职务", + GroupName = "CoreTitle" + }, + new Power + { + Name = "CoreTitleUserView", + Title = "浏览职务用户列表", + GroupName = "CoreTitleUser" + }, + new Power + { + Name = "CoreTitleUserNew", + Title = "向职务添加用户", + GroupName = "CoreTitleUser" + }, + new Power + { + Name = "CoreTitleUserDelete", + Title = "从职务中删除用户", + GroupName = "CoreTitleUser" + }, + new Power + { + Name = "CoreDeptView", + Title = "浏览部门列表", + GroupName = "CoreDept" + }, + new Power + { + Name = "CoreDeptNew", + Title = "新增部门", + GroupName = "CoreDept" + }, + new Power + { + Name = "CoreDeptEdit", + Title = "编辑部门", + GroupName = "CoreDept" + }, + new Power + { + Name = "CoreDeptDelete", + Title = "删除部门", + GroupName = "CoreDept" + }, + new Power + { + Name = "CoreDeptUserView", + Title = "浏览部门用户列表", + GroupName = "CoreDeptUser" + }, + new Power + { + Name = "CoreDeptUserNew", + Title = "向部门添加用户", + GroupName = "CoreDeptUser" + }, + new Power + { + Name = "CoreDeptUserDelete", + Title = "从部门中删除用户", + GroupName = "CoreDeptUser" + }, + new Power + { + Name = "CorePowerView", + Title = "浏览权限列表", + GroupName = "CorePower" + }, + new Power + { + Name = "CorePowerNew", + Title = "新增权限", + GroupName = "CorePower" + }, + new Power + { + Name = "CorePowerEdit", + Title = "编辑权限", + GroupName = "CorePower" + }, + new Power + { + Name = "CorePowerDelete", + Title = "删除权限", + GroupName = "CorePower" + }, + new Power + { + Name = "CoreRolePowerView", + Title = "浏览角色权限列表", + GroupName = "CoreRolePower" + }, + new Power + { + Name = "CoreRolePowerEdit", + Title = "编辑角色权限", + GroupName = "CoreRolePower" + } + }; + + return powers; + } + + private static List<Role> GetRoles() + { + var roles = new List<Role>() + { + new Role() + { + Name = "系统管理员", + Remark = "" + }, + new Role() + { + Name = "部门管理员", + Remark = "" + }, + new Role() + { + Name = "项目经理", + Remark = "" + }, + new Role() + { + Name = "开发经理", + Remark = "" + }, + new Role() + { + Name = "开发人员", + Remark = "" + }, + new Role() + { + Name = "后勤人员", + Remark = "" + }, + new Role() + { + Name = "外包人员", + Remark = "" + } + }; + + return roles; + } + + private static List<User> GetUsers() + { + string[] USER_NAMES = { "男", "童光喜", "男", "方原柏", "女", "祝春亚", "男", "涂辉", "男", "舒兆国", "男", "熊忠文", "男", "徐吉琳", "男", "方金海", "男", "包卫峰", "女", "靖小燕", "男", "杨习斌", "男", "徐长旺", "男", "聂建雄", "男", "周敦友", "男", "陈友庭", "女", "陆静芳", "男", "袁国柱", "女", "骆新桂", "男", "许治国", "男", "马先加", "男", "赵恢川", "男", "柯常胜", "男", "黄国鹏", "男", "柯尊北", "男", "刘海云", "男", "罗清波", "男", "张业权", "女", "丁溯鋆", "男", "吴俊", "男", "郑江", "男", "李亚华", "男", "石光富", "男", "谭志洪", "男", "胡中生", "男", "董龙剑", "男", "陈红", "男", "汪海平", "男", "彭道洲", "女", "尹莉君", "男", "占耀玲", "男", "付杰", "男", "王红艳", "男", "邝兴", "男", "饶玮", "男", "王方胜", "男", "陈劲松", "男", "邓庆华", "男", "王石林", "男", "胡俊明", "男", "索相龙", "男", "陈海军", "男", "吴文涛", "女", "熊望梅", "女", "段丽华", "女", "胡莎莎", "男", "徐友安", "男", "肖诗涛", "男", "王闯", "男", "余兴龙", "男", "芦荫杰", "男", "丁金富", "男", "谭军令", "女", "鄢旭燕", "男", "田坤", "男", "夏德胜", "男", "喻显发", "男", "马兴宝", "男", "孙学涛", "男", "陶云成", "男", "马远健", "男", "田华", "男", "聂子森", "男", "郑永军", "男", "余昌平", "男", "陶俊华", "男", "李小林", "男", "李荣宝", "男", "梅盈凯", "男", "张元群", "男", "郝新华", "男", "刘红涛", "男", "向志强", "男", "伍小峰", "男", "胡勇民", "男", "黄定祥", "女", "高红香", "男", "刘军", "男", "叶松", "男", "易俊林", "男", "张威", "男", "刘卫华", "男", "李浩", "男", "李寿庚", "男", "涂洋", "男", "曹晶", "男", "陈辉", "女", "彭博", "男", "严雪冰", "男", "刘青", "女", "印媛", "男", "吴道雄", "男", "邓旻", "男", "陈骏", "男", "崔波", "男", "韩静颐", "男", "严安勇", "男", "刘攀", "女", "刘艳", "女", "孙昕", "女", "郑新", "女", "徐睿", "女", "李月杰", "男", "吕焱鑫", "女", "刘沈", "男", "朱绍军", "女", "马茜", "女", "唐蕾", "女", "刘姣", "女", "于芳", "男", "吴健", "女", "张丹梅", "女", "王燕", "女", "贾兆梅", "男", "程柏漠", "男", "程辉", "女", "任明慧", "女", "焦莹", "女", "马淑娟", "男", "徐涛", "男", "孙庆国", "男", "刘胜", "女", "傅广凤", "男", "袁弘", "男", "高令旭", "男", "栾树权", "女", "申霞", "女", "韩文萍", "女", "隋艳", "男", "邢海洲", "女", "王宁", "女", "陈晶", "女", "吕翠", "女", "刘少敏", "女", "刘少君", "男", "孔鹏", "女", "张冰", "女", "王芳", "男", "万世忠", "女", "徐凡", "女", "张玉梅", "女", "何莉", "女", "时会云", "女", "王玉杰", "女", "谭素英", "女", "李艳红", "女", "刘素莉", "男", "王旭海", "女", "安丽梅", "女", "姚露", "女", "贾颖", "女", "曹微", "男", "黄经华", "女", "陈玉华", "女", "姜媛", "女", "魏立平", "女", "张萍", "男", "来辉", "女", "陈秀玫", "男", "石岩", "男", "王洪捍", "男", "张树军", "女", "李亚琴", "女", "王凤", "女", "王珊华", "女", "杨丹丹", "女", "教黎明", "女", "修晶", "女", "丁晓霞", "女", "张丽", "女", "郭素兰", "女", "徐艳丽", "女", "任子英", "女", "胡雁", "女", "彭洪亮", "女", "高玉珍", "女", "王玉姝", "男", "郑伟", "女", "姜春玲", "女", "张伟", "女", "王颖", "女", "金萍", "男", "孙望", "男", "闫宝东", "男", "周相永", "女", "杨美娜", "女", "欧立新", "女", "刘宝霞", "女", "刘艳杰", "女", "宋艳平", "男", "李克", "女", "梁翠", "女", "宗宏伟", "女", "刘国伟", "女", "敖志敏", "女", "尹玲" }; + string[] EMAIL_NAMES = { "qq.com", "gmail.com", "163.com", "126.com", "outlook.com", "foxmail.com" }; + + var users = new List<User>(); + var rdm = new Random(); + + for (int i = 0, count = USER_NAMES.Length; i < count; i += 2) + { + string gender = USER_NAMES[i]; + string chineseName = USER_NAMES[i + 1]; + string userName = "user" + i.ToString(); + + users.Add(new User + { + Name = userName, + Gender = gender, + Password = PasswordUtil.CreateDbPassword(userName), + ChineseName = chineseName, + Email = userName + "@" + EMAIL_NAMES[rdm.Next(0, EMAIL_NAMES.Length)], + Enabled = true, + CreateTime = DateTime.Now + }); + } + + // 添加超级管理员 + users.Add(new User + { + Name = "admin", + Gender = "男", + Password = PasswordUtil.CreateDbPassword("admin"), + ChineseName = "超级管理员", + Email = "admin@examples.com", + Enabled = true, + CreateTime = DateTime.Now + }); + + return users; + } + + + private static List<Dept> GetDepts() + { + var depts = new List<Dept> { + new Dept + { + Name = "研发部", + SortIndex = 1, + Remark = "顶级部门", + Children = new List<Dept> { + new Dept + { + Name = "开发部", + SortIndex = 1, + Remark = "二级部门" + }, + new Dept + { + Name = "测试部", + SortIndex = 2, + Remark = "二级部门" + } + } + }, + new Dept + { + Name = "销售部", + SortIndex = 2, + Remark = "顶级部门", + Children = new List<Dept> { + new Dept + { + Name = "直销部", + SortIndex = 1, + Remark = "二级部门" + }, + new Dept + { + Name = "渠道部", + SortIndex = 2, + Remark = "二级部门" + } + } + }, + new Dept + { + Name = "客服部", + SortIndex = 3, + Remark = "顶级部门", + Children = new List<Dept> { + new Dept + { + Name = "实施部", + SortIndex = 1, + Remark = "二级部门" + }, + new Dept + { + Name = "售后服务部", + SortIndex = 2, + Remark = "二级部门" + }, + new Dept + { + Name = "大客户服务部", + SortIndex = 3, + Remark = "二级部门" + } + } + }, + new Dept + { + Name = "财务部", + SortIndex = 4, + Remark = "顶级部门" + }, + new Dept + { + Name = "行政部", + SortIndex = 5, + Remark = "顶级部门", + Children = new List<Dept> { + new Dept + { + Name = "人事部", + SortIndex = 1, + Remark = "二级部门" + }, + new Dept + { + Name = "后勤部", + SortIndex = 2, + Remark = "二级部门" + }, + new Dept + { + Name = "运输部", + SortIndex = 3, + Remark = "二级部门", + Children = new List<Dept>{ + new Dept{ + Name = "省内运输部", + SortIndex = 1, + Remark = "三级部门", + }, + new Dept{ + Name = "国内运输部", + SortIndex = 2, + Remark = "三级部门", + }, + new Dept{ + Name = "国际运输部", + SortIndex = 3, + Remark = "三级部门", + } + } + } + } + } + }; + + return depts; + } + + private static List<Config> GetConfigs() + { + var configs = new List<Config> { + new Config + { + ConfigKey = "Title", + ConfigValue = "AppBox - 通用权限管理框架", + Remark = "网站的标题" + }, + new Config + { + ConfigKey = "PageSize", + ConfigValue = "20", + Remark = "表格每页显示的个数" + }, + new Config + { + ConfigKey = "MenuType", + ConfigValue = "tree", + Remark = "左侧菜单样式" + }, + new Config + { + ConfigKey = "Theme", + ConfigValue = "Neptune", + Remark = "网站主题" + }, + new Config + { + ConfigKey = "HelpList", + ConfigValue = "[{\"Text\":\"万年历\",\"Icon\":\"Calendar\",\"ID\":\"wannianli\",\"URL\":\"~/admin/help/wannianli.htm\"},{\"Text\":\"科学计算器\",\"Icon\":\"Calculator\",\"ID\":\"jisuanqi\",\"URL\":\"~/admin/help/jisuanqi.htm\"},{\"Text\":\"系统帮助\",\"Icon\":\"Help\",\"ID\":\"help\",\"URL\":\"~/admin/help/help.htm\"}]", + Remark = "帮助下拉列表的JSON字符串" + } + }; + + return configs; + } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Config.cs b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Config.cs new file mode 100644 index 0000000..4defeaa --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Config.cs @@ -0,0 +1,19 @@ +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class Config : IKeyID + { + [Key] + public int ID { get; set; } + + [Required, StringLength(50)] + public string ConfigKey { get; set; } + + [Required, StringLength(4000)] + public string ConfigValue { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Dept.cs b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Dept.cs new file mode 100644 index 0000000..38ec31b --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Dept.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class Dept : ICustomTree, IKeyID, ICloneable + { + [Key] + public int ID { get; set; } + + [Required, StringLength(50)] + public string Name { get; set; } + + [Required] + public int SortIndex { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + + + + public virtual Dept Parent { get; set; } + public virtual ICollection<Dept> Children { get; set; } + + + public virtual ICollection<User> Users { get; set; } + + + + /// <summary> + /// 菜单在树形结构中的层级(从0开始) + /// </summary> + [NotMapped] + public int TreeLevel { get; set; } + + /// <summary> + /// 是否可用(默认true),在模拟树的下拉列表中使用 + /// </summary> + [NotMapped] + public bool Enabled { get; set; } + + /// <summary> + /// 是否叶子节点(默认true) + /// </summary> + [NotMapped] + public bool IsTreeLeaf { get; set; } + + + public object Clone() + { + Dept dept = new Dept + { + ID = ID, + Name = Name, + Remark = Remark, + SortIndex = SortIndex, + TreeLevel = TreeLevel, + Enabled = Enabled, + IsTreeLeaf = IsTreeLeaf + }; + return dept; + } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/ICustomTree.cs b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/ICustomTree.cs new file mode 100644 index 0000000..f210148 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/ICustomTree.cs @@ -0,0 +1,25 @@ +namespace CK.SCP.Models.AppBoxEntity +{ + public interface ICustomTree + { + /// <summary> + /// 名称 + /// </summary> + string Name { get; set; } + + /// <summary> + /// 菜单在树形结构中的层级(从0开始) + /// </summary> + int TreeLevel { get; set; } + + /// <summary> + /// 是否可用(默认true),在模拟树的下拉列表中使用 + /// </summary> + bool Enabled { get; set; } + + /// <summary> + /// 是否叶子节点(默认true) + /// </summary> + bool IsTreeLeaf { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/IKeyID.cs b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/IKeyID.cs new file mode 100644 index 0000000..195ea0d --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/IKeyID.cs @@ -0,0 +1,8 @@ +namespace CK.SCP.Models.AppBoxEntity +{ + public interface IKeyID + { + int ID { get; set; } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Log.cs b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Log.cs new file mode 100644 index 0000000..dde1f17 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Log.cs @@ -0,0 +1,26 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class Log : IKeyID + { + [Key] + public int ID { get; set; } + + [StringLength(20)] + public string Level { get; set; } + + [StringLength(200)] + public string Logger { get; set; } + + [StringLength(4000)] + public string Message { get; set; } + + [StringLength(4000)] + public string Exception { get; set; } + + public DateTime LogTime { get; set; } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Menu.cs b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Menu.cs new file mode 100644 index 0000000..5be6f46 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Menu.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class Menu : ICustomTree, IKeyID, ICloneable + { + [Key] + public int ID { get; set; } + + [Required, StringLength(50)] + public string Name { get; set; } + + [StringLength(200)] + public string ImageUrl { get; set; } + + [StringLength(200)] + public string NavigateUrl { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + + [Required] + public int SortIndex { get; set; } + + + public virtual Menu Parent { get; set; } + public virtual ICollection<Menu> Children { get; set; } + + + + public virtual Power ViewPower {get; set;} + + + + + /// <summary> + /// 菜单在树形结构中的层级(从0开始) + /// </summary> + [NotMapped] + public int TreeLevel { get; set; } + + /// <summary> + /// 是否可用(默认true),在模拟树的下拉列表中使用 + /// </summary> + [NotMapped] + public bool Enabled { get; set; } + + /// <summary> + /// 是否叶子节点(默认true) + /// </summary> + [NotMapped] + public bool IsTreeLeaf { get; set; } + + + public object Clone() + { + Menu menu = new Menu { + ID = ID, + Name = Name, + ImageUrl = ImageUrl, + NavigateUrl = NavigateUrl, + Remark = Remark, + SortIndex = SortIndex, + TreeLevel = TreeLevel, + Enabled = Enabled, + IsTreeLeaf = IsTreeLeaf + }; + return menu; + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Online.cs b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Online.cs new file mode 100644 index 0000000..f2c7a82 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Online.cs @@ -0,0 +1,23 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class Online : IKeyID + { + [Key] + public int ID { get; set; } + + [StringLength(50)] + public string IPAdddress { get; set; } + + public DateTime LoginTime { get; set; } + + public DateTime? UpdateTime { get; set; } + + + public virtual User User { get; set; } + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/PasswordUtil.cs b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/PasswordUtil.cs new file mode 100644 index 0000000..4ccace8 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/PasswordUtil.cs @@ -0,0 +1,119 @@ +using System; +using System.Security.Cryptography; + +namespace CK.SCP.Models.AppBoxEntity +{ + /// <summary> + /// û룬ȽǷһµ + /// </summary> + public class PasswordUtil + { + #region field & constructor + + //private static readonly Log _log = new Log(typeof(PasswordUtil)); + + private const int saltLength = 4; + + public PasswordUtil() { } + + #endregion + + /// <summary> + /// ԱûǷͼܺһ + /// </summary> + /// <param name="dbPassword">ݿеܺ</param> + /// <param name="userPassword">û</param> + /// <returns></returns> + public static bool ComparePasswords(string dbPassword,string userPassword) + { + byte[] dbPwd = Convert.FromBase64String(dbPassword); + + byte[] hashedPwd = HashString(userPassword); + + if(dbPwd.Length ==0 || hashedPwd.Length ==0 || dbPwd.Length !=hashedPwd.Length + saltLength) + { + return false; + } + + byte[] saltValue = new byte[saltLength]; + // int saltOffset = dbPwd.Length - hashedPwd.Length; + int saltOffset = hashedPwd.Length; + for (int i = 0; i < saltLength; i++) + saltValue[i] = dbPwd[saltOffset + i]; + + byte[] saltedPassword = CreateSaltedPassword(saltValue, hashedPwd); + + // compare the values + return CompareByteArray(dbPwd, saltedPassword); + + + } + + /// <summary> + /// ûݿ + /// </summary> + /// <param name="password"></param> + /// <returns></returns> + public static string CreateDbPassword(string userPassword) + { + byte[] unsaltedPassword = HashString(userPassword); + + //Create a salt value + byte[] saltValue = new byte[saltLength]; + RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider(); + rng.GetBytes(saltValue); + + byte[] saltedPassword = CreateSaltedPassword(saltValue, unsaltedPassword); + + return Convert.ToBase64String(saltedPassword); + + } + + #region ˽к + /// <summary> + /// һַϣ + /// </summary> + /// <param name="str"></param> + /// <returns></returns> + private static byte[] HashString(string str) + { + byte[] pwd = System.Text.Encoding.UTF8.GetBytes(str); + + SHA1 sha1 = SHA1.Create(); + byte[] saltedPassword = sha1.ComputeHash(pwd); + return saltedPassword; + } + private static bool CompareByteArray(byte[] array1, byte[] array2) + { + if (array1.Length != array2.Length) + return false; + for (int i = 0; i < array1.Length; i++) + { + if (array1[i] != array2[i]) + return false; + } + return true; + } + // create a salted password given the salt value + private static byte[] CreateSaltedPassword(byte[] saltValue, byte[] unsaltedPassword) + { + // add the salt to the hash + byte[] rawSalted = new byte[unsaltedPassword.Length + saltValue.Length]; + unsaltedPassword.CopyTo(rawSalted,0); + saltValue.CopyTo(rawSalted,unsaltedPassword.Length); + + //Create the salted hash + SHA1 sha1 = SHA1.Create(); + byte[] saltedPassword = sha1.ComputeHash(rawSalted); + + // add the salt value to the salted hash + byte[] dbPassword = new byte[saltedPassword.Length + saltValue.Length]; + saltedPassword.CopyTo(dbPassword,0); + saltValue.CopyTo(dbPassword,saltedPassword.Length); + + return dbPassword; + } + #endregion + + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Power.cs b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Power.cs new file mode 100644 index 0000000..76bef50 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Power.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class Power : IKeyID + { + [Key] + public int ID { get; set; } + + [Required, StringLength(50)] + public string Name { get; set; } + + [StringLength(50)] + public string GroupName { get; set; } + + [StringLength(200)] + public string Title { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + + + public virtual ICollection<Role> Roles { get; set; } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Role.cs b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Role.cs new file mode 100644 index 0000000..e2b46e7 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Role.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class Role : IKeyID + { + [Key] + public int ID { get; set; } + + [Required, StringLength(50)] + public string Name { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + + + public virtual ICollection<User> Users { get; set; } + + + public virtual ICollection<Power> Powers { get; set; } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Title.cs b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Title.cs new file mode 100644 index 0000000..8927aed --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/Title.cs @@ -0,0 +1,23 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class Title : IKeyID + { + [Key] + public int ID { get; set; } + + [Required, StringLength(50)] + public string Name { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + + + public virtual ICollection<User> Users { get; set; } + + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/User.cs b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/User.cs new file mode 100644 index 0000000..85a0e71 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/AppBoxEntity/User.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class User : IKeyID + { + [Key] + public int ID { get; set; } + + [Required, StringLength(50)] + public string Name { get; set; } + + [Required, StringLength(100)] + public string Email { get; set; } + + [Required, StringLength(50)] + public string Password { get; set; } + + [Required] + public bool Enabled { get; set; } + + [StringLength(10)] + public string Gender { get; set; } + + [StringLength(100)] + public string ChineseName { get; set; } + + [StringLength(100)] + public string EnglishName { get; set; } + + [StringLength(200)] + public string Photo { get; set; } + + [StringLength(50)] + public string QQ { get; set; } + + [StringLength(100)] + public string CompanyEmail { get; set; } + + [StringLength(50)] + public string OfficePhone { get; set; } + + [StringLength(50)] + public string OfficePhoneExt { get; set; } + + [StringLength(50)] + public string HomePhone { get; set; } + + [StringLength(50)] + public string CellPhone { get; set; } + + [StringLength(500)] + public string Address { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + + [StringLength(500)] + public string SupplierCode { get; set; } + + [NotMapped] + [StringLength(500)] + public string VendName { get; set; } + + [StringLength(50)] + public string IdentityCard { get; set; } + + + public DateTime? Birthday { get; set; } + public DateTime? TakeOfficeTime { get; set; } + public DateTime? LastLoginTime { get; set; } + public DateTime? CreateTime { get; set; } + + + + public virtual ICollection<Role> Roles { get; set; } + public virtual ICollection<Title> Titles { get; set; } + + public virtual Dept Dept { get; set; } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/CK.SCP.Models.csproj b/北京北汽/SCP/CK.SCP.Models/CK.SCP.Models.csproj new file mode 100644 index 0000000..ed050a2 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/CK.SCP.Models.csproj @@ -0,0 +1,252 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{DD7C0DEF-71E7-443F-B0B7-DB2F5B12A506}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>CK.SCP.Models</RootNamespace> + <AssemblyName>CK.SCP.Models</AssemblyName> + <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>..\DLL\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="EntityFramework"> + <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath> + </Reference> + <Reference Include="EntityFramework.SqlServer"> + <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath> + </Reference> + <Reference Include="Newtonsoft.Json"> + <HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.ComponentModel.DataAnnotations" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="AppBoxEntity\AppBoxContext.cs" /> + <Compile Include="AppBoxEntity\AppBoxDatabaseInitializer.cs" /> + <Compile Include="AppBoxEntity\Config.cs" /> + <Compile Include="AppBoxEntity\Dept.cs" /> + <Compile Include="AppBoxEntity\ICustomTree.cs" /> + <Compile Include="AppBoxEntity\IKeyID.cs" /> + <Compile Include="AppBoxEntity\Log.cs" /> + <Compile Include="AppBoxEntity\Menu.cs" /> + <Compile Include="AppBoxEntity\Online.cs" /> + <Compile Include="AppBoxEntity\PasswordUtil.cs" /> + <Compile Include="AppBoxEntity\Power.cs" /> + <Compile Include="AppBoxEntity\Role.cs" /> + <Compile Include="AppBoxEntity\Title.cs" /> + <Compile Include="AppBoxEntity\User.cs" /> + <Compile Include="DbSetting.cs" /> + <Compile Include="EntitiesFactory.cs" /> + <Compile Include="EntitiesHelper.cs" /> + <Compile Include="Enums\BillType.cs" /> + <Compile Include="Enums\CollectionStepFinish.cs" /> + <Compile Include="Enums\ControlType.cs" /> + <Compile Include="Enums\DataBaseType.cs" /> + <Compile Include="Enums\DataState.cs" /> + <Compile Include="Enums\EquipmentState.cs" /> + <Compile Include="Enums\ErpInterfaceType.cs" /> + <Compile Include="Enums\GroupType.cs" /> + <Compile Include="Enums\InspectionType.cs" /> + <Compile Include="Enums\InspectType.cs" /> + <Compile Include="Enums\InventoryState.cs" /> + <Compile Include="Enums\InvoiceState.cs" /> + <Compile Include="Enums\LocType.cs" /> + <Compile Include="Enums\LoginState.cs" /> + <Compile Include="Enums\LogType.cs" /> + <Compile Include="Enums\ManageType.cs" /> + <Compile Include="Enums\ManufactureProcedureType.cs" /> + <Compile Include="Enums\NotifyType.cs" /> + <Compile Include="Enums\OperateType.cs" /> + <Compile Include="Enums\PartKind.cs" /> + <Compile Include="Enums\PartState.cs" /> + <Compile Include="Enums\PartType.cs" /> + <Compile Include="Enums\PlanDayState.cs" /> + <Compile Include="Enums\PlanState.cs" /> + <Compile Include="Enums\PortalType.cs" /> + <Compile Include="Enums\PrintType.cs" /> + <Compile Include="Enums\Project.cs" /> + <Compile Include="Enums\ProjectName.cs" /> + <Compile Include="Enums\ReceiveBillType.cs" /> + <Compile Include="Enums\ReceiveState.cs" /> + <Compile Include="Enums\ResultCode.cs" /> + <Compile Include="Enums\ServiceType.cs" /> + <Compile Include="Enums\ShipState.cs" /> + <Compile Include="Enums\StockState.cs" /> + <Compile Include="Enums\StockWhereType.cs" /> + <Compile Include="Enums\StopLineType.cs" /> + <Compile Include="Enums\StoreArea.cs" /> + <Compile Include="Enums\SubBillType.cs" /> + <Compile Include="Enums\UniApiState.cs" /> + <Compile Include="Enums\UniApiType.cs" /> + <Compile Include="Enums\VinState.cs" /> + <Compile Include="Enums\WhseType.cs" /> + <Compile Include="Enums\WorkLineType.cs" /> + <Compile Include="GlobalConfig.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="ScpCache.cs" /> + <Compile Include="ScpEntities.cs" /> + <Compile Include="ScpEntity\ERP_ORDER.cs" /> + <Compile Include="ScpEntity\ERP_ORDER_DETAIL.cs" /> + <Compile Include="ScpEntity\QadOrder.cs" /> + <Compile Include="ScpEntity\TA_BillNoType.cs" /> + <Compile Include="ScpEntity\TA_BILLTYPE.cs" /> + <Compile Include="ScpEntity\TA_CONFIG.cs" /> + <Compile Include="ScpEntity\TA_FACTORY.cs" /> + <Compile Include="ScpEntity\TA_Info.cs" /> + <Compile Include="ScpEntity\TA_LANGUAGE.cs" /> + <Compile Include="ScpEntity\TA_PART.cs" /> + <Compile Include="ScpEntity\TA_Part_User.cs" /> + <Compile Include="ScpEntity\TA_VENDER.cs" /> + <Compile Include="ScpEntity\TA_VEND_PART.cs" /> + <Compile Include="ScpEntity\TA_VEND_USER.cs" /> + <Compile Include="ScpEntity\TB_ASK.cs" /> + <Compile Include="ScpEntity\TB_ASK_DETAIL.cs" /> + <Compile Include="ScpEntity\TB_ASN.cs" /> + <Compile Include="ScpEntity\TB_ASN_DETAIL.cs" /> + <Compile Include="ScpEntity\TB_INVOICE.cs" /> + <Compile Include="ScpEntity\TB_INVOICE_DETAIL.cs" /> + <Compile Include="ScpEntity\TB_PLAN.cs" /> + <Compile Include="ScpEntity\TB_PlanMonth.cs" /> + <Compile Include="ScpEntity\TB_PLAN_DETAIL.cs" /> + <Compile Include="ScpEntity\TB_PO.cs" /> + <Compile Include="ScpEntity\TB_PO_DETAIL.cs" /> + <Compile Include="ScpEntity\TB_PublicData.cs" /> + <Compile Include="ScpEntity\TB_QadOrder.cs" /> + <Compile Include="ScpEntity\TB_QadOrderDetail.cs" /> + <Compile Include="ScpEntity\TB_RECEIVE.cs" /> + <Compile Include="ScpEntity\TB_RECEIVE_DETAIL.cs" /> + <Compile Include="ScpEntity\TB_REJECT.cs" /> + <Compile Include="ScpEntity\TB_REJECT_DETAIL.cs" /> + <Compile Include="ScpEntity\TB_RETURN.cs" /> + <Compile Include="ScpEntity\TB_RETURN_DETAIL.cs" /> + <Compile Include="ScpEntity\TF_ASN.cs" /> + <Compile Include="ScpEntity\TF_ASN_DETAIL.cs" /> + <Compile Include="ScpEntity\TF_PO.cs" /> + <Compile Include="ScpEntity\TF_PO_DETAIL.cs" /> + <Compile Include="ScpEntity\TL_BASEDATA.cs" /> + <Compile Include="ScpEntity\TL_BILL.cs" /> + <Compile Include="ScpEntity\TL_OPER.cs" /> + <Compile Include="ScpEntity\TL_USER.cs" /> + <Compile Include="ScpEntity\TS_BARCODE.cs" /> + <Compile Include="ScpEntity\TS_INFO.cs" /> + <Compile Include="ScpEntity\TS_STOCK.cs" /> + <Compile Include="ScpEntity\TS_UNI_API.cs" /> + <Compile Include="ScpEntity\TS_UNI_API_HIS.cs" /> + <Compile Include="ScpEntity\TT_CURRENCY.cs" /> + <Compile Include="ScpEntity\TT_PROJECT.cs" /> + <Compile Include="ScpEntity\TT_UNIT.cs" /> + <Compile Include="ScpEntity\V_BillInvoice.cs" /> + <Compile Include="ScpEntity\V_BillInvoiceDetail.cs" /> + <Compile Include="ScpEntity\V_BillShip.cs" /> + <Compile Include="ScpEntity\V_BillShipDetail.cs" /> + <Compile Include="ScpEntity\V_Info.cs" /> + <Compile Include="ScpEntity\V_PlanMonth.cs" /> + <Compile Include="ScpEntity\V_POAll.cs" /> + <Compile Include="ScpEntity\V_POAllDetail.cs" /> + <Compile Include="ScpEntity\V_POReport.cs" /> + <Compile Include="ScpEntity\V_QadOrder.cs" /> + <Compile Include="ScpEntity\V_Receive.cs" /> + <Compile Include="ScpEntity\V_ReceiveDetail.cs" /> + <Compile Include="ScpEntity\V_ReportReceive.cs" /> + <Compile Include="ScpEntity\V_Stock.cs" /> + <Compile Include="SCPException.cs" /> + <Compile Include="UniApiEntity\IControlTable.cs" /> + <Compile Include="UniApiEntity\IDataTable.cs" /> + <Compile Include="UniApiEntity\ITable.cs" /> + <Compile Include="UniApiEntity\QadTableName.cs" /> + <Compile Include="UniApiEntity\UniApiEntities.cs" /> + <Compile Include="UniApiEntity\UniInterfaceExtention.cs" /> + <Compile Include="UniApiEntity\xxbom_code_mstr.cs" /> + <Compile Include="UniApiEntity\xxbom_ctrl.cs" /> + <Compile Include="UniApiEntity\xxbom_ps_mstr.cs" /> + <Compile Include="UniApiEntity\xxbom_pt_mstr.cs" /> + <Compile Include="UniApiEntity\xxbom_ro_mstr.cs" /> + <Compile Include="UniApiEntity\xxmes_ctrl.cs" /> + <Compile Include="UniApiEntity\xxqad_cm_mstr.cs" /> + <Compile Include="UniApiEntity\xxqad_ctrl.cs" /> + <Compile Include="UniApiEntity\xxqad_ld_det.cs" /> + <Compile Include="UniApiEntity\xxqad_line_mstr.cs" /> + <Compile Include="UniApiEntity\xxqad_loc_det.cs" /> + <Compile Include="UniApiEntity\xxqad_pod_det.cs" /> + <Compile Include="UniApiEntity\xxqad_pprice_det.cs" /> + <Compile Include="UniApiEntity\xxqad_prh_det.cs" /> + <Compile Include="UniApiEntity\xxqad_ps_mstr.cs" /> + <Compile Include="UniApiEntity\xxqad_pt_mstr.cs" /> + <Compile Include="UniApiEntity\xxqad_repsch_det.cs" /> + <Compile Include="UniApiEntity\xxqad_ro_mstr.cs" /> + <Compile Include="UniApiEntity\xxqad_sche_mstr.cs" /> + <Compile Include="UniApiEntity\xxqad_sct_det.cs" /> + <Compile Include="UniApiEntity\xxqad_sod_det.cs" /> + <Compile Include="UniApiEntity\xxqad_sprice_det.cs" /> + <Compile Include="UniApiEntity\xxqad_vd_mstr.cs" /> + <Compile Include="UniApiEntity\xxqad_vp_mstr.cs" /> + <Compile Include="UniApiEntity\xxscm_ctrl.cs" /> + <Compile Include="UniApiEntity\xxscm_inv_det.cs" /> + <Compile Include="UniApiEntity\xxscm_pod_det.cs" /> + <Compile Include="UniApiEntity\xxscm_tx_det.cs" /> + <Compile Include="UniApiEntity\xxscm_tx_mstr.cs" /> + <Compile Include="UniApiEntity\xxwms_bk_mstr.cs" /> + <Compile Include="UniApiEntity\xxwms_ctrl.cs" /> + <Compile Include="UniApiEntity\xxwms_iss_det.cs" /> + <Compile Include="UniApiEntity\xxwms_ld_det.cs" /> + <Compile Include="UniApiEntity\xxwms_rct_det.cs" /> + <Compile Include="UniApiEntity\xxwms_rc_det.cs" /> + <Compile Include="UniApiEntity\xxwms_rt_det.cs" /> + <Compile Include="UniApiEntity\xxwms_soiss_det.cs" /> + <Compile Include="UniApiEntity\xxwms_tag_det.cs" /> + <Compile Include="UniApiEntity\xxwms_tr_det.cs" /> + <Compile Include="ScpEntity\V_TB_ASK.cs" /> + <Compile Include="ScpEntity\V_TB_ASK_DETAIL.cs" /> + <Compile Include="ScpEntity\V_TB_ASN.cs" /> + <Compile Include="ScpEntity\V_TB_ASN_DETAIL.cs" /> + <Compile Include="ScpEntity\V_TB_PO.cs" /> + <Compile Include="ScpEntity\V_TB_PO_DETAIL.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\CK.SCP.Utils\CK.SCP.Utils.csproj"> + <Project>{7118ac83-9dc0-41f5-94ea-e6f405ae0448}</Project> + <Name>CK.SCP.Utils</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <None Include="App.config" /> + <None Include="packages.config" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/DbSetting.cs b/北京北汽/SCP/CK.SCP.Models/DbSetting.cs new file mode 100644 index 0000000..7534d6e --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/DbSetting.cs @@ -0,0 +1,28 @@ +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models +{ + public class DbSetting + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + public DbSetting() { } + + public DbSetting(DataBaseType type) + { + ݿ = type.ToString(); + } + + public string ݿ { get; set; } = Enums.DataBaseType.SQLServer.ToString(); + + public string ַ { get; set; } = "127.0.0.1"; + public string ˿ { get; set; } = "1433"; + public string ݿ { get; set; } = "DB_NAME"; + public string û { get; set; } = "sa"; + public string { get; set; } = "5E0AFEB85CA001A3371A9F19E7EC4DFF"; + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/EntitiesFactory.cs b/北京北汽/SCP/CK.SCP.Models/EntitiesFactory.cs new file mode 100644 index 0000000..8a99646 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/EntitiesFactory.cs @@ -0,0 +1,148 @@ +using System; +using System.Data.Entity; +using System.Data.Entity.Core; +using System.Data.Entity.Core.EntityClient; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models.AppBoxEntity; +using CK.SCP.Models.Enums; +using CK.SCP.Models.UniApiEntity; +using CK.SCP.Utils; + +namespace CK.SCP.Models +{ + public static class EntitiesFactory + { + static EntitiesFactory() + { + Database.SetInitializer<ScpEntities>(null); + Database.SetInitializer<UniApiEntities>(null); + } + + public static ScpEntities CreateScpInstance() + { + try + { + // var strConn = setting == null ? GetEfConnectionString("Wms") : GetEfConnectionString(setting); + + var strConn = GetEfConnectionString(GlobalConfig.ScpDatabase); + var db = new ScpEntities(strConn); + return db; + } + catch (SqlException ex) + { + throw new Exception($"ϵͳ޷ӵݿ:{GlobalConfig.ScpDatabase}õķ,ݿ,ûϢǷȷ" + Environment.NewLine + ex); + } + + } + + public static UniApiEntities CreateUniApiInstance() + { + try + { + // var strConn = setting == null ? GetEfConnectionString("UniApi") : GetEfConnectionString(setting); + var strConn = GetEfConnectionString(GlobalConfig.UniApiDatabase); + var db = new UniApiEntities(strConn); + return db; + } + catch (SqlException ex) + { + throw new Exception($"ϵͳ޷ӵݿ:{GlobalConfig.UniApiDatabase}õķ,ݿ,ûϢǷȷ" + Environment.NewLine + ex); + } + } + + public static AppBoxContext CreateAppBoxInstance() + { + try + { + // var strConn = setting == null ? GetEfConnectionString("UniApi") : GetEfConnectionString(setting); + var strConn = GetEfConnectionString(GlobalConfig.AppBoxDatabase); + var db = new AppBoxContext(strConn); + return db; + } + catch (SqlException ex) + { + throw new Exception($"ϵͳ޷ӵݿ:{GlobalConfig.AppBoxDatabase}õķ,ݿ,ûϢǷȷ" + Environment.NewLine + ex); + } + } + + public static string GetEfConnectionString(DbSetting dbSetting) + { + var sbConn = new StringBuilder(); + + if (string.IsNullOrEmpty(dbSetting.)) + { + throw new Exception("ļ"); + } + switch (dbSetting.ݿ) + { + case "SQLServer": + sbConn.Append($"Data source ={dbSetting.ַ}"); + sbConn.Append(dbSetting.˿ == "0" ? ";" : $",{dbSetting.˿};"); + sbConn.Append($"Initial catalog = {dbSetting.ݿ};"); + sbConn.Append($"User id = {dbSetting.û};"); + sbConn.Append($"Password = {EncryptHelper.Decrypt(dbSetting.)};"); + sbConn.Append("MultipleActiveResultSets = True;"); + sbConn.Append("persist security info = True;"); + sbConn.Append("App = EntityFramework;"); + break; + case "MySql": + sbConn.Append($"server ={dbSetting.ַ};"); + sbConn.Append($"port ={dbSetting.˿};"); + sbConn.Append($"database = {dbSetting.ݿ};"); + sbConn.Append($"user id = {dbSetting.û};"); + sbConn.Append($"password = {EncryptHelper.Decrypt(dbSetting.)};"); + sbConn.Append("persistsecurityinfo =True;"); + break; + } + // LogHelper.Write(sbConn.ToString()); + return sbConn.ToString(); + } + + public static void SaveDb(DbContext db) + { + try + { + db.SaveChanges(); + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//ʵ֤쳣 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("{0}ֶΣ{1}Ϣ{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "ֶ֤ʧ" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//ͻ쳣 + { + Console.WriteLine(ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + Console.WriteLine(ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + //Console.WriteLine(inner?.StateEntries[0].EntitySet.Name); + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/EntitiesHelper.cs b/北京北汽/SCP/CK.SCP.Models/EntitiesHelper.cs new file mode 100644 index 0000000..a0269da --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/EntitiesHelper.cs @@ -0,0 +1,162 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity; +using System.Linq; +using System.Linq.Expressions; +using System.Reflection; +using System.Text; + +namespace CK.SCP.Models +{ + public static class EntitiesHelper + { + + + public static string GetPropertiesString<T>(T t,bool withName = true) + { + var peroperties = t.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance); + var sb = new StringBuilder(); + foreach (var property in peroperties) + { + if (withName) + sb.Append($"{property.Name}:"); + sb.Append($"{property.GetValue(t)},"); + } + return sb.ToString(); + } + + + + public static List<T> GetData<T, TKey>(DbContext db, Expression<Func<T, T>> select, + Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order) + where T : class + { + var list = db.Set<T>() + .Where(@where) + .OrderBy(order) + .Select(@select).ToList(); + return list; + } + + + public static List<dynamic> GetData<T, TKey>(DbContext db, Expression<Func<T, dynamic>> select, + Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order, out int count) + where T : class + { + count = db.Set<T>().Where(@where).Count(); + var list = db.Set<T>() + .Where(@where) + .OrderBy(order) + .Select(@select).ToList(); + return list; + + } + + public static List<dynamic> GetPagedDataAsc<T, TKey>(DbContext db, Expression<Func<T, dynamic>> select, + Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order, int pageIndex, int pageSize, out int total) + where T : class + { + total = db.Set<T>().Where(@where).Count(); + var list = db.Set<T>() + .Where(@where) + .OrderBy(order) + .Select(@select) + .Skip((pageIndex - 1) * pageSize) + .Take(pageSize).ToList(); + return list; + + } + + public static List<T> GetPagedDataAsc<T, TKey>(DbContext db, Expression<Func<T, T>> select, + Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order, int pageIndex, int pageSize, out int total) + where T : class + { + total = db.Set<T>().Where(@where.Compile()).AsQueryable().Count(); + var list = db.Set<T>() + .Where(@where.Compile()).AsQueryable() + .OrderBy(order) + .Select(@select) + .Skip((pageIndex - 1) * pageSize) + .Take(pageSize).ToList(); + return list; + + } + + public static List<T> GetPagedDataAsc<T, TKey>(List<T> sourceList, Expression<Func<T, T>> select, + Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order, int pageIndex, int pageSize, out int total) + where T : class + { + List<T> list = null; + total = 0; + try + { + total = sourceList.Where(where.Compile()).AsQueryable().Count(); + + + } + catch (Exception e) + { + Console.WriteLine(e); + } + try + { + list = sourceList.Where(@where.Compile()).AsQueryable() + .OrderBy(order) + .Select(@select) + .Skip((pageIndex - 1) * pageSize) + .Take(pageSize).ToList(); + } + catch (Exception e) + { + Console.WriteLine(e); + } + + return list; + + } + + + public static List<dynamic> GetPagedDataDesc<T, TKey>(DbContext db, Expression<Func<T, dynamic>> select, + Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order, int pageIndex, int pageSize, out int total) + where T : class + { + total = db.Set<T>().Where(@where).Count(); + var list = db.Set<T>() + .Where(@where) + .OrderByDescending(order) + .Select(@select) + .Skip((pageIndex - 1) * pageSize) + .Take(pageSize).ToList(); + return list; + } + + public static List<T> GetPagedDataDesc<T, TKey>(DbContext db, Expression<Func<T, T>> select, + Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order, int pageIndex, int pageSize, out int total) + where T : class + { + total = db.Set<T>().Where(@where).Count(); + var list = db.Set<T>() + .Where(@where) + .OrderByDescending(order) + .Select(@select) + .Skip((pageIndex - 1) * pageSize) + .Take(pageSize).ToList(); + return list; + } + + public static List<T> GetPagedDataDesc<T, TKey>(List<T> sourceList, Expression<Func<T, T>> select, + Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order, int pageIndex, int pageSize, out int total) + where T : class + { + total = sourceList.Where(@where.Compile()).AsQueryable().Count(); + var list = sourceList + .Where(@where.Compile()).AsQueryable() + .OrderByDescending(order) + .Select(@select) + .Skip((pageIndex - 1) * pageSize) + .Take(pageSize).ToList(); + return list; + + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/BillType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/BillType.cs new file mode 100644 index 0000000..41aa8b4 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/BillType.cs @@ -0,0 +1,158 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum BillType + { + [Description("原料收货")] + MaterialReceive = 101, + [Description("原料入库")] + MaterialIn = 102, + [Description("原料出库")] + MaterialDeliver = 103, + [Description("生产叫料")] + MaterialAsk = 104, + [Description("原料退货")] + MatertialReturn = 105, + [Description("生产退库")] + MaterialBack = 106, + + + [Description("委外出库")] + OutsourceDeliver = 109, + + // [Description("原料退货")] + // MaterialBack = 105, + // [Description("生产退库")] + // MaterialReturn = 106, + + [Description("成品收货")] + ProductReceive = 201, + [Description("成品入库")] + ProductIn = 202, + [Description("成品发货")] + DeliverPlan = 204, + [Description("客户退货")] + ProductReturn = 205, + [Description("成品顺序发货")] + ProductSortedDeliver = 206, + [Description("成品销售")] + ProductSell = 207, + [Description("成品返修")] + ProductRepair = 208, + + [Description("委外入库")] + OutsourceReceive = 209, + + + [Description("其它入库")] + OtherIn = 300, + [Description("其它出库")] + OtherOut = 301, + [Description("移库")] + StockMove = 302, + [Description("打包")] + StockPack = 303, + [Description("拆包")] + StockUnpack = 304, + [Description("盘点计划")] + InventoryPlan = 305, + [Description("结算比对")] + BalanceCompare = 307, + [Description("盘点库位")] + InventoryLoc = 306, + + [Description("器具初始化")] + EqptRecover = 401, + [Description("器具保养")] + EqptMaintain = 402, + [Description("器具报废")] + EqptScrap = 403, + [Description("码托")] + EqptLoad = 404, + + [Description("JIS收货")] + VinReceive = 501, + [Description("JIS发货")] + VinDeliver = 502, + [Description("JIS销售")] + VinSell = 503, + + [Description("报检")] + Inspect = 601, + [Description("追溯")] + TraceBack = 602, + [Description("备货单")] + PickPlan = 603, + [Description("发料单")] + PickFact = 604, + [Description("生产计划")] + ProducePlan = 605, + [Description("生产订单")] + ManuOrder = 607, + [Description("不合格品单")] + UnqualifiedProd = 608, + [Description("设备点检模板")] + CheckModeEquipment = 609, + [Description("设备点检单")] + CheckBillEquipment = 610, + [Description("产品点检模板")] + CheckModeProduct = 611, + [Description("产品点检单")] + CheckBillProduct = 612, + [Description("首检模板")] + SpotInspectFirstMode = 613, + [Description("首检单")] + SpotInspectionFirst = 615, + [Description("巡检模板")] + SpotInspectMedMode = 616, + [Description("巡检单")] + SpotInspectionMed = 617, + [Description("末检模板")] + SpotInspectLastMode = 618, + [Description("末检单")] + SpotInspectionLast = 619, + [Description("停线单")] + LineStopBill = 620, + [Description("产线识别码")] + WorkLineDoc = 621, + [Description("工位识别码")] + WorkStationDoc = 622, + [Description("路由识别码")] + RouteDoc = 623, + [Description("工位拆解识别码")] + RouteBOMDoc = 624, + [Description("参数识别码")] + RoutePDoc = 625, + [Description("工位部件识别码")] + MachinePart = 626, + [Description("停线发通知编号")] + LineStopNoticeBill = 627, + [Description("停线预计处理编号")] + LineStopPrepareBill = 628, + [Description("措施编号")] + LineStopMeasureBill = 629, + [Description("点检表编号")] + CheckCode = 630, + + ReHandleVin = 701, + [Description("采购订单")] + PuchaseOrder = 702, + [Description("发货单")] + AsnOrder = 703, + [Description("销售订单")] + SaleOrder = 704, + + + [Description("确认订单")] + PO = 704, + [Description("收货")] + Receive = 704, + [Description("条码")] + BarCode = 704, + [Description("发票")] + Invoice = 704, + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/CollectionStepFinish.cs b/北京北汽/SCP/CK.SCP.Models/Enums/CollectionStepFinish.cs new file mode 100644 index 0000000..998377c --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/CollectionStepFinish.cs @@ -0,0 +1,11 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum CollectionStepFinish + { + [Description("零件扫条码")] ScanPartBarCode = 1, + [Description("机器复位信号")] ScanMachineReset = 2, + [Description("专用计数设备")] counters = 3 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/ControlType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/ControlType.cs new file mode 100644 index 0000000..d84d0a5 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/ControlType.cs @@ -0,0 +1,16 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum ControlType + { + [Description("ǩ")] + Tab = 0, + [Description("Ⱥ")] + Grp = 1, + [Description("")] + Ctn = 2, + [Description("˵")] + Itm = 3, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/DataBaseType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/DataBaseType.cs new file mode 100644 index 0000000..1a1097c --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/DataBaseType.cs @@ -0,0 +1,10 @@ +namespace CK.SCP.Models.Enums +{ + public enum DataBaseType + { + SQLServer, + MySql, + Oracle, + PostgreSQL, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/DataState.cs b/北京北汽/SCP/CK.SCP.Models/Enums/DataState.cs new file mode 100644 index 0000000..f3f2710 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/DataState.cs @@ -0,0 +1,29 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum DataState + { + [Description("无效")] + Disabled = 0, + [Description("有效")] + Enabled = 1, + } + + public enum FormState + { + [Description("开放")] + 开放 = 1, + [Description("关闭")] + 关闭 = 0, + + } + + public enum BillState + { + Cancel = -1, + New = 0, + Process = 1, + Finish = 2, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/EquipmentState.cs b/北京北汽/SCP/CK.SCP.Models/Enums/EquipmentState.cs new file mode 100644 index 0000000..89b17d0 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/EquipmentState.cs @@ -0,0 +1,11 @@ +namespace CK.SCP.Models.Enums +{ + public enum EquipmentState + { + Idle, + InUsed, + Sent, + Maintaining, + Scraped + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/ErpInterfaceType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/ErpInterfaceType.cs new file mode 100644 index 0000000..269dcae --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/ErpInterfaceType.cs @@ -0,0 +1,19 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum ErpInterfaceType + { + [Description("移库")] + TR, + [Description("回冲")] + BK, + MaterialIn, + MaterialOut, + ProductIn, + ProductOut, + [Description("销售")] + SH, + RCT + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/GroupType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/GroupType.cs new file mode 100644 index 0000000..6e668a0 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/GroupType.cs @@ -0,0 +1,15 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum GroupType + { + [Description("λ")] + Shelf = 0, + [Description("λ")] + Ground = 1, + [Description("߱߻")] + Wip = 2, + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/InspectType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/InspectType.cs new file mode 100644 index 0000000..68fb327 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/InspectType.cs @@ -0,0 +1,14 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum InspectType + { + [Description("")] + No = 0, + [Description("ȫ")] + All = 1, + [Description("")] + Partial = 2 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/InspectionType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/InspectionType.cs new file mode 100644 index 0000000..86e3c94 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/InspectionType.cs @@ -0,0 +1,14 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum InspectionType + { + //[Description("未知")] Unknow = 0, + [Description("首检")] InspectionFirst = 1, + [Description("巡检")] InspectionMed = 2, + [Description("末检")] InspectionLast = 3, + [Description("设备点检")] CheckEquipment = 4, + [Description("产品点检")] CheckProduction = 5, + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/InventoryState.cs b/北京北汽/SCP/CK.SCP.Models/Enums/InventoryState.cs new file mode 100644 index 0000000..b2559a4 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/InventoryState.cs @@ -0,0 +1,19 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum InventoryState + { + //状态 0:新建 1:已初盘 2:已重盘 3:已生成接口 -1:已取消 + [Description("新建")] + New = 0, + [Description("已初盘")] + Checked = 1, + [Description("已重盘")] + ReChecked = 2, + [Description("已生成接口")] + ToErp = 3, + [Description("取消")] + Cancelled = -1 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/InvoiceState.cs b/北京北汽/SCP/CK.SCP.Models/Enums/InvoiceState.cs new file mode 100644 index 0000000..8754d9e --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/InvoiceState.cs @@ -0,0 +1,24 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum InvoiceState + { + [Description("新建")] + New = 0, + [Description("供应商申请")] + Apply = 1, + [Description("采购审核退回")] + CheckFail = 2, + [Description("采购审核通过")] + CheckSuccess = 3, + [Description("发票寄出")] + Mail = 4, + [Description("财务收票")] + FinanceReceive = 5, + [Description("财务退回")] + FinanceFail = 6, + [Description("发票作废")] + Reject = -1, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/LocType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/LocType.cs new file mode 100644 index 0000000..ac74d6d --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/LocType.cs @@ -0,0 +1,15 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum LocType + { + [Description("存储库位")] + Store = 0, + [Description("线边库位")] + Wip = 1, + [Description("功能库位")] + Functional = 2, + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/LogType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/LogType.cs new file mode 100644 index 0000000..25f7647 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/LogType.cs @@ -0,0 +1,17 @@ +namespace CK.SCP.Models.Enums +{ + public enum LogType + { + Login, + Logout, + BillCreate, + BillModify, + BillDelete, + BillCancel, + BaseDataCreate, + BaseDataModify, + BaseDataDisable, + BaseDataDelete, + StockMove + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/LoginState.cs b/北京北汽/SCP/CK.SCP.Models/Enums/LoginState.cs new file mode 100644 index 0000000..2a665fb --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/LoginState.cs @@ -0,0 +1,16 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum LoginState + { + [Description("登录失败,未知原因")] + Fault = 0, + [Description("登录成功")] + OK = 1, + [Description("错误的用户名或密码,登录失败!")] + BadCode = 2, + [Description("登录失败,尝试次数太多。稍后再试。")] + Itm = 3, + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/ManageType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/ManageType.cs new file mode 100644 index 0000000..abef2c3 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/ManageType.cs @@ -0,0 +1,12 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum ManageType + { + [Description("批量")] + Batch =0, + [Description("单包装")] + SinglePack =1 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/ManufactureProcedureType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/ManufactureProcedureType.cs new file mode 100644 index 0000000..1f31cda --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/ManufactureProcedureType.cs @@ -0,0 +1,18 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + + public enum ManufactureProcedureType + { + [Description("批量生产")] + Ordinary = 1, + [Description("试制")] + TrialManufacture = 2, + [Description("拆解返修")] + Disassembly = 3, + [Description("小修理")] + Replace = 4 + + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/NotifyType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/NotifyType.cs new file mode 100644 index 0000000..303be2f --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/NotifyType.cs @@ -0,0 +1,24 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum NotifyType + { + [Description("新增备料单")] + MaterialAsk=0, + [Description("未知客户物料号")] + UnknowCustPart=1, + [Description("新增检验单")] + Inspect=2, + [Description("新增生产计划单")] + ProducePlan=3, + [Description("新增发货计划单")] + DeliverPlan=4, + [Description("新增盘点计划单")] + InventoryPlan=5, + [Description("新增委外计划单")] + OmPlan=6, + [Description("VIN处理错误")] + VinError=7, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/OperateType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/OperateType.cs new file mode 100644 index 0000000..018e43d --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/OperateType.cs @@ -0,0 +1,11 @@ +namespace CK.SCP.Models.Enums +{ + public enum OperateType + { + Add, + Update, + Delete, + Cancel, + Finish + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/PartKind.cs b/北京北汽/SCP/CK.SCP.Models/Enums/PartKind.cs new file mode 100644 index 0000000..ee93769 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/PartKind.cs @@ -0,0 +1,14 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum PartKind + { + [Description("ܳ")] + FG, + [Description("ԭ")] + RAW, + [Description("Ʒ")] + SUB + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/PartState.cs b/北京北汽/SCP/CK.SCP.Models/Enums/PartState.cs new file mode 100644 index 0000000..151be4e --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/PartState.cs @@ -0,0 +1,17 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum PartState + { + [Description("Actived")] + A, + [Description("Designing")] + D, + [Description("Hold")] + H, + [Description("Noneactived")] + N + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/PartType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/PartType.cs new file mode 100644 index 0000000..97d2ee7 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/PartType.cs @@ -0,0 +1,24 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + + + public enum PartType + { + [Description("ɹ")] + B = 0, + [Description("Ƽ")] + M = 1, + [Description("ͻָ")] + D = 2, + [Description("ͻָ")] + DN = 21, + [Description("ͻָ")] + DY = 22, + [Description("ί")] + S = 3, + [Description("˾ɹ")] + Y = 4 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/PlanDayState.cs b/北京北汽/SCP/CK.SCP.Models/Enums/PlanDayState.cs new file mode 100644 index 0000000..394c567 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/PlanDayState.cs @@ -0,0 +1,23 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + + public enum PlanDayState + { + [Description("取消")] + Cancelled = -1, + [Description("新建")] + New = 0, + [Description("提交")] + Handling = 1, + [Description("已分配工单")] + Assigned = 2, + [Description("禁止自动分配工单")] + AssignDisable = 3, + [Description("完成")] + Finished = 4, + [Description("失败")] + Failed = 5, + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/PlanState.cs b/北京北汽/SCP/CK.SCP.Models/Enums/PlanState.cs new file mode 100644 index 0000000..b635c97 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/PlanState.cs @@ -0,0 +1,144 @@ +using System; +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum PlanState + { + [Description("新建")] + New = 0, + [Description("发布")] + Release = 1, + [Description("已确认")] + Confirm = 2, + [Description("已发货")] + Ship = 3, + [Description("已收货")] + Receive = 4, + [Description("已完成")] + Complete = 5, + [Description("强制完结")] + CompleteForce = 6, + [Description("已作废")] + Reject = -1, + } + +/* public class F_StatePlan + { + public static int New = 0; + public static int Release = 1; + public static int Confirm = 2; + public static int Ship = 3; + public static int Receive = 4; + public static int Complete = 5; + public static int CompleteForce = 6; + public static int Reject = -1; + + public static string GetName(object State) + { + string ret = ""; + + if (Convert.ToInt32(State) == New) ret = "新建"; + if (Convert.ToInt32(State) == Release) ret = "发布"; + if (Convert.ToInt32(State) == Confirm) ret = "已确认"; + if (Convert.ToInt32(State) == Ship) ret = "已发货"; + if (Convert.ToInt32(State) == Receive) ret = "已收货"; + if (Convert.ToInt32(State) == Complete) ret = "已完成"; + if (Convert.ToInt32(State) == CompleteForce) ret = "强制完结"; + if (Convert.ToInt32(State) == Reject) ret = "已作废"; + + + return ret; + } + + } + public class F_StateShip + { + public static int New = 0; + public static int Ship = 1; + public static int Receive = 2; + public static int Reject = -1; + + public static string GetName(object State) + { + string ret = ""; + + if (Convert.ToInt32(State) == New) ret = "新建"; + if (Convert.ToInt32(State) == Ship) ret = "已发货"; + if (Convert.ToInt32(State) == Receive) ret = "已收货"; + if (Convert.ToInt32(State) == Reject) ret = "已作废"; + + + return ret; + } + + + + + + } + public class F_StateReceive + { + public static int Receive = 0; + public static int Check = 1; + public static int Invoice = 2; + + public static string GetName(object State) + { + string ret = ""; + + if (Convert.ToInt32(State) == Receive) ret = "已收货"; + if (Convert.ToInt32(State) == Check) ret = "审核通过"; + if (Convert.ToInt32(State) == Invoice) ret = "已开票"; + + return ret; + } + + } + + public class F_StateReceiveType + { + public static int Receive = 1; + public static int Return = 2; + + public static string GetName(object State) + { + string ret = ""; + + if (Convert.ToInt32(State) == Receive) ret = "收货单"; + if (Convert.ToInt32(State) == Return) ret = "退货单"; + + return ret; + } + + } + + public class F_StateInvoice + { + public static int New = 0; + public static int Apply = 1; + public static int CheckFail = 2; + public static int CheckSuccess = 3; + public static int Mail = 4; + public static int FinanceReceive = 5; + public static int FinanceFail = 6; + public static int Reject = -1; + + public static string GetName(object State) + { + string ret = ""; + + if (Convert.ToInt32(State) == New) ret = "新建"; + if (Convert.ToInt32(State) == Apply) ret = "供应商申请"; + if (Convert.ToInt32(State) == CheckFail) ret = "采购审核退回"; + if (Convert.ToInt32(State) == CheckSuccess) ret = "采购审核通过"; + if (Convert.ToInt32(State) == Mail) ret = "发票寄出"; + if (Convert.ToInt32(State) == FinanceFail) ret = "财务退回"; + if (Convert.ToInt32(State) == FinanceReceive) ret = "财务收票"; + if (Convert.ToInt32(State) == Reject) ret = "发票作废"; + + return ret; + } + + }*/ +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/PortalType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/PortalType.cs new file mode 100644 index 0000000..3667b93 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/PortalType.cs @@ -0,0 +1,16 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum PortalType + { + [Description("ͻ")] + WinForm = 0, + [Description("վ")] + Web = 1, + [Description("ֳ")] + Pda = 2, + [Description("")] + Other = 3, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/PrintType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/PrintType.cs new file mode 100644 index 0000000..f0db164 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/PrintType.cs @@ -0,0 +1,12 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum PrintType + { + [Description("直接打印")] + Print=0, + [Description("打印预览")] + PrintPreview=1 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/Project.cs b/北京北汽/SCP/CK.SCP.Models/Enums/Project.cs new file mode 100644 index 0000000..caa4dc0 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/Project.cs @@ -0,0 +1,15 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum Project + { + [Description("CKPT")] + X261CC = 0, + [Description("DP")] + X261CDC = 1, + [Description("CNSL")] + X261CCC = 2, + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/ProjectName.cs b/北京北汽/SCP/CK.SCP.Models/Enums/ProjectName.cs new file mode 100644 index 0000000..d73c8b5 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/ProjectName.cs @@ -0,0 +1,16 @@ +namespace CK.SCP.Models.Enums +{ + public enum ProjectName + { + 锦州锦恒, + 常熟安通林, + 常熟安通林海虞专用, + 天津安通林, + 成都安通林, + + 天津迪安, + 长春繁荣, + 重庆北汽模塑, + 江苏锦恒, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/ReceiveBillType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/ReceiveBillType.cs new file mode 100644 index 0000000..b69905f --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/ReceiveBillType.cs @@ -0,0 +1,12 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum ReceiveBillType + { + [Description("收货单")] + Receive = 1, + [Description("退货单")] + Reject = 2, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/ReceiveState.cs b/北京北汽/SCP/CK.SCP.Models/Enums/ReceiveState.cs new file mode 100644 index 0000000..5ec6ff1 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/ReceiveState.cs @@ -0,0 +1,14 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum ReceiveState + { + [Description("已收货")] + Receive = 0, + [Description("审核通过")] + Check = 1, + [Description("待开票")] + Invoice = 2, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/ResultCode.cs b/北京北汽/SCP/CK.SCP.Models/Enums/ResultCode.cs new file mode 100644 index 0000000..db87c27 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/ResultCode.cs @@ -0,0 +1,32 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum ResultCode + { + [Description("成功")] + Success = 0, + [Description("警告")] + Warning = 1, + [Description("连接错误")] + ErrorConnection = 1001, + [Description("未找到数据")] + DataNotFound = 2001, + [Description("数据已存在")] + DataAlreadyExist = 2002, + [Description("数据状态错误")] + DataStateError = 2003, + [Description("数量错误")] + DataQtyError=2004, + + [Description("发现新零件")] + NewCustPart = 4001, + [Description("系统错误")] + Exception=-1, + [Description("数据校验失败")] + DbEntityValidationException=-2, + + [Description("库存不足")] + StockNotEnough, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/ServiceType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/ServiceType.cs new file mode 100644 index 0000000..0313904 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/ServiceType.cs @@ -0,0 +1,52 @@ +namespace CK.SCP.Models.Enums +{ + public enum ServiceType + { + GetConfigList, + GetWhseList, + GetAreaList, + GetGroupList, + GetLocList, + GetPartList, + GetVendPartList, + GetCustPartList, + GetSupplierList, + GetCustomerList, + GetShiftList, + GetTeamList, + GetWorklineList, + GetBomList, + + GetBarcode, + + GetLocByLocCode, + GetPartByPartCode, + GetPartByErpPartCode, + GetCustPartByCustPartCode, + GetPoByCode, + GetAsnByCode, + GetProducePlanByCode, + GetSoByCode, + GetEqptByCode, + + GetStock, + GetStockList, + + GetBill, + GetBillList, + GetSourceBill, + + AddBill, + StartBill, + + InventoryLoc, + FinishBill, + GetInventoryLoc, + GetStockDetailList, + CancelBill, + GetOtscById, + GetPdaPowerMenu, + GetSubBillTypeList, + UnlockLoc + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/ShipState.cs b/北京北汽/SCP/CK.SCP.Models/Enums/ShipState.cs new file mode 100644 index 0000000..3c04fd9 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/ShipState.cs @@ -0,0 +1,16 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum ShipState + { + [Description("新建")] + New = 0, + [Description("已发货")] + Ship =1, + [Description("已收货")] + Receive = 2, + [Description("已作废")] + Reject = -1, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/StockState.cs b/北京北汽/SCP/CK.SCP.Models/Enums/StockState.cs new file mode 100644 index 0000000..0c1b1c4 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/StockState.cs @@ -0,0 +1,18 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum StockState + { + [Description("待检")] + Inspect=0, + [Description("合格")] + Valid = 1, + [Description("不合格")] + InValid = 2, + [Description("过期")] + Overdue = 3, + [Description("待判定")] + Hold = 4, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/StockWhereType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/StockWhereType.cs new file mode 100644 index 0000000..6d4d2ef --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/StockWhereType.cs @@ -0,0 +1,11 @@ +namespace CK.SCP.Models.Enums +{ + public enum StockWhereType + { + BarCode, + LocCode, + BarCodeAndLocCode, + EqptCode, + PartCode + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/StopLineType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/StopLineType.cs new file mode 100644 index 0000000..268dcad --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/StopLineType.cs @@ -0,0 +1,26 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + /// <summary> + /// 停线类型。也就是停线原因。 + /// </summary> + public enum StopLineType + { + [Description("质量问题")] QA = 1, + [Description("设备问题")] EQ = 2, + [Description("缺料")] Mat = 3, + [Description("工艺设计问题")] ProcessDesign = 4, + } + + /// <summary> + /// 停线事故等级。枚举值必须从小到大排列.以后要改的话,必须注意。要逐级触发系统动作的。 + /// </summary> + public enum StopLineLevel + { + [Description("轻度")] Minimum = 100, + [Description("一般")] Commonly = 200, + [Description("严重")] Serious = 300, + [Description("重大")] Weighty = 400, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/StoreArea.cs b/北京北汽/SCP/CK.SCP.Models/Enums/StoreArea.cs new file mode 100644 index 0000000..22eb637 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/StoreArea.cs @@ -0,0 +1,32 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum StoreArea + { + [Description("原料库")] + RAW=11, + [Description("线边库")] + WIP=21, + [Description("成品库")] + FG=12, + [Description("销售库")] + SALE=13, + [Description("隔离库")] + HOLD=22, + [Description("在途库")] + ROAD=14, + [Description("其它库")] + OTHER=15, + [Description("废品库")] + SCRAP=23, + [Description("半成品库")] + HF=16, + [Description("待检库")] + INSPECT=0, + [Description("委外库")] + OS = 17, + [Description("备品库")] + AST + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/SubBillType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/SubBillType.cs new file mode 100644 index 0000000..9c2eb90 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/SubBillType.cs @@ -0,0 +1,56 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum SubBillType + { + //其它出入库-出库 + [Description("其它出库")] + OtherOut = 30101, + //[Description("原料退货")] + //ReturnToSupplier=30102, + [Description("盘盈单")] + InventoryProfit = 30103, + [Description("报废销毁")] + ScrapDestroy=30104, + + //其它出入库-入库 + [Description("其它入库")] + OtherIn = 30111, + //[Description("销售退货")] + //ProductReturn=30112, + [Description("盘亏单")] + InventoryLoss=30113, + + //其它出入库-移库 + [Description("成品隔离")] + ProductUndecide = 30131, + //[Description("成品返修")] + //ProductRepair = 30132, + [Description("成品报废")] + ProductScrap = 30133, + //[Description("生产退库")] + //BackToStore = 30134, + + + //移库 + [Description("移库单")] + StockMove = 30201, + [Description("原料入库单")] + MaterialStockIn = 30202, + [Description("成品入库单")] + ProductStockIn = 30203, + [Description("成品出库单")] + ProductStockOut = 30204, + [Description("原料出库单")] + PartPickFact = 30205, + + + //采购收货 + [Description("订单收货单")] + PoReceive = 10101, + [Description("ASN收货单")] + AsnReceive = 10102, + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/UniApiState.cs b/北京北汽/SCP/CK.SCP.Models/Enums/UniApiState.cs new file mode 100644 index 0000000..6d61d04 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/UniApiState.cs @@ -0,0 +1,10 @@ +namespace CK.SCP.Models.Enums +{ + public enum UniApiState + { + 待执行 = 0, + 成功 = 1, + 失败 = 2, + 其它 = 9, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/UniApiType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/UniApiType.cs new file mode 100644 index 0000000..1db54bd --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/UniApiType.cs @@ -0,0 +1,17 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum UniApiType + { + [Description("订单")] + PO, + [Description("收货")] + Receive, + [Description("条码")] + BarCode, + [Description("发票")] + Invoice, + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/VinState.cs b/北京北汽/SCP/CK.SCP.Models/Enums/VinState.cs new file mode 100644 index 0000000..e022093 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/VinState.cs @@ -0,0 +1,22 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum VinState + { + [Description("已收货")] + Received = 0, + [Description("部分收货")] + Partial = 111, + [Description("已发货")] + Delivered = 222, + [Description("销售中")] + Selling = 300, + [Description("已销售")] + Sold = 333, + [Description("已比对")] + Balanced = 999, + [Description("不存在数据")] + DataNotFound = -1, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/WhseType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/WhseType.cs new file mode 100644 index 0000000..273ed72 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/WhseType.cs @@ -0,0 +1,12 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum WhseType + { + [Description("ֿ")] + ProduceWhse = 0, + [Description("ֿ")] + ThirdWhse = 1, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Enums/WorkLineType.cs b/北京北汽/SCP/CK.SCP.Models/Enums/WorkLineType.cs new file mode 100644 index 0000000..9f0891d --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Enums/WorkLineType.cs @@ -0,0 +1,11 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum WorkLineType + { + [Description("װ")] + Assemble = 0, + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/GlobalConfig.cs b/北京北汽/SCP/CK.SCP.Models/GlobalConfig.cs new file mode 100644 index 0000000..9cdfe57 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/GlobalConfig.cs @@ -0,0 +1,62 @@ +using System; +using CK.SCP.Utils; +namespace CK.SCP.Models +{ + + public static class GlobalConfig + { + public const string ScpDbFileName = "Scp数据库设置.ini"; + public const string AppBoxDbFileName = "AppBox数据库设置.ini"; + public const string UniApiDbFileName = "接口数据库设置.ini"; + public const string UniApiConfigFileName = "ERP接口设置.ini"; + public const string DurationFileName = "执行周期设置.ini"; + public const string UpdateFileName = "自动更新设置.ini"; + + + + private static DbSetting _scpDatabase; + private static DbSetting _appboxDatabase; + private static DbSetting _uniApiDatabase; + + + public static DbSetting ScpDatabase + { + get { return _scpDatabase ?? (_scpDatabase = GetConfigValues<DbSetting>(ScpDbFileName)); } + + set { _scpDatabase = value; } + } + + public static DbSetting AppBoxDatabase + { + get { return _appboxDatabase ?? (_appboxDatabase = GetConfigValues<DbSetting>(AppBoxDbFileName)); } + + set { _appboxDatabase = value; } + } + + public static DbSetting UniApiDatabase + { + get { return _uniApiDatabase ?? (_uniApiDatabase = GetConfigValues<DbSetting>(UniApiDbFileName)); } + + set { _uniApiDatabase = value; } + } + + + + public static T GetConfigValues<T>(string filename) where T : new() + { + T t = new T(); + if (FileHelper.Exists(filename)) + { + t = JsonHelper.ReadConfigFromFile<T>(filename); + } + else + { + throw new Exception($"配置文件{filename}丢失,请重新配置"); + } + + return t; + } + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/Properties/AssemblyInfo.cs b/北京北汽/SCP/CK.SCP.Models/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..76f2698 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("CK.SCP.Models")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("CK.SCP.Models")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +//将 ComVisible 设置为 false 将使此程序集中的类型 +//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("dd7c0def-71e7-443f-b0b7-db2f5b12a506")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/北京北汽/SCP/CK.SCP.Models/SCPException.cs b/北京北汽/SCP/CK.SCP.Models/SCPException.cs new file mode 100644 index 0000000..dbc606c --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/SCPException.cs @@ -0,0 +1,50 @@ +using System; +using System.Text; +using CK.SCP.Models.Enums; +using CK.SCP.Utils; + +namespace CK.SCP.Models +{ + [Serializable] //声明为可序列化的 因为要写入文件中 + public class ScpException : ApplicationException //由用户程序引发,用于派生自定义的异常类型 + { + private const string SP = ";"; + // private ResultCode _code; + // private string _indexString; + public ResultCode Code { get; set; } + public string IndexString { get; set; } + + /// <summary> + /// 默认构造函数 + /// </summary> + public ScpException() + { + } + + public ScpException(ResultCode code, string indexString = null, string message = null, ScpException inner = null) + : base(message, inner) + { + Code = code; + IndexString = indexString; + } + + public ScpException(string message) + { +// throw new NotImplementedException(); + } + + // public WmsException(System.Runtime.Serialization.SerializationInfo info, + // System.Runtime.Serialization.StreamingContext context) : base(info, context) + // { + // _indexString = info.GetString(IndexString); + // } + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append(EnumHelper.GetDescription(Code) + SP); + sb.Append(IndexString + SP); + sb.Append(Message + SP); + return sb.ToString(); + } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpCache.cs b/北京北汽/SCP/CK.SCP.Models/ScpCache.cs new file mode 100644 index 0000000..f735bd5 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpCache.cs @@ -0,0 +1,193 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using CK.SCP.Models.AppBoxEntity; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; + +namespace CK.SCP.Models +{ + public static class ScpCache + { + private static readonly ScpEntities ScpDb = EntitiesFactory.CreateScpInstance(); + private static readonly AppBoxContext Db = EntitiesFactory.CreateAppBoxInstance(); + + private static List<TA_VENDER> _vendList; + private static List<TA_PART> _PartList; + private static List<User> _usersList; + private static List<TB_RECEIVE> _ReceiveList; + + + + private static ScpConfig _config; + public static ScpConfig Config + + { + get { return _config ?? (_config = GetConfig(ScpDb)); } + set { _config = value; } + } + + private static ScpConfig GetConfig(ScpEntities db) + { + var config = new ScpConfig(); + var peroperties = config.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance); + var configList = GetDbConfigList(db); + foreach (var pi in peroperties) + { + var piName = pi.Name.ToUpper(); + foreach (var cfg in configList) + { + if (cfg.ParamName != piName) continue; + var value = ListHelper.ConvertToType(cfg.ParamValue, pi.PropertyType); + if (!pi.CanWrite) continue; + try + { + pi.SetValue(config, value, null); + break; + } + catch (Exception ex) + { + MessageHelper.ShowError(ex); + throw; + } + } + } + return config; + } + + private static void SetConfig(ScpEntities db, ScpConfig config) + { + + var peroperties = config.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance); + var configList = GetDbConfigList(db); + foreach (var pi in peroperties) + { + var piName = pi.Name.ToUpper(); + if (configList.Any(p => p.ParamName.ToUpper() == piName)) continue; + var cfg = new TA_CONFIG + { + ParamName = piName, + ParamValue = pi.GetValue(Config, null).ToString(), + State = 1, + Remark = piName, + }; + db.TA_CONFIG.Add(cfg); + } + EntitiesFactory.SaveDb(db); + } + + public static List<TA_CONFIG> GetDbConfigList(ScpEntities db) + { + return db.TA_CONFIG.OrderByDescending(p => p.UID).ToList(); + } + public static void Refresh(ScpEntities db) + { + try + { + Config = GetConfig(db); + SetConfig(db, Config); + } + catch (Exception ex) + { + + throw new Exception( + $"系统无法连接到{GlobalConfig.ScpDatabase.数据库类型}数据库:{GlobalConfig.ScpDatabase.服务器地址},请检查配置的服务器,数据库,用户名和密码等信息是否正确。"); + + } + + } + + public static string GetVendName(string vendId) + { + return VenderList.SingleOrDefault(p => p.VendId == vendId)?.VendName ?? string.Empty; + } + public static string GetVendIDByUser(string name) + { + return UsersList.SingleOrDefault(p => p.Name == name)?.SupplierCode ?? string.Empty; + } + public static string GetPartDesc(string wmsDataPartCode) + { + return ""; + } + + public static DateTime GetServerTime() + { + return DateTime.Now; + } + public static List<TA_VENDER> VenderList + { + get + { + if (_vendList == null || _vendList.Count == 0) + { + _vendList = ScpDb.TA_VENDER.ToList(); + } + return _vendList; + } + set { _vendList = value; } + } + public static List<User> UsersList + { + get + { + if (_usersList == null || _usersList.Count == 0) + { + _usersList = Db.Users.ToList(); + } + return _usersList; + } + set { _usersList = value; } + } + public static List<TA_PART> PartList + { + get + { + if (_PartList == null || _PartList.Count == 0) + { + _PartList = ScpDb.TA_PART.ToList(); + } + return _PartList; + } + set { _PartList = value; } + } + public static string GetPartDesc1(string partCode) + { + return PartList.SingleOrDefault(p => p.PartCode == partCode)?.PartDesc1 ?? string.Empty; + } + public static List<TB_RECEIVE> ReceiveList + { + get + { + if (_ReceiveList == null || _ReceiveList.Count == 0) + { + _ReceiveList = ScpDb.TB_RECEIVE.ToList(); + } + return _ReceiveList; + } + set { _ReceiveList = value; } + } + public static string GetReceivePoBillNum(string billnum) + { + return ReceiveList.SingleOrDefault(p => p.BillNum == billnum)?.PoBillNum ?? string.Empty; + } + public static string GetReceiveAsnBillNum(string billnum) + { + return ReceiveList.SingleOrDefault(p => p.BillNum == billnum)?.AsnBillNum ?? string.Empty; + } + } + public class ScpConfig + { + public string QAD域 { get; set; } = "JZ1"; + public string QAD地点 { get; set; } = "0100"; + public string WMS接口数据流水号格式 { get; set; } = "yyMMdd_HHmmssffff"; + + public string 项目名称 { get; set; } = "锦恒项目"; + public string WMS用户名 { get; set; } = "W"; + + public string SCP用户名 { get; set; } = "SCP"; + public string SCP接口数据流水号格式 { get; set; } = "yyMMdd_HHmmssffff"; + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntities.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntities.cs new file mode 100644 index 0000000..f0446cf --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntities.cs @@ -0,0 +1,258 @@ +using System.Data.Entity; +using CK.SCP.Models.ScpEntity; + +namespace CK.SCP.Models +{ + + + public class SqlDbConfiguration : DbConfiguration + { + public SqlDbConfiguration() + { + this.SetManifestTokenResolver(new Sql2008ManifestTokenResolver()); + } + } + public class Sql2008ManifestTokenResolver : System.Data.Entity.Infrastructure.IManifestTokenResolver + { + public string ResolveManifestToken(System.Data.Common.DbConnection connection) + { + return "2008"; + } + } + + + public partial class ScpEntities : DbContext + { + public ScpEntities() + : base("name=ScpEntities") + { + } + public ScpEntities(string strConn) + : base(strConn) + { + } + + public virtual DbSet<TA_BILLTYPE> TA_BILLTYPE { get; set; } + public virtual DbSet<TA_CONFIG> TA_CONFIG { get; set; } + public virtual DbSet<TA_PART> TA_PART { get; set; } + public virtual DbSet<TA_VEND_PART> TA_VEND_PART { get; set; } + public virtual DbSet<TA_VENDER> TA_VENDER { get; set; } + public virtual DbSet<TB_INVOICE> TB_INVOICE { get; set; } + public virtual DbSet<TB_INVOICE_DETAIL> TB_INVOICE_DETAIL { get; set; } + public virtual DbSet<TB_RECEIVE> TB_RECEIVE { get; set; } + public virtual DbSet<TB_RECEIVE_DETAIL> TB_RECEIVE_DETAIL { get; set; } + public virtual DbSet<TB_RETURN> TB_RETURN { get; set; } + public virtual DbSet<TB_RETURN_DETAIL> TB_RETURN_DETAIL { get; set; } + public virtual DbSet<TF_ASN> TF_ASN { get; set; } + public virtual DbSet<TF_ASN_DETAIL> TF_ASN_DETAIL { get; set; } + public virtual DbSet<TF_PO> TF_PO { get; set; } + public virtual DbSet<TF_PO_DETAIL> TF_PO_DETAIL { get; set; } + public virtual DbSet<TL_BASEDATA> TL_BASEDATA { get; set; } + public virtual DbSet<TL_BILL> TL_BILL { get; set; } + public virtual DbSet<TL_OPER> TL_OPER { get; set; } + public virtual DbSet<TS_BARCODE> TS_BARCODE { get; set; } + public virtual DbSet<TS_STOCK> TS_STOCK { get; set; } + public virtual DbSet<TS_UNI_API> TS_UNI_API { get; set; } + public virtual DbSet<TS_UNI_API_HIS> TS_UNI_API_HIS { get; set; } + public virtual DbSet<TT_CURRENCY> TT_CURRENCY { get; set; } + public virtual DbSet<TT_PROJECT> TT_PROJECT { get; set; } + + public virtual DbSet<TT_UNIT> TT_UNIT { get; set; } + public virtual DbSet<V_POAll> V_POAll { get; set; } + public virtual DbSet<V_POAllDetail> V_POAllDetail { get; set; } + + public virtual DbSet<V_BillShip> V_BillShip { get; set; } + public virtual DbSet<V_Receive> V_Receive { get; set; } + + public virtual DbSet<V_BillShipDetail> V_BillShipDetail { get; set; } + public virtual DbSet<V_ReceiveDetail> V_ReceiveDetail { get; set; } + public virtual DbSet<V_BillInvoice> V_BillInvoice { get; set; } + + public virtual DbSet<V_BillInvoiceDetail> V_BillInvoiceDetail { get; set; } + + public virtual DbSet<V_POReport> V_POReport { get; set; } + public virtual DbSet<V_ReceiveReport> V_ReceiveReport { get; set; } + public virtual DbSet<V_QadOrder> V_QadOrder { get; set; } + public virtual DbSet<TB_QadOrder> TB_QadOrder { get; set; } + public virtual DbSet<TB_QadOrderDetail> TB_QadOrderDetail { get; set; } + + + public virtual DbSet<V_PlanMonth> V_PlanMonth { get; set; } + public virtual DbSet<TB_PlanMonth> TB_PlanMonth { get; set; } + public virtual DbSet<V_Stock> V_Stock { get; set; } + public virtual DbSet<V_Info> V_Info { get; set; } + public virtual DbSet<TA_Info> TA_Info { get; set; } + public virtual DbSet<TB_PublicData> TB_PublicData { get; set; } + public virtual DbSet<TA_BillNoType> TA_BillNoType { get; set; } + public virtual DbSet<TA_VEND_USER> TA_VEND_USER { get; set; } + public virtual DbSet<TA_Part_User> TA_Part_User { get; set; } + // public virtual DbSet<V_ReceiveList> V_ReceiveList { get; set; } + + + + + + + + protected override void OnModelCreating(DbModelBuilder modelBuilder) + { + modelBuilder.Entity<TA_BILLTYPE>() + .Property(e => e.Sep) + .IsUnicode(false); + + modelBuilder.Entity<TA_PART>() + .Property(e => e.State) + .IsUnicode(false); + + modelBuilder.Entity<TA_VEND_PART>() + .Property(e => e.VendPackQty) + .HasPrecision(18, 5); + + modelBuilder.Entity<TA_VENDER>() + .Property(e => e.VendAbbCode) + .IsUnicode(false); + + modelBuilder.Entity<TB_INVOICE_DETAIL>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_INVOICE_DETAIL>() + .Property(e => e.Price) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_INVOICE_DETAIL>() + .Property(e => e.PackQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_RECEIVE_DETAIL>() + .Property(e => e.BillQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_RECEIVE_DETAIL>() + .Property(e => e.ReceivedQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_RECEIVE_DETAIL>() + .Property(e => e.Price) + .HasPrecision(19, 4); + + + + modelBuilder.Entity<TB_RETURN_DETAIL>() + .Property(e => e.BillQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_RETURN_DETAIL>() + .Property(e => e.ReceivedQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_RETURN_DETAIL>() + .Property(e => e.Price) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_RETURN_DETAIL>() + .Property(e => e.PackQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TF_ASN_DETAIL>() + .Property(e => e.BillQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TF_ASN_DETAIL>() + .Property(e => e.Price) + .HasPrecision(19, 4); + + modelBuilder.Entity<TF_ASN_DETAIL>() + .Property(e => e.PackQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TF_PO_DETAIL>() + .Property(e => e.BillQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TF_PO_DETAIL>() + .Property(e => e.ShippedQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TF_PO_DETAIL>() + .Property(e => e.ReceivedQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TF_PO_DETAIL>() + .Property(e => e.Price) + .HasPrecision(19, 4); + + modelBuilder.Entity<TF_PO_DETAIL>() + .Property(e => e.PackQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TL_BASEDATA>() + .Property(e => e.LogType) + .IsUnicode(false); + + modelBuilder.Entity<TL_BASEDATA>() + .Property(e => e.DataType) + .IsUnicode(false); + + modelBuilder.Entity<TL_OPER>() + .Property(e => e.LogType) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.BarCode) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.FullBarCode) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.PartCode) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.VendPartCode) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.Batch) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.ProduceDate) + .HasPrecision(3); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.SerialNum) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.BillNum) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.VendId) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.PackQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TS_STOCK>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TS_UNI_API>() + .Property(e => e.Qty) + .HasPrecision(18, 5); + + modelBuilder.Entity<TS_UNI_API_HIS>() + .Property(e => e.Qty) + .HasPrecision(18, 5); + } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/ERP_ORDER.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/ERP_ORDER.cs new file mode 100644 index 0000000..b595431 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/ERP_ORDER.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + + public partial class ERP_ORDER + { + public int UID { get; set; } + public string ErpBillNum { get; set; } + public string VendId { get; set; } + public string ModType { get; set; } + public string Contacter { get; set; } + public string Site { get; set; } + public string Buyer { get; set; } + public string BuyerPhone { get; set; } + public string Address { get; set; } + public int State { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public System.Guid GUID { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/ERP_ORDER_DETAIL.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/ERP_ORDER_DETAIL.cs new file mode 100644 index 0000000..f812a83 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/ERP_ORDER_DETAIL.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + public partial class ERP_ORDER_DETAIL + { + public int UID { get; set; } + public string ErpBillNum { get; set; } + public int PoLine { get; set; } + public string PartCode { get; set; } + public decimal PartPrice { get; set; } + public Nullable<System.DateTime> BeginTime { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + public decimal PlanQty { get; set; } + public decimal ClosedQty { get; set; } + public string DockCode { get; set; } + public int State { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public System.Guid GUID { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/QadOrder.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/QadOrder.cs new file mode 100644 index 0000000..fa3b2b8 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/QadOrder.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public class QadOrder + { + [Key] + public decimal ID { get; set; } + + [StringLength(50)] + public string BillNo { get; set; } + + [StringLength(50)] + public string SupplierCode { get; set; } + + public DateTime StartDate { get; set; } + + public DateTime EndDate { get; set; } + + + [StringLength(50)] + public string Address { get; set; } + + + [StringLength(50)] + public string ProductCode { get; set; } + + + public decimal Qty { get; set; } + + + [StringLength(50)] + public string PartName { get; set; } + + + [StringLength(50)] + public string VendName { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_BILLTYPE.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_BILLTYPE.cs new file mode 100644 index 0000000..f4b17ce --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_BILLTYPE.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TA_BILLTYPE + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int BillType { get; set; } + + [Required] + [StringLength(50)] + public string TypeName { get; set; } + + [Required] + [StringLength(50)] + public string TypeDesc { get; set; } + + public int State { get; set; } + + [Required] + [StringLength(50)] + public string Prefix { get; set; } + + [Required] + [StringLength(500)] + public string BillNumRule { get; set; } + + public int LastNumber { get; set; } + + [StringLength(50)] + public string LastBillNum { get; set; } + + public DateTime LastBillTime { get; set; } + + [StringLength(500)] + public string PrintTemplateFileName { get; set; } + + [StringLength(500)] + public string ImportTemplateFileName { get; set; } + + [StringLength(50)] + public string Sep { get; set; } + + public int PaperOrientation { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_BillNoType.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_BillNoType.cs new file mode 100644 index 0000000..04fe0de --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_BillNoType.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public class TA_BillNoType + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int ID { get; set; } + + public int? sYear { get; set; } + public int? sMonth { get; set; } + public int? sDay { get; set; } + public int? sValue { get; set; } + + [StringLength(50)] + public string Prefix { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_CONFIG.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_CONFIG.cs new file mode 100644 index 0000000..e53cc7a --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_CONFIG.cs @@ -0,0 +1,24 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TA_CONFIG + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string ParamName { get; set; } + + [Required] + [StringLength(50)] + public string ParamValue { get; set; } + + public int State { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_FACTORY.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_FACTORY.cs new file mode 100644 index 0000000..f389670 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_FACTORY.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + public partial class TA_FACTORY + { + public int UID { get; set; } + public string FactoryId { get; set; } + public string FactoryName { get; set; } + public string ErpSite { get; set; } + public string ErpDomain { get; set; } + public string Address { get; set; } + public string ZipCode { get; set; } + public int State { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public Nullable<System.DateTime> UpdateTime { get; set; } + public string UpdateUser { get; set; } + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + public System.Guid GUID { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_Info.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_Info.cs new file mode 100644 index 0000000..c4d3c63 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_Info.cs @@ -0,0 +1,40 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class TA_Info + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int ID { get; set; } + + + [StringLength(50)] + public string FactoryCode { get; set; } + + [StringLength(50)] + public string InfoType { get; set; } + + + [StringLength(50)] + public string SupplierCode { get; set; } + + [StringLength(50)] + public string Title { get; set; } + + + public string Content { get; set; } + + public DateTime AddTime { get; set; } + + [StringLength(500)] + public string UserName { get; set; } + + [StringLength(50)] + public string Enable { get; set; } + + public DateTime ReadTime { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_LANGUAGE.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_LANGUAGE.cs new file mode 100644 index 0000000..4d63e94 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_LANGUAGE.cs @@ -0,0 +1,21 @@ + + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + public partial class TA_LANGUAGE + { + public int UID { get; set; } + public string GUID { get; set; } + public string CH { get; set; } + public string EN { get; set; } + public string RU { get; set; } + public string DE { get; set; } + public string FR { get; set; } + public string EL { get; set; } + public string AR { get; set; } + public string JP { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_PART.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_PART.cs new file mode 100644 index 0000000..4b4c81f --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_PART.cs @@ -0,0 +1,55 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TA_PART + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + [Key] + [StringLength(50)] + public string PartCode { get; set; } + + [Required] + [StringLength(50)] + public string ErpPartCode { get; set; } + +// [Required] + public string PartDesc1 { get; set; } + +// [Required] + public string PartDesc2 { get; set; } + +// [Required] + [StringLength(50)] + public string ProjectId { get; set; } + + [Required] + [StringLength(50)] + public string Unit { get; set; } + +// [Required] + [StringLength(50)] + public string PartGroup { get; set; } + + [Required] + [StringLength(10)] + public string State { get; set; } + + [StringLength(100)] + public string Configuration { get; set; } + + public int ValidityDays { get; set; } + + [StringLength(50)] + public string ReceivePort { get; set; } + + [StringLength(50)] + public string PalletSize { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_Part_User.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_Part_User.cs new file mode 100644 index 0000000..f9f40c4 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_Part_User.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Data.Entity; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public class TA_Part_User + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [StringLength(50)] + public string PartCode { get; set; } + + [StringLength(50)] + public string UserName { get; set; } + + [NotMapped] + [DisplayName("零件名称")] + public string PartName => ScpCache.GetPartDesc1(PartCode); + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_VENDER.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_VENDER.cs new file mode 100644 index 0000000..434f64a --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_VENDER.cs @@ -0,0 +1,62 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class TA_VENDER + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string VendId { get; set; } + + [Required] + [StringLength(50)] + public string VendName { get; set; } + + [Required] + [StringLength(2)] + public string VendAbbCode { get; set; } + + [StringLength(50)] + public string VendType { get; set; } + + [StringLength(50)] + public string Country { get; set; } + + [StringLength(50)] + public string City { get; set; } + + [StringLength(50)] + public string Currency { get; set; } + + [StringLength(200)] + public string Address { get; set; } + + [StringLength(50)] + public string ZipCode { get; set; } + + [StringLength(50)] + public string Contacter { get; set; } + + [StringLength(50)] + public string Phone { get; set; } + + [StringLength(50)] + public string Fax { get; set; } + + [StringLength(50)] + public string Email { get; set; } + + public int State { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + + + public decimal? Tax { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_VEND_PART.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_VEND_PART.cs new file mode 100644 index 0000000..2459c70 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_VEND_PART.cs @@ -0,0 +1,45 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TA_VEND_PART + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string VendId { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string PartCode { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string VendPartCode { get; set; } + + public decimal VendPackQty { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + public int State { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + + [NotMapped] + [DisplayName("Ӧ")] + public string VendName => ScpCache.GetVendName(VendId); + + [NotMapped] + [DisplayName("")] + public string PartName => ScpCache.GetVendName(PartCode); + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_VEND_USER.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_VEND_USER.cs new file mode 100644 index 0000000..ad2aa1e --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TA_VEND_USER.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public class TA_VEND_USER + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [StringLength(50)] + public string VendId { get; set; } + + [StringLength(50)] + public string UserName { get; set; } + + [NotMapped] + [DisplayName("供应商名称")] + public string VendName => ScpCache.GetVendName(VendId); + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_ASK.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_ASK.cs new file mode 100644 index 0000000..5903446 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_ASK.cs @@ -0,0 +1,32 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + public partial class TB_ASK + { + public int UID { get; set; } + public string AskBillNum { get; set; } + public string PoBillNum { get; set; } + public string VendId { get; set; } + public string Site { get; set; } + public int State { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public Nullable<System.DateTime> UpdateTime { get; set; } + public string UpdateUser { get; set; } + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + public System.Guid GUID { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_ASK_DETAIL.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_ASK_DETAIL.cs new file mode 100644 index 0000000..7e3fdb5 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_ASK_DETAIL.cs @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + public partial class TB_ASK_DETAIL + { + public int UID { get; set; } + public string AskBillNum { get; set; } + public string PoBillNum { get; set; } + public int PoLine { get; set; } + public string PartCode { get; set; } + public decimal AskQty { get; set; } + public decimal ShippedQty { get; set; } + public decimal ReceivedQty { get; set; } + public Nullable<System.DateTime> BeginTime { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + public string PoUnit { get; set; } + public string LocUnit { get; set; } + public decimal PackQty { get; set; } + public decimal UnConv { get; set; } + public string DockCode { get; set; } + public int State { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public Nullable<System.DateTime> UpdateTime { get; set; } + public string UpdateUser { get; set; } + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + public System.Guid GUID { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_ASN.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_ASN.cs new file mode 100644 index 0000000..41c3172 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_ASN.cs @@ -0,0 +1,41 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + + public partial class TB_ASN + { + public int UID { get; set; } + public string AsnBillNum { get; set; } + public string AskBillNum { get; set; } + public string PoBillNum { get; set; } + public string VendId { get; set; } + public string Site { get; set; } + public int State { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public Nullable<System.DateTime> UpdateTime { get; set; } + public string UpdateUser { get; set; } + public string UpdateInfo { get; set; } + public Nullable<System.DateTime> ShipTime { get; set; } + public string ShipUser { get; set; } + public Nullable<System.DateTime> ReceiveTime { get; set; } + public string ReceiveUser { get; set; } + public bool IsDeleted { get; set; } + public System.Guid GUID { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_ASN_DETAIL.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_ASN_DETAIL.cs new file mode 100644 index 0000000..d1da646 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_ASN_DETAIL.cs @@ -0,0 +1,41 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + public partial class TB_ASN_DETAIL + { + public int UID { get; set; } + public string AsnBillNum { get; set; } + public string PoBillNum { get; set; } + public int PoLine { get; set; } + public string PartCode { get; set; } + public string Batch { get; set; } + public Nullable<System.DateTime> ProduceDate { get; set; } + public string VendBatch { get; set; } + public decimal Qty { get; set; } + public string PoUnit { get; set; } + public string LocUnit { get; set; } + public decimal PackQty { get; set; } + public decimal UnConv { get; set; } + public string DockCode { get; set; } + public Nullable<int> State { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public Nullable<System.DateTime> UpdateTime { get; set; } + public string UpdateUser { get; set; } + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + public System.Guid GUID { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_INVOICE.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_INVOICE.cs new file mode 100644 index 0000000..c3bee9d --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_INVOICE.cs @@ -0,0 +1,38 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TB_INVOICE + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string BillNum { get; set; } + + public DateTime BillTime { get; set; } + + [StringLength(50)] + public string InvoiceNum { get; set; } + + [StringLength(50)] + public string ExpressNum { get; set; } + + + [StringLength(50)] + public string VendId { get; set; } + + + [StringLength(50)] + public string OperName { get; set; } + + public int State { get; set; } + + [StringLength(50)] + public string Remark { get; set; } + public string Tax { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_INVOICE_DETAIL.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_INVOICE_DETAIL.cs new file mode 100644 index 0000000..b1c44fb --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_INVOICE_DETAIL.cs @@ -0,0 +1,79 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TB_INVOICE_DETAIL + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string PoBillNum { get; set; } + + [Key] + [Column(Order = 2)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int PoLineNum { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string AsnBillNUm { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string PartCode { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(50)] + public string Batch { get; set; } + + [Column(TypeName = "date")] + public DateTime ProduceDate { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + [Column(TypeName = "money")] + public decimal Qty { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + [StringLength(50)] + public string LocUnit { get; set; } + + [Column(TypeName = "money")] + public decimal Price { get; set; } + + public decimal Tax { get; set; } + + public decimal TaxAmt { get; set; } + + [StringLength(50)] + public string Currency { get; set; } + + [Column(TypeName = "money")] + public decimal PackQty { get; set; } + + public int State { get; set; } + + [StringLength(50)] + public string ReceiveBillNum { get; set; } + + [StringLength(50)] + public string QadBillNo { get; set; } + + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_PLAN.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_PLAN.cs new file mode 100644 index 0000000..403221e --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_PLAN.cs @@ -0,0 +1,39 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + + public partial class TB_PLAN + { + public int UID { get; set; } + public string PlanId { get; set; } + public string PlanName { get; set; } + public string ErpPlanId { get; set; } + public string Version { get; set; } + public string VendId { get; set; } + public string Site { get; set; } + public int PlanType { get; set; } + public int State { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public Nullable<System.DateTime> UpdateTime { get; set; } + public string UpdateUser { get; set; } + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + public System.Guid GUID { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_PLAN_DETAIL.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_PLAN_DETAIL.cs new file mode 100644 index 0000000..a7cb14b --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_PLAN_DETAIL.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + public partial class TB_PLAN_DETAIL + { + public int UID { get; set; } + public string PlanId { get; set; } + public string PlanPieriod { get; set; } + public System.DateTime BeginDate { get; set; } + public System.DateTime EndDate { get; set; } + public string PartCode { get; set; } + public decimal Qty { get; set; } + public int State { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public Nullable<System.DateTime> UpdateTime { get; set; } + public string UpdateUser { get; set; } + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + public System.Guid GUID { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_PO.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_PO.cs new file mode 100644 index 0000000..cdad160 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_PO.cs @@ -0,0 +1,41 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + + public partial class TB_PO + { + + public int UID { get; set; } + public string PoBillNum { get; set; } + public string ErpBillNum { get; set; } + public string VendId { get; set; } + public Nullable<int> ModType { get; set; } + public string Contacter { get; set; } + public string Site { get; set; } + public string Buyer { get; set; } + public string BuyerPhone { get; set; } + public int State { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public Nullable<System.DateTime> UpdateTime { get; set; } + public string UpdateUser { get; set; } + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + public System.Guid GUID { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_PO_DETAIL.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_PO_DETAIL.cs new file mode 100644 index 0000000..0b3b126 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_PO_DETAIL.cs @@ -0,0 +1,48 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + + public partial class TB_PO_DETAIL + { + public int UID { get; set; } + public string PoBillNum { get; set; } + public int PoLine { get; set; } + public string PartCode { get; set; } + public decimal PlanQty { get; set; } + public decimal ShippedQty { get; set; } + public decimal ReceivedQty { get; set; } + public string RejectQty { get; set; } + public Nullable<System.DateTime> BeginTime { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + public string PoUnit { get; set; } + public string LocUnit { get; set; } + public decimal Price { get; set; } + public string Currency { get; set; } + public decimal PackQty { get; set; } + public decimal UnConv { get; set; } + public string DockCode { get; set; } + public int State { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public Nullable<System.DateTime> UpdateTime { get; set; } + public string UpdateUser { get; set; } + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + public System.Guid GUID { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_PlanMonth.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_PlanMonth.cs new file mode 100644 index 0000000..e3692c9 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_PlanMonth.cs @@ -0,0 +1,37 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class TB_PlanMonth + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int ID { get; set; } + + [StringLength(50)] + public string Code { get; set; } + + [StringLength(50)] + public string SupplierCode { get; set; } + + public DateTime AddTime { get; set; } + + public DateTime? SendTime { get; set; } + + + [StringLength(50)] + public string Name { get; set; } + + [StringLength(50)] + public string Ver { get; set; } + + public string FileName { get; set; } + + public string UserName { get; set; } + + public string IsSend { get; set; } + + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_PublicData.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_PublicData.cs new file mode 100644 index 0000000..d77945f --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_PublicData.cs @@ -0,0 +1,37 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class TB_PublicData + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int ID { get; set; } + + + [StringLength(50)] + public string Code { get; set; } + + [StringLength(50)] + public string Name { get; set; } + + + [StringLength(50)] + public string Ver { get; set; } + + [StringLength(50)] + public string FileName { get; set; } + + public DateTime AddTime { get; set; } + + [StringLength(500)] + public string UserName { get; set; } + + [NotMapped] + public string UploadUser { get; set; } + + + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_QadOrder.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_QadOrder.cs new file mode 100644 index 0000000..9831af3 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_QadOrder.cs @@ -0,0 +1,41 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class TB_QadOrder + { + [Key] + public decimal ID { get; set; } + + [StringLength(50)] + public string BillNo { get; set; } + + [StringLength(50)] + public string SupplierCode { get; set; } + + public DateTime StartDate { get; set; } + + public DateTime EndDate { get; set; } + + [NotMapped] + [StringLength(50)] + public string Address { get; set; } + + [NotMapped] + [StringLength(50)] + public string ProductCode { get; set; } + + [NotMapped] + public decimal Qty { get; set; } + + [NotMapped] + [StringLength(50)] + public string PartName { get; set; } + + [NotMapped] + [StringLength(50)] + public string VendName{ get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_QadOrderDetail.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_QadOrderDetail.cs new file mode 100644 index 0000000..e1f1df9 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_QadOrderDetail.cs @@ -0,0 +1,22 @@ +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.ScpEntity +{ + public class TB_QadOrderDetail + { + [Key] + public decimal ID { get; set; } + + [StringLength(50)] + public string BillNo { get; set; } + + [StringLength(50)] + public string ProductCode { get; set; } + + public decimal Price { get; set; } + + public decimal Qty { get; set; } + + public decimal Qtyed { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_RECEIVE.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_RECEIVE.cs new file mode 100644 index 0000000..ecd5474 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_RECEIVE.cs @@ -0,0 +1,53 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TB_RECEIVE + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string BillNum { get; set; } + + public int BillType { get; set; } + + public DateTime BillTime { get; set; } + + [Required] + [StringLength(50)] + public string PoBillNum { get; set; } + + [Required] + [StringLength(50)] + public string AsnBillNum { get; set; } + + [Required] + [StringLength(50)] + public string VendId { get; set; } + + [Required] + [StringLength(50)] + public string OperName { get; set; } + + public DateTime ShipTime { get; set; } + + public DateTime ReceiveTime { get; set; } + + public int State { get; set; } + + [StringLength(50)] + public string Remark { get; set; } + + [StringLength(50)] + public string QadBillNo { get; set; } + + [DisplayName("Ӧ")] + public string VendName => ScpCache.GetVendName(VendId); + + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_RECEIVE_DETAIL.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_RECEIVE_DETAIL.cs new file mode 100644 index 0000000..e39f317 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_RECEIVE_DETAIL.cs @@ -0,0 +1,76 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TB_RECEIVE_DETAIL + { + public string UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string BillNum { get; set; } + + // [Key] + // [Column(Order = 1)] + // [StringLength(50)] + // public string PoBillNum { get; set; } + [NotMapped] + public string PoBillNum => ScpCache.GetReceivePoBillNum(BillNum); + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int PoLineNum { get; set; } + + // [Key] + // [Column(Order = 3)] + // [StringLength(50)] + // public string AsnBillNum { get; set; } + [NotMapped] + public string AsnBillNum => ScpCache.GetReceiveAsnBillNum(BillNum); + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string PartCode { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(50)] + public string Batch { get; set; } + + [Column(TypeName = "date")] + public DateTime ProduceDate { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + + public decimal BillQty { get; set; } + + + public decimal ReceivedQty { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + [StringLength(50)] + public string LocUnit { get; set; } + + [Column(TypeName = "money")] + public decimal Price { get; set; } + + [StringLength(50)] + public string Currency { get; set; } + + public Int32 Qty => Convert.ToInt32(ReceivedQty) - Convert.ToInt32(BillQty); + + public int State { get; set; } + + [StringLength(50)] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_REJECT.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_REJECT.cs new file mode 100644 index 0000000..0e7b5c4 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_REJECT.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + public partial class TB_REJECT + { + public int UID { get; set; } + public string RjctBillNum { get; set; } + public string PoBillNum { get; set; } + public string AsnBillNum { get; set; } + public string Site { get; set; } + public string VendId { get; set; } + public System.DateTime ShipTime { get; set; } + public int State { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public bool IsDeleted { get; set; } + public System.Guid GUID { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_REJECT_DETAIL.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_REJECT_DETAIL.cs new file mode 100644 index 0000000..d29c71e --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_REJECT_DETAIL.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + public partial class TB_REJECT_DETAIL + { + public int UID { get; set; } + public string RjctBillNum { get; set; } + public string PoBillNum { get; set; } + public int PoLine { get; set; } + public string PartCode { get; set; } + public string Batch { get; set; } + public decimal Qty { get; set; } + public int State { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public bool IsDeleted { get; set; } + public System.Guid GUID { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_RETURN.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_RETURN.cs new file mode 100644 index 0000000..aff4448 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_RETURN.cs @@ -0,0 +1,45 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TB_RETURN + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string BillNum { get; set; } + + public int BillType { get; set; } + + public DateTime BillTime { get; set; } + + [Required] + [StringLength(50)] + public string PoBillNum { get; set; } + + [Required] + [StringLength(50)] + public string AsnBillNum { get; set; } + + [Required] + [StringLength(50)] + public string VendId { get; set; } + + [Required] + [StringLength(50)] + public string OperName { get; set; } + + public DateTime ShipTime { get; set; } + + public DateTime ReceiveTime { get; set; } + + public int State { get; set; } + + [StringLength(50)] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_RETURN_DETAIL.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_RETURN_DETAIL.cs new file mode 100644 index 0000000..225533d --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TB_RETURN_DETAIL.cs @@ -0,0 +1,71 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TB_RETURN_DETAIL + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string PoBillNum { get; set; } + + [Key] + [Column(Order = 2)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int PoLineNum { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string AsnBillNUm { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string PartCode { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(50)] + public string Batch { get; set; } + + [Column(TypeName = "date")] + public DateTime ProduceDate { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + [Column(TypeName = "money")] + public decimal BillQty { get; set; } + + [Column(TypeName = "money")] + public decimal ReceivedQty { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + [StringLength(50)] + public string LocUnit { get; set; } + + [Column(TypeName = "money")] + public decimal Price { get; set; } + + [StringLength(50)] + public string Currency { get; set; } + + [Column(TypeName = "money")] + public decimal PackQty { get; set; } + + public int State { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TF_ASN.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TF_ASN.cs new file mode 100644 index 0000000..cb7ce34 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TF_ASN.cs @@ -0,0 +1,49 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TF_ASN + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string BillNum { get; set; } + + public DateTime BillTime { get; set; } + + [Required] + [StringLength(50)] + public string PoBillNum { get; set; } + + [Required] + [StringLength(50)] + public string VendId { get; set; } + + + + [Required] + [StringLength(50)] + public string OperName { get; set; } + + public DateTime ShipTime { get; set; } + + public int State { get; set; } + + [StringLength(50)] + public string Remark { get; set; } + + public DateTime? ReceiveTime { get; set; } + + [StringLength(50)] + public string DeliveryAddress { get; set; } + + // [NotMapped] + // [DisplayName("Ӧ̱")] + // public string VendID => ScpCache.GetVendName(OperName); + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TF_ASN_DETAIL.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TF_ASN_DETAIL.cs new file mode 100644 index 0000000..f2a49b5 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TF_ASN_DETAIL.cs @@ -0,0 +1,62 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TF_ASN_DETAIL + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string PoBillNum { get; set; } + + [Key] + [Column(Order = 2)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int PoLineNum { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string PartCode { get; set; } + + [StringLength(50)] + public string Batch { get; set; } + + [Column(TypeName = "date")] + public DateTime ProduceDate { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + [Column(TypeName = "money")] + public decimal BillQty { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + [StringLength(50)] + public string LocUnit { get; set; } + + [Column(TypeName = "money")] + public decimal Price { get; set; } + + [StringLength(50)] + public string Currency { get; set; } + + [Column(TypeName = "money")] + public decimal PackQty { get; set; } + + public int State { get; set; } + public decimal? UmConv { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TF_PO.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TF_PO.cs new file mode 100644 index 0000000..0cc3d06 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TF_PO.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + + public partial class TF_PO + { + public int UID { get; set; } + [Key] + public string BillNum { get; set; } + public string VendId { get; set; } + public string OperName { get; set; } + public System.DateTime BillTime { get; set; } + public string ModType { get; set; } + public System.DateTime DueDate { get; set; } + public string Contacter { get; set; } + public string ShipToSite { get; set; } + public string Buyer { get; set; } + public string BuyerPhone { get; set; } + public int State { get; set; } + public string Remark { get; set; } + public string ErpBillNum { get; set; } + public string MonthBillNo { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TF_PO_DETAIL.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TF_PO_DETAIL.cs new file mode 100644 index 0000000..cdd3855 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TF_PO_DETAIL.cs @@ -0,0 +1,99 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TF_PO_DETAIL + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string BillNum { get; set; } + + public string ErpBillNum { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int ErpLineNum { get; set; } + + [Required] + [StringLength(50)] + public string PartCode { get; set; } + + [Column(TypeName = "money")] + public decimal BillQty { get; set; } + + [Column(TypeName = "money")] + public decimal ShippedQty { get; set; } + + [Column(TypeName = "money")] + public decimal ReceivedQty { get; set; } + + [Column(TypeName = "money")] + public decimal? RejectQty { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + [StringLength(50)] + public string LocUnit { get; set; } + + [Column(TypeName = "money")] + public decimal Price { get; set; } + + [StringLength(50)] + public string Currency { get; set; } + + [Column(TypeName = "date")] + public DateTime DueDate { get; set; } + + [Column(TypeName = "money")] + public decimal PackQty { get; set; } + + public int State { get; set; } + + [StringLength(200)] + public string Remark { get; set; } + + public decimal? UmConv { get; set; } + + [NotMapped] + [DisplayName("һ")] + public string PartDesc1 => ScpCache.GetPartDesc1(PartCode); + + + [NotMapped] + [DisplayName("")] + public decimal OpenQty => BillQty - ShippedQty; + + [NotMapped] + [DisplayName("")] + public decimal Qty1 => BillQty - ShippedQty; + [NotMapped] + [DisplayName("")] + public decimal Qty2 { get; set; } + + [NotMapped] + [DisplayName("")] + public decimal Qty3 { get; set; } + + + [NotMapped] + [DisplayName("")] + public string Batch1 { get; set; } + + [NotMapped] + [DisplayName("")] + public string Batch2 { get; set; } + + [NotMapped] + [DisplayName("")] + public string Batch3 { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TL_BASEDATA.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TL_BASEDATA.cs new file mode 100644 index 0000000..f8b8f15 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TL_BASEDATA.cs @@ -0,0 +1,36 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TL_BASEDATA + { + [Key] + public long UID { get; set; } + + [Required] + [StringLength(80)] + public string OperName { get; set; } + + public DateTime LogTime { get; set; } + + [Required] + [StringLength(50)] + public string LogType { get; set; } + + [Required] + [StringLength(50)] + public string DataType { get; set; } + + [Required] + [StringLength(4000)] + public string OldValue { get; set; } + + [Required] + [StringLength(4000)] + public string NewValue { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TL_BILL.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TL_BILL.cs new file mode 100644 index 0000000..dae515d --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TL_BILL.cs @@ -0,0 +1,29 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TL_BILL + { + [Key] + public long UID { get; set; } + + [Required] + [StringLength(80)] + public string OperName { get; set; } + + public DateTime LogTime { get; set; } + + [Required] + [StringLength(50)] + public string LogType { get; set; } + + [Required] + [StringLength(50)] + public string BillNum { get; set; } + + public int BillType { get; set; } + + public string Message { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TL_OPER.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TL_OPER.cs new file mode 100644 index 0000000..8aee705 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TL_OPER.cs @@ -0,0 +1,31 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TL_OPER + { + [Key] + public long UID { get; set; } + + [Required] + [StringLength(80)] + public string OperCode { get; set; } + + [Required] + [StringLength(50)] + public string OperName { get; set; } + + public DateTime LogTime { get; set; } + + [Required] + [StringLength(50)] + public string LogType { get; set; } + + [Required] + [StringLength(200)] + public string LogSite { get; set; } + + public string Message { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TL_USER.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TL_USER.cs new file mode 100644 index 0000000..a87e8dc --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TL_USER.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + public partial class TL_USER + { + public long UID { get; set; } + public string UserId { get; set; } + public string UserName { get; set; } + public System.DateTime LogTime { get; set; } + public string LogType { get; set; } + public string LogSite { get; set; } + public string Message { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TS_BARCODE.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TS_BARCODE.cs new file mode 100644 index 0000000..00bed23 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TS_BARCODE.cs @@ -0,0 +1,79 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TS_BARCODE + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + [Key] + [StringLength(50)] + public string BarCode { get; set; } + + [Required] + [StringLength(500)] + public string FullBarCode { get; set; } + + [Required] + [StringLength(50)] + public string PartCode { get; set; } + + [StringLength(50)] + public string VendPartCode { get; set; } + + [Required] + [StringLength(50)] + public string Batch { get; set; } + + [Column(TypeName = "datetime2")] + public DateTime ProduceDate { get; set; } + + public int ManageType { get; set; } + + [Required] + [StringLength(50)] + public string SerialNum { get; set; } + + [Column(TypeName = "money")] + public decimal Qty { get; set; } + + public int BarCodeType { get; set; } + + [Required] + [StringLength(50)] + public string BillNum { get; set; } + + public int PoBillLine { get; set; } + + [StringLength(50)] + public string VendId { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + [Column(TypeName = "money")] + public decimal PackQty { get; set; } + + [Required] + [StringLength(50)] + public string CreateOper { get; set; } + + public DateTime CreateTime { get; set; } + + public int State { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + + public string PoUnit { get; set; } + public string LocUnit { get; set; } + + [DisplayName("")] + public string PartName => ScpCache.GetPartDesc1(PartCode); + + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TS_INFO.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TS_INFO.cs new file mode 100644 index 0000000..3c69658 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TS_INFO.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + public partial class TS_INFO + { + public int UID { get; set; } + public string VendId { get; set; } + public string Site { get; set; } + public Nullable<int> InfoType { get; set; } + public string Title { get; set; } + public string Infomation { get; set; } + public string FileName { get; set; } + public Nullable<int> state { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public Nullable<System.DateTime> UpdateTIme { get; set; } + public string UpdateUser { get; set; } + public string UpdateInfo { get; set; } + public Nullable<bool> IsDeleted { get; set; } + public System.Guid GUID { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TS_STOCK.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TS_STOCK.cs new file mode 100644 index 0000000..afc03dd --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TS_STOCK.cs @@ -0,0 +1,53 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TS_STOCK + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string BarCode { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string LocCode { get; set; } + + [Required] + [StringLength(50)] + public string PartCode { get; set; } + + [Required] + [StringLength(50)] + public string Batch { get; set; } + + [Key] + [Column(Order = 2)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int State { get; set; } + + [StringLength(50)] + public string VendId { get; set; } + + [Column(TypeName = "money")] + public decimal Qty { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + [Column(TypeName = "date")] + public DateTime ReceiveDate { get; set; } + + [Column(TypeName = "date")] + public DateTime ProduceDate { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TS_UNI_API.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TS_UNI_API.cs new file mode 100644 index 0000000..3b4c91f --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TS_UNI_API.cs @@ -0,0 +1,124 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TS_UNI_API + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string InterfaceType { get; set; } + + [StringLength(50)] + public string TableName { get; set; } + + public int? BillType { get; set; } + + public int? SubBillType { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string BillNum { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string PartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string Batch { get; set; } + + public decimal Qty { get; set; } + + public int State { get; set; } + + [StringLength(50)] + public string CreateOper { get; set; } + + public DateTime CreateTime { get; set; } + + public DateTime PutTime { get; set; } + + [StringLength(50)] + public string VendId { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + [StringLength(50)] + public string LocUnit { get; set; } + + public DateTime ValidDate { get; set; } + + [StringLength(50)] + public string ErpBillNum { get; set; } + + public int ErpLineNum { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + [StringLength(50)] + public string SourceBillNum { get; set; } + + public decimal PackQty { get; set; } + public decimal Price { get; set; } + public string Barcode { get; set; } + public string Currency { get; set; } + public decimal UmConv { get; set; } + public string Attn { get; set; } + public string Buyer { get; set; } + public string BuyerPhone { get; set; } + public string ModType { get; set; } + public string Invoice { get; set; } + public decimal TaxAmt { get; set; } + public string Receiver { get; set; } + public decimal Tax { get; set; } + + + public TS_UNI_API_HIS ToHis() + { + return new TS_UNI_API_HIS + { + InterfaceType = InterfaceType, + TableName = TableName, + BillType = BillType, + SubBillType = SubBillType, + BillNum = BillNum, + PartCode = PartCode, + Batch = Batch, + Qty = Qty, + State = State, + CreateOper = CreateOper, + CreateTime = CreateTime, + PutTime = PutTime, + VendId = VendId, + PoUnit = PoUnit, + LocUnit = LocUnit, + ValidDate = ValidDate, + ErpBillNum = ErpBillNum, + ErpLineNum = ErpLineNum, + VendBatch = VendBatch, + SourceBillNum = SourceBillNum, + PackQty = PackQty, + Price = Price, + Barcode = Barcode, + Currency = Currency, + UmConv = UmConv, + Attn = Attn, + Buyer = Buyer, + BuyerPhone = BuyerPhone, + ModType = ModType, + Invoice = Invoice, + TaxAmt = TaxAmt, + Receiver = Receiver, + Taxt = Tax, + }; + } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TS_UNI_API_HIS.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TS_UNI_API_HIS.cs new file mode 100644 index 0000000..1d5a642 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TS_UNI_API_HIS.cs @@ -0,0 +1,89 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TS_UNI_API_HIS + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string InterfaceType { get; set; } + + [StringLength(50)] + public string TableName { get; set; } + + public int? BillType { get; set; } + + public int? SubBillType { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string BillNum { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string PartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string Batch { get; set; } + + public decimal Qty { get; set; } + + public int State { get; set; } + + [StringLength(50)] + public string CreateOper { get; set; } + + public DateTime CreateTime { get; set; } + + public DateTime PutTime { get; set; } + + [StringLength(50)] + public string VendId { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + [StringLength(50)] + public string LocUnit { get; set; } + + public DateTime ValidDate { get; set; } + + [StringLength(50)] + public string ErpBillNum { get; set; } + + public int ErpLineNum { get; set; } + + [StringLength(50)] + public string EqptCode { get; set; } + + [StringLength(50)] + public string EqptType { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + [StringLength(50)] + public string SourceBillNum { get; set; } + + public decimal PackQty { get; set; } + public decimal Price { get; set; } + public string Barcode { get; set; } + public string Currency { get; set; } + public decimal UmConv { get; set; } + public string Attn { get; set; } + public string Buyer { get; set; } + public string BuyerPhone { get; set; } + public string ModType { get; set; } + public string Invoice { get; set; } + public decimal TaxAmt { get; set; } + public string Receiver { get; set; } + public decimal Taxt { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TT_CURRENCY.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TT_CURRENCY.cs new file mode 100644 index 0000000..950097f --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TT_CURRENCY.cs @@ -0,0 +1,21 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TT_CURRENCY + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string Currency { get; set; } + + [StringLength(50)] + public string CurrencyDesc { get; set; } + + [StringLength(50)] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TT_PROJECT.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TT_PROJECT.cs new file mode 100644 index 0000000..9a59851 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TT_PROJECT.cs @@ -0,0 +1,22 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TT_PROJECT + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string ProjectId { get; set; } + + [Required] + [StringLength(50)] + public string ProjectName { get; set; } + + [StringLength(50)] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/TT_UNIT.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TT_UNIT.cs new file mode 100644 index 0000000..bfd8719 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/TT_UNIT.cs @@ -0,0 +1,18 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TT_UNIT + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string Unit { get; set; } + + [StringLength(200)] + public string Remak { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_BillInvoice.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_BillInvoice.cs new file mode 100644 index 0000000..f512da7 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_BillInvoice.cs @@ -0,0 +1,97 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_BillInvoice + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string BillNum { get; set; } + + public DateTime BillTime { get; set; } + + [StringLength(50)] + public string InvoiceNum { get; set; } + + [StringLength(50)] + public string ExpressNum { get; set; } + + [Required] + [StringLength(50)] + public string VendId { get; set; } + +// [Required] +// [StringLength(50)] +// public string OperName { get; set; } + + public int State { get; set; } + + [StringLength(50)] + public string Remark { get; set; } + + + +// +// [StringLength(50)] +// public string PoBillNum { get; set; } +// +// +// [Column(Order = 2)] +// [DatabaseGenerated(DatabaseGeneratedOption.None)] +// public int PoLineNum { get; set; } +// +// [Column(Order = 3)] +// [StringLength(50)] +// public string AsnBillNum { get; set; } + +// [Column(Order = 4)] +// [StringLength(50)] +// public string PartCode { get; set; } + +// [Column(Order = 5)] +// [StringLength(50)] +// public string Batch { get; set; } + +// [Column(TypeName = "date")] +// public DateTime ProduceDate { get; set; } + +// [StringLength(50)] +// public string VendBatch { get; set; } + +// [Column(TypeName = "money")] +// public decimal Qty { get; set; } + +// [StringLength(50)] +// public string PoUnit { get; set; } +// +// [StringLength(50)] +// public string LocUnit { get; set; } + +// [Column(TypeName = "money")] +// public decimal Price { get; set; } +// +// [StringLength(50)] +// public string Currency { get; set; } + +// [Column(TypeName = "money")] +// public decimal PackQty { get; set; } + + + [Required] + [StringLength(50)] + public string VendName { get; set; } + + [NotMapped] + [Column(TypeName = "Decmail")] + public string Amount { get; set; } + + [NotMapped] + [Column(TypeName = "money")] + public string Total { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_BillInvoiceDetail.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_BillInvoiceDetail.cs new file mode 100644 index 0000000..e0534c4 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_BillInvoiceDetail.cs @@ -0,0 +1,119 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_BillInvoiceDetail + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string BillNum { get; set; } + + [StringLength(50)] + public string PoBillNum { get; set; } + + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int PoLineNum { get; set; } + + [StringLength(50)] + public string AsnBillNUm { get; set; } + + [StringLength(50)] + public string PartCode { get; set; } + + [StringLength(50)] + public string Batch { get; set; } + + [Column(TypeName = "date")] + public DateTime ProduceDate { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + [Column(TypeName = "money")] + public decimal Qty { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + [StringLength(50)] + public string LocUnit { get; set; } + + [Column(TypeName = "money")] + public decimal Price { get; set; } + + [StringLength(50)] + public string Currency { get; set; } + + [Column(TypeName = "money")] + public decimal PackQty { get; set; } + + public int State { get; set; } + + + + + public DateTime BillTime { get; set; } + + [StringLength(50)] + public string InvoiceNum { get; set; } + + [StringLength(50)] + public string ExpressNum { get; set; } + + [Required] + [StringLength(50)] + public string VendId { get; set; } + + [Required] + [StringLength(50)] + public string OperName { get; set; } + + [StringLength(50)] + public string Remark { get; set; } + + [StringLength(50)] + public string CurrencyDesc { get; set; } + + [Required] + [StringLength(50)] + public string ErpPartCode { get; set; } + + [Required] + public string PartDesc1 { get; set; } + + [Required] + public string PartDesc2 { get; set; } + + [Required] + [StringLength(50)] + public string ProjectId { get; set; } + + [Required] + [StringLength(50)] + public string Unit { get; set; } + + [Required] + [StringLength(50)] + public string PartGroup { get; set; } + + + + [StringLength(100)] + public string Configuration { get; set; } + + public int? ValidityDays { get; set; } + + [StringLength(50)] + public string ReceivePort { get; set; } + + [StringLength(50)] + public string PalletSize { get; set; } + + + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_BillShip.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_BillShip.cs new file mode 100644 index 0000000..2a0db19 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_BillShip.cs @@ -0,0 +1,93 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_BillShip + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string Bill { get; set; } + + public DateTime BillTime { get; set; } + + [Required] + [StringLength(50)] + public string PoBillNum { get; set; } + + [Required] + [StringLength(50)] + public string VendId { get; set; } + + [Required] + [StringLength(50)] + public string OperName { get; set; } + + public DateTime ShipTime { get; set; } + + public int State { get; set; } + + [StringLength(50)] + public string Remark { get; set; } + + public DateTime? ReceiveTime { get; set; } + + [StringLength(50)] + public string ModType { get; set; } + + [Column(TypeName = "date")] + public DateTime? DueDate { get; set; } + + [StringLength(50)] + public string Contacter { get; set; } + + [StringLength(50)] + public string ShipToSite { get; set; } + + [StringLength(50)] + public string Buyer { get; set; } + + [StringLength(50)] + public string BuyerPhone { get; set; } + + + [Required] + [StringLength(50)] + public string VendName { get; set; } + + [Required] + [StringLength(2)] + public string VendAbbCode { get; set; } + + [StringLength(50)] + public string VendType { get; set; } + + [StringLength(50)] + public string Country { get; set; } + + [StringLength(50)] + public string City { get; set; } + + [StringLength(50)] + public string Currency { get; set; } + + [StringLength(200)] + public string Address { get; set; } + + [StringLength(50)] + public string ZipCode { get; set; } + + [StringLength(50)] + public string Phone { get; set; } + + [StringLength(50)] + public string Fax { get; set; } + + [StringLength(50)] + public string Email { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_BillShipDetail.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_BillShipDetail.cs new file mode 100644 index 0000000..9c6b10b --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_BillShipDetail.cs @@ -0,0 +1,132 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_BillShipDetail + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string BillNum { get; set; } + + + [StringLength(50)] + public string PoBillNum { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int PoLineNum { get; set; } + + [StringLength(50)] + public string PartCode { get; set; } + + + [StringLength(50)] + public string Batch { get; set; } + + [Column(TypeName = "date")] + public DateTime ProduceDate { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + [Column(TypeName = "money")] + public decimal BillQty { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + [StringLength(50)] + public string LocUnit { get; set; } + + [Column(TypeName = "money")] + public decimal Price { get; set; } + + [StringLength(50)] + public string Currency { get; set; } + + [Column(TypeName = "money")] + public decimal PackQty { get; set; } + + public int State { get; set; } + + + + public int? BillType { get; set; } + + public DateTime? BillTime { get; set; } + + + + [Required] + [StringLength(50)] + public string AsnBillNum { get; set; } + + [Required] + [StringLength(50)] + public string VendId { get; set; } + + [Required] + [StringLength(50)] + public string OperName { get; set; } + + public DateTime? ShipTime { get; set; } + + public DateTime? ReceiveTime { get; set; } + + [StringLength(50)] + public string Remark { get; set; } + + + [StringLength(50)] + public string AsnBillNUm { get; set; } + + + [Column(TypeName = "money")] + public decimal? ReceivedQty { get; set; } + + [Required] + [StringLength(50)] + public string ErpPartCode { get; set; } + + [Required] + public string PartDesc1 { get; set; } + + [Required] + public string PartDesc2 { get; set; } + + [Required] + [StringLength(50)] + public string ProjectId { get; set; } + + [Required] + [StringLength(50)] + public string Unit { get; set; } + + [Required] + [StringLength(50)] + public string PartGroup { get; set; } + + + + [StringLength(100)] + public string Configuration { get; set; } + + public int? ValidityDays { get; set; } + + [StringLength(50)] + public string ReceivePort { get; set; } + + [StringLength(50)] + public string PalletSize { get; set; } + + //收货数量 + [Column(TypeName = "money")] + public decimal? Expr15 { get; set; } + + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_Info.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_Info.cs new file mode 100644 index 0000000..75cfed5 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_Info.cs @@ -0,0 +1,47 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_Info + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int ID { get; set; } + + + [StringLength(50)] + public string FactoryCode { get; set; } + + [StringLength(50)] + public string InfoType { get; set; } + + + [StringLength(50)] + public string FactoryName { get; set; } + + [StringLength(50)] + public string SupplierCode { get; set; } + + + [StringLength(50)] + public string VendName { get; set; } + + [StringLength(50)] + public string Title { get; set; } + + + public string Content { get; set; } + + public DateTime AddTime { get; set; } + + [StringLength(500)] + public string UserName { get; set; } + + [StringLength(50)] + public string Enable { get; set; } + + public DateTime ReadTime { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_POAll.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_POAll.cs new file mode 100644 index 0000000..cece276 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_POAll.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_POAll + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string BillNum { get; set; } + + [Required] + [StringLength(50)] + public string VendId { get; set; } + + [Required] + [StringLength(50)] + public string OperName { get; set; } + + public DateTime BillTime { get; set; } + + [StringLength(50)] + public string ModType { get; set; } + + [Column(TypeName = "date")] + public DateTime? DueDate { get; set; } + + [StringLength(50)] + public string ShipToSite { get; set; } + + [StringLength(50)] + public string Buyer { get; set; } + + [StringLength(50)] + public string BuyerPhone { get; set; } + + public int State { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + + [Required] + [StringLength(50)] + public string VendName { get; set; } + + [NotMapped] + [StringLength(50)] + public string SumOver { get; set; } + + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_POAllDetail.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_POAllDetail.cs new file mode 100644 index 0000000..298b76c --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_POAllDetail.cs @@ -0,0 +1,125 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_POAllDetail + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int LineNum { get; set; } + + [Required] + [StringLength(50)] + public string PartCode { get; set; } + + [Column(TypeName = "money")] + public decimal BillQty { get; set; } + + [Column(TypeName = "money")] + public decimal ShippedQty { get; set; } + + [Column(TypeName = "money")] + public decimal ReceivedQty { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + [StringLength(50)] + public string LocUnit { get; set; } + + [Column(TypeName = "money")] + public decimal Price { get; set; } + + [StringLength(50)] + public string Currency { get; set; } + + [Column(TypeName = "date")] + public DateTime? DueDate { get; set; } + + [Column(TypeName = "money")] + public decimal PackQty { get; set; } + + public int State { get; set; } + + [StringLength(200)] + public string Remark { get; set; } + + [Required] + [StringLength(50)] + public string ErpPartCode { get; set; } + + [Required] + public string PartDesc1 { get; set; } + + [Required] + public string PartDesc2 { get; set; } + + [Required] + [StringLength(50)] + public string ProjectId { get; set; } + + [Required] + [StringLength(50)] + public string Unit { get; set; } + + [Required] + [StringLength(50)] + public string PartGroup { get; set; } + + + [StringLength(100)] + public string Configuration { get; set; } + + public int? ValidityDays { get; set; } + + [StringLength(50)] + public string ReceivePort { get; set; } + + [StringLength(50)] + public string PalletSize { get; set; } + + + [Required] + [StringLength(50)] + public string VendId { get; set; } + + [Required] + [StringLength(50)] + public string OperName { get; set; } + + public DateTime BillTime { get; set; } + + [StringLength(50)] + public string ModType { get; set; } + + + [StringLength(50)] + public string Contacter { get; set; } + + [StringLength(50)] + public string ShipToSite { get; set; } + + [StringLength(50)] + public string Buyer { get; set; } + + [StringLength(50)] + public string BuyerPhone { get; set; } + + [StringLength(50)] + public string CurrencyDesc { get; set; } + + [StringLength(50)] + public string VendName { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_POReport.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_POReport.cs new file mode 100644 index 0000000..7f3dea3 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_POReport.cs @@ -0,0 +1,54 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_POReport + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int LineNum { get; set; } + + [Required] + [StringLength(50)] + public string PartCode { get; set; } + + + public decimal PlanQty { get; set; } + + + public decimal ShipQty { get; set; } + + + public decimal ReceiveQty { get; set; } + + + public decimal? RejectQty { get; set; } + + + public decimal OpenQty { get; set; } + + [Required] + [StringLength(50)] + public string OperName { get; set; } + + public DateTime BillTime { get; set; } + + [StringLength(50)] + public string VendName { get; set; } + + [StringLength(50)] + public string PartDesc1 { get; set; } + + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_PlanMonth.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_PlanMonth.cs new file mode 100644 index 0000000..e158ae2 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_PlanMonth.cs @@ -0,0 +1,37 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_PlanMonth + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int ID { get; set; } + + [StringLength(50)] + public string Code { get; set; } + + [StringLength(50)] + public string SupplierCode { get; set; } + + public DateTime AddTime { get; set; } + + public DateTime? SendTime { get; set; } + + [StringLength(50)] + public string Name { get; set; } + + [StringLength(50)] + public string Ver { get; set; } + + public string FileName { get; set; } + + public string UserName { get; set; } + + public string IsSend { get; set; } + + public string VendName { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_QadOrder.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_QadOrder.cs new file mode 100644 index 0000000..dc28c13 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_QadOrder.cs @@ -0,0 +1,39 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_QadOrder + { + [Key] + public decimal ID { get; set; } + + [StringLength(50)] + public string BillNo { get; set; } + + [StringLength(50)] + public string SupplierCode { get; set; } + + public DateTime StartDate { get; set; } + + public DateTime? EndDate { get; set; } + + + [StringLength(50)] + public string Address { get; set; } + + [StringLength(50)] + public string ProductCode { get; set; } + + public decimal Price { get; set; } + + public decimal Qty { get; set; } + + public decimal Qtyed { get; set; } + + public string PartName { get; set; } + + public string VendName { get; set; } + + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_Receive.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_Receive.cs new file mode 100644 index 0000000..232004f --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_Receive.cs @@ -0,0 +1,53 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_Receive + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string BillNum { get; set; } + + public int BillType { get; set; } + + public DateTime BillTime { get; set; } + + [Required] + [StringLength(50)] + public string PoBillNum { get; set; } + + [Required] + [StringLength(50)] + public string AsnBillNum { get; set; } + + [Required] + [StringLength(50)] + public string VendId { get; set; } + + [Required] + [StringLength(50)] + public string OperName { get; set; } + + public DateTime ShipTime { get; set; } + + public DateTime ReceiveTime { get; set; } + + public int State { get; set; } + + [StringLength(50)] + public string Remark { get; set; } + [StringLength(50)] + public string QadBillNo { get; set; } + + [Required] + [StringLength(50)] + public string VendName { get; set; } + + } + +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_ReceiveDetail.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_ReceiveDetail.cs new file mode 100644 index 0000000..b4d9690 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_ReceiveDetail.cs @@ -0,0 +1,90 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_ReceiveDetail + { + + public string UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string BillNum { get; set; } + + // [Key] + // [Column(Order = 1)] + [StringLength(50)] + public string PoBillNum { get; set; } + // + // [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int PoLineNum { get; set; } + + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string PartCode { get; set; } + + + [StringLength(50)] + public string Batch { get; set; } + + [Column(TypeName = "date")] + public DateTime ProduceDate { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + + public decimal BillQty { get; set; } + + + public decimal ReceivedQty { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + [StringLength(50)] + public string LocUnit { get; set; } + + [Column(TypeName = "money")] + public decimal Price { get; set; } + + [StringLength(50)] + public string Currency { get; set; } + + [Column(TypeName = "money")] + public decimal PackQty { get; set; } + + public int State { get; set; } + + + public int BillType { get; set; } + + [Required] + [StringLength(50)] + public string AsnBillNum { get; set; } + + [Required] + [StringLength(50)] + public string VendId { get; set; } + + + public DateTime ReceiveTime { get; set; } + + public Int32 Qty => Convert.ToInt32(ReceivedQty) - Convert.ToInt32(BillQty); + + + [Required] + public string PartDesc1 { get; set; } + + [StringLength(50)] + public string Remark { get; set; } + + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_ReportReceive.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_ReportReceive.cs new file mode 100644 index 0000000..5782b1d --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_ReportReceive.cs @@ -0,0 +1,92 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_ReceiveReport + { + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string BillNum { get; set; } + + [StringLength(50)] + public string PoBillNum { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int PoLineNum { get; set; } + + [StringLength(50)] + public string PartCode { get; set; } + + + [StringLength(50)] + public string Batch { get; set; } + + [Column(TypeName = "date")] + public DateTime ProduceDate { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + [Column(TypeName = "money")] + public decimal BillQty { get; set; } + + [Column(TypeName = "money")] + public decimal ReceivedQty { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + [StringLength(50)] + public string LocUnit { get; set; } + + [Column(TypeName = "money")] + public decimal Price { get; set; } + + [StringLength(50)] + public string Currency { get; set; } + + [Column(TypeName = "money")] + public decimal PackQty { get; set; } + + public int State { get; set; } + + + public int BillType { get; set; } + + public DateTime BillTime { get; set; } + + + + [Required] + [StringLength(50)] + public string AsnBillNum { get; set; } + + [Required] + [StringLength(50)] + public string VendId { get; set; } + + [Required] + [StringLength(50)] + public string OperName { get; set; } + + public DateTime ShipTime { get; set; } + + public DateTime ReceiveTime { get; set; } + + + [StringLength(50)] + public string Remark { get; set; } + + + [StringLength(50)] + public string VendName { get; set; } + + [StringLength(50)] + public string PartDesc1 { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_Stock.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_Stock.cs new file mode 100644 index 0000000..5da7349 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_Stock.cs @@ -0,0 +1,54 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_Stock + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string BarCode { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(500)] + public string LocCode { get; set; } + + [Required] + [StringLength(50)] + public string PartCode { get; set; } + + [StringLength(50)] + public string VendId { get; set; } + + [Required] + [StringLength(50)] + public string Batch { get; set; } + + [Column(TypeName = "datetime2")] + public DateTime ProduceDate { get; set; } + + [Column(TypeName = "datetime2")] + public DateTime ReceiveDate { get; set; } + + [Required] + public decimal Qty { get; set; } + + [Key] + [Column(Order = 2)] + public int state { get; set; } + + [Required] + [StringLength(50)] + public string Remark { get; set; } + + [Required] + [StringLength(50)] + public string PartDesc1 { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_TB_ASK.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_TB_ASK.cs new file mode 100644 index 0000000..fa7dd69 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_TB_ASK.cs @@ -0,0 +1,39 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + + public partial class V_TB_ASK + { + public int UID { get; set; } + public string PoBillNum { get; set; } + public string AskBillNum { get; set; } + public string VendId { get; set; } + public string Site { get; set; } + public string Buyer { get; set; } + public string BuyerPhone { get; set; } + public int State { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public Nullable<System.DateTime> UpdateTime { get; set; } + public string UpdateUser { get; set; } + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + public System.Guid GUID { get; set; } + public string VendName { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_TB_ASK_DETAIL.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_TB_ASK_DETAIL.cs new file mode 100644 index 0000000..572e1f7 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_TB_ASK_DETAIL.cs @@ -0,0 +1,52 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + + public partial class V_TB_ASK_DETAIL + { + public int UID { get; set; } + public string PoBillNum { get; set; } + public int PoLine { get; set; } + public string PartCode { get; set; } + public decimal ShippedQty { get; set; } + public decimal ReceivedQty { get; set; } + public Nullable<System.DateTime> BeginTime { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + public string PoUnit { get; set; } + public string LocUnit { get; set; } + public decimal Price { get; set; } + public string Currency { get; set; } + public decimal PackQty { get; set; } + public decimal UnConv { get; set; } + public string DockCode { get; set; } + public int State { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public Nullable<System.DateTime> UpdateTime { get; set; } + public string UpdateUser { get; set; } + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + public System.Guid GUID { get; set; } + public string PartDesc1 { get; set; } + public string CurrencyDesc { get; set; } + public string Site { get; set; } + public string VendName { get; set; } + public string PartDesc2 { get; set; } + public string AskBillNum { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_TB_ASN.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_TB_ASN.cs new file mode 100644 index 0000000..e4cbff7 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_TB_ASN.cs @@ -0,0 +1,47 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + + public partial class V_TB_ASN + { + public int UID { get; set; } + public string AsnBillNum { get; set; } + public string AskBillNum { get; set; } + public string PoBillNum { get; set; } + public string VendId { get; set; } + public int State { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public Nullable<System.DateTime> UpdateTime { get; set; } + public string UpdateUser { get; set; } + public string UpdateInfo { get; set; } + public Nullable<System.DateTime> ShipTime { get; set; } + public string ShipUser { get; set; } + public Nullable<System.DateTime> ReceiveTime { get; set; } + public string ReceiveUser { get; set; } + public bool IsDeleted { get; set; } + public System.Guid GUID { get; set; } + public string ErpBillNum { get; set; } + public Nullable<int> ModType { get; set; } + public string Contacter { get; set; } + public string Buyer { get; set; } + public string BuyerPhone { get; set; } + public string VendName { get; set; } + public string Site { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_TB_ASN_DETAIL.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_TB_ASN_DETAIL.cs new file mode 100644 index 0000000..0c39cfe --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_TB_ASN_DETAIL.cs @@ -0,0 +1,45 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + + public partial class V_TB_ASN_DETAIL + { + public int UID { get; set; } + public string AsnBillNum { get; set; } + public string PoBillNum { get; set; } + public int PoLine { get; set; } + public string PartCode { get; set; } + public string Batch { get; set; } + public Nullable<System.DateTime> ProduceDate { get; set; } + public string VendBatch { get; set; } + public decimal Qty { get; set; } + public string PoUnit { get; set; } + public string LocUnit { get; set; } + public decimal PackQty { get; set; } + public decimal UnConv { get; set; } + public string DockCode { get; set; } + public Nullable<int> State { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public Nullable<System.DateTime> UpdateTime { get; set; } + public string UpdateUser { get; set; } + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + public System.Guid GUID { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_TB_PO.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_TB_PO.cs new file mode 100644 index 0000000..b8059e8 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_TB_PO.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + public partial class V_TB_PO + { + public int UID { get; set; } + public string PoBillNum { get; set; } + public string ErpBillNum { get; set; } + public string VendId { get; set; } + public Nullable<int> ModType { get; set; } + public string Contacter { get; set; } + public string Site { get; set; } + public string Buyer { get; set; } + public string BuyerPhone { get; set; } + public int State { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public Nullable<System.DateTime> UpdateTime { get; set; } + public string UpdateUser { get; set; } + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + public System.Guid GUID { get; set; } + public string VendName { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_TB_PO_DETAIL.cs b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_TB_PO_DETAIL.cs new file mode 100644 index 0000000..778108d --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/ScpEntity/V_TB_PO_DETAIL.cs @@ -0,0 +1,57 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class V_TB_PO_DETAIL + { + public int UID { get; set; } + public string PoBillNum { get; set; } + public int PoLine { get; set; } + public string PartCode { get; set; } + public decimal PlanQty { get; set; } + public decimal ShippedQty { get; set; } + public decimal ReceivedQty { get; set; } + public string RejectQty { get; set; } + public Nullable<System.DateTime> BeginTime { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + public string PoUnit { get; set; } + public string LocUnit { get; set; } + public decimal Price { get; set; } + public string Currency { get; set; } + public decimal PackQty { get; set; } + public decimal UnConv { get; set; } + public string DockCode { get; set; } + public int State { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public Nullable<System.DateTime> UpdateTime { get; set; } + public string UpdateUser { get; set; } + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + public System.Guid GUID { get; set; } + public string PartDesc1 { get; set; } + public string CurrencyDesc { get; set; } + public string ErpBillNum { get; set; } + public Nullable<int> ModType { get; set; } + public string Contacter { get; set; } + public string Site { get; set; } + public string Buyer { get; set; } + public string BuyerPhone { get; set; } + public string VendName { get; set; } + public string PartDesc2 { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/IControlTable.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/IControlTable.cs new file mode 100644 index 0000000..b9b18d0 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/IControlTable.cs @@ -0,0 +1,10 @@ +namespace CK.SCP.Models.UniApiEntity +{ + public interface IControlTable:ITable + { + string TableName { get; set; } + int RowCount { get; set; } + + } + +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/IDataTable.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/IDataTable.cs new file mode 100644 index 0000000..b8f078e --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/IDataTable.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; + +namespace CK.SCP.Models.UniApiEntity +{ + public interface IDataTable:ITable + { + + DateTime? CreateTime { get; set; } + string CreateUser { get; set; } + DateTime? UpdateTime { get; set; } + string UpdateUser { get; set; } + + } + + public interface IInterfaceGetNew + { + List<IControlTable> GetNewCtrlList(UniApiEntities db); + } + + public interface IInterfaceRead + { + + ITable Read(UniApiEntities db, string seq); + List<ITable> ListRead(UniApiEntities db, string seq); + } + + public interface IInterfaceWrite + { + int Write(UniApiEntities db); + int ListWrite(UniApiEntities db, List<ITable> dataList); + } + + +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/ITable.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/ITable.cs new file mode 100644 index 0000000..6a3c082 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/ITable.cs @@ -0,0 +1,14 @@ +namespace CK.SCP.Models.UniApiEntity +{ + public interface ITable + { + int UID { get; set; } + string Seq { get; set; } + + string QadRead { get; set; } + string WmsRead { get; set; } + string ScmRead { get; set; } + string MesRead { get; set; } + string Remark { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/QadTableName.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/QadTableName.cs new file mode 100644 index 0000000..024e692 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/QadTableName.cs @@ -0,0 +1,78 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.UniApiEntity +{ + public enum QadTableName + { + [Description("物料信息")] + xxqad_pt_mstr, + [Description("供应商信息")] + xxqad_vd_mstr, + [Description("客户信息")] + xxqad_cm_mstr, + [Description("供应商物料信息")] + xxqad_vp_mstr, + [Description("客户物料物料信息")] + xxqad_sche_mstr, + [Description("采购价格信息")] + xxqad_pprice_det, + [Description("销售价格信息")] + xxqad_sprice_det, + [Description("采购订单信息")] + xxqad_pod_det, + [Description("销售订单信息")] + xxqad_sod_det, + [Description("库位信息")] + xxqad_loc_det, + [Description("实时库存明细信息")] + xxqad_ld_det, + [Description("BOM信息")] + xxqad_ps_mstr, + [Description("标准成本信息")] + xxqad_sct_det, + [Description("生产线零件信息")] + xxqad_line_mstr, + [Description("????信息")] + xxqad_repsch_det, + [Description("收货单信息")] + xxqad_prh_det + } + + public enum ScmTableName + { + [Description("采购订单")] + xxscm_pod_det, + [Description("发货单(ASN)")] + xxscm_tx_mstr, + [Description("发货单标签列表")] + xxscm_tx_det, + [Description("发票")] + xxscm_inv_det, + } + + public enum WmsTableName + { + [Description("采购收货")] + xxwms_rc_det, + [Description("采购退货")] + xxwms_rt_det, + [Description("库存明细")] + xxwms_ld_det, + [Description("库存转移")] + xxwms_tr_det, + [Description("生产回冲")] + xxwms_bk_mstr, + [Description("其它出库")] + xxwms_iss_det, + [Description("其它入库")] + xxwms_rct_det, + [Description("销售结算")] + xxwms_soiss_det, + [Description("盘点调整")] + xxwms_tag_det, + [Description("接口")]//TODO 回头需要改成中间库的表名 + TS_UNI_API, + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/UniApiEntities.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/UniApiEntities.cs new file mode 100644 index 0000000..89366a7 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/UniApiEntities.cs @@ -0,0 +1,2162 @@ +using System.Data.Entity; + +namespace CK.SCP.Models.UniApiEntity +{ + [DbConfigurationType(typeof(SqlDbConfiguration))] + public partial class UniApiEntities : DbContext + { + public UniApiEntities(string strConn) + : base(strConn) + { + } + public UniApiEntities() + : base("name=ModelUniApi") + { + } + + public virtual DbSet<xxmes_ctrl> xxmes_ctrl { get; set; } + public virtual DbSet<xxqad_cm_mstr> xxqad_cm_mstr { get; set; } + public virtual DbSet<xxqad_ctrl> xxqad_ctrl { get; set; } + public virtual DbSet<xxqad_ld_det> xxqad_ld_det { get; set; } + public virtual DbSet<xxqad_loc_det> xxqad_loc_det { get; set; } + public virtual DbSet<xxqad_pod_det> xxqad_pod_det { get; set; } + public virtual DbSet<xxqad_pprice_det> xxqad_pprice_det { get; set; } + public virtual DbSet<xxqad_prh_det> xxqad_prh_det { get; set; } + public virtual DbSet<xxqad_ps_mstr> xxqad_ps_mstr { get; set; } + public virtual DbSet<xxqad_pt_mstr> xxqad_pt_mstr { get; set; } + public virtual DbSet<xxqad_sche_mstr> xxqad_sche_mstr { get; set; } + public virtual DbSet<xxqad_sct_det> xxqad_sct_det { get; set; } + public virtual DbSet<xxqad_sod_det> xxqad_sod_det { get; set; } + public virtual DbSet<xxqad_sprice_det> xxqad_sprice_det { get; set; } + public virtual DbSet<xxqad_vd_mstr> xxqad_vd_mstr { get; set; } + public virtual DbSet<xxqad_vp_mstr> xxqad_vp_mstr { get; set; } + public virtual DbSet<xxscm_ctrl> xxscm_ctrl { get; set; } + public virtual DbSet<xxscm_inv_det> xxscm_inv_det { get; set; } + public virtual DbSet<xxscm_pod_det> xxscm_pod_det { get; set; } + public virtual DbSet<xxscm_tx_det> xxscm_tx_det { get; set; } + public virtual DbSet<xxscm_tx_mstr> xxscm_tx_mstr { get; set; } + public virtual DbSet<xxwms_bk_mstr> xxwms_bk_mstr { get; set; } + public virtual DbSet<xxwms_ctrl> xxwms_ctrl { get; set; } + public virtual DbSet<xxwms_iss_det> xxwms_iss_det { get; set; } + public virtual DbSet<xxwms_ld_det> xxwms_ld_det { get; set; } + public virtual DbSet<xxwms_rc_det> xxwms_rc_det { get; set; } + public virtual DbSet<xxwms_rct_det> xxwms_rct_det { get; set; } + public virtual DbSet<xxwms_rt_det> xxwms_rt_det { get; set; } + public virtual DbSet<xxwms_soiss_det> xxwms_soiss_det { get; set; } + public virtual DbSet<xxwms_tag_det> xxwms_tag_det { get; set; } + public virtual DbSet<xxwms_tr_det> xxwms_tr_det { get; set; } + + protected override void OnModelCreating(DbModelBuilder modelBuilder) + { + modelBuilder.Entity<xxmes_ctrl>() + .Property(e => e.xxmes_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxmes_ctrl>() + .Property(e => e.xxmes_table) + .IsUnicode(false); + + modelBuilder.Entity<xxmes_ctrl>() + .Property(e => e.xxmes_qad) + .IsUnicode(false); + + modelBuilder.Entity<xxmes_ctrl>() + .Property(e => e.xxmes_mes) + .IsUnicode(false); + + modelBuilder.Entity<xxmes_ctrl>() + .Property(e => e.xxmes_scm) + .IsUnicode(false); + + modelBuilder.Entity<xxmes_ctrl>() + .Property(e => e.xxmes_wms) + .IsUnicode(false); + + modelBuilder.Entity<xxmes_ctrl>() + .Property(e => e.xxmes_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_addr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_name) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_line1) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_line2) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_line3) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_country) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_city) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_phone) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_fax) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_pst_id) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_attn) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_curr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_promo) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ctrl>() + .Property(e => e.xxqad_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ctrl>() + .Property(e => e.xxqad_table) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ctrl>() + .Property(e => e.xxqad_qad) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ctrl>() + .Property(e => e.xxqad_mes) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ctrl>() + .Property(e => e.xxqad_scm) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ctrl>() + .Property(e => e.xxqad_wms) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ctrl>() + .Property(e => e.xxqad_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_site) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_lot) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_qty) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_um) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_site) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_desc) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_type) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_modtype) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_site) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_desc) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_qty_ord) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_qty_rct) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_qty_std) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_price) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_curr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_loc_um) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_um) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_um_conv) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_vend) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_name) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_attn) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_ship) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_made) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_buyer) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_buyer_phone) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_status) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_list) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_curr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_um) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_amt) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_receiver) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_psnbr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_trtype) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_po_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_qty_rcvd) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_qty_ord) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_pur_cost) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_curr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_curr_amt) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_site) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_vend) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_ware_class) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_ware) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_po_um) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_loc_um) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_conv) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_lot) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_vend_batch) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_comp) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_ref) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_qty_per) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_ps_code) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_rmks1) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_site) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_um) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_desc1) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_desc2) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_dsgn_grp) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_promo) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_part_type) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_group) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_prod_line) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_status) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_custpart) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_cust) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_name) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_desc) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_comment) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_site) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_ref) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_cst_tot) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_order) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_cust) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_desc) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_price) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_shipto) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_um) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_site) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_pllist) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_qty_std) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_list) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_curr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_um) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_amt) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_addr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_name) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_line1) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_line2) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_line3) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_country) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_city) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_phone) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_fax) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_pst_id) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_attn) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_curr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_promo) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_type) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_addr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_vend_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_site) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_comment) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_ctrl>() + .Property(e => e.xxscm_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_ctrl>() + .Property(e => e.xxscm_table) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_ctrl>() + .Property(e => e.xxscm_qad) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_ctrl>() + .Property(e => e.xxscm_mes) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_ctrl>() + .Property(e => e.xxscm_scm) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_ctrl>() + .Property(e => e.xxscm_wms) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_ctrl>() + .Property(e => e.xxscm_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_vend) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_invoice) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_curr) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_order) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_line) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_receiver) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_asn) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_part) + .IsUnicode(false); + + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_modtype) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_site) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_part) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_desc) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_qty_ord) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_qty_rct) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_qty_std) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_price) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_curr) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_loc_um) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_um) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_um_conv) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_vend) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_name) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_attn) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_ship) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_made) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_buyer) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_buyer_phone) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_status) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_boxcode) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_vend) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_part) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_batch) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_qty_real) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_po_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_po_line) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_part) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_qty_total) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_qty_std) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_site) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_vend) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_ware_class) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_ware) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_pprice) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_po_um) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_loc_um) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_conv) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_type) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_vend_batch) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_status) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_part) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_site) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_line) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_lot) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_qty) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_um) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ctrl>() + .Property(e => e.xxwms_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ctrl>() + .Property(e => e.xxwms_table) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ctrl>() + .Property(e => e.xxwms_qad) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ctrl>() + .Property(e => e.xxwms_mes) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ctrl>() + .Property(e => e.xxwms_scm) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ctrl>() + .Property(e => e.xxwms_wms) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ctrl>() + .Property(e => e.xxwms_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_site) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_part) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_lot) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_qty) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_um) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_reason) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_site) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_part) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_vend) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_lot) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_vend_batch) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_qty) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_um) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_ps_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_po_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_part) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_qty_total) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_site) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_vend) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_ware_class) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_ware) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_po_um) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_loc_um) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_conv) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_lot) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_vend_batch) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_site) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_part) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_lot) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_qty) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_um) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_reason) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_po_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_part) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_qty_total) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_site) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_vend) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_ware_class) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_ware) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_po_um) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_loc_um) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_conv) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_lot) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_vend_batch) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_order) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_part) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_qty) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_lot) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_site) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_part) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_lot) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_var_qty) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_site) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_site) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_part) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_lot) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_qty) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_loc1) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_loc2) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_um) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_updateur) + .IsUnicode(false); + + } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/UniInterfaceExtention.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/UniInterfaceExtention.cs new file mode 100644 index 0000000..e72f8bc --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/UniInterfaceExtention.cs @@ -0,0 +1,729 @@ +namespace CK.SCP.Models.UniApiEntity +{ + /* + /// <summary> + /// WMS系统控制主表 + /// </summary> + public partial class xxwms_ctrl : IControlTable + { + [NotMapped] public int UID { get { return xxwms_uid; } set { xxwms_uid = value; } } + [NotMapped] public string Seq { get { return xxwms_seq; } set { xxwms_seq = value; } } + [NotMapped] public string TableName { get { return xxwms_table; } set { xxwms_table = value; } } + [NotMapped] public int RowCount { get { return xxwms_table_qty; } set { xxwms_table_qty = value; } } + [NotMapped] public string QadRead { get { return xxwms_qad; } set { xxwms_qad = value; } } + [NotMapped] public string WmsRead { get { return xxwms_wms; } set { xxwms_wms = value; } } + [NotMapped] public string ScmRead { get { return xxwms_scm; } set { xxwms_scm = value; } } + [NotMapped] public string MesRead { get { return xxwms_mes; } set { xxwms_mes = value; } } + [NotMapped] public string Remark { get { return xxwms_rmks; } set { xxwms_rmks = value; } } + + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// QAD系统控制主表 + /// </summary> + public partial class xxqad_ctrl : IControlTable + { + [NotMapped] public int UID { get { return xxqad_uid; } set { xxqad_uid = value; } } + + [NotMapped] public string Seq { get { return xxqad_seq; } set { xxqad_seq = value; } } + [NotMapped] public string TableName { get { return xxqad_table; } set { xxqad_table = value; } } + [NotMapped] public int RowCount { get { return xxqad_table_qty; } set { xxqad_table_qty = value; } } + [NotMapped] public string QadRead { get { return xxqad_qad; } set { xxqad_qad = value; } } + [NotMapped] public string WmsRead { get { return xxqad_wms; } set { xxqad_wms = value; } } + [NotMapped] public string ScmRead { get { return xxqad_scm; } set { xxqad_scm = value; } } + [NotMapped] public string MesRead { get { return xxqad_mes; } set { xxqad_mes = value; } } + [NotMapped] public string Remark { get { return xxqad_rmks; } set { xxqad_rmks = value; } } + + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + + } + + /// <summary> + /// SCM系统控制主表 + /// </summary> + public partial class xxscm_ctrl : IControlTable + { + [NotMapped] public int UID { get { return xxscm_uid; } set { xxscm_uid = value; } } + + [NotMapped] public string Seq { get { return xxscm_seq; } set { xxscm_seq = value; } } + [NotMapped] public string TableName { get { return xxscm_table; } set { xxscm_table = value; } } + [NotMapped] public int RowCount { get { return xxscm_table_qty; } set { xxscm_table_qty = value; } } + [NotMapped] public string QadRead { get { return xxscm_qad; } set { xxscm_qad = value; } } + [NotMapped] public string WmsRead { get { return xxscm_wms; } set { xxscm_wms = value; } } + [NotMapped] public string ScmRead { get { return xxscm_scm; } set { xxscm_scm = value; } } + [NotMapped] public string MesRead { get { return xxscm_mes; } set { xxscm_mes = value; } } + [NotMapped] public string Remark { get { return xxscm_rmks; } set { xxscm_rmks = value; } } + + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + */ + + /// <summary> + /// 物料信息 from QAD + /// </summary> + public partial class xxqad_pt_mstr + { +// [NotMapped] public int UID { get { return xxqad_pt_uid; } set { xxqad_pt_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_pt_seq; } set { xxqad_pt_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_pt_qadread; } set { xxqad_pt_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_pt_wmsread; } set { xxqad_pt_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_pt_scmread; } set { xxqad_pt_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_pt_mesread; } set { xxqad_pt_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_pt_rmks; } set { xxqad_pt_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_pt_createdt; } set { xxqad_pt_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_pt_createur; } set { xxqad_pt_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_pt_updatedt; } set { xxqad_pt_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_pt_updateur; } set { xxqad_pt_updateur = value; } } + + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 供应商信息 from QAD + /// </summary> + public partial class xxqad_vd_mstr + { +// [NotMapped] public int UID { get { return xxqad_vd_uid; } set { xxqad_vd_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_vd_seq; } set { xxqad_vd_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_vd_qadread; } set { xxqad_vd_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_vd_wmsread; } set { xxqad_vd_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_vd_scmread; } set { xxqad_vd_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_vd_mesread; } set { xxqad_vd_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_vd_rmks; } set { xxqad_vd_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_vd_createdt; } set { xxqad_vd_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_vd_createur; } set { xxqad_vd_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_vd_updatedt; } set { xxqad_vd_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_vd_updateur; } set { xxqad_vd_updateur = value; } } + + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 客户信息 from QAD + /// </summary> + public partial class xxqad_cm_mstr + { +// [NotMapped] public int UID { get { return xxqad_cm_uid; } set { xxqad_cm_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_cm_seq; } set { xxqad_cm_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_cm_qadread; } set { xxqad_cm_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_cm_wmsread; } set { xxqad_cm_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_cm_scmread; } set { xxqad_cm_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_cm_mesread; } set { xxqad_cm_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_cm_rmks; } set { xxqad_cm_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_cm_createdt; } set { xxqad_cm_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_cm_createur; } set { xxqad_cm_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_cm_updatedt; } set { xxqad_cm_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_cm_updateur; } set { xxqad_cm_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 供应商物料信息 from QAD + /// </summary> + public partial class xxqad_vp_mstr + { +// [NotMapped] public int UID { get { return xxqad_vp_uid; } set { xxqad_vp_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_vp_seq; } set { xxqad_vp_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_vp_qadread; } set { xxqad_vp_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_vp_wmsread; } set { xxqad_vp_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_vp_scmread; } set { xxqad_vp_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_vp_mesread; } set { xxqad_vp_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_vp_rmks; } set { xxqad_vp_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_vp_createdt; } set { xxqad_vp_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_vp_createur; } set { xxqad_vp_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_vp_updatedt; } set { xxqad_vp_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_vp_updateur; } set { xxqad_vp_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + + /// <summary> + /// 供应商物料信息 from QAD + /// </summary> + public partial class xxqad_sche_mstr + { +// [NotMapped] public int UID { get { return xxqad_sche_uid; } set { xxqad_sche_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_sche_seq; } set { xxqad_sche_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_sche_qadread; } set { xxqad_sche_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_sche_wmsread; } set { xxqad_sche_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_sche_scmread; } set { xxqad_sche_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_sche_mesread; } set { xxqad_sche_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_sche_rmks; } set { xxqad_sche_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_sche_createdt; } set { xxqad_sche_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_sche_createur; } set { xxqad_sche_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_sche_updatedt; } set { xxqad_sche_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_sche_updateur; } set { xxqad_sche_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 采购价格信息 from QAD + /// </summary> + public partial class xxqad_pprice_det + { +// [NotMapped] public int UID { get { return xxqad_pprice_uid; } set { xxqad_pprice_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_pprice_seq; } set { xxqad_pprice_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_pprice_qadread; } set { xxqad_pprice_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_pprice_wmsread; } set { xxqad_pprice_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_pprice_scmread; } set { xxqad_pprice_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_pprice_mesread; } set { xxqad_pprice_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_pprice_rmks; } set { xxqad_pprice_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_pprice_createdt; } set { xxqad_pprice_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_pprice_createur; } set { xxqad_pprice_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_pprice_updatedt; } set { xxqad_pprice_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_pprice_updateur; } set { xxqad_pprice_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 销售价格信息 from QAD + /// </summary> + public partial class xxqad_sprice_det + { +// [NotMapped] public int UID { get { return xxqad_sprice_uid; } set { xxqad_sprice_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_sprice_seq; } set { xxqad_sprice_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_sprice_qadread; } set { xxqad_sprice_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_sprice_wmsread; } set { xxqad_sprice_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_sprice_scmread; } set { xxqad_sprice_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_sprice_mesread; } set { xxqad_sprice_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_sprice_rmks; } set { xxqad_sprice_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_sprice_createdt; } set { xxqad_sprice_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_sprice_createur; } set { xxqad_sprice_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_sprice_updatedt; } set { xxqad_sprice_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_sprice_updateur; } set { xxqad_sprice_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 采购订单信息 from QAD + /// </summary> + public partial class xxqad_pod_det + { +// [NotMapped] public int UID { get { return xxqad_pod_uid; } set { xxqad_pod_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_pod_seq; } set { xxqad_pod_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_pod_qadread; } set { xxqad_pod_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_pod_wmsread; } set { xxqad_pod_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_pod_scmread; } set { xxqad_pod_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_pod_mesread; } set { xxqad_pod_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_pod_rmks; } set { xxqad_pod_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_pod_createdt; } set { xxqad_pod_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_pod_createur; } set { xxqad_pod_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_pod_updatedt; } set { xxqad_pod_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_pod_updateur; } set { xxqad_pod_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + + /// <summary> + /// 销售订单信息 from QAD + /// </summary> + public partial class xxqad_sod_det + { +// [NotMapped] public int UID { get { return xxqad_sod_uid; } set { xxqad_sod_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_sod_seq; } set { xxqad_sod_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_sod_qadread; } set { xxqad_sod_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_sod_wmsread; } set { xxqad_sod_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_sod_scmread; } set { xxqad_sod_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_sod_mesread; } set { xxqad_sod_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_sod_rmks; } set { xxqad_sod_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_sod_createdt; } set { xxqad_sod_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_sod_createur; } set { xxqad_sod_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_sod_updatedt; } set { xxqad_sod_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_sod_updateur; } set { xxqad_sod_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 库位信息 from QAD + /// </summary> + public partial class xxqad_loc_det + { +// [NotMapped] public int UID { get { return xxqad_loc_uid; } set { xxqad_loc_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_loc_seq; } set { xxqad_loc_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_loc_qadread; } set { xxqad_loc_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_loc_wmsread; } set { xxqad_loc_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_loc_scmread; } set { xxqad_loc_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_loc_mesread; } set { xxqad_loc_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_loc_rmks; } set { xxqad_loc_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_loc_createdt; } set { xxqad_loc_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_loc_createur; } set { xxqad_loc_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_loc_updatedt; } set { xxqad_loc_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_loc_updateur; } set { xxqad_loc_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 实时库存信息 from QAD + /// </summary> + public partial class xxqad_ld_det + { +// [NotMapped] public int UID { get { return xxqad_ld_uid; } set { xxqad_ld_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_ld_seq; } set { xxqad_ld_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_ld_qadread; } set { xxqad_ld_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_ld_wmsread; } set { xxqad_ld_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_ld_scmread; } set { xxqad_ld_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_ld_mesread; } set { xxqad_ld_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_ld_rmks; } set { xxqad_ld_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_ld_createdt; } set { xxqad_ld_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_ld_createur; } set { xxqad_ld_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_ld_updatedt; } set { xxqad_ld_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_ld_updateur; } set { xxqad_ld_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// BOM信息 from QAD + /// </summary> + public partial class xxqad_ps_mstr + { +// [NotMapped] public int UID { get { return xxqad_ps_uid; } set { xxqad_ps_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_ps_seq; } set { xxqad_ps_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_ps_qadread; } set { xxqad_ps_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_ps_wmsread; } set { xxqad_ps_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_ps_scmread; } set { xxqad_ps_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_ps_mesread; } set { xxqad_ps_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_ps_rmks; } set { xxqad_ps_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_ps_createdt; } set { xxqad_ps_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_ps_createur; } set { xxqad_ps_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_ps_updatedt; } set { xxqad_ps_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_ps_updateur; } set { xxqad_ps_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 标准成本信息 from QAD + /// </summary> + public partial class xxqad_sct_det + { +// [NotMapped] public int UID { get { return xxqad_sct_uid; } set { xxqad_sct_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_sct_seq; } set { xxqad_sct_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_sct_qadread; } set { xxqad_sct_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_sct_wmsread; } set { xxqad_sct_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_sct_scmread; } set { xxqad_sct_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_sct_mesread; } set { xxqad_sct_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_sct_rmks; } set { xxqad_sct_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_sct_createdt; } set { xxqad_sct_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_sct_createur; } set { xxqad_sct_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_sct_updatedt; } set { xxqad_sct_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_sct_updateur; } set { xxqad_sct_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 库存转移 from WMS + /// </summary> + public partial class xxwms_tr_det + { +// [NotMapped] public int UID { get { return xxwms_tr_uid; } set { xxwms_tr_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxwms_tr_seq; } set { xxwms_tr_seq = value; } } +// [NotMapped] public string QadRead { get { return xxwms_tr_qadread; } set { xxwms_tr_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxwms_tr_wmsread; } set { xxwms_tr_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxwms_tr_scmread; } set { xxwms_tr_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxwms_tr_mesread; } set { xxwms_tr_mesread = value; } } +// [NotMapped] public string Remark { get { return xxwms_tr_rmks; } set { xxwms_tr_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxwms_tr_createdt; } set { xxwms_tr_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxwms_tr_createur; } set { xxwms_tr_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxwms_tr_updatedt; } set { xxwms_tr_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxwms_tr_updateur; } set { xxwms_tr_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 采购入库 from WMS + /// </summary> + public partial class xxwms_rc_det + { +// [NotMapped] public int UID { get { return xxwms_rc_uid; } set { xxwms_rc_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxwms_rc_seq; } set { xxwms_rc_seq = value; } } +// [NotMapped] public string QadRead { get { return xxwms_rc_qadread; } set { xxwms_rc_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxwms_rc_wmsread; } set { xxwms_rc_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxwms_rc_scmread; } set { xxwms_rc_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxwms_rc_mesread; } set { xxwms_rc_mesread = value; } } +// [NotMapped] public string Remark { get { return xxwms_rc_rmks; } set { xxwms_rc_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxwms_rc_createdt; } set { xxwms_rc_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxwms_rc_createur; } set { xxwms_rc_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxwms_rc_updatedt; } set { xxwms_rc_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxwms_rc_updateur; } set { xxwms_rc_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 采购退货 from WMS + /// </summary> + public partial class xxwms_rt_det + { +// [NotMapped] public int UID { get { return xxwms_rt_uid; } set { xxwms_rt_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxwms_rt_seq; } set { xxwms_rt_seq = value; } } +// [NotMapped] public string QadRead { get { return xxwms_rt_qadread; } set { xxwms_rt_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxwms_rt_wmsread; } set { xxwms_rt_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxwms_rt_scmread; } set { xxwms_rt_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxwms_rt_mesread; } set { xxwms_rt_mesread = value; } } +// [NotMapped] public string Remark { get { return xxwms_rt_rmks; } set { xxwms_rt_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxwms_rt_createdt; } set { xxwms_rt_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxwms_rt_createur; } set { xxwms_rt_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxwms_rt_updatedt; } set { xxwms_rt_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxwms_rt_updateur; } set { xxwms_rt_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 库存明细带批次 from WMS + /// </summary> + public partial class xxwms_ld_det + { +// [NotMapped] public int UID { get { return xxwms_ld_uid; } set { xxwms_ld_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxwms_ld_seq; } set { xxwms_ld_seq = value; } } +// [NotMapped] public string QadRead { get { return xxwms_ld_qadread; } set { xxwms_ld_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxwms_ld_wmsread; } set { xxwms_ld_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxwms_ld_scmread; } set { xxwms_ld_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxwms_ld_mesread; } set { xxwms_ld_mesread = value; } } +// [NotMapped] public string Remark { get { return xxwms_ld_rmks; } set { xxwms_ld_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxwms_ld_createdt; } set { xxwms_ld_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxwms_ld_createur; } set { xxwms_ld_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxwms_ld_updatedt; } set { xxwms_ld_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxwms_ld_updateur; } set { xxwms_ld_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 生产回冲 from WMS + /// </summary> + public partial class xxwms_bk_mstr + { +// [NotMapped] public int UID { get { return xxwms_bk_uid; } set { xxwms_bk_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxwms_bk_seq; } set { xxwms_bk_seq = value; } } +// [NotMapped] public string QadRead { get { return xxwms_bk_qadread; } set { xxwms_bk_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxwms_bk_wmsread; } set { xxwms_bk_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxwms_bk_scmread; } set { xxwms_bk_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxwms_bk_mesread; } set { xxwms_bk_mesread = value; } } +// [NotMapped] public string Remark { get { return xxwms_bk_rmks; } set { xxwms_bk_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxwms_bk_createdt; } set { xxwms_bk_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxwms_bk_createur; } set { xxwms_bk_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxwms_bk_updatedt; } set { xxwms_bk_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxwms_bk_updateur; } set { xxwms_bk_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 其它出库 from WMS + /// </summary> + public partial class xxwms_iss_det + { +// [NotMapped] public int UID { get { return xxwms_iss_uid; } set { xxwms_iss_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxwms_iss_seq; } set { xxwms_iss_seq = value; } } +// [NotMapped] public string QadRead { get { return xxwms_iss_qadread; } set { xxwms_iss_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxwms_iss_wmsread; } set { xxwms_iss_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxwms_iss_scmread; } set { xxwms_iss_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxwms_iss_mesread; } set { xxwms_iss_mesread = value; } } +// [NotMapped] public string Remark { get { return xxwms_iss_rmks; } set { xxwms_iss_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxwms_iss_createdt; } set { xxwms_iss_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxwms_iss_createur; } set { xxwms_iss_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxwms_iss_updatedt; } set { xxwms_iss_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxwms_iss_updateur; } set { xxwms_iss_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 其它入库 from WMS + /// </summary> + public partial class xxwms_rct_det + { +// [NotMapped] public int UID { get { return xxwms_rct_uid; } set { xxwms_rct_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxwms_rct_seq; } set { xxwms_rct_seq = value; } } +// [NotMapped] public string QadRead { get { return xxwms_rct_qadread; } set { xxwms_rct_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxwms_rct_wmsread; } set { xxwms_rct_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxwms_rct_scmread; } set { xxwms_rct_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxwms_rct_mesread; } set { xxwms_rct_mesread = value; } } +// [NotMapped] public string Remark { get { return xxwms_rct_rmks; } set { xxwms_rct_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxwms_rct_createdt; } set { xxwms_rct_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxwms_rct_createur; } set { xxwms_rct_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxwms_rct_updatedt; } set { xxwms_rct_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxwms_rct_updateur; } set { xxwms_rct_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 销售结算 from WMS + /// </summary> + public partial class xxwms_soiss_det + { +// [NotMapped] public int UID { get { return xxwms_soiss_uid; } set { xxwms_soiss_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxwms_soiss_seq; } set { xxwms_soiss_seq = value; } } +// [NotMapped] public string QadRead { get { return xxwms_soiss_qadread; } set { xxwms_soiss_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxwms_soiss_wmsread; } set { xxwms_soiss_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxwms_soiss_scmread; } set { xxwms_soiss_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxwms_soiss_mesread; } set { xxwms_soiss_mesread = value; } } +// [NotMapped] public string Remark { get { return xxwms_soiss_rmks; } set { xxwms_soiss_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxwms_soiss_createdt; } set { xxwms_soiss_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxwms_soiss_createur; } set { xxwms_soiss_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxwms_soiss_updatedt; } set { xxwms_soiss_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxwms_soiss_updateur; } set { xxwms_soiss_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 库存盘点 from WMS + /// </summary> + public partial class xxwms_tag_det + { +// [NotMapped] public int UID { get { return xxwms_tag_uid; } set { xxwms_tag_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxwms_tag_seq; } set { xxwms_tag_seq = value; } } +// [NotMapped] public string QadRead { get { return xxwms_tag_qadread; } set { xxwms_tag_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxwms_tag_wmsread; } set { xxwms_tag_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxwms_tag_scmread; } set { xxwms_tag_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxwms_tag_mesread; } set { xxwms_tag_mesread = value; } } +// [NotMapped] public string Remark { get { return xxwms_tag_rmks; } set { xxwms_tag_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxwms_tag_createdt; } set { xxwms_tag_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxwms_tag_createur; } set { xxwms_tag_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxwms_tag_updatedt; } set { xxwms_tag_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxwms_tag_updateur; } set { xxwms_tag_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + + /// <summary> + /// 发货单(ASN) from SCM + /// </summary> + public partial class xxscm_tx_mstr + { +// [NotMapped] public int UID { get { return xxscm_tx_uid; } set { xxscm_tx_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxscm_tx_seq; } set { xxscm_tx_seq = value; } } +// [NotMapped] public string QadRead { get { return xxscm_tx_qadread; } set { xxscm_tx_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxscm_tx_wmsread; } set { xxscm_tx_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxscm_tx_scmread; } set { xxscm_tx_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxscm_tx_mesread; } set { xxscm_tx_mesread = value; } } +// [NotMapped] public string Remark { get { return xxscm_tx_rmks; } set { xxscm_tx_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxscm_tx_createdt; } set { xxscm_tx_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxscm_tx_createur; } set { xxscm_tx_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxscm_tx_updatedt; } set { xxscm_tx_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxscm_tx_updateur; } set { xxscm_tx_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 发货单明细 from SCM + /// </summary> + public partial class xxscm_tx_det + { +// [NotMapped] public int UID { get { return xxscm_tx_uid; } set { xxscm_tx_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxscm_tx_seq; } set { xxscm_tx_seq = value; } } +// [NotMapped] public string QadRead { get { return xxscm_tx_qadread; } set { xxscm_tx_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxscm_tx_wmsread; } set { xxscm_tx_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxscm_tx_scmread; } set { xxscm_tx_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxscm_tx_mesread; } set { xxscm_tx_mesread = value; } } +// [NotMapped] public string Remark { get { return xxscm_tx_rmks; } set { xxscm_tx_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxscm_tx_createdt; } set { xxscm_tx_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxscm_tx_createur; } set { xxscm_tx_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxscm_tx_updatedt; } set { xxscm_tx_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxscm_tx_updateur; } set { xxscm_tx_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 发票 from SCM + /// </summary> + public partial class xxscm_inv_det + { +// [NotMapped] public int UID { get { return xxscm_inv_uid; } set { xxscm_inv_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxscm_inv_seq; } set { xxscm_inv_seq = value; } } +// [NotMapped] public string QadRead { get { return xxscm_inv_qadread; } set { xxscm_inv_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxscm_inv_wmsread; } set { xxscm_inv_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxscm_inv_scmread; } set { xxscm_inv_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxscm_inv_mesread; } set { xxscm_inv_mesread = value; } } +// [NotMapped] public string Remark { get { return xxscm_inv_rmks; } set { xxscm_inv_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxscm_inv_createdt; } set { xxscm_inv_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxscm_inv_createur; } set { xxscm_inv_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxscm_inv_updatedt; } set { xxscm_inv_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxscm_inv_updateur; } set { xxscm_inv_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 采购订单信息 from QAD + /// </summary> + public partial class xxscm_pod_det + { +// [NotMapped] public int UID { get { return xxscm_pod_uid; } set { xxscm_pod_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxscm_pod_seq; } set { xxscm_pod_seq = value; } } +// [NotMapped] public string QadRead { get { return xxscm_pod_qadread; } set { xxscm_pod_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxscm_pod_wmsread; } set { xxscm_pod_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxscm_pod_scmread; } set { xxscm_pod_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxscm_pod_mesread; } set { xxscm_pod_mesread = value; } } +// [NotMapped] public string Remark { get { return xxscm_pod_rmks; } set { xxscm_pod_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxscm_pod_createdt; } set { xxscm_pod_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxscm_pod_createur; } set { xxscm_pod_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxscm_pod_updatedt; } set { xxscm_pod_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxscm_pod_updateur; } set { xxscm_pod_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxbom_code_mstr.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxbom_code_mstr.cs new file mode 100644 index 0000000..b28ebad --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxbom_code_mstr.cs @@ -0,0 +1,26 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxbom_code_mstr + { + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string xxbom_code_table { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string xxbom_code_value { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string xxbom_code_rmks { get; set; } + + [StringLength(8)] + public string xxbom_domain { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxbom_ctrl.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxbom_ctrl.cs new file mode 100644 index 0000000..389638d --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxbom_ctrl.cs @@ -0,0 +1,38 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxbom_ctrl + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int xxbom_uid { get; set; } + + [Key] + [StringLength(50)] + public string xxbom_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxbom_table { get; set; } + + public int xxbom_table_qty { get; set; } + + [StringLength(1)] + public string xxbom_qad { get; set; } + + [StringLength(1)] + public string xxbom_mes { get; set; } + + [StringLength(1)] + public string xxbom_scm { get; set; } + + [StringLength(1)] + public string xxbom_wms { get; set; } + + public string xxbom_rmks { get; set; } + + [StringLength(8)] + public string xxbom_domain { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxbom_ps_mstr.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxbom_ps_mstr.cs new file mode 100644 index 0000000..c281c46 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxbom_ps_mstr.cs @@ -0,0 +1,126 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxbom_ps_mstr + { + [Key] + public int xxbom_ps_UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxbom_ps_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxbom_ps_project { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxbom_ps_par { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxbom_ps_comp { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(12)] + public string xxbom_ps_ref { get; set; } + + public decimal xxbom_ps_qty_per { get; set; } + + public decimal? xxbom_ps_scrp_pct { get; set; } + + public int? xxbom_ps_lt_off { get; set; } + + public DateTime xxbom_ps_start { get; set; } + + public DateTime? xxbom_ps_end { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(24)] + public string xxbom_ps_rmks { get; set; } + + public int xxbom_ps_op { get; set; } + + public int? xxbom_ps_item_no { get; set; } + + public bool? xxbom_ps_mandatory { get; set; } + + public bool? xxbom_ps_exclusive { get; set; } + + [StringLength(8)] + public string xxbom_ps_process { get; set; } + + [StringLength(1)] + public string xxbom_ps_qty_type { get; set; } + + [StringLength(8)] + public string xxbom_ps_user1 { get; set; } + + [StringLength(8)] + public string xxbom_ps_user2 { get; set; } + + public decimal? xxbom_ps_fcst_pct { get; set; } + + public bool? xxbom_ps_default { get; set; } + + [StringLength(8)] + public string xxbom_ps_group { get; set; } + + public bool? xxbom_ps_critical { get; set; } + + public decimal? xxbom_ps_qty_per_b { get; set; } + + [StringLength(2)] + public string xxbom_ps_comp_um { get; set; } + + [StringLength(50)] + public string xxbom_ps_um_conv { get; set; } + + public decimal? xxbom_ps_assay { get; set; } + + [StringLength(8)] + public string xxbom_ps_comm_code { get; set; } + + public bool? xxbom_ps_non_bal { get; set; } + + public bool? xxbom_ps_byproduct { get; set; } + + [StringLength(8)] + public string xxbom_ps_userid { get; set; } + + [Column(TypeName = "date")] + public DateTime? xxbom_ps_mod_date { get; set; } + + public decimal? xxbom_ps_batch_pct { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxbom_ps_qadread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxbom_ps_wmsread { get; set; } + + [StringLength(1)] + public string xxbom_ps_scmread { get; set; } + + public string xxbom_ps_mesread { get; set; } + + public DateTime? xxbom_ps_createdt { get; set; } + + [StringLength(8)] + public string xxbom_ps_createur { get; set; } + + public DateTime? xxbom_ps_updatedt { get; set; } + + [StringLength(8)] + public string xxbom_ps_updateur { get; set; } + + [StringLength(8)] + public string xxbom_ps_domain { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxbom_pt_mstr.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxbom_pt_mstr.cs new file mode 100644 index 0000000..c8c016f --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxbom_pt_mstr.cs @@ -0,0 +1,154 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxbom_pt_mstr + { + [Key] + public int xxbom_pt_UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxbom_pt_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxbom_pt_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(24)] + public string xxbom_pt_desc1 { get; set; } + + [StringLength(24)] + public string xxbom_pt_desc2 { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxbom_pt_um { get; set; } + + [StringLength(18)] + public string xxbom_pt_draw { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(4)] + public string xxbom_pt_prod_line { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxbom_pt_group { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxbom_pt_part_type { get; set; } + + [StringLength(8)] + public string xxbom_pt_dsgn_grp { get; set; } + + [StringLength(8)] + public string xxbom_pt_promo { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(4)] + public string xxbom_pt_status { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxbom_pt_abc { get; set; } + + public bool? xxbom_pt_iss_pol { get; set; } + + public bool? xxbom_pt_phantom { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxbom_pt_loc { get; set; } + + public int? xxbom_pt_avg_int { get; set; } + + public int? xxbom_pt_cyc_int { get; set; } + + public bool? xxbom_pt_ms { get; set; } + + public bool? xxbom_pt_plan_ord { get; set; } + + public bool? xxbom_pt_mrp { get; set; } + + [StringLength(3)] + public string xxbom_pt_ord_pol { get; set; } + + public decimal? xxbom_pt_ord_qty { get; set; } + + public int? xxbom_pt_ord_per { get; set; } + + public decimal? xxbom_pt_sfty_stk { get; set; } + + public decimal? xxbom_pt_sfty_time { get; set; } + + public decimal? xxbom_pt_rop { get; set; } + + [StringLength(8)] + public string xxbom_pt_buyer { get; set; } + + [StringLength(8)] + public string xxbom_pt_vend { get; set; } + + [StringLength(1)] + public string xxbom_pt_pm_code { get; set; } + + public decimal? xxbom_pt_mfg_lead { get; set; } + + public int? xxbom_pt_pur_lead { get; set; } + + public bool? xxbom_pt_insp_rqd { get; set; } + + public int? xxbom_pt_insp_lead { get; set; } + + public int? xxbom_pt_cum_lead { get; set; } + + public decimal? xxbom_pt_ord_min { get; set; } + + public decimal? xxbom_pt_ord_max { get; set; } + + public decimal? xxbom_pt_ord_mult { get; set; } + + public decimal? xxbom_pt_yield_pct { get; set; } + + public decimal? xxbom_pt_setup { get; set; } + + public decimal? xxbom_pt_setup_ll { get; set; } + + public decimal? xxbom_pt_run_ll { get; set; } + + public decimal? xxbom_pt_run { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxbom_pt_qadread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxbom_pt_wmsread { get; set; } + + [StringLength(1)] + public string xxbom_pt_scmread { get; set; } + + [StringLength(1)] + public string xxbom_pt_mesread { get; set; } + + public string xxbom_pt_rmks { get; set; } + + public DateTime? xxbom_pt_createdt { get; set; } + + [StringLength(8)] + public string xxbom_pt_createur { get; set; } + + public DateTime? xxbom_pt_updatedt { get; set; } + + [StringLength(8)] + public string xxbom_pt_updateur { get; set; } + + [StringLength(8)] + public string xxbom_pt_domain { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxbom_ro_mstr.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxbom_ro_mstr.cs new file mode 100644 index 0000000..761a1ca --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxbom_ro_mstr.cs @@ -0,0 +1,69 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxbom_ro_mstr + { + [Key] + public int xxbom_ro_UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxbom_ro_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxbom_ro_routing { get; set; } + + public int xxbom_ro_op { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(24)] + public string xxbom_ro_desc { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxbom_ro_wkctr { get; set; } + + public decimal xxbom_ro_run { get; set; } + + public DateTime? xxbom_ro_start { get; set; } + + public DateTime? xxbom_ro_end { get; set; } + + public bool xxbom_ro_milestone { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxbom_ro_qadread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxbom_ro_wmsread { get; set; } + + [StringLength(1)] + public string xxbom_ro_scmread { get; set; } + + [StringLength(1)] + public string xxbom_ro_mesread { get; set; } + + [StringLength(50)] + public string xxbom_ro_rmks { get; set; } + + public DateTime xxbom_ro_createdt { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxbom_ro_createur { get; set; } + + public DateTime xxbom_ro_updatedt { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxbom_ro_updateur { get; set; } + + [StringLength(8)] + public string xxbom_ro_domain { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxmes_ctrl.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxmes_ctrl.cs new file mode 100644 index 0000000..40d9b2f --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxmes_ctrl.cs @@ -0,0 +1,43 @@ +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxmes_ctrl + { + public int xxmes_ctrl_uid { get; set; } + + [Key] + [StringLength(50)] + public string xxmes_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxmes_table { get; set; } + + public int xxmes_table_qty { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxmes_qad { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxmes_mes { get; set; } + + [StringLength(1)] + public string xxmes_scm { get; set; } + + [StringLength(1)] + public string xxmes_wms { get; set; } + + public string xxmes_rmks { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxmes_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxmes_site { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_cm_mstr.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_cm_mstr.cs new file mode 100644 index 0000000..39851db --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_cm_mstr.cs @@ -0,0 +1,98 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_cm_mstr + { + [Key] + public int xxqad_cm_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_cm_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_cm_addr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_cm_domain { get; set; } + + [StringLength(8)] + public string xxqad_cm_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(100)] + public string xxqad_cm_name { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(100)] + public string xxqad_cm_line1 { get; set; } + + [StringLength(100)] + public string xxqad_cm_line2 { get; set; } + + [StringLength(100)] + public string xxqad_cm_line3 { get; set; } + + [StringLength(8)] + public string xxqad_cm_country { get; set; } + + [StringLength(8)] + public string xxqad_cm_city { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(15)] + public string xxqad_cm_phone { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(15)] + public string xxqad_cm_fax { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(15)] + public string xxqad_cm_pst_id { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_cm_attn { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(15)] + public string xxqad_cm_curr { get; set; } + + public bool xxqad_cm_active { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxqad_cm_promo { get; set; } + + public int xxqad_cm_type { get; set; } + + [StringLength(1)] + public string xxqad_cm_qadread { get; set; } + + [StringLength(1)] + public string xxqad_cm_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_cm_scmread { get; set; } + + [StringLength(1)] + public string xxqad_cm_mesread { get; set; } + + public string xxqad_cm_rmks { get; set; } + + public DateTime? xxqad_cm_createdt { get; set; } + + [StringLength(8)] + public string xxqad_cm_createur { get; set; } + + public DateTime? xxqad_cm_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_cm_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_ctrl.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_ctrl.cs new file mode 100644 index 0000000..57ba9c8 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_ctrl.cs @@ -0,0 +1,45 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_ctrl + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int xxqad_uid { get; set; } + + [Key] + [StringLength(50)] + public string xxqad_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_table { get; set; } + + public int xxqad_table_qty { get; set; } + + [StringLength(1)] + public string xxqad_qad { get; set; } + + [StringLength(1)] + public string xxqad_mes { get; set; } + + [StringLength(1)] + public string xxqad_scm { get; set; } + + [StringLength(1)] + public string xxqad_wms { get; set; } + + public string xxqad_rmks { get; set; } + +// public DateTime xxqad_create_time { get; set; } +// +// [Required(AllowEmptyStrings = true)] +// [StringLength(20)] +// public string xxqad_domain { get; set; } + + //[StringLength(8)] + //public string xxqad_site { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_ld_det.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_ld_det.cs new file mode 100644 index 0000000..4427b54 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_ld_det.cs @@ -0,0 +1,66 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_ld_det + { + [Key] + public int xxqad_ld_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_ld_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_ld_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_ld_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_ld_loc { get; set; } + + [StringLength(8)] + public string xxqad_ld_lot { get; set; } + + public DateTime? xxqad_ld_date { get; set; } + + public DateTime? xxqad_ld_time { get; set; } + + public decimal xxqad_ld_qty { get; set; } + + [StringLength(2)] + public string xxqad_ld_um { get; set; } + + [StringLength(10)] + public string xxqad_ld_domain { get; set; } + + [StringLength(1)] + public string xxqad_ld_qadread { get; set; } + + [StringLength(1)] + public string xxqad_ld_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_ld_scmread { get; set; } + + [StringLength(1)] + public string xxqad_ld_mesread { get; set; } + + public string xxqad_ld_rmks { get; set; } + + public DateTime? xxqad_ld_createdt { get; set; } + + [StringLength(8)] + public string xxqad_ld_createur { get; set; } + + public DateTime? xxqad_ld_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_ld_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_line_mstr.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_line_mstr.cs new file mode 100644 index 0000000..414668f --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_line_mstr.cs @@ -0,0 +1,69 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_line_mstr + { + [Key] + public int xxqad_line_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_line_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_line_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_line_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_line_ln { get; set; } + + [StringLength(50)] + public string xxqad_line_desc { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_line_part { get; set; } + + [StringLength(3)] + public string xxqad_line_primary { get; set; } + + public int? xxqad_line_rate { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_line_qadread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_line_mesread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_line_wmsread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_line_scmread { get; set; } + + [StringLength(50)] + public string xxqad_line_rmks { get; set; } + + public DateTime xxqad_line_createdt { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_line_createur { get; set; } + + public DateTime? xxqad_line_updatedt { get; set; } + + [StringLength(50)] + public string xxqad_line_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_loc_det.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_loc_det.cs new file mode 100644 index 0000000..afadb85 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_loc_det.cs @@ -0,0 +1,56 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_loc_det + { + [Key] + public int xxqad_loc_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_loc_seq { get; set; } + + [StringLength(8)] + public string xxqad_loc_loc { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_loc_site { get; set; } + + [StringLength(50)] + public string xxqad_loc_desc { get; set; } + + [StringLength(8)] + public string xxqad_loc_type { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_loc_domain { get; set; } + + [StringLength(1)] + public string xxqad_loc_qadread { get; set; } + + [StringLength(1)] + public string xxqad_loc_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_loc_scmread { get; set; } + + [StringLength(1)] + public string xxqad_loc_mesread { get; set; } + + public string xxqad_loc_rmks { get; set; } + + public DateTime? xxqad_loc_createdt { get; set; } + + [StringLength(8)] + public string xxqad_loc_createur { get; set; } + + public DateTime? xxqad_loc_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_loc_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_pod_det.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_pod_det.cs new file mode 100644 index 0000000..182c8b2 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_pod_det.cs @@ -0,0 +1,121 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_pod_det + { + [Key] + public int xxqad_pod_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_pod_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pod_nbr { get; set; } + + public int xxqad_pod_line { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pod_modtype { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pod_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pod_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_pod_part { get; set; } + + [StringLength(50)] + public string xxqad_pod_desc { get; set; } + + public decimal xxqad_pod_qty_ord { get; set; } + + public decimal xxqad_pod_qty_rct { get; set; } + + public decimal xxqad_pod_qty_std { get; set; } + + public DateTime xxqad_pod_due_date { get; set; } + + public decimal xxqad_pod_price { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pod_curr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pod_loc_um { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pod_um { get; set; } + + public decimal xxqad_pod_um_conv { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pod_vend { get; set; } + + [StringLength(100)] + public string xxqad_pod_name { get; set; } + + [StringLength(8)] + public string xxqad_pod_attn { get; set; } + + [StringLength(8)] + public string xxqad_pod_ship { get; set; } + + [StringLength(2)] + public string xxqad_pod_made { get; set; } + + public bool? xxqad_pod_confirm { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pod_buyer { get; set; } + + [StringLength(20)] + public string xxqad_pod_buyer_phone { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pod_status { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_pod_qadread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_pod_wmsread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_pod_scmread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_pod_mesread { get; set; } + + public string xxqad_pod_rmks { get; set; } + + public DateTime? xxqad_pod_createdt { get; set; } + + [StringLength(8)] + public string xxqad_pod_createur { get; set; } + + public DateTime? xxqad_pod_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_pod_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_pprice_det.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_pprice_det.cs new file mode 100644 index 0000000..b25530c --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_pprice_det.cs @@ -0,0 +1,66 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_pprice_det + { + [Key] + public int xxqad_pprice_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_pprice_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pprice_list { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pprice_domain { get; set; } + + [StringLength(8)] + public string xxqad_pprice_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_pprice_part { get; set; } + + public DateTime? xxqad_pprice_start { get; set; } + + public DateTime? xxqad_pprice_end { get; set; } + + [StringLength(8)] + public string xxqad_pprice_curr { get; set; } + + [StringLength(8)] + public string xxqad_pprice_um { get; set; } + + public decimal xxqad_pprice_amt { get; set; } + + [StringLength(1)] + public string xxqad_pprice_qadread { get; set; } + + [StringLength(1)] + public string xxqad_pprice_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_pprice_scmread { get; set; } + + [StringLength(1)] + public string xxqad_pprice_mesread { get; set; } + + public string xxqad_pprice_rmks { get; set; } + + public DateTime? xxqad_pprice_createdt { get; set; } + + [StringLength(8)] + public string xxqad_pprice_createur { get; set; } + + public DateTime? xxqad_pprice_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_pprice_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_prh_det.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_prh_det.cs new file mode 100644 index 0000000..c198691 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_prh_det.cs @@ -0,0 +1,117 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_prh_det + { + [Key] + public int xxqad_prh_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_prh_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxqad_prh_receiver { get; set; } + + [StringLength(20)] + public string xxqad_prh_psnbr { get; set; } + + public int xxqad_prh_trnbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_prh_trtype { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_prh_po_nbr { get; set; } + + public int xxqad_prh_po_line { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_prh_part { get; set; } + + public decimal xxqad_prh_qty_rcvd { get; set; } + + public decimal xxqad_prh_qty_ord { get; set; } + + public decimal xxqad_prh_pur_cost { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_prh_curr { get; set; } + + public decimal xxqad_prh_curr_amt { get; set; } + + public DateTime xxqad_prh_date_ship { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_prh_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_prh_vend { get; set; } + + [StringLength(20)] + public string xxqad_prh_ware_class { get; set; } + + [StringLength(20)] + public string xxqad_prh_ware { get; set; } + + [StringLength(8)] + public string xxqad_prh_loc { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxqad_prh_po_um { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxqad_prh_loc_um { get; set; } + + public decimal xxqad_prh_conv { get; set; } + + [StringLength(20)] + public string xxqad_prh_lot { get; set; } + + [StringLength(20)] + public string xxqad_prh_vend_batch { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_prh_qadread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_prh_wmsread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_prh_scmread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_prh_mesread { get; set; } + + public string xxqad_prh_rmks { get; set; } + + public DateTime xxqad_prh_createdt { get; set; } + + [StringLength(8)] + public string xxqad_prh_createur { get; set; } + + public DateTime? xxqad_prh_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_prh_updateur { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_prh_domain { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_ps_mstr.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_ps_mstr.cs new file mode 100644 index 0000000..78df3a9 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_ps_mstr.cs @@ -0,0 +1,68 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_ps_mstr + { + [Key] + public int xxqad_ps_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_ps_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_ps_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_ps_comp { get; set; } + + [StringLength(36)] + public string xxqad_ps_ref { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_ps_domain { get; set; } + + public DateTime? xxqad_ps_start { get; set; } + + public DateTime? xxqad_ps_end { get; set; } + + public decimal xxqad_ps_qty_per { get; set; } + + [StringLength(50)] + public string xxqad_ps_ps_code { get; set; } + + [StringLength(8)] + public string xxqad_ps_rmks { get; set; } + + public int xxqad_ps_op { get; set; } + + [StringLength(1)] + public string xxqad_ps_qadread { get; set; } + + [StringLength(1)] + public string xxqad_ps_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_ps_scmread { get; set; } + + [StringLength(1)] + public string xxqad_ps_mesread { get; set; } + + public string xxqad_ps_rmks1 { get; set; } + + public DateTime? xxqad_ps_createdt { get; set; } + + [StringLength(8)] + public string xxqad_ps_createur { get; set; } + + public DateTime? xxqad_ps_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_ps_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_pt_mstr.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_pt_mstr.cs new file mode 100644 index 0000000..311fba1 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_pt_mstr.cs @@ -0,0 +1,85 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_pt_mstr + { + [Key] + public int xxqad_pt_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_pt_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_pt_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pt_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pt_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxqad_pt_um { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(36)] + public string xxqad_pt_desc1 { get; set; } + + [StringLength(36)] + public string xxqad_pt_desc2 { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pt_dsgn_grp { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pt_promo { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pt_part_type { get; set; } + + [StringLength(8)] + public string xxqad_pt_group { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pt_prod_line { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pt_status { get; set; } + + [StringLength(1)] + public string xxqad_pt_qadread { get; set; } + + [StringLength(1)] + public string xxqad_pt_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_pt_scmread { get; set; } + + [StringLength(1)] + public string xxqad_pt_mesread { get; set; } + + public string xxqad_pt_rmks { get; set; } + + public DateTime? xxqad_pt_createdt { get; set; } + + [StringLength(8)] + public string xxqad_pt_createur { get; set; } + + public DateTime? xxqad_pt_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_pt_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_repsch_det.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_repsch_det.cs new file mode 100644 index 0000000..1bc9b01 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_repsch_det.cs @@ -0,0 +1,91 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_repsch_det + { + [Key] + [Column(Order = 0)] + public int xxqad_repsch_uid { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string xxqad_repsch_seq { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(8)] + public string xxqad_repsch_domain { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(8)] + public string xxqad_repsch_site { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(8)] + public string xxqad_repsch_line { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(18)] + public string xxqad_repsch_part { get; set; } + + [Key] + [Column(Order = 6)] + public DateTime xxqad_repsch_duedate { get; set; } + + [StringLength(50)] + public string xxqad_repsch_shift { get; set; } + + [Key] + [Column(Order = 7)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int xxqad_repsch_qty { get; set; } + + [Key] + [Column(Order = 8)] + [StringLength(1)] + public string xxqad_repsch_qadread { get; set; } + + [Key] + [Column(Order = 9)] + [StringLength(1)] + public string xxqad_repsch_mesread { get; set; } + + [Key] + [Column(Order = 10)] + [StringLength(1)] + public string xxqad_repsch_scmread { get; set; } + + [Key] + [Column(Order = 11)] + [StringLength(1)] + public string xxqad_repsch_wmsread { get; set; } + + [StringLength(50)] + public string xxqad_repsch_rmks { get; set; } + + [Key] + [Column(Order = 12)] + public DateTime xxqad_repsch_createdt { get; set; } + + [Key] + [Column(Order = 13)] + [StringLength(50)] + public string xxqad_repsch_createur { get; set; } + + [Key] + [Column(Order = 14)] + public DateTime xxqad_repsch_updatedt { get; set; } + + [Key] + [Column(Order = 15)] + [StringLength(50)] + public string xxqad_repsch_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_ro_mstr.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_ro_mstr.cs new file mode 100644 index 0000000..0720390 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_ro_mstr.cs @@ -0,0 +1,70 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_ro_mstr + { + [Key] + public int xxqad_ro_UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_ro_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_ro_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_ro_routing { get; set; } + + public int xxqad_ro_op { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(24)] + public string xxqad_ro_desc { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_ro_wkctr { get; set; } + + public decimal xxqad_ro_run { get; set; } + + public DateTime? xxqad_ro_start { get; set; } + + public DateTime? xxqad_ro_end { get; set; } + + public bool xxqad_ro_milestone { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_ro_qadread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_ro_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_ro_scmread { get; set; } + + [StringLength(1)] + public string xxqad_ro_mesread { get; set; } + + [StringLength(50)] + public string xxqad_ro_rmks { get; set; } + + public DateTime xxqad_ro_createdt { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_ro_createur { get; set; } + + public DateTime xxqad_ro_updatedt { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_ro_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_sche_mstr.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_sche_mstr.cs new file mode 100644 index 0000000..a836c65 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_sche_mstr.cs @@ -0,0 +1,63 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_sche_mstr + { + [Key] + public int xxqad_sche_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_sche_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_sche_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_sche_custpart { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_sche_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_sche_cust { get; set; } + + [StringLength(100)] + public string xxqad_sche_name { get; set; } + + [StringLength(100)] + public string xxqad_sche_desc { get; set; } + + public decimal xxqad_sche_comment { get; set; } + + [StringLength(1)] + public string xxqad_sche_qadread { get; set; } + + [StringLength(1)] + public string xxqad_sche_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_sche_scmread { get; set; } + + [StringLength(1)] + public string xxqad_sche_mesread { get; set; } + + public string xxqad_sche_rmks { get; set; } + + public DateTime? xxqad_sche_createdt { get; set; } + + [StringLength(8)] + public string xxqad_sche_createur { get; set; } + + public DateTime? xxqad_sche_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_sche_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_sct_det.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_sct_det.cs new file mode 100644 index 0000000..ba94da1 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_sct_det.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_sct_det + { + [Key] + public int xxqad_sct_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_sct_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_sct_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_sct_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_sct_domain { get; set; } + + [StringLength(36)] + public string xxqad_sct_ref { get; set; } + + public decimal xxqad_sct_cst_tot { get; set; } + + public DateTime? xxqad_sct_cst_date { get; set; } + + [StringLength(1)] + public string xxqad_sct_qadread { get; set; } + + [StringLength(1)] + public string xxqad_sct_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_sct_scmread { get; set; } + + [StringLength(1)] + public string xxqad_sct_mesread { get; set; } + + public string xxqad_sct_rmks { get; set; } + + public DateTime? xxqad_sct_createdt { get; set; } + + [StringLength(8)] + public string xxqad_sct_createur { get; set; } + + public DateTime? xxqad_sct_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_sct_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_sod_det.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_sod_det.cs new file mode 100644 index 0000000..15d8abf --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_sod_det.cs @@ -0,0 +1,79 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_sod_det + { + [Key] + public int xxqad_sod_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_sod_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_sod_order { get; set; } + + public int xxqad_sod_line { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_sod_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_sod_cust { get; set; } + + [StringLength(18)] + public string xxqad_sod_part { get; set; } + + [StringLength(48)] + public string xxqad_sod_desc { get; set; } + + public decimal xxqad_sod_price { get; set; } + + [StringLength(50)] + public string xxqad_sod_shipto { get; set; } + + [StringLength(2)] + public string xxqad_sod_um { get; set; } + + [StringLength(8)] + public string xxqad_sod_site { get; set; } + + [StringLength(8)] + public string xxqad_sod_pllist { get; set; } + + [StringLength(8)] + public string xxqad_sod_loc { get; set; } + + [StringLength(10)] + public string xxqad_sod_qty_std { get; set; } + + [StringLength(1)] + public string xxqad_sod_qadread { get; set; } + + [StringLength(1)] + public string xxqad_sod_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_sod_scmread { get; set; } + + [StringLength(1)] + public string xxqad_sod_mesread { get; set; } + + public string xxqad_sod_rmks { get; set; } + + public DateTime? xxqad_sod_createdt { get; set; } + + [StringLength(8)] + public string xxqad_sod_createur { get; set; } + + public DateTime? xxqad_sod_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_sod_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_sprice_det.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_sprice_det.cs new file mode 100644 index 0000000..14e7a14 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_sprice_det.cs @@ -0,0 +1,65 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_sprice_det + { + [Key] + public int xxqad_sprice_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_sprice_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_sprice_list { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_sprice_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_sprice_domain { get; set; } + + public DateTime xxqad_sprice_start { get; set; } + + public DateTime? xxqad_sprice_end { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(3)] + public string xxqad_sprice_curr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxqad_sprice_um { get; set; } + + public decimal? xxqad_sprice_amt { get; set; } + + [StringLength(1)] + public string xxqad_sprice_qadread { get; set; } + + [StringLength(1)] + public string xxqad_sprice_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_sprice_scmread { get; set; } + + [StringLength(1)] + public string xxqad_sprice_mesread { get; set; } + + public string xxqad_sprice_rmks { get; set; } + + public DateTime? xxqad_sprice_createdt { get; set; } + + [StringLength(8)] + public string xxqad_sprice_createur { get; set; } + + public DateTime? xxqad_sprice_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_sprice_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_vd_mstr.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_vd_mstr.cs new file mode 100644 index 0000000..f316eca --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_vd_mstr.cs @@ -0,0 +1,93 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_vd_mstr + { + [Key] + public int xxqad_vd_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_vd_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_vd_addr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_vd_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(100)] + public string xxqad_vd_name { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(100)] + public string xxqad_vd_line1 { get; set; } + + [StringLength(100)] + public string xxqad_vd_line2 { get; set; } + + [StringLength(100)] + public string xxqad_vd_line3 { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_vd_country { get; set; } + + [StringLength(50)] + public string xxqad_vd_city { get; set; } + + [StringLength(50)] + public string xxqad_vd_phone { get; set; } + + [StringLength(50)] + public string xxqad_vd_fax { get; set; } + + [StringLength(15)] + public string xxqad_vd_pst_id { get; set; } + + [StringLength(50)] + public string xxqad_vd_attn { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(15)] + public string xxqad_vd_curr { get; set; } + + public decimal xxqad_vd_tax { get; set; } + + [StringLength(2)] + public string xxqad_vd_promo { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_vd_type { get; set; } + + [StringLength(1)] + public string xxqad_vd_qadread { get; set; } + + [StringLength(1)] + public string xxqad_vd_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_vd_scmread { get; set; } + + [StringLength(1)] + public string xxqad_vd_mesread { get; set; } + + public string xxqad_vd_rmks { get; set; } + + public DateTime? xxqad_vd_createdt { get; set; } + + [StringLength(8)] + public string xxqad_vd_createur { get; set; } + + public DateTime? xxqad_vd_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_vd_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_vp_mstr.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_vp_mstr.cs new file mode 100644 index 0000000..846c27e --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxqad_vp_mstr.cs @@ -0,0 +1,60 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_vp_mstr + { + [Key] + public int xxqad_vp_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_vp_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_vp_addr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_vp_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_vp_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(36)] + public string xxqad_vp_vend_part { get; set; } + + [StringLength(8)] + public string xxqad_vp_site { get; set; } + + public decimal xxqad_vp_comment { get; set; } + + [StringLength(1)] + public string xxqad_vp_qadread { get; set; } + + [StringLength(1)] + public string xxqad_vp_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_vp_scmread { get; set; } + + [StringLength(1)] + public string xxqad_vp_mesread { get; set; } + + public string xxqad_vp_rmks { get; set; } + + public DateTime? xxqad_vp_createdt { get; set; } + + [StringLength(8)] + public string xxqad_vp_createur { get; set; } + + public DateTime? xxqad_vp_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_vp_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxscm_ctrl.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxscm_ctrl.cs new file mode 100644 index 0000000..39bc492 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxscm_ctrl.cs @@ -0,0 +1,46 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxscm_ctrl + { + [Key] + public int xxscm_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxscm_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxscm_table { get; set; } + + public int xxscm_table_qty { get; set; } + + [StringLength(1)] + public string xxscm_qad { get; set; } + + [StringLength(1)] + public string xxscm_mes { get; set; } + + [StringLength(1)] + public string xxscm_scm { get; set; } + + [StringLength(1)] + public string xxscm_wms { get; set; } + + [Required(AllowEmptyStrings = true)] + public string xxscm_rmks { get; set; } + + public DateTime xxscm_create_time { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxscm_inv_det.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxscm_inv_det.cs new file mode 100644 index 0000000..2e0a916 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxscm_inv_det.cs @@ -0,0 +1,92 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxscm_inv_det + { + [Key] + public int xxscm_inv_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxscm_inv_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_inv_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_inv_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(10)] + public string xxscm_inv_nbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(10)] + public string xxscm_inv_vend { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(10)] + public string xxscm_inv_invoice { get; set; } + + public DateTime xxscm_inv_date { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(10)] + public string xxscm_inv_curr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(10)] + public string xxscm_inv_order { get; set; } + + [StringLength(10)] + public string xxscm_inv_line { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(10)] + public string xxscm_inv_receiver { get; set; } + + [StringLength(10)] + public string xxscm_inv_asn { get; set; } + + [StringLength(10)] + public string xxscm_inv_part { get; set; } + + public decimal xxscm_inv_qty { get; set; } + + public decimal xxscm_inv_price { get; set; } + + public decimal xxscm_inv_tax { get; set; } + + public decimal xxscm_inv_taxamt { get; set; } + + public decimal xxscm_inv_amt { get; set; } + + [StringLength(1)] + public string xxscm_inv_qadread { get; set; } + + [StringLength(1)] + public string xxscm_inv_wmsread { get; set; } + + [StringLength(1)] + public string xxscm_inv_scmread { get; set; } + + [StringLength(1)] + public string xxscm_inv_mesread { get; set; } + + public string xxscm_inv_rmks { get; set; } + + public DateTime? xxscm_inv_createdt { get; set; } + + [StringLength(8)] + public string xxscm_inv_createur { get; set; } + + public DateTime? xxscm_inv_updatedt { get; set; } + + [StringLength(8)] + public string xxscm_inv_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxscm_pod_det.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxscm_pod_det.cs new file mode 100644 index 0000000..8331fe7 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxscm_pod_det.cs @@ -0,0 +1,121 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxscm_pod_det + { + [Key] + public int xxscm_pod_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxscm_pod_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_pod_nbr { get; set; } + + public int xxscm_pod_line { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_pod_modtype { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_pod_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_pod_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxscm_pod_part { get; set; } + + [StringLength(50)] + public string xxscm_pod_desc { get; set; } + + public decimal xxscm_pod_qty_ord { get; set; } + + public decimal xxscm_pod_qty_rct { get; set; } + + public decimal xxscm_pod_qty_std { get; set; } + + public DateTime xxscm_pod_due_date { get; set; } + + public decimal xxscm_pod_price { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_pod_curr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_pod_loc_um { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_pod_um { get; set; } + + public decimal xxscm_pod_um_conv { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_pod_vend { get; set; } + + [StringLength(100)] + public string xxscm_pod_name { get; set; } + + [StringLength(8)] + public string xxscm_pod_attn { get; set; } + + [StringLength(8)] + public string xxscm_pod_ship { get; set; } + + [StringLength(2)] + public string xxscm_pod_made { get; set; } + + public bool xxscm_pod_confirm { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_pod_buyer { get; set; } + + [StringLength(20)] + public string xxscm_pod_buyer_phone { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_pod_status { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxscm_pod_qadread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxscm_pod_wmsread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxscm_pod_scmread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxscm_pod_mesread { get; set; } + + public string xxscm_pod_rmks { get; set; } + + public DateTime? xxscm_pod_createdt { get; set; } + + [StringLength(8)] + public string xxscm_pod_createur { get; set; } + + public DateTime? xxscm_pod_updatedt { get; set; } + + [StringLength(8)] + public string xxscm_pod_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxscm_tx_det.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxscm_tx_det.cs new file mode 100644 index 0000000..218b5a9 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxscm_tx_det.cs @@ -0,0 +1,65 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxscm_tx_det + { + [Key] + public int xxscm_tx_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxscm_tx_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_tx_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(200)] + public string xxscm_tx_boxcode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxscm_tx_nbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxscm_tx_vend { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxscm_tx_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxscm_tx_batch { get; set; } + + public decimal xxscm_tx_qty_real { get; set; } + + [StringLength(1)] + public string xxscm_tx_qadread { get; set; } + + [StringLength(1)] + public string xxscm_tx_wmsread { get; set; } + + [StringLength(1)] + public string xxscm_tx_scmread { get; set; } + + [StringLength(1)] + public string xxscm_tx_mesread { get; set; } + + public string xxscm_tx_rmks { get; set; } + + public DateTime? xxscm_tx_createdt { get; set; } + + [StringLength(8)] + public string xxscm_tx_createur { get; set; } + + public DateTime? xxscm_tx_updatedt { get; set; } + + [StringLength(8)] + public string xxscm_tx_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxscm_tx_mstr.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxscm_tx_mstr.cs new file mode 100644 index 0000000..2be6ffd --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxscm_tx_mstr.cs @@ -0,0 +1,105 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxscm_tx_mstr + { + [Key] + public int xxscm_tx_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxscm_tx_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxscm_tx_nbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_tx_po_nbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(4)] + public string xxscm_tx_po_line { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxscm_tx_part { get; set; } + + public decimal xxscm_tx_qty_total { get; set; } + + public decimal xxscm_tx_qty_std { get; set; } + + public DateTime xxscm_tx_date_ship { get; set; } + + public DateTime xxscm_tx_date_Promise { get; set; } + + public DateTime xxscm_tx_date_due { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_tx_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_tx_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_tx_vend { get; set; } + + [StringLength(20)] + public string xxscm_tx_ware_class { get; set; } + + [StringLength(20)] + public string xxscm_tx_ware { get; set; } + + public decimal xxscm_tx_pprice { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxscm_tx_po_um { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxscm_tx_loc_um { get; set; } + + public decimal xxscm_tx_conv { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_tx_type { get; set; } + + [StringLength(20)] + public string xxscm_tx_vend_batch { get; set; } + + [StringLength(1)] + public string xxscm_tx_qadread { get; set; } + + [StringLength(1)] + public string xxscm_tx_wmsread { get; set; } + + [StringLength(1)] + public string xxscm_tx_scmread { get; set; } + + [StringLength(1)] + public string xxscm_tx_mesread { get; set; } + + public string xxscm_tx_rmks { get; set; } + + public DateTime? xxscm_tx_createdt { get; set; } + + [StringLength(8)] + public string xxscm_tx_createur { get; set; } + + public DateTime? xxscm_tx_updatedt { get; set; } + + [StringLength(8)] + public string xxscm_tx_updateur { get; set; } + + [StringLength(8)] + public string xxscm_tx_status { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_bk_mstr.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_bk_mstr.cs new file mode 100644 index 0000000..b4beb26 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_bk_mstr.cs @@ -0,0 +1,84 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_bk_mstr + { + [Key] + public int xxwms_bk_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_bk_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_bk_nbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxwms_bk_part { get; set; } + + public DateTime xxwms_bk_date { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_bk_site { get; set; } + + public int xxwms_bk_op { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_bk_line { get; set; } + + [StringLength(18)] + public string xxwms_bk_lot { get; set; } + + public decimal xxwms_bk_qty { get; set; } + + public decimal xxwms_bk_qty_scrap { get; set; } + + public decimal xxwms_bk_qty_reject { get; set; } + + public decimal xxwms_bk_qty_receipt { get; set; } + + public DateTime xxwms_bk_time { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_bk_loc { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxwms_bk_um { get; set; } + + [StringLength(1)] + public string xxwms_bk_qadread { get; set; } + + [StringLength(1)] + public string xxwms_bk_wmsread { get; set; } + + [StringLength(1)] + public string xxwms_bk_scmread { get; set; } + + [StringLength(1)] + public string xxwms_bk_mesread { get; set; } + + public string xxwms_bk_rmks { get; set; } + + public DateTime? xxwms_bk_createdt { get; set; } + + [StringLength(18)] + public string xxwms_bk_createur { get; set; } + + public DateTime? xxwms_bk_updatedt { get; set; } + + [StringLength(18)] + public string xxwms_bk_updateur { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_bk_domain { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_ctrl.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_ctrl.cs new file mode 100644 index 0000000..ee4baf9 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_ctrl.cs @@ -0,0 +1,45 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_ctrl + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int xxwms_uid { get; set; } + + [Key] + [StringLength(50)] + public string xxwms_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_table { get; set; } + + public int xxwms_table_qty { get; set; } + + [StringLength(1)] + public string xxwms_qad { get; set; } + + [StringLength(1)] + public string xxwms_mes { get; set; } + + [StringLength(1)] + public string xxwms_scm { get; set; } + + [StringLength(1)] + public string xxwms_wms { get; set; } + + public string xxwms_rmks { get; set; } + + public DateTime xxwms_create_time { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_domain { get; set; } + + [StringLength(8)] + public string xxwms_site { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_iss_det.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_iss_det.cs new file mode 100644 index 0000000..9c3af5d --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_iss_det.cs @@ -0,0 +1,79 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_iss_det + { + [Key] + public int xxwms_iss_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_iss_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_iss_nbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_iss_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxwms_iss_part { get; set; } + + [StringLength(10)] + public string xxwms_iss_lot { get; set; } + + public decimal xxwms_iss_qty { get; set; } + + public DateTime xxwms_iss_date { get; set; } + + public DateTime xxwms_iss_time { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_iss_loc { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxwms_iss_um { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(100)] + public string xxwms_iss_reason { get; set; } + + [StringLength(1)] + public string xxwms_iss_qadread { get; set; } + + [StringLength(1)] + public string xxwms_iss_wmsread { get; set; } + + [StringLength(1)] + public string xxwms_iss_scmread { get; set; } + + [StringLength(1)] + public string xxwms_iss_mesread { get; set; } + + public string xxwms_iss_rmks { get; set; } + + public DateTime? xxwms_iss_createdt { get; set; } + + [StringLength(18)] + public string xxwms_iss_createur { get; set; } + + public DateTime? xxwms_iss_updatedt { get; set; } + + [StringLength(18)] + public string xxwms_iss_updateur { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_iss_domain { get; set; } + + [StringLength(8)] + public string xxwms_iss_project { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_ld_det.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_ld_det.cs new file mode 100644 index 0000000..f75a87e --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_ld_det.cs @@ -0,0 +1,76 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_ld_det + { + [Key] + public int xxwms_ld_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_ld_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(4)] + public string xxwms_ld_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxwms_ld_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_ld_vend { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_ld_loc { get; set; } + + [StringLength(20)] + public string xxwms_ld_lot { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_ld_vend_batch { get; set; } + + public decimal xxwms_ld_qty { get; set; } + + public DateTime xxwms_ld_date { get; set; } + + public DateTime xxwms_ld_time { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxwms_ld_um { get; set; } + + [StringLength(1)] + public string xxwms_ld_qadread { get; set; } + + [StringLength(1)] + public string xxwms_ld_wmsread { get; set; } + + [StringLength(1)] + public string xxwms_ld_scmread { get; set; } + + [StringLength(1)] + public string xxwms_ld_mesread { get; set; } + + public string xxwms_ld_rmks { get; set; } + + public DateTime? xxwms_ld_createdt { get; set; } + + [StringLength(18)] + public string xxwms_ld_createur { get; set; } + + public DateTime? xxwms_ld_updatedt { get; set; } + + [StringLength(18)] + public string xxwms_ld_updateur { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_ld_domain { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_rc_det.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_rc_det.cs new file mode 100644 index 0000000..1a3b07e --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_rc_det.cs @@ -0,0 +1,98 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_rc_det + { + [Key] + public int xxwms_rc_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_rc_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_rc_nbr { get; set; } + + [StringLength(20)] + public string xxwms_rc_ps_nbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_rc_po_nbr { get; set; } + + public int xxwms_rc_po_line { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxwms_rc_part { get; set; } + + public decimal xxwms_rc_qty_total { get; set; } + + public DateTime xxwms_rc_date_ship { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_rc_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_rc_vend { get; set; } + + [StringLength(20)] + public string xxwms_rc_ware_class { get; set; } + + [StringLength(20)] + public string xxwms_rc_ware { get; set; } + + [StringLength(8)] + public string xxwms_rc_loc { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxwms_rc_po_um { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxwms_rc_loc_um { get; set; } + + public decimal xxwms_rc_conv { get; set; } + + [StringLength(20)] + public string xxwms_rc_lot { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_rc_vend_batch { get; set; } + + [StringLength(1)] + public string xxwms_rc_qadread { get; set; } + + [StringLength(1)] + public string xxwms_rc_wmsread { get; set; } + + [StringLength(1)] + public string xxwms_rc_scmread { get; set; } + + [StringLength(1)] + public string xxwms_rc_mesread { get; set; } + + public string xxwms_rc_rmks { get; set; } + + public DateTime? xxwms_rc_createdt { get; set; } + + [StringLength(18)] + public string xxwms_rc_createur { get; set; } + + public DateTime? xxwms_rc_updatedt { get; set; } + + [StringLength(18)] + public string xxwms_rc_updateur { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_rc_domain { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_rct_det.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_rct_det.cs new file mode 100644 index 0000000..7336e4d --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_rct_det.cs @@ -0,0 +1,79 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_rct_det + { + [Key] + public int xxwms_rct_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_rct_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_rct_nbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_rct_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxwms_rct_part { get; set; } + + [StringLength(8)] + public string xxwms_rct_lot { get; set; } + + public decimal xxwms_rct_qty { get; set; } + + public DateTime xxwms_rct_date { get; set; } + + public DateTime xxwms_rct_time { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_rct_loc { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxwms_rct_um { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(100)] + public string xxwms_rct_reason { get; set; } + + [StringLength(1)] + public string xxwms_rct_qadread { get; set; } + + [StringLength(1)] + public string xxwms_rct_wmsread { get; set; } + + [StringLength(1)] + public string xxwms_rct_scmread { get; set; } + + [StringLength(1)] + public string xxwms_rct_mesread { get; set; } + + public string xxwms_rct_rmks { get; set; } + + public DateTime? xxwms_rct_createdt { get; set; } + + [StringLength(18)] + public string xxwms_rct_createur { get; set; } + + public DateTime? xxwms_rct_updatedt { get; set; } + + [StringLength(18)] + public string xxwms_rct_updateur { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_rct_domain { get; set; } + + [StringLength(8)] + public string xxwms_rct_project { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_rt_det.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_rt_det.cs new file mode 100644 index 0000000..20ffb30 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_rt_det.cs @@ -0,0 +1,95 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_rt_det + { + [Key] + public int xxwms_rt_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_rt_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_rt_nbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_rt_po_nbr { get; set; } + + public int xxwms_rt_po_line { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxwms_rt_part { get; set; } + + public decimal xxwms_rt_qty_total { get; set; } + + public DateTime xxwms_rt_date_ship { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_rt_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_rt_vend { get; set; } + + [StringLength(20)] + public string xxwms_rt_ware_class { get; set; } + + [StringLength(20)] + public string xxwms_rt_ware { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_rt_loc { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxwms_rt_po_um { get; set; } + + [StringLength(2)] + public string xxwms_rt_loc_um { get; set; } + + public decimal xxwms_rt_conv { get; set; } + + [StringLength(10)] + public string xxwms_rt_lot { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_rt_vend_batch { get; set; } + + [StringLength(1)] + public string xxwms_rt_qadread { get; set; } + + [StringLength(1)] + public string xxwms_rt_wmsread { get; set; } + + [StringLength(1)] + public string xxwms_rt_scmread { get; set; } + + [StringLength(1)] + public string xxwms_rt_mesread { get; set; } + + public string xxwms_rt_rmks { get; set; } + + public DateTime? xxwms_rt_createdt { get; set; } + + [StringLength(18)] + public string xxwms_rt_createur { get; set; } + + public DateTime? xxwms_rt_updatedt { get; set; } + + [StringLength(18)] + public string xxwms_rt_updateur { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_rt_domain { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_soiss_det.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_soiss_det.cs new file mode 100644 index 0000000..ed346dd --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_soiss_det.cs @@ -0,0 +1,72 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_soiss_det + { + [Key] + public int xxwms_soiss_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_soiss_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_soiss_nbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(10)] + public string xxwms_soiss_order { get; set; } + + public int xxwms_soiss_line { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxwms_soiss_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_soiss_loc { get; set; } + + public DateTime xxwms_soiss_date { get; set; } + + public decimal xxwms_soiss_qty { get; set; } + + [StringLength(8)] + public string xxwms_soiss_lot { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_soiss_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_soiss_domain { get; set; } + + [StringLength(1)] + public string xxwms_soiss_qadread { get; set; } + + [StringLength(1)] + public string xxwms_soiss_wmsread { get; set; } + + [StringLength(1)] + public string xxwms_soiss_scmread { get; set; } + + [StringLength(1)] + public string xxwms_soiss_mesread { get; set; } + + public string xxwms_soiss_rmks { get; set; } + + public DateTime? xxwms_soiss_createdt { get; set; } + + [StringLength(18)] + public string xxwms_soiss_createur { get; set; } + + public DateTime? xxwms_soiss_updatedt { get; set; } + + [StringLength(18)] + public string xxwms_soiss_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_tag_det.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_tag_det.cs new file mode 100644 index 0000000..1ad668f --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_tag_det.cs @@ -0,0 +1,66 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_tag_det + { + [Key] + public int xxwms_tag_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_tag_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_tag_nbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxwms_tag_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_tag_loc { get; set; } + + [StringLength(8)] + public string xxwms_tag_lot { get; set; } + + public DateTime xxwms_tag_date { get; set; } + + public decimal xxwms_tag_var_qty { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_tag_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_tag_domain { get; set; } + + [StringLength(1)] + public string xxwms_tag_qadread { get; set; } + + [StringLength(1)] + public string xxwms_tag_wmsread { get; set; } + + [StringLength(1)] + public string xxwms_tag_scmread { get; set; } + + [StringLength(1)] + public string xxwms_tag_mesread { get; set; } + + public string xxwms_tag_rmks { get; set; } + + public DateTime? xxwms_tag_createdt { get; set; } + + [StringLength(18)] + public string xxwms_tag_createur { get; set; } + + public DateTime? xxwms_tag_updatedt { get; set; } + + [StringLength(18)] + public string xxwms_tag_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_tr_det.cs b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_tr_det.cs new file mode 100644 index 0000000..4902dfb --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/UniApiEntity/xxwms_tr_det.cs @@ -0,0 +1,74 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_tr_det + { + [Key] + public int xxwms_tr_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_tr_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_tr_nbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_tr_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxwms_tr_part { get; set; } + + [StringLength(18)] + public string xxwms_tr_lot { get; set; } + + public decimal xxwms_tr_qty { get; set; } + + public DateTime xxwms_tr_date { get; set; } + + public DateTime xxwms_tr_time { get; set; } + + [StringLength(8)] + public string xxwms_tr_loc1 { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_tr_loc2 { get; set; } + + [StringLength(2)] + public string xxwms_tr_um { get; set; } + + [StringLength(1)] + public string xxwms_tr_qadread { get; set; } + + [StringLength(1)] + public string xxwms_tr_wmsread { get; set; } + + [StringLength(1)] + public string xxwms_tr_scmread { get; set; } + + [StringLength(1)] + public string xxwms_tr_mesread { get; set; } + + public string xxwms_tr_rmks { get; set; } + + public DateTime? xxwms_tr_createdt { get; set; } + + [StringLength(18)] + public string xxwms_tr_createur { get; set; } + + public DateTime? xxwms_tr_updatedt { get; set; } + + [StringLength(18)] + public string xxwms_tr_updateur { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_tr_domain { get; set; } + } +} diff --git a/北京北汽/SCP/CK.SCP.Models/packages.config b/北京北汽/SCP/CK.SCP.Models/packages.config new file mode 100644 index 0000000..2cd31a5 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Models/packages.config @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="EntityFramework" version="6.2.0" targetFramework="net452" /> + <package id="EntityFramework.zh-Hans" version="6.2.0" targetFramework="net452" /> + <package id="Newtonsoft.Json" version="10.0.3" targetFramework="net452" /> +</packages> \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/App (2).config b/北京北汽/SCP/CK.SCP.UniApi_CQ/App (2).config new file mode 100644 index 0000000..286b0f3 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/App (2).config @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<configuration> + <configSections> + + <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> + <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections> + <startup> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /> + </startup> + <entityFramework> + <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> + <parameters> + <parameter value="mssqllocaldb" /> + </parameters> + </defaultConnectionFactory> + <providers> + <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> + </providers> + </entityFramework> + <runtime> + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> + <dependentAssembly> + <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="EPPlus" publicKeyToken="ea159fdaa78159a1" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.5.2.1" newVersion="4.5.2.1" /> + </dependentAssembly> + </assemblyBinding> + </runtime> +</configuration> \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/App.config b/北京北汽/SCP/CK.SCP.UniApi_CQ/App.config new file mode 100644 index 0000000..286b0f3 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/App.config @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<configuration> + <configSections> + + <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> + <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections> + <startup> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /> + </startup> + <entityFramework> + <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> + <parameters> + <parameter value="mssqllocaldb" /> + </parameters> + </defaultConnectionFactory> + <providers> + <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> + </providers> + </entityFramework> + <runtime> + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> + <dependentAssembly> + <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="EPPlus" publicKeyToken="ea159fdaa78159a1" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.5.2.1" newVersion="4.5.2.1" /> + </dependentAssembly> + </assemblyBinding> + </runtime> +</configuration> \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/AppBox数据库设置.ini b/北京北汽/SCP/CK.SCP.UniApi_CQ/AppBox数据库设置.ini new file mode 100644 index 0000000..057afcc --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/AppBox数据库设置.ini @@ -0,0 +1,8 @@ +{ + "ݿ": "SQLServer", + "ַ": "127.0.0.1", + "˿": "1433", + "ݿ": "SCPAppBox", + "û": "sa", + "": "EF0D2F0DD771412E" +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/CK.SCP.GrupUniApi.csproj b/北京北汽/SCP/CK.SCP.UniApi_CQ/CK.SCP.GrupUniApi.csproj new file mode 100644 index 0000000..733061c --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/CK.SCP.GrupUniApi.csproj @@ -0,0 +1,192 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{6A22F275-D490-46B3-B183-35408BF106C4}</ProjectGuid> + <OutputType>WinExe</OutputType> + <RootNamespace>CK.SCP.UniApi</RootNamespace> + <AssemblyName>CK.SCP.UniApi</AssemblyName> + <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> + <PublishUrl>publish\</PublishUrl> + <Install>true</Install> + <InstallFrom>Disk</InstallFrom> + <UpdateEnabled>false</UpdateEnabled> + <UpdateMode>Foreground</UpdateMode> + <UpdateInterval>7</UpdateInterval> + <UpdateIntervalUnits>Days</UpdateIntervalUnits> + <UpdatePeriodically>false</UpdatePeriodically> + <UpdateRequired>false</UpdateRequired> + <MapFileExtensions>true</MapFileExtensions> + <ApplicationRevision>0</ApplicationRevision> + <ApplicationVersion>1.0.0.%2a</ApplicationVersion> + <IsWebBootstrapper>false</IsWebBootstrapper> + <UseApplicationTrust>false</UseApplicationTrust> + <BootstrapperEnabled>true</BootstrapperEnabled> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="DevComponents.DotNetBar.Layout, Version=14.1.0.21, Culture=neutral, PublicKeyToken=7eb7c3a35b91de04, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\DLL\DevComponents.DotNetBar.Layout.dll</HintPath> + </Reference> + <Reference Include="DevComponents.DotNetBar2, Version=14.1.0.21, Culture=neutral, PublicKeyToken=7eb7c3a35b91de04, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\DLL\DevComponents.DotNetBar2.dll</HintPath> + </Reference> + <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> + <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath> + </Reference> + <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> + <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath> + </Reference> + <Reference Include="Newtonsoft.Json"> + <HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net20\Newtonsoft.Json.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.ComponentModel.DataAnnotations" /> + <Reference Include="System.Core" /> + <Reference Include="System.Transactions" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Deployment" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="CktUniApiButton.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Include="CktUniApiButton.Designer.cs"> + <DependentUpon>CktUniApiButton.cs</DependentUpon> + </Compile> + <Compile Include="Controller\OdbcApiWmsController.cs" /> + <Compile Include="UniApiController.cs" /> + <Compile Include="Config\ApiType.cs" /> + <Compile Include="Config\CommonConfig.cs" /> + <Compile Include="Config\DurationConfig.cs" /> + <Compile Include="Config\FtpConfig.cs" /> + <Compile Include="Config\UniApiConfig.cs" /> + <Compile Include="Controller\OdbcApiQadController.cs" /> + <Compile Include="Controller\OdbcApiScpController.cs" /> + <Compile Include="FormMain.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="FormMain.Designer.cs"> + <DependentUpon>FormMain.cs</DependentUpon> + </Compile> + <Compile Include="GlobalVar.cs" /> + <Compile Include="IApi.cs" /> + <Compile Include="PopupSetting.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="PopupSetting.Designer.cs"> + <DependentUpon>PopupSetting.cs</DependentUpon> + </Compile> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="QadOdbcApi.cs" /> + <Compile Include="StringRedir.cs" /> + <EmbeddedResource Include="CktUniApiButton.resx"> + <DependentUpon>CktUniApiButton.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="FormMain.resx"> + <DependentUpon>FormMain.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="PopupSetting.resx"> + <DependentUpon>PopupSetting.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + <SubType>Designer</SubType> + </EmbeddedResource> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Resources.resx</DependentUpon> + <DesignTime>True</DesignTime> + </Compile> + <None Include="AppBox数据库设置.ini" /> + <None Include="ClassDiagram1.cd" /> + <None Include="ERP接口设置.ini" /> + <None Include="packages.config" /> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + <None Include="Scp数据库设置.ini" /> + <None Include="执行周期设置.ini" /> + <None Include="接口数据库设置.ini" /> + <None Include="通用设置.ini" /> + </ItemGroup> + <ItemGroup> + <None Include="App.config" /> + </ItemGroup> + <ItemGroup> + <Content Include="interface.ico" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Common\CK.SCP.Common.csproj"> + <Project>{3d6090ab-2f0c-4350-aef3-59dd73eab1aa}</Project> + <Name>CK.SCP.Common</Name> + </ProjectReference> + <ProjectReference Include="..\Controller\CK.SCP.Controller.csproj"> + <Project>{D096D4FF-9546-4137-9A02-9070E70DC760}</Project> + <Name>CK.SCP.Controller</Name> + </ProjectReference> + <ProjectReference Include="..\Models\CK.SCP.Models.csproj"> + <Project>{74dce5f2-a501-45f2-b4f9-494aa1867226}</Project> + <Name>CK.SCP.Models</Name> + </ProjectReference> + <ProjectReference Include="..\Utils\CK.SCP.Utils.csproj"> + <Project>{4c6a951d-ad7f-47ce-b2ce-32c205d8d6ba}</Project> + <Name>CK.SCP.Utils</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <WCFMetadata Include="Service References\" /> + </ItemGroup> + <ItemGroup> + <BootstrapperPackage Include=".NETFramework,Version=v4.5.2"> + <Visible>False</Visible> + <ProductName>Microsoft .NET Framework 4.5.2 %28x86 和 x64%29</ProductName> + <Install>true</Install> + </BootstrapperPackage> + <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> + <Visible>False</Visible> + <ProductName>.NET Framework 3.5 SP1</ProductName> + <Install>false</Install> + </BootstrapperPackage> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project> \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/CK.SCP.UniApi_CQ.csproj b/北京北汽/SCP/CK.SCP.UniApi_CQ/CK.SCP.UniApi_CQ.csproj new file mode 100644 index 0000000..2bb6371 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/CK.SCP.UniApi_CQ.csproj @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{5D5E1718-A898-45EE-A45E-69C80AE3F947}</ProjectGuid> + <OutputType>WinExe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>CK.SCP.UniApi_CQ</RootNamespace> + <AssemblyName>CK.SCP.UniApi_CQ</AssemblyName> + <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Deployment" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Form1.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="Form1.Designer.cs"> + <DependentUpon>Form1.cs</DependentUpon> + </Compile> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + <SubType>Designer</SubType> + </EmbeddedResource> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + </ItemGroup> + <ItemGroup> + <None Include="App.config" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/CktUniApiButton.Designer.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/CktUniApiButton.Designer.cs new file mode 100644 index 0000000..8f9d838 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/CktUniApiButton.Designer.cs @@ -0,0 +1,162 @@ +namespace CK.SCP.GrupUniApi +{ + partial class CktUniApiButton + { + /// <summary> + /// 必需的设计器变量。 + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// 清理所有正在使用的资源。 + /// </summary> + /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// <summary> + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// </summary> + private void InitializeComponent() + { + this.groupPanel = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.ButtonManual = new DevComponents.DotNetBar.ButtonX(); + this.IntCounter = new DevComponents.Editors.IntegerInput(); + this.Switch = new DevComponents.DotNetBar.Controls.SwitchButton(); + this.groupPanel.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.IntCounter)).BeginInit(); + this.SuspendLayout(); + // + // groupPanel + // + this.groupPanel.CanvasColor = System.Drawing.SystemColors.Control; + this.groupPanel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.groupPanel.Controls.Add(this.ButtonManual); + this.groupPanel.Controls.Add(this.IntCounter); + this.groupPanel.Controls.Add(this.Switch); + this.groupPanel.DisabledBackColor = System.Drawing.Color.Empty; + this.groupPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupPanel.Location = new System.Drawing.Point(2, 2); + this.groupPanel.Margin = new System.Windows.Forms.Padding(2); + this.groupPanel.Name = "groupPanel"; + this.groupPanel.Padding = new System.Windows.Forms.Padding(2); + this.groupPanel.Size = new System.Drawing.Size(156, 46); + // + // + // + this.groupPanel.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.groupPanel.Style.BackColorGradientAngle = 90; + this.groupPanel.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.groupPanel.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.groupPanel.Style.BorderBottomWidth = 1; + this.groupPanel.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.groupPanel.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.groupPanel.Style.BorderLeftWidth = 1; + this.groupPanel.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.groupPanel.Style.BorderRightWidth = 1; + this.groupPanel.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.groupPanel.Style.BorderTopWidth = 1; + this.groupPanel.Style.CornerDiameter = 4; + this.groupPanel.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.groupPanel.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.groupPanel.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.groupPanel.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.groupPanel.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.groupPanel.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.groupPanel.TabIndex = 18; + this.groupPanel.Text = "标题"; + // + // ButtonManual + // + this.ButtonManual.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.ButtonManual.ColorTable = DevComponents.DotNetBar.eButtonColor.BlueOrb; + this.ButtonManual.Dock = System.Windows.Forms.DockStyle.Fill; + this.ButtonManual.Location = new System.Drawing.Point(52, 2); + this.ButtonManual.Margin = new System.Windows.Forms.Padding(2); + this.ButtonManual.Name = "ButtonManual"; + this.ButtonManual.Size = new System.Drawing.Size(62, 18); + this.ButtonManual.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ButtonManual.TabIndex = 4; + this.ButtonManual.Text = "手动执行"; + this.ButtonManual.Click += new System.EventHandler(this.ButtonManual_Click); + // + // IntCounter + // + // + // + // + this.IntCounter.BackgroundStyle.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(231)))), ((int)(((byte)(227)))), ((int)(((byte)(231))))); + this.IntCounter.BackgroundStyle.Class = "DateTimeInputBackground"; + this.IntCounter.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.IntCounter.ButtonFreeText.Shortcut = DevComponents.DotNetBar.eShortcut.F2; + this.IntCounter.Dock = System.Windows.Forms.DockStyle.Right; + this.IntCounter.IsInputReadOnly = true; + this.IntCounter.Location = new System.Drawing.Point(114, 2); + this.IntCounter.Margin = new System.Windows.Forms.Padding(2); + this.IntCounter.MinValue = 0; + this.IntCounter.Name = "IntCounter"; + this.IntCounter.Size = new System.Drawing.Size(34, 21); + this.IntCounter.TabIndex = 13; + // + // Switch + // + this.Switch.AnimationEnabled = false; + this.Switch.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.Switch.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.Switch.Cursor = System.Windows.Forms.Cursors.Hand; + this.Switch.Dock = System.Windows.Forms.DockStyle.Left; + this.Switch.Location = new System.Drawing.Point(2, 2); + this.Switch.Margin = new System.Windows.Forms.Padding(2); + this.Switch.Name = "Switch"; + this.Switch.OffBackColor = System.Drawing.Color.DarkRed; + this.Switch.OffTextColor = System.Drawing.Color.White; + this.Switch.OnBackColor = System.Drawing.Color.Lime; + this.Switch.OnTextColor = System.Drawing.Color.Black; + this.Switch.ReadOnlyMarkerColor = System.Drawing.Color.Teal; + this.Switch.Size = new System.Drawing.Size(50, 18); + this.Switch.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.Switch.SwitchWidth = 20; + this.Switch.TabIndex = 11; + this.Switch.ValueChanged += new System.EventHandler(this.Switch_ValueChanged); + // + // CktUniApiButton + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.groupPanel); + this.Margin = new System.Windows.Forms.Padding(2); + this.Name = "CktUniApiButton"; + this.Padding = new System.Windows.Forms.Padding(2); + this.Size = new System.Drawing.Size(160, 50); + this.groupPanel.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.IntCounter)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DevComponents.DotNetBar.Controls.GroupPanel groupPanel; + private DevComponents.DotNetBar.ButtonX ButtonManual; + private DevComponents.DotNetBar.Controls.SwitchButton Switch; + private DevComponents.Editors.IntegerInput IntCounter; + } +} diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/CktUniApiButton.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/CktUniApiButton.cs new file mode 100644 index 0000000..c251f34 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/CktUniApiButton.cs @@ -0,0 +1,118 @@ +using System; +using System.Windows.Forms; + +namespace CK.SCP.GrupUniApi +{ + public partial class CktUniApiButton : UserControl + { + public string Title + { + get{return groupPanel.Text;} + set{groupPanel.Text = value;} + } + + public bool SwitchEnabled + { + get { return Switch.Value; } + set { Switch.Value = value; } + } + + public int InitCount { get; set; } + + public int Count + { + get { return IntCounter.Value; } + set { IntCounter.Value = value; } + } + + public bool EnableManual + { + get { return ButtonManual.Enabled; } + set { ButtonManual.Enabled = value; } + } + + public CktUniApiButton() + { + InitializeComponent(); + } + + public delegate void ButtonClickHandler(object sender, EventArgs e); + public event ButtonClickHandler ButtonClick; + private void ButtonManual_Click(object sender, EventArgs e) + { + try + { + Console.WriteLine($@"手动执行:{Title}。"); + RunOnceExecuted(); + ButtonClick?.Invoke(sender, e); + } + catch + { + // ignored + } + } + public delegate void SwitchValueChangedHandler(object sender, EventArgs e); + public event SwitchValueChangedHandler SwitchValueChanged; + private void Switch_ValueChanged(object sender, EventArgs e) + { + try + { + SwitchValueChanged?.Invoke(sender, e); + } + catch + { + // ignored + } + } + + public delegate void RunOnceHandler(); + + public event RunOnceHandler RunOnceExecute; + + private void RunOnceExecuted() + { + try + { + RunOnceExecute?.Invoke(); + } + catch + { + // ignored + } + } + + + public void Start() + { + if (!SwitchEnabled) return; + Console.WriteLine($@"启动:{Title},执行周期:{Count}秒。"); + RunOnceExecuted(); + Count = InitCount; + } + + + public void Stop() + { + if (!SwitchEnabled) return; + Console.WriteLine($@"停止:{Title}。"); + } + + + + public void RunOnce() + { + if (!SwitchEnabled) return; + if (Count == 0) + { + RunOnceExecuted(); + Count = InitCount; + } + else + { + Count--; + } + + + } + } +} diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/CktUniApiButton.resx b/北京北汽/SCP/CK.SCP.UniApi_CQ/CktUniApiButton.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/CktUniApiButton.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/ClassDiagram1.cd b/北京北汽/SCP/CK.SCP.UniApi_CQ/ClassDiagram1.cd new file mode 100644 index 0000000..7b89419 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/ClassDiagram1.cd @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<ClassDiagram /> \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/Config/ApiType.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/Config/ApiType.cs new file mode 100644 index 0000000..3b1552d --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/Config/ApiType.cs @@ -0,0 +1,8 @@ +namespace CK.SCP.GrupUniApi.Config +{ + public enum ApiType + { + Odbc = 0, + QadCsv = 1, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/Config/CommonConfig.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/Config/CommonConfig.cs new file mode 100644 index 0000000..4a4416a --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/Config/CommonConfig.cs @@ -0,0 +1,11 @@ + + +namespace CK.SCP.GrupUniApi.Config +{ + public class CommonConfig + { + public string WMS接口数据流水号格式 { get; set; } = "yyMMdd_HHmmssffff"; + public string QAD域 { get; set; } = "CAAIYJ"; + public string QAD地点 { get; set; } = "CAAIYJ"; + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/Config/DurationConfig.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/Config/DurationConfig.cs new file mode 100644 index 0000000..1ae049f --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/Config/DurationConfig.cs @@ -0,0 +1,15 @@ +namespace CK.SCP.GrupUniApi.Config +{ + public class DurationConfig + { + public int ERP接口发送 { get; set; } = 300; + public int ERP接口接收 { get; set; } = 300; + public int CsAntolinMES接口 { get; set; } = 217; + public int CsAntolinJIS搜索客户零件号变更 { get; set; } = 1; + public int CsAntolinJIS接收排序发货单 { get; set; } = 60; + public int CsAntolinVIN执行程序 { get; set; } = 60; + public int CqBmptMES接口 { get; set; } = 300; + public int CqBmptEdiPut接口 { get; set; } = 600; + public int CqBmptEdiGet接口 { get; set; } = 600; + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/Config/FtpConfig.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/Config/FtpConfig.cs new file mode 100644 index 0000000..c676f77 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/Config/FtpConfig.cs @@ -0,0 +1,22 @@ +namespace CK.SCP.GrupUniApi.Config +{ + public class FtpConfig + { + public string ظĿ¼ { get; set; } = "c:\\"; + public string ؽĿ¼ { get; set; } = "FromErp"; + public string طĿ¼ { get; set; } = "ToErp"; + public string رĿ¼ { get; set; } = "Bak"; + + public bool ǷִFTP { get; set; } = true; + public string ַ { get; set; } = "127.0.0.1"; + public string ˿ { get; set; } = "21"; + public string û { get; set; } = "admin"; + public string { get; set; } = "5E0AFEB85CA001A3371A9F19E7EC4DFF"; + public string Զ̸Ŀ¼ { get; set; } = "/"; + public string ԶToErpĿ¼ { get; set; } = "in"; + public string ԶFromErpĿ¼ { get; set; } = "toWms"; + public string ԶBakĿ¼ { get; set; } = "bak"; + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/Config/UniApiConfig.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/Config/UniApiConfig.cs new file mode 100644 index 0000000..1b0f31a --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/Config/UniApiConfig.cs @@ -0,0 +1,24 @@ +namespace CK.SCP.GrupUniApi.Config +{ + public class UniApiConfig + { + + public bool Scm采购订单 { get; set; } = true; + public bool Scm发货单 { get; set; } = true; + public bool Scm条码明细 { get; set; } = true; + public bool Scm发票 { get; set; } = false; + + public bool Qad零件 { get; set; } = true; + public bool Qad供应商 { get; set; } = true; + public bool Qad供应商零件 { get; set; } = true; + public bool Qad采购订单 { get; set; } = false; + //public bool Qad收货单 { get; set; } = true; + + public bool Wms收货单 { get; set; } = true; + public bool Wms退货单 { get; set; } = true; + public bool Wms库存 { get; set; } = true; + public bool Wms到货单 { get; set; } = true; + + public bool Wms库存质量 { get; set; } = true; + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/Controller/OdbcApiQadController.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/Controller/OdbcApiQadController.cs new file mode 100644 index 0000000..9b5ac8c --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/Controller/OdbcApiQadController.cs @@ -0,0 +1,445 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Models.UniApiEntity; +using CK.SCP.Utils; +using CK.SCP.Controller; +using System.Text; +using System.Data.Entity.Core; + +namespace CK.SCP.GrupUniApi.Controller +{ + public static class OdbcApiQadController + { + + public static void GetNewCtrlList() + { + UniApiEntities idb = EntitiesFactory.CreateUniApiInstance(); + idb.Database.CommandTimeout = 60 * 20; + var tableNameList = EnumHelper.EnumToList<QadTableName>(); + // var qadCtrlList = idb.xxqad_ctrl.Where(p => p.xxqad_domain == ScpCache.Config.QAD && p.xxqad_scm == "0").ToList(); + var qadCtrlList = idb.xxqad_ctrl.Where(p => p.xxqad_scm == "0" ).ToList(); + foreach (var qadCtrl in qadCtrlList) + { + if (tableNameList.All(p => p.Name != qadCtrl.xxqad_table)) continue; + try + { + ScpEntities wdb = EntitiesFactory.CreateScpInstance(); + QadTableName qadTableName; + Enum.TryParse(qadCtrl.xxqad_table, false, out qadTableName); + switch (qadTableName) + { + case QadTableName.xxqad_pt_mstr: // + if (GlobalVar.ApiConfig.Qad) + { + Console.WriteLine($" QAD ӿݣ{qadCtrl.xxqad_table}:{qadCtrl.xxqad_table_qty}"); + UpdateParts(idb, wdb, qadCtrl.xxqad_seq); + } + else + continue; + break; + case QadTableName.xxqad_vd_mstr: //Ӧ + if (GlobalVar.ApiConfig.QadӦ) + { + Console.WriteLine($" QAD ӿݣ{qadCtrl.xxqad_table}:{qadCtrl.xxqad_table_qty}"); + UpdateVender(idb, wdb, qadCtrl.xxqad_seq); + } + else + continue; + break; + + case QadTableName.xxqad_vp_mstr: //Ӧ + if (GlobalVar.ApiConfig.QadӦ) + { + Console.WriteLine($" QAD ӿݣ{qadCtrl.xxqad_table}:{qadCtrl.xxqad_table_qty}"); + UpdateVendParts(idb, wdb, qadCtrl.xxqad_seq); + } + else + continue; + break; + case QadTableName.xxqad_pod_det: //ɹ + if (GlobalVar.ApiConfig.Qadɹ) + { + Console.WriteLine($" QAD ӿݣ{qadCtrl.xxqad_table}:{qadCtrl.xxqad_table_qty}"); + UpdatePurchaseOrders(idb, wdb, qadCtrl.xxqad_seq); + } + else + continue; + break; + case QadTableName.xxqad_pprice_det: //ɹ۸ + + Console.WriteLine($" QAD ӿݣ{qadCtrl.xxqad_table}:{qadCtrl.xxqad_table_qty}"); + UpdatePrice(idb, wdb, qadCtrl.xxqad_seq); + + break; + } + qadCtrl.xxqad_scm = ((int)UniApiState.ɹ).ToString(); + EntitiesFactory.SaveDb(wdb); + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//ʵ֤쳣 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("{0}ֶΣ{1}Ϣ{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + qadCtrl.xxqad_scm = ((int)UniApiState.ʧ).ToString(); + qadCtrl.xxqad_rmks += " SCM:" + sb.ToString(); + + } + catch (OptimisticConcurrencyException ex)//ͻ쳣 + { + qadCtrl.xxqad_scm = ((int)UniApiState.ʧ).ToString(); + qadCtrl.xxqad_rmks += " SCM:" + ex.Message; + + } + catch (Exception ex) + { + qadCtrl.xxqad_scm = ((int)UniApiState.ʧ).ToString(); + qadCtrl.xxqad_rmks += " SCM:" + ex.Message; + + } + finally + { + EntitiesFactory.SaveDb(idb); + } + } + + + + } + + + + /// <summary> + /// ²ɹ + /// </summary> + /// <param name="idb"></param> + /// <param name="wdb"></param> + /// <param name="seq"></param> + private static void UpdatePurchaseOrders(UniApiEntities idb, ScpEntities wdb, string seq) + { + // var qadPoDetailList = idb.xxqad_pod_det.Where(p => p.xxqad_pod_seq == seq).ToList(); ԭ xxqad_pod_modtype 1Ϊ󶩵 + var qadPoDetailList = idb.xxqad_pod_det.Where(p => p.xxqad_pod_seq == seq && p.xxqad_pod_scmread == "0").ToList(); + + var wmsPoList = new List<TB_PO>(); + var wmsPoDetailList = new List<TB_PO_DETAIL>(); + + var qadPoNbrList = qadPoDetailList.Select(p => p.xxqad_pod_nbr.ToUpper()).DistinctBy(p => p); + + foreach (var qadPoNbr in qadPoNbrList) + { + var qadDataList = qadPoDetailList.Where(p => p.xxqad_pod_nbr == qadPoNbr).ToList(); + if (qadDataList.Count == 0) + { + continue; + } + var firstqadData = qadDataList[0]; + //var wmsPo = wdb.TF_PO.SingleOrDefault(p => p.ErpBillNum == qadPoNbr); + var wmsPo = wdb.TB_PO.SingleOrDefault(p => p.ErpBillNum == qadPoNbr); + if (wmsPo == null) + { + + + int temp; + string strPoBillNum = SCP_BILLCODE_CONTROLLER.MakePOCode(); + wmsPo = new TB_PO + { + PoBillNum = qadPoNbr,// + ErpBillNum = qadPoNbr,//ERP + VendId = firstqadData.xxqad_pod_vend,//Ӧ̱ + ModType = Int32.TryParse(firstqadData.xxqad_pod_modtype, out temp) ? temp : (int?)null, //(1:ճ̵,2:ɢ) + Contacter = firstqadData.xxqad_pod_attn,//ϵ + Site = firstqadData.xxqad_pod_domain,//ص + + + //Buyer = firstqadData.xxqad_pod_buyer,//ɹԱ + //BuyerPhone = firstqadData.xxqad_pod_buyer_phone,//ɹԱ绰 + State = (int)FormState.,//״̬ + Remark = firstqadData.xxqad_pod_site,//˵ + CreateTime = firstqadData.xxqad_pod_createdt == null ? DateTime.Now : (DateTime)firstqadData.xxqad_pod_createdt,// + CreateUser = firstqadData.xxqad_pod_createur,//û + //UpdateTime = firstqadData.xxqad_pod_updatedt,// + //UpdateUser = firstqadData.xxqad_pod_updateur,//û + IsDeleted = false, + GUID = System.Guid.NewGuid(), + BeginTime = firstqadData.xxqad_pod_createdt,// + EndTime = firstqadData.xxqad_pod_due_date//ջʱ + }; + wmsPoList.Add(wmsPo); + } + + wmsPo.Contacter = firstqadData.xxqad_pod_attn; + wmsPo.Buyer = firstqadData.xxqad_pod_buyer; + wmsPo.BuyerPhone = firstqadData.xxqad_pod_buyer_phone; + + wmsPo.UpdateTime = firstqadData.xxqad_pod_updatedt;// + wmsPo.UpdateUser = firstqadData.xxqad_pod_updateur;//û + + foreach (var qadData in qadDataList) + { + try + { + var lineNum = Convert.ToInt32(qadData.xxqad_pod_line); + //var wmsPoDetail = + // wdb.TF_PO_DETAIL.SingleOrDefault( + // p => p.ErpBillNum == qadPoNbr && p.LineNum == lineNum); + var wmsPoDetail = + wdb.TB_PO_DETAIL.SingleOrDefault( + p => p.PoBillNum == qadPoNbr && p.PoLine == lineNum); + if (wmsPoDetail == null) + { + wmsPoDetail = new TB_PO_DETAIL + { + PoBillNum = qadPoNbr,// + PoLine = lineNum,// + IsDeleted = false, + GUID = System.Guid.NewGuid() + }; + wmsPoDetailList.Add(wmsPoDetail); + } + + wmsPoDetail.PartCode = qadData.xxqad_pod_part.ToUpper();//-Ϻ + wmsPoDetail.PlanQty = qadData.xxqad_pod_qty_ord;//-ɹ + //wmsPoDetail.ShippedQty = qadData.xxqad_pod_qty_rct;//ѷ-ջ + //wmsPoDetail.ReceivedQty = qadData.xxqad_pod_qty_rct;//-ջ + //wmsPoDetail.RejectQty = qadData.xxqad_pod_qty_rct;//-ջ + wmsPoDetail.BeginTime = firstqadData.xxqad_pod_createdt;//ջʼʱ + wmsPoDetail.EndTime = qadData.xxqad_pod_due_date;//ջʱ + wmsPoDetail.PoUnit = qadData.xxqad_pod_um;//ɹλ + wmsPoDetail.LocUnit = qadData.xxqad_pod_loc_um.ToUpper();//洢λ + wmsPoDetail.DockCode = qadData.xxqad_pod_loc; + wmsPoDetail.Price = ScpCache.Config.Ŀ == ProjectName.챱ģ.ToString() + ? 0 + : qadData.xxqad_pod_price; + wmsPoDetail.Currency = qadData.xxqad_pod_curr;// + wmsPoDetail.PackQty = qadData.xxqad_pod_qty_std;// + wmsPoDetail.UnConv = qadData.xxqad_pod_um_conv;//ת + + wmsPoDetail.DockCode = qadData.xxqad_pod_loc; + //wmsPoDetail.DockCode = ?;// + wmsPoDetail.State = Convert.ToInt32(qadData.xxqad_pod_status);//״̬ + wmsPoDetail.Remark = qadData.xxqad_pod_domain;//ע + wmsPoDetail.CreateTime = firstqadData.xxqad_pod_createdt == null ? DateTime.Now : (DateTime)firstqadData.xxqad_pod_createdt;// + wmsPoDetail.CreateUser = firstqadData.xxqad_pod_createur;//û + wmsPoDetail.UpdateTime = firstqadData.xxqad_pod_updatedt;// + wmsPoDetail.UpdateUser = firstqadData.xxqad_pod_updateur;//û + + //if (wmsPoDetail.BillQty != 0 && wmsPoDetail.BillQty <= wmsPoDetail.ReceivedQty) + // wmsPoDetail.State = (int)FormState.ر; + + if (wmsPoDetail.PlanQty != 0 && wmsPoDetail.PlanQty <= wmsPoDetail.ReceivedQty) + wmsPoDetail.State = (int)FormState.ر; + + qadData.xxqad_pod_scmread = ((int)UniApiState.ɹ).ToString(); + } + catch (Exception ex) + { + qadData.xxqad_pod_scmread = ((int)UniApiState.ʧ).ToString(); + qadData.xxqad_pod_rmks += " SCM:" + ex.Message; + } + qadData.xxqad_pod_updateur = ScpCache.Config.SCPû; + qadData.xxqad_pod_updatedt = DateTime.Now; + + } + wmsPo.State = qadDataList.All(p => p.xxqad_pod_status == ((int)FormState.ر).ToString()) + ? (int)FormState.ر + : (int)FormState.; + } + wdb.TB_PO.AddOrUpdate(wmsPoList.ToArray()); + wdb.TB_PO_DETAIL.AddOrUpdate(wmsPoDetailList.ToArray()); + Console.WriteLine($" ɹ ݣ{qadPoDetailList.Count}"); + } + /// <summary> + /// ²ɹ + /// </summary> + /// <param name="idb"></param> + /// <param name="wdb"></param> + /// <param name="seq"></param> + private static void UpdatePrice(UniApiEntities idb, ScpEntities scpdb, string seq) + { + var _list = idb.xxqad_pprice_det.Where(p => p.xxqad_pprice_seq == seq && p.xxqad_pprice_scmread == "0").ToList(); + var PriceList = new List<TB_PRICE>(); + foreach (var itm in _list) + { + var _price= new TB_PRICE + { + VendId = itm.xxqad_pprice_list, + Unit = itm.xxqad_pprice_um, + PartCode = itm.xxqad_pprice_part, + Site = itm.xxqad_pprice_domain, + Remarks = itm.xxqad_pprice_rmks, + StartTime = itm.xxqad_pprice_start, + EndTime = itm.xxqad_pprice_end, + Curr = itm.xxqad_pprice_curr + }; + _price.Amt = itm.xxqad_pprice_amt; + PriceList.Add(_price); + } + scpdb.TB_PRICE.AddOrUpdate(PriceList.ToArray()); + Console.WriteLine($"²ɹ۸ݣ{PriceList.Count}"); + } + /// <summary> + /// ¹Ӧ + /// </summary> + /// <param name="idb"></param> + /// <param name="wdb"></param> + /// <param name="seq"></param> + private static void UpdateVendParts(UniApiEntities idb, ScpEntities wdb, string seq) + { + var qadDataList = idb.xxqad_vp_mstr.Where(p => p.xxqad_vp_seq == seq ).ToList(); + var wmsDataList = new List<TA_VEND_PART>(); + foreach (var qadData in qadDataList) + { + try + { + if (string.IsNullOrEmpty(qadData.xxqad_vp_vend_part)) + qadData.xxqad_vp_vend_part = qadData.xxqad_vp_part; + var wmsData = + wdb.TA_VEND_PART.SingleOrDefault( + p => p.VendId == qadData.xxqad_vp_addr.ToUpper() + && p.PartCode == qadData.xxqad_vp_part.ToUpper() + && p.VendPartCode == qadData.xxqad_vp_vend_part.ToUpper() && p.Site==qadData.xxqad_vp_domain + ) ?? + new TA_VEND_PART + { + VendId = qadData.xxqad_vp_addr.ToUpper(),//Ӧ̱ + PartCode = qadData.xxqad_vp_part.ToUpper(),//ӦϺ + VendPartCode = qadData.xxqad_vp_vend_part.ToUpper(),//ӦϺ + VendPackQty = qadData.xxqad_vp_comment,//ӦϺ + //PoUnit = qadData.,//ɹλ + State = 1,//״̬0ʧЧ 1:Ч + Remark = "", + CreateTime = qadData.xxqad_vp_createdt == null ? DateTime.Now : (DateTime)qadData.xxqad_vp_createdt,// + CreateUser = qadData.xxqad_vp_createur,//û + UpdateTime = qadData.xxqad_vp_updatedt,// + UpdateUser = qadData.xxqad_vp_updateur,//û + TransportationTime=qadData.xxqad_vp_vend_lead, + IsDeleted = false, + GUID = new Guid() + }; + wmsData.Site = string.IsNullOrEmpty(wmsData.Site) ? qadData.xxqad_vp_domain : wmsData.Site; + wmsData.VendPartCode = qadData.xxqad_vp_vend_part?.ToUpper() ?? qadData.xxqad_vp_part.ToUpper(); + wmsData.VendPackQty = qadData.xxqad_vp_comment; + wmsData.TransportationTime = qadData.xxqad_vp_vend_lead; + wmsDataList.Add(wmsData); + qadData.xxqad_vp_scmread = ((int)UniApiState.ɹ).ToString(); + } + catch (Exception ex) + { + qadData.xxqad_vp_scmread = ((int)UniApiState.ʧ).ToString(); + qadData.xxqad_vp_rmks += " SCM:" + ex.Message; + } + qadData.xxqad_vp_updateur = ScpCache.Config.SCPû; + qadData.xxqad_vp_updatedt = DateTime.Now; + + } + wdb.TA_VEND_PART.AddOrUpdate(p=>new { p.PartCode,p.VendId, p.Site }, wmsDataList.ToArray()); + Console.WriteLine($" Ӧ ݣ{wmsDataList.Count}"); + } + + /// <summary> + /// ¹Ӧ + /// </summary> + /// <param name="idb"></param> + /// <param name="wdb"></param> + /// <param name="seq"></param> + private static void UpdateVender(UniApiEntities idb, ScpEntities wdb, string seq) + { + var qadDataList = idb.xxqad_vd_mstr.Where(p => p.xxqad_vd_seq == seq ).ToList(); + var wmsDataList = new List<TA_VENDER>(); + + foreach (var qadData in qadDataList) + { + try + { + var wmsData = wdb.TA_VENDER.SingleOrDefault(p => p.VendId == qadData.xxqad_vd_addr.ToUpper() && p.Site==qadData.xxqad_vd_domain) ?? + new TA_VENDER { VendId = qadData.xxqad_vd_addr.ToUpper(), VendAbbCode = "0", State = 1 }; + wmsData.VendName = string.IsNullOrEmpty(qadData.xxqad_vd_name)?qadData.xxqad_vd_addr:qadData.xxqad_vd_name; + wmsData.VendType = qadData.xxqad_vd_type.ToUpper().ToString(); + wmsData.Country = qadData.xxqad_vd_country; + wmsData.City = qadData.xxqad_vd_city; + wmsData.Currency = qadData.xxqad_vd_curr.ToUpper(); + wmsData.Address = qadData.xxqad_vd_line1 + qadData.xxqad_vd_line2 + qadData.xxqad_vd_line3; + wmsData.ZipCode = qadData.xxqad_vd_pst_id; + wmsData.Contacter = qadData.xxqad_vd_attn; + wmsData.Phone = qadData.xxqad_vd_phone; + wmsData.Fax = qadData.xxqad_vd_fax; + wmsData.Site = string.IsNullOrEmpty(wmsData.Site)? qadData.xxqad_vd_domain:wmsData.Site; + wmsData.Tax = qadData.xxqad_vd_tax;//˰ + wmsDataList.Add(wmsData); + qadData.xxqad_vd_scmread = ((int)UniApiState.ɹ).ToString(); + + } + catch (Exception ex) + { + qadData.xxqad_vd_scmread = ((int)UniApiState.ʧ).ToString(); + qadData.xxqad_vd_rmks += " SCM:" + ex.Message; + } + qadData.xxqad_vd_updateur = ScpCache.Config.SCPû; + qadData.xxqad_vd_updatedt = DateTime.Now; + } + if (wmsDataList.Count == 0) + { + Console.WriteLine(" Ӧ :"+ seq+""); + return; + } + + wdb.TA_VENDER.AddOrUpdate(p=>new {p.VendId,p.Site } ,wmsDataList.ToArray()); + Console.WriteLine($" Ӧ ݣ{qadDataList.Count}"); + } + + /// <summary> + /// + /// </summary> + /// <param name="idb"></param> + /// <param name="wdb"></param> + /// <param name="seq"></param> + private static void UpdateParts(UniApiEntities idb, ScpEntities wdb, string seq) + { + var qadDataList = idb.xxqad_pt_mstr.Where(p => p.xxqad_pt_seq == seq ).ToList(); + var wmsDataList = new List<TA_PART>(); + foreach (var qadData in qadDataList) + { + try + { + var wmsData = wdb.TA_PART.SingleOrDefault(p => p.ErpPartCode == qadData.xxqad_pt_part.ToUpper() && p.Site==qadData.xxqad_pt_domain) ?? + new TA_PART + { + PartCode = qadData.xxqad_pt_part.ToUpper(), + ErpPartCode = qadData.xxqad_pt_part.ToUpper(), + }; + wmsData.PartDesc1 = qadData.xxqad_pt_desc1; + wmsData.PartDesc2 = qadData.xxqad_pt_desc2; + wmsData.ProjectId = qadData.xxqad_pt_group.ToUpper(); + wmsData.Unit = !string.IsNullOrEmpty(qadData.xxqad_pt_um)? qadData.xxqad_pt_um.ToUpper():"EA"; + wmsData.PartGroup = qadData.xxqad_pt_dsgn_grp.ToUpper(); + wmsData.State = qadData.xxqad_pt_status.ToUpper(); + wmsData.Site = qadData.xxqad_pt_domain; + + wmsDataList.Add(wmsData); + qadData.xxqad_pt_scmread = ((int)UniApiState.ɹ).ToString(); + } + catch (Exception ex) + { + qadData.xxqad_pt_scmread = ((int)UniApiState.ʧ).ToString(); + qadData.xxqad_pt_rmks += " SCM:" + ex.Message; + } + qadData.xxqad_pt_updateur = ScpCache.Config.SCPû; + qadData.xxqad_pt_updatedt = DateTime.Now; + } + wdb.TA_PART.AddOrUpdate(p =>new { p.PartCode, p.Site }, wmsDataList.ToArray()); + Console.WriteLine($" Ϣ ݣ{qadDataList.Count}"); + } + + } +} diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/Controller/OdbcApiScpController.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/Controller/OdbcApiScpController.cs new file mode 100644 index 0000000..0dc79a5 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/Controller/OdbcApiScpController.cs @@ -0,0 +1,331 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Models.UniApiEntity; + +//using xxscm_tx_mstr = ChangKeTec.Wms.Models.UniApi.xxscm_tx_mstr; +//using xxscm_ctrl = ChangKeTec.Wms.Models.UniApi.xxscm_ctrl; +//using xxscm_inv_det = ChangKeTec.Wms.Models.UniApi.xxscm_inv_det; +//using xxscm_ld_det = ChangKeTec.Wms.Models.UniApi.xxscm_ld_det; +//using xxscm_tx_det = ChangKeTec.Wms.Models.UniApi.xxscm_tx_det; +//using xxscm_pod_det = ChangKeTec.Wms.Models.UniApi.xxscm_pod_det; +//using xxscm_rt_det = ChangKeTec.Wms.Models.UniApi.xxscm_rt_det; +//using xxscm_soiss_det = ChangKeTec.Wms.Models.UniApi.xxscm_soiss_det; +//using xxscm_tag_det = ChangKeTec.Wms.Models.UniApi.xxscm_tag_det; +//using xxscm_tr_det = ChangKeTec.Wms.Models.UniApi.xxscm_tr_det; + +namespace CK.SCP.GrupUniApi.Controller +{ + public static class OdbcApiScpController + { + + private static string CreateSeq(string pre) + { + return pre + "_" + DateTime.Now.ToString(ScpCache.Config.SCP接口数据流水号格式); + } + + private static void PutScpCtrl(UniApiEntities idb, string seq, string tableName, int rowCount,string p_domain,string p_site) + { + + var wmsCtrl = new xxscm_ctrl + { + xxscm_seq = seq, + xxscm_table = tableName, + xxscm_table_qty = rowCount, + xxscm_qad = ((int)UniApiState.待执行).ToString(), + xxscm_mes = ((int)UniApiState.待执行).ToString(), + xxscm_scm = ((int)UniApiState.待执行).ToString(), + xxscm_wms = ((int)UniApiState.待执行).ToString(), + xxscm_rmks = "", + xxscm_domain =p_domain, + xxscm_site = p_site, + //xxscm_create_time = DateTime.Now, + }; + idb.xxscm_ctrl.Add(wmsCtrl); + } + + public static void PutAll(ScpEntities sdb, UniApiEntities idb, List<TS_UNI_API> dataList) + { + var billNumList = dataList.Select(p => p.BillNum).Distinct(); + + foreach (string billNum in billNumList) + { + var list = dataList.Where(p => p.BillNum == billNum).ToList(); + //if (GlobalVar.ApiConfig.Scm采购订单) + // PutScmPo(idb, + // list.Where(p => p.InterfaceType == UniApiType.PO.ToString()).ToList()); + if (GlobalVar.ApiConfig.Scm发货单) + PutScmAsn(idb, list.Where(p => p.InterfaceType == UniApiType.Receive.ToString()).ToList()); + if (GlobalVar.ApiConfig.Scm条码明细) + PutScmBarcode(idb, list.Where(p => p.InterfaceType == UniApiType.BarCode.ToString()).ToList()); + if (GlobalVar.ApiConfig.Scm发票) + PutScmInvoice(idb, list.Where(p => p.InterfaceType == UniApiType.Invoice.ToString()).ToList()); + Thread.Sleep(10); + } + } + + + /// <summary> + /// 发货单 + /// </summary> + /// <param name="idb"></param> + /// <param name="dataList"></param> + private static void PutScmAsn(UniApiEntities idb, List<TS_UNI_API> dataList) + { + var uni_api = dataList.FirstOrDefault(); + string seq = string.Empty; + if (dataList.Count > 0) + { + seq = CreateSeq(uni_api.Site); + } + + var tableName = ScmTableName.xxscm_tx_mstr.ToString(); + var qadDataList = new List<xxscm_tx_mstr>(); + foreach (var wmsData in dataList) + { + var qadData = qadDataList.SingleOrDefault(p => p.xxscm_tx_nbr == wmsData.BillNum + && p.xxscm_tx_domain == wmsData.Site + && p.xxscm_tx_part == wmsData.PartCode); + if (qadData == null) + { + qadData = new xxscm_tx_mstr + { + xxscm_tx_seq = seq, + xxscm_tx_nbr = wmsData.BillNum, + xxscm_tx_site =wmsData.Site, + xxscm_tx_part = wmsData.PartCode, + xxscm_tx_qadread = ((int)UniApiState.待执行).ToString(), + xxscm_tx_wmsread = ((int)UniApiState.待执行).ToString(), + xxscm_tx_scmread = ((int)UniApiState.待执行).ToString(), + xxscm_tx_mesread = ((int)UniApiState.待执行).ToString(), + xxscm_tx_createur = wmsData.CreateOper, + xxscm_tx_createdt = wmsData.CreateTime, + xxscm_tx_updateur = "", + xxscm_tx_updatedt = DateTime.Now, + xxscm_tx_rmks = "", + xxscm_tx_domain = wmsData.Domain, + xxscm_tx_po_nbr = wmsData.ErpBillNum, + xxscm_tx_po_line = wmsData.ErpLineNum.ToString(), + xxscm_tx_conv = wmsData.UmConv, + xxscm_tx_date_Promise = wmsData.ValidDate, + xxscm_tx_date_due = wmsData.ValidDate, + xxscm_tx_date_ship = wmsData.CreateTime, + xxscm_tx_loc_um = wmsData.LocUnit == null ? "" : wmsData.LocUnit, + xxscm_tx_po_um = wmsData.PoUnit == null ? "" : wmsData.PoUnit, + xxscm_tx_pprice = wmsData.Price, + xxscm_tx_qty_std = wmsData.PackQty, + xxscm_tx_qty_total = wmsData.Qty, + xxscm_tx_status = ((int)FormState.开放).ToString(), + xxscm_tx_type = "", + xxscm_tx_vend = wmsData.VendId, + xxscm_tx_vend_batch = wmsData.VendBatch, + xxscm_tx_ware = "", + xxscm_tx_ware_class = "", + }; + //PutScpCtrl(idb, qadData.xxscm_tx_seq, tableName,1,wmsData.Domain,wmsData.Site ); + qadDataList.Add(qadData); + } + wmsData.State = (int)BillState.Finish; + wmsData.PutTime = DateTime.Now; + } + if (qadDataList.Count == 0) return; + idb.xxscm_tx_mstr.AddRange(qadDataList); + Console.WriteLine($"新增 发货单 数据:{qadDataList.Count} 条"); + PutScpCtrl(idb, seq, tableName, qadDataList.Count,uni_api.Domain,uni_api.Site); + } + + /// <summary> + /// 采购订单 + /// </summary> + /// <param name = "idb" ></ param > + /// < param name="dataList"></param> + //private static void PutScmPo(UniApiEntities idb, List<TS_UNI_API> dataList) + //{ + + // var seq = CreateSeq("PO"); + + // var tableName = ScmTableName.xxscm_pod_det.ToString(); + // var qadDataList = new List<xxscm_pod_det>(); + // foreach (var wmsData in dataList) + // { + + + // var qadData = qadDataList.SingleOrDefault(p => p.xxscm_pod_nbr == wmsData.ErpBillNum + // && p.xxscm_pod_line == wmsData.ErpLineNum + // && p.xxscm_pod_site == ScpCache.Config.QAD地点 + // && p.xxscm_pod_part == wmsData.PartCode); + // if (qadData == null) + // { + // if (wmsData.PartCode != null) + // qadData = new xxscm_pod_det + // { + // xxscm_pod_seq = seq, + // xxscm_pod_nbr = wmsData.ErpBillNum, + // xxscm_pod_part = wmsData.PartCode, + + // xxscm_pod_site = ScpCache.Config.QAD地点, + // xxscm_pod_vend = wmsData.VendId, + // xxscm_pod_loc_um = wmsData.LocUnit, + // xxscm_pod_qadread = ((int)UniApiState.待执行).ToString(), + // xxscm_pod_wmsread = ((int)UniApiState.待执行).ToString(), + // xxscm_pod_scmread = ((int)UniApiState.待执行).ToString(), + // xxscm_pod_mesread = ((int)UniApiState.待执行).ToString(), + // xxscm_pod_createur = wmsData.CreateOper, + // xxscm_pod_createdt = wmsData.CreateTime, + // xxscm_pod_updateur = "", + // xxscm_pod_updatedt = DateTime.Now, + // xxscm_pod_rmks = "", + // xxscm_pod_domain = ScpCache.Config.QAD域, + // xxscm_pod_attn = wmsData.Attn, + // xxscm_pod_buyer = wmsData.Buyer, + // xxscm_pod_buyer_phone = wmsData.BuyerPhone, + // xxscm_pod_confirm = false, + // xxscm_pod_curr = wmsData.Currency, + // xxscm_pod_desc = ScpCache.GetPartDesc(wmsData.PartCode), + // xxscm_pod_due_date = wmsData.ValidDate, + // xxscm_pod_line = wmsData.ErpLineNum, + // xxscm_pod_made = "", + // xxscm_pod_modtype = wmsData.ModType, + // xxscm_pod_name = "", + // xxscm_pod_price = wmsData.Price, + // xxscm_pod_qty_ord = wmsData.PackQty, + // xxscm_pod_qty_std = wmsData.Qty, + // xxscm_pod_qty_rct = 0, + // xxscm_pod_ship = wmsData.SourceBillNum, + // xxscm_pod_status = wmsData.State.ToString(), + // xxscm_pod_um = wmsData.PoUnit, + // xxscm_pod_um_conv = wmsData.UmConv, + // }; + // qadDataList.Add(qadData); + // } + + + // wmsData.State = (int)BillState.Finish; + // wmsData.PutTime = DateTime.Now; + // } + // if (qadDataList.Count == 0) return; + + // idb.xxscm_pod_det.AddRange(qadDataList); + // Console.WriteLine($"新增 采购订单 数据:{qadDataList.Count} 条"); + + // PutScpCtrl(idb, seq, tableName, qadDataList.Count); + + //} + + /// <summary> + /// 条码 + /// </summary> + /// <param name="idb"></param> + /// <param name="dataList"></param> + private static void PutScmBarcode(UniApiEntities idb, List<TS_UNI_API> dataList) + { + var tableName = ScmTableName.xxscm_tx_det.ToString(); + var qadDataList = new List<xxscm_tx_det>(); + foreach (var wmsData in dataList) + { + var qadData = qadDataList.SingleOrDefault(p => p.xxscm_tx_nbr == wmsData.BillNum + && p.xxscm_tx_boxcode == wmsData.Barcode); + if (qadData == null) + { + qadData = new xxscm_tx_det + { + xxscm_tx_seq = CreateSeq(wmsData.Domain), + xxscm_tx_nbr = wmsData.BillNum, + xxscm_tx_part = wmsData.PartCode, + xxscm_tx_qadread = ((int)UniApiState.待执行).ToString(), + xxscm_tx_wmsread = ((int)UniApiState.待执行).ToString(), + xxscm_tx_scmread = ((int)UniApiState.待执行).ToString(), + xxscm_tx_mesread = ((int)UniApiState.待执行).ToString(), + xxscm_tx_createur = wmsData.CreateOper, + xxscm_tx_createdt = wmsData.CreateTime, + xxscm_tx_updateur = "", + xxscm_tx_updatedt = DateTime.Now, + xxscm_tx_rmks = "", + xxscm_tx_domain = wmsData.Domain, + xxscm_tx_vend = wmsData.VendId, + xxscm_tx_batch = wmsData.VendBatch, + xxscm_tx_boxcode = wmsData.Barcode, + xxscm_tx_qty_real = wmsData.Qty, + }; + qadDataList.Add(qadData); + } + wmsData.State = (int)BillState.Finish; + wmsData.PutTime = DateTime.Now; + } + if (qadDataList.Count == 0) return; + idb.xxscm_tx_det.AddRange(qadDataList); + Console.WriteLine($"新增 条码 数据:{qadDataList.Count} 条"); + + } + + /// <summary> + /// 发票 + /// </summary> + /// <param name="idb"></param> + /// <param name="dataList"></param> + private static void PutScmInvoice(UniApiEntities idb, List<TS_UNI_API> dataList) + { + var seq = CreateSeq("IV"); + var tableName = ScmTableName.xxscm_inv_det.ToString(); + var qadDataList = new List<xxscm_inv_det>(); + foreach (var wmsData in dataList) + { + var qadData = qadDataList.SingleOrDefault(p => p.xxscm_inv_nbr == wmsData.BillNum + && p.xxscm_inv_site == wmsData.Domain + && p.xxscm_inv_part == wmsData.PartCode + && p.xxscm_inv_line == wmsData.ErpLineNum.ToString()); + if (qadData == null) + { + qadData = new xxscm_inv_det + { + xxscm_inv_seq = seq, + xxscm_inv_nbr = wmsData.BillNum, + xxscm_inv_site = wmsData.Site, + xxscm_inv_part = wmsData.PartCode, + xxscm_inv_qty = wmsData.Qty, + xxscm_inv_date = wmsData.ValidDate, + xxscm_inv_qadread = ((int)UniApiState.待执行).ToString(), + xxscm_inv_wmsread = ((int)UniApiState.待执行).ToString(), + xxscm_inv_scmread = ((int)UniApiState.待执行).ToString(), + xxscm_inv_mesread = ((int)UniApiState.待执行).ToString(), + xxscm_inv_createur = wmsData.CreateOper, + xxscm_inv_createdt = wmsData.CreateTime, + xxscm_inv_updateur = "", + xxscm_inv_updatedt = DateTime.Now, + xxscm_inv_rmks = "", + xxscm_inv_domain = wmsData.Domain, + xxscm_inv_amt = wmsData.Price, + xxscm_inv_asn = wmsData.SourceBillNum, + xxscm_inv_curr = wmsData.Currency, + xxscm_inv_vend = wmsData.VendId, + xxscm_inv_line = wmsData.ErpLineNum.ToString(), + xxscm_inv_invoice = wmsData.Invoice, + xxscm_inv_order = wmsData.ErpBillNum, + xxscm_inv_price = wmsData.Price, + xxscm_inv_taxamt = wmsData.TaxAmt, + xxscm_inv_receiver = wmsData.Receiver, + xxscm_inv_taxt = wmsData.Tax, + xxscm_inv_comments = "", + xxscm_inv_holdamt = 0, + xxscm_inv_acctuser = "", + }; + qadDataList.Add(qadData); + } + wmsData.State = (int)BillState.Finish; + wmsData.PutTime = DateTime.Now; + } + if (qadDataList.Count == 0) return; + + idb.xxscm_inv_det.AddRange(qadDataList); + Console.WriteLine($"新增 发票 数据:{qadDataList.Count} 条"); + + // PutScpCtrl(idb, seq, tableName, qadDataList.Count); + + } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/Controller/OdbcApiWmsController.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/Controller/OdbcApiWmsController.cs new file mode 100644 index 0000000..d386e84 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/Controller/OdbcApiWmsController.cs @@ -0,0 +1,802 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Models.UniApiEntity; +using CK.SCP.Utils; +using System.Text; +using System.Data.Entity.Core; + +namespace CK.SCP.GrupUniApi.Controller +{ + public static class OdbcApiWmsController + { + public static void GetNewCtrlList() + { + + UniApiEntities idb = EntitiesFactory.CreateUniApiInstance(); + idb.Database.CommandTimeout = 60 * 20; + var tableNameList = EnumHelper.EnumToList<WmsTableName>(); + var wmsCtrlList = idb.xxwms_ctrl.Where(p => p.xxwms_scm == "0").ToList(); + // var wmsCtrlList = idb.xxwms_ctrl.Where(p => p.xxwms_wms == "0").ToList(); + + //ɾscpԭϿ + if (GlobalVar.ApiConfig.Wms) + { + ScpEntities wdb = EntitiesFactory.CreateScpInstance(); + + var kucunlist = wmsCtrlList.Where(p => p.xxwms_table == "xxwms_ld_det").ToList(); + + //п + if (kucunlist.Count > 0) + { + var _stockList = wdb.TS_STOCK.ToList(); + + wdb.TS_STOCK.RemoveRange(_stockList); + + //EntitiesFactory.SaveDb(wdb); + + //ȡڵˮ + xxwms_ctrl ctrl = idb.xxwms_ctrl.Where(p => p.xxwms_table == "xxwms_ld_det").OrderByDescending(p => p.xxwms_seq).FirstOrDefault(); + + if (ctrl != null && !string.IsNullOrEmpty(ctrl.xxwms_seq)) + { + Console.WriteLine($" WMS ӿݣ{ctrl.xxwms_table}:{ctrl.xxwms_table_qty}"); + UpdateMaterialStocks(idb, wdb, ctrl.xxwms_seq); + + EntitiesFactory.SaveDb(wdb); + } + } + } + Console.WriteLine($"WMS ӿݣ{wmsCtrlList.Count.ToString()}"); + foreach (var wmsCtrl in wmsCtrlList) + { + if (tableNameList.All(p => p.Name != wmsCtrl.xxwms_table)) continue; + try + { + ScpEntities wdb = EntitiesFactory.CreateScpInstance(); + //Console.WriteLine($" WMS ӿݣ{wmsCtrl.xxwms_table}:{wmsCtrl.xxwms_table_qty}"); + + WmsTableName wmsTableName; + Enum.TryParse(wmsCtrl.xxwms_table, false, out wmsTableName); + switch (wmsTableName) + { + case WmsTableName.xxwms_ld_det://ԭϿ + if (GlobalVar.ApiConfig.Wms) + { + //Console.WriteLine($" WMS ӿݣ{wmsCtrl.xxwms_table}:{wmsCtrl.xxwms_table_qty}"); + //UpdateMaterialStocks(idb, wdb, wmsCtrl.xxwms_seq); + } + else + continue; + break; + case WmsTableName.xxwms_rc_det://ջ + //TODO + if (GlobalVar.ApiConfig.Wmsջ) + { + Console.WriteLine($" WMS ӿݣ{wmsCtrl.xxwms_table}:{wmsCtrl.xxwms_table_qty}"); + AddMaterialReceive(idb, wdb, wmsCtrl.xxwms_seq, 0);//xxwms_seq:ˮ + } + break; + case WmsTableName.xxwms_rt_det: + //TODO + if (GlobalVar.ApiConfig.Wms˻) + { + Console.WriteLine($" WMS ӿݣ{wmsCtrl.xxwms_table}:{wmsCtrl.xxwms_table_qty}"); + AddMaterialReturn(idb, wdb, wmsCtrl.xxwms_seq, 1);//xxwms_seq:ˮ + } + break; + case WmsTableName.xxwms_arv_det: + //TODO + if (GlobalVar.ApiConfig.Wms) + { + Console.WriteLine($" WMS ӿݣ{wmsCtrl.xxwms_table}:{wmsCtrl.xxwms_table_qty}"); + AddMaterialArrive(idb, wdb, wmsCtrl.xxwms_seq);//xxwms_seq:ˮ + } + break; + + case WmsTableName.xxwms_qua_det: + //TODO + if (GlobalVar.ApiConfig.Wms) + { + Console.WriteLine($" WMS ӿݣ{wmsCtrl.xxwms_table}:{wmsCtrl.xxwms_table_qty}"); + AddMaterialQuality(idb, wdb, wmsCtrl.xxwms_seq); + } + break; + } + + wmsCtrl.xxwms_scm = ((int)UniApiState.ɹ).ToString(); + EntitiesFactory.SaveDb(wdb); + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//ʵ֤쳣 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("{0}ֶΣ{1}Ϣ{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + wmsCtrl.xxwms_scm = ((int)UniApiState.ʧ).ToString(); + wmsCtrl.xxwms_rmks += " SCM:" + sb.ToString(); + } + catch (OptimisticConcurrencyException ex)//ͻ쳣 + { + wmsCtrl.xxwms_scm = ((int)UniApiState.ʧ).ToString(); + wmsCtrl.xxwms_rmks += " SCM:" + ex.Message; + } + + + catch (Exception ex) + { + wmsCtrl.xxwms_scm = ((int)UniApiState.ʧ).ToString(); + wmsCtrl.xxwms_rmks += " SCM:" + ex.Message; + + } + finally + { + EntitiesFactory.SaveDb(idb); + } + } + } + + /// <summary> + /// ԭϿ + /// </summary> + /// <param name="idb"></param> + /// <param name="wdb"></param> + /// <param name="seq"></param> + private static void UpdateMaterialStocks(UniApiEntities idb, ScpEntities wdb, string seq) + { + var wmsld_detList = idb.xxwms_ld_det.Where(p => p.xxwms_ld_seq == seq).ToList(); + var scpRcvList = new List<TS_STOCK>(); + + foreach (var wmsld_detData in wmsld_detList) + { + var scpRcv = new TS_STOCK + { + BarCode = wmsld_detData.xxwms_ld_barcode,//ǩ + Site = wmsld_detData.xxwms_ld_domain,// + PartCode = wmsld_detData.xxwms_ld_part,// + VendId = wmsld_detData.xxwms_ld_vend,//Ӧ̱ + LocCode = wmsld_detData.xxwms_ld_loc,//λ + Batch = wmsld_detData.xxwms_ld_lot,// + VendBatch = wmsld_detData.xxwms_ld_vend_batch,//Ӧ + Qty = wmsld_detData.xxwms_ld_qty,// + ReceiveDate = wmsld_detData.xxwms_ld_date,//ջ + ProduceDate = wmsld_detData.xxwms_ld_time,//ʱ + LocUnit = wmsld_detData.xxwms_ld_um,//λ + Remark = "",//ע + State = (int)FormState.ر, + CreateTime = wmsld_detData.xxwms_ld_createdt == null ? DateTime.Now : (DateTime)wmsld_detData.xxwms_ld_createdt,// + CreateUser = wmsld_detData.xxwms_ld_createur//û + }; + scpRcvList.Add(scpRcv); + } + wdb.TS_STOCK.AddOrUpdate(scpRcvList.ToArray()); + Console.WriteLine($" ԭϿ ݣ{wmsld_detList.Count}"); + } + + /// <summary> + ///ջ + /// </summary> + /// <param name="idb"></param> + /// <param name="wdb"></param> + /// <param name="seq">ˮ</param> + /// <param name="billtype">0:ջ,1:˻</param> + private static void AddMaterialReceive(UniApiEntities idb, ScpEntities wdb, string seq, int billtype) + { + //var qadRcvDetailList = idb.xxqad_prh_det.Where(p => p.xxqad_prh_seq == seq).ToList(); + var qadRcvDetailList = idb.xxwms_rc_det.Where(p => p.xxwms_rc_seq == seq).ToList(); + var scpRcvList = new List<TB_RECEIVE>(); + var scpRcveDetailList = new List<TB_RECEIVE_DETAIL>(); + + //xxwms_rc_po_nbrɹֶȥ + var qadReceiveNbrList = qadRcvDetailList.Select(p => p.xxwms_rc_nbr.ToUpper()).DistinctBy(p => p); + + foreach (var qadRcvNbrList in qadReceiveNbrList) + { + //qadRcvDetailListͬһxxqad_prh_receiverм¼ + var qadDataList = qadRcvDetailList.Where(p => p.xxwms_rc_nbr == qadRcvNbrList).ToList(); + if (qadDataList.Count == 0) + { + continue; + } + + var firstqadData = qadDataList[0]; + //var scpRcv = wdb.TB_RECEIVE.SingleOrDefault(p => p.BillNum == qadRcvNbrList); + //var scpRcv = wdb.TB_RECEIVE.SingleOrDefault(p => p.PoBillNum != null && p.PoBillNum == qadRcvNbrList); + var scpRcv = wdb.TB_RECEIVE.SingleOrDefault(p => p.RecvBillNum != null && p.RecvBillNum == qadRcvNbrList); + + //ж0100ջԶǷΪ + bool isRerviceOk = false; + if (!string.IsNullOrEmpty(firstqadData.xxwms_rc_domain)) + { + string site = firstqadData.xxwms_rc_domain;//0100 + List<TA_FACTORY_CONFIG> configs = wdb.TA_FACTORY_CONFIG.Where(p => p.FactoryId == site).ToList(); + + foreach (TA_FACTORY_CONFIG cfg in configs) + { + TA_CONFIG tacfg = wdb.TA_CONFIG.Where(p => p.UID == cfg.ConfigId).SingleOrDefault(); + if(tacfg != null && !string.IsNullOrEmpty(tacfg.ParamName) && tacfg.ParamName == "ջԶ") + { + if ("" == tacfg.ParamValue) + { + isRerviceOk = true; + } + } + } + } + if (scpRcv == null) + { + + //scpRcv = new TB_RECEIVE + //{ + // BillNum = qadRcvNbrList, + // BillType = firstqadData.xxqad_prh_trtype == "RCT-PO" ? (int)ReceiveBillType.Receive : (int)ReceiveBillType.Reject, + // BillTime = firstqadData.xxqad_prh_createdt, + // OperName = firstqadData.xxqad_prh_createur, + // State = (int)FormState.ر, + // Remark = "", + //}; + int istate = 0; + if (isRerviceOk == false) + { + istate = (int)FormState.ر; + } + else + { + istate = (int)FormState.; + } + scpRcv = new TB_RECEIVE + { + RecvBillNum = qadRcvNbrList,//ջ + + State = istate, + Remark = "", + CreateTime = firstqadData.xxwms_rc_createdt == null ? DateTime.Now : (DateTime)firstqadData.xxwms_rc_createdt,// + CreateUser = firstqadData.xxwms_rc_createur,//û + IsDeleted = false, + GUID = System.Guid.NewGuid(), + BillType = billtype + }; + scpRcvList.Add(scpRcv); + } + scpRcv.PoBillNum = firstqadData.xxwms_rc_po_nbr;//ɹ + scpRcv.AsnBillNum = firstqadData.xxwms_rc_ps_nbr;// + scpRcv.Site = firstqadData.xxwms_rc_domain;//ص + scpRcv.VendId = firstqadData.xxwms_rc_vend;// + scpRcv.ShipTime = firstqadData.xxwms_rc_date_ship;//ջ + + //var scpAsn = wdb.TF_ASN.FirstOrDefault(p => p.BillNum == scpRcv.AsnBillNum); + var scpAsn = wdb.TB_ASN.FirstOrDefault(p => p.PoBillNum == scpRcv.AsnBillNum);//==ջ + if (scpAsn != null) + { + scpAsn.State = (int)ShipState.Receive; + } + foreach (var qadData in qadDataList) + { + try + { + var poLineNum = Convert.ToInt32(qadData.xxwms_rc_po_line); + //var scpRcvDetail = + // wdb.TB_RECEIVE_DETAIL.SingleOrDefault( + // p => p.BillNum == qadRcvNbrList && + // p.PoBillNum == qadData.xxqad_prh_po_nbr && + // p.PoLineNum == poLineNum && + // p.AsnBillNum == qadData.xxqad_prh_psnbr && + // p.PartCode == qadData.xxqad_prh_part && + // p.Batch == qadData.xxqad_prh_lot); + var scpRcvDetail = + wdb.TB_RECEIVE_DETAIL.SingleOrDefault( + p => p.RecvBillNum == qadRcvNbrList && + p.PoBillNum == qadData.xxwms_rc_po_nbr && + p.PoLine == poLineNum && + p.PartCode == qadData.xxwms_rc_part && + p.Batch == qadData.xxwms_rc_lot); + if (scpRcvDetail == null) + { + int istate = 0; + if (isRerviceOk == false) + { + istate = (int)FormState.ر; + } + else + { + istate = (int)FormState.; + } + scpRcvDetail = new TB_RECEIVE_DETAIL + { + RecvBillNum = qadRcvNbrList,//ջ + PoBillNum = qadData.xxwms_rc_po_nbr,//ɹ + PoLine = poLineNum,// + PartCode = qadData.xxwms_rc_part,// + Batch = qadData.xxwms_rc_lot,// + VendBatch = qadData.xxwms_rc_vend_batch,//Ӧ + PoUnit = qadData.xxwms_rc_po_um,//ɹλ + LocUnit = qadData.xxwms_rc_loc_um,//λ + Qty = qadData.xxwms_rc_qty_total,//ջ + //DockCode = ?,//ջ + State = istate,// (int)FormState.ر, + Remark = firstqadData.xxwms_rc_domain, + CreateTime = qadData.xxwms_rc_createdt == null ? DateTime.Now : (DateTime)qadData.xxwms_rc_createdt,// + CreateUser = qadData.xxwms_rc_createur,//û + IsDeleted = false, + GUID = System.Guid.NewGuid(), + BillType = billtype + }; + scpRcveDetailList.Add(scpRcvDetail); + } + //var scpPoDetail = + // wdb.TF_PO_DETAIL.FirstOrDefault( + // p => p.ErpBillNum == qadData.xxqad_prh_po_nbr && p.LineNum == poLineNum); + //if (scpPoDetail != null) + //{ + // scpPoDetail.ReceivedQty += scpRcvDetail.ReceivedQty; + // if (scpRcv.BillType == (int)ReceiveBillType.Reject) + // scpPoDetail.RejectQty -= scpRcvDetail.ReceivedQty; + //} + + + var scpPoDetail = + wdb.TB_PO_DETAIL.FirstOrDefault( + p => p.PoBillNum == qadData.xxwms_rc_po_nbr && p.PoLine == poLineNum); + if (scpPoDetail != null) + { + //ϸReceivedQty += ջϸQtyѽ + scpPoDetail.ReceivedQty += scpRcvDetail.Qty; + } + + //var scpPo = wdb.TF_PO.FirstOrDefault(p => p.ErpBillNum == qadData.xxqad_prh_po_nbr); + //if (scpPo != null) + //{ + + // var scpPoDetails = wdb.TF_PO_DETAIL.Where(p => p.ErpBillNum == qadData.xxqad_prh_po_nbr); + // if (scpPoDetails.All(p => p.BillQty == p.ReceivedQty)) + // scpPo.State = (int)PlanState.Complete; + //} + var scpPo = wdb.TB_PO.FirstOrDefault(p => p.ErpBillNum == qadData.xxwms_rc_po_nbr); + if (scpPo != null) + { + //ϸ + var scpPoDetails = wdb.TB_PO_DETAIL.Where(p => p.PoBillNum == qadData.xxwms_rc_po_nbr); + //if (scpPoDetails.All(p => p.BillQty == p.ReceivedQty)) + // scpPo.State = (int)PlanState.Complete; + if (scpPoDetails.All(p => p.PlanQty == p.ReceivedQty))//== + { + scpPo.State = (int)PlanState.Complete; + //var _detail = wdb.TB_ASK_DETAIL.Where(p => p.PoBillNum == qadData.xxwms_rc_po_nbr && p.PoLine == poLineNum ); + //if (_detail!=null && _detail.Count() > 0) + //{ + // var _qty=_detail.Sum(p=>p.AskQty); + // if(_qty== p.ReceivedQty) + //} + } + } + qadData.xxwms_rc_wmsread = ((int)UniApiState.ɹ).ToString(); + } + catch (Exception ex) + { + qadData.xxwms_rc_wmsread = ((int)UniApiState.ʧ).ToString(); + qadData.xxwms_rc_rmks += " SCM:" + ex.Message; + } + qadData.xxwms_rc_updateur = ScpCache.Config.SCPû; + qadData.xxwms_rc_updatedt = DateTime.Now; + } + + } + wdb.TB_RECEIVE.AddOrUpdate(scpRcvList.ToArray()); + wdb.TB_RECEIVE_DETAIL.AddOrUpdate(scpRcveDetailList.ToArray()); + Console.WriteLine($" ջ ݣ{qadRcvDetailList.Count}"); + } + + #region WMS + private static void AddMaterialQuality(UniApiEntities idb, ScpEntities sdb, string seq) + { + var wms_qualList = idb.xxwms_qua_det.Where(p => p.xxwms_qua_seq == seq).ToList(); + var _qualList = new List<TB_QUALITY>(); + foreach (var itm in wms_qualList) + { + var scpQual = new TB_QUALITY(); + + scpQual.Type = itm.xxwms_qua_infotype; + scpQual.Barcode = itm.xxwms_qua_barcode; + scpQual.Loccode = itm.xxwms_qua_loccode; + scpQual.Pobillnum = itm.xxwms_qua_pobillnum; + scpQual.Poline = (decimal)itm.xxwms_qua_poline; + scpQual.Inspecttype = itm.xxwms_qua_inspecttype; + scpQual.Partcode = itm.xxwms_qua_partcode; + scpQual.Batch = itm.xxwms_qua_batch; + scpQual.ReceiveQty = itm.xxwms_qua_receiveqty; + scpQual.SampleQty = itm.xxwms_qua_sampleqty; + scpQual.Inspqty = itm.xxwms_qua_inspqty; + scpQual.Passqty = itm.xxwms_qua_passqty; + scpQual.Failqty = itm.xxwms_qua_failqty; + scpQual.Crackqty = itm.xxwms_qua_crackqty; + scpQual.Inspresult = itm.xxwms_qua_inspresult; + scpQual.Failreason = itm.xxwms_qua_failreason; + scpQual.Vendid = itm.xxwms_qua_vendid; + scpQual.Vendbatch = itm.xxwms_qua_vendbatch; + scpQual.state = itm.xxwms_qua_state; + scpQual.Billtime = itm.xxwms_qua_billtime; + scpQual.Domain = itm.xxwms_qua_domain; + scpQual.Site = itm.xxwms_qua_domain; + scpQual.By1 = itm.xxwms_qua_by1; + scpQual.By2 = itm.xxwms_qua_by2; + scpQual.By3 = itm.xxwms_qua_by3; + scpQual.CreateTime = itm.xxwms_qua_createdt??DateTime.Now; + scpQual.CreateUser = itm.xxwms_qua_createur; + scpQual.UpdateTime = itm.xxwms_qua_updatedt; + scpQual.UpdateUser = itm.xxwms_qua_updateur; + scpQual.GUID = Guid.NewGuid(); + + _qualList.Add(scpQual); + sdb.TB_QUALITY.Add(scpQual); + } + //sdb.TB_QUALITY.Add(_qualList.ToArray()); + Console.WriteLine($"ݣ{_qualList.Count}"); + } + + #endregion + + + /// <summary> + /// ˻ + /// </summary> + private static void AddMaterialReturn(UniApiEntities idb, ScpEntities wdb, string seq, int billtype) + { + //var qadRcvDetailList = idb.xxqad_prh_det.Where(p => p.xxqad_prh_seq == seq).ToList(); + var qadRcvDetailList = idb.xxwms_rt_det.Where(p => p.xxwms_rt_seq == seq).ToList(); + var scpRcvList = new List<TB_RECEIVE>(); + var scpRcveDetailList = new List<TB_RECEIVE_DETAIL>(); + + //xxqad_prh_receiverֶȥ + var qadReceiveNbrList = qadRcvDetailList.Select(p => p.xxwms_rt_nbr.ToUpper()).DistinctBy(p => p); + + foreach (var qadRcvNbrList in qadReceiveNbrList) + { + //qadRcvDetailListͬһxxqad_prh_receiverм¼ + var qadDataList = qadRcvDetailList.Where(p => p.xxwms_rt_nbr == qadRcvNbrList).ToList(); + if (qadDataList.Count == 0) + { + continue; + } + var firstqadData = qadDataList[0]; + //var scpRcv = wdb.TB_RECEIVE.SingleOrDefault(p => p.BillNum == qadRcvNbrList); + //var scpRcv = wdb.TB_REJECT.SingleOrDefault(p => p.PoBillNum == qadRcvNbrList); + var scpRcv = wdb.TB_RECEIVE.SingleOrDefault(p => p.RecvBillNum == qadRcvNbrList); + + //ж0100ջԶǷΪ + bool isRerviceOk = false; + if (!string.IsNullOrEmpty(firstqadData.xxwms_rt_domain)) + { + string site = firstqadData.xxwms_rt_domain;//0100 + List<TA_FACTORY_CONFIG> configs = wdb.TA_FACTORY_CONFIG.Where(p => p.FactoryId == site).ToList(); + + foreach (TA_FACTORY_CONFIG cfg in configs) + { + TA_CONFIG tacfg = wdb.TA_CONFIG.Where(p => p.UID == cfg.ConfigId).SingleOrDefault(); + if (tacfg != null && !string.IsNullOrEmpty(tacfg.ParamName) && tacfg.ParamName == "ջԶ") + { + if ("" == tacfg.ParamValue) + { + isRerviceOk = true; + } + } + } + } + if (scpRcv == null) + { + int istate = 0; + if (isRerviceOk == false) + { + istate = (int)FormState.ر; + } + else + { + istate = (int)FormState.; + } + + scpRcv = new TB_RECEIVE + { + RecvBillNum = qadRcvNbrList,//˻ + State = istate, + Remark = "", + CreateTime = firstqadData.xxwms_rt_createdt == null ? DateTime.Now : (DateTime)firstqadData.xxwms_rt_createdt,// + CreateUser = firstqadData.xxwms_rt_createur,//û + IsDeleted = false, + GUID = System.Guid.NewGuid(), + BillType = billtype + }; + scpRcvList.Add(scpRcv); + } + scpRcv.PoBillNum = firstqadData.xxwms_rt_po_nbr;//ɹ + //scpRcv.AsnBillNum = firstqadData.xxqad_prh_psnbr;// + scpRcv.Site = firstqadData.xxwms_rt_domain;//ص + scpRcv.VendId = firstqadData.xxwms_rt_vend;// + scpRcv.ShipTime = firstqadData.xxwms_rt_date_ship;//ջ + //var scpAsn = wdb.TF_ASN.FirstOrDefault(p => p.BillNum == scpRcv.AsnBillNum); + var scpAsn = wdb.TB_ASN.FirstOrDefault(p => p.PoBillNum == scpRcv.AsnBillNum);//==˻ + if (scpAsn != null) + scpAsn.State = (int)ShipState.Reject; + foreach (var qadData in qadDataList) + { + try + { + var poLineNum = Convert.ToInt32(qadData.xxwms_rt_po_line); + //var scpRcvDetail = + // wdb.TB_RECEIVE_DETAIL.SingleOrDefault( + // p => p.BillNum == qadRcvNbrList && + // p.PoBillNum == qadData.xxqad_prh_po_nbr && + // p.PoLineNum == poLineNum && + // p.AsnBillNum == qadData.xxqad_prh_psnbr && + // p.PartCode == qadData.xxqad_prh_part && + // p.Batch == qadData.xxqad_prh_lot); + var scpRcvDetail = + wdb.TB_RECEIVE_DETAIL.SingleOrDefault( + p => p.RecvBillNum == qadRcvNbrList && + p.PoBillNum == qadData.xxwms_rt_po_nbr && + p.PoLine == poLineNum && + p.PartCode == qadData.xxwms_rt_part && + p.Batch == qadData.xxwms_rt_lot); + if (scpRcvDetail == null) + { + int istate = 0; + if (isRerviceOk == false) + { + istate = (int)FormState.ر; + } + else + { + istate = (int)FormState.; + } + scpRcvDetail = new TB_RECEIVE_DETAIL + { + RecvBillNum = qadRcvNbrList,//˻ + PoBillNum = qadData.xxwms_rt_po_nbr,//ɹ + PoLine = poLineNum,// + PartCode = qadData.xxwms_rt_part,//Ϻ + Batch = qadData.xxwms_rt_lot,// + VendBatch = qadData.xxwms_rt_vend_batch,//Ӧ + PoUnit = qadData.xxwms_rt_po_um,//ɹλ + LocUnit = qadData.xxwms_rt_loc_um,//λ + Qty = qadData.xxwms_rt_qty_total,//˻ + State = istate,// (int)FormState.ر, + Remark = firstqadData.xxwms_rt_domain, + CreateTime = qadData.xxwms_rt_createdt == null ? DateTime.Now : (DateTime)qadData.xxwms_rt_createdt,// + CreateUser = qadData.xxwms_rt_createur,//û + IsDeleted = false, + GUID = System.Guid.NewGuid(), + BillType = billtype + }; + scpRcveDetailList.Add(scpRcvDetail); + } + //var scpPoDetail = + // wdb.TF_PO_DETAIL.FirstOrDefault( + // p => p.ErpBillNum == qadData.xxqad_prh_po_nbr && p.LineNum == poLineNum); + //if (scpPoDetail != null) + //{ + // scpPoDetail.ReceivedQty += scpRcvDetail.ReceivedQty; + // if (scpRcv.BillType == (int)ReceiveBillType.Reject) + // scpPoDetail.RejectQty -= scpRcvDetail.ReceivedQty; + //} + var scpPoDetail = + wdb.TB_PO_DETAIL.FirstOrDefault( + p => p.PoBillNum == qadData.xxwms_rt_po_nbr && p.PoLine == poLineNum); + if (scpPoDetail != null) + { + //ϸRejectQty += ˻ϸQtyѽ + scpPoDetail.RejectQty -= scpRcvDetail.Qty; + } + + //var scpPo = wdb.TF_PO.FirstOrDefault(p => p.ErpBillNum == qadData.xxqad_prh_po_nbr); + //if (scpPo != null) + //{ + + // var scpPoDetails = wdb.TF_PO_DETAIL.Where(p => p.ErpBillNum == qadData.xxqad_prh_po_nbr); + // if (scpPoDetails.All(p => p.BillQty == p.ReceivedQty)) + // scpPo.State = (int)PlanState.Complete; + //} + var scpPo = wdb.TB_PO.FirstOrDefault(p => p.ErpBillNum == qadData.xxwms_rt_po_nbr); + if (scpPo != null) + { + //ϸ + var scpPoDetails = wdb.TB_PO_DETAIL.Where(p => p.PoBillNum == qadData.xxwms_rt_po_nbr); + //if (scpPoDetails.All(p => p.BillQty == p.ReceivedQty)) + // scpPo.State = (int)PlanState.Complete; + if (scpPoDetails.All(p => p.PlanQty == p.ReceivedQty)) //== + scpPo.State = (int)PlanState.Complete; + } + qadData.xxwms_rt_wmsread = ((int)UniApiState.ɹ).ToString(); + } + catch (Exception ex) + { + qadData.xxwms_rt_wmsread = ((int)UniApiState.ʧ).ToString(); + qadData.xxwms_rt_rmks += " SCM:" + ex.Message; + } + qadData.xxwms_rt_updateur = ScpCache.Config.SCPû; + qadData.xxwms_rt_updatedt = DateTime.Now; + + } + + } + wdb.TB_RECEIVE.AddOrUpdate(scpRcvList.ToArray()); + wdb.TB_RECEIVE_DETAIL.AddOrUpdate(scpRcveDetailList.ToArray()); + Console.WriteLine($" ˻ ݣ{qadRcvDetailList.Count}"); + } + + /// <summary> + ///յ + /// </summary> + /// <param name="idb"></param> + /// <param name="wdb"></param> + /// <param name="seq">ˮ</param> + private static void AddMaterialArrive(UniApiEntities idb, ScpEntities wdb, string seq) + { + //var qadRcvDetailList = idb.xxqad_prh_det.Where(p => p.xxqad_prh_seq == seq).ToList(); + var qadRcvDetailList = idb.xxwms_arv_det.Where(p => p.xxwms_arv_seq == seq).ToList(); + var scpRcvList = new List<TB_ARRIVE>(); + var scpRcveDetailList = new List<TB_ARRIVE_DETAIL>(); + + //xxwms_rc_po_nbrɹֶȥ + var qadReceiveNbrList = qadRcvDetailList.Select(p => p.xxwms_arv_nbr.ToUpper()).DistinctBy(p => p); + + foreach (var qadRcvNbrList in qadReceiveNbrList) + { + //qadRcvDetailListͬһxxqad_prh_receiverм¼ + var qadDataList = qadRcvDetailList.Where(p => p.xxwms_arv_nbr == qadRcvNbrList).ToList(); + if (qadDataList.Count == 0) + { + continue; + } + + var firstqadData = qadDataList[0]; + //var scpRcv = wdb.TB_RECEIVE.SingleOrDefault(p => p.BillNum == qadRcvNbrList); + //var scpRcv = wdb.TB_RECEIVE.SingleOrDefault(p => p.PoBillNum != null && p.PoBillNum == qadRcvNbrList); + var scpRcv = wdb.TB_ARRIVE.SingleOrDefault(p => p.ArrvBillNum != null && p.ArrvBillNum == qadRcvNbrList); + + //ж0100ջԶǷΪ + bool isRerviceOk = false; + if (!string.IsNullOrEmpty(firstqadData.xxwms_arv_site)) + { + string site = firstqadData.xxwms_arv_site;//0100 + List<TA_FACTORY_CONFIG> configs = wdb.TA_FACTORY_CONFIG.Where(p => p.FactoryId == site).ToList(); + + foreach (TA_FACTORY_CONFIG cfg in configs) + { + TA_CONFIG tacfg = wdb.TA_CONFIG.Where(p => p.UID == cfg.ConfigId).SingleOrDefault(); + if (tacfg != null && !string.IsNullOrEmpty(tacfg.ParamName) && tacfg.ParamName == "ջԶ") + { + if ("" == tacfg.ParamValue) + { + isRerviceOk = true; + } + } + } + } + if (scpRcv == null) + { + int istate = 0; + if (isRerviceOk == false) + { + istate = (int)FormState.ر; + } + else + { + istate = (int)FormState.; + } + scpRcv = new TB_ARRIVE + { + ArrvBillNum = qadRcvNbrList,// + State = istate, + Remark = "", + CreateTime = firstqadData.xxwms_arv_createdt == null ? DateTime.Now : (DateTime)firstqadData.xxwms_arv_createdt,// + CreateUser = firstqadData.xxwms_arv_createur,//û + IsDeleted = false, + GUID = System.Guid.NewGuid(), + BillType = string.IsNullOrEmpty(firstqadData.xxwms_arv_trtype) ? 1 : int.Parse(firstqadData.xxwms_arv_trtype) //1-ջ 2-˻ + }; + scpRcvList.Add(scpRcv); + } + scpRcv.PoBillNum = firstqadData.xxwms_arv_po_nbr;//ɹ + scpRcv.AsnBillNum = firstqadData.xxwms_arv_ps_nbr;// + scpRcv.Site = firstqadData.xxwms_arv_site;//ص + scpRcv.VendId = firstqadData.xxwms_arv_vend;// + scpRcv.ShipTime = firstqadData.xxwms_arv_date_ship;//ջ + + foreach (var qadData in qadDataList) + { + try + { + var poLineNum = Convert.ToInt32(qadData.xxwms_arv_po_line); + //var scpRcvDetail = + // wdb.TB_RECEIVE_DETAIL.SingleOrDefault( + // p => p.BillNum == qadRcvNbrList && + // p.PoBillNum == qadData.xxqad_prh_po_nbr && + // p.PoLineNum == poLineNum && + // p.AsnBillNum == qadData.xxqad_prh_psnbr && + // p.PartCode == qadData.xxqad_prh_part && + // p.Batch == qadData.xxqad_prh_lot); + var scpRcvDetail = + wdb.TB_ARRIVE_DETAIL.SingleOrDefault( + p => p.ArrvBillNum == qadRcvNbrList && + p.PoBillNum == qadData.xxwms_arv_po_nbr && + p.PoLine == poLineNum && + p.PartCode == qadData.xxwms_arv_part && + p.Batch == qadData.xxwms_arv_lot); + if (scpRcvDetail == null) + { + int istate = 0; + if (isRerviceOk == false) + { + istate = (int)FormState.ر; + } + else + { + istate = (int)FormState.; + } + scpRcvDetail = new TB_ARRIVE_DETAIL + { + ArrvBillNum = qadRcvNbrList,// + PoBillNum = qadData.xxwms_arv_po_nbr,//ɹ + PoLine = poLineNum,// + PartCode = qadData.xxwms_arv_part,// + Batch = qadData.xxwms_arv_lot,// + VendBatch = qadData.xxwms_arv_vend_batch,//Ӧ + PoUnit = qadData.xxwms_arv_po_um,//ɹλ + LocUnit = qadData.xxwms_arv_loc_um,//λ + Qty = qadData.xxwms_arv_qty_total,//ջ + //DockCode = ?,//ջ + State = istate,// (int)FormState.ر, + Remark = "", + CreateTime = qadData.xxwms_arv_createdt == null ? DateTime.Now : (DateTime)qadData.xxwms_arv_createdt,// + CreateUser = qadData.xxwms_arv_createur,//û + IsDeleted = false, + GUID = System.Guid.NewGuid(), + BillType = string.IsNullOrEmpty(firstqadData.xxwms_arv_trtype) ? 1 : int.Parse(firstqadData.xxwms_arv_trtype) //1-ջ 2-˻ + }; + scpRcveDetailList.Add(scpRcvDetail); + } + + //var scpPoDetail = + // wdb.TB_PO_DETAIL.FirstOrDefault( + // p => p.PoBillNum == qadData.xxwms_arv_po_nbr && p.PoLine == poLineNum); + //if (scpPoDetail != null) + //{ + // //ϸReceivedQty += ջϸQtyѽ + // scpPoDetail.ReceivedQty += scpRcvDetail.Qty; + //} + + //var scpPo = wdb.TB_PO.FirstOrDefault(p => p.ErpBillNum == qadData.xxwms_arv_po_nbr); + //if (scpPo != null) + //{ + // //ϸ + // var scpPoDetails = wdb.TB_PO_DETAIL.Where(p => p.PoBillNum == qadData.xxwms_arv_po_nbr); + // //if (scpPoDetails.All(p => p.BillQty == p.ReceivedQty)) + // // scpPo.State = (int)PlanState.Complete; + // if (scpPoDetails.All(p => p.PlanQty == p.ReceivedQty)) //== + // scpPo.State = (int)PlanState.Complete; + //} + qadData.xxwms_arv_wmsread = ((int)UniApiState.ɹ).ToString(); + } + catch (Exception ex) + { + qadData.xxwms_arv_wmsread = ((int)UniApiState.ʧ).ToString(); + qadData.xxwms_arv_rmks += " SCM:" + ex.Message; + } + qadData.xxwms_arv_updateur = ScpCache.Config.SCPû; + qadData.xxwms_arv_updatedt = DateTime.Now; + } + } + wdb.TB_ARRIVE.AddOrUpdate(scpRcvList.ToArray()); + wdb.TB_ARRIVE_DETAIL.AddOrUpdate(scpRcveDetailList.ToArray()); + Console.WriteLine($" ݣ{qadRcvDetailList.Count}"); + } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/ERP接口设置.ini b/北京北汽/SCP/CK.SCP.UniApi_CQ/ERP接口设置.ini new file mode 100644 index 0000000..e327a15 Binary files /dev/null and b/北京北汽/SCP/CK.SCP.UniApi_CQ/ERP接口设置.ini differ diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/Form1.Designer.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/Form1.Designer.cs new file mode 100644 index 0000000..3b0cf51 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/Form1.Designer.cs @@ -0,0 +1,39 @@ +namespace CK.SCP.UniApi_CQ +{ + partial class Form1 + { + /// <summary> + /// 必需的设计器变量。 + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// 清理所有正在使用的资源。 + /// </summary> + /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows 窗体设计器生成的代码 + + /// <summary> + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Text = "Form1"; + } + + #endregion + } +} + diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/Form1.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/Form1.cs new file mode 100644 index 0000000..f3dcdd0 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/Form1.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace CK.SCP.UniApi_CQ +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + } +} diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/FormMain.Designer.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/FormMain.Designer.cs new file mode 100644 index 0000000..9b83d2b --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/FormMain.Designer.cs @@ -0,0 +1,435 @@ +namespace CK.SCP.GrupUniApi +{ + partial class FormMain + { + /// <summary> + /// 必需的设计器变量。 + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// 清理所有正在使用的资源。 + /// </summary> + /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows 窗体设计器生成的代码 + + /// <summary> + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMain)); + this.txtLog = new System.Windows.Forms.TextBox(); + this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components); + this.layoutControl1 = new DevComponents.DotNetBar.Layout.LayoutControl(); + this.listLog = new System.Windows.Forms.ListView(); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.expandableSplitter2 = new DevComponents.DotNetBar.ExpandableSplitter(); + this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); + this.btnStart = new DevComponents.DotNetBar.ButtonX(); + this.btnClose = new DevComponents.DotNetBar.ButtonX(); + this.btnRefresh = new DevComponents.DotNetBar.ButtonX(); + this.btnStop = new DevComponents.DotNetBar.ButtonX(); + this.btnClearLog = new DevComponents.DotNetBar.ButtonX(); + this.btnSetting = new DevComponents.DotNetBar.ButtonX(); + this.pnlCtrl = new DevComponents.DotNetBar.PanelEx(); + this.panelEx2 = new DevComponents.DotNetBar.PanelEx(); + this.BtnErpPut = new CktUniApiButton(); + this.BtnErpGet = new CktUniApiButton(); + this.bar1 = new DevComponents.DotNetBar.Bar(); + this.labelItem1 = new DevComponents.DotNetBar.LabelItem(); + this.txtDomain = new DevComponents.DotNetBar.TextBoxItem(); + this.labelItem2 = new DevComponents.DotNetBar.LabelItem(); + this.txtSite = new DevComponents.DotNetBar.TextBoxItem(); + this.labelItem4 = new DevComponents.DotNetBar.LabelItem(); + this.txtVersion = new DevComponents.DotNetBar.TextBoxItem(); + this.panelEx1.SuspendLayout(); + this.pnlCtrl.SuspendLayout(); + this.panelEx2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); + this.SuspendLayout(); + // + // txtLog + // + this.txtLog.Dock = System.Windows.Forms.DockStyle.Bottom; + this.txtLog.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtLog.Location = new System.Drawing.Point(0, 512); + this.txtLog.Margin = new System.Windows.Forms.Padding(2); + this.txtLog.Multiline = true; + this.txtLog.Name = "txtLog"; + this.txtLog.ReadOnly = true; + this.txtLog.ScrollBars = System.Windows.Forms.ScrollBars.Both; + this.txtLog.Size = new System.Drawing.Size(614, 139); + this.txtLog.TabIndex = 5; + // + // styleManager1 + // + this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2010Blue; + this.styleManager1.MetroColorParameters = new DevComponents.DotNetBar.Metro.ColorTables.MetroColorGeneratorParameters(System.Drawing.Color.White, System.Drawing.Color.FromArgb(((int)(((byte)(43)))), ((int)(((byte)(87)))), ((int)(((byte)(154)))))); + // + // layoutControl1 + // + this.layoutControl1.Location = new System.Drawing.Point(0, 0); + this.layoutControl1.Name = "layoutControl1"; + this.layoutControl1.Size = new System.Drawing.Size(200, 200); + this.layoutControl1.TabIndex = 0; + // + // listLog + // + this.listLog.Dock = System.Windows.Forms.DockStyle.Fill; + this.listLog.Location = new System.Drawing.Point(0, 0); + this.listLog.Name = "listLog"; + this.listLog.Size = new System.Drawing.Size(614, 508); + this.listLog.TabIndex = 9; + this.listLog.UseCompatibleStateImageBehavior = false; + this.listLog.View = System.Windows.Forms.View.Details; + this.listLog.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged); + // + // toolTip1 + // + this.toolTip1.AutomaticDelay = 100; + this.toolTip1.ShowAlways = true; + // + // expandableSplitter2 + // + this.expandableSplitter2.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(93)))), ((int)(((byte)(108)))), ((int)(((byte)(122))))); + this.expandableSplitter2.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.expandableSplitter2.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.expandableSplitter2.Dock = System.Windows.Forms.DockStyle.Bottom; + this.expandableSplitter2.ExpandFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(93)))), ((int)(((byte)(108)))), ((int)(((byte)(122))))); + this.expandableSplitter2.ExpandFillColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.expandableSplitter2.ExpandLineColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(57)))), ((int)(((byte)(120))))); + this.expandableSplitter2.ExpandLineColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemText; + this.expandableSplitter2.GripDarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(57)))), ((int)(((byte)(120))))); + this.expandableSplitter2.GripDarkColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemText; + this.expandableSplitter2.GripLightColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(232)))), ((int)(((byte)(246))))); + this.expandableSplitter2.GripLightColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; + this.expandableSplitter2.HotBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(246)))), ((int)(((byte)(200)))), ((int)(((byte)(103))))); + this.expandableSplitter2.HotBackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(226)))), ((int)(((byte)(135))))); + this.expandableSplitter2.HotBackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemPressedBackground2; + this.expandableSplitter2.HotBackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemPressedBackground; + this.expandableSplitter2.HotExpandFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(93)))), ((int)(((byte)(108)))), ((int)(((byte)(122))))); + this.expandableSplitter2.HotExpandFillColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.expandableSplitter2.HotExpandLineColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(57)))), ((int)(((byte)(120))))); + this.expandableSplitter2.HotExpandLineColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemText; + this.expandableSplitter2.HotGripDarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(93)))), ((int)(((byte)(108)))), ((int)(((byte)(122))))); + this.expandableSplitter2.HotGripDarkColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.expandableSplitter2.HotGripLightColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(232)))), ((int)(((byte)(246))))); + this.expandableSplitter2.HotGripLightColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; + this.expandableSplitter2.Location = new System.Drawing.Point(0, 508); + this.expandableSplitter2.Margin = new System.Windows.Forms.Padding(2); + this.expandableSplitter2.Name = "expandableSplitter2"; + this.expandableSplitter2.Size = new System.Drawing.Size(614, 4); + this.expandableSplitter2.Style = DevComponents.DotNetBar.eSplitterStyle.Office2007; + this.expandableSplitter2.TabIndex = 59; + this.expandableSplitter2.TabStop = false; + // + // panelEx1 + // + this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control; + this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.panelEx1.Controls.Add(this.btnStart); + this.panelEx1.Controls.Add(this.btnClose); + this.panelEx1.Controls.Add(this.btnRefresh); + this.panelEx1.Controls.Add(this.btnStop); + this.panelEx1.Controls.Add(this.btnClearLog); + this.panelEx1.Controls.Add(this.btnSetting); + this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty; + this.panelEx1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.panelEx1.Location = new System.Drawing.Point(0, 495); + this.panelEx1.Margin = new System.Windows.Forms.Padding(2); + this.panelEx1.Name = "panelEx1"; + this.panelEx1.Size = new System.Drawing.Size(170, 156); + this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx1.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.panelEx1.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.panelEx1.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.panelEx1.Style.GradientAngle = 90; + this.panelEx1.TabIndex = 25; + this.panelEx1.Text = "panelEx1"; + // + // btnStart + // + this.btnStart.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnStart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnStart.Font = new System.Drawing.Font("微软雅黑", 16.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnStart.Location = new System.Drawing.Point(11, 10); + this.btnStart.Margin = new System.Windows.Forms.Padding(2); + this.btnStart.Name = "btnStart"; + this.btnStart.Size = new System.Drawing.Size(150, 45); + this.btnStart.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnStart.TabIndex = 0; + this.btnStart.Text = "启动"; + this.btnStart.Click += new System.EventHandler(this.btnStart_Click); + // + // btnClose + // + this.btnClose.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnClose.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnClose.Location = new System.Drawing.Point(89, 132); + this.btnClose.Margin = new System.Windows.Forms.Padding(2); + this.btnClose.Name = "btnClose"; + this.btnClose.Size = new System.Drawing.Size(72, 20); + this.btnClose.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnClose.TabIndex = 3; + this.btnClose.Text = "退出"; + this.btnClose.Click += new System.EventHandler(this.btnClose_Click); + // + // btnRefresh + // + this.btnRefresh.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnRefresh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnRefresh.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnRefresh.Location = new System.Drawing.Point(11, 133); + this.btnRefresh.Margin = new System.Windows.Forms.Padding(2); + this.btnRefresh.Name = "btnRefresh"; + this.btnRefresh.Size = new System.Drawing.Size(72, 20); + this.btnRefresh.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnRefresh.TabIndex = 23; + this.btnRefresh.Text = "更新数据"; + this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click); + // + // btnStop + // + this.btnStop.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnStop.ColorTable = DevComponents.DotNetBar.eButtonColor.MagentaWithBackground; + this.btnStop.Font = new System.Drawing.Font("微软雅黑", 16.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnStop.Location = new System.Drawing.Point(11, 58); + this.btnStop.Margin = new System.Windows.Forms.Padding(2); + this.btnStop.Name = "btnStop"; + this.btnStop.Size = new System.Drawing.Size(150, 45); + this.btnStop.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnStop.TabIndex = 1; + this.btnStop.Text = "停止"; + this.btnStop.Click += new System.EventHandler(this.btnStop_Click); + // + // btnClearLog + // + this.btnClearLog.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnClearLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnClearLog.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnClearLog.Location = new System.Drawing.Point(11, 108); + this.btnClearLog.Margin = new System.Windows.Forms.Padding(2); + this.btnClearLog.Name = "btnClearLog"; + this.btnClearLog.Size = new System.Drawing.Size(72, 20); + this.btnClearLog.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnClearLog.TabIndex = 10; + this.btnClearLog.Text = "清空日志"; + this.btnClearLog.Click += new System.EventHandler(this.btnClear_Click); + // + // btnSetting + // + this.btnSetting.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnSetting.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnSetting.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnSetting.Location = new System.Drawing.Point(89, 108); + this.btnSetting.Margin = new System.Windows.Forms.Padding(2); + this.btnSetting.Name = "btnSetting"; + this.btnSetting.Size = new System.Drawing.Size(72, 20); + this.btnSetting.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSetting.TabIndex = 2; + this.btnSetting.Text = "设置"; + this.btnSetting.Click += new System.EventHandler(this.btnSetting_Click); + // + // pnlCtrl + // + this.pnlCtrl.CanvasColor = System.Drawing.SystemColors.Control; + this.pnlCtrl.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.pnlCtrl.Controls.Add(this.panelEx2); + this.pnlCtrl.Controls.Add(this.panelEx1); + this.pnlCtrl.DisabledBackColor = System.Drawing.Color.Empty; + this.pnlCtrl.Dock = System.Windows.Forms.DockStyle.Right; + this.pnlCtrl.Location = new System.Drawing.Point(614, 0); + this.pnlCtrl.Margin = new System.Windows.Forms.Padding(2); + this.pnlCtrl.Name = "pnlCtrl"; + this.pnlCtrl.Size = new System.Drawing.Size(170, 651); + this.pnlCtrl.Style.Alignment = System.Drawing.StringAlignment.Center; + this.pnlCtrl.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.pnlCtrl.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.pnlCtrl.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.pnlCtrl.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.pnlCtrl.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.pnlCtrl.Style.GradientAngle = 90; + this.pnlCtrl.TabIndex = 1; + // + // panelEx2 + // + this.panelEx2.AutoScroll = true; + this.panelEx2.CanvasColor = System.Drawing.SystemColors.Control; + this.panelEx2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.panelEx2.Controls.Add(this.BtnErpPut); + this.panelEx2.Controls.Add(this.BtnErpGet); + this.panelEx2.DisabledBackColor = System.Drawing.Color.Empty; + this.panelEx2.Dock = System.Windows.Forms.DockStyle.Fill; + this.panelEx2.Location = new System.Drawing.Point(0, 0); + this.panelEx2.Margin = new System.Windows.Forms.Padding(2); + this.panelEx2.Name = "panelEx2"; + this.panelEx2.Size = new System.Drawing.Size(170, 495); + this.panelEx2.Style.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx2.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.panelEx2.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.panelEx2.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.panelEx2.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.panelEx2.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.panelEx2.Style.GradientAngle = 90; + this.panelEx2.TabIndex = 29; + // + // BtnErpPut + // + this.BtnErpPut.Count = 0; + this.BtnErpPut.Dock = System.Windows.Forms.DockStyle.Top; + this.BtnErpPut.EnableManual = true; + this.BtnErpPut.InitCount = 0; + this.BtnErpPut.Location = new System.Drawing.Point(0, 50); + this.BtnErpPut.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.BtnErpPut.Name = "BtnErpPut"; + this.BtnErpPut.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.BtnErpPut.Size = new System.Drawing.Size(170, 50); + this.BtnErpPut.SwitchEnabled = false; + this.BtnErpPut.TabIndex = 40; + this.BtnErpPut.Title = "发送业务数据到ERP"; + this.BtnErpPut.RunOnceExecute += new CktUniApiButton.RunOnceHandler(this.BtnErpPut_RunOnceExecute); + // + // BtnErpGet + // + this.BtnErpGet.Count = 0; + this.BtnErpGet.Dock = System.Windows.Forms.DockStyle.Top; + this.BtnErpGet.EnableManual = true; + this.BtnErpGet.InitCount = 0; + this.BtnErpGet.Location = new System.Drawing.Point(0, 0); + this.BtnErpGet.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.BtnErpGet.Name = "BtnErpGet"; + this.BtnErpGet.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.BtnErpGet.Size = new System.Drawing.Size(170, 50); + this.BtnErpGet.SwitchEnabled = false; + this.BtnErpGet.TabIndex = 39; + this.BtnErpGet.Title = "从ERP接收基础数据"; + this.BtnErpGet.RunOnceExecute += new CktUniApiButton.RunOnceHandler(this.BtnErpGet_RunOnceExecute); + // + // bar1 + // + this.bar1.AntiAlias = true; + this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.bar1.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.bar1.IsMaximized = false; + this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.labelItem1, + this.txtDomain, + this.labelItem2, + this.txtSite, + this.labelItem4, + this.txtVersion}); + this.bar1.Location = new System.Drawing.Point(0, 651); + this.bar1.Margin = new System.Windows.Forms.Padding(2); + this.bar1.Name = "bar1"; + this.bar1.Size = new System.Drawing.Size(784, 24); + this.bar1.Stretch = true; + this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.bar1.TabIndex = 87; + this.bar1.TabStop = false; + this.bar1.Text = "bar1"; + // + // labelItem1 + // + this.labelItem1.Name = "labelItem1"; + this.labelItem1.Text = "QAD域"; + // + // txtDomain + // + this.txtDomain.Name = "txtDomain"; + this.txtDomain.TextBoxWidth = 80; + this.txtDomain.WatermarkColor = System.Drawing.SystemColors.GrayText; + // + // labelItem2 + // + this.labelItem2.Name = "labelItem2"; + this.labelItem2.Text = "QAD地点"; + // + // txtSite + // + this.txtSite.Name = "txtSite"; + this.txtSite.TextBoxWidth = 80; + this.txtSite.WatermarkColor = System.Drawing.SystemColors.GrayText; + // + // labelItem4 + // + this.labelItem4.ItemAlignment = DevComponents.DotNetBar.eItemAlignment.Far; + this.labelItem4.Name = "labelItem4"; + this.labelItem4.Text = "版本"; + // + // txtVersion + // + this.txtVersion.Name = "txtVersion"; + this.txtVersion.TextBoxWidth = 200; + this.txtVersion.WatermarkColor = System.Drawing.SystemColors.GrayText; + // + // FormMain + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(784, 675); + this.Controls.Add(this.listLog); + this.Controls.Add(this.expandableSplitter2); + this.Controls.Add(this.txtLog); + this.Controls.Add(this.pnlCtrl); + this.Controls.Add(this.bar1); + this.DoubleBuffered = true; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(2); + this.MinimumSize = new System.Drawing.Size(800, 596); + this.Name = "FormMain"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "通用接口自动处理程序"; + this.Load += new System.EventHandler(this.FormMain_Load); + this.panelEx1.ResumeLayout(false); + this.pnlCtrl.ResumeLayout(false); + this.panelEx2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.TextBox txtLog; + private DevComponents.DotNetBar.StyleManager styleManager1; + private DevComponents.DotNetBar.Layout.LayoutControl layoutControl1; + private System.Windows.Forms.ListView listLog; + private System.Windows.Forms.ToolTip toolTip1; + private DevComponents.DotNetBar.ExpandableSplitter expandableSplitter2; + private DevComponents.DotNetBar.PanelEx panelEx1; + private DevComponents.DotNetBar.ButtonX btnStart; + private DevComponents.DotNetBar.ButtonX btnClose; + private DevComponents.DotNetBar.ButtonX btnRefresh; + private DevComponents.DotNetBar.ButtonX btnStop; + private DevComponents.DotNetBar.ButtonX btnClearLog; + private DevComponents.DotNetBar.ButtonX btnSetting; + private DevComponents.DotNetBar.PanelEx pnlCtrl; + private DevComponents.DotNetBar.PanelEx panelEx2; + private CktUniApiButton BtnErpPut; + private CktUniApiButton BtnErpGet; + private DevComponents.DotNetBar.Bar bar1; + private DevComponents.DotNetBar.LabelItem labelItem1; + private DevComponents.DotNetBar.TextBoxItem txtDomain; + private DevComponents.DotNetBar.LabelItem labelItem2; + private DevComponents.DotNetBar.TextBoxItem txtSite; + private DevComponents.DotNetBar.LabelItem labelItem4; + private DevComponents.DotNetBar.TextBoxItem txtVersion; + } +} + diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/FormMain.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/FormMain.cs new file mode 100644 index 0000000..3a976d8 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/FormMain.cs @@ -0,0 +1,202 @@ +using System; +using System.IO; +using System.Reflection; +using System.Windows.Forms; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Utils; +using DevComponents.DotNetBar; + +namespace CK.SCP.GrupUniApi +{ + public partial class FormMain : Office2007Form + { + + private Timer _timer; + private IApi _iApi; + + public FormMain() + { + InitializeComponent(); + + // StringRedir r = new StringRedir(ref textBox1); + StringRedir r = new StringRedir(ref listLog, true); + Console.SetOut(r); + try + { + Init(); + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); + } + + } + + private static void InitGlobalCache() + { + var db = EntitiesFactory.CreateScpInstance(); + ScpCache.Refresh(db); + } + + + + private void Init() + { + // txtDomain.Text = ScpCache.Config.QAD域; + // txtSite.Text = ScpCache.Config.QAD地点; + // var sofewareName = $"{FileHelper.GetApplicationPath()}/{Application.ProductName}.exe"; + // var fi = new FileInfo(sofewareName); + // txtVersion.Text = $@"Version {Assembly.LoadFrom(sofewareName).GetName().Version}{fi.LastWriteTime:(MMddHHmm)}"; + ProjectName projectName; + Enum.TryParse(ScpCache.Config.项目名称, true, out projectName); + + switch (projectName) + { + case ProjectName.锦州锦恒: + _iApi = new QadOdbcApi(); + break; + default: + throw new ArgumentOutOfRangeException(); + } +// BtnErpGet.Visible = false; +// BtnErpPut.Visible = false; + BtnErpGet.Count = GlobalVar.DurationConfig.ERP接口接收; + BtnErpPut.Count = GlobalVar.DurationConfig.ERP接口发送; + + BtnErpGet.InitCount = GlobalVar.DurationConfig.ERP接口接收; + BtnErpPut.InitCount = GlobalVar.DurationConfig.ERP接口发送; + + + _timer = new Timer { Interval = 1000 }; + _timer.Tick += _timer_Tick; + btnStart.Enabled = true; + btnStop.Enabled = false; + + } + + + private int _refreshInterval = 10 * 60; + private void _timer_Tick(object sender, EventArgs e) + { + BtnErpGet.RunOnce(); + BtnErpPut.RunOnce(); + RefreshGlobalCache(); + } + + private void RefreshGlobalCache() + { + if (_refreshInterval > 0) + { + _refreshInterval--; + } + else + { + InitGlobalCache(); + _refreshInterval = 10 * 60; + Console.WriteLine("开始更新缓存数据!"); + } + } + + private void FormMain_Load(object sender, EventArgs e) + { + try + { + InitGlobalCache(); + } + catch (Exception ex) + { + Console.WriteLine(ex); + + } + } + + private void listView1_SelectedIndexChanged(object sender, EventArgs e) + { + if (listLog.SelectedItems.Count == 0) return; + var str = listLog.SelectedItems[0].SubItems[1].Text; + txtLog.Text = str; + } + + + #region Button + + private void btnClose_Click(object sender, EventArgs e) + { + Close(); + } + + private void btnStart_Click(object sender, EventArgs e) + { + Console.WriteLine(@"系统启动"); + BtnErpGet.Start(); + BtnErpPut.Start(); + + _timer.Start(); + btnStart.Enabled = false; + btnStop.Enabled = true; + + } + + private void btnStop_Click(object sender, EventArgs e) + { + BtnErpGet.Stop(); + BtnErpPut.Stop(); + + _timer.Stop(); + btnStart.Enabled = true; + btnStop.Enabled = false; + + Console.WriteLine(@"系统停止"); + } + + private void btnRefresh_Click(object sender, EventArgs e) + { + try + { + InitGlobalCache(); + } + catch (Exception ex) + { + Console.WriteLine(ex); + + } + } + + private void btnClear_Click(object sender, EventArgs e) + { + listLog.Items.Clear(); + } + + private void btnSetting_Click(object sender, EventArgs e) + { + try + { + var form = new PopupSetting(); + var dr = form.ShowDialog(this); + if (dr != DialogResult.OK) return; + Init(); + } + catch (Exception ex) + { + Console.WriteLine(ex); + + } + } + + #endregion + + + + private void BtnErpGet_RunOnceExecute() + { + _iApi.Get(); + } + + private void BtnErpPut_RunOnceExecute() + { + _iApi.Put(); + } + + } +} diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/FormMain.resx b/北京北汽/SCP/CK.SCP.UniApi_CQ/FormMain.resx new file mode 100644 index 0000000..2dcb073 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/FormMain.resx @@ -0,0 +1,151 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="styleManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>156, 17</value> + </metadata> + <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAA + AAAzMzNAJSUl8BYWFv8HBwf/CAgI/xkZGf8pKSn/Ojo6/0pKSv9bW1v/a2tr/3x8fP+MjIz/lpaW/4uL + i/CAgIBAQUFB8CkpKf8YGBj/FhYW/xUVFf9wVCX///hs////hf///3r/6r5J/xgNDP8JCQn/CAgI/wYG + Bv9fX1//i4uL8FBQUP8cHBz/Gxsb/xkZGf8XFxf/UDwg//ztZP///3////9w/9qkP/8QDQ3/DAwM/wsL + C/8JCQn/BwcH/5aWlv9eXl7/Hx8f/x4eHv8cHBz/Ghoa/xkZGf+GaS7/0rBG/6h5Lv9RMRn/JBgR/xAO + Dv8ODg7/DAwM/woKCv+MjIz/bW1t/yIiIv8hISH/Hx8f/x0dHf8cHBz/Ghoa/0cnGf9eNBb/kl8l/92Z + O//BeS//bUYf/xcTEP8NDQ3/fHx8/3x8fP8lJSX/IyMj/yIiIv8gICD/Hx8f/0MtHv/yrUP/kG8p/2hD + Gf//8Fz//+hZ/65vK/9PLBH/l2En/2tra/+JiYn/KCgo/yYmJv8lJSX/IyMj/yMhIf/Ghzb///Ze/+To + Yf+KWyT/8sBK/7uINP9EJw3/sXQs/8aHM/9bW1v/mJiY/ysrK/8pKSn/KCgo/yYmJv89LCT/9MJK//// + cf/p4mb/mWoq/+u0RP/irEb/2NNY///cVP/JgDH/S0tL/4uLi/8uLi7/LCws/ysrK/8pKSn/QzAm///d + Vf+jnUH/YDUU/2ZQIv84Ggr/0qZH////eP//41f/v3gv/zs7O/99fX3/MTEx/y8vL/8sLCz/KSkp/yoq + Kv/nuEj/fXQt/3FfJv/pqEX/vZg//0UiDP/l4Fv//9pT/2tEI/8rKyv/bm5u/zMzM/9lSC7/u4Y1/7N4 + L/9GLx//ZUks///9Zf+CfTP/OxAE/5tzLv9lYin/1cBJ/9+jQf8eHh7/Ghoa/19fX/91UjH/9dFS//// + bP//+2T/2Js7/zMjIP+DZTb/5cRM/5iINP/XzFH///Bi/8yYP/86KyP/RS8f/woKCv9QUFD/7K5C//// + cP///4P///97///kWP96Tyr/MDAw/0Q3L/99cDz/jHA5/15FLP8oKCj/KSMj/92oQP8GBgb/QUFB/4hr + Of/+8mn///+C////ef/zz1H/VD8v/zMzM/8xMTH/MDAw/y4uLv8sLCz/Kysr/0EvJv/431n/FBQU/zMz + M/A8PDz/dGQ8/8azUv/Ap0v/aFE1/zMzM/8zMzP/MzMz/zMzM/8xMTH/Ly8v/y4uLv8sLCz/q5BD/yMj + I/AzMzNAMzMz8EJCQv9RUVH/X19f/25ubv99fX3/jIyM/5eXl/+JiYn/enp6/2tra/9dXV3/T09P/0BA + QPAxMTFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAA== +</value> + </data> +</root> \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/GlobalVar.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/GlobalVar.cs new file mode 100644 index 0000000..309e3dc --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/GlobalVar.cs @@ -0,0 +1,28 @@ +using CK.SCP.Models; +using CK.SCP.GrupUniApi.Config; + +namespace CK.SCP.GrupUniApi +{ + public class GlobalVar + { + + private static UniApiConfig _apiConfig; + private static DurationConfig _durationConfig; + + public static UniApiConfig ApiConfig + { + get { return _apiConfig ?? (_apiConfig = GlobalConfig.GetConfigValues<UniApiConfig>(GlobalConfig.UniApiConfigFileName)); } + set { _apiConfig = value; } + } + + public static DurationConfig DurationConfig + { + get { return _durationConfig ?? (_durationConfig = GlobalConfig.GetConfigValues<DurationConfig>(GlobalConfig.DurationFileName)); } + set { _durationConfig = value; } + } + + public static string SuperPassword { get; set; } = "changketec2018"; + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/IApi.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/IApi.cs new file mode 100644 index 0000000..3816f31 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/IApi.cs @@ -0,0 +1,9 @@ +namespace CK.SCP.GrupUniApi +{ + public interface IApi + { + + void Get(); + void Put(); + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/PopupSetting.Designer.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/PopupSetting.Designer.cs new file mode 100644 index 0000000..a567f91 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/PopupSetting.Designer.cs @@ -0,0 +1,196 @@ +using CK.SCP.Common; + +namespace CK.SCP.GrupUniApi +{ + partial class PopupSetting + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.btnCancel = new DevComponents.DotNetBar.ButtonX(); + this.btnSave = new DevComponents.DotNetBar.ButtonX(); + this.panelEx2 = new DevComponents.DotNetBar.PanelEx(); + this.txtSuperPassword = new CktTextBox(); + this.pnlMain = new DevComponents.DotNetBar.PanelEx(); + this.listSetting = new DevComponents.DotNetBar.ListBoxAdv(); + this.panelEx2.SuspendLayout(); + this.SuspendLayout(); + // + // btnCancel + // + this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(9, 8); + this.btnCancel.Margin = new System.Windows.Forms.Padding(2); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(56, 24); + this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnCancel.TabIndex = 2; + this.btnCancel.Text = "关闭"; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // btnSave + // + this.btnSave.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnSave.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnSave.Location = new System.Drawing.Point(399, 8); + this.btnSave.Margin = new System.Windows.Forms.Padding(2); + this.btnSave.Name = "btnSave"; + this.btnSave.Size = new System.Drawing.Size(56, 24); + this.btnSave.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSave.TabIndex = 1; + this.btnSave.Text = "保存"; + this.btnSave.Click += new System.EventHandler(this.btnSave_Click); + // + // panelEx2 + // + this.panelEx2.CanvasColor = System.Drawing.SystemColors.Control; + this.panelEx2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.panelEx2.Controls.Add(this.txtSuperPassword); + this.panelEx2.Controls.Add(this.btnCancel); + this.panelEx2.Controls.Add(this.btnSave); + this.panelEx2.DisabledBackColor = System.Drawing.Color.Empty; + this.panelEx2.Dock = System.Windows.Forms.DockStyle.Bottom; + this.panelEx2.Location = new System.Drawing.Point(0, 401); + this.panelEx2.Margin = new System.Windows.Forms.Padding(2); + this.panelEx2.Name = "panelEx2"; + this.panelEx2.Size = new System.Drawing.Size(465, 41); + this.panelEx2.Style.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx2.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.panelEx2.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.panelEx2.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.panelEx2.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.panelEx2.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.panelEx2.Style.GradientAngle = 90; + this.panelEx2.TabIndex = 32; + // + // txtSuperPassword + // + this.txtSuperPassword.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.txtSuperPassword.BackColor = System.Drawing.Color.Transparent; + this.txtSuperPassword.BoxWidth = 0; + this.txtSuperPassword.ButtonText = "..."; + this.txtSuperPassword.ButtonVisible = false; + this.txtSuperPassword.DecimalValue = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.txtSuperPassword.IntValue = 0; + this.txtSuperPassword.IsNum = false; + this.txtSuperPassword.LblText = "管理员密码"; + this.txtSuperPassword.LblTextAlign = System.Drawing.StringAlignment.Far; + this.txtSuperPassword.LblWidth = 80; + this.txtSuperPassword.Location = new System.Drawing.Point(172, 8); + this.txtSuperPassword.Margin = new System.Windows.Forms.Padding(2); + this.txtSuperPassword.Multiline = false; + this.txtSuperPassword.Name = "txtSuperPassword"; + this.txtSuperPassword.ReadOnly = false; + this.txtSuperPassword.RearLblText = ""; + this.txtSuperPassword.RearLblWidth = 40; + this.txtSuperPassword.Size = new System.Drawing.Size(223, 24); + this.txtSuperPassword.TabIndex = 0; + this.txtSuperPassword.UserSystemPasswordChar = true; + this.txtSuperPassword.Value = ""; + // + // pnlMain + // + this.pnlMain.AutoScroll = true; + this.pnlMain.CanvasColor = System.Drawing.SystemColors.Control; + this.pnlMain.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.pnlMain.DisabledBackColor = System.Drawing.Color.Empty; + this.pnlMain.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlMain.Location = new System.Drawing.Point(150, 0); + this.pnlMain.Name = "pnlMain"; + this.pnlMain.Size = new System.Drawing.Size(315, 401); + this.pnlMain.Style.Alignment = System.Drawing.StringAlignment.Center; + this.pnlMain.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.pnlMain.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.pnlMain.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.pnlMain.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.pnlMain.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.pnlMain.Style.GradientAngle = 90; + this.pnlMain.TabIndex = 34; + // + // listSetting + // + this.listSetting.AutoScroll = true; + // + // + // + this.listSetting.BackgroundStyle.Class = "ListBoxAdv"; + this.listSetting.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.listSetting.CheckStateMember = null; + this.listSetting.ContainerControlProcessDialogKey = true; + this.listSetting.Dock = System.Windows.Forms.DockStyle.Left; + this.listSetting.DragDropSupport = true; + this.listSetting.Location = new System.Drawing.Point(0, 0); + this.listSetting.Name = "listSetting"; + this.listSetting.Size = new System.Drawing.Size(150, 401); + this.listSetting.TabIndex = 33; + this.listSetting.Text = "listBoxAdv1"; + this.listSetting.SelectedIndexChanged += new System.EventHandler(this.listSetting_SelectedIndexChanged); + this.listSetting.ItemClick += new System.EventHandler(this.listSetting_ItemClick); + // + // PopupSetting + // + this.AcceptButton = this.btnSave; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnCancel; + this.ClientSize = new System.Drawing.Size(465, 442); + this.Controls.Add(this.pnlMain); + this.Controls.Add(this.listSetting); + this.Controls.Add(this.panelEx2); + this.DoubleBuffered = true; + this.Margin = new System.Windows.Forms.Padding(2); + this.Name = "PopupSetting"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "系统设置"; + this.Load += new System.EventHandler(this.FormSetting_Load); + this.panelEx2.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + public PopupSetting() + { + InitializeComponent(); + } + + private DevComponents.DotNetBar.ButtonX btnCancel; + private DevComponents.DotNetBar.ButtonX btnSave; + private DevComponents.DotNetBar.PanelEx panelEx2; + private CktTextBox txtSuperPassword; + private DevComponents.DotNetBar.PanelEx pnlMain; + private DevComponents.DotNetBar.ListBoxAdv listSetting; + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/PopupSetting.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/PopupSetting.cs new file mode 100644 index 0000000..005ea93 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/PopupSetting.cs @@ -0,0 +1,107 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.GrupUniApi.Config; +using CK.SCP.Utils; +using CK.SCP.Common; +using DevComponents.DotNetBar; +using DevComponents.DotNetBar.Controls; + + +namespace CK.SCP.GrupUniApi +{ + public partial class PopupSetting : Office2007Form + { + + private List<GroupPanel> _groupList = new List<GroupPanel>(); + + private void FormSetting_Load(object sender, EventArgs e) + { + ProjectName projectName; +// GetConfig<CommonConfig>(GlobalConfig.CommonFileName); + GetConfig<DbSetting>(GlobalConfig.ScpDbFileName); + GetConfig<UniApiConfig>(GlobalConfig.UniApiConfigFileName); + GetConfig<DurationConfig>(GlobalConfig.DurationFileName); + + Enum.TryParse(ScpCache.Config.项目名称, true, out projectName); + + + + switch (projectName) + { + + case ProjectName.锦州锦恒: + GetConfig<DbSetting>(GlobalConfig.UniApiDbFileName); + break; + } + listSetting.SelectedIndex = 0; + + } + private void GetConfig<T>(string filename) where T : new() + { + var group = SettingHelper.GetConfigValues<T>(filename); + pnlMain.Controls.Add(@group); + pnlMain.ResumeLayout(); + _groupList.Add(@group); + listSetting.Items.Add(SettingHelper.GetPureName(filename)); + } + + private void btnSave_Click(object sender, EventArgs e) + { + + try + { + if (string.IsNullOrEmpty(txtSuperPassword.Text)) + throw new Exception("请输入管理员密码!"); + if (txtSuperPassword.Text != GlobalVar.SuperPassword) + throw new Exception("管理员密码密码错误,请重新输入!"); + ProjectName projectName; + Enum.TryParse(ScpCache.Config.项目名称, true, out projectName); +// GlobalVar.CommonConfig = SettingHelper.SetConfigValues<CommonConfig>(_groupList, GlobalConfig.CommonFileName); + GlobalConfig.ScpDatabase = SettingHelper.SetConfigValues<DbSetting>(_groupList, GlobalConfig.ScpDbFileName); + GlobalVar.ApiConfig = SettingHelper.SetConfigValues<UniApiConfig>(_groupList, GlobalConfig.UniApiConfigFileName); + GlobalVar.DurationConfig = SettingHelper.SetConfigValues<DurationConfig>(_groupList, GlobalConfig.DurationFileName); + switch (projectName) + { + case ProjectName.锦州锦恒: + GlobalConfig.UniApiDatabase = SettingHelper.SetConfigValues<DbSetting>(_groupList, GlobalConfig.UniApiDbFileName); + break; + } + + DialogResult = DialogResult.OK; + Close(); + } + catch (Exception ex) + { + MessageHelper.ShowError(ex); + txtSuperPassword.Focus(); + } + } + + private void btnCancel_Click(object sender, EventArgs e) + { + Close(); + } + + private void listSetting_ItemClick(object sender, EventArgs e) + { + + } + + private void listSetting_SelectedIndexChanged(object sender, EventArgs e) + { + if (listSetting.SelectedIndex < 0) return; + var selectedName = listSetting.SelectedItem.ToString(); + var group = _groupList.SingleOrDefault(p => p.Name == selectedName); + if (group == null) return; + foreach (var groupPanel in _groupList) + { + groupPanel.Visible = false; + } + group.Visible = true; + } + } +} diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/PopupSetting.resx b/北京北汽/SCP/CK.SCP.UniApi_CQ/PopupSetting.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/PopupSetting.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/Program.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/Program.cs new file mode 100644 index 0000000..49bd420 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/Program.cs @@ -0,0 +1,19 @@ +using System; +using System.Windows.Forms; + +namespace CK.SCP.GrupUniApi +{ + static class Program + { + /// <summary> + /// 应用程序的主入口点。 + /// </summary> + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new FormMain()); + } + } +} diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/Properties/AssemblyInfo.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..28dfa51 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("UniApi")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("UniApi")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("b870b746-d647-4b84-8f84-6281d3a55fcb")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 +// 方法是按如下所示使用“*”: : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/Properties/Resources.Designer.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/Properties/Resources.Designer.cs new file mode 100644 index 0000000..d3fedfd --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.GrupUniApi.Properties { + using System; + + + /// <summary> + /// 一个强类型的资源类,用于查找本地化的字符串等。 + /// </summary> + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// <summary> + /// 返回此类使用的缓存的 ResourceManager 实例。 + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CK.SCP.GrupUniApi.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// 使用此强类型资源类,为所有资源查找 + /// 重写当前线程的 CurrentUICulture 属性。 + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/Properties/Resources.resx b/北京北汽/SCP/CK.SCP.UniApi_CQ/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/Properties/Resources.resx @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/Properties/Settings.Designer.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/Properties/Settings.Designer.cs new file mode 100644 index 0000000..78d316e --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.GrupUniApi.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/Properties/Settings.settings b/北京北汽/SCP/CK.SCP.UniApi_CQ/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/Properties/Settings.settings @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='utf-8'?> +<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> + <Profiles> + <Profile Name="(Default)" /> + </Profiles> + <Settings /> +</SettingsFile> diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/QadOdbcApi.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/QadOdbcApi.cs new file mode 100644 index 0000000..9a7a446 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/QadOdbcApi.cs @@ -0,0 +1,117 @@ +using System; +using System.ComponentModel; +using System.Linq; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.UniApiEntity; +using CK.SCP.GrupUniApi.Controller; +using System.Transactions; +namespace CK.SCP.GrupUniApi +{ + public class QadOdbcApi : IApi + { + private readonly BackgroundWorker _bgwGet = new BackgroundWorker(); + private readonly BackgroundWorker _bgwPut = new BackgroundWorker(); + + public QadOdbcApi() + { + InitBgw(); + } + + private void InitBgw() + { + _bgwGet.DoWork += BgwGetDoWork; + _bgwGet.RunWorkerCompleted += BgwGetRunWorkerCompleted; + //回传给QAD + _bgwPut.DoWork += BgwPutDoWork; + _bgwPut.RunWorkerCompleted += BgwPutRunWorkerCompleted; + + } + + private void BgwPutRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) + { + Console.WriteLine(@"Odbc接口数据发送完成<<<<<<<<<<"); + } + + private void BgwPutDoWork(object sender, DoWorkEventArgs e) + { + var idb = EntitiesFactory.CreateUniApiInstance(); + var wdb = EntitiesFactory.CreateScpInstance(); + try + { + var apiList = UniApiController.GetNewInterfaceList(wdb); + OdbcApiScpController.PutAll(wdb, idb, apiList); + apiList = apiList.Where(p => p.State == (int)FormState.关闭).ToList(); + var apiHisList = apiList.Select(uniApi => uniApi.ToHis()).ToList(); + using (var scope = + new TransactionScope(TransactionScopeOption.Required, new TransactionOptions() + { + IsolationLevel = System.Transactions.IsolationLevel.Serializable, + Timeout = new TimeSpan(0, 20, 0) + })) + { + UniApiController.AddHisList(wdb, apiHisList); + UniApiController.RemoveList(wdb, apiList); + EntitiesFactory.SaveDb(idb); + EntitiesFactory.SaveDb(wdb); + scope.Complete(); + } + } + + + catch (Exception ex) + { + Console.WriteLine(ex); + } + + } + + private void BgwGetRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) + { + Console.WriteLine(@"Odbc接口数据接收完成<<<<<<<<<<"); + } + + private void BgwGetDoWork(object sender, DoWorkEventArgs e) + { + try + { + OdbcApiQadController.GetNewCtrlList(); //取QAD数据 + OdbcApiWmsController.GetNewCtrlList(); //取WMS数据 + } + catch (Exception ex) + { + Console.WriteLine(string.Format("错误:{0}", ex.Message)); + // MessageHelper.ShowError(ex); + } + } + + public void Get() + { + try + { + if (_bgwGet.IsBusy) return; + Console.WriteLine(@"Odbc接口数据接收开始>>>>>>>>>>"); + _bgwGet.RunWorkerAsync(); + } + catch (ScpException ex) + { + Console.WriteLine(ex); + } + } + + public void Put() + { + try + { + if (_bgwPut.IsBusy) return; + Console.WriteLine(@"Odbc接口数据发送开始>>>>>>>>>>"); + _bgwPut.RunWorkerAsync(); + } + catch (ScpException ex) + { + Console.WriteLine(ex); + } + } + } + +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/Scp数据库设置.ini b/北京北汽/SCP/CK.SCP.UniApi_CQ/Scp数据库设置.ini new file mode 100644 index 0000000..ce4d0dc Binary files /dev/null and b/北京北汽/SCP/CK.SCP.UniApi_CQ/Scp数据库设置.ini differ diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/StringRedir.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/StringRedir.cs new file mode 100644 index 0000000..c4431f1 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/StringRedir.cs @@ -0,0 +1,96 @@ +using System; +using System.IO; +using System.Windows.Forms; +using CK.SCP.Utils; +using DevComponents.DotNetBar.Controls; + +namespace CK.SCP.GrupUniApi +{ + public class StringRedir : StringWriter + { +// private readonly TextBoxX _textboxX; + private readonly TextBox _textbox; + private ListView _listView; + private bool _isShowList = true; + + + public StringRedir(ref TextBoxX textBox) + { + _textbox = textBox; + } + + public StringRedir(ref TextBox textBox) + { + _textbox = textBox; + } + + public StringRedir(ref ListView listView,bool isShowList) + { + _isShowList = isShowList; + _listView = listView; + _listView.View = View.Details; + _listView.GridLines = true; + var colTime = new ColumnHeader {Text = "时间",Width = 180}; + var colMessage = new ColumnHeader {Text = "内容",Width = 1000}; + _listView.Columns.Add(colTime); + _listView.Columns.Add(colMessage); + } + + + delegate void WriteLineCallBack(string text); + +// public override void WriteLine(string value) +// { +// if (_textbox.InvokeRequired) +// { +// WriteLineCallBack writeLineCallBack = WriteLine; +// _textbox.Invoke(writeLineCallBack, value); +// } +// else +// { +// if (_textbox.Lines.Length > 1000) +// _textbox.Text = string.Empty; +// _textbox.AppendText(DateTime.Now + "\t" + value + Environment.NewLine); +// _textbox.ScrollToCaret(); +// } +// +// LogHelper.Write(value); +// } + + public override void WriteLine(string value) + { + + if (_listView.InvokeRequired) + { + WriteLineCallBack writeLineCallBack = WriteLine; + if (_listView == null || _listView.IsDisposed) + { + _listView = new ListView(); + return; + } + _listView.BeginInvoke(writeLineCallBack, value); + } + else + { +// if (_isShowList) + { + if (_listView.Items.Count > 2000) + { + _listView.Items.Clear(); + } + var item = new ListViewItem {Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff")}; + item.SubItems.Add(value); + _listView.Items.Add(item); + + item.EnsureVisible(); + } + // _textbox.AppendText(DateTime.Now + "\t" + value + Environment.NewLine); + // _textbox.ScrollToCaret(); + LogHelper.Write(value); + } + + } + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/UniApiController.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/UniApiController.cs new file mode 100644 index 0000000..063727d --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/UniApiController.cs @@ -0,0 +1,219 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Models.UniApiEntity; + +namespace CK.SCP.GrupUniApi +{ + public static class UniApiController + { + + public static void RemoveList(ScpEntities db, List<TS_UNI_API> uniApiList) + { + db.TS_UNI_API.RemoveRange(uniApiList); + } + public static void AddHisList(ScpEntities db, List<TS_UNI_API_HIS> uniApiHisList) + { + + db.TS_UNI_API_HIS.AddRange(uniApiHisList); + } + + public static void AddApiData(ScpEntities wdb, TS_UNI_API apiData) + { + wdb.TS_UNI_API.Add(apiData); + } + + + public static void AddApiDataList(ScpEntities wdb, List<TS_UNI_API> apiDataList) + { + wdb.TS_UNI_API.AddRange(apiDataList); + } + + + public static WmsTableName GetTableName(UniApiType uniApiType) + { + WmsTableName tableName; + switch (uniApiType) + { +// case UniApiType.StockMove: +// tableName = WmsTableName.xxwms_tr_det; +// break; +// case UniApiType.BackFlush: +// tableName = WmsTableName.xxwms_bk_mstr; +// break; +// case UniApiType.MaterialReceive: +// tableName = WmsTableName.xxwms_rc_det; +// break; +// case UniApiType.MaterialReturn: +// tableName = WmsTableName.xxwms_rt_det; +// break; +// case UniApiType.OtherIn: +// tableName = WmsTableName.xxwms_rct_det; +// break; +// case UniApiType.OtherOut: +// tableName = WmsTableName.xxwms_iss_det; +// break; +// case UniApiType.CheckUpdate: +// tableName = WmsTableName.xxwms_tag_det; +// break; +// case UniApiType.ProductSell: +// tableName = WmsTableName.xxwms_soiss_det; +// break; +// case UniApiType.StockDetail: +// tableName = WmsTableName.xxwms_ld_det; +// break; + default: + throw new ArgumentOutOfRangeException(nameof(uniApiType), uniApiType, null); + } + return tableName; + } + + ////创建采购订单 + //public static TS_UNI_API CreateBy(TB_PO bill, TB_PO_DETAIL detail, UniApiType uniApiType) + //{ + // var tableName = GetTableName(uniApiType); + // var apiData = new TS_UNI_API + // { + // InterfaceType = uniApiType.ToString(), + // TableName = tableName.ToString(), + // BillNum = bill.BillNum, + // PartCode = detail.PartCode, + // Batch = "", + // Qty = detail.BillQty, + // PoUnit = detail.PoUnit, + // LocUnit = detail.LocUnit, + // State = detail.State, + // CreateOper = bill.OperName, + // CreateTime = bill.BillTime, + // PutTime = ScpCache.GetServerTime(), + // VendId = bill.VendId, + // BillType = (int)BillType.PuchaseOrder, + // SubBillType = 0, + // ValidDate = detail.DueDate, + // ErpBillNum = bill.ErpBillNum, + // ErpLineNum = detail.LineNum, + // VendBatch = "", + // SourceBillNum = "", + // Price = detail.Price, + // PackQty = detail.PackQty, + // Currency = detail.Currency, + // Attn = "",//TODO + // Buyer = bill.Buyer, + // BuyerPhone = bill.BuyerPhone, + // ModType = bill.ModType, + // Receiver = "",//TODO + + // }; + // return apiData; + //} + + //创建发货单 + public static TS_UNI_API CreateBy(TB_ASN bill, TB_ASN_DETAIL detail, UniApiType uniApiType) + { + var tableName = GetTableName(uniApiType); + var apiData = new TS_UNI_API + { + InterfaceType = uniApiType.ToString(), + TableName = tableName.ToString(), + BillNum = bill.AskBillNum, + PartCode = detail.PartCode, + Batch = detail.Batch, + Qty = detail.Qty, + PoUnit = detail.PoUnit, + LocUnit = detail.LocUnit, + State = (int)detail.State, + CreateOper = bill.CreateUser, + CreateTime = bill.CreateTime, + PutTime = ScpCache.GetServerTime(), + VendId = bill.VendId, + BillType = (int)BillType.PuchaseOrder, + SubBillType = 0, + ValidDate = (DateTime)detail.ProduceDate, + ErpBillNum = bill.PoBillNum, + ErpLineNum = detail.PoLine, + VendBatch = detail.VendBatch, + Price = detail.Price, + PackQty = detail.PackQty, + Currency = detail.Currency, +// UmConv = detail.UmConv, + }; + return apiData; + } + + //创建条码 + public static TS_UNI_API CreateBy(TB_ASN bill, TS_BARCODE detail, UniApiType uniApiType) + { + var tableName = GetTableName(uniApiType); + var apiData = new TS_UNI_API + { + Barcode = detail.BarCode, + InterfaceType = uniApiType.ToString(), + TableName = tableName.ToString(), + BillNum = bill.AsnBillNum, + PartCode = detail.PartCode, + Batch = detail.Batch, + Qty = detail.Qty, + PoUnit = detail.PoUnit, + LocUnit = detail.LocUnit, + State = detail.State, + CreateOper = bill.CreateUser, + CreateTime = bill.CreateTime, + PutTime = ScpCache.GetServerTime(), + VendId = bill.VendId, + BillType = (int)BillType.PuchaseOrder, + SubBillType = 0, + ValidDate = detail.ProduceDate, + ErpBillNum = bill.PoBillNum, + ErpLineNum = detail.PoBillLine, + VendBatch = detail.VendBatch, + SourceBillNum = detail.FullBarCode, + PackQty = detail.PackQty, + }; + return apiData; + } + + //创建发票 + public static TS_UNI_API CreateBy(TB_INVOICE bill, TB_INVOICE_DETAIL detail, UniApiType uniApiType) + { + var tableName = GetTableName(uniApiType); + var apiData = new TS_UNI_API + { + InterfaceType = uniApiType.ToString(), + TableName = tableName.ToString(), + //BillNum = bill.BillNum, + PartCode = detail.PartCode, + Batch = "", + Qty = detail.Qty, + PoUnit = detail.PoUnit, + //LocUnit = detail.LocUnit, + State = detail.State, + //CreateOper = bill.OperName, + CreateTime = bill.CreateTime, + PutTime = ScpCache.GetServerTime(), + VendId = bill.VendId, + BillType = (int)BillType.PuchaseOrder, + SubBillType = 0, + ValidDate = detail.ProduceDate, + ErpBillNum = detail.PoBillNum, + ErpLineNum = detail.PoLineNum, + VendBatch = "", + SourceBillNum = "", + Price = detail.Price, + PackQty = detail.PackQty, + Currency = detail.Currency, + Invoice = bill.InvoiceNum, + //Tax = detail.Tax, + //TaxAmt = detail.TaxAmt, + }; + return apiData; + } + + public static List<TS_UNI_API> GetNewInterfaceList(ScpEntities wdb) + { + return wdb.TS_UNI_API.Where(p => p.State == (int)DataState.Enabled).OrderBy(p => p.UID).ToList(); + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/interface.ico b/北京北汽/SCP/CK.SCP.UniApi_CQ/interface.ico new file mode 100644 index 0000000..c7a4d52 Binary files /dev/null and b/北京北汽/SCP/CK.SCP.UniApi_CQ/interface.ico differ diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/packages.config b/北京北汽/SCP/CK.SCP.UniApi_CQ/packages.config new file mode 100644 index 0000000..33e13d6 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/packages.config @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="EntityFramework" version="6.2.0" targetFramework="net452" /> + <package id="Newtonsoft.Json" version="10.0.3" targetFramework="net452" /> +</packages> \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/test1.Designer.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/test1.Designer.cs new file mode 100644 index 0000000..5c94eb0 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/test1.Designer.cs @@ -0,0 +1,71 @@ +namespace CK.SCP.UniApi +{ + partial class test1 + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.button1 = new System.Windows.Forms.Button(); + this.richTextBox1 = new System.Windows.Forms.RichTextBox(); + this.SuspendLayout(); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(64, 12); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 0; + this.button1.Text = "button1"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // richTextBox1 + // + this.richTextBox1.Location = new System.Drawing.Point(64, 60); + this.richTextBox1.Name = "richTextBox1"; + this.richTextBox1.Size = new System.Drawing.Size(469, 459); + this.richTextBox1.TabIndex = 1; + this.richTextBox1.Text = ""; + // + // test1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(567, 531); + this.Controls.Add(this.richTextBox1); + this.Controls.Add(this.button1); + this.Name = "test1"; + this.Text = "test1"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button button1; + private System.Windows.Forms.RichTextBox richTextBox1; + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/test1.cs b/北京北汽/SCP/CK.SCP.UniApi_CQ/test1.cs new file mode 100644 index 0000000..4c83ccd --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/test1.cs @@ -0,0 +1,105 @@ +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Data.Entity.Migrations; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace CK.SCP.UniApi +{ + public partial class test1 : Form + { + public test1() + { + InitializeComponent(); + } + + private void button1_Click(object sender, EventArgs e) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + UpdateVender(db,db, "",(ret)=>{ + richTextBox1.Text = ret; + + }); + } + + } + private static void UpdateVender(ScpEntities idb, ScpEntities wdb, string seq ,Action<string> p_action) + { + + var ls = new List<string>(); + var qadDataList = idb.xxqad_vd_mstr.ToList(); + var wmsDataList = new List<TA_VENDER>(); + foreach (var qadData in qadDataList) + { + try + { + var wmsData = wdb.TA_VENDER.SingleOrDefault(p => p.VendId == qadData.xxqad_vd_addr.ToUpper()) ?? + new TA_VENDER { VendId = qadData.xxqad_vd_addr.ToUpper(), VendAbbCode = "0", State = 1 }; + wmsData.VendName = qadData.xxqad_vd_name; + wmsData.VendType = qadData.xxqad_vd_type.ToUpper().ToString(); + wmsData.Country = qadData.xxqad_vd_country; + wmsData.City = qadData.xxqad_vd_city; + wmsData.Currency = qadData.xxqad_vd_curr.ToUpper(); + // wmsData.Promo = qadData.xxqad_vd_promo; //国内国外 + wmsData.Address = qadData.xxqad_vd_line1 + qadData.xxqad_vd_line2 + qadData.xxqad_vd_line3; + wmsData.ZipCode = qadData.xxqad_vd_pst_id; + wmsData.Contacter = qadData.xxqad_vd_attn; + wmsData.Phone = qadData.xxqad_vd_phone; + wmsData.Fax = qadData.xxqad_vd_fax; + // wmsData.Email = ""; //QAD无此项 + wmsData.Tax = qadData.xxqad_vd_tax;//税率 + if (wmsDataList.Count(p => p.VendId == wmsData.VendId) == 0) + { + wmsDataList.Add(wmsData); + } + //qadData.xxqad_vd_scmread = ((int)UniApiState.成功).ToString(); + } + catch (Exception ex) + { + // qadData.xxqad_vd_scmread = ((int)UniApiState.失败).ToString(); + qadData.xxqad_vd_rmks += " SCM:" + ex.Message; + } + qadData.xxqad_vd_updateur = ScpCache.Config.SCP用户名; + qadData.xxqad_vd_updatedt = DateTime.Now; + + } + try + { + + + wdb.TA_VENDER.AddOrUpdate(wmsDataList.Where(p => !string.IsNullOrEmpty(p.VendName)).ToArray()); + wdb.SaveChanges(); + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + + ls.Add(sb.ToString()); + + } + catch (Exception e) + { + ls.Add(e.Message); + } + + p_action( string.Join("\r\n", ls.ToArray())); + + Console.WriteLine($"更新 供应商 数据:{qadDataList.Count}"); + } + } +} diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/test1.resx b/北京北汽/SCP/CK.SCP.UniApi_CQ/test1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.UniApi_CQ/test1.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/执行周期设置.ini b/北京北汽/SCP/CK.SCP.UniApi_CQ/执行周期设置.ini new file mode 100644 index 0000000..bd7208b Binary files /dev/null and b/北京北汽/SCP/CK.SCP.UniApi_CQ/执行周期设置.ini differ diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/接口数据库设置.ini b/北京北汽/SCP/CK.SCP.UniApi_CQ/接口数据库设置.ini new file mode 100644 index 0000000..0c68b53 Binary files /dev/null and b/北京北汽/SCP/CK.SCP.UniApi_CQ/接口数据库设置.ini differ diff --git a/北京北汽/SCP/CK.SCP.UniApi_CQ/通用设置.ini b/北京北汽/SCP/CK.SCP.UniApi_CQ/通用设置.ini new file mode 100644 index 0000000..57e7a53 Binary files /dev/null and b/北京北汽/SCP/CK.SCP.UniApi_CQ/通用设置.ini differ diff --git a/北京北汽/SCP/CK.SCP.Utils/AppConfigHelper.cs b/北京北汽/SCP/CK.SCP.Utils/AppConfigHelper.cs new file mode 100644 index 0000000..07bd166 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/AppConfigHelper.cs @@ -0,0 +1,69 @@ +using System.Configuration; +using System.Linq; + +namespace CK.SCP.Utils +{ + public static class AppConfigHelper + { + + + /// <summary> + /// 获取AppSettings配置节中的Key值 + /// </summary> + /// <param name="keyName">Key's name</param> + /// <returns>Key's value</returns> + public static string GetAppValue(string keyName) + { + return ConfigurationManager.AppSettings.Get(keyName); + } /**/ + + /// <summary> + /// 获取ConnectionStrings配置节中的值 + /// </summary> + /// <returns></returns> + public static string GetConnectionString() + { + var settings = ConfigurationManager.ConnectionStrings["ConnString"]; + return settings.ConnectionString; + } /**/ + + /// <summary> + /// 保存节点中ConnectionStrings的子节点配置项的值 + /// </summary> + /// <param name="strConn"></param> + public static void SetConnectionString(string strConn) + { + var config = + ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); + config.ConnectionStrings.ConnectionStrings["ConnString"].ConnectionString = strConn; + config.Save(ConfigurationSaveMode.Modified); + ConfigurationManager.RefreshSection("connectionStrings"); + + } /**/ + + /// <summary> + /// 判断appSettings中是否有此项 + /// </summary> + private static bool IsAppKeyExists(string strKey, Configuration config) + { + return config.AppSettings.Settings.AllKeys.Any(str => str == strKey); + } /**/ + + /// <summary> + /// 保存appSettings中某key的value值 + /// </summary> + /// <param name="strKey">key's name</param> + /// <param name="newValue">value</param> + public static void SetAppValue(string strKey, string newValue) + { + var config = + ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); + if (!IsAppKeyExists(strKey, config)) return; + config.AppSettings.Settings[strKey].Value = newValue; + config.Save(ConfigurationSaveMode.Modified); + ConfigurationManager.RefreshSection("appSettings"); + } + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Utils/BackgroundWorkerEventArgs.cs b/北京北汽/SCP/CK.SCP.Utils/BackgroundWorkerEventArgs.cs new file mode 100644 index 0000000..632502a --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/BackgroundWorkerEventArgs.cs @@ -0,0 +1,12 @@ +using System; + +namespace CK.SCP.Utils +{ + public class BackgroundWorkerEventArgs : EventArgs + { + /// <summary> + /// 后台程序运行时抛出的异常 + /// </summary> + public Exception BackGroundException { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Utils/CK.SCP.Utils.csproj b/北京北汽/SCP/CK.SCP.Utils/CK.SCP.Utils.csproj new file mode 100644 index 0000000..6ef1cb2 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/CK.SCP.Utils.csproj @@ -0,0 +1,110 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{7118AC83-9DC0-41F5-94EA-E6F405AE0448}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>CK.SCP.Utils</RootNamespace> + <AssemblyName>CK.SCP.Utils</AssemblyName> + <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>..\DLL\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="log4net"> + <HintPath>..\packages\log4net.2.0.8\lib\net40-full\log4net.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"> + <SpecificVersion>False</SpecificVersion> + <EmbedInteropTypes>True</EmbedInteropTypes> + <HintPath>C:\Windows\assembly\GAC\Microsoft.Office.Interop.Excel\12.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Excel.dll</HintPath> + </Reference> + <Reference Include="Newtonsoft.Json"> + <HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.configuration" /> + <Reference Include="System.Core" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Runtime.Serialization" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="AppConfigHelper.cs" /> + <Compile Include="BackgroundWorkerEventArgs.cs" /> + <Compile Include="EncryptHelper.cs" /> + <Compile Include="EnumExcelColor.cs" /> + <Compile Include="EnumHelper.cs" /> + <Compile Include="ExcelReader.cs" /> + <Compile Include="ExcelWriter.cs" /> + <Compile Include="FileHelper.cs" /> + <Compile Include="FormImportDataGrid.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="FormImportDataGrid.Designer.cs"> + <DependentUpon>FormImportDataGrid.cs</DependentUpon> + </Compile> + <Compile Include="FormProcess.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="FormProcess.Designer.cs"> + <DependentUpon>FormProcess.cs</DependentUpon> + </Compile> + <Compile Include="FtpHelper.cs" /> + <Compile Include="GzipHelper.cs" /> + <Compile Include="IoHelper.cs" /> + <Compile Include="JsonHelper.cs" /> + <Compile Include="ListHelper.cs" /> + <Compile Include="LogHelper.cs" /> + <Compile Include="MailHelper.cs" /> + <Compile Include="Md5Helper.cs" /> + <Compile Include="MessageHelper.cs" /> + <Compile Include="PredicateBuilder.cs" /> + <Compile Include="ProcessOperator.cs" /> + <Compile Include="ProgramHelper.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="TraceLogger.cs" /> + <Compile Include="XmlHelper.cs" /> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="FormImportDataGrid.resx"> + <DependentUpon>FormImportDataGrid.cs</DependentUpon> + </EmbeddedResource> + </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Utils/EncryptHelper.cs b/北京北汽/SCP/CK.SCP.Utils/EncryptHelper.cs new file mode 100644 index 0000000..3f7c8e3 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/EncryptHelper.cs @@ -0,0 +1,73 @@ +using System; +using System.IO; +using System.Security.Cryptography; +using System.Text; + +namespace CK.SCP.Utils +{ + public static class EncryptHelper + { + private const string EncryptKey = "CCCKKEJI"; + //定义密钥 + /// <summary> + /// DEC 加密过程 + /// </summary> + /// <param name="pToEncrypt">被加密的字符串</param> + /// <returns>加密后的字符串</returns> + public static string Encrypt(string pToEncrypt) + { + //访问数据加密标准(DES)算法的加密服务提供程序 (CSP) 版本的包装对象 + var des = new DESCryptoServiceProvider + { + Key = Encoding.ASCII.GetBytes(EncryptKey), + IV = Encoding.ASCII.GetBytes(EncryptKey) + }; + + var inputByteArray = Encoding.Default.GetBytes(pToEncrypt);//把字符串放到byte数组中 + + var ms = new MemoryStream();//创建其支持存储区为内存的流  + //定义将数据流链接到加密转换的流 + var cs = new CryptoStream(ms, des.CreateEncryptor(), CryptoStreamMode.Write); + cs.Write(inputByteArray, 0, inputByteArray.Length); + cs.FlushFinalBlock(); + //上面已经完成了把加密后的结果放到内存中去 + + var ret = new StringBuilder(); + foreach (var b in ms.ToArray()) + { + ret.AppendFormat("{0:X2}", b); + } + return ret.ToString(); + + } + + /// <summary> + /// DEC 解密过程 + /// </summary> + /// <param name="pToDecrypt">被解密的字符串</param> + /// <returns>返回被解密的字符串</returns> + public static string Decrypt(string pToDecrypt) + { + var des = new DESCryptoServiceProvider(); + + var inputByteArray = new byte[pToDecrypt.Length / 2]; + for (var x = 0; x < pToDecrypt.Length / 2; x++) + { + var i = (Convert.ToInt32(pToDecrypt.Substring(x * 2, 2), 16)); + inputByteArray[x] = (byte)i; + } + + des.Key = Encoding.ASCII.GetBytes(EncryptKey); //建立加密对象的密钥和偏移量,此值重要,不能修改 + des.IV = Encoding.ASCII.GetBytes(EncryptKey); + var ms = new MemoryStream(); + var cs = new CryptoStream(ms, des.CreateDecryptor(), CryptoStreamMode.Write); + + cs.Write(inputByteArray, 0, inputByteArray.Length); + cs.FlushFinalBlock(); + + return Encoding.Default.GetString(ms.ToArray()); + } + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Utils/EnumExcelColor.cs b/北京北汽/SCP/CK.SCP.Utils/EnumExcelColor.cs new file mode 100644 index 0000000..46cf574 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/EnumExcelColor.cs @@ -0,0 +1,91 @@ +namespace CK.SCP.Utils +{ + public enum EnumExcelColor + { + + 无色 = -4142, + + 自动 = -4105, + + 黑色 = 1, + + 褐色 = 53, + + 橄榄 = 52, + + 深绿 = 51, + + 深青 = 49, + + 深蓝 = 11, + + 靛蓝 = 55, + + 灰色80 = 56, + + 深红 = 9, + + 橙色 = 46, + + 深黄 = 12, + + 绿色 = 10, + + 青色 = 14, + + 蓝色 = 5, + + 蓝灰 = 47, + + 灰色50 = 16, + + 红色 = 3, + + 浅橙色 = 45, + + 酸橙色 = 43, + + 海绿 = 50, + + 水绿色 = 42, + + 浅蓝 = 41, + + 紫罗兰 = 13, + + 灰色40 = 48, + + 粉红 = 7, + + 金色 = 44, + + 黄色 = 6, + + 鲜绿 = 4, + + 青绿 = 8, + + 天蓝 = 33, + + 梅红 = 54, + + 灰色25 = 15, + + 玫瑰红 = 38, + + 茶色 = 40, + + 浅黄 = 36, + + 浅绿 = 35, + + 浅青绿 = 34, + + 淡蓝 = 37, + + 淡紫 = 39, + + 白色 = 2 + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Utils/EnumHelper.cs b/北京北汽/SCP/CK.SCP.Utils/EnumHelper.cs new file mode 100644 index 0000000..35d708b --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/EnumHelper.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Reflection; + +namespace CK.SCP.Utils +{ + public class EnumItem + { + public EnumItem(string name, string desc, int value) + { + Name = name; + Desc = desc; + Value = value; + } + + public EnumItem() + { + + } + + + public string Name { get; set; } + public string Desc { get; set; } + public int Value { get; set; } + + } + + public static class EnumHelper + { + public static List<EnumItem> EnumToList<T>() + { + List<EnumItem> list = new List<EnumItem>(); + var type = typeof(T); + foreach (var name in Enum.GetNames(type)) + { + var text = GetText<T>(type, name); + int value = (int) Enum.Parse(type, name); + list.Add(new EnumItem (name,text,value)); + } + return list; + } + + + public static Dictionary<string,int> EnumToDict<T>() + { + Dictionary<string, int> dictionary = new Dictionary<string, int>(); + var type = typeof (T); + foreach (var name in Enum.GetNames(type)) + { + var text = GetText<T>(type, name); + dictionary.Add(text, (int) Enum.Parse(type, name)); + } + return dictionary; + } + + private static string GetText<T>(Type type, string name) + { + var fieldInfo = type.GetField(name); + var text = name; + if (fieldInfo != null) + { + // 获取描述的属性。 + DescriptionAttribute attr = Attribute.GetCustomAttribute(fieldInfo, + typeof (DescriptionAttribute), false) as DescriptionAttribute; + if (attr != null) + { + text = attr.Description; + } + } + return text; + } + + + public static string GetDescription(Enum value) + { + Type enumType = value.GetType(); + // 获取枚举常数名称。 + var name = Enum.GetName(enumType, value); + if (name == null) return null; + // 获取枚举字段。 + var fieldInfo = enumType.GetField(name); + if (fieldInfo == null) return null; + // 获取描述的属性。 + var attr = Attribute.GetCustomAttribute(fieldInfo, + typeof(DescriptionAttribute), false) as DescriptionAttribute; + return attr?.Description; + } + + } + +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Utils/ExcelReader.cs b/北京北汽/SCP/CK.SCP.Utils/ExcelReader.cs new file mode 100644 index 0000000..cd6886f --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/ExcelReader.cs @@ -0,0 +1,435 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.Diagnostics; +using System.Windows.Forms; + +namespace CK.SCP.Utils +{ + public class ExcelReader + + { + + private DataSet _dsExcel; + private DataTable _dtExcel; + private string _fileExt; + private string _filePath; + private List<string> _readSheetName; + // private string _saveFileName; + private string _sheetName; + private List<string> _sheetNames; + + /// <summary> + /// ȡExcelļDataSet + /// </summary> + /// <returns></returns> + public DataSet ReturnDataSet() + { + var openFileDialog = new OpenFileDialog { Filter = "Execl files (*.xls,*.xlsx)|*.xls;*.xlsx" }; + //openFileDialog.RestoreDirectory = true; + //openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal); + + if (openFileDialog.ShowDialog() == DialogResult.OK) + { + _filePath = openFileDialog.FileName; + _fileExt = openFileDialog.FileName.Substring(openFileDialog.FileName.LastIndexOf('.')); + var poDv = new ProcessOperator { BackgroundWork = ReadExcelToDataSet }; + poDv.BackgroundWorkerCompleted += ReadExcel_Completed; + poDv.Start(); + } + return _dsExcel; + } + + /// <summary> + /// ȡExcelļDataSet + /// </summary> + /// <param name="filePath">Excelļַ</param> + /// <returns></returns> + public DataSet ReturnDataSet(string filePath) + { + try + { + if (string.IsNullOrEmpty(filePath)) + return ReturnDataSet(); + _filePath = filePath; + _fileExt = filePath.Substring(filePath.LastIndexOf('.')); + + if (_fileExt.ToUpper() == ".XLSX" || _fileExt.ToUpper() == ".XLS") + { + var poDv = new ProcessOperator { BackgroundWork = ReadExcelToDataSet }; + poDv.BackgroundWorkerCompleted += ReadExcel_Completed; + poDv.Start(); + } + else + { + MessageBox.Show("޷ú׺ļ"); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + return _dsExcel; + } + + + /// <summary> + /// ȡExcelļDataSet + /// </summary> + /// <param name="sheetNames">ȡExcelļƼ</param> + /// <returns></returns> + public DataSet ReturnDataSet(List<string> sheetNames) + { + var openFileDialog = new OpenFileDialog { Filter = "Execl files (*.xls,*.xlsx)|*.xls;*.xlsx" }; + //openFileDialog.RestoreDirectory = true; + //openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal); + if (openFileDialog.ShowDialog() == DialogResult.OK) + { + _sheetNames = sheetNames; + _filePath = openFileDialog.FileName; + _fileExt = openFileDialog.FileName.Substring(openFileDialog.FileName.LastIndexOf('.')); + var poDv = new ProcessOperator { BackgroundWork = ReadExcelToDataSet }; + poDv.BackgroundWorkerCompleted += ReadExcel_Completed; + poDv.Start(); + } + return _dsExcel; + } + + /// <summary> + /// ȡExcelļDataSet + /// </summary> + /// <param name="filePath">Excelļַ</param> + /// <param name="sheetNames">ȡExcelļƼ</param> + /// <returns></returns> + public DataSet ReturnDataSet(string filePath, List<string> sheetNames) + { + try + { + if (string.IsNullOrEmpty(filePath)) + return ReturnDataSet(); + if (sheetNames == null || sheetNames.Count == 0) + return ReturnDataSet(filePath); + + _filePath = filePath; + _fileExt = filePath.Substring(filePath.LastIndexOf('.')); + _sheetNames = sheetNames; + if (_fileExt.ToUpper() == ".XLSX" || _fileExt.ToUpper() == ".XLS") + { + var poDv = new ProcessOperator { BackgroundWork = ReadExcelToDataSet }; + poDv.BackgroundWorkerCompleted += ReadExcel_Completed; + poDv.Start(); + } + else + { + MessageBox.Show("޷ú׺ļ"); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + return _dsExcel; + } + + /// <summary> + /// ȡExcelļsheetDataTable + /// </summary> + /// <param name="sheetName">Excelļ</param> + /// <returns></returns> + public DataTable ReturnDataTable(string sheetName) + { + var openFileDialog = new OpenFileDialog { Filter = "Execl files (*.xls,*.xlsx)|*.xls;*.xlsx" }; + //openFileDialog.RestoreDirectory = true; + //openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal); + if (openFileDialog.ShowDialog() == DialogResult.OK) + { + _filePath = openFileDialog.FileName; + _fileExt = openFileDialog.FileName.Substring(openFileDialog.FileName.LastIndexOf('.')); + _sheetName = sheetName; + var poDv = new ProcessOperator { BackgroundWork = ReadToDataTable }; + poDv.BackgroundWorkerCompleted += ReadExcel_Completed; + poDv.Start(); + } + return _dtExcel; + } + + /// <summary> + /// ȡExcelļsheetDataTable + /// </summary> + /// <param name="filePath">Excelļַ</param> + /// <param name="sheetName">Excelļ</param> + /// <returns></returns> + public DataTable ReturnDataTable(string filePath, string sheetName) + { + try + { + if (string.IsNullOrEmpty(filePath)) + return ReturnDataTable(sheetName); + _filePath = filePath; + _fileExt = filePath.Substring(filePath.LastIndexOf('.')); + + if (_fileExt.ToUpper() == ".XLSX" || _fileExt.ToUpper() == ".XLS") + { + _sheetName = sheetName; + var poDv = new ProcessOperator { BackgroundWork = ReadToDataTable }; + poDv.BackgroundWorkerCompleted += ReadExcel_Completed; + poDv.Start(); + } + else + { + MessageBox.Show("޷ú׺ļ"); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + return _dtExcel; + } + + private void ReadExcel_Completed(object sender, BackgroundWorkerEventArgs e) + { + if (e.BackGroundException == null) + { + //if (readSheetName != null && readSheetName.Count > 0) + //{ + // //StringBuilder sb = new StringBuilder(); + // //sb.Append("ļȡɹ\n\r" + filePath + "\n\rȡ " + readSheetName.Count.ToString() + " Sheet\n\rֱǣ\n\r"); + // //int i = 0; + // //foreach (String SheetName in readSheetName) + // //{ + // // i ++; + // // sb.Append(SheetName + ","); + // // if (i % 3 == 0) + // // { + // // sb.Append("\n\r"); + // // } + // //} + // //String message = sb.ToString(); + // //message = message.Substring(0, message.Length - 1); + // //System.Windows.Forms.MessageBox.Show(message); + + //} + //else + //{ + // MessageBox.Show("ļȡɹ\n\r" + filePath + "\n\rȡ 0 Sheet"); + //} + if (_readSheetName == null || _readSheetName.Count == 0) + { + MessageBox.Show("ļʧܣδҵϵϵͳҪĹ"); + } + } + else + { + //MessageBox.Show("ļȡʧܣ\n\r" + filePath + "\n\rȡ 0 Sheet\n\rԺԣ"); + MessageBox.Show("ļȡʧ,ϵԱ"); + } + } + + private void ReadExcelToDataSet() + { + OleDbConnection connExcel = null; + try + { + _readSheetName = new List<string>(); + _dsExcel = new DataSet(); + + var connString = ""; + if (_fileExt.ToUpper() == ".XLSX") + { + connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + _filePath + + ";Extended Properties='Excel 12.0;HDR=YES;IMEX=1'"; + } + else + { + connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = " + _filePath + + ";Extended Properties = 'Excel 8.0;HDR=YES;IMEX=1'"; + } + connExcel = new OleDbConnection(connString); + connExcel.Open(); + var dtSheetNames = connExcel.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, + new object[] { null, null, null, "TABLE" }); + var sqlExcel = ""; + OleDbDataAdapter myCommand = null; + var tableName = ""; + var selectTable = ""; + if (_sheetNames != null && _sheetNames.Count > 0) + { + foreach (var sheetName in _sheetNames) + { + Debug.Assert(dtSheetNames != null, "dtSheetNames != null"); + for (var i = 0; i < dtSheetNames.Rows.Count; i++) + { + var res = 0; + tableName = dtSheetNames.Rows[i]["TABLE_NAME"].ToString().Replace("'", "").Replace("$", ""); + selectTable = dtSheetNames.Rows[i]["TABLE_NAME"].ToString(); + if (tableName.Length <= 4 || tableName.Equals("_xlnm#_FilterDatabase") || + !int.TryParse(tableName.Substring(0, 4), out res) || + tableName.IndexOf("_", StringComparison.Ordinal) == (tableName.Length - 1) || + tableName.IndexOf("FilterDatabase", StringComparison.Ordinal) != -1) continue; + if (!(tableName.Replace("'", "").Replace("$", "")).Equals(sheetName)) continue; + sqlExcel = string.Format(" select * from [" + selectTable + "]"); + myCommand = new OleDbDataAdapter(sqlExcel, connString); + myCommand.Fill(_dsExcel, tableName); + RemoveEmptyRow(_dsExcel.Tables[tableName]); + _readSheetName.Add(tableName); + break; + } + } + } + else + { + Debug.Assert(dtSheetNames != null, "dtSheetNames != null"); + for (var i = 0; i < dtSheetNames.Rows.Count; i++) + { + var res = 0; + tableName = dtSheetNames.Rows[i]["TABLE_NAME"].ToString().Replace("'", "").Replace("$", ""); + selectTable = dtSheetNames.Rows[i]["TABLE_NAME"].ToString(); + if (tableName.Length <= 4 || tableName.Equals("_xlnm#_FilterDatabase") || + !int.TryParse(tableName.Substring(0, 4), out res) || + tableName.IndexOf("_", StringComparison.Ordinal) == (tableName.Length - 1) || + tableName.IndexOf("FilterDatabase", StringComparison.Ordinal) != -1) continue; + sqlExcel = string.Format(" select * from [" + selectTable + "]"); + myCommand = new OleDbDataAdapter(sqlExcel, connString); + myCommand.Fill(_dsExcel, tableName); + RemoveEmptyRow(_dsExcel.Tables[tableName]); + _readSheetName.Add(tableName); + } + } + connExcel.Close(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + finally + { + if (connExcel != null) + { + connExcel.Close(); + } + } + } + + + private void ReadToDataTable() + { + OleDbConnection connExcel = null; + try + { + _readSheetName = new List<string>(); + _dsExcel = new DataSet(); + var connString = ""; + if (_fileExt.ToUpper() == ".XLSX") + { + connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + _filePath + + ";Extended Properties='Excel 12.0;HDR=YES;IMEX=1'"; + } + else + { + connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = " + _filePath + + ";Extended Properties = 'Excel 8.0;HDR=YES;IMEX=1'"; + } + connExcel = new OleDbConnection(connString); + connExcel.Open(); + var dtSheetNames = connExcel.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, + new object[] { null, null, null, "TABLE" }); + + var sqlExcel = ""; + OleDbDataAdapter myCommand = null; + var tableName = ""; + var selectTable = ""; + if (string.IsNullOrEmpty(_sheetName)) + { + var b = true; + var i = 0; + while (b) + { + if (dtSheetNames != null) + { + tableName = dtSheetNames.Rows[i]["TABLE_NAME"].ToString().Replace("'", "").Replace("$", ""); + selectTable = dtSheetNames.Rows[i]["TABLE_NAME"].ToString(); + } +// int res; + if (tableName.Length <= 4 + || tableName.Equals("_xlnm#_FilterDatabase") +// || !int.TryParse(tableName.Substring(0, 4), out res) + || tableName.IndexOf("_", StringComparison.Ordinal) == (tableName.Length - 1) + || tableName.IndexOf("FilterDatabase", StringComparison.Ordinal) != -1 + ) + { + if (dtSheetNames != null && i < dtSheetNames.Rows.Count) + { + i++; + } + else + { + b = false; + } + } + else + { + sqlExcel = string.Format(" select * from [" + selectTable + "]"); + myCommand = new OleDbDataAdapter(sqlExcel, connString); + myCommand.Fill(_dsExcel, tableName); + RemoveEmptyRow(_dsExcel.Tables[tableName]); + _dtExcel = _dsExcel.Tables[0]; + _readSheetName.Add(tableName); + b = false; + } + } + } + else + { + Debug.Assert(dtSheetNames != null, "dtSheetNames != null"); + for (var i = 0; i < dtSheetNames.Rows.Count; i++) + { + tableName = dtSheetNames.Rows[i]["TABLE_NAME"].ToString().Replace("'", "").Replace("$", ""); + selectTable = dtSheetNames.Rows[i]["TABLE_NAME"].ToString(); + if (!(tableName).Equals(_sheetName)) continue; + sqlExcel = string.Format(" select * from [" + selectTable + "]"); + myCommand = new OleDbDataAdapter(sqlExcel, connString); + myCommand.Fill(_dsExcel, tableName); + RemoveEmptyRow(_dsExcel.Tables[tableName]); + _dtExcel = _dsExcel.Tables[_sheetName]; + _readSheetName.Add(tableName); + return; + } + } + connExcel.Close(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + finally + { + if (connExcel != null) + { + connExcel.Close(); + } + } + } + + public static void RemoveEmptyRow(DataTable dt) + { + if (dt == null || dt.Rows.Count == 0) + return; + var isEmpty = true; + for (var idx = dt.Rows.Count - 1; idx >= 0; idx--) + { + var dr = dt.Rows[idx]; + for (var i = 0; i < dt.Columns.Count; i++) + { + if (dr[i].ToString().Trim() != string.Empty) + { + isEmpty = false; + } + } + if (isEmpty) + dt.Rows.Remove(dr); + } + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Utils/ExcelWriter.cs b/北京北汽/SCP/CK.SCP.Utils/ExcelWriter.cs new file mode 100644 index 0000000..1cad4da --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/ExcelWriter.cs @@ -0,0 +1,437 @@ +using System; +using System.Data; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Windows.Forms; +using Microsoft.Office.Interop.Excel; +using Application = Microsoft.Office.Interop.Excel.Application; +using DataTable = System.Data.DataTable; + +namespace CK.SCP.Utils +{ + public static class ExcelWriter + { + //ieachsize为每次写行的数值,可以自己设置 + private const int EachSize = 5000; + private const int RStartIndex = 1; + private const int CStartIndex = 0; + + public static readonly SaveFileDialog SaveFileDialog = new SaveFileDialog + { + Filter = "Excel 工作簿 (*.xlsx)|*.xlsx", + CheckFileExists = false, + CheckPathExists = false, + FilterIndex = 0, + RestoreDirectory = true, + CreatePrompt = false, + Title = "保存为Excel文件" + }; + + + private static void SetWorkSheetValue(Application excel, Worksheet sheet, DataTable dt, string fileName) + { + Range r = null; + var rIdx = RStartIndex; + var cIdx = CStartIndex; + if (!string.IsNullOrEmpty(dt.TableName)) + { + sheet.Name = dt.TableName; + } + + // + //取得标题 + // + foreach (DataColumn dc in dt.Columns) + { + cIdx++; + excel.Cells[rIdx, cIdx] = dc.ColumnName; + //设置标题格式为居中对齐 + r = sheet.Range[excel.Cells[rIdx, cIdx], excel.Cells[rIdx, cIdx]]; + r.HorizontalAlignment = XlVAlign.xlVAlignCenter; + r.Interior.ColorIndex = 19; + } + + //因为第一行已经写了表头,所以所有数据都应该从a2开始 + r = sheet.Range[excel.Cells[rIdx, cIdx], excel.Cells[rIdx, cIdx]]; + + //irowcount为实际行数,最大行 + var irowcount = dt.Rows.Count; + int iParstedRow = 0, iCurSize = 0; + //ieachsize为每次写行的数值,可以自己设置 + + //icolumnaccount为实际列数,最大列数 + var iColumnsCount = dt.Columns.Count; + //在内存中声明一个ieachsize×icolumnaccount的数组,ieachsize是每次最大存储的行数,icolumnaccount就是存储的实际列数 + var objval = new object[EachSize, iColumnsCount]; + iCurSize = EachSize; + while (iParstedRow < irowcount) + { + if ((irowcount - iParstedRow) < EachSize) + iCurSize = irowcount - iParstedRow; + //用for循环给数组赋值 + for (var i = 0; i < iCurSize; i++) + { + for (var j = 0; j < iColumnsCount; j++) + { + var s = dt.Rows[i + iParstedRow][j].ToString(); + ////////////////// + //格式化日期字段 + var dc = dt.Columns[j]; + if (dc.DataType.FullName == "System.DateTime" && s != null && s != "") + { + DateTime time; + DateTime.TryParse(s, out time); + s = time.ToString(); + } + ////////////////// + decimal d; + if (decimal.TryParse(s, out d)) + { + if (Math.Round(d, 5) == 0) + { + objval[i, j] = string.Empty; + continue; + } + } + objval[i, j] = s; + } + System.Windows.Forms.Application.DoEvents(); + } + var X = "A" + (iParstedRow + 2); + var col = ""; + if (iColumnsCount <= 26) + { + col = ((char)('A' + iColumnsCount - 1)) + + ((iParstedRow + iCurSize + 1)).ToString(CultureInfo.InvariantCulture); + } + else + { + col = ((char)('A' + (iColumnsCount / 26 - 1))) + + ((char)('A' + (iColumnsCount % 26 - 1))).ToString() + + ((iParstedRow + iCurSize + 1)); + } + r = sheet.Range[X, col]; + // 调用range的value2属性,把内存中的值赋给excel + r.Value2 = objval; + iParstedRow = iParstedRow + iCurSize; + } + + var rSumIdx = dt.Rows.Count + 1; + var cSumIdx = CStartIndex + 1; + + // //加载一个合计行 + // // + // //excel.Cells[rowSum, 2] = "合计"; + // + // r = sheet.Range[excel.Cells[rSumIdx, 2], excel.Cells[rSumIdx, 2]]; + // r.HorizontalAlignment = XlVAlign.xlVAlignCenter; + // + // // + //设置选中的部分的颜色 + // + r = sheet.Range[excel.Cells[2, cSumIdx], excel.Cells[2, cIdx]]; + r.Select(); + //设置为浅黄色,共计有56种 + // r.Interior.ColorIndex = 19; + + + // + //设置报表表格为最适应宽度 + // + r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[rSumIdx, cIdx]]; + r.Select(); + r.Columns.AutoFit(); + + + // + //绘制边框 + // + r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[rSumIdx, cIdx]]; + r.Borders.LineStyle = 1; + + r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[rSumIdx, cSumIdx]]; + r.Borders[XlBordersIndex.xlEdgeLeft].Weight = XlBorderWeight.xlThick; //设置左边线加粗 + + r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[RStartIndex, cIdx]]; + r.Borders[XlBordersIndex.xlEdgeTop].Weight = XlBorderWeight.xlThick; //设置上边线加粗 + + r = sheet.Range[excel.Cells[RStartIndex, cIdx], excel.Cells[rSumIdx, cIdx]]; + r.Borders[XlBordersIndex.xlEdgeRight].Weight = XlBorderWeight.xlThick; //设置右边线加粗 + + r = sheet.Range[excel.Cells[rSumIdx, cSumIdx], excel.Cells[rSumIdx, cIdx]]; + r.Borders[XlBordersIndex.xlEdgeBottom].Weight = XlBorderWeight.xlThick; //设置下边线加粗 + + //r = sheet.Range[excel.Cells[0, 0], null]; + + // + //显示效果 + // + excel.Visible = false; + excel.DisplayAlerts = false; + excel.AlertBeforeOverwriting = false; + } + + private static void ReleaseObject(object obj) + { + try + { + Marshal.ReleaseComObject(obj); + obj = null; + } + catch + { + obj = null; + } + finally + { + GC.Collect(); + } + } + + [DllImport("User32.dll", CharSet = CharSet.Auto)] + private static extern int GetWindowThreadProcessId(IntPtr hwnd, out int ID); + + private static void Kill(_Application excel) + { + try + { + var t = new IntPtr(excel.Hwnd); + var k = 0; + GetWindowThreadProcessId(t, out k); + var p = Process.GetProcessById(k); + p.Kill(); + } + catch (Exception ex) + { + MessageBox.Show(ex.ToString()); + } + } + + /// <summary> + /// 将DataTable数据写入Excel文件 + /// </summary> + /// <param name="dt">DataTable</param> + public static void Write(DataTable dt) + { + if (SaveFileDialog.ShowDialog() == DialogResult.OK) + { + var fileName = SaveFileDialog.FileName; + WriteDataTableToExcel(dt, fileName); + } + } + + + /// <summary> + /// 将DataTable数据写入Excel文件 + /// </summary> + /// <param name="dt">DataTable</param> + /// <param name="fileName">Excel文件路径</param> + public static void Write(DataTable dt, string fileName) + { + try + { + if (string.IsNullOrEmpty(fileName)) + { + Write(dt); + } + else + { + WriteDataTableToExcel(dt, fileName); + } + } + catch + { + MessageBox.Show("无法解析文件路径!"); + } + } + + private static void WriteDataTableToExcel(DataTable dt, string fileName) + { + var fileExt = fileName.Substring(fileName.LastIndexOf('.')); + if (fileExt.ToUpper() == ".XLSX") + { + if (dt != null && dt.Rows.Count > 0) + { + var poDv = new ProcessOperator + { + BackgroundWork = () => WriteExcelByDataTable(dt, fileName) + }; + poDv.BackgroundWorkerCompleted += WriteExcel_Completed; + poDv.Start(); + } + else + { + MessageBox.Show("当前表单没有任何数据"); + } + } + else + { + MessageBox.Show("无法解析该后缀名的文件!"); + } + } + + // /// <summary> + // /// 将DataSet数据写入Excel文件 + // /// </summary> + // /// <param name="dsExcel">DataSet</param> + // public void Write(DataSet dsExcel) + // { + // if (dsExcel != null && dsExcel.Tables.Count > 0) + // { + // if (_saveFileDialog.ShowDialog() == DialogResult.OK) + // { + // string fileName = _saveFileDialog.FileName; //得到存放路径 + // var poDv = new ProcessOperator + // { + // MessageInfo = @"正在写入" + Path.GetFileName(fileName) + "文件", + // BackgroundWork = () => WriteExcelByDataSet(dsExcel, fileName) + // }; + // poDv.BackgroundWorkerCompleted += WriteExcel_Completed; + // poDv.Start(); + // } + // } + // else + // { + // MessageBox.Show("当前没有任何表单!"); + // } + // } + + public static void Write(DataSet ds) + { + if (SaveFileDialog.ShowDialog() == DialogResult.OK) + { + var fileName = SaveFileDialog.FileName; + Write(ds, fileName); + } + } + + public static void Write(DataSet dsExcel, string fileName) + { + try + { + // if (string.IsNullOrEmpty(fileName)) + // { + // Write(dsExcel); + // } + // else + // { + if (dsExcel != null && dsExcel.Tables.Count > 0) + { + if (File.Exists(fileName)) + File.Delete(fileName); + //_saveFileDialog.FileName = fileName; + //if (_saveFileDialog.ShowDialog() == DialogResult.OK) + { + //_writeSheetName = new List<string>(); + foreach (DataTable dt in dsExcel.Tables) + { + if (dt == null || dt.TableName == null || dt.TableName == "") continue; + ExcelReader.RemoveEmptyRow(dt); + //string name = _saveFileDialog.FileName; + var dt1 = dt; + var poDv = new ProcessOperator + { + MessageInfo = @"正在写入" + Path.GetFileName(fileName) + "," + dt.TableName, + BackgroundWork = () => WriteExcelByDataTable(dt1, fileName) + }; + poDv.Start(); + } + WriteExcel_Completed(null, null); + } + } + else + { + MessageBox.Show("当前没有任何表单!"); + } + // } + } + catch (Exception ex) + { + MessageBox.Show("无法解析文件路径!\n" + ex); + } + } + + public static void WriteExcelByDataTable(DataTable dt, string fileName) + { + // if (_writeSheetName == null) + // { + // _writeSheetName = new List<string>(); + // } + + Workbook workbook = null; + Worksheet sheet = null; + var excel = new Application(); + var miss = Missing.Value; + try + { + if (File.Exists(fileName)) + { + workbook = excel.Workbooks.Open(fileName, 0, false, 5, "", "", false, XlPlatform.xlWindows, "", true, + false, 0, true, false, false); + var sheets = workbook.Sheets; + var existSheetName = string.Empty; + for (var i = 1; i <= sheets.Count; i++) + { + if (sheets[i].Name != dt.TableName) continue; + sheets[i].Name += "(副本)"; + existSheetName = sheets[i].Name; + } + sheet = (Worksheet)sheets.Add(sheets[1], miss, miss, miss); + + SetWorkSheetValue(excel, sheet, dt, fileName); + + workbook.Save(); + if (!string.IsNullOrEmpty(existSheetName)) + sheets[existSheetName].Delete(); + } + else + { + workbook = excel.Workbooks.Add(true); + sheet = (Worksheet)workbook.ActiveSheet; + SetWorkSheetValue(excel, sheet, dt, fileName); + // workbook.SaveAs(fileName, XlFileFormat.xlOpenDocumentSpreadsheet, miss, miss, miss, miss, + // XlSaveAsAccessMode.xlExclusive, miss, miss, miss, miss, miss); + workbook.SaveAs(fileName, miss, miss, miss, miss, miss, + XlSaveAsAccessMode.xlNoChange, miss, miss, miss, miss, miss); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.ToString()); + } + finally + { + workbook.Close(true, Missing.Value, Missing.Value); + excel.Quit(); + Kill(excel); //调用kill当前excel进程 + ReleaseObject(workbook); + ReleaseObject(sheet); + ReleaseObject(excel); + } + } + + // private void WriteExcelByDataSet(DataSet dsExcel, string fileName) + // { + // //_writeSheetName = new List<string>(); + // foreach (DataTable dtExcel in dsExcel.Tables) + // { + // if (dtExcel == null || dtExcel.TableName == null || dtExcel.TableName == "") continue; + // ListHelper.RemoveEmptyRow(dtExcel); + // //_dtExcel = dt; + // WriteExcelByDataTable(dtExcel, fileName); + // } + // } + + private static void WriteExcel_Completed(object sender, BackgroundWorkerEventArgs e) + { + Process.Start(SaveFileDialog.FileName); + // MessageBox.Show("导出完成"); + // MessageBox.Show(e.BackGroundException == null + // ? Path.GetFileName(_filePath) + "文件写入成功!" + // : Path.GetFileName(_filePath) + "文件写入失败,请联系管理员!"); + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Utils/FileHelper.cs b/北京北汽/SCP/CK.SCP.Utils/FileHelper.cs new file mode 100644 index 0000000..4f66803 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/FileHelper.cs @@ -0,0 +1,52 @@ +using System.IO; +using System.Reflection; +using System.Text; + +namespace CK.SCP.Utils +{ + public static class FileHelper + { + public static string GetApplicationPath() + { + string path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase); + path = path.Replace(@"file:\", ""); + if (path.Substring(path.Length - 1, 1) != @"\") + { + path += @"\"; + } + return path; + } + + public static void Create(string path) + { + if (!Directory.Exists(path)) + Directory.CreateDirectory(path); + } + + public static bool Exists(string filename) + { + filename = GetApplicationPath() + filename; + return File.Exists(filename); + } + + public static void WriteFile(string filename, string str,bool isAppand = false) + { + filename = GetApplicationPath() + filename; + var sw = new StreamWriter(filename, isAppand, Encoding.Unicode); + sw.Write(str); + sw.Close(); + } + + + public static string ReadFile(string filename,Encoding encoding= null) + { + if (encoding == null) + encoding = Encoding.Unicode; + filename = GetApplicationPath() + filename; + var sr = new StreamReader(filename, encoding); + var str = sr.ReadToEnd(); + sr.Close(); + return str; + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Utils/FormImportDataGrid.Designer.cs b/北京北汽/SCP/CK.SCP.Utils/FormImportDataGrid.Designer.cs new file mode 100644 index 0000000..466d51d --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/FormImportDataGrid.Designer.cs @@ -0,0 +1,104 @@ +namespace CK.SCP.Utils +{ + partial class FormImportDataGrid + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.dgvDetail = new System.Windows.Forms.DataGridView(); + this.panel1 = new System.Windows.Forms.Panel(); + this.btnConfirm = new System.Windows.Forms.Button(); + this.btnCancel = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.dgvDetail)).BeginInit(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // dgvDetail + // + this.dgvDetail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvDetail.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvDetail.Location = new System.Drawing.Point(0, 0); + this.dgvDetail.Name = "dgvDetail"; + this.dgvDetail.RowTemplate.Height = 23; + this.dgvDetail.Size = new System.Drawing.Size(784, 413); + this.dgvDetail.TabIndex = 0; + // + // panel1 + // + this.panel1.Controls.Add(this.btnConfirm); + this.panel1.Controls.Add(this.btnCancel); + this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.panel1.Location = new System.Drawing.Point(0, 413); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(784, 48); + this.panel1.TabIndex = 1; + // + // btnConfirm + // + this.btnConfirm.Location = new System.Drawing.Point(697, 13); + this.btnConfirm.Name = "btnConfirm"; + this.btnConfirm.Size = new System.Drawing.Size(75, 23); + this.btnConfirm.TabIndex = 2; + this.btnConfirm.Text = "确认导入"; + this.btnConfirm.UseVisualStyleBackColor = true; + this.btnConfirm.Click += new System.EventHandler(this.btnConfirm_Click); + // + // btnCancel + // + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(12, 13); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(75, 23); + this.btnCancel.TabIndex = 0; + this.btnCancel.Text = "取消"; + this.btnCancel.UseVisualStyleBackColor = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // FormImportDataGrid + // + this.AcceptButton = this.btnConfirm; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnCancel; + this.ClientSize = new System.Drawing.Size(784, 461); + this.Controls.Add(this.dgvDetail); + this.Controls.Add(this.panel1); + this.Name = "FormImportDataGrid"; + this.Text = "FormImportDataGrid"; + ((System.ComponentModel.ISupportInitialize)(this.dgvDetail)).EndInit(); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.DataGridView dgvDetail; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnConfirm; + private System.Windows.Forms.Button btnCancel; + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Utils/FormImportDataGrid.cs b/北京北汽/SCP/CK.SCP.Utils/FormImportDataGrid.cs new file mode 100644 index 0000000..b0919dc --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/FormImportDataGrid.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace CK.SCP.Utils +{ + public partial class FormImportDataGrid : Form + { + public FormImportDataGrid(string tablename,DataTable dtSource) + { + InitializeComponent(); + Text = tablename; + dgvDetail.DataSource = dtSource; + } + + public override sealed string Text + { + get { return base.Text; } + set { base.Text = value; } + } + + private void btnConfirm_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.OK; + Close(); + } + + private void btnCancel_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.Cancel; + Close(); + } + } +} diff --git a/北京北汽/SCP/CK.SCP.Utils/FormImportDataGrid.resx b/北京北汽/SCP/CK.SCP.Utils/FormImportDataGrid.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/FormImportDataGrid.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Utils/FormProcess.Designer.cs b/北京北汽/SCP/CK.SCP.Utils/FormProcess.Designer.cs new file mode 100644 index 0000000..234fe1a --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/FormProcess.Designer.cs @@ -0,0 +1,80 @@ + +namespace CK.SCP.Utils +{ + partial class FormProcess + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.labelInfor = new System.Windows.Forms.Label(); + this.SysPBar = new System.Windows.Forms.ProgressBar(); + this.SuspendLayout(); + // + // labelInfor + // + this.labelInfor.AutoSize = true; + this.labelInfor.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.labelInfor.Location = new System.Drawing.Point(35, 19); + this.labelInfor.Name = "labelInfor"; + this.labelInfor.Size = new System.Drawing.Size(170, 21); + this.labelInfor.TabIndex = 0; + this.labelInfor.Text = "读取数据中,请稍候......."; + // + // SysPBar + // + this.SysPBar.Location = new System.Drawing.Point(33, 40); + this.SysPBar.MarqueeAnimationSpeed = 15; + this.SysPBar.Name = "SysPBar"; + this.SysPBar.Size = new System.Drawing.Size(537, 30); + this.SysPBar.Style = System.Windows.Forms.ProgressBarStyle.Marquee; + this.SysPBar.TabIndex = 4; + // + // FormProcess + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoSize = true; + this.BackColor = System.Drawing.SystemColors.ActiveBorder; + this.ClientSize = new System.Drawing.Size(602, 103); + this.Controls.Add(this.SysPBar); + this.Controls.Add(this.labelInfor); + this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "FormProcess"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "进度"; + this.Load += new System.EventHandler(this.FormProcess_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label labelInfor; + private System.Windows.Forms.ProgressBar SysPBar; + } +} diff --git a/北京北汽/SCP/CK.SCP.Utils/FormProcess.cs b/北京北汽/SCP/CK.SCP.Utils/FormProcess.cs new file mode 100644 index 0000000..35238ee --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/FormProcess.cs @@ -0,0 +1,43 @@ +using System; +using System.Windows.Forms; + +namespace CK.SCP.Utils +{ + public partial class FormProcess : Form + { + public FormProcess() + { + InitializeComponent(); + } + /// <summary> + /// 设置提示信息 + /// </summary> + public string MessageInfo + { + set { labelInfor.Text = value; } + } + + /// <summary> + /// 设置进度条显示值 + /// </summary> + public int ProcessValue + { + set { SysPBar.Value = value; } + } + + /// <summary> + /// 设置进度条样式 + /// </summary> + public ProgressBarStyle ProcessStyle + { + set { SysPBar.Style = value; } + } + + private void FormProcess_Load(object sender, EventArgs e) + { + SysPBar.Left = 20; + SysPBar.Width = Width - 40; + } + } +} + diff --git a/北京北汽/SCP/CK.SCP.Utils/FtpHelper.cs b/北京北汽/SCP/CK.SCP.Utils/FtpHelper.cs new file mode 100644 index 0000000..49a1686 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/FtpHelper.cs @@ -0,0 +1,517 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Net; +using System.Text; + +namespace CK.SCP.Utils +{ + + public class FtpHelper + { + string _ftpServer; + string _ftpPort; + string _ftpRootPath; + readonly string _ftpUserId; + readonly string _ftpPassword; + string _ftpUri; + + /// <summary> + /// 连接FTP + /// </summary> + /// <param name="ftpServer">FTP连接地址</param> + /// <param name="ftpPort">FTP端口</param> + /// <param name="ftpRootPath">指定FTP连接成功后的当前目录, 如果不指定即默认为根目录</param> + /// <param name="ftpUserId">用户名</param> + /// <param name="ftpPassword">密码</param> + public FtpHelper(string ftpServer,string ftpPort, string ftpRootPath, string ftpUserId, string ftpPassword) + { + _ftpServer = ftpServer; + _ftpPort = ftpPort; + _ftpRootPath = ftpRootPath; + _ftpUserId = ftpUserId; + _ftpPassword = ftpPassword; + _ftpUri = "ftp://" + _ftpServer +":"+_ftpPort+ "/" + _ftpRootPath + "/"; + } + + public void UploadList(List<string> filenameList) + { + foreach (string filename in filenameList) + { + Upload(filename); + } + } + + /// <summary> + /// 上传 + /// </summary> + /// <param name="filename"></param> + public void Upload(string filename) + { + FileInfo fileInf = new FileInfo(filename); + string uri = _ftpUri + fileInf.Name; + var reqFTP = (FtpWebRequest) FtpWebRequest.Create(new Uri(uri)); + reqFTP.Credentials = new NetworkCredential(_ftpUserId, _ftpPassword); + reqFTP.KeepAlive = false; + reqFTP.Method = WebRequestMethods.Ftp.UploadFile; + reqFTP.UseBinary = true; + reqFTP.ContentLength = fileInf.Length; + int buffLength = 2048; + byte[] buff = new byte[buffLength]; + int contentLen; + using (FileStream fs = fileInf.OpenRead()) + { + using (Stream strm = reqFTP.GetRequestStream()) + { + contentLen = fs.Read(buff, 0, buffLength); + while (contentLen != 0) + { + strm.Write(buff, 0, contentLen); + contentLen = fs.Read(buff, 0, buffLength); + } + strm.Close(); + } + fs.Close(); + } + Console.WriteLine("Upload " + Path.GetFileName(filename)); + + } + + /// <summary> + /// 下载 + /// </summary> + /// <param name="filePath"></param> + /// <param name="fileName"></param> + public void Download(string filePath, string fileName) + { + FtpWebRequest reqFTP; + try + { + FileStream outputStream = new FileStream(filePath + "\\" + fileName, FileMode.Create); + + reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(_ftpUri + fileName)); + reqFTP.Method = WebRequestMethods.Ftp.DownloadFile; + reqFTP.UseBinary = true; + reqFTP.Credentials = new NetworkCredential(_ftpUserId, _ftpPassword); + FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse(); + Stream ftpStream = response.GetResponseStream(); + long cl = response.ContentLength; + int bufferSize = 2048; + int readCount; + byte[] buffer = new byte[bufferSize]; + + readCount = ftpStream.Read(buffer, 0, bufferSize); + while (readCount > 0) + { + outputStream.Write(buffer, 0, readCount); + readCount = ftpStream.Read(buffer, 0, bufferSize); + } + + ftpStream.Close(); + outputStream.Close(); + response.Close(); + Console.WriteLine("Download " +fileName); + + } + catch (Exception ex) + { + Console.WriteLine( "Download Error --> " + ex.Message); + } + } + + + /// <summary> + /// 删除文件 + /// </summary> + /// <param name="fileName"></param> + public void Delete(string fileName) + { + try + { + string uri = _ftpUri + fileName; + FtpWebRequest reqFTP; + reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(uri)); + + reqFTP.Credentials = new NetworkCredential(_ftpUserId, _ftpPassword); + reqFTP.KeepAlive = false; + reqFTP.Method = WebRequestMethods.Ftp.DeleteFile; + + string result = String.Empty; + FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse(); + long size = response.ContentLength; + Stream datastream = response.GetResponseStream(); + StreamReader sr = new StreamReader(datastream); + result = sr.ReadToEnd(); + sr.Close(); + datastream.Close(); + response.Close(); + } + catch (Exception ex) + { + Console.WriteLine( "Delete Error --> " + ex.Message + " 文件名:" + fileName); + } + } + + /// <summary> + /// 删除文件夹 + /// </summary> + /// <param name="folderName"></param> + public void RemoveDirectory(string folderName) + { + try + { + string uri = _ftpUri + folderName; + FtpWebRequest reqFTP; + reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(uri)); + + reqFTP.Credentials = new NetworkCredential(_ftpUserId, _ftpPassword); + reqFTP.KeepAlive = false; + reqFTP.Method = WebRequestMethods.Ftp.RemoveDirectory; + + string result = String.Empty; + FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse(); + long size = response.ContentLength; + Stream datastream = response.GetResponseStream(); + StreamReader sr = new StreamReader(datastream); + result = sr.ReadToEnd(); + sr.Close(); + datastream.Close(); + response.Close(); + } + catch (Exception ex) + { + Console.WriteLine( "Delete Error --> " + ex.Message + " 文件名:" + folderName); + } + } + + /// <summary> + /// 获取当前目录下明细(包含文件和文件夹) + /// </summary> + /// <returns></returns> + public string[] GetFilesDetailList() + { + string[] downloadFiles; + try + { + StringBuilder result = new StringBuilder(); + FtpWebRequest ftp; + ftp = (FtpWebRequest)FtpWebRequest.Create(new Uri(_ftpUri)); + ftp.Credentials = new NetworkCredential(_ftpUserId, _ftpPassword); + ftp.Method = WebRequestMethods.Ftp.ListDirectoryDetails; + WebResponse response = ftp.GetResponse(); + StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.Default); + + //while (reader.Read() > 0) + //{ + + //} + string line = reader.ReadLine(); + //line = reader.ReadLine(); + //line = reader.ReadLine(); + + while (line != null) + { + result.Append(line); + result.Append("\n"); + line = reader.ReadLine(); + } + result.Remove(result.ToString().LastIndexOf("\n"), 1); + reader.Close(); + response.Close(); + return result.ToString().Split('\n'); + } + catch (Exception ex) + { + downloadFiles = null; + Console.WriteLine( "GetFilesDetailList Error --> " + ex.Message); + return downloadFiles; + } + } + + /// <summary> + /// 获取当前目录下文件列表(仅文件) + /// </summary> + /// <returns></returns> + public string[] GetFileList(string mask) + { + string[] downloadFiles; + StringBuilder result = new StringBuilder(); + FtpWebRequest reqFTP; + try + { + reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(_ftpUri)); + reqFTP.UseBinary = true; + reqFTP.Credentials = new NetworkCredential(_ftpUserId, _ftpPassword); + reqFTP.Method = WebRequestMethods.Ftp.ListDirectory; + WebResponse response = reqFTP.GetResponse(); + StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.Default); + + string line = reader.ReadLine(); + while (line != null) + { + if (mask.Trim() != string.Empty && mask.Trim() != "*.*") + { + + string mask_ = mask.Substring(0, mask.IndexOf("*")); + if (line.Substring(0, mask_.Length) == mask_) + { + result.Append(line); + result.Append("\n"); + } + } + else + { + result.Append(line); + result.Append("\n"); + } + line = reader.ReadLine(); + } + result.Remove(result.ToString().LastIndexOf('\n'), 1); + reader.Close(); + response.Close(); + return result.ToString().Split('\n'); + } + catch (Exception ex) + { + downloadFiles = null; + if (ex.Message.Trim() != "远程服务器返回错误: (550) 文件不可用(例如,未找到文件,无法访问文件)。") + { + Console.WriteLine( "GetFileList Error --> " + ex.Message.ToString()); + } + return downloadFiles; + } + } + + /// <summary> + /// 获取当前目录下所有的文件夹列表(仅文件夹) + /// </summary> + /// <returns></returns> + public string[] GetDirectoryList() + { + string[] drectory = GetFilesDetailList(); + string m = string.Empty; + foreach (string str in drectory) + { + int dirPos = str.IndexOf("<DIR>"); + if (dirPos > 0) + { + /*判断 Windows 风格*/ + m += str.Substring(dirPos + 5).Trim() + "\n"; + } + else if (str.Trim().Substring(0, 1).ToUpper() == "D") + { + /*判断 Unix 风格*/ + string dir = str.Substring(54).Trim(); + if (dir != "." && dir != "..") + { + m += dir + "\n"; + } + } + } + + char[] n = new char[] { '\n' }; + return m.Split(n); + } + + /// <summary> + /// 判断当前目录下指定的子目录是否存在 + /// </summary> + /// <param name="RemoteDirectoryName">指定的目录名</param> + public bool IsDirectoryExist(string RemoteDirectoryName) + { + string[] dirList = GetDirectoryList(); + foreach (string str in dirList) + { + if (str.Trim() == RemoteDirectoryName.Trim()) + { + return true; + } + } + return false; + } + + /// <summary> + /// 判断当前目录下指定的文件是否存在 + /// </summary> + /// <param name="RemoteFileName">远程文件名</param> + public bool IsFileExist(string RemoteFileName) + { + string[] fileList = GetFileList("*.*"); + foreach (string str in fileList) + { + if (str.Trim() == RemoteFileName.Trim()) + { + return true; + } + } + return false; + } + + /// <summary> + /// 创建文件夹 + /// </summary> + /// <param name="dirName"></param> + public void MakeDir(string dirName) + { + FtpWebRequest reqFTP; + try + { + // dirName = name of the directory to create. + reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(_ftpUri + dirName)); + reqFTP.Method = WebRequestMethods.Ftp.MakeDirectory; + reqFTP.UseBinary = true; + reqFTP.Credentials = new NetworkCredential(_ftpUserId, _ftpPassword); + FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse(); + Stream ftpStream = response.GetResponseStream(); + + ftpStream.Close(); + response.Close(); + } + catch (Exception ex) + { + Console.WriteLine( "MakeDir Error --> " + ex.Message); + } + } + + /// <summary> + /// 获取指定文件大小 + /// </summary> + /// <param name="filename"></param> + /// <returns></returns> + public long GetFileSize(string filename) + { + FtpWebRequest reqFTP; + long fileSize = 0; + try + { + reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(_ftpUri + filename)); + reqFTP.Method = WebRequestMethods.Ftp.GetFileSize; + reqFTP.UseBinary = true; + reqFTP.Credentials = new NetworkCredential(_ftpUserId, _ftpPassword); + FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse(); + Stream ftpStream = response.GetResponseStream(); + fileSize = response.ContentLength; + + ftpStream.Close(); + response.Close(); + } + catch (Exception ex) + { + Console.WriteLine( "GetFileSize Error --> " + ex.Message); + } + return fileSize; + } + + /// <summary> + /// 改名 + /// </summary> + /// <param name="currentFilename"></param> + /// <param name="newFilename"></param> + public void Rename(string currentFilename, string newFilename) + { + FtpWebRequest reqFTP; + try + { + reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(_ftpUri + currentFilename)); + reqFTP.Method = WebRequestMethods.Ftp.Rename; + reqFTP.RenameTo = newFilename; + reqFTP.UseBinary = true; + reqFTP.Credentials = new NetworkCredential(_ftpUserId, _ftpPassword); + FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse(); + Stream ftpStream = response.GetResponseStream(); + + ftpStream.Close(); + response.Close(); + } + catch (Exception ex) + { + Console.WriteLine( "Rename Error --> " + ex.Message); + } + } + + /// <summary> + /// 移动文件 + /// </summary> + /// <param name="currentFilename"></param> + /// <param name="newFilename"></param> + public void MoveFile(string currentFilename, string newDirectory) + { + Rename(currentFilename, newDirectory); + } + + /// <summary> + /// 切换当前目录 + /// </summary> + /// <param name="pathName"></param> + /// <param name="isRoot">true 绝对路径 false 相对路径</param> + public void GotoDirectory(string pathName, bool isRoot) + { + if (isRoot) + { + _ftpUri = "ftp://" + _ftpServer + "/" + pathName + "/"; + } + else + { + _ftpUri = "ftp://" + _ftpServer + "/" + _ftpRootPath + "/" + pathName + "/"; + } + } + + /// <summary> + /// 删除订单目录 + /// </summary> + /// <param name="ftpServerIP">FTP 主机地址</param> + /// <param name="folderToDelete">FTP 用户名</param> + /// <param name="ftpUserID">FTP 用户名</param> + /// <param name="ftpPassword">FTP 密码</param> + public static void DeleteOrderDirectory(string ftpServerIP,string ftpPort, string folderToDelete, string ftpUserID, string ftpPassword) + { + try + { + if (!string.IsNullOrEmpty(ftpServerIP) && !string.IsNullOrEmpty(folderToDelete) && !string.IsNullOrEmpty(ftpUserID) && !string.IsNullOrEmpty(ftpPassword)) + { + FtpHelper fw = new FtpHelper(ftpServerIP,ftpPort, folderToDelete, ftpUserID, ftpPassword); + //进入订单目录 + fw.GotoDirectory(folderToDelete, true); + //获取规格目录 + string[] folders = fw.GetDirectoryList(); + foreach (string folder in folders) + { + if (!string.IsNullOrEmpty(folder) || folder != "") + { + //进入订单目录 + string subFolder = folderToDelete + "/" + folder; + fw.GotoDirectory(subFolder, true); + //获取文件列表 + string[] files = fw.GetFileList("*.*"); + if (files != null) + { + //删除文件 + foreach (string file in files) + { + fw.Delete(file); + } + } + //删除冲印规格文件夹 + fw.GotoDirectory(folderToDelete, true); + fw.RemoveDirectory(folder); + } + } + + //删除订单文件夹 + string parentFolder = folderToDelete.Remove(folderToDelete.LastIndexOf('/')); + string orderFolder = folderToDelete.Substring(folderToDelete.LastIndexOf('/') + 1); + fw.GotoDirectory(parentFolder, true); + fw.RemoveDirectory(orderFolder); + } + else + { + throw new Exception("FTP 及路径不能为空!"); + } + } + catch (Exception ex) + { + throw new Exception("删除订单时发生错误,错误信息为:" + ex.Message); + } + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Utils/GzipHelper.cs b/北京北汽/SCP/CK.SCP.Utils/GzipHelper.cs new file mode 100644 index 0000000..2c0a73b --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/GzipHelper.cs @@ -0,0 +1,110 @@ +using System; +using System.Data; +using System.IO; +using System.IO.Compression; + +namespace CK.SCP.Utils +{ + public class GzipHelper + { + /// <summary> + /// 解压 + /// </summary> + /// <param name="Value"></param> + /// <returns></returns> + public static DataSet GetDatasetByString(string Value) + { + DataSet ds = new DataSet(); + string CC = GZipDecompressString(Value); + System.IO.StringReader Sr = new StringReader(CC); + ds.ReadXml(Sr); + return ds; + } + + /// <summary> + /// 根据DATASET压缩字符串 + /// </summary> + /// <param name="ds"></param> + /// <returns></returns> + public static string GetStringByDataset(string ds) + { + return GZipCompressString(ds); + } + + /// <summary> + /// 将传入字符串以GZip算法压缩后,返回Base64编码字符 + /// </summary> + /// <param name="rawString">需要压缩的字符串</param> + /// <returns>压缩后的Base64编码的字符串</returns> + public static string GZipCompressString(string rawString) + { + if (string.IsNullOrEmpty(rawString) || rawString.Length == 0) + { + return ""; + } + else + { + byte[] rawData = System.Text.Encoding.UTF8.GetBytes(rawString.ToString()); + byte[] zippedData = Compress(rawData); + return (string)(Convert.ToBase64String(zippedData)); + } + } + + /// <summary> + /// GZip压缩 + /// </summary> + /// <param name="rawData"></param> + /// <returns></returns> + static byte[] Compress(byte[] rawData) + { + MemoryStream ms = new MemoryStream(); + GZipStream compressedzipStream = new GZipStream(ms, CompressionMode.Compress, true); + compressedzipStream.Write(rawData, 0, rawData.Length); + compressedzipStream.Close(); + return ms.ToArray(); + } + + + /// <summary> + /// 将传入的二进制字符串资料以GZip算法解压缩 + /// </summary> + /// <param name="zippedString">经GZip压缩后的二进制字符串</param> + /// <returns>原始未压缩字符串</returns> + public static string GZipDecompressString(string zippedString) + { + if (string.IsNullOrEmpty(zippedString) || zippedString.Length == 0) + { + return ""; + } + else + { + byte[] zippedData = Convert.FromBase64String(zippedString.ToString()); + return (string)(System.Text.Encoding.UTF8.GetString(Decompress(zippedData))); + } + } + + + /// <summary> + /// ZIP解压 + /// </summary> + /// <param name="zippedData"></param> + /// <returns></returns> + public static byte[] Decompress(byte[] zippedData) + { + MemoryStream ms = new MemoryStream(zippedData); + GZipStream compressedzipStream = new GZipStream(ms, CompressionMode.Decompress); + MemoryStream outBuffer = new MemoryStream(); + byte[] block = new byte[1024]; + while (true) + { + int bytesRead = compressedzipStream.Read(block, 0, block.Length); + if (bytesRead <= 0) + break; + else + outBuffer.Write(block, 0, bytesRead); + } + compressedzipStream.Close(); + return outBuffer.ToArray(); + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Utils/IoHelper.cs b/北京北汽/SCP/CK.SCP.Utils/IoHelper.cs new file mode 100644 index 0000000..af29944 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/IoHelper.cs @@ -0,0 +1,76 @@ +using System; +using System.IO; +using System.Reflection; + +namespace CK.SCP.Utils +{ + public static class IoHelper + { + public static string GetDllPath() + { + return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + } + + public static string GetFullPath(string rootPath, string path) + { + if (!Directory.Exists(rootPath)) + Directory.CreateDirectory(rootPath); + if (!rootPath.EndsWith("\\")) + rootPath += "\\"; + var fullPath = rootPath + path; + if (!Directory.Exists(fullPath)) + Directory.CreateDirectory(fullPath); + return rootPath + path; + } + + public static string GetFullFilename(string path, string filename, bool isLocal = true) + { + var str = string.Empty; + if (isLocal) str += GetDllPath() + "\\"; + str += GetPath(path) + "\\" + filename; + return str; + } + + public static string GetPath(string path) + { + if (!Directory.Exists(path)) + { + Directory.CreateDirectory(path); + } + return path; + } + + public static System.Text.Encoding GetFileEncodeType(string filename) + { + System.IO.FileStream fs = new System.IO.FileStream(filename, System.IO.FileMode.Open, + System.IO.FileAccess.Read); + System.IO.BinaryReader br = new System.IO.BinaryReader(fs); + Byte[] buffer = br.ReadBytes(2); + if (buffer[0] >= 0xEF) + { + if (buffer[0] == 0xEF && buffer[1] == 0xBB) + { + return System.Text.Encoding.UTF8; + } + else if (buffer[0] == 0xFE && buffer[1] == 0xFF) + { + return System.Text.Encoding.BigEndianUnicode; + } + else if (buffer[0] == 0xFF && buffer[1] == 0xFE) + { + return System.Text.Encoding.Unicode; + } + else + { + return System.Text.Encoding.Default; + } + } + else + { + return System.Text.Encoding.Default; + } + } + + + } +} diff --git a/北京北汽/SCP/CK.SCP.Utils/JsonHelper.cs b/北京北汽/SCP/CK.SCP.Utils/JsonHelper.cs new file mode 100644 index 0000000..1a88cb9 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/JsonHelper.cs @@ -0,0 +1,33 @@ +using System; +using System.Xml; +using Newtonsoft.Json; +using Formatting = Newtonsoft.Json.Formatting; + +namespace CK.SCP.Utils +{ + public class JsonHelper + { + public static T ReadConfigFromFile<T>(string fileName) where T : new() + { + var t = new T(); + var strData = FileHelper.ReadFile(fileName); + try + { + t = JsonConvert.DeserializeObject<T>(strData); + } + catch (Exception ex) + { + MessageHelper.ShowError($"配置文件{fileName}错误,请重新配置!"); + } + return t; + } + + public static void WriteConfigToFile<T>(string fileName, T t) where T : new() + { + var strData = JsonConvert.SerializeObject(t, Formatting.Indented); + // MessageHelper.ShowInfo(strConfig); + FileHelper.WriteFile(fileName, strData); + + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Utils/ListHelper.cs b/北京北汽/SCP/CK.SCP.Utils/ListHelper.cs new file mode 100644 index 0000000..ccb0bc7 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/ListHelper.cs @@ -0,0 +1,348 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.Serialization.Json; +using System.Text; +using System.Windows.Forms; + +namespace CK.SCP.Utils +{ + public static class ListHelper + { + public static T JsonToEntity<T>(string jsonString) + { + using (var ms = new MemoryStream(Encoding.UTF8.GetBytes(jsonString))) + { + var serializer = new DataContractJsonSerializer(typeof(T)); + return (T)serializer.ReadObject(ms); + } + } + + public static string Entity2Json<T>(T model) where T : class + { + using (var ms = new MemoryStream()) + { + var serializer = new DataContractJsonSerializer(typeof(T)); + serializer.WriteObject(ms, model); + ms.Position = 0; + StreamReader sr = new StreamReader(ms, Encoding.UTF8); + string json = sr.ReadToEnd(); + sr.Close(); + ms.Close(); + return json; + } + } + + public static List<T> JsonToList<T>(string jsonString) + { + using (var ms = new MemoryStream(Encoding.UTF8.GetBytes(jsonString))) + { + var serializer = new DataContractJsonSerializer(typeof(T)); + return (List<T>)serializer.ReadObject(ms); + } + } + + public static IList<T> SearchList<T>(IEnumerable<T> tList, string txt) + { + IList<T> selectedList = new List<T>(); + foreach (var t in tList) + { + var a = typeof(T); + var ps = a.GetProperties(); + foreach (PropertyInfo info in ps) + { + object o = info.GetValue(t); + if (o != null && o.ToString().Contains(txt)) + { + selectedList.Add(t); + break; + } + } + } + + return selectedList; + } + + public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) + { + HashSet<TKey> seenKeys = new HashSet<TKey>(); + return source.Where(element => seenKeys.Add(keySelector(element))); + } + + public static T DataTableToEntity<T>(DataTable dt) where T : new() + { + var t = new T(); + var tList = DataTableToList<T>(dt); + if (tList.Count > 0) + t = tList[0]; + return t; + } + + public static List<T> DataTableToList<T>(DataTable dt) where T : new() + { + List<T> tList = new List<T>(); + try + { + foreach (DataRow dr in dt.Rows) + { + var t = new T(); + var propertys = t.GetType().GetProperties(); + foreach (var pi in propertys) + { + object value = null; + var piName = pi.Name; + + + if (dt.Columns.Contains(piName)) + { + value = ConvertToType(dr[piName], pi.PropertyType); + } + + if (!pi.CanWrite) continue; + try + { + pi.SetValue(t, value, null); + } + catch (Exception ex) + { + MessageBox.Show(ex.ToString()); + throw; + } + + } + tList.Add(t); + } + + + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + return tList; + } + + public static DataTable EntityToDataTable<T>(T t) where T : new() + { + if(t==null) return new DataTable(); + var tList = new List<T> { t }; + var dt = ListToDataTable(tList, t.GetType().Name); + return dt; + } + + public static DataSet EntityToDataSet<T>(T t) where T : new() + + { + if (t == null) return new DataSet(); + var tList = new List<T> { t }; + var dt = ListToDataTable(tList, t.GetType().Name); + var ds = new DataSet(); + ds.Tables.Add(dt); + return ds; + } + + public static DataSet ListToDataSet<T>(List<T> tList) where T : new() + { + var t = new T(); + var dt = ListToDataTable(tList, t.GetType().Name); + var ds = new DataSet(); + ds.Tables.Add(dt); + return ds; + } + + public static DataTable ListToDataTable<T>(List<T> tList) where T : new() + { + if (tList == null||tList.Count==0) return new DataTable(); + var t = new T(); + var dt = ListToDataTable(tList, t.GetType().Name); + return dt; + } + + public static DataTable ListToDataTable<T>(List<T> tList, string tableName) where T : new() + { + var dt = new DataTable { TableName = tableName }; + if (tList == null || tList.Count == 0) return new DataTable(); + var t = new T(); + var properties = t.GetType().GetProperties(); + foreach (var pi in properties) + { + // The the type of the property + Type columnType = pi.PropertyType; + + // We need to check whether the property is NULLABLE + if (pi.PropertyType.IsGenericType && + pi.PropertyType.GetGenericTypeDefinition() == typeof(Nullable<>)) + { + // If it is NULLABLE, then get the underlying type. eg if "Nullable<int>" then this will return just "int" + columnType = pi.PropertyType.GetGenericArguments()[0]; + } + + // Add the column definition to the datatable. + dt.Columns.Add(new DataColumn(pi.Name, columnType)); + // dc = new DataColumn(columnName,pi.PropertyType); + // dt.Columns.Add(dc); + + } + foreach (var tt in tList) + { + var dr = dt.NewRow(); + foreach (var pi in properties) + { + + var columnName = pi.Name; + try + { + var value = pi.GetValue(tt, null); + dr[columnName] = value ?? DBNull.Value; + } + catch (Exception) + { + dr[columnName] = DBNull.Value; + } + + +// dr[columnName] = pi.GetValue(tt, new object[] {null}) ?? DBNull.Value; + if (pi.PropertyType.FullName == "System.Decimal") + { + dr[columnName] = Math.Round(Convert.ToDecimal(dr[columnName]), 2); + } + + } + dt.Rows.Add(dr); + + + } + + return dt; + } + + public static object ConvertToType(object value, Type convertsionType) + { + object returnValue = ""; + try + { + if (convertsionType.IsGenericType && convertsionType.GetGenericTypeDefinition() == typeof(Nullable<>)) + { + if (value != null && value != DBNull.Value && value.ToString() != "" && value.ToString().Length > 0) + { + var nullableConverter = new NullableConverter(convertsionType); + convertsionType = nullableConverter.UnderlyingType; + returnValue = Convert.ChangeType(value, convertsionType); + } + else + { + returnValue = null; + } + } + else + { + if (value != null && value != DBNull.Value && value.ToString() != "" && value.ToString().Length > 0) + { + if (value.ToString().IndexOf("%", System.StringComparison.Ordinal) == value.ToString().Length - 1) + { + switch (convertsionType.ToString()) + { + case "System.Decimal": + returnValue = Convert.ToDecimal(value.ToString().Replace("%", "")) / 100; + break; + + case "System.Double": + returnValue = Convert.ToDecimal(value.ToString().Replace("%", "")) / 100; + break; + + case "System.Single": + returnValue = Convert.ToDecimal(value.ToString().Replace("%", "")) / 100; + break; + } + } + else if (value.ToString() == "-") + { + returnValue = 0; + } + else + { + returnValue = Convert.ChangeType(value, convertsionType); + if (convertsionType.FullName == "System.Decimal") + returnValue = Math.Round((decimal)returnValue, 5); + if (convertsionType.FullName == "System.String") + returnValue = returnValue.ToString().TrimEnd(); + } + } + else + { + returnValue = GetReturnValue(convertsionType); + } + } + } + catch + { + returnValue = GetReturnValue(convertsionType); + } + return returnValue; + } + + private static object GetReturnValue(Type convertsionType) + { + object returnValue; + switch (convertsionType.ToString()) + { + case "System.Guid": + returnValue = Guid.NewGuid(); + break; + + case "System.DateTime": + returnValue = DateTime.Now; + break; + + case "System.Decimal": + returnValue = 0m; + break; + + case "System.Double": + returnValue = 0.0; + break; + + case " System.UInt16": + returnValue = 0; + break; + + case " System.UInt32": + returnValue = 0; + break; + + case " System.UInt64": + returnValue = 0; + break; + + case "System.Int32": + returnValue = 0; + break; + + case "System.Int16": + returnValue = 0; + break; + + case "System.Int64": + returnValue = 0; + break; + + case "System.String": + returnValue = ""; + break; + + case "System.Single": + returnValue = 0.0f; + break; + + default: + returnValue = ""; + break; + } + return returnValue; + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Utils/LogHelper.cs b/北京北汽/SCP/CK.SCP.Utils/LogHelper.cs new file mode 100644 index 0000000..e8578e5 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/LogHelper.cs @@ -0,0 +1,108 @@ +using System; +using System.IO; +using System.Text; +using System.Windows.Forms; + +namespace CK.SCP.Utils +{ + public static class LogHelper + { + + public static string Path = ""; + + public static void Write(string path, string content) + { + try + { + + var strPath = IoHelper.GetDllPath() + "//"+path; + if (!Directory.Exists(strPath)) + { + Directory.CreateDirectory(strPath); + } + string filename = string.Concat(new[] + { + strPath, + "//", + DateTime.Now.ToLongDateString(), + ".txt" + }); + StreamWriter sw = new StreamWriter(filename, true, Encoding.Unicode); + sw.WriteLine(DateTime.Now.ToString("yyyyMMdd")); + sw.WriteLine(content); +// sw.WriteLine("-------------------------------------"); + sw.Close(); + } + catch (Exception ex) + { + MessageBox.Show(ex.ToString()); + } + } + + + public static void Write(string content) + { + try + { + + Path = IoHelper.GetDllPath() + "//Logs"; + if (!Directory.Exists(Path)) + { + Directory.CreateDirectory(Path); + } + string filename = string.Concat(new[] + { + Path, + "//", + DateTime.Now.ToLongDateString(), + ".txt" + }); + StreamWriter sw = new StreamWriter(filename, true, Encoding.Unicode); + sw.WriteLine(DateTime.Now.ToString("HH:mm:ss fff")+"\t"+content); +// sw.WriteLine("-------------------------------------"); + sw.Close(); + } + catch(Exception ex) + { + MessageBox.Show(ex.ToString()); + } + } + + public static void WriteEx(Exception ex) + { + Write(ex.ToString()); + } + + public readonly static log4net.ILog _logInfo = log4net.LogManager.GetLogger("Info"); + public readonly static log4net.ILog _logDebug = log4net.LogManager.GetLogger("Debug"); + public readonly static log4net.ILog _logError = log4net.LogManager.GetLogger("Error"); + + public static void Writlog(LogType p_logtype, Type p_type, string p_methodName, string p_msg) + { + + switch (p_logtype) + { + case LogType.Error: + _logError.ErrorFormat("{0}.{1}:{2}", p_type.FullName, p_methodName, p_msg); + break; + case LogType.Info: + _logInfo.InfoFormat("{0}.{1}:{2}", p_type.FullName, p_methodName, p_msg); + break; + + case LogType.Debug: + _logDebug.DebugFormat("{0}.{1}:{2}", p_type.FullName, p_methodName, p_msg); + break; + } + } + public enum LogType + { + Debug, + Info, + Error + + } + + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Utils/MailHelper.cs b/北京北汽/SCP/CK.SCP.Utils/MailHelper.cs new file mode 100644 index 0000000..85df455 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/MailHelper.cs @@ -0,0 +1,97 @@ +using System.IO; +using System.Net; +using System.Net.Mail; +using System.Net.Mime; +using System.Text; + +namespace CK.SCP.Utils +{ + public class MailHelper + { + private MailMessage mailMessage; + + private SmtpClient smtpClient; + + private string server; + + private string username; + + private string password; + + private bool enablessl; + + private bool credentials; + + private int port; + + public MailHelper(string To, string From, string Body, string Title, string Server, string Username, string Password, bool EnableSsl, int Port, bool Credentials, string AttachmentFile) + { + this.mailMessage = new MailMessage(); + this.mailMessage.To.Add(To); + this.mailMessage.From = new MailAddress(From); + this.mailMessage.Subject = Title; + this.mailMessage.Body = Body; + if (AttachmentFile != "") + { + Attachment attachment = new Attachment(AttachmentFile); + this.mailMessage.Attachments.Add(attachment); + } + this.mailMessage.IsBodyHtml = true; + this.mailMessage.BodyEncoding = Encoding.UTF8; + this.mailMessage.Priority = MailPriority.Normal; + this.server = Server; + this.password = Password; + this.username = Username; + this.enablessl = EnableSsl; + this.port = Port; + this.credentials = Credentials; + } + + public void Send() + { + if (this.mailMessage != null) + { + this.smtpClient = new SmtpClient(); + if (!this.credentials) + { + this.smtpClient.Credentials = new NetworkCredential(this.username, this.password); + } + this.smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network; + this.smtpClient.Host = this.server; + this.smtpClient.Port = this.port; + this.smtpClient.EnableSsl = this.enablessl; + this.smtpClient.Send(this.mailMessage); + } + } + + public void Attachments(string Path) + { + string[] pathArray = Path.Split(new char[] + { + ',' + }); + for (int i = 0; i < pathArray.Length; i++) + { + Attachment data = new Attachment(pathArray[i], "application/octet-stream"); + ContentDisposition disposition = data.ContentDisposition; + disposition.CreationDate = File.GetCreationTime(pathArray[i]); + disposition.ModificationDate = File.GetLastWriteTime(pathArray[i]); + disposition.ReadDate = File.GetLastAccessTime(pathArray[i]); + this.mailMessage.Attachments.Add(data); + } + } + + public void SendAsync(SendCompletedEventHandler completedMethod) + { + if (this.mailMessage != null) + { + this.smtpClient = new SmtpClient(); + this.smtpClient.Credentials = new NetworkCredential(this.mailMessage.From.Address, this.password); + this.smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network; + this.smtpClient.Host = "smtp." + this.mailMessage.From.Host; + this.smtpClient.SendCompleted += completedMethod.Invoke; + this.smtpClient.SendAsync(this.mailMessage, this.mailMessage.Body); + } + } + } +} diff --git a/北京北汽/SCP/CK.SCP.Utils/Md5Helper.cs b/北京北汽/SCP/CK.SCP.Utils/Md5Helper.cs new file mode 100644 index 0000000..039fa9f --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/Md5Helper.cs @@ -0,0 +1,319 @@ +using System; +using System.Collections; +using System.IO; + +namespace CK.SCP.Utils +{ + public class Md5Helper + { + private const int S11 = 7; + + private const int S12 = 12; + + private const int S13 = 17; + + private const int S14 = 22; + + private const int S21 = 5; + + private const int S22 = 9; + + private const int S23 = 14; + + private const int S24 = 20; + + private const int S31 = 4; + + private const int S32 = 11; + + private const int S33 = 16; + + private const int S34 = 23; + + private const int S41 = 6; + + private const int S42 = 10; + + private const int S43 = 15; + + private const int S44 = 21; + + private static uint A; + + private static uint B; + + private static uint C; + + private static uint D; + + private static uint F(uint x, uint y, uint z) + { + return (x & y) | (~x & z); + } + + private static uint G(uint x, uint y, uint z) + { + return (x & z) | (y & ~z); + } + + private static uint H(uint x, uint y, uint z) + { + return x ^ y ^ z; + } + + private static uint I(uint x, uint y, uint z) + { + return y ^ (x | ~z); + } + + private static void FF(ref uint a, uint b, uint c, uint d, uint mj, int s, uint ti) + { + a = a + Md5Helper.F(b, c, d) + mj + ti; + a = (a << s | a >> 32 - s); + a += b; + } + + private static void GG(ref uint a, uint b, uint c, uint d, uint mj, int s, uint ti) + { + a = a + Md5Helper.G(b, c, d) + mj + ti; + a = (a << s | a >> 32 - s); + a += b; + } + + private static void HH(ref uint a, uint b, uint c, uint d, uint mj, int s, uint ti) + { + a = a + Md5Helper.H(b, c, d) + mj + ti; + a = (a << s | a >> 32 - s); + a += b; + } + + private static void II(ref uint a, uint b, uint c, uint d, uint mj, int s, uint ti) + { + a = a + Md5Helper.I(b, c, d) + mj + ti; + a = (a << s | a >> 32 - s); + a += b; + } + + private static void MD5_Init() + { + Md5Helper.A = 1732584193u; + Md5Helper.B = 4023233417u; + Md5Helper.C = 2562383102u; + Md5Helper.D = 271733878u; + } + + private static uint[] MD5_Append(byte[] input) + { + int ones = 1; + int i = input.Length; + int j = i % 64; + int zeros; + int size; + if (j < 56) + { + zeros = 55 - j; + size = i - j + 64; + } + else if (j == 56) + { + zeros = 0; + ones = 0; + size = i + 8; + } + else + { + zeros = 63 - j + 56; + size = i + 64 - j + 64; + } + ArrayList bs = new ArrayList(input); + if (ones == 1) + { + bs.Add(128); + } + for (int k = 0; k < zeros; k++) + { + bs.Add(0); + } + ulong N = (ulong)((long)i * 8L); + byte h = (byte)(N & 255uL); + byte h2 = (byte)(N >> 8 & 255uL); + byte h3 = (byte)(N >> 16 & 255uL); + byte h4 = (byte)(N >> 24 & 255uL); + byte h5 = (byte)(N >> 32 & 255uL); + byte h6 = (byte)(N >> 40 & 255uL); + byte h7 = (byte)(N >> 48 & 255uL); + byte h8 = (byte)(N >> 56); + bs.Add(h); + bs.Add(h2); + bs.Add(h3); + bs.Add(h4); + bs.Add(h5); + bs.Add(h6); + bs.Add(h7); + bs.Add(h8); + byte[] ts = (byte[])bs.ToArray(typeof(byte)); + uint[] output = new uint[size / 4]; + long l = 0L; + long m = 0L; + while (l < (long)size) + { + checked + { + output[(int)((IntPtr)m)] = (uint)((int)ts[(int)((IntPtr)l)] | (int)ts[(int)((IntPtr)(unchecked(l + 1L)))] << 8 | (int)ts[(int)((IntPtr)(unchecked(l + 2L)))] << 16 | (int)ts[(int)((IntPtr)(unchecked(l + 3L)))] << 24); + } + m += 1L; + l += 4L; + } + return output; + } + + private static uint[] MD5_Trasform(uint[] x) + { + for (int i = 0; i < x.Length; i += 16) + { + uint a = Md5Helper.A; + uint b = Md5Helper.B; + uint c = Md5Helper.C; + uint d = Md5Helper.D; + Md5Helper.FF(ref a, b, c, d, x[i], 7, 3614090360u); + Md5Helper.FF(ref d, a, b, c, x[i + 1], 12, 3905402710u); + Md5Helper.FF(ref c, d, a, b, x[i + 2], 17, 606105819u); + Md5Helper.FF(ref b, c, d, a, x[i + 3], 22, 3250441966u); + Md5Helper.FF(ref a, b, c, d, x[i + 4], 7, 4118548399u); + Md5Helper.FF(ref d, a, b, c, x[i + 5], 12, 1200080426u); + Md5Helper.FF(ref c, d, a, b, x[i + 6], 17, 2821735955u); + Md5Helper.FF(ref b, c, d, a, x[i + 7], 22, 4249261313u); + Md5Helper.FF(ref a, b, c, d, x[i + 8], 7, 1770035416u); + Md5Helper.FF(ref d, a, b, c, x[i + 9], 12, 2336552879u); + Md5Helper.FF(ref c, d, a, b, x[i + 10], 17, 4294925233u); + Md5Helper.FF(ref b, c, d, a, x[i + 11], 22, 2304563134u); + Md5Helper.FF(ref a, b, c, d, x[i + 12], 7, 1804603682u); + Md5Helper.FF(ref d, a, b, c, x[i + 13], 12, 4254626195u); + Md5Helper.FF(ref c, d, a, b, x[i + 14], 17, 2792965006u); + Md5Helper.FF(ref b, c, d, a, x[i + 15], 22, 1236535329u); + Md5Helper.GG(ref a, b, c, d, x[i + 1], 5, 4129170786u); + Md5Helper.GG(ref d, a, b, c, x[i + 6], 9, 3225465664u); + Md5Helper.GG(ref c, d, a, b, x[i + 11], 14, 643717713u); + Md5Helper.GG(ref b, c, d, a, x[i], 20, 3921069994u); + Md5Helper.GG(ref a, b, c, d, x[i + 5], 5, 3593408605u); + Md5Helper.GG(ref d, a, b, c, x[i + 10], 9, 38016083u); + Md5Helper.GG(ref c, d, a, b, x[i + 15], 14, 3634488961u); + Md5Helper.GG(ref b, c, d, a, x[i + 4], 20, 3889429448u); + Md5Helper.GG(ref a, b, c, d, x[i + 9], 5, 568446438u); + Md5Helper.GG(ref d, a, b, c, x[i + 14], 9, 3275163606u); + Md5Helper.GG(ref c, d, a, b, x[i + 3], 14, 4107603335u); + Md5Helper.GG(ref b, c, d, a, x[i + 8], 20, 1163531501u); + Md5Helper.GG(ref a, b, c, d, x[i + 13], 5, 2850285829u); + Md5Helper.GG(ref d, a, b, c, x[i + 2], 9, 4243563512u); + Md5Helper.GG(ref c, d, a, b, x[i + 7], 14, 1735328473u); + Md5Helper.GG(ref b, c, d, a, x[i + 12], 20, 2368359562u); + Md5Helper.HH(ref a, b, c, d, x[i + 5], 4, 4294588738u); + Md5Helper.HH(ref d, a, b, c, x[i + 8], 11, 2272392833u); + Md5Helper.HH(ref c, d, a, b, x[i + 11], 16, 1839030562u); + Md5Helper.HH(ref b, c, d, a, x[i + 14], 23, 4259657740u); + Md5Helper.HH(ref a, b, c, d, x[i + 1], 4, 2763975236u); + Md5Helper.HH(ref d, a, b, c, x[i + 4], 11, 1272893353u); + Md5Helper.HH(ref c, d, a, b, x[i + 7], 16, 4139469664u); + Md5Helper.HH(ref b, c, d, a, x[i + 10], 23, 3200236656u); + Md5Helper.HH(ref a, b, c, d, x[i + 13], 4, 681279174u); + Md5Helper.HH(ref d, a, b, c, x[i], 11, 3936430074u); + Md5Helper.HH(ref c, d, a, b, x[i + 3], 16, 3572445317u); + Md5Helper.HH(ref b, c, d, a, x[i + 6], 23, 76029189u); + Md5Helper.HH(ref a, b, c, d, x[i + 9], 4, 3654602809u); + Md5Helper.HH(ref d, a, b, c, x[i + 12], 11, 3873151461u); + Md5Helper.HH(ref c, d, a, b, x[i + 15], 16, 530742520u); + Md5Helper.HH(ref b, c, d, a, x[i + 2], 23, 3299628645u); + Md5Helper.II(ref a, b, c, d, x[i], 6, 4096336452u); + Md5Helper.II(ref d, a, b, c, x[i + 7], 10, 1126891415u); + Md5Helper.II(ref c, d, a, b, x[i + 14], 15, 2878612391u); + Md5Helper.II(ref b, c, d, a, x[i + 5], 21, 4237533241u); + Md5Helper.II(ref a, b, c, d, x[i + 12], 6, 1700485571u); + Md5Helper.II(ref d, a, b, c, x[i + 3], 10, 2399980690u); + Md5Helper.II(ref c, d, a, b, x[i + 10], 15, 4293915773u); + Md5Helper.II(ref b, c, d, a, x[i + 1], 21, 2240044497u); + Md5Helper.II(ref a, b, c, d, x[i + 8], 6, 1873313359u); + Md5Helper.II(ref d, a, b, c, x[i + 15], 10, 4264355552u); + Md5Helper.II(ref c, d, a, b, x[i + 6], 15, 2734768916u); + Md5Helper.II(ref b, c, d, a, x[i + 13], 21, 1309151649u); + Md5Helper.II(ref a, b, c, d, x[i + 4], 6, 4149444226u); + Md5Helper.II(ref d, a, b, c, x[i + 11], 10, 3174756917u); + Md5Helper.II(ref c, d, a, b, x[i + 2], 15, 718787259u); + Md5Helper.II(ref b, c, d, a, x[i + 9], 21, 3951481745u); + Md5Helper.A += a; + Md5Helper.B += b; + Md5Helper.C += c; + Md5Helper.D += d; + } + return new uint[] + { + Md5Helper.A, + Md5Helper.B, + Md5Helper.C, + Md5Helper.D + }; + } + + public static byte[] MD5Array(byte[] input) + { + Md5Helper.MD5_Init(); + uint[] block = Md5Helper.MD5_Append(input); + uint[] bits = Md5Helper.MD5_Trasform(block); + byte[] output = new byte[bits.Length * 4]; + int i = 0; + int j = 0; + while (i < bits.Length) + { + output[j] = (byte)(bits[i] & 255u); + output[j + 1] = (byte)(bits[i] >> 8 & 255u); + output[j + 2] = (byte)(bits[i] >> 16 & 255u); + output[j + 3] = (byte)(bits[i] >> 24 & 255u); + i++; + j += 4; + } + return output; + } + + public static string ArrayToHexString(byte[] array, bool uppercase) + { + string hexString = ""; + string format = "x2"; + if (uppercase) + { + format = "X2"; + } + for (int i = 0; i < array.Length; i++) + { + byte b = array[i]; + hexString += b.ToString(format); + } + return hexString; + } + + public static string MDString(string message) + { + char[] c = message.ToCharArray(); + byte[] b = new byte[c.Length]; + for (int i = 0; i < c.Length; i++) + { + b[i] = (byte)c[i]; + } + byte[] digest = Md5Helper.MD5Array(b); + return Md5Helper.ArrayToHexString(digest, false); + } + + public static string MDFile(string fileName) + { + FileStream fs = File.Open(fileName, FileMode.Open, FileAccess.Read); + byte[] array = new byte[fs.Length]; + fs.Read(array, 0, (int)fs.Length); + byte[] digest = Md5Helper.MD5Array(array); + fs.Close(); + return Md5Helper.ArrayToHexString(digest, false); + } + + public static string Test(string message) + { + return Md5Helper.MDString(message); + } + } +} diff --git a/北京北汽/SCP/CK.SCP.Utils/MessageHelper.cs b/北京北汽/SCP/CK.SCP.Utils/MessageHelper.cs new file mode 100644 index 0000000..ad4a13e --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/MessageHelper.cs @@ -0,0 +1,33 @@ +using System; +using System.Windows.Forms; + +namespace CK.SCP.Utils +{ + public static class MessageHelper + { + public static void ShowError(Exception ex) + { + MessageBox.Show(ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + LogHelper.Write(ex.ToString()); + } + + public static void ShowError(string msg) + { + MessageBox.Show(msg, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + LogHelper.Write(msg); + } + public static DialogResult ShowWarning(string msg) + { + return MessageBox.Show(msg, "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + public static DialogResult ShowQuestion(string msg) + { + return MessageBox.Show(msg, "问题", MessageBoxButtons.YesNo, MessageBoxIcon.Question); + } + + public static void ShowInfo(string msg) + { + MessageBox.Show(msg, "信息", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } +} diff --git a/北京北汽/SCP/CK.SCP.Utils/PredicateBuilder.cs b/北京北汽/SCP/CK.SCP.Utils/PredicateBuilder.cs new file mode 100644 index 0000000..71f44f2 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/PredicateBuilder.cs @@ -0,0 +1,40 @@ +using System; +using System.Linq; +using System.Linq.Expressions; + +namespace CK.SCP.Utils +{ + public static class PredicateBuilder + { + + /// <summary> + /// 机关函数应用True时:单个AND有效,多个AND有效;单个OR无效,多个OR无效;混应时写在AND后的OR有效 + /// </summary> + /// <typeparam name="T"></typeparam> + /// <returns></returns> + public static Expression<Func<T, bool>> True<T>() { return f => true; } + + /// <summary> + /// 机关函数应用False时:单个AND无效,多个AND无效;单个OR有效,多个OR有效;混应时写在OR后面的AND有效 + /// </summary> + /// <typeparam name="T"></typeparam> + /// <returns></returns> + public static Expression<Func<T, bool>> False<T>() { return f => false; } + + public static Expression<Func<T, bool>> Or<T>(this Expression<Func<T, bool>> expr1, + Expression<Func<T, bool>> expr2) + { + var invokedExpr = Expression.Invoke(expr2, expr1.Parameters.Cast<Expression>()); + return Expression.Lambda<Func<T, bool>> + (Expression.Or(expr1.Body, invokedExpr), expr1.Parameters); + } + + public static Expression<Func<T, bool>> And<T>(this Expression<Func<T, bool>> expr1, + Expression<Func<T, bool>> expr2) + { + var invokedExpr = Expression.Invoke(expr2, expr1.Parameters.Cast<Expression>()); + return Expression.Lambda<Func<T, bool>> + (Expression.And(expr1.Body, invokedExpr), expr1.Parameters); + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Utils/ProcessOperator.cs b/北京北汽/SCP/CK.SCP.Utils/ProcessOperator.cs new file mode 100644 index 0000000..ce15ce8 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/ProcessOperator.cs @@ -0,0 +1,292 @@ +using System; +using System.ComponentModel; +using System.Windows.Forms; + +namespace CK.SCP.Utils +{ + public class ProcessOperator + { + private readonly BackgroundWorker _backgroundWorker;//后台线程 + private readonly FormProcess _processForm;//进度条窗体 + private readonly BackgroundWorkerEventArgs _eventArgs;//异常参数 + public ProcessOperator() + { + _backgroundWorker = new BackgroundWorker(); + _processForm = new FormProcess(); + _eventArgs = new BackgroundWorkerEventArgs(); + _backgroundWorker.DoWork += _backgroundWorker_DoWork; + _backgroundWorker.RunWorkerCompleted += _backgroundWorker_RunWorkerCompleted; + } + + //操作进行完毕后关闭进度条窗体 + private void _backgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) + { + if (_processForm.Visible == true) + { + _processForm.Close(); + } + if (this.BackgroundWorkerCompleted != null) + { + this.BackgroundWorkerCompleted(null, _eventArgs); + } + } + + //后台执行的操作 + private void _backgroundWorker_DoWork(object sender, DoWorkEventArgs e) + { + if (BackgroundWork == null) return; + try + { + BackgroundWork(); + } + catch (Exception ex) + { + _eventArgs.BackGroundException = ex; + MessageBox.Show(ex.ToString()); + } + } + + #region 公共方法、属性、事件 + + /// <summary> + /// 后台执行的操作 + /// </summary> + public Action BackgroundWork { get; set; } + + /// <summary> + /// 设置进度条显示的提示信息 + /// </summary> + public string MessageInfo + { + set { _processForm.MessageInfo = value; } + } + + /// <summary> + /// 后台任务执行完毕后事件 + /// </summary> + public event EventHandler<BackgroundWorkerEventArgs> BackgroundWorkerCompleted; + + /// <summary> + /// 开始执行 + /// </summary> + public void Start() + { + _backgroundWorker.RunWorkerAsync(); + _processForm.ShowDialog(); + } + + #endregion + } +} + + +/* + private void CreateWorksheet(Application excel, Worksheet sheet, DataTable dt, string fileName) + { + Range r = null; + int rIdx = RStartIndex; + int cIdx = CStartIndex; + if (!string.IsNullOrEmpty(dt.TableName)) + { + sheet.Name = dt.TableName; + } + + // + //取得标题 + // + foreach (DataColumn dc in dt.Columns) + { + cIdx++; + excel.Cells[rIdx, cIdx] = dc.ColumnName; + //设置标题格式为居中对齐 + r = sheet.Range[excel.Cells[rIdx, cIdx], excel.Cells[rIdx, cIdx]]; + r.HorizontalAlignment = XlVAlign.xlVAlignCenter; + r.Interior.ColorIndex = 37; + } + + //因为第一行已经写了表头,所以所有数据都应该从a2开始 + r = sheet.Range[excel.Cells[rIdx, cIdx], excel.Cells[rIdx, cIdx]]; + + WriteData(dt, sheet); + + int rSumIdx = dt.Rows.Count + 1; + int cSumIdx = CStartIndex + 1; + + + // + //设置报表表格为最适应宽度 + // + r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[rSumIdx, cIdx]]; + r.Select(); + r.Columns.AutoFit(); + + + // + //绘制边框 + // + r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[rSumIdx, cIdx]]; + r.Borders.LineStyle = 1; + + r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[rSumIdx, cSumIdx]]; + r.Borders[XlBordersIndex.xlEdgeLeft].Weight = XlBorderWeight.xlThick; //设置左边线加粗 + + r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[RStartIndex, cIdx]]; + r.Borders[XlBordersIndex.xlEdgeTop].Weight = XlBorderWeight.xlThick; //设置上边线加粗 + + r = sheet.Range[excel.Cells[RStartIndex, cIdx], excel.Cells[rSumIdx, cIdx]]; + r.Borders[XlBordersIndex.xlEdgeRight].Weight = XlBorderWeight.xlThick; //设置右边线加粗 + + r = sheet.Range[excel.Cells[rSumIdx, cSumIdx], excel.Cells[rSumIdx, cIdx]]; + r.Borders[XlBordersIndex.xlEdgeBottom].Weight = XlBorderWeight.xlThick; //设置下边线加粗 + + + r = sheet.Range[excel.Cells[0, 0], null]; + + // + //显示效果 + // + excel.Visible = false; + excel.DisplayAlerts = false; + excel.AlertBeforeOverwriting = false; + } + + private void AddWorksheet(Application excel, Worksheet sheet, DataTable dt, string fileName) + { + Range r = null; + int rIdx = RStartIndex; + int cIdx = CStartIndex; + if (!string.IsNullOrEmpty(dt.TableName)) + { + sheet.Name = dt.TableName; + } + + // + //取得标题 + // + foreach (DataColumn dc in dt.Columns) + { + cIdx++; + excel.Cells[rIdx, cIdx] = dc.ColumnName; + //设置标题格式为居中对齐 + r = sheet.Range[excel.Cells[rIdx, cIdx], excel.Cells[rIdx, cIdx]]; + r.HorizontalAlignment = XlVAlign.xlVAlignCenter; + r.Interior.ColorIndex = 37; + } + + //因为第一行已经写了表头,所以所有数据都应该从a2开始 + r = sheet.Range[excel.Cells[rIdx, cIdx], excel.Cells[rIdx, cIdx]]; + WriteData(dt, sheet); + + + int rSumIdx = dt.Rows.Count + 1; + int cSumIdx = CStartIndex + 1; + // + //设置报表表格为最适应宽度 + // + r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[rSumIdx, cIdx]]; + r.Select(); + r.Columns.AutoFit(); + + // + //绘制边框 + // + r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[rSumIdx, cIdx]]; + r.Borders.LineStyle = 1; + + + r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[rSumIdx, cSumIdx]]; + r.Borders[XlBordersIndex.xlEdgeLeft].Weight = XlBorderWeight.xlThick; //设置左边线加粗 + + r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[RStartIndex, cIdx]]; + r.Borders[XlBordersIndex.xlEdgeTop].Weight = XlBorderWeight.xlThick; //设置上边线加粗 + + r = sheet.Range[excel.Cells[RStartIndex, cIdx], excel.Cells[rSumIdx, cIdx]]; + r.Borders[XlBordersIndex.xlEdgeRight].Weight = XlBorderWeight.xlThick; //设置右边线加粗 + + r = sheet.Range[excel.Cells[rSumIdx, cSumIdx], excel.Cells[rSumIdx, cIdx]]; + r.Borders[XlBordersIndex.xlEdgeBottom].Weight = XlBorderWeight.xlThick; //设置下边线加粗 + // + //显示效果 + // + r = sheet.Range[excel.Cells[0, 0], null]; + excel.Visible = false; + excel.DisplayAlerts = false; + excel.AlertBeforeOverwriting = false; + } + +*/ + + +//1、全表自动列宽 + +// mysheet.Cells.Select(); + +// mysheet.Cells.Columns.AutoFit(); + +// 2、合并 + +// excelRangeParm.Merge(Missing.Value); + +// 3、粗体设置 + +// excelRangeParm.Font.Bold = true; + +// 4、字体大小设置 + +// excelRangeParm.Font.Size = 12; + +// 5、水平对齐设置 + +// excelRangeParm.HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter; + +// 6、垂直对齐设置 + +// excelRangeParm.VerticalAlignment = Excel.XlVAlign.xlVAlignCenter; + +// 7、公式设置 + +// excelRangeParm.FormulaR1C1 = 公式; + +// 8、列宽设置 + +// excelRange.ColumnWidth = 宽度; + +// 9、行高 + +// excelRange.RowHeight = 行高; + +// 10、设置列格式 + +// Excel.Range myrange=mysheet.get_Range(mysheet.Cells[1,1],mysheet.Cells[5,1]); + +// 11、文本格式 + +// myrange.NumberFormatLocal="@"; + +// 12、通用格式 + +// style.NumberFormatLocal = "[DBNum2][$-804]G/通用格式"; + +// 或 + +// range.NumberFormatLocal = "G/通用格式"; + +// xlsheet.Cells[1,1]="''+txtKey.Text; + +// 13、添加行 + +// ((Excel.Range)mysheet.Cells[15,3]).EntireRow.Insert(0); + +// 14、设置第10行为红色 + +// mysheet.get_Range((Excel.Range)mysheet.Cells[10,1],(Excel.Range)mysheet.Cells[10,200]).Select(); + +// mysheet.get_Range((Excel.Range)mysheet.Cells[10,1],(Excel.Range)mysheet.Cells[10,200]).Interior.ColorIndex=3; + +//15、单元格自动换行 + +//myrange.WrapText = true; + +//16、单元格行高自动调整 + +//myrange.EntireRow.AutoFit(); \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Utils/ProgramHelper.cs b/北京北汽/SCP/CK.SCP.Utils/ProgramHelper.cs new file mode 100644 index 0000000..07b0bab --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/ProgramHelper.cs @@ -0,0 +1,16 @@ +using System.Windows.Forms; + +namespace CK.SCP.Utils +{ + public class ProgramHelper + { + public static bool HasExist() + { + bool notExist; + System.Threading.Mutex run = new System.Threading.Mutex(true, Application.ProductName, out notExist); //核心代码 + if (notExist) return false; + MessageBox.Show(Application.ProductName + "已运行,无法重复启动。"); + return true; + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Utils/Properties/AssemblyInfo.cs b/北京北汽/SCP/CK.SCP.Utils/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4862f84 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("CK.SCP.Utils")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("CK.SCP.Utils")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +//将 ComVisible 设置为 false 将使此程序集中的类型 +//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("7118ac83-9dc0-41f5-94ea-e6f405ae0448")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/北京北汽/SCP/CK.SCP.Utils/TraceLogger.cs b/北京北汽/SCP/CK.SCP.Utils/TraceLogger.cs new file mode 100644 index 0000000..d9df518 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/TraceLogger.cs @@ -0,0 +1,512 @@ +using System; +using System.Data.SqlClient; +using System.Diagnostics; +using System.IO; + +namespace CK.SCP.Utils + +{ + + /// <summary> + + /// 日志类 + + /// </summary> + + public sealed class TraceLogger + + { + + #region Member Variables + + + + /// <summary> + + /// 用于Trace的组织输出的类别名称 + + /// </summary> + + private const string trace_sql = "\r\n***********************TRACE_SQL {0}*****************************\r\nTRACE_SQL"; + + + + /// <summary> + + /// 用于Trace的组织输出的类别名称 + + /// </summary> + + private const string trace_exception = "\r\n***********************TRACE_EXCEPTION {0}***********************"; + + + + /// <summary> + + /// 当前日志的日期 + + /// </summary> + + private static DateTime CurrentLogFileDate = DateTime.Now; + + + + /// <summary> + + /// 日志对象 + + /// </summary> + + private static TextWriterTraceListener twtl; + + + + /// <summary> + + /// 日志根目录 + + /// </summary> + + private const string log_root_directory = @"//Logs"; + + + + /// <summary> + + /// 日志子目录 + + /// </summary> + + private static string log_subdir; + + + + + + /// <summary> + + /// " {0} = {1}" + + /// </summary> + + private const string FORMAT_TRACE_PARAM = " {0} = {1}"; + + + + /// <summary> + + /// 1 仅控制台输出 + + /// 2 仅日志输出 + + /// 3 控制台+日志输出 + + /// </summary> + + private static readonly int flag = 2; //可以修改成从配置文件读取 + + + + #endregion + + + + #region Constructor + + + + static TraceLogger() + + { + + System.Diagnostics.Trace.AutoFlush = true; + + + + switch (flag) + + { + + case 1: + + System.Diagnostics.Trace.Listeners.Add(new ConsoleTraceListener()); + + break; + + case 2: + + System.Diagnostics.Trace.Listeners.Add(TWTL); + + break; + + case 3: + + System.Diagnostics.Trace.Listeners.Add(new ConsoleTraceListener()); + + System.Diagnostics.Trace.Listeners.Add(TWTL); + + break; + + } + + } + + + + #endregion + + + + #region Method + + + + #region trace + + + + /// <summary> + + /// 异步错误日志 + + /// </summary> + + /// <param name="value"></param> + + public static void Trace(Exception ex) + + { + + new AsyncLogException(BeginTraceError).BeginInvoke(ex, null, null); + + } + + + + /// <summary> + + /// 异步SQL日志 + + /// </summary> + + /// <param name="cmd"></param> + + public static void Trace(SqlCommand cmd) + + { + + new AsyncLogSqlCommand(BeginTraceSqlCommand).BeginInvoke(cmd, null, null); + + } + + + + /// <summary> + + /// 异步SQL日志 + + /// </summary> + + /// <param name="sql"></param> + + /// <param name="parameter"></param> + + public static void Trace(string sql, params SqlParameter[] parameter) + + { + + new AsyncLogSql(BeginTraceSql).BeginInvoke(sql, parameter, null, null); + + } + + + + #endregion + + + + #region delegate + + + + private delegate void AsyncLogException(Exception ex); + + private delegate void AsyncLogSqlCommand(SqlCommand cmd); + + private delegate void AsyncLogSql(string sql, params SqlParameter[] parameter); + + + + private static void BeginTraceError(Exception ex) + + { + + if (null != ex) + + { + + //检测日志日期 + + StrategyLog(); + + + + //输出日志头 + + System.Diagnostics.Trace.WriteLine(string.Format(trace_exception, DateTime.Now)); + + while (null != ex) + + { + + System.Diagnostics.Trace.WriteLine(string.Format("{0} {1}\r\n{2}\r\nSource:{3}", ex.GetType().Name, ex.Message, ex.StackTrace, ex.Source)); + + ex = ex.InnerException; + + } + + } + + } + + + + private static void BeginTraceSqlCommand(SqlCommand cmd) + + { + + if (null != cmd) + + { + + SqlParameter[] parameter = new SqlParameter[cmd.Parameters.Count]; + + cmd.Parameters.CopyTo(parameter, 0); + + BeginTraceSql(cmd.CommandText, parameter); + + } + + } + + + + private static void BeginTraceSql(string sql, params SqlParameter[] parameter) + + { + + if (!string.IsNullOrEmpty(sql)) + + { + + //检测日志日期 + + StrategyLog(); + + + + System.Diagnostics.Trace.WriteLine(sql, string.Format(trace_sql, DateTime.Now)); + + if (parameter != null) + + { + + foreach (SqlParameter param in parameter) + + { + + System.Diagnostics.Trace.WriteLine(string.Format(FORMAT_TRACE_PARAM, param.ParameterName, param.Value)); + + } + + } + + } + + } + + + + #endregion + + + + #region helper + + + + /// <summary> + + /// 根据日志策略生成日志 + + /// </summary> + + private static void StrategyLog() + + { + + //判断日志日期 + + if (DateTime.Compare(DateTime.Now.Date, CurrentLogFileDate.Date) != 0) + + { + + DateTime currentDate = DateTime.Now.Date; + + + + //生成子目录 + + BuiderDir(currentDate); + + //更新当前日志日期 + + CurrentLogFileDate = currentDate; + + + + System.Diagnostics.Trace.Flush(); + + + + //更改输出 + + if (twtl != null) + + System.Diagnostics.Trace.Listeners.Remove(twtl); + + + + System.Diagnostics.Trace.Listeners.Add(TWTL); + + } + + } + + + + /// <summary> + + /// 根据年月生成子目录 + + /// </summary> + + /// <param name="currentDate"></param> + + private static void BuiderDir(DateTime currentDate) + + { + + int year = currentDate.Year; + + int month = currentDate.Month; + + //年/月 + + string subdir = string.Concat(year, '\\', month); + + string path = Path.Combine(log_root_directory, subdir); + + if (!Directory.Exists(path)) + + { + + Directory.CreateDirectory(path); + + } + + log_subdir = subdir; + + } + + + + #endregion + + + + #endregion + + + + #region Properties + + + + /// <summary> + + /// 日志文件路径 + + /// </summary> + + /// <returns></returns> + + private static string GetLogFullPath + + { + + get + + { + + return string.Concat(log_root_directory, '\\', string.Concat(log_subdir, @"\log", CurrentLogFileDate.ToShortDateString(), ".txt")); + + } + + } + + + + /// <summary> + + /// 跟踪输出日志文件 + + /// </summary> + + private static TextWriterTraceListener TWTL + + { + + get + + { + + if (twtl == null) + + { + + if (string.IsNullOrEmpty(log_subdir)) + + BuiderDir(DateTime.Now); + + else + + { + + string logPath = GetLogFullPath; + + if (!Directory.Exists(Path.GetDirectoryName(logPath))) + + BuiderDir(DateTime.Now); + + } + + twtl = new TextWriterTraceListener(GetLogFullPath); + + } + + return twtl; + + } + + } + + + + #endregion + + + + } + +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Utils/XmlHelper.cs b/北京北汽/SCP/CK.SCP.Utils/XmlHelper.cs new file mode 100644 index 0000000..93e9930 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/XmlHelper.cs @@ -0,0 +1,219 @@ +using System; +using System.Collections.Generic; +using System.Xml; + +namespace CK.SCP.Utils +{ + /// <summary> + /// 实体转Xml,Xml转实体类 + /// </summary> + /// <typeparam name="T"></typeparam> + public class XmlHelper<T> where T : new() + { + #region 实体类转成Xml + + /// <summary> + /// 对象实例转成xml + /// </summary> + /// <param name="item">对象实例</param> + /// <returns></returns> + public static string EntityToXml(T item) + { + IList<T> items = new List<T>(); + items.Add(item); + return EntityToXml(items); + } + + /// <summary> + /// 对象实例集转成xml + /// </summary> + /// <param name="items">对象实例集</param> + /// <returns></returns> + public static string EntityToXml(IList<T> items) + { + //创建XmlDocument文档 + XmlDocument doc = new XmlDocument(); + //创建根元素 + XmlElement root = doc.CreateElement(typeof(T).Name + "s"); + //添加根元素的子元素集 + foreach (T item in items) + { + EntityToXml(doc, root, item); + } + //向XmlDocument文档添加根元素 + doc.AppendChild(root); + + return doc.InnerXml; + } + + private static void EntityToXml(XmlDocument doc, XmlElement root, T item) + { + //创建元素 + XmlElement xmlItem = doc.CreateElement(typeof(T).Name); + //对象的属性集 + + System.Reflection.PropertyInfo[] propertyInfo = + typeof(T).GetProperties(System.Reflection.BindingFlags.Public | + System.Reflection.BindingFlags.Instance); + + + + foreach (System.Reflection.PropertyInfo pinfo in propertyInfo) + { + if (pinfo != null) + { + //对象属性名称 + string name = pinfo.Name; + //对象属性值 + string value = String.Empty; + + if (pinfo.GetValue(item, null) != null) + value = pinfo.GetValue(item, null).ToString(); //获取对象属性值 + //设置元素的属性值 + xmlItem.SetAttribute(name, value); + } + } + //向根添加子元素 + root.AppendChild(xmlItem); + } + + + #endregion + + #region Xml转成实体类 + + /// <summary> + /// Xml转成对象实例 + /// </summary> + /// <param name="xml">xml</param> + /// <returns></returns> + public static T XmlToEntity(string xml) + { + IList<T> items = XmlToEntityList(xml); + if (items != null && items.Count > 0) + return items[0]; + else return default(T); + } + + /// <summary> + /// Xml转成对象实例集 + /// </summary> + /// <param name="xml">xml</param> + /// <returns></returns> + public static IList<T> XmlToEntityList(string xml) + { + XmlDocument doc = new XmlDocument(); + try + { + doc.LoadXml(xml); + } + catch + { + return null; + } + if (doc.ChildNodes.Count != 1) + return null; + if (doc.ChildNodes[0].Name.ToLower() != typeof(T).Name.ToLower() + "s") + return null; + + XmlNode node = doc.ChildNodes[0]; + + IList<T> items = new List<T>(); + + foreach (XmlNode child in node.ChildNodes) + { + if (child.Name.ToLower() == typeof(T).Name.ToLower()) + items.Add(XmlNodeToEntity(child)); + } + + return items; + } + + private static T XmlNodeToEntity(XmlNode node) + { + T item = new T(); + + if (node.NodeType == XmlNodeType.Element) + { + XmlElement element = (XmlElement)node; + + System.Reflection.PropertyInfo[] propertyInfo = + typeof(T).GetProperties(System.Reflection.BindingFlags.Public | + System.Reflection.BindingFlags.Instance); + + foreach (XmlAttribute attr in element.Attributes) + { + string attrName = attr.Name.ToLower(); + string attrValue = attr.Value.ToString(); + foreach (System.Reflection.PropertyInfo pInfo in propertyInfo) + { + if (pInfo == null) continue; + var name = pInfo.Name.ToLower(); + var dbType = pInfo.PropertyType; + if (name != attrName) continue; + if (String.IsNullOrEmpty(attrValue))continue; + + if (!pInfo.PropertyType.IsGenericType) + { + pInfo.SetValue(item, string.IsNullOrEmpty(attrValue) ? null : Convert.ChangeType(attrValue, pInfo.PropertyType,null), null); + } + else + { + //泛型Nullable<> + Type genericTypeDefinition = pInfo.PropertyType.GetGenericTypeDefinition(); + if (genericTypeDefinition == typeof(Nullable<>)) + { + pInfo.SetValue(item, string.IsNullOrEmpty(attrValue) ? null : Convert.ChangeType(attrValue, Nullable.GetUnderlyingType(pInfo.PropertyType),null), null); + } + } +/*原来的方法 + if (dbType.IsGenericType && dbType.GetGenericTypeDefinition() == typeof(Nullable<>))//判断convertsionType是否为nullable泛型类 + { + if (dbType.FullName.IndexOf("System.Int32", System.StringComparison.Ordinal) > 0) + dbType = typeof(System.Int32); + if (dbType.FullName.IndexOf("System.Boolean", System.StringComparison.Ordinal) > 0) + dbType = typeof(System.Boolean); + if (dbType.FullName.IndexOf("System.DateTime", System.StringComparison.Ordinal) > 0) + dbType = typeof(System.DateTime); + if (dbType.FullName.IndexOf("System.Decimal", System.StringComparison.Ordinal) > 0) + dbType = typeof(System.Decimal); + if (dbType.FullName.IndexOf("System.Double", System.StringComparison.Ordinal) > 0) + dbType = typeof(System.Double); + if (dbType.FullName.IndexOf("System.String", System.StringComparison.Ordinal) > 0) + dbType = typeof(System.String); +//WinCe下此段不可用 +// //如果type为nullable类,声明一个NullableConverter类,该类提供从Nullable类到基础基元类型的转换 +// System.ComponentModel.NullableConverter nullableConverter = new System.ComponentModel.NullableConverter(dbType); +// //将type转换为nullable对的基础基元类型 +// dbType = nullableConverter.UnderlyingType; + } + switch (dbType.ToString()) + { + case "System.Int32": + pInfo.SetValue(item, Convert.ToInt32(attrValue), null); + break; + case "System.Boolean": + pInfo.SetValue(item, Convert.ToBoolean(attrValue), null); + break; + case "System.DateTime": + pInfo.SetValue(item, Convert.ToDateTime(attrValue), null); + break; + case "System.Decimal": + pInfo.SetValue(item, Convert.ToDecimal(attrValue), null); + break; + case "System.Double": + pInfo.SetValue(item, Convert.ToDouble(attrValue), null); + break; + default: + pInfo.SetValue(item, attrValue, null); + break; + }*/ + } + } + } + return item; + } + + #endregion + } +} \ No newline at end of file diff --git a/北京北汽/SCP/CK.SCP.Utils/packages.config b/北京北汽/SCP/CK.SCP.Utils/packages.config new file mode 100644 index 0000000..cb18c55 --- /dev/null +++ b/北京北汽/SCP/CK.SCP.Utils/packages.config @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="log4net" version="2.0.8" targetFramework="net45" /> + <package id="Newtonsoft.Json" version="11.0.1" targetFramework="net45" /> +</packages> \ No newline at end of file diff --git a/北京北汽/SCP/Change_password.aspx b/北京北汽/SCP/Change_password.aspx new file mode 100644 index 0000000..a0f8cd7 --- /dev/null +++ b/北京北汽/SCP/Change_password.aspx @@ -0,0 +1,26 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Change_password.aspx.cs" Inherits="SCP.Change_password" %> + +<!DOCTYPE html> + +<html xmlns="http://www.w3.org/1999/xhtml"> +<head runat="server"> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> + <title> + + +
+
+

请修改密码,新密码必须包含数字加大小写字母和特殊英文符号~!@#$%^&*_中的一个且不能少于8位!

+ + +
+ +
+
+
+ + diff --git a/北京北汽/SCP/Change_password.aspx.cs b/北京北汽/SCP/Change_password.aspx.cs new file mode 100644 index 0000000..7b7a594 --- /dev/null +++ b/北京北汽/SCP/Change_password.aspx.cs @@ -0,0 +1,54 @@ +using System; +using System.Data; +using System.Web; +using System.Web.Security; +using FineUI; +using System.Text; +using System.Linq; +using CK.SCP.Models.AppBoxEntity; +using System.Collections.Generic; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Controller; +using System.Text.RegularExpressions; +using CK.SCP.Models; +using CK.SCP.Utils; +using CK.SCP.Common; +using System.Configuration; +using SCP.Code; + +namespace SCP +{ + public partial class Change_password : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + + } + protected void btnSubmit_Click(object sender, EventArgs e) + { + string username = Request.QueryString["username"]; + User user = DB.Users.Where(u => u.Name == username).FirstOrDefault(); + String pattern = "(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[~!@#$%^&*_.]).{8,}"; + if (!string.IsNullOrEmpty(this.textPassword1.Value)) + { + if (this.textPassword1.Value.Trim() != textConfim.Value.Trim()) + { + Alert.Show(GetResourceKey("新密码与确认密码不一致!")); + return; + } + else + { + if (!Regex.IsMatch(this.textPassword1.Value.Trim(), pattern)) + { + Alert.Show(GetResourceKey("新密码必须包含大小写字母,特殊符号~!@#$%^&*_中的一个和数字且不能少于8位!")); + return; + } + } + user.Password = PasswordUtil.CreateDbPassword(this.textPassword1.Value); + DB.SaveChanges(); + } + + + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Change_password.aspx.designer.cs b/北京北汽/SCP/Change_password.aspx.designer.cs new file mode 100644 index 0000000..8b1f271 --- /dev/null +++ b/北京北汽/SCP/Change_password.aspx.designer.cs @@ -0,0 +1,89 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace SCP +{ + + + public partial class Change_password + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// div_4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl div_4; + + /// + /// lb_PwdNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl lb_PwdNew; + + /// + /// textPassword1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlInputText textPassword1; + + /// + /// div_5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl div_5; + + /// + /// lb_PwdConf 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl lb_PwdConf; + + /// + /// textConfim 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlInputText textConfim; + + /// + /// btn_Login 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Button btn_Login; + } +} diff --git a/北京北汽/SCP/Common/CK.SCP.Common.csproj b/北京北汽/SCP/Common/CK.SCP.Common.csproj new file mode 100644 index 0000000..e8af561 --- /dev/null +++ b/北京北汽/SCP/Common/CK.SCP.Common.csproj @@ -0,0 +1,109 @@ + + + + + Debug + AnyCPU + {3D6090AB-2F0C-4350-AEF3-59DD73EAB1AA} + Library + Properties + CK.SCP.Common + CK.SCP.Common + v4.5.2 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\DLL\DevComponents.DotNetBar.Layout.dll + + + ..\DLL\DevComponents.DotNetBar2.dll + + + ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll + + + ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll + + + ..\packages\NPOI.2.3.0\lib\net40\NPOI.dll + + + ..\packages\NPOI.2.3.0\lib\net40\NPOI.OOXML.dll + + + ..\packages\NPOI.2.3.0\lib\net40\NPOI.OpenXml4Net.dll + + + ..\packages\NPOI.2.3.0\lib\net40\NPOI.OpenXmlFormats.dll + + + + + + + + + + + + + + + + + UserControl + + + CktSwitchButton.cs + + + UserControl + + + CktTextBox.cs + + + + + + + + + + + + + + + CktSwitchButton.cs + + + CktTextBox.cs + + + + + {4c6a951d-ad7f-47ce-b2ce-32c205d8d6ba} + CK.SCP.Utils + + + + \ No newline at end of file diff --git a/北京北汽/SCP/Common/CktSwitchButton.Designer.cs b/北京北汽/SCP/Common/CktSwitchButton.Designer.cs new file mode 100644 index 0000000..0c5ff0d --- /dev/null +++ b/北京北汽/SCP/Common/CktSwitchButton.Designer.cs @@ -0,0 +1,91 @@ +namespace CK.SCP.Common +{ + partial class CktSwitchButton + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.Lbl = new DevComponents.DotNetBar.LabelX(); + this.switchValue = new DevComponents.DotNetBar.Controls.SwitchButton(); + this.SuspendLayout(); + // + // Lbl + // + // + // + // + this.Lbl.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.Lbl.Dock = System.Windows.Forms.DockStyle.Left; + this.Lbl.Location = new System.Drawing.Point(0, 0); + this.Lbl.Margin = new System.Windows.Forms.Padding(2); + this.Lbl.Name = "Lbl"; + this.Lbl.Size = new System.Drawing.Size(80, 24); + this.Lbl.TabIndex = 0; + this.Lbl.Text = "标签"; + this.Lbl.TextAlignment = System.Drawing.StringAlignment.Far; + // + // switchValue + // + // + // + // + this.switchValue.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.switchValue.Dock = System.Windows.Forms.DockStyle.Fill; + this.switchValue.Location = new System.Drawing.Point(80, 0); + this.switchValue.Name = "switchValue"; + this.switchValue.OffBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.switchValue.OffText = "关闭"; + this.switchValue.OffTextColor = System.Drawing.Color.White; + this.switchValue.OnBackColor = System.Drawing.Color.Green; + this.switchValue.OnText = "开启"; + this.switchValue.OnTextColor = System.Drawing.Color.White; + this.switchValue.ReadOnlyMarkerColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192))))); + this.switchValue.Size = new System.Drawing.Size(160, 24); + this.switchValue.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.switchValue.SwitchWidth = 50; + this.switchValue.TabIndex = 2; + // + // CktSwitchButton + // + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.BackColor = System.Drawing.Color.Transparent; + this.Controls.Add(this.switchValue); + this.Controls.Add(this.Lbl); + this.Margin = new System.Windows.Forms.Padding(2); + this.Name = "CktSwitchButton"; + this.Size = new System.Drawing.Size(240, 24); + this.SizeChanged += new System.EventHandler(this.UcLabelTextBox_SizeChanged); + this.ResumeLayout(false); + + } + + #endregion + + private DevComponents.DotNetBar.LabelX Lbl; + private DevComponents.DotNetBar.Controls.SwitchButton switchValue; + } +} diff --git a/北京北汽/SCP/Common/CktSwitchButton.cs b/北京北汽/SCP/Common/CktSwitchButton.cs new file mode 100644 index 0000000..3072ca1 --- /dev/null +++ b/北京北汽/SCP/Common/CktSwitchButton.cs @@ -0,0 +1,105 @@ +using System; +using System.ComponentModel; +using System.Drawing; +using System.Windows.Forms; + +namespace CK.SCP.Common +{ + public partial class CktSwitchButton : UserControl + { + public CktSwitchButton() + { + InitializeComponent(); + switchValue.Width = Width - Lbl.Width - 3; + } + + public string LblText + { + get { return Lbl.Text; } + set + { + Lbl.Text = value; +// using (var g = this.CreateGraphics()) +// { +// var strSize = g.MeasureString(Caption.Text, Caption.Font); +// Caption.Width = (int)strSize.Width + 6; +// } + } + } + [DefaultValue(false)] + public bool Value + { + get { return switchValue.Value; } + set { switchValue.Value = value; } + } + + public override string Text + { + get { return switchValue.Text; } + set { switchValue.Text = value; } + } + + public int BoxWidth { get; set; } +// get { return txtValue.Width; } +// set { txtValue.Width = value; } + + public int LblWidth + { + get { return Lbl.Width; } + set + { + Lbl.Width = value; + switchValue.Width = Width - Lbl.Width - 3; + } + } + public Boolean IsReadOnly + { + get { return switchValue.IsReadOnly; } + set + { + switchValue.IsReadOnly = value; + } + } + + + public override bool Focused => switchValue.Focused; + + + + + public StringAlignment LblTextAlign + { + get { return Lbl.TextAlignment; } + set { Lbl.TextAlignment = value; } + } + + public new bool Enabled + { + get { return switchValue.Enabled; } + set { switchValue.Enabled = value; } + } + + + + private void UcLabelTextBox_SizeChanged(object sender, EventArgs e) + { + switchValue.Width = Width - Lbl.Width - 3; + } + +// public delegate void TextChangedHandler(object sender, System.EventArgs e); +// public event TextChangedHandler TxtTextChanged; +// private void txtValue_TextChanged(object sender, EventArgs e) +// { +// try +// { +// TxtTextChanged?.Invoke(sender, e); +// } +// catch +// { +// // ignored +// } +// } + + } +} + diff --git a/北京北汽/SCP/Common/CktSwitchButton.resx b/北京北汽/SCP/Common/CktSwitchButton.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/北京北汽/SCP/Common/CktSwitchButton.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/北京北汽/SCP/Common/CktTextBox.Designer.cs b/北京北汽/SCP/Common/CktTextBox.Designer.cs new file mode 100644 index 0000000..34d0e95 --- /dev/null +++ b/北京北汽/SCP/Common/CktTextBox.Designer.cs @@ -0,0 +1,114 @@ +namespace CK.SCP.Common +{ + partial class CktTextBox + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.Lbl = new DevComponents.DotNetBar.LabelX(); + this.txtValue = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.lblRear = new DevComponents.DotNetBar.LabelX(); + this.SuspendLayout(); + // + // Lbl + // + // + // + // + this.Lbl.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.Lbl.Dock = System.Windows.Forms.DockStyle.Left; + this.Lbl.Location = new System.Drawing.Point(0, 0); + this.Lbl.Margin = new System.Windows.Forms.Padding(2); + this.Lbl.Name = "Lbl"; + this.Lbl.Size = new System.Drawing.Size(80, 24); + this.Lbl.TabIndex = 0; + this.Lbl.Text = "标签"; + this.Lbl.TextAlignment = System.Drawing.StringAlignment.Far; + // + // txtValue + // + this.txtValue.BackColor = System.Drawing.Color.White; + // + // + // + this.txtValue.Border.Class = "TextBoxBorder"; + this.txtValue.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.txtValue.ButtonCustom.Text = "..."; + this.txtValue.DisabledBackColor = System.Drawing.Color.LightGray; + this.txtValue.Dock = System.Windows.Forms.DockStyle.Fill; + this.txtValue.FocusHighlightColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192))))); + this.txtValue.FocusHighlightEnabled = true; + this.txtValue.ForeColor = System.Drawing.Color.Black; + this.txtValue.Location = new System.Drawing.Point(80, 0); + this.txtValue.Margin = new System.Windows.Forms.Padding(2); + this.txtValue.Name = "txtValue"; + this.txtValue.PreventEnterBeep = true; + this.txtValue.Size = new System.Drawing.Size(120, 21); + this.txtValue.TabIndex = 1; + this.txtValue.WatermarkColor = System.Drawing.Color.Silver; + this.txtValue.ButtonCustomClick += new System.EventHandler(this.txtValue_ButtonCustomClick); + this.txtValue.TextChanged += new System.EventHandler(this.txtValue_TextChanged); + this.txtValue.DoubleClick += new System.EventHandler(this.txtValue_DoubleClick); + this.txtValue.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtValue_KeyPress); + // + // lblRear + // + // + // + // + this.lblRear.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.lblRear.Dock = System.Windows.Forms.DockStyle.Right; + this.lblRear.Location = new System.Drawing.Point(200, 0); + this.lblRear.Margin = new System.Windows.Forms.Padding(2); + this.lblRear.Name = "lblRear"; + this.lblRear.Size = new System.Drawing.Size(40, 24); + this.lblRear.TabIndex = 2; + this.lblRear.TextAlignment = System.Drawing.StringAlignment.Far; + this.lblRear.Visible = false; + // + // CktTextBox + // + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.BackColor = System.Drawing.Color.Transparent; + this.Controls.Add(this.txtValue); + this.Controls.Add(this.Lbl); + this.Controls.Add(this.lblRear); + this.Margin = new System.Windows.Forms.Padding(2); + this.Name = "CktTextBox"; + this.Size = new System.Drawing.Size(240, 24); + this.SizeChanged += new System.EventHandler(this.UcLabelTextBox_SizeChanged); + this.ResumeLayout(false); + + } + + #endregion + + private DevComponents.DotNetBar.LabelX Lbl; + private DevComponents.DotNetBar.Controls.TextBoxX txtValue; + private DevComponents.DotNetBar.LabelX lblRear; + } +} diff --git a/北京北汽/SCP/Common/CktTextBox.cs b/北京北汽/SCP/Common/CktTextBox.cs new file mode 100644 index 0000000..92a0ebc --- /dev/null +++ b/北京北汽/SCP/Common/CktTextBox.cs @@ -0,0 +1,237 @@ +using System; +using System.Drawing; +using System.Windows.Forms; +using CK.SCP.Utils; + +namespace CK.SCP.Common +{ + public partial class CktTextBox : UserControl + { + public CktTextBox() + { + InitializeComponent(); + txtValue.Width = Width - Lbl.Width - 3; + } + + public bool IsNum { get; set; } = false; + + public string LblText + { + get { return Lbl.Text; } + set + { + Lbl.Text = value; + // using (var g = this.CreateGraphics()) + // { + // var strSize = g.MeasureString(Caption.Text, Caption.Font); + // Caption.Width = (int)strSize.Width + 6; + // } + } + } + + public string RearLblText + { + get { return lblRear.Text; } + set + { + lblRear.Visible = !string.IsNullOrEmpty(value); + lblRear.Text = value; + } + } + + public int RearLblWidth + { + get { return lblRear.Width; } + set { lblRear.Width = value; } + } + + public string Value + { + get { return txtValue.Text; } + set { txtValue.Text = value; } + } + + public int IntValue + { + get + { + if (string.IsNullOrEmpty(txtValue.Text) && IsNum) + { + return 0; + } + int value; + if (!int.TryParse(txtValue.Text, out value)) + { + //throw new Exception($"请在{Lbl.Text}中输入数字"); + } + return value; + } + set { txtValue.Text = value.ToString(); } + } + + public decimal DecimalValue + { + get + { + if (string.IsNullOrEmpty(txtValue.Text) && IsNum) + { + return 0; + } + decimal value; + if (!decimal.TryParse(txtValue.Text, out value)) + { + // throw new Exception($"请在{Lbl.Text}中输入数字"); + } + return value; + } + set { txtValue.Text = value.ToString(); } + } + + public override string Text + { + get { return txtValue.Text; } + set { txtValue.Text = value; } + } + + public int BoxWidth { get; set; } + // get { return txtValue.Width; } + // set { txtValue.Width = value; } + + public int LblWidth + { + get { return Lbl.Width; } + set + { + Lbl.Width = value; + txtValue.Width = Width - Lbl.Width - 3; + } + } + public Boolean ReadOnly + { + get + { + return txtValue.ReadOnly; + } + set + { + txtValue.ReadOnly = value; + if (value) + { + txtValue.ButtonCustom.Visible = false; + txtValue.BackColor = Color.LightGray; + } + else + { + txtValue.BackColor = Color.White; + } + + } + } + + public string ButtonText + { + get { return txtValue.ButtonCustom.Text; } + set { txtValue.ButtonCustom.Text = value; } + } + public Boolean UserSystemPasswordChar + { + get { return txtValue.UseSystemPasswordChar; } + set { txtValue.UseSystemPasswordChar = value; } + } + + public void FocusToValue() + { + txtValue.Focus(); + } + + + public bool Multiline + { + get { return txtValue.Multiline; } + set { txtValue.Multiline = value; } + } + + + public StringAlignment LblTextAlign + { + get { return Lbl.TextAlignment; } + set { Lbl.TextAlignment = value; } + } + + + public bool ButtonVisible + { + get { return txtValue.ButtonCustom.Visible; } + set { txtValue.ButtonCustom.Visible = value; } + } + + + private void UcLabelTextBox_SizeChanged(object sender, EventArgs e) + { + txtValue.Width = Width - Lbl.Width - 3; + } + + public delegate void TextChangedHandler(object sender, EventArgs e); + public event TextChangedHandler TxtTextChanged; + private void txtValue_TextChanged(object sender, EventArgs e) + { + try + { + TxtTextChanged?.Invoke(sender, e); + } + catch + { + // ignored + } + } + + public delegate void DoubleClickHandler(object sender, EventArgs e); + public event DoubleClickHandler TxtDoubleClick; + private void txtValue_DoubleClick(object sender, EventArgs e) + { + try + { + TxtDoubleClick?.Invoke(sender, e); + } + catch + { + // ignored + } + } + + + public delegate void TxtKeyPressHandler(object sender, KeyPressEventArgs e); + public event TxtKeyPressHandler TxtKeyPress; + private void txtValue_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar != (char)Keys.Enter) return; + try + { + TxtKeyPress?.Invoke(sender, e); + } + catch (Exception ex) + { + MessageHelper.ShowInfo(ex.Message); + + } + } + + + public delegate void ButtonCustomClickHandler(object sender, EventArgs e); + public event ButtonCustomClickHandler ButtonCustomClick; + private void txtValue_ButtonCustomClick(object sender, EventArgs e) + { + try + { + ButtonCustomClick?.Invoke(sender, e); + } + catch + { + // ignored + } + } + + + } +} + diff --git a/北京北汽/SCP/Common/CktTextBox.resx b/北京北汽/SCP/Common/CktTextBox.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/北京北汽/SCP/Common/CktTextBox.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/北京北汽/SCP/Common/MailHelper.cs b/北京北汽/SCP/Common/MailHelper.cs index e07e1cb..b654f0b 100644 --- a/北京北汽/SCP/Common/MailHelper.cs +++ b/北京北汽/SCP/Common/MailHelper.cs @@ -17,7 +17,7 @@ namespace SCP.Common public static void SendMail(string p_VendId, string p_Content, string p_title,string p_site) { try - { + { using (AppBoxContext db = EntitiesFactory.CreateAppBoxInstance()) { StringBuilder _buffer = new StringBuilder(); diff --git a/北京北汽/SCP/Common/MyExcel.cs b/北京北汽/SCP/Common/MyExcel.cs new file mode 100644 index 0000000..ba08dcd --- /dev/null +++ b/北京北汽/SCP/Common/MyExcel.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NPOI.HSSF.UserModel; + +namespace CK.SCP.Common +{ + public class MyExcel + { + public HSSFWorkbook hssfworkbook = null; + + public string filename = null; + + public HSSFSheet sheet = null; + + public void NewExcel(string _filename) + { + this.filename = _filename; + this.hssfworkbook = new HSSFWorkbook(); + } + + public void OpenExcel(string _filename) + { + this.filename = _filename; + FileStream file = new FileStream(this.filename, FileMode.Open, FileAccess.Read); + this.hssfworkbook = new HSSFWorkbook(file); + } + + public void NewSheet(string sheetname) + { + this.sheet = (HSSFSheet)this.hssfworkbook.CreateSheet(sheetname); + } + + public void OpenSheet(string sheetname) + { + this.sheet = (HSSFSheet)this.hssfworkbook.GetSheet(sheetname); + } + + public void CreateRow(int rowindex) + { + this.sheet.CreateRow(rowindex); + } + + public void CreateCell(int rowindex, int colindex) + { + this.sheet.GetRow(rowindex).CreateCell(colindex); + } + + public void SetCellValue(int rowindex, int colindex, string value) + { + this.sheet.GetRow(rowindex).GetCell(colindex).SetCellValue(value); + } + + public void Save() + { + FileStream file = new FileStream(this.filename, FileMode.Create); + this.hssfworkbook.Write(file); + file.Close(); + } + } +} diff --git a/北京北汽/SCP/Common/MyWebSmtpMail.cs b/北京北汽/SCP/Common/MyWebSmtpMail.cs new file mode 100644 index 0000000..232f024 --- /dev/null +++ b/北京北汽/SCP/Common/MyWebSmtpMail.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Linq; +using System.Net.Mail; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Common +{ + + public class MyWebSmtpMail + { + private MailMessage mailMessage; + private SmtpClient smtpClient; + private string from; + private string server; + private string username; + private string password; + private bool enablessl; + private bool credentials; + private int port; + + public MyWebSmtpMail() + { + string From = ConfigurationManager.AppSettings["MailSender"]; + string Server = ConfigurationManager.AppSettings["MailServer"]; + string UserName = ConfigurationManager.AppSettings["MailUserName"]; + string Password = ConfigurationManager.AppSettings["MailPassword"]; + int Port = Convert.ToInt32(ConfigurationManager.AppSettings["MailPort"]); + + this.from = From; + this.server = Server; + this.password = Password; + this.username = UserName; + this.enablessl = false; + this.port = Port; + this.credentials = false; + } + + public void Send(string To, string Body, string Title) + { + mailMessage = new MailMessage(); + mailMessage.To.Add(To); + mailMessage.From = new System.Net.Mail.MailAddress(this.from); + mailMessage.Subject = Title; + mailMessage.Body = Body; + mailMessage.IsBodyHtml = true; + mailMessage.BodyEncoding = System.Text.Encoding.UTF8; + mailMessage.Priority = System.Net.Mail.MailPriority.Normal; + + if (mailMessage != null) + { + smtpClient = new SmtpClient(); + if (!credentials) + { + smtpClient.Credentials = new System.Net.NetworkCredential(username, password); + } + smtpClient.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network; + smtpClient.Host = server; + smtpClient.Port = port; + smtpClient.EnableSsl = enablessl; + //smtpClient.Send(mailMessage); + //smtpClient.SendAsync(mailMessage, null); + + //如果服务器支持安全连接,则将安全连接设为true + //smtpClient.EnableSsl = true; + try + { + //是否使用默认凭据,若为false,则使用自定义的证书,就是下面的networkCredential实例对象 + smtpClient.UseDefaultCredentials = false; + + //指定邮箱账号和密码,需要注意的是,这个密码是你在QQ邮箱设置里开启服务的时候给你的那个授权码 + System.Net.NetworkCredential networkCredential = new System.Net.NetworkCredential(username, password); + smtpClient.Credentials = networkCredential; + + //发送邮件 + smtpClient.Send(mailMessage); + + } + catch (System.Net.Mail.SmtpException ex) + { + //Console.WriteLine(ex.Message, "发送邮件出错"); + } + } + } + } +} diff --git a/北京北汽/SCP/Common/MyWebString.cs b/北京北汽/SCP/Common/MyWebString.cs new file mode 100644 index 0000000..367fbb6 --- /dev/null +++ b/北京北汽/SCP/Common/MyWebString.cs @@ -0,0 +1,282 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; + +namespace CK.SCP.Common +{ + public class MyWebString + { + /// + /// 取得从表单传递的内容 + /// + /// + /// + public static string GetString(string content) + { + string ret = ""; + ret = content.Replace("'", "''"); + + return ret; + } + + public static string GetString(string content, int length) + { + string ret = ""; + ret = ret.Substring(0, length); + ret = content.Replace("'", "''"); + + return ret; + } + + /// + /// 取得从表单传递的数字 + /// + /// + /// + public static int GetID(string content) + { + int ret = 0; + if (content != "") + { + if (IsNumeric(content)) + { + ret = Convert.ToInt32(content); + } + } + + return ret; + } + + + /// + /// 判断是否为正整数 + /// + /// + /// + public static bool IsNumeric(string str) + { + bool ret; + if (str != "") + { + if (str != null && Regex.IsMatch(str, @"^\d+$")) + ret = true; + else + ret = false; + } + else + { + ret = true; + } + + return ret; + } + + /// + /// 判断是否是日期时间格式 + /// + /// + /// + public static bool IsDateTime(string Date) + { + try + { + Convert.ToDateTime(Date); + + return true; + } + catch + { + return false; + } + } + + /// + /// 格式化时间/时间 + /// + /// + /// + /// + public static string FormatDateTime(int Type, string dt) + { + string result = ""; + if (dt == null || dt == "") + { + return result; + } + + DateTime _dt = Convert.ToDateTime(dt); + int Year = _dt.Year; + int Month = _dt.Month; + int Day = _dt.Day; + + string sYear = Year.ToString(); + string sMonth = Month.ToString(); + string sDay = Day.ToString(); + + if (Month < 10) + sMonth = "0" + Month.ToString(); + if (Day < 10) + sDay = "0" + Day.ToString(); + + switch (Type) + { + case 1: //06-03 + result = sMonth + "-" + sDay; + break; + case 2: //2010-10-01 + result = sYear + "-" + sMonth + "-" + sDay; + break; + case 3: //2010年10月01日 + result = sYear + "年" + sMonth + "月" + sDay + "日"; + break; + case 4://20100310" + result = sYear + "" + sMonth + "" + sDay + ""; + break; + } + + return result; + } + + public static string GetBatch() + { + string result = ""; + + DateTime _dt = DateTime.Now; + int Year = _dt.Year; + int Month = _dt.Month; + int Day = _dt.Day; + + string sYear = Year.ToString(); + string sMonth = Month.ToString(); + string sDay = Day.ToString(); + + if (Month < 10) + sMonth = "0" + Month.ToString(); + if (Day < 10) + sDay = "0" + Day.ToString(); + + sYear = sYear.Substring(2, 2); + result = sYear + sMonth + sDay; + + return result; + } + + /// + /// 转换日期/时间 + /// + /// + /// + public static DateTime ConvertTime(string datetime) + { + DateTime dt; + + datetime = datetime.Trim(); + if (datetime == "") throw new Exception("时间/日期格式不正确!"); + + try + { + dt = Convert.ToDateTime(datetime); + } + catch + { + throw new Exception("[" + datetime + "]时间/日期格式不正确!"); + } + + return dt; + } + + public static string Week(string datetime) + { + DateTime dt = Convert.ToDateTime(datetime); + + string[] weekdays = { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" }; + string week = weekdays[Convert.ToInt32(dt.DayOfWeek)]; + + return week; + } + + + /// + /// 剪切指定长度的文本 + /// + /// + /// + /// + public static string CutString(string str, int len) + { + if (str.Length <= len) return str; + + str = str.Substring(0, len) + "..."; + + return str; + } + + public static string CleanHtmlBr(string str) + { + str = str.Replace("<", "<"); + str = str.Replace(">", ">"); + str = str.Replace("\r\n", "
"); + str = str.Replace(" ", " "); + + return str; + } + + public static string AddHtmlBr(string str) + { + str = str.Replace("\r\n", "
"); + return str; + } + + /// + /// 根据日期、时间取得一个订单号 + /// + /// + public static string GetOrderNumber() + { + string ret = ""; + + //Random r = new Random(DateTime.Now.Millisecond); + //int ex = r.Next(1000, 9999); + + //ret = DateTime.Now.ToString("yyMMddHHmmss") + "-" + ex; + + + ret = Guid.NewGuid().ToString(); + + + return ret; + } + + /// + /// 在指定字串右边填充指定的字串 + /// + /// 要填充的原字串 + /// 填充的字符 + /// 要填充的长度 + /// + public static string PadLeftString(string o_str, char p_str, int len) + { + string result = ""; + if (o_str.Length > len) + { + //result = o_str.Substring(0, len); + result = o_str; + } + else + { + int slen = len - o_str.Length; + result = o_str; + while (slen > 0) + { + result = p_str.ToString() + result; + slen--; + } + } + + return result; + } + } +} diff --git a/北京北汽/SCP/Common/Properties/AssemblyInfo.cs b/北京北汽/SCP/Common/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4cb9e62 --- /dev/null +++ b/北京北汽/SCP/Common/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("Common")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Common")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("3d6090ab-2f0c-4350-aef3-59dd73eab1aa")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/北京北汽/SCP/Common/SettingHelper.cs b/北京北汽/SCP/Common/SettingHelper.cs new file mode 100644 index 0000000..d81656d --- /dev/null +++ b/北京北汽/SCP/Common/SettingHelper.cs @@ -0,0 +1,172 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Windows.Forms; +using CK.SCP.Utils; +using DevComponents.DotNetBar.Controls; + +namespace CK.SCP.Common +{ + public static class SettingHelper + { + public static T SetConfigValues(List groupList, string filename) where T : new() + { + var t = new T(); + var properties = t.GetType().GetProperties(); + foreach (var group in groupList) + { + if (group.GetType() != typeof(GroupPanel)) continue; + if (group.Name != GetPureName(filename)) continue; + foreach (var ctrl in group.Controls) + { + if (ctrl.GetType() == typeof(CktTextBox)) + { + var textbox = (CktTextBox)ctrl; + foreach (var pi in properties) + { + var piName = pi.Name; + + if (textbox.Name != piName) continue; + if (string.IsNullOrEmpty(textbox.Text.Trim())) + { + throw new Exception($"{piName} 不能为空"); + } + var value = ListHelper.ConvertToType(textbox.Text, pi.PropertyType); + if (textbox.UserSystemPasswordChar) + value = EncryptHelper.Encrypt(textbox.Text); + if (!pi.CanWrite) continue; + pi.SetValue(t, value, null); + break; + } + } + if (ctrl.GetType() == typeof(CktSwitchButton)) + { + var switchButton = (CktSwitchButton)ctrl; + foreach (var pi in properties) + { + var piName = pi.Name; + + if (switchButton.Name != piName) continue; + + var value = ListHelper.ConvertToType(switchButton.Value, pi.PropertyType); + if (!pi.CanWrite) continue; + pi.SetValue(t, value, null); + break; + } + } + } + break; + } + JsonHelper.WriteConfigToFile(filename, t); + return t; + } + + public static GroupPanel GetConfigValues(string filename) where T : new() + { + + var t = FileHelper.Exists(filename) + ? JsonHelper.ReadConfigFromFile(filename) + : new T(); + + var properties = t.GetType().GetProperties(); + var group = CreateGroupPanel(filename, properties.Length); + + foreach (var pi in properties) + { + var piValue = pi.GetValue(t, null); + var piName = pi.Name; + if (pi.PropertyType == typeof(Boolean)) + { + var switchButton = CreateSwitchButton(piName); + switchButton.Value = Convert.ToBoolean(piValue); + @group.Controls.Add(switchButton); + switchButton.BringToFront(); + } + else + { + var textbox = CreateTextbox(piName); + if (piName.Contains("密码")) + { + textbox.UserSystemPasswordChar = true; + textbox.Text = piValue == null ? "" : EncryptHelper.Decrypt(piValue.ToString()); + } + else + { + textbox.Text = piValue?.ToString() ?? ""; + } + @group.Controls.Add(textbox); + textbox.BringToFront(); + } + } + return group; + } + + private static CktTextBox CreateTextbox(string piName) where T : new() + { + return new CktTextBox() + { + LblText = piName, + LblTextAlign = StringAlignment.Far, + LblWidth = 150, + Dock = DockStyle.Top, + Name = piName, + + }; + } + + private static CktSwitchButton CreateSwitchButton(string piName) where T : new() + { + return new CktSwitchButton() + { + LblText = piName, + LblTextAlign = StringAlignment.Far, + LblWidth = 100, + Dock = DockStyle.Top, + Name = piName, + }; + } + + public static string GetPureName(string filename) + { + return filename.Replace(".ini", ""); + } + + private static GroupPanel CreateGroupPanel(string filename, int pQty) + { + var group = new GroupPanel + { + CanvasColor = System.Drawing.SystemColors.Control, + ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007, + DisabledBackColor = System.Drawing.Color.Empty, + Location = new System.Drawing.Point(3, 3), + Height = 25 * (pQty + 1), + Width = 300, + + }; + group.Name = GetPureName(filename); + group.Text = GetPureName(filename); + group.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + group.Style.BackColorGradientAngle = 90; + group.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + group.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + group.Style.BorderBottomWidth = 1; + group.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + group.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + group.Style.BorderLeftWidth = 1; + group.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + group.Style.BorderRightWidth = 1; + group.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + group.Style.BorderTopWidth = 1; + group.Style.CornerDiameter = 4; + group.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + group.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + group.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + group.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + group.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + group.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + group.Visible = false; + return group; + } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Common/Upload.cs b/北京北汽/SCP/Common/Upload.cs new file mode 100644 index 0000000..6394e7b --- /dev/null +++ b/北京北汽/SCP/Common/Upload.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Common +{ + class Upload + { + } +} diff --git a/北京北汽/SCP/Common/app.config b/北京北汽/SCP/Common/app.config new file mode 100644 index 0000000..b5d2fd5 --- /dev/null +++ b/北京北汽/SCP/Common/app.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/北京北汽/SCP/Common/packages.config b/北京北汽/SCP/Common/packages.config new file mode 100644 index 0000000..8e2e973 --- /dev/null +++ b/北京北汽/SCP/Common/packages.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/北京北汽/SCP/Controller/BaseDocContoller.cs b/北京北汽/SCP/Controller/BaseDocContoller.cs new file mode 100644 index 0000000..0b66180 --- /dev/null +++ b/北京北汽/SCP/Controller/BaseDocContoller.cs @@ -0,0 +1,114 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity; +using System.Data.Entity.Core.Common.CommandTrees; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using System.Data.Entity.Migrations; +using System.Linq.Expressions; +using CK.SCP.Models; + + +namespace CK.SCP.Controller +{ + public static class EntitiesHelper + { + + public static List GetModeList_genaral(Expression> select, + Expression> where, Expression> order, out int count) + where T : class + { + List list = null; + count = 0; + using (DbContext db = EntitiesFactory.CreateScpInstance()) + { + count = db.Set().Where(where).Count(); + list = + db.Set() + .Where(where) + .OrderBy(order) + .Select(select).ToList(); + } + return list; + } + + public static List GetPagedModelListAsc(Expression> select, + Expression> where, Expression> order, int pageIndex, int pageSize, out int total) + where T : class + { + List list = null; + total = 0; + using (DbContext db = EntitiesFactory.CreateScpInstance()) + { + total = db.Set().Where(where).Count(); + list = + db.Set() + .Where(where) + .OrderBy(order) + .Select(select) + .Skip((pageIndex - 1) * pageSize) + .Take(pageSize).ToList(); + } + return list; + } + + public static List GetPagedDataAsc(Expression> select, + Expression> where, Expression> order, int pageIndex, int pageSize, out int total) + where T : class + { + List list = null; + total = 0; + using (DbContext db = EntitiesFactory.CreateScpInstance()) + { + total = db.Set().Where(where.Compile()).AsQueryable().Count(); + list = + db.Set() + .Where(where.Compile()).AsQueryable() + .OrderBy(order) + .Select(select) + .Skip((pageIndex - 1) * pageSize) + .Take(pageSize).ToList(); + } + return list; + } + + //TODO 分页 原来 pageIndex-1 + public static List GetPagedDataDesc(DbContext db, Expression> select, + Expression> where, Expression> order, int pageIndex, int pageSize, out int total) + where T : class + { + List list = null; + total = 0; + + total = db.Set().Where(where).Count(); + list = + db.Set() + .Where(where) + .OrderByDescending(order) + .Select(select) + .Skip((pageIndex) * pageSize) + .Take(pageSize).ToList(); + + + return list; + } + public static List GetPagedList(DbContext db, Expression> order, int pageIndex, int pageSize, out int total) + where T : class + { + List list = null; + total = 0; + + total = db.Set().Count(); + list = + db.Set() + .OrderByDescending(order) + .Skip((pageIndex) * pageSize) + .Take(pageSize).ToList(); + + + return list; + } + } +} diff --git a/北京北汽/SCP/Controller/CK.SCP.Controller.csproj b/北京北汽/SCP/Controller/CK.SCP.Controller.csproj new file mode 100644 index 0000000..fecd84b --- /dev/null +++ b/北京北汽/SCP/Controller/CK.SCP.Controller.csproj @@ -0,0 +1,137 @@ + + + + + Debug + AnyCPU + {D096D4FF-9546-4137-9A02-9070E70DC760} + Library + Properties + CK.SCP.Controller + CK.SCP.Controller + v4.5.2 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll + + + ..\packages\EntityFramework.Extensions.0.0.2\lib\net40\EntityFramework.Extensions.dll + + + ..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll + + + ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + ..\SCP\bin\Z.EntityFramework.Extensions.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {74dce5f2-a501-45f2-b4f9-494aa1867226} + CK.SCP.Models + + + {4c6a951d-ad7f-47ce-b2ce-32c205d8d6ba} + CK.SCP.Utils + + + + + + + + + \ No newline at end of file diff --git a/北京北汽/SCP/Controller/EC_CONTROLLER.cs b/北京北汽/SCP/Controller/EC_CONTROLLER.cs new file mode 100644 index 0000000..56cc603 --- /dev/null +++ b/北京北汽/SCP/Controller/EC_CONTROLLER.cs @@ -0,0 +1,724 @@ +using CK.SCP.Models; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ExchangeCenterTables; +using CK.SCP.Utils; +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Data.Entity.Migrations; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ + public class UN_EC_CONTROLLER + { + public static ResultObject> Get_TEA_SYSTEM_List(TEA_SYSTEM p_entity) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + IQueryable q = db.TEA_SYSTEM; + if (!string.IsNullOrEmpty(p_entity.SystemName)) + { + q = q.Where(p => p.SystemName.Contains(p_entity.SystemName)); + } + if (!string.IsNullOrEmpty(p_entity.SystemDesc)) + { + q = q.Where(p => p.SystemDesc.Contains(p_entity.SystemDesc)); + } + if (!string.IsNullOrEmpty(p_entity.Password)) + { + q = q.Where(p => p.Password.Contains(p_entity.Password)); + } + if (!string.IsNullOrEmpty(p_entity.Email)) + { + q = q.Where(p => p.Email.Contains(p_entity.Email)); + } + if (!string.IsNullOrEmpty(p_entity.ClientIp)) + { + q = q.Where(p => p.ClientIp.Contains(p_entity.ClientIp)); + } + if (!string.IsNullOrEmpty(p_entity.SessionId)) + { + q = q.Where(p => p.SessionId.Contains(p_entity.SessionId)); + } + if (!string.IsNullOrEmpty(p_entity.Domain)) + { + q = q.Where(p => p.Domain.Contains(p_entity.Domain)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.UpdateUser)) + { + q = q.Where(p => p.UpdateUser.Contains(p_entity.UpdateUser)); + } + if (p_entity.IsChecked != false) + { + q = q.Where(p => p.IsChecked == p_entity.IsChecked); + } + if (p_entity.Enable != false) + { + q = q.Where(p => p.Enable == p_entity.Enable); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.ToList(); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_SYSTEM), "Get_TEA_SYSTEM_List", e.Message); + throw e; + } + return _ret; + } + + + public static ResultObject Save_TEA_SYSTEM(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TEA_SYSTEM.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_SYSTEM), "Save_TEA_SYSTEM", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public static ResultObject Del_TEA_SYSTEM(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TEA_SYSTEM.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_SYSTEM), "Del_TEA_SYSTEM", e.Message); throw e; + } + return _ret; + } + + + + public static DataTable Get_EC_TASK_List(string p_taskId, string p_tableName) + { + DataTable dt = new DataTable(); ; + var dbSetting = GlobalConfig.ExchangeCenterDB; + try + { + + var strConn = EntitiesFactory.GetEfConnectionString(dbSetting); + SqlConnection conn = new System.Data.SqlClient.SqlConnection(); + //conn.ConnectionString = db.Database.Connection.ConnectionString; + + conn.ConnectionString = strConn; + + if (conn.State != ConnectionState.Open) + { + conn.Open(); + } + SqlCommand cmd = new SqlCommand(); + + cmd.Connection = conn; + string _sql = string.Format("select * from {0} where taskid='{1}'", p_tableName, p_taskId); + + cmd.CommandText = _sql; + + SqlDataAdapter adapter = new SqlDataAdapter(cmd); + + adapter.Fill(dt); + conn.Close(); + + } + catch (SqlException ex) + { + throw new Exception($"系统无法连接到数据库:{dbSetting},请检查配置的服务器,数据库,用户名和密码等信息是否正确。{Environment.NewLine}{ex}"); + } + + return dt; + } + + + public static DataTable Get_TABLE_NAME_List() + { + DataTable dt = new DataTable(); ; + var dbSetting = GlobalConfig.ExchangeCenterDB; + try + { + + var strConn = EntitiesFactory.GetEfConnectionString(dbSetting); + SqlConnection conn = new System.Data.SqlClient.SqlConnection(); + //conn.ConnectionString = db.Database.Connection.ConnectionString; + + conn.ConnectionString = strConn; + + if (conn.State != ConnectionState.Open) + { + conn.Open(); + } + SqlCommand cmd = new SqlCommand(); + + cmd.Connection = conn; + string _sql = "select NAME from sysobjects where xtype in ('u','v')"; + + cmd.CommandText = _sql; + + SqlDataAdapter adapter = new SqlDataAdapter(cmd); + + adapter.Fill(dt); + conn.Close(); + + } + catch (SqlException ex) + { + throw new Exception($"系统无法连接到数据库:{dbSetting},请检查配置的服务器,数据库,用户名和密码等信息是否正确。{Environment.NewLine}{ex}"); + } + return dt; + } + + public static DataTable Get_TABLE_NAME_List(DB_CONNECTION p_connection) + { + DataTable dt = new DataTable(); ; + var dbSetting = GlobalConfig.ScpDatabase; + try + { + + switch (p_connection) + { + case DB_CONNECTION.AppBoxDB: + dbSetting = GlobalConfig.AppBoxDatabase; + break; + case DB_CONNECTION.DataCenterDB: + dbSetting = GlobalConfig.DataCenterDB; + break; + case DB_CONNECTION.ExchangeCenterDB: + dbSetting = GlobalConfig.ExchangeCenterDB; + break; + case DB_CONNECTION.ScpDB: + dbSetting = GlobalConfig.ScpDatabase; + break; + case DB_CONNECTION.UniApiDB: + dbSetting = GlobalConfig.UniApiDatabase; + break; + case DB_CONNECTION.WmsDB: + dbSetting = GlobalConfig.WmsDatabase; + break; + + } + + var strConn = EntitiesFactory.GetEfConnectionString(dbSetting); + SqlConnection conn = new System.Data.SqlClient.SqlConnection(); + //conn.ConnectionString = db.Database.Connection.ConnectionString; + + conn.ConnectionString = strConn; + + if (conn.State != ConnectionState.Open) + { + conn.Open(); + } + SqlCommand cmd = new SqlCommand(); + + cmd.Connection = conn; + string _sql = "select NAME from sysobjects where xtype in ('u','v')"; + + cmd.CommandText = _sql; + + SqlDataAdapter adapter = new SqlDataAdapter(cmd); + + adapter.Fill(dt); + conn.Close(); + + } + catch (SqlException ex) + { + throw new Exception($"系统无法连接到数据库:{dbSetting},请检查配置的服务器,数据库,用户名和密码等信息是否正确。{Environment.NewLine}{ex}"); + } + return dt; + } + + public static DataTable Get_EC_COLUMNS_List(string p_tableName) + { + DataTable dt = new DataTable(); ; + var dbSetting = GlobalConfig.ExchangeCenterDB; + try + { + + var strConn = EntitiesFactory.GetEfConnectionString(dbSetting); + SqlConnection conn = new System.Data.SqlClient.SqlConnection(); + //conn.ConnectionString = db.Database.Connection.ConnectionString; + + conn.ConnectionString = strConn; + + if (conn.State != ConnectionState.Open) + { + conn.Open(); + } + SqlCommand cmd = new SqlCommand(); + + cmd.Connection = conn; + string _sql = string.Format("SELECT COLUMN_NAME,DATA_TYPE FROM INFORMATION_SCHEMA.columns WHERE TABLE_NAME='{0}'", p_tableName); + + cmd.CommandText = _sql; + + SqlDataAdapter adapter = new SqlDataAdapter(cmd); + + adapter.Fill(dt); + conn.Close(); + + } + catch (SqlException ex) + { + throw new Exception($"系统无法连接到数据库:{dbSetting},请检查配置的服务器,数据库,用户名和密码等信息是否正确。{Environment.NewLine}{ex}"); + } + return dt; + } + + + + + public static DataTable Get_EC_COLUMNS_List(DB_CONNECTION p_connection,string p_tableName) + { + DataTable dt = new DataTable(); + dt.TableName = p_tableName; + + var dbSetting = GlobalConfig.ScpDatabase; + + try + { + switch (p_connection) + { + case DB_CONNECTION.AppBoxDB: + dbSetting = GlobalConfig.AppBoxDatabase; + break; + case DB_CONNECTION.DataCenterDB: + dbSetting = GlobalConfig.DataCenterDB; + break; + case DB_CONNECTION.ExchangeCenterDB: + dbSetting = GlobalConfig.ExchangeCenterDB; + break; + case DB_CONNECTION.ScpDB: + dbSetting = GlobalConfig.ScpDatabase; + break; + case DB_CONNECTION.UniApiDB: + dbSetting = GlobalConfig.UniApiDatabase; + break; + case DB_CONNECTION.WmsDB: + dbSetting = GlobalConfig.WmsDatabase; + break; + + } + + var strConn = EntitiesFactory.GetEfConnectionString(dbSetting); + SqlConnection conn = new System.Data.SqlClient.SqlConnection(); + //conn.ConnectionString = db.Database.Connection.ConnectionString; + + conn.ConnectionString = strConn; + + if (conn.State != ConnectionState.Open) + { + conn.Open(); + } + SqlCommand cmd = new SqlCommand(); + + cmd.Connection = conn; + string _sql = string.Format("SELECT COLUMN_NAME,DATA_TYPE,IS_NULLABLE FROM INFORMATION_SCHEMA.columns WHERE TABLE_NAME='{0}'", p_tableName); + + cmd.CommandText = _sql; + + SqlDataAdapter adapter = new SqlDataAdapter(cmd); + + adapter.Fill(dt); + conn.Close(); + + } + catch (SqlException ex) + { + throw new Exception($"系统无法连接到数据库:{dbSetting},请检查配置的服务器,数据库,用户名和密码等信息是否正确。{Environment.NewLine}{ex}"); + } + return dt; + } + public static DataTable Get_EC_TABLE_List(string p_tableName) + { + DataTable dt = new DataTable(); ; + var dbSetting = GlobalConfig.ExchangeCenterDB; + try + { + + var strConn = EntitiesFactory.GetEfConnectionString(dbSetting); + SqlConnection conn = new System.Data.SqlClient.SqlConnection(); + //conn.ConnectionString = db.Database.Connection.ConnectionString; + + conn.ConnectionString = strConn; + + if (conn.State != ConnectionState.Open) + { + conn.Open(); + } + SqlCommand cmd = new SqlCommand(); + + cmd.Connection = conn; + string _sql = string.Format("SELECT * FROM {0}", p_tableName); + + cmd.CommandText = _sql; + + SqlDataAdapter adapter = new SqlDataAdapter(cmd); + + adapter.Fill(dt); + conn.Close(); + + } + catch (SqlException ex) + { + throw new Exception($"系统无法连接到数据库:{dbSetting},请检查配置的服务器,数据库,用户名和密码等信息是否正确。{Environment.NewLine}{ex}"); + } + return dt; + } + + + public static void Get_TEA_TASK_SUB_List(TEA_TASK_SUB p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + IQueryable q = db.TEA_TASK_SUB; + if (!string.IsNullOrEmpty(p_entity.TableName)) + { + q = q.Where(p => p.TableName.Contains(p_entity.TableName)); + } + if (!string.IsNullOrEmpty(p_entity.Creator)) + { + q = q.Where(p => p.Creator.Contains(p_entity.Creator)); + } + if (p_entity.DataCount != 0) + { + q = q.Where(p => p.DataCount == p_entity.DataCount); + } + if (!string.IsNullOrEmpty(p_entity.Subscriber)) + { + q = q.Where(p => p.Subscriber.Contains(p_entity.Subscriber)); + } + if (p_entity.FailedCount != 0) + { + q = q.Where(p => p.FailedCount == p_entity.FailedCount); + } + if (!string.IsNullOrEmpty(p_entity.FailedInfo)) + { + q = q.Where(p => p.FailedInfo.Contains(p_entity.FailedInfo)); + } + if (!string.IsNullOrEmpty(p_entity.Domain)) + { + q = q.Where(p => p.Domain.Contains(p_entity.Domain)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.UpdateUser)) + { + q = q.Where(p => p.UpdateUser.Contains(p_entity.UpdateUser)); + } + if (p_entity.TaskList.Count > 0) + { + q = q.Where(p => p_entity.TaskList.Contains(p.TaskState)); + } + if (p_entity.TaskID != Guid.Empty) + { + q = q.Where(p => p_entity.TaskID == p.TaskID); + } + + if (p_entity.BeginTime != null) + { + q = q.Where(p => p_entity.BeginTime.Value <= p.CreateTime); + } + if (p_entity.EndTime != null) + { + q = q.Where(p => p_entity.EndTime >= p.CreateTime); + } + + _ret.Result = q; + _ret.State = ReturnStatus.Succeed; + p_action(_ret); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "Get_TEA_TASK_SUB_List", e.Message); + throw e; + } + + } + + + public static ResultObject Save_TEA_TASK_SUB(List p_listUid, EnumTaskState p_state) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + var _lst = db.TEA_TASK_SUB.Where(p => p_listUid.Contains(p.UID)).ToList(); + foreach (var itm in _lst) + { + itm.TaskState = p_state; + db.TEA_TASK_SUB.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "Save_TEA_TASK_SUB", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public ResultObject Del_TEA_TASK_SUB(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TEA_TASK_SUB.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "Del_TEA_TASK_SUB", e.Message); throw e; + } + return _ret; + } + + public static ResultObject> Get_TEA_SUBSCRIBE_List(TEA_SUBSCRIBE p_entity) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + IQueryable q = db.TEA_SUBSCRIBE; + if (!string.IsNullOrEmpty(p_entity.TableName)) + { + q = q.Where(p => p.TableName.Contains(p_entity.TableName)); + } + + if (!string.IsNullOrEmpty(p_entity.Subscriber)) + { + q = q.Where(p => p.Subscriber.Contains(p_entity.Subscriber)); + } + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.ToList(); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_SUBSCRIBE), "Get_TEA_SUBSCRIBE_List", e.Message); + throw e; + } + return _ret; + } + + + public static ResultObject Save_TEA_SUBSCRIBE(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TEA_SUBSCRIBE.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_SUBSCRIBE), "Save_TEA_SUBSCRIBE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public static ResultObject Del_TEA_SUBSCRIBE(List p_list) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + + var _entitys= db.TEA_SUBSCRIBE.Where(p => p_list.Contains(p.UID)).ToList(); + + + foreach (var itm in _entitys) + { + db.TEA_SUBSCRIBE.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_SUBSCRIBE), "Del_TEA_SUBSCRIBE", e.Message); throw e; + } + return _ret; + } + + + + + + } + +} diff --git a/北京北汽/SCP/Controller/EC_CONTROLLER_ASN.cs b/北京北汽/SCP/Controller/EC_CONTROLLER_ASN.cs new file mode 100644 index 0000000..c20e46a --- /dev/null +++ b/北京北汽/SCP/Controller/EC_CONTROLLER_ASN.cs @@ -0,0 +1,192 @@ +using CK.SCP.Models; +using CK.SCP.Models.ExchangeCenterTables; +using CK.SCP.Utils; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.Entity.Migrations; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ + public class UN_EC_CONTROLLER_ASN + { + public static void Get_TED_ASN_MSTR_List(TED_ASN_MSTR p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + IQueryable q = db.TED_ASN_MSTR; + if (!string.IsNullOrEmpty(p_entity.ASN)) + { + q = q.Where(p => p.ASN.Contains(p_entity.ASN)); + } + if (!string.IsNullOrEmpty(p_entity.KanbanBillNum)) + { + q = q.Where(p => p.KanbanBillNum.Contains(p_entity.KanbanBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.PurchaseOrder)) + { + q = q.Where(p => p.PurchaseOrder.Contains(p_entity.PurchaseOrder)); + } + if (!string.IsNullOrEmpty(p_entity.Supplier)) + { + q = q.Where(p => p.Supplier.Contains(p_entity.Supplier)); + } + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CommandType)) + { + q = q.Where(p => p.CommandType.Contains(p_entity.CommandType)); + } + if (!string.IsNullOrEmpty(p_entity.Domain)) + { + q = q.Where(p => p.Domain.Contains(p_entity.Domain)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + _ret.Result = q; + _ret.State = ReturnStatus.Succeed; + p_action(_ret); + + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TED_ASN_MSTR), "Get_TED_ASN_MSTR_List", e.Message); + throw e; + } + + } + public static DataTable Get_EC_TASK_List(string p_ASN,string p_tableName,string p_TaskID) + { + DataTable dt = new DataTable(); ; + var dbSetting = GlobalConfig.ExchangeCenterDB; + try + { + + var strConn = EntitiesFactory.GetEfConnectionString(dbSetting); + SqlConnection conn = new System.Data.SqlClient.SqlConnection(); + //conn.ConnectionString = db.Database.Connection.ConnectionString; + + conn.ConnectionString = strConn; + + if (conn.State != ConnectionState.Open) + { + conn.Open(); + } + SqlCommand cmd = new SqlCommand(); + + cmd.Connection = conn; + string _sql = string.Format("select * from {0} where ASN='{1}'and TaskID='{2}'", p_tableName, p_ASN, p_TaskID); + + cmd.CommandText = _sql; + + SqlDataAdapter adapter = new SqlDataAdapter(cmd); + + adapter.Fill(dt); + + } + catch (SqlException ex) + { + throw new Exception($"系统无法连接到数据库:{dbSetting},请检查配置的服务器,数据库,用户名和密码等信息是否正确。{Environment.NewLine}{ex}"); + } + return dt; + } + + + public static ResultObject Save_TED_ASN_MSTR(List p_listUid, EnumTaskState p_state) + { + + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + var _lst = db.TED_ASN_MSTR.Where(p => p_listUid.Contains(p.UID)).ToList(); + foreach (var itm in _lst) + { + db.TED_ASN_MSTR.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TED_ASN_MSTR), "Save_TED_ASN_MSTR", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + + } + public ResultObject Del_TED_ASN_MSTR(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TED_ASN_MSTR.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TED_ASN_MSTR), "Del_TED_ASN_MSTR", e.Message); throw e; + } + return _ret; + } + + } + + + + + +} diff --git a/北京北汽/SCP/Controller/EC_CONTROLLER_BK.cs b/北京北汽/SCP/Controller/EC_CONTROLLER_BK.cs new file mode 100644 index 0000000..f942ffa --- /dev/null +++ b/北京北汽/SCP/Controller/EC_CONTROLLER_BK.cs @@ -0,0 +1,194 @@ +using CK.SCP.Models; +using CK.SCP.Models.ExchangeCenterTables; +using CK.SCP.Utils; +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ + public class UN_EC_CONTROLLER_BK + { + public static void Get_TED_BK_DET_List(TED_BK_DET p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + IQueryable q = db.TED_BK_DET; + if (!string.IsNullOrEmpty(p_entity.BackFlushBillNum)) + { + q = q.Where(p => p.BackFlushBillNum.Contains(p_entity.BackFlushBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (p_entity.Operation != 0) + { + q = q.Where(p => p.Operation == p_entity.Operation); + } + if (!string.IsNullOrEmpty(p_entity.Line)) + { + q = q.Where(p => p.Line.Contains(p_entity.Line)); + } + if (!string.IsNullOrEmpty(p_entity.Lot)) + { + q = q.Where(p => p.Lot.Contains(p_entity.Lot)); + } + if (p_entity.Quantity != 0) + { + q = q.Where(p => p.Quantity == p_entity.Quantity); + } + if (!string.IsNullOrEmpty(p_entity.Location)) + { + q = q.Where(p => p.Location.Contains(p_entity.Location)); + } + if (!string.IsNullOrEmpty(p_entity.Um)) + { + q = q.Where(p => p.Um.Contains(p_entity.Um)); + } + if (!string.IsNullOrEmpty(p_entity.BKType)) + { + q = q.Where(p => p.BKType.Contains(p_entity.BKType)); + } + + if (!string.IsNullOrEmpty(p_entity.Remarks)) + { + q = q.Where(p => p.Remarks.Contains(p_entity.Remarks)); + } + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CommandType)) + { + q = q.Where(p => p.CommandType.Contains(p_entity.CommandType)); + } + if (!string.IsNullOrEmpty(p_entity.Domain)) + { + q = q.Where(p => p.Domain.Contains(p_entity.Domain)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (p_entity.GUID != Guid.Empty) + { + q = q.Where(p => p.GUID == p_entity.GUID); + } + if (p_entity.TaskID != Guid.Empty) + { + q = q.Where(p => p.TaskID == p_entity.TaskID); + } + if (p_entity.DataID != Guid.Empty) + { + q = q.Where(p => p.DataID == p_entity.DataID); + } + if (p_entity.CreateTime != DateTime.MinValue) + { + + q = q.Where(p => p.CreateTime.Year == p_entity.CreateTime.Year && p.CreateTime.Day == p_entity.CreateTime.Day && p.CreateTime.Month == p_entity.CreateTime.Month); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TED_BK_DET), "Get_TED_BK_DET_List", e.Message); + throw e; + } + + } + + + public static ResultObject Save_TED_BK_DET(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TED_BK_DET.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TED_BK_DET), "Save_TED_BK_DET", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public ResultObject Del_TED_BK_DET(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TED_BK_DET.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TED_BK_DET), "Del_TED_BK_DET", e.Message); throw e; + } + return _ret; + } + + + + + } +} diff --git a/北京北汽/SCP/Controller/EC_CONTROLLER_BOM.cs b/北京北汽/SCP/Controller/EC_CONTROLLER_BOM.cs new file mode 100644 index 0000000..137ed17 --- /dev/null +++ b/北京北汽/SCP/Controller/EC_CONTROLLER_BOM.cs @@ -0,0 +1,214 @@ +using CK.SCP.Models; +using CK.SCP.Models.ExchangeCenterTables; +using CK.SCP.Utils; +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ + public class UN_EC_CONTROLLER_BOM + { + public static void Get_TES_BOM_List(TES_BOM p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + IQueryable q = db.TES_BOM; + if (!string.IsNullOrEmpty(p_entity.ParentPart)) + { + q = q.Where(p => p.ParentPart.Contains(p_entity.ParentPart)); + } + if (!string.IsNullOrEmpty(p_entity.ComponentPart)) + { + q = q.Where(p => p.ComponentPart.Contains(p_entity.ComponentPart)); + } + if (!string.IsNullOrEmpty(p_entity.Reference)) + { + q = q.Where(p => p.Reference.Contains(p_entity.Reference)); + } + if (p_entity.QuantityPer != 0) + { + q = q.Where(p => p.QuantityPer == p_entity.QuantityPer); + } + if (!string.IsNullOrEmpty(p_entity.StructureType)) + { + q = q.Where(p => p.StructureType.Contains(p_entity.StructureType)); + } + if (!string.IsNullOrEmpty(p_entity.Remarks)) + { + q = q.Where(p => p.Remarks.Contains(p_entity.Remarks)); + } + if (!string.IsNullOrEmpty(p_entity.EndEffective)) + { + q = q.Where(p => p.EndEffective.Contains(p_entity.EndEffective)); + } + if (p_entity.Scrap != 0) + { + q = q.Where(p => p.Scrap == p_entity.Scrap); + } + if (p_entity.LeadTimeOffset != 0) + { + q = q.Where(p => p.LeadTimeOffset == p_entity.LeadTimeOffset); + } + if (p_entity.Operation != 0) + { + q = q.Where(p => p.Operation == p_entity.Operation); + } + if (p_entity.SequenceNumber != 0) + { + q = q.Where(p => p.SequenceNumber == p_entity.SequenceNumber); + } + if (p_entity.FporecastPercent != 0) + { + q = q.Where(p => p.FporecastPercent == p_entity.FporecastPercent); + } + if (!string.IsNullOrEmpty(p_entity.OptionGroup)) + { + q = q.Where(p => p.OptionGroup.Contains(p_entity.OptionGroup)); + } + if (!string.IsNullOrEmpty(p_entity.Process)) + { + q = q.Where(p => p.Process.Contains(p_entity.Process)); + } + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CommandType)) + { + q = q.Where(p => p.CommandType.Contains(p_entity.CommandType)); + } + if (!string.IsNullOrEmpty(p_entity.Domain)) + { + q = q.Where(p => p.Domain.Contains(p_entity.Domain)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (p_entity.GUID != Guid.Empty) + { + q = q.Where(p => p.GUID == p_entity.GUID); + } + if (p_entity.TaskID != Guid.Empty) + { + q = q.Where(p => p.TaskID == p_entity.TaskID); + } + if (p_entity.DataID != Guid.Empty) + { + q = q.Where(p => p.DataID == p_entity.DataID); + } + if (p_entity.CreateTime != DateTime.MinValue) + { + + q = q.Where(p => p.CreateTime.Year == p_entity.CreateTime.Year && p.CreateTime.Day == p_entity.CreateTime.Day && p.CreateTime.Month == p_entity.CreateTime.Month); + } + if (p_entity.StartEffective != DateTime.MinValue) + { + + q = q.Where(p => p.StartEffective.Year == p_entity.StartEffective.Year && p.StartEffective.Day == p_entity.StartEffective.Day && p.StartEffective.Month == p_entity.StartEffective.Month); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TES_BOM), "Get_TES_BOM_List", e.Message); + throw e; + } + + } + + + public static ResultObject Save_TES_BOM(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TES_BOM.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TES_BOM), "Save_TES_BOM", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public ResultObject Del_TES_BOM(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TES_BOM.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TES_BOM), "Del_TES_BOM", e.Message); throw e; + } + return _ret; + } + + + + + } +} diff --git a/北京北汽/SCP/Controller/EC_CONTROLLER_INVOICE.cs b/北京北汽/SCP/Controller/EC_CONTROLLER_INVOICE.cs new file mode 100644 index 0000000..5e8f5aa --- /dev/null +++ b/北京北汽/SCP/Controller/EC_CONTROLLER_INVOICE.cs @@ -0,0 +1,343 @@ +using CK.SCP.Models; +using CK.SCP.Models.ExchangeCenterTables; +using CK.SCP.Utils; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.Entity.Migrations; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ + public class UN_EC_CONTROLLER_INVOICE + { + + + public static void Get_TED_INVOICE_MSTR_List(TED_INVOICE_MSTR p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + IQueryable q = db.TED_INVOICE_MSTR; + if (!string.IsNullOrEmpty(p_entity.Status)) + { + q = q.Where(p => p.Status.Contains(p_entity.Status)); + } + if (p_entity.Invoice_ID != 0) + { + q = q.Where(p => p.Invoice_ID == p_entity.Invoice_ID); + } + if (!string.IsNullOrEmpty(p_entity.InvoiceReference)) + { + q = q.Where(p => p.InvoiceReference.Contains(p_entity.InvoiceReference)); + } + if (!string.IsNullOrEmpty(p_entity.PurchaseOrder)) + { + q = q.Where(p => p.PurchaseOrder.Contains(p_entity.PurchaseOrder)); + } + if (!string.IsNullOrEmpty(p_entity.ReceiveNbr)) + { + q = q.Where(p => p.ReceiveNbr.Contains(p_entity.ReceiveNbr)); + } + if (p_entity.CreateInvoice != false) + { + q = q.Where(p => p.CreateInvoice == p_entity.CreateInvoice); + } + if (!string.IsNullOrEmpty(p_entity.Supplier)) + { + q = q.Where(p => p.Supplier.Contains(p_entity.Supplier)); + } + if (!string.IsNullOrEmpty(p_entity.SupplierName)) + { + q = q.Where(p => p.SupplierName.Contains(p_entity.SupplierName)); + } + if (!string.IsNullOrEmpty(p_entity.AddressStreet1)) + { + q = q.Where(p => p.AddressStreet1.Contains(p_entity.AddressStreet1)); + } + if (!string.IsNullOrEmpty(p_entity.AddressStreet2)) + { + q = q.Where(p => p.AddressStreet2.Contains(p_entity.AddressStreet2)); + } + if (!string.IsNullOrEmpty(p_entity.AddressStreet3)) + { + q = q.Where(p => p.AddressStreet3.Contains(p_entity.AddressStreet3)); + } + if (!string.IsNullOrEmpty(p_entity.City)) + { + q = q.Where(p => p.City.Contains(p_entity.City)); + } + if (!string.IsNullOrEmpty(p_entity.StateCode)) + { + q = q.Where(p => p.StateCode.Contains(p_entity.StateCode)); + } + if (!string.IsNullOrEmpty(p_entity.ZIP)) + { + q = q.Where(p => p.ZIP.Contains(p_entity.ZIP)); + } + if (!string.IsNullOrEmpty(p_entity.Format)) + { + q = q.Where(p => p.Format.Contains(p_entity.Format)); + } + if (!string.IsNullOrEmpty(p_entity.Country)) + { + q = q.Where(p => p.Country.Contains(p_entity.Country)); + } + if (!string.IsNullOrEmpty(p_entity.County)) + { + q = q.Where(p => p.County.Contains(p_entity.County)); + } + if (!string.IsNullOrEmpty(p_entity.Currency)) + { + q = q.Where(p => p.Currency.Contains(p_entity.Currency)); + } + if (!string.IsNullOrEmpty(p_entity.OwnBank)) + { + q = q.Where(p => p.OwnBank.Contains(p_entity.OwnBank)); + } + if (!string.IsNullOrEmpty(p_entity.PaymentCondCode)) + { + q = q.Where(p => p.PaymentCondCode.Contains(p_entity.PaymentCondCode)); + } + if (!string.IsNullOrEmpty(p_entity.InvoiceControlGLCode)) + { + q = q.Where(p => p.InvoiceControlGLCode.Contains(p_entity.InvoiceControlGLCode)); + } + if (!string.IsNullOrEmpty(p_entity.InvoiceCostCentreCode)) + { + q = q.Where(p => p.InvoiceCostCentreCode.Contains(p_entity.InvoiceCostCentreCode)); + } + if (!string.IsNullOrEmpty(p_entity.InvoiceDiscountGLCode)) + { + q = q.Where(p => p.InvoiceDiscountGLCode.Contains(p_entity.InvoiceDiscountGLCode)); + } + if (!string.IsNullOrEmpty(p_entity.InvoiceDiscountCostCentre)) + { + q = q.Where(p => p.InvoiceDiscountCostCentre.Contains(p_entity.InvoiceDiscountCostCentre)); + } + if (!string.IsNullOrEmpty(p_entity.CompanyCode)) + { + q = q.Where(p => p.CompanyCode.Contains(p_entity.CompanyCode)); + } + if (!string.IsNullOrEmpty(p_entity.InvoiceRemark)) + { + q = q.Where(p => p.InvoiceRemark.Contains(p_entity.InvoiceRemark)); + } + if (!string.IsNullOrEmpty(p_entity.InvoiceBankNbr)) + { + q = q.Where(p => p.InvoiceBankNbr.Contains(p_entity.InvoiceBankNbr)); + } + if (!string.IsNullOrEmpty(p_entity.InvoiceCheckForm)) + { + q = q.Where(p => p.InvoiceCheckForm.Contains(p_entity.InvoiceCheckForm)); + } + if (p_entity.InvoiceIsHoldAmount != false) + { + q = q.Where(p => p.InvoiceIsHoldAmount == p_entity.InvoiceIsHoldAmount); + } + if (p_entity.InvoiceHoldAmountTC != 0) + { + q = q.Where(p => p.InvoiceHoldAmountTC == p_entity.InvoiceHoldAmountTC); + } + if (p_entity.InvoiceIsStatusFinal != false) + { + q = q.Where(p => p.InvoiceIsStatusFinal == p_entity.InvoiceIsStatusFinal); + } + if (!string.IsNullOrEmpty(p_entity.InvoiceDivisionCode)) + { + q = q.Where(p => p.InvoiceDivisionCode.Contains(p_entity.InvoiceDivisionCode)); + } + if (!string.IsNullOrEmpty(p_entity.InvoiceDiscountDivision)) + { + q = q.Where(p => p.InvoiceDiscountDivision.Contains(p_entity.InvoiceDiscountDivision)); + } + if (!string.IsNullOrEmpty(p_entity.Rowid)) + { + q = q.Where(p => p.Rowid.Contains(p_entity.Rowid)); + } + if (!string.IsNullOrEmpty(p_entity.ParentRowid)) + { + q = q.Where(p => p.ParentRowid.Contains(p_entity.ParentRowid)); + } + if (p_entity.InvoicePostingYear != 0) + { + q = q.Where(p => p.InvoicePostingYear == p_entity.InvoicePostingYear); + } + if (!string.IsNullOrEmpty(p_entity.JournalCode)) + { + q = q.Where(p => p.JournalCode.Contains(p_entity.JournalCode)); + } + if (p_entity.InvoiceVoucher != 0) + { + q = q.Where(p => p.InvoiceVoucher == p_entity.InvoiceVoucher); + } + if (p_entity.APMatchingIsStatusFinal != false) + { + q = q.Where(p => p.APMatchingIsStatusFinal == p_entity.APMatchingIsStatusFinal); + } + if (p_entity.InvoiceRegistrationNbr != 0) + { + q = q.Where(p => p.InvoiceRegistrationNbr == p_entity.InvoiceRegistrationNbr); + } + if (!string.IsNullOrEmpty(p_entity.InvoiceTSMNumber)) + { + q = q.Where(p => p.InvoiceTSMNumber.Contains(p_entity.InvoiceTSMNumber)); + } + if (p_entity.CreateWithAmountIsTax != false) + { + q = q.Where(p => p.CreateWithAmountIsTax == p_entity.CreateWithAmountIsTax); + } + if (p_entity.InvoiceAmountTC != 0) + { + q = q.Where(p => p.InvoiceAmountTC == p_entity.InvoiceAmountTC); + } + if (p_entity.InvoiceIsTaxable != false) + { + q = q.Where(p => p.InvoiceIsTaxable == p_entity.InvoiceIsTaxable); + } + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CommandType)) + { + q = q.Where(p => p.CommandType.Contains(p_entity.CommandType)); + } + if (!string.IsNullOrEmpty(p_entity.Domain)) + { + q = q.Where(p => p.Domain.Contains(p_entity.Domain)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (!string.IsNullOrEmpty(p_entity.CInvoiceReference)) + { + q = q.Where(p => p.CInvoiceReference.Contains(p_entity.CInvoiceReference)); + } + if (!string.IsNullOrEmpty(p_entity.CInvoiceDescription)) + { + q = q.Where(p => p.CInvoiceDescription.Contains(p_entity.CInvoiceDescription)); + } + if (!string.IsNullOrEmpty(p_entity.CInvoiceType)) + { + q = q.Where(p => p.CInvoiceType.Contains(p_entity.CInvoiceType)); + } + if (!string.IsNullOrEmpty(p_entity.CInvoiceCostCenterCode)) + { + q = q.Where(p => p.CInvoiceCostCenterCode.Contains(p_entity.CInvoiceCostCenterCode)); + } + if (!string.IsNullOrEmpty(p_entity.CInvoiceDivisionCode)) + { + q = q.Where(p => p.CInvoiceDivisionCode.Contains(p_entity.CInvoiceDivisionCode)); + } + + _ret.Result = q; + _ret.State = ReturnStatus.Succeed; + p_action(_ret); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TED_INVOICE_MSTR), "Get_TED_INVOICE_MSTR_List", e.Message); + throw e; + } + + } + + + public static DataTable Get_TED_INVOICE_MSTR_List( string p_tableName, string p_TaskID) + { + DataTable dt = new DataTable(); ; + var dbSetting = GlobalConfig.ExchangeCenterDB; + try + { + + var strConn = EntitiesFactory.GetEfConnectionString(dbSetting); + SqlConnection conn = new System.Data.SqlClient.SqlConnection(); + conn.ConnectionString = strConn; + + if (conn.State != ConnectionState.Open) + { + conn.Open(); + } + SqlCommand cmd = new SqlCommand(); + + cmd.Connection = conn; + string _sql = string.Format("select * from {0} where TaskID='{1}'", p_tableName, p_TaskID); + + cmd.CommandText = _sql; + + SqlDataAdapter adapter = new SqlDataAdapter(cmd); + + adapter.Fill(dt); + + } + catch (SqlException ex) + { + throw new Exception($"系统无法连接到数据库:{dbSetting},请检查配置的服务器,数据库,用户名和密码等信息是否正确。{Environment.NewLine}{ex}"); + } + return dt; + } + + + + public static ResultObject Save_TED_INVOICE_DET(int p_listUid, Decimal MatchQuantity, Decimal MatchPrice) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + var _lst = db.TED_INVOICE_DET.Where(p => p.UID == p_listUid).ToList(); + foreach (var itm in _lst) + { + itm.MatchPrice = MatchPrice; + itm.MatchQuantity = MatchQuantity; + db.TED_INVOICE_DET.AddOrUpdate(itm); + + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TED_INVOICE_MSTR), "Save_TED_INVOICE_MSTR", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + + + } +} diff --git a/北京北汽/SCP/Controller/EC_CONTROLLER_PART.cs b/北京北汽/SCP/Controller/EC_CONTROLLER_PART.cs new file mode 100644 index 0000000..317b62e --- /dev/null +++ b/北京北汽/SCP/Controller/EC_CONTROLLER_PART.cs @@ -0,0 +1,254 @@ +using CK.SCP.Models; +using CK.SCP.Models.ExchangeCenterTables; +using CK.SCP.Utils; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.Entity.Migrations; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ + public class UN_EC_CONTROLLER_PART + { + public static void Get_TES_PART_MSTR_List(TES_PART_MSTR p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + IQueryable q = db.TES_PART_MSTR; + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.Desc1)) + { + q = q.Where(p => p.Desc1.Contains(p_entity.Desc1)); + } + if (!string.IsNullOrEmpty(p_entity.Desc2)) + { + q = q.Where(p => p.Desc2.Contains(p_entity.Desc2)); + } + if (!string.IsNullOrEmpty(p_entity.Um)) + { + q = q.Where(p => p.Um.Contains(p_entity.Um)); + } + if (!string.IsNullOrEmpty(p_entity.ProdLine)) + { + q = q.Where(p => p.ProdLine.Contains(p_entity.ProdLine)); + } + if (!string.IsNullOrEmpty(p_entity.DsgnGroup)) + { + q = q.Where(p => p.DsgnGroup.Contains(p_entity.DsgnGroup)); + } + if (!string.IsNullOrEmpty(p_entity.PromotionGroup)) + { + q = q.Where(p => p.PromotionGroup.Contains(p_entity.PromotionGroup)); + } + if (!string.IsNullOrEmpty(p_entity.PartType)) + { + q = q.Where(p => p.PartType.Contains(p_entity.PartType)); + } + if (!string.IsNullOrEmpty(p_entity.Status)) + { + q = q.Where(p => p.Status.Contains(p_entity.Status)); + } + if (!string.IsNullOrEmpty(p_entity.Group)) + { + q = q.Where(p => p.Group.Contains(p_entity.Group)); + } + if (!string.IsNullOrEmpty(p_entity.Drawing)) + { + q = q.Where(p => p.Drawing.Contains(p_entity.Drawing)); + } + if (!string.IsNullOrEmpty(p_entity.PartRevision)) + { + q = q.Where(p => p.PartRevision.Contains(p_entity.PartRevision)); + } + if (!string.IsNullOrEmpty(p_entity.DrawingLocation)) + { + q = q.Where(p => p.DrawingLocation.Contains(p_entity.DrawingLocation)); + } + if (!string.IsNullOrEmpty(p_entity.Size)) + { + q = q.Where(p => p.Size.Contains(p_entity.Size)); + } + if (!string.IsNullOrEmpty(p_entity.PriceBreakCategory)) + { + q = q.Where(p => p.PriceBreakCategory.Contains(p_entity.PriceBreakCategory)); + } + if (p_entity.AuxiliaryMaterial != false) + { + q = q.Where(p => p.AuxiliaryMaterial == p_entity.AuxiliaryMaterial); + } + if (!string.IsNullOrEmpty(p_entity.Qgrade)) + { + q = q.Where(p => p.Qgrade.Contains(p_entity.Qgrade)); + } + if (p_entity.WmsPartType != 0) + { + q = q.Where(p => p.WmsPartType == p_entity.WmsPartType); + } + if (!string.IsNullOrEmpty(p_entity.ManageWay)) + { + q = q.Where(p => p.ManageWay.Contains(p_entity.ManageWay)); + } + if (!string.IsNullOrEmpty(p_entity.InventoryCode)) + { + q = q.Where(p => p.InventoryCode.Contains(p_entity.InventoryCode)); + } + if (!string.IsNullOrEmpty(p_entity.ManageType)) + { + q = q.Where(p => p.ManageType.Contains(p_entity.ManageType)); + } + if (p_entity.InspectType != null) + { + q = q.Where(p => p.InspectType == p_entity.InspectType); + } + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CommandType)) + { + q = q.Where(p => p.CommandType.Contains(p_entity.CommandType)); + } + if (!string.IsNullOrEmpty(p_entity.Domain)) + { + q = q.Where(p => p.Domain.Contains(p_entity.Domain)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + _ret.Result = q; + _ret.State = ReturnStatus.Succeed; + p_action(_ret); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TES_PART_MSTR), "Get_TES_PART_MSTR_List", e.Message); + throw e; + } + + } + + public static DataTable Get_TES_PART_MSTR_List(string p_PartCode, string p_tableName) + { + DataTable dt = new DataTable(); ; + var dbSetting = GlobalConfig.ExchangeCenterDB; + try + { + var strConn = EntitiesFactory.GetEfConnectionString(dbSetting); + SqlConnection conn = new System.Data.SqlClient.SqlConnection(); + conn.ConnectionString = strConn; + if (conn.State != ConnectionState.Open) + { + conn.Open(); + } + SqlCommand cmd = new SqlCommand(); + cmd.Connection = conn; + string _sql = string.Format("select * from {0} where PartCode='{1}'", p_tableName, p_PartCode); + + cmd.CommandText = _sql; + + SqlDataAdapter adapter = new SqlDataAdapter(cmd); + + adapter.Fill(dt); + + } + catch (SqlException ex) + { + throw new Exception($"系统无法连接到数据库:{dbSetting},请检查配置的服务器,数据库,用户名和密码等信息是否正确。{Environment.NewLine}{ex}"); + } + return dt; + } + + public static ResultObject Save_TES_PART_MSTR(List p_listUid, EnumTaskState p_state) + { + + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + var _lst = db.TES_PART_MSTR.Where(p => p_listUid.Contains(p.UID)).ToList(); + foreach (var itm in _lst) + { + db.TES_PART_MSTR.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TES_PART_MSTR), "Save_TES_PART_MSTR", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + + } + public ResultObject Del_TES_PART_MSTR(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TES_PART_MSTR.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TES_PART_MSTR), "Del_TES_PART_MSTR", e.Message); throw e; + } + return _ret; + } + + + } +} diff --git a/北京北汽/SCP/Controller/EC_CONTROLLER_PART_DET.cs b/北京北汽/SCP/Controller/EC_CONTROLLER_PART_DET.cs new file mode 100644 index 0000000..ea3a738 --- /dev/null +++ b/北京北汽/SCP/Controller/EC_CONTROLLER_PART_DET.cs @@ -0,0 +1,377 @@ +using CK.SCP.Models; +using CK.SCP.Models.ExchangeCenterTables; +using CK.SCP.Utils; +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ + public class UN_EC_CONTROLLER_PART_DET + { + public static void Get_TES_PART_DET_List(TES_PART_DET p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + IQueryable q = db.TES_PART_DET; + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (!string.IsNullOrEmpty(p_entity.AbcClass)) + { + q = q.Where(p => p.AbcClass.Contains(p_entity.AbcClass)); + } + if (!string.IsNullOrEmpty(p_entity.LotControl)) + { + q = q.Where(p => p.LotControl.Contains(p_entity.LotControl)); + } + if (!string.IsNullOrEmpty(p_entity.Location)) + { + q = q.Where(p => p.Location.Contains(p_entity.Location)); + } + if (!string.IsNullOrEmpty(p_entity.LocationType)) + { + q = q.Where(p => p.LocationType.Contains(p_entity.LocationType)); + } + if (p_entity.AutoMaticLotNumbers != false) + { + q = q.Where(p => p.AutoMaticLotNumbers == p_entity.AutoMaticLotNumbers); + } + if (p_entity.AverageInterval != 0) + { + q = q.Where(p => p.AverageInterval == p_entity.AverageInterval); + } + if (p_entity.CycleCountInterval != 0) + { + q = q.Where(p => p.CycleCountInterval == p_entity.CycleCountInterval); + } + if (p_entity.ShelfLife != 0) + { + q = q.Where(p => p.ShelfLife == p_entity.ShelfLife); + } + if (p_entity.KeyPart != false) + { + q = q.Where(p => p.KeyPart == p_entity.KeyPart); + } + if (!string.IsNullOrEmpty(p_entity.PoReceiptStatus)) + { + q = q.Where(p => p.PoReceiptStatus.Contains(p_entity.PoReceiptStatus)); + } + if (p_entity.RctPoActive != false) + { + q = q.Where(p => p.RctPoActive == p_entity.RctPoActive); + } + if (!string.IsNullOrEmpty(p_entity.WoReceiptStatus)) + { + q = q.Where(p => p.WoReceiptStatus.Contains(p_entity.WoReceiptStatus)); + } + if (p_entity.RctWoActive != false) + { + q = q.Where(p => p.RctWoActive == p_entity.RctWoActive); + } + if (!string.IsNullOrEmpty(p_entity.MemoOrderType)) + { + q = q.Where(p => p.MemoOrderType.Contains(p_entity.MemoOrderType)); + } + if (p_entity.MasterSchedule != false) + { + q = q.Where(p => p.MasterSchedule == p_entity.MasterSchedule); + } + if (p_entity.PlanOrders != false) + { + q = q.Where(p => p.PlanOrders == p_entity.PlanOrders); + } + if (p_entity.TimeFence != 0) + { + q = q.Where(p => p.TimeFence == p_entity.TimeFence); + } + if (!string.IsNullOrEmpty(p_entity.OrderPolicy)) + { + q = q.Where(p => p.OrderPolicy.Contains(p_entity.OrderPolicy)); + } + if (p_entity.OrderQuantity != 0) + { + q = q.Where(p => p.OrderQuantity == p_entity.OrderQuantity); + } + if (p_entity.OrderPeriod != 0) + { + q = q.Where(p => p.OrderPeriod == p_entity.OrderPeriod); + } + if (p_entity.SafetyStock != 0) + { + q = q.Where(p => p.SafetyStock == p_entity.SafetyStock); + } + if (p_entity.SafetyTime != 0) + { + q = q.Where(p => p.SafetyTime == p_entity.SafetyTime); + } + if (p_entity.ReorderPoint != 0) + { + q = q.Where(p => p.ReorderPoint == p_entity.ReorderPoint); + } + if (!string.IsNullOrEmpty(p_entity.PlanningRev)) + { + q = q.Where(p => p.PlanningRev.Contains(p_entity.PlanningRev)); + } + if (p_entity.IssuePolicy != false) + { + q = q.Where(p => p.IssuePolicy == p_entity.IssuePolicy); + } + if (!string.IsNullOrEmpty(p_entity.BuyerPlanner)) + { + q = q.Where(p => p.BuyerPlanner.Contains(p_entity.BuyerPlanner)); + } + if (!string.IsNullOrEmpty(p_entity.Supplier)) + { + q = q.Where(p => p.Supplier.Contains(p_entity.Supplier)); + } + if (!string.IsNullOrEmpty(p_entity.PoSite)) + { + q = q.Where(p => p.PoSite.Contains(p_entity.PoSite)); + } + if (!string.IsNullOrEmpty(p_entity.PurMfg)) + { + q = q.Where(p => p.PurMfg.Contains(p_entity.PurMfg)); + } + if (!string.IsNullOrEmpty(p_entity.ConfigurationType)) + { + q = q.Where(p => p.ConfigurationType.Contains(p_entity.ConfigurationType)); + } + if (!string.IsNullOrEmpty(p_entity.InspectionLocation)) + { + q = q.Where(p => p.InspectionLocation.Contains(p_entity.InspectionLocation)); + } + if (p_entity.InspectionRequired != false) + { + q = q.Where(p => p.InspectionRequired == p_entity.InspectionRequired); + } + if (p_entity.InspectionLeadTime != 0) + { + q = q.Where(p => p.InspectionLeadTime == p_entity.InspectionLeadTime); + } + if (p_entity.CumulativeLeadTime != 0) + { + q = q.Where(p => p.CumulativeLeadTime == p_entity.CumulativeLeadTime); + } + if (p_entity.ManufacturingLedaTime != 0) + { + q = q.Where(p => p.ManufacturingLedaTime == p_entity.ManufacturingLedaTime); + } + if (p_entity.PurchaseLeadTime != 0) + { + q = q.Where(p => p.PurchaseLeadTime == p_entity.PurchaseLeadTime); + } + if (!string.IsNullOrEmpty(p_entity.AtpEnforcementLevel)) + { + q = q.Where(p => p.AtpEnforcementLevel.Contains(p_entity.AtpEnforcementLevel)); + } + if (p_entity.FamilyATP != false) + { + q = q.Where(p => p.FamilyATP == p_entity.FamilyATP); + } + if (p_entity.AtpHorizon != 0) + { + q = q.Where(p => p.AtpHorizon == p_entity.AtpHorizon); + } + if (!string.IsNullOrEmpty(p_entity.RunSeq1)) + { + q = q.Where(p => p.RunSeq1.Contains(p_entity.RunSeq1)); + } + if (!string.IsNullOrEmpty(p_entity.RunSeq2)) + { + q = q.Where(p => p.RunSeq2.Contains(p_entity.RunSeq2)); + } + if (p_entity.Phantom != false) + { + q = q.Where(p => p.Phantom == p_entity.Phantom); + } + if (p_entity.MinimumOrder != 0) + { + q = q.Where(p => p.MinimumOrder == p_entity.MinimumOrder); + } + if (p_entity.MaximumOrder != 0) + { + q = q.Where(p => p.MaximumOrder == p_entity.MaximumOrder); + } + if (p_entity.OrderMultiple != 0) + { + q = q.Where(p => p.OrderMultiple == p_entity.OrderMultiple); + } + if (p_entity.OperationBasedYield != false) + { + q = q.Where(p => p.OperationBasedYield == p_entity.OperationBasedYield); + } + if (p_entity.YieldPercent != 0) + { + q = q.Where(p => p.YieldPercent == p_entity.YieldPercent); + } + if (!string.IsNullOrEmpty(p_entity.RunTime)) + { + q = q.Where(p => p.RunTime.Contains(p_entity.RunTime)); + } + if (p_entity.SetupTime != 0) + { + q = q.Where(p => p.SetupTime == p_entity.SetupTime); + } + if (!string.IsNullOrEmpty(p_entity.EmtType)) + { + q = q.Where(p => p.EmtType.Contains(p_entity.EmtType)); + } + if (p_entity.AutomaticEmtProcessing != false) + { + q = q.Where(p => p.AutomaticEmtProcessing == p_entity.AutomaticEmtProcessing); + } + if (!string.IsNullOrEmpty(p_entity.NetWorkCode)) + { + q = q.Where(p => p.NetWorkCode.Contains(p_entity.NetWorkCode)); + } + if (!string.IsNullOrEmpty(p_entity.RoutingCode)) + { + q = q.Where(p => p.RoutingCode.Contains(p_entity.RoutingCode)); + } + if (!string.IsNullOrEmpty(p_entity.BomFormulaCode)) + { + q = q.Where(p => p.BomFormulaCode.Contains(p_entity.BomFormulaCode)); + } + if (!string.IsNullOrEmpty(p_entity.ReplenishmentMethod)) + { + q = q.Where(p => p.ReplenishmentMethod.Contains(p_entity.ReplenishmentMethod)); + } + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CommandType)) + { + q = q.Where(p => p.CommandType.Contains(p_entity.CommandType)); + } + if (!string.IsNullOrEmpty(p_entity.Domain)) + { + q = q.Where(p => p.Domain.Contains(p_entity.Domain)); + } + if (p_entity.GUID != Guid.Empty) + { + q = q.Where(p => p.GUID == p_entity.GUID); + } + if (p_entity.TaskID != Guid.Empty) + { + q = q.Where(p => p.TaskID == p_entity.TaskID); + } + if (p_entity.DataID != Guid.Empty) + { + q = q.Where(p => p.DataID == p_entity.DataID); + } + if (p_entity.CreateTime != DateTime.MinValue) + { + + q = q.Where(p => p.CreateTime.Year == p_entity.CreateTime.Year && p.CreateTime.Day == p_entity.CreateTime.Day && p.CreateTime.Month == p_entity.CreateTime.Month); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TES_PART_DET), "Get_TES_PART_DET_List", e.Message); + throw e; + } + + } + + + public static ResultObject Save_TES_PART_DET(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TES_PART_DET.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TES_PART_DET), "Save_TES_PART_DET", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public ResultObject Del_TES_PART_DET(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TES_PART_DET.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TES_PART_DET), "Del_TES_PART_DET", e.Message); throw e; + } + return _ret; + } + + + + + } +} diff --git a/北京北汽/SCP/Controller/EC_CONTROLLER_PO.cs b/北京北汽/SCP/Controller/EC_CONTROLLER_PO.cs new file mode 100644 index 0000000..a079a3b --- /dev/null +++ b/北京北汽/SCP/Controller/EC_CONTROLLER_PO.cs @@ -0,0 +1,228 @@ +using CK.SCP.Models; +using CK.SCP.Models.ExchangeCenterTables; +using CK.SCP.Utils; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.Entity.Migrations; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ + public class UN_EC_CONTROLLER_PO + { + + + + public static void Get_TED_PO_MSTR_List(TED_PO_MSTR p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + IQueryable q = db.TED_PO_MSTR; + if (!string.IsNullOrEmpty(p_entity.PurchaseOrder)) + { + q = q.Where(p => p.PurchaseOrder.Contains(p_entity.PurchaseOrder)); + } + if (!string.IsNullOrEmpty(p_entity.ModeType)) + { + q = q.Where(p => p.ModeType.Contains(p_entity.ModeType)); + } + if (!string.IsNullOrEmpty(p_entity.Supplier)) + { + q = q.Where(p => p.Supplier.Contains(p_entity.Supplier)); + } + if (!string.IsNullOrEmpty(p_entity.Contact)) + { + q = q.Where(p => p.Contact.Contains(p_entity.Contact)); + } + if (!string.IsNullOrEmpty(p_entity.ShipTo)) + { + q = q.Where(p => p.ShipTo.Contains(p_entity.ShipTo)); + } + if (!string.IsNullOrEmpty(p_entity.MadeIn)) + { + q = q.Where(p => p.MadeIn.Contains(p_entity.MadeIn)); + } + if (p_entity.Confirm != false) + { + q = q.Where(p => p.Confirm == p_entity.Confirm); + } + if (!string.IsNullOrEmpty(p_entity.Buyer)) + { + q = q.Where(p => p.Buyer.Contains(p_entity.Buyer)); + } + if (!string.IsNullOrEmpty(p_entity.BuyerPhone)) + { + q = q.Where(p => p.BuyerPhone.Contains(p_entity.BuyerPhone)); + } + if (p_entity.Status != 0) + { + q = q.Where(p => p.Status == p_entity.Status); + } + if (p_entity.ScheduledOrder != false) + { + q = q.Where(p => p.ScheduledOrder == p_entity.ScheduledOrder); + } + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CommandType)) + { + q = q.Where(p => p.CommandType.Contains(p_entity.CommandType)); + } + if (!string.IsNullOrEmpty(p_entity.Domain)) + { + q = q.Where(p => p.Domain.Contains(p_entity.Domain)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (!string.IsNullOrEmpty(p_entity.Pricelist)) + { + q = q.Where(p => p.Pricelist.Contains(p_entity.Pricelist)); + } + if (!string.IsNullOrEmpty(p_entity.Taxclass)) + { + q = q.Where(p => p.Taxclass.Contains(p_entity.Taxclass)); + } + + _ret.Result = q; + _ret.State = ReturnStatus.Succeed; + p_action(_ret); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TED_PO_MSTR), "Get_TED_PO_MSTR_List", e.Message); + throw e; + } + + } + public static DataTable Get_TED_PO_MSTR_List(string p_tableName, string p_TaskID) + { + DataTable dt = new DataTable(); ; + var dbSetting = GlobalConfig.ExchangeCenterDB; + try + { + + var strConn = EntitiesFactory.GetEfConnectionString(dbSetting); + SqlConnection conn = new System.Data.SqlClient.SqlConnection(); + //conn.ConnectionString = db.Database.Connection.ConnectionString; + + conn.ConnectionString = strConn; + + if (conn.State != ConnectionState.Open) + { + conn.Open(); + } + SqlCommand cmd = new SqlCommand(); + + cmd.Connection = conn; + string _sql = string.Format("select * from {0} where TaskID='{1}'", p_tableName, p_TaskID); + + cmd.CommandText = _sql; + + SqlDataAdapter adapter = new SqlDataAdapter(cmd); + + adapter.Fill(dt); + + } + catch (SqlException ex) + { + throw new Exception($"系统无法连接到数据库:{dbSetting},请检查配置的服务器,数据库,用户名和密码等信息是否正确。{Environment.NewLine}{ex}"); + } + return dt; + } + public static ResultObject Save_TED_PO_MSTR(List p_listUid, EnumTaskState p_state) + { + + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + var _lst = db.TED_PO_MSTR.Where(p => p_listUid.Contains(p.UID)).ToList(); + foreach (var itm in _lst) + { + db.TED_PO_MSTR.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TED_ASN_MSTR), "Save_TED_PO_MSTR", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + + } + + + + + + public ResultObject Del_TED_PO_MSTR(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TED_PO_MSTR.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TED_PO_MSTR), "Del_TED_PO_MSTR", e.Message); throw e; + } + return _ret; + } + } +} diff --git a/北京北汽/SCP/Controller/EC_CONTROLLER_RECEIPT.cs b/北京北汽/SCP/Controller/EC_CONTROLLER_RECEIPT.cs new file mode 100644 index 0000000..c1f023e --- /dev/null +++ b/北京北汽/SCP/Controller/EC_CONTROLLER_RECEIPT.cs @@ -0,0 +1,188 @@ +using CK.SCP.Models; +using CK.SCP.Models.ExchangeCenterTables; +using CK.SCP.Utils; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.Entity.Migrations; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ + public class UN_EC_CONTROLLER_RECEIPT + { + public static void Get_TED_RECEIPT_MSTR_List(TED_RECEIPT_MSTR p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + IQueryable q = db.TED_RECEIPT_MSTR; + if (!string.IsNullOrEmpty(p_entity.User)) + { + q = q.Where(p => p.User.Contains(p_entity.User)); + } + if (!string.IsNullOrEmpty(p_entity.ASN)) + { + q = q.Where(p => p.ASN.Contains(p_entity.ASN)); + } + if (!string.IsNullOrEmpty(p_entity.PurchaseOrder)) + { + q = q.Where(p => p.PurchaseOrder.Contains(p_entity.PurchaseOrder)); + } + if (!string.IsNullOrEmpty(p_entity.Supplier)) + { + q = q.Where(p => p.Supplier.Contains(p_entity.Supplier)); + } + if (!string.IsNullOrEmpty(p_entity.ReceiveNbr)) + { + q = q.Where(p => p.ReceiveNbr.Contains(p_entity.ReceiveNbr)); + } + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CommandType)) + { + q = q.Where(p => p.CommandType.Contains(p_entity.CommandType)); + } + if (!string.IsNullOrEmpty(p_entity.Domain)) + { + q = q.Where(p => p.Domain.Contains(p_entity.Domain)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + + _ret.Result = q; + _ret.State = ReturnStatus.Succeed; + p_action(_ret); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TED_RECEIPT_MSTR), "Get_TED_RECEIPT_MSTR_List", e.Message); + throw e; + } + + } + public static DataTable Get_TED_RECEIPT_MSTR_List( string p_tableName, string p_TaskID) + { + DataTable dt = new DataTable(); ; + var dbSetting = GlobalConfig.ExchangeCenterDB; + try + { + + var strConn = EntitiesFactory.GetEfConnectionString(dbSetting); + SqlConnection conn = new System.Data.SqlClient.SqlConnection(); + conn.ConnectionString = strConn; + + if (conn.State != ConnectionState.Open) + { + conn.Open(); + } + SqlCommand cmd = new SqlCommand(); + + cmd.Connection = conn; + string _sql = string.Format("select * from {0} where TaskID='{1}'", p_tableName, p_TaskID); + + cmd.CommandText = _sql; + + SqlDataAdapter adapter = new SqlDataAdapter(cmd); + + adapter.Fill(dt); + + } + catch (SqlException ex) + { + throw new Exception($"系统无法连接到数据库:{dbSetting},请检查配置的服务器,数据库,用户名和密码等信息是否正确。{Environment.NewLine}{ex}"); + } + return dt; + } + + + public static ResultObject Save_TED_RECEIPT_MSTR(List p_listUid, EnumTaskState p_state) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + var _lst = db.TED_RECEIPT_MSTR.Where(p => p_listUid.Contains(p.UID)).ToList(); + foreach (var itm in _lst) + { + db.TED_RECEIPT_MSTR.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TED_RECEIPT_MSTR), "Save_TED_RECEIPT_MSTR", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + + } + public ResultObject Del_TED_RECEIPT_MSTR(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TED_RECEIPT_MSTR.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TED_RECEIPT_MSTR), "Del_TED_RECEIPT_MSTR", e.Message); throw e; + } + return _ret; + } + + } +} diff --git a/北京北汽/SCP/Controller/EC_CONTROLLER_RETURN.cs b/北京北汽/SCP/Controller/EC_CONTROLLER_RETURN.cs new file mode 100644 index 0000000..7664786 --- /dev/null +++ b/北京北汽/SCP/Controller/EC_CONTROLLER_RETURN.cs @@ -0,0 +1,191 @@ +using CK.SCP.Models; +using CK.SCP.Models.ExchangeCenterTables; +using CK.SCP.Utils; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.Entity.Migrations; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ + public class UN_EC_CONTROLLER_RETURN + { + public static void Get_TED_RETURN_MSTR_List(TED_RETURN_MSTR p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + IQueryable q = db.TED_RETURN_MSTR; + if (!string.IsNullOrEmpty(p_entity.User)) + { + q = q.Where(p => p.User.Contains(p_entity.User)); + } + if (!string.IsNullOrEmpty(p_entity.ASN)) + { + q = q.Where(p => p.ASN.Contains(p_entity.ASN)); + } + if (!string.IsNullOrEmpty(p_entity.PurchaseOrder)) + { + q = q.Where(p => p.PurchaseOrder.Contains(p_entity.PurchaseOrder)); + } + if (!string.IsNullOrEmpty(p_entity.Supplier)) + { + q = q.Where(p => p.Supplier.Contains(p_entity.Supplier)); + } + if (!string.IsNullOrEmpty(p_entity.ReturnNbr)) + { + q = q.Where(p => p.ReturnNbr.Contains(p_entity.ReturnNbr)); + } + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CommandType)) + { + q = q.Where(p => p.CommandType.Contains(p_entity.CommandType)); + } + if (!string.IsNullOrEmpty(p_entity.Domain)) + { + q = q.Where(p => p.Domain.Contains(p_entity.Domain)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + + _ret.Result = q; + _ret.State = ReturnStatus.Succeed; + p_action(_ret); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TED_RETURN_MSTR), "Get_TED_RETURN_MSTR_List", e.Message); + throw e; + } + + } + public static DataTable Get_TED_RETURN_MSTR_List( string p_tableName, string p_TaskID) + { + DataTable dt = new DataTable(); ; + var dbSetting = GlobalConfig.ExchangeCenterDB; + try + { + + var strConn = EntitiesFactory.GetEfConnectionString(dbSetting); + SqlConnection conn = new System.Data.SqlClient.SqlConnection(); + //conn.ConnectionString = db.Database.Connection.ConnectionString; + + conn.ConnectionString = strConn; + + if (conn.State != ConnectionState.Open) + { + conn.Open(); + } + SqlCommand cmd = new SqlCommand(); + + cmd.Connection = conn; + string _sql = string.Format("select * from {0} where TaskID='{1}'", p_tableName, p_TaskID); + + cmd.CommandText = _sql; + + SqlDataAdapter adapter = new SqlDataAdapter(cmd); + + adapter.Fill(dt); + + } + catch (SqlException ex) + { + throw new Exception($"系统无法连接到数据库:{dbSetting},请检查配置的服务器,数据库,用户名和密码等信息是否正确。{Environment.NewLine}{ex}"); + } + return dt; + } + + public static ResultObject Save_TED_RETURN_MSTR(List p_listUid, EnumTaskState p_state) + { + + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + var _lst = db.TED_RETURN_MSTR.Where(p => p_listUid.Contains(p.UID)).ToList(); + foreach (var itm in _lst) + { + db.TED_RETURN_MSTR.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TED_RETURN_MSTR), "Save_TED_RETURN_MSTR", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + + } + + public ResultObject Del_TED_RETURN_MSTR(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TED_RETURN_MSTR.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TED_RETURN_MSTR), "Del_TED_RETURN_MSTR", e.Message); throw e; + } + return _ret; + } + + } +} diff --git a/北京北汽/SCP/Controller/EC_CONTROLLER_SUPPLIER.cs b/北京北汽/SCP/Controller/EC_CONTROLLER_SUPPLIER.cs new file mode 100644 index 0000000..af486ac --- /dev/null +++ b/北京北汽/SCP/Controller/EC_CONTROLLER_SUPPLIER.cs @@ -0,0 +1,415 @@ +using CK.SCP.Models; +using CK.SCP.Models.ExchangeCenterTables; +using CK.SCP.Utils; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.Entity.Migrations; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ + public class UN_EC_CONTROLLER_SUPPLIER + { + public static void Get_TES_SUPPLIER_List(TES_SUPPLIER p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + IQueryable q = db.TES_SUPPLIER; + if (!string.IsNullOrEmpty(p_entity.SupplierCode)) + { + q = q.Where(p => p.SupplierCode.Contains(p_entity.SupplierCode)); + } + if (!string.IsNullOrEmpty(p_entity.SupplierName)) + { + q = q.Where(p => p.SupplierName.Contains(p_entity.SupplierName)); + } + if (!string.IsNullOrEmpty(p_entity.SearchName)) + { + q = q.Where(p => p.SearchName.Contains(p_entity.SearchName)); + } + if (!string.IsNullOrEmpty(p_entity.SecondName)) + { + q = q.Where(p => p.SecondName.Contains(p_entity.SecondName)); + } + if (!string.IsNullOrEmpty(p_entity.ThirdName)) + { + q = q.Where(p => p.ThirdName.Contains(p_entity.ThirdName)); + } + if (!string.IsNullOrEmpty(p_entity.GroupName)) + { + q = q.Where(p => p.GroupName.Contains(p_entity.GroupName)); + } + if (p_entity.Active != false) + { + q = q.Where(p => p.Active == p_entity.Active); + } + if (!string.IsNullOrEmpty(p_entity.Address1)) + { + q = q.Where(p => p.Address1.Contains(p_entity.Address1)); + } + if (!string.IsNullOrEmpty(p_entity.Address2)) + { + q = q.Where(p => p.Address2.Contains(p_entity.Address2)); + } + if (!string.IsNullOrEmpty(p_entity.Address3)) + { + q = q.Where(p => p.Address3.Contains(p_entity.Address3)); + } + if (p_entity.ZipCode != 0) + { + q = q.Where(p => p.ZipCode == p_entity.ZipCode); + } + if (!string.IsNullOrEmpty(p_entity.City)) + { + q = q.Where(p => p.City.Contains(p_entity.City)); + } + if (!string.IsNullOrEmpty(p_entity.Country)) + { + q = q.Where(p => p.Country.Contains(p_entity.Country)); + } + if (p_entity.Telephone != 0) + { + q = q.Where(p => p.Telephone == p_entity.Telephone); + } + if (!string.IsNullOrEmpty(p_entity.province)) + { + q = q.Where(p => p.province.Contains(p_entity.province)); + } + if (!string.IsNullOrEmpty(p_entity.County)) + { + q = q.Where(p => p.County.Contains(p_entity.County)); + } + if (p_entity.Fax != 0) + { + q = q.Where(p => p.Fax == p_entity.Fax); + } + if (!string.IsNullOrEmpty(p_entity.LanguageCode)) + { + q = q.Where(p => p.LanguageCode.Contains(p_entity.LanguageCode)); + } + if (p_entity.Email != 0) + { + q = q.Where(p => p.Email == p_entity.Email); + } + if (p_entity.Internet != 0) + { + q = q.Where(p => p.Internet == p_entity.Internet); + } + if (p_entity.AddressIsTaxable != false) + { + q = q.Where(p => p.AddressIsTaxable == p_entity.AddressIsTaxable); + } + if (p_entity.AddressIsTaxIncluded != false) + { + q = q.Where(p => p.AddressIsTaxIncluded == p_entity.AddressIsTaxIncluded); + } + if (!string.IsNullOrEmpty(p_entity.FederalTax)) + { + q = q.Where(p => p.FederalTax.Contains(p_entity.FederalTax)); + } + if (!string.IsNullOrEmpty(p_entity.StateTax)) + { + q = q.Where(p => p.StateTax.Contains(p_entity.StateTax)); + } + if (!string.IsNullOrEmpty(p_entity.MiscTax1)) + { + q = q.Where(p => p.MiscTax1.Contains(p_entity.MiscTax1)); + } + if (!string.IsNullOrEmpty(p_entity.MiscTax2)) + { + q = q.Where(p => p.MiscTax2.Contains(p_entity.MiscTax2)); + } + if (!string.IsNullOrEmpty(p_entity.MiscTax3)) + { + q = q.Where(p => p.MiscTax3.Contains(p_entity.MiscTax3)); + } + if (p_entity.TaxInCity != false) + { + q = q.Where(p => p.TaxInCity == p_entity.TaxInCity); + } + if (!string.IsNullOrEmpty(p_entity.TaxZone)) + { + q = q.Where(p => p.TaxZone.Contains(p_entity.TaxZone)); + } + if (p_entity.TaxClass != 0) + { + q = q.Where(p => p.TaxClass == p_entity.TaxClass); + } + if (!string.IsNullOrEmpty(p_entity.TaxUsage)) + { + q = q.Where(p => p.TaxUsage.Contains(p_entity.TaxUsage)); + } + if (p_entity.Compens != false) + { + q = q.Where(p => p.Compens == p_entity.Compens); + } + if (string.IsNullOrEmpty(p_entity.GlProfileInvoice)) + { + q = q.Where(p => p.GlProfileInvoice == p_entity.GlProfileInvoice); + } + if (string.IsNullOrEmpty(p_entity.GlProfileCreditNote)) + { + q = q.Where(p => p.GlProfileCreditNote == p_entity.GlProfileCreditNote); + } + if (string.IsNullOrEmpty(p_entity.GlProfilePrepayment)) + { + q = q.Where(p => p.GlProfilePrepayment == p_entity.GlProfilePrepayment); + } + if (string.IsNullOrEmpty(p_entity.AccountGLProfile)) + { + q = q.Where(p => p.AccountGLProfile == p_entity.AccountGLProfile); + } + if (!string.IsNullOrEmpty(p_entity.SubAccountProfile)) + { + q = q.Where(p => p.SubAccountProfile.Contains(p_entity.SubAccountProfile)); + } + if (!string.IsNullOrEmpty(p_entity.CreditAgencyReference)) + { + q = q.Where(p => p.CreditAgencyReference.Contains(p_entity.CreditAgencyReference)); + } + if (!string.IsNullOrEmpty(p_entity.CommerceNumber)) + { + q = q.Where(p => p.CommerceNumber.Contains(p_entity.CommerceNumber)); + } + if (!string.IsNullOrEmpty(p_entity.TidNotice)) + { + q = q.Where(p => p.TidNotice.Contains(p_entity.TidNotice)); + } + if (!string.IsNullOrEmpty(p_entity.ExternalCustomerNumber)) + { + q = q.Where(p => p.ExternalCustomerNumber.Contains(p_entity.ExternalCustomerNumber)); + } + if (!string.IsNullOrEmpty(p_entity.Currency)) + { + q = q.Where(p => p.Currency.Contains(p_entity.Currency)); + } + if (!string.IsNullOrEmpty(p_entity.SupplierType)) + { + q = q.Where(p => p.SupplierType.Contains(p_entity.SupplierType)); + } + if (!string.IsNullOrEmpty(p_entity.Purchasetype)) + { + q = q.Where(p => p.Purchasetype.Contains(p_entity.Purchasetype)); + } + if (!string.IsNullOrEmpty(p_entity.CreditTerms)) + { + q = q.Where(p => p.CreditTerms.Contains(p_entity.CreditTerms)); + } + if (!string.IsNullOrEmpty(p_entity.InvoiceStatusCode)) + { + q = q.Where(p => p.InvoiceStatusCode.Contains(p_entity.InvoiceStatusCode)); + } + if (!string.IsNullOrEmpty(p_entity.PaymentGroup)) + { + q = q.Where(p => p.PaymentGroup.Contains(p_entity.PaymentGroup)); + } + if (p_entity.SendRemittance != false) + { + q = q.Where(p => p.SendRemittance == p_entity.SendRemittance); + } + if (p_entity.SplitAccount != false) + { + q = q.Where(p => p.SplitAccount == p_entity.SplitAccount); + } + if (!string.IsNullOrEmpty(p_entity.ShipVia)) + { + q = q.Where(p => p.ShipVia.Contains(p_entity.ShipVia)); + } + if (!string.IsNullOrEmpty(p_entity.Remarks)) + { + q = q.Where(p => p.Remarks.Contains(p_entity.Remarks)); + } + if (!string.IsNullOrEmpty(p_entity.Carrier)) + { + q = q.Where(p => p.Carrier.Contains(p_entity.Carrier)); + } + if (!string.IsNullOrEmpty(p_entity.Purchasecontact)) + { + q = q.Where(p => p.Purchasecontact.Contains(p_entity.Purchasecontact)); + } + if (!string.IsNullOrEmpty(p_entity.DayBookSet)) + { + q = q.Where(p => p.DayBookSet.Contains(p_entity.DayBookSet)); + } + if (p_entity.KanBanSupplier != false) + { + q = q.Where(p => p.KanBanSupplier == p_entity.KanBanSupplier); + } + if (!string.IsNullOrEmpty(p_entity.PromotionGroup)) + { + q = q.Where(p => p.PromotionGroup.Contains(p_entity.PromotionGroup)); + } + if (!string.IsNullOrEmpty(p_entity.Buyer)) + { + q = q.Where(p => p.Buyer.Contains(p_entity.Buyer)); + } + if (!string.IsNullOrEmpty(p_entity.PriceTable)) + { + q = q.Where(p => p.PriceTable.Contains(p_entity.PriceTable)); + } + if (!string.IsNullOrEmpty(p_entity.DiscountTable)) + { + q = q.Where(p => p.DiscountTable.Contains(p_entity.DiscountTable)); + } + if (p_entity.FixedPrice != false) + { + q = q.Where(p => p.FixedPrice == p_entity.FixedPrice); + } + if (!string.IsNullOrEmpty(p_entity.NonSoPrice)) + { + q = q.Where(p => p.NonSoPrice.Contains(p_entity.NonSoPrice)); + } + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CommandType)) + { + q = q.Where(p => p.CommandType.Contains(p_entity.CommandType)); + } + if (!string.IsNullOrEmpty(p_entity.Domain)) + { + q = q.Where(p => p.Domain.Contains(p_entity.Domain)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + + _ret.Result = q; + _ret.State = ReturnStatus.Succeed; + p_action(_ret); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TES_SUPPLIER), "Get_TES_SUPPLIER_List", e.Message); + throw e; + } + + } + public static DataTable Get_TES_SUPPLIER_List(string p_tableName, string p_TaskID) + { + DataTable dt = new DataTable(); ; + var dbSetting = GlobalConfig.ExchangeCenterDB; + try + { + + var strConn = EntitiesFactory.GetEfConnectionString(dbSetting); + SqlConnection conn = new System.Data.SqlClient.SqlConnection(); + + conn.ConnectionString = strConn; + + if (conn.State != ConnectionState.Open) + { + conn.Open(); + } + SqlCommand cmd = new SqlCommand(); + + cmd.Connection = conn; + string _sql = string.Format("select * from {0} where TaskID='{1}'", p_tableName, p_TaskID); + + cmd.CommandText = _sql; + + SqlDataAdapter adapter = new SqlDataAdapter(cmd); + + adapter.Fill(dt); + + } + catch (SqlException ex) + { + throw new Exception($"系统无法连接到数据库:{dbSetting},请检查配置的服务器,数据库,用户名和密码等信息是否正确。{Environment.NewLine}{ex}"); + } + return dt; + } + public static ResultObject Save_TES_SUPPLIER(List p_listUid, EnumTaskState p_state) + { + + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + var _lst = db.TES_SUPPLIER.Where(p => p_listUid.Contains(p.UID)).ToList(); + foreach (var itm in _lst) + { + db.TES_SUPPLIER.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TES_SUPPLIER), "Save_TES_SUPPLIER", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + + } + + + + public ResultObject Del_TES_SUPPLIER(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TES_SUPPLIER.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TES_SUPPLIER), "Del_TES_SUPPLIER", e.Message); throw e; + } + return _ret; + } + + } +} diff --git a/北京北汽/SCP/Controller/EC_CONTROLLER_TRANSFER.cs b/北京北汽/SCP/Controller/EC_CONTROLLER_TRANSFER.cs new file mode 100644 index 0000000..d180455 --- /dev/null +++ b/北京北汽/SCP/Controller/EC_CONTROLLER_TRANSFER.cs @@ -0,0 +1,215 @@ +using CK.SCP.Models; +using CK.SCP.Models.ExchangeCenterTables; +using CK.SCP.Utils; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.Entity.Migrations; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ + public class UN_EC_CONTROLLER_TRANSFER + { + public static void Get_TED_TRANSFER_MSTR_List(TED_TRANSFER_MSTR p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + IQueryable q = db.TED_TRANSFER_MSTR; + if (!string.IsNullOrEmpty(p_entity.User)) + { + q = q.Where(p => p.User.Contains(p_entity.User)); + } + if (!string.IsNullOrEmpty(p_entity.TransferBillNum)) + { + q = q.Where(p => p.TransferBillNum.Contains(p_entity.TransferBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.CustomerNbr)) + { + q = q.Where(p => p.CustomerNbr.Contains(p_entity.CustomerNbr)); + } + if (!string.IsNullOrEmpty(p_entity.Remarks)) + { + q = q.Where(p => p.Remarks.Contains(p_entity.Remarks)); + } + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CommandType)) + { + q = q.Where(p => p.CommandType.Contains(p_entity.CommandType)); + } + if (!string.IsNullOrEmpty(p_entity.Domain)) + { + q = q.Where(p => p.Domain.Contains(p_entity.Domain)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (p_entity.GUID != Guid.Empty) + { + q = q.Where(p => p.GUID == p_entity.GUID); + } + if (p_entity.TaskID != Guid.Empty) + { + q = q.Where(p => p.TaskID == p_entity.TaskID); + } + if (p_entity.DataID != Guid.Empty) + { + q = q.Where(p => p.DataID == p_entity.DataID); + } + if (p_entity.ActiveDate != DateTime.MinValue) + { + q = q.Where(p => p.ActiveDate.Year == p_entity.ActiveDate.Year && p.ActiveDate.Month == p_entity.ActiveDate.Month && p.ActiveDate.Day == p_entity.ActiveDate.Day); + + } + if (p_entity.Time != DateTime.MinValue) + { + q = q.Where(p => p.Time.Year == p_entity.Time.Year && p.Time.Month == p_entity.Time.Month && p.Time.Day == p_entity.Time.Day); + } + if (p_entity.CreateTime != DateTime.MinValue) + { + + q = q.Where(p => p.CreateTime.Year == p_entity.CreateTime.Year && p.CreateTime.Day == p_entity.CreateTime.Day && p.CreateTime.Month == p_entity.CreateTime.Month); + } + + _ret.Result = q; + _ret.State = ReturnStatus.Succeed; + + p_action(_ret); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TED_TRANSFER_MSTR), "Get_TED_TRANSFER_MSTR_List", e.Message); + throw e; + } + + } + public static DataTable Get_TED_TRANSFER_List(string p_tableName, int p_UID) + { + DataTable dt = new DataTable(); ; + var dbSetting = GlobalConfig.ExchangeCenterDB; + try + { + + var strConn = EntitiesFactory.GetEfConnectionString(dbSetting); + SqlConnection conn = new System.Data.SqlClient.SqlConnection(); + + conn.ConnectionString = strConn; + + if (conn.State != ConnectionState.Open) + { + conn.Open(); + } + SqlCommand cmd = new SqlCommand(); + + cmd.Connection = conn; + string _sql = string.Format("select * from {0} where UID='{1}'", p_tableName, p_UID); + + cmd.CommandText = _sql; + + SqlDataAdapter adapter = new SqlDataAdapter(cmd); + + adapter.Fill(dt); + + } + catch (SqlException ex) + { + throw new Exception($"系统无法连接到数据库:{dbSetting},请检查配置的服务器,数据库,用户名和密码等信息是否正确。{Environment.NewLine}{ex}"); + } + return dt; + } + + public static ResultObject Save_TED_TRANSFER_MSTR(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TED_TRANSFER_MSTR.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TED_TRANSFER_MSTR), "Save_TED_TRANSFER_MSTR", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public ResultObject Del_TED_TRANSFER_MSTR(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TED_TRANSFER_MSTR.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TED_TRANSFER_MSTR), "Del_TED_TRANSFER_MSTR", e.Message); throw e; + } + return _ret; + } + + + + + } +} diff --git a/北京北汽/SCP/Controller/OadOrderController.cs b/北京北汽/SCP/Controller/OadOrderController.cs new file mode 100644 index 0000000..b7fd682 --- /dev/null +++ b/北京北汽/SCP/Controller/OadOrderController.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; + +namespace CK.SCP.Controller +{ + public class OadOrderController + { +// public List GetList() +// { +// using (ScpEntities db = EntitiesFactory.CreateScpInstance()) +// { +// // db.TB_QadOrder.Where(p=>p.BillNo==db.) +// var query = db.TB_QadOrder.Join(db.TB_QadOrderDetail, a => a.BillNo, g => g.BillNo, (a, g) => new +// { +// a.BillNo, +// a.SupplierCode, +// a.StartDate, +// a.Address, +// a.ProductCode, +// a.Qty, +// }).ToList(); +//// return query; +// // return db.V_BillInvoice.Where(p => p.BillNum == billnum).ToList(); +// +// } +// } + } +} diff --git a/北京北汽/SCP/Controller/Properties/AssemblyInfo.cs b/北京北汽/SCP/Controller/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..6f4ac3b --- /dev/null +++ b/北京北汽/SCP/Controller/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("Controller")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Controller")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("d096d4ff-9546-4137-9a02-9070e70dc760")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/北京北汽/SCP/Controller/PublicDataController.cs b/北京北汽/SCP/Controller/PublicDataController.cs new file mode 100644 index 0000000..804e918 --- /dev/null +++ b/北京北汽/SCP/Controller/PublicDataController.cs @@ -0,0 +1,166 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using CK.SCP.Models.AppBoxEntity; +using CK.SCP.Models.Enums; +using System.Data.Entity.Core; + +namespace CK.SCP.Controller +{ + public class PublicDataController + { + public static string GetUserlistSql(string p_roName,string p_name,string p_roleName,string p_site) + { + StringBuilder _builder = new StringBuilder(); + //if (p_name == "供应商") + //{ + // _builder.Append("select u.*from Users u "); + // _builder.Append("Inner join RoleUsers ru on u.ID = ru.UserID "); + // _builder.Append("Inner join Roles r on ru.roleid = r.ID "); + // _builder.Append("Inner join FactoryUsers fu on u.ID = fu.UserID "); + // _builder.Append("inner join TA_FACTORY f on fu.FACTORY_ID = f.ID "); + // _builder.AppendFormat("where r.id = '{0}' AND F.FactoryId='{1}'", p_roleName, p_site); + + + //} + //else + //{ + _builder.Append("select u.*from Users u "); + _builder.Append("Inner join RoleUsers ru on u.ID = ru.UserID "); + _builder.Append("Inner join Roles r on ru.roleid = r.ID "); + _builder.Append("Inner join FactoryUsers fu on u.ID = fu.UserID "); + _builder.Append("inner join TA_FACTORY f on fu.FACTORY_ID = f.ID "); + _builder.AppendFormat("where r.id = '{0}' AND F.ErpSite='{1}'", p_roleName, p_site); + //} + if (!string.IsNullOrEmpty(p_roName)) + { + _builder.AppendFormat(" AND u.Name like '%{0}%'", p_roName); + } + return _builder.ToString(); + + + } + public static void Get_UserList(string p_username,string p_name,string p_roleName,string p_Site,Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (AppBoxContext db = EntitiesFactory.CreateAppBoxInstance()) + { + string sql = GetUserlistSql(p_username,p_name, p_roleName,p_Site); + IQueryable q = db.Database.SqlQuery(sql).AsQueryable(); + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(PublicDataController), "Get_UserList", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(PublicDataController), "Get_UserList", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(PublicDataController), "Get_UserList", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(PublicDataController), "Get_UserList", e.Message); + throw e; + } + + + + } + + + public static TB_PublicData GetlistByBillNo(int id) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TB_PublicData.SingleOrDefault(p => p.ID == id); + } + } + public static bool SaveInfo(TB_PublicData model) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + db.TB_PublicData.AddOrUpdate(model); + db.SaveChanges(); + } + return true; + } + + + public static bool UpdateInfo(TB_PublicData model) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + db.TB_PublicData.AddOrUpdate(p => p.ID, model); + db.SaveChanges(); + } + return true; + } + + public static void DeleteById(int id) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var info = db.TB_PublicData.SingleOrDefault(p => p.ID == id); + if (info != null) db.TB_PublicData.Remove(info); + db.SaveChanges(); + } + } + + + + + + + + + } +} diff --git a/北京北汽/SCP/Controller/ResultObject.cs b/北京北汽/SCP/Controller/ResultObject.cs new file mode 100644 index 0000000..4786bb9 --- /dev/null +++ b/北京北汽/SCP/Controller/ResultObject.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ +/// +///返回结果类 +/// +/// + public class ResultObject + { + public ResultObject() + { + ErrorList = new List(); + MessageList = new List(); + + + } + public string Message { set; get; } + + public List MessageList { set; get; } + + /// + /// 返回结果 + /// + public T Result { set; get; } + /// + /// 错误列表 + /// + public List ErrorList { set; get; } + /// + /// 返回状态 + /// + public ReturnStatus State + { set; get; } + } + public enum ReturnStatus + { + [Description("失败")] + Failed, + [Description("成功")] + Succeed + + } +} diff --git a/北京北汽/SCP/Controller/SCP_ASK_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_ASK_CONTROLLER.cs new file mode 100644 index 0000000..08fbb4c --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_ASK_CONTROLLER.cs @@ -0,0 +1,3500 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System.Data.Entity.Core; +using System.Web; +using CK.SCP.Models.AppBoxEntity; + +namespace CK.SCP.Controller +{ + + public class SCP_ASK_CONTROLLER + { + + + public static void Get_V_TB_ASK_List(V_TB_ASK p_entity, Action>> p_action) + { + + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + IQueryable q = db.V_TB_ASK; + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.AskBillNum)) + { + q = q.Where(p => p.AskBillNum.Contains(p_entity.AskBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId == p_entity.VendId); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (!string.IsNullOrEmpty(p_entity.Buyer)) + { + q = q.Where(p => p.Buyer.Contains(p_entity.Buyer)); + } + if (!string.IsNullOrEmpty(p_entity.BuyerPhone)) + { + q = q.Where(p => p.BuyerPhone.Contains(p_entity.BuyerPhone)); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (p_entity.BillStateList != null && p_entity.BillStateList.Count > 0) + { + q = q.Where(p => p_entity.BillStateList.Contains((int)p.State)); + } + if (p_entity.BeginTime != null) + { + q = q.Where(p => p.BeginTime >= p_entity.BeginTime); + } + if (p_entity.EndTime != null) + { + q = q.Where(p => p.EndTime <= p_entity.EndTime); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + if (!string.IsNullOrEmpty(p_entity.State_DESC)) + { + q = q.Where(p => p.State_DESC.Contains(p_entity.State_DESC)); + } + if (!string.IsNullOrEmpty(p_entity.ModType_DESC)) + { + q = q.Where(p => p.ModType_DESC.Contains(p_entity.ModType_DESC)); + } + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + + if (p_entity.UserInAddress.FirstOrDefault() != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + if (p_entity.UserInSubSite != null && p_entity.UserInSubSite.Count > 0) + { + q = q.Where(p => p_entity.UserInSubSite.Contains(p.SubSite)); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser==p_entity.CreateUser); + } + + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } + + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_List", e.Message); + throw e; + } + } + public static TB_ASK Getask(string ASK) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var site=db.TB_ASK.FirstOrDefault(p=>p.AskBillNum==ASK); + return site; + } + } + /// + /// 要货看板减产数量 + /// + /// 要货看板业务类 + /// + public static ResultObject Update_ReduceQty(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var itm in p_entitys) + { + var _entity = db.TB_ASK_DETAIL.Where(p => p.UID == itm.UID).FirstOrDefault(); + _entity.ReduceQty= itm.ReduceQty; + _entity.Remark = itm.Remark; + var asn = db.V_TB_ASN_DETAIL.Where(p => p.PoBillNum == itm.PoBillNum &&p.AskBillNum==itm.AskBillNum && p.IsDeleted == false ) + .GroupBy(p => new { p.PoBillNum,p.AskBillNum, p.PoLine, p.PartCode }) + .Select(p => new { AsSum = p.Sum(item => item.Qty), PoLine = p.Key.PoLine, PoBillNum = p.Key.PoBillNum, PartCode = p.Key.PartCode,AskBillNum=p.Key.AskBillNum }); + + asn.ToList().ForEach(itm1 => + { + if (itm.PoBillNum == itm1.PoBillNum && itm.PoLine == itm1.PoLine && itm.PartCode == itm1.PartCode && itm.AskBillNum==itm1.AskBillNum) + { + if (itm.ReduceQty > itm.AskQty - itm1.AsSum ) + { + _ret.MessageList.Add(string.Format("零件编号{0}零件名称{1}减产数量>要货数量-发货数量",itm.PartCode,itm.PartDesc1+itm.PartDesc2)); + } + } + }); + db.TB_ASK_DETAIL.AddOrUpdate(p => p.UID, _entity); + } + if (_ret.MessageList.Count > 0) + { + _ret.State = ReturnStatus.Failed; + + } + else + { + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_DETAIL", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_DETAIL", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_DETAIL", ex.ToString()); + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + + + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_DETAIL", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + public static void DEL_V_TB_ASK_DETAIL(List p_list, Action> p_action) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + var _list=p_list.Select(itm => itm.UID).ToList(); + + var _ls = db.TB_ASK_DETAIL.Where(p => _list.Contains(p.UID)).ToList(); + db.TB_ASK_DETAIL.RemoveRange(_ls); + + + + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + p_action(_ret); + + } + + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_ASN_View_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_ASN_View_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_ASN_View_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_ASN_View_List", e.Message); + throw e; + } + + } + + public static void Get_V_TB_ASK_ASN_View_List(V_TB_INCOMPLETE_ASK p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + IQueryable q = db.V_TB_INCOMPLETE_ASK; + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum == p_entity.PoBillNum); + } + if (!string.IsNullOrEmpty(p_entity.AskBillNum)) + { + q = q.Where(p => p.AskBillNum == p_entity.AskBillNum); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.PartDesc1)) + { + q = q.Where(p => p.PartDesc1.Contains(p_entity.PartDesc1)); + } + if (p_entity.BeginTimeStart != null) + { + q = q.Where(p => p.BeginTime >= p_entity.BeginTimeStart); + } + if (p_entity.BeginTimeEnd != null) + { + q = q.Where(p => p.BeginTime <= p_entity.BeginTimeEnd); + } + if (p_entity.EndTimeStart != null) + { + q = q.Where(p => p.EndTime >= p_entity.EndTimeStart); + } + if (p_entity.EndTimeEnd != null) + { + q = q.Where(p => p.EndTime <= p_entity.EndTimeEnd); + } + if (p_entity.Buyer != null) + { + q = q.Where(p => p.Buyer== p_entity.Buyer); + } + if (p_entity.CreateUser != null) + { + q = q.Where(p => p.CreateUser == p_entity.CreateUser); + } + if (p_entity.EndTime != null) + { + q = q.Where(p => p.EndTime < p_entity.EndTime); + } + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + if (p_entity.UserInSubSite != null && p_entity.UserInSubSite.Count > 0) + { + q = q.Where(p => p_entity.UserInSubSite.Contains(p.SubSite)); + } + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } + //if (p_entity.DayState == 0) + //{ + // q = q.Where(p => p.ValidityDays <= 0); + //} + //if (p_entity.DayState > 0) + //{ + // q = q.Where(p => (p.ValidityDays - p_entity.DayState)<=0 && p.ValidityDays>0); + //} + if (p_entity.SendState == 1) + { + q = q.Where(p => p.AskQty != p.ReduceQty + p.Qty); + } + if (p_entity.SendState == 2) + { + q = q.Where(p => p.AskQty == p.ReduceQty + p.Qty); + } + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + + + } + + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_ASN_View_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_ASN_View_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_ASN_View_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_ASN_View_List", e.Message); + throw e; + } + + } + + public static void Get_V_TB_ASK_ASN_ARR_View_List(V_TB_INCOMOLETE_DETAIL p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + IQueryable q = db.V_TB_INCOMOLETE_DETAIL; + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum == p_entity.PoBillNum); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode == p_entity.PartCode); + } + if (!string.IsNullOrEmpty(p_entity.Buyer)) + { + q = q.Where(p => p.Buyer == p_entity.Buyer); + } + if (p_entity.BeginTimeStart != null) + { + q = q.Where(p => p.BeginTime >= p_entity.BeginTimeStart); + } + if (p_entity.BeginTimeEnd != null) + { + q = q.Where(p => p.BeginTime <= p_entity.BeginTimeEnd); + } + if (p_entity.EndTimeStart != null) + { + q = q.Where(p => p.EndTime >= p_entity.EndTimeStart); + } + if (p_entity.EndTimeEnd != null) + { + q = q.Where(p => p.EndTime <= p_entity.EndTimeEnd); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId == p_entity.VendId); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + + + } + + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_ASN_View_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_ASN_View_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_ASN_View_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_ASN_View_List", e.Message); + throw e; + } + + } + public static List RejectQty_SUM(List p_list) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + if (p_list.Count > 0) + { + //var _detail = p_list[0]; + foreach (V_TB_INCOMPLETE_ASK _detail in p_list) + { + + var reject = db.TB_ARRIVE_DETAIL.Where(p => p.Remark == _detail.AskBillNum && p.IsDeleted == false && p.State == (int)ArriveState.OK&&p.BillType==3).GroupBy(p => new { p.Remark, p.PoLine, p.PartCode }).Select(p => new { RejectSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, Remark = p.Key.Remark, PartCode = p.Key.PartCode }); + reject.ToList().ForEach(itm => + { + if (_detail.AskBillNum == itm.Remark && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + { + _detail.Number = _detail.Number+Math.Abs( itm.RejectSum); + } + }); + } + } + + } + return p_list; + } + /// + /// 加载货物详细数量信息 + /// + /// + /// + public static List Load_Qty_Sum(List p_list) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + if (p_list.Count > 0) + { + //var _detail = p_list[0]; + foreach (V_TB_INCOMPLETE_ASK _detail in p_list) + { + //合格数量 + var rec = db.TB_RECEIVE_DETAIL.Where(p => p.Remark == _detail.AskBillNum && p.IsDeleted == false && p.State == (int)ReceiveState.Check && p.BillType == 0) + .GroupBy(p => new { p.Remark, p.PoLine, p.PartCode }).Select(p => new { ReceiveSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, Remark = p.Key.Remark, PartCode = p.Key.PartCode }); + //到货数量 + var arrive = db.TB_ARRIVE_DETAIL.Where(p => p.Remark == _detail.AskBillNum && p.IsDeleted == false && p.State == (int)ArriveState.OK && p.Qty > 0).GroupBy(p => new { p.Remark, p.PoLine, p.PartCode }).Select(p => new { ArriveSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, Remark = p.Key.Remark, PartCode = p.Key.PartCode }); + //退货数量 + var back = db.TB_ARRIVE_DETAIL.Where(p => p.Remark == _detail.AskBillNum && p.IsDeleted == false && p.State == (int)ArriveState.OK && p.Qty < 0).GroupBy(p => new { p.Remark, p.PoLine, p.PartCode }).Select(p => new { ArriveSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, Remark = p.Key.Remark, PartCode = p.Key.PartCode }); + //开票数量 + var invoice = db.V_TB_INVOICE_ASK.Where(p => p.Remark == _detail.AskBillNum && p.State == (int)ReceiveState.Check && p.BillType == 0) + .GroupBy(p => new { p.Remark, p.PoLine, p.PartCode }).Select(p => new { InvoiceQty = p.Sum(itm => itm.InvoiceQty), PoLine = p.Key.PoLine, Remark = p.Key.Remark, PartCode = p.Key.PartCode }); + //寄售退货 + var reject = db.TB_ARRIVE_DETAIL.Where(p => p.Remark == _detail.AskBillNum && p.IsDeleted == false && p.State == (int)ArriveState.OK && p.BillType == 3).GroupBy(p => new { p.Remark, p.PoLine, p.PartCode }).Select(p => new { RejectSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, Remark = p.Key.Remark, PartCode = p.Key.PartCode }); + reject.ToList().ForEach(itm => + { + if (_detail.AskBillNum == itm.Remark && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + { + _detail.Number = _detail.Number + Math.Abs(itm.RejectSum); + } + }); + invoice.ToList().ForEach(itm => + { + if (_detail.AskBillNum == itm.Remark && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + { + _detail.InvoiceQty = itm.InvoiceQty; + } + + }); + back.ToList().ForEach(itm => + { + if (_detail.AskBillNum == itm.Remark && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + { + _detail.RejectQty = itm.ArriveSum; + } + + }); + arrive.ToList().ForEach(itm => + { + if (_detail.AskBillNum == itm.Remark && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + { + _detail.ArriveQty = itm.ArriveSum; + } + }); + rec.ToList().ForEach(itm => + { + if (_detail.AskBillNum == itm.Remark && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + { + _detail.ReceivedQty = itm.ReceiveSum; + } + }); + _detail.OnRoadQty = Convert.ToDecimal(_detail.Qty) - _detail.ArriveQty; + } + } + + } + return p_list; + } + public static List LOAD_ASK_DETAIL_SUM(List p_list) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + if (p_list.Count > 0) + { + //var _detail = p_list[0]; + foreach (V_TB_ASK_DETAIL _detail in p_list) + { + var _ask = db.TB_ASK_DETAIL.Where(p => p.AskBillNum == _detail.AskBillNum && p.IsDeleted == false).GroupBy(p => new { p.AskBillNum, p.PoLine, p.PartCode }).Select(p => new { AskSum = p.Sum(itm => itm.AskQty), PoLine = p.Key.PoLine, AskBillNum = p.Key.AskBillNum, PartCode = p.Key.PartCode }); + + //合格 + var rec = db.TB_RECEIVE_DETAIL.Where(p => p.Remark == _detail.AskBillNum && p.IsDeleted == false && p.State == (int)ReceiveState.Check && p.BillType == 0) + .GroupBy(p => new { p.Remark, p.PoLine, p.PartCode }).Select(p => new { ReceiveSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, Remark = p.Key.Remark, PartCode = p.Key.PartCode }); + + // var reject = db.TB_RECEIVE_DETAIL.Where(p => p.Remark == _detail.AskBillNum && p.IsDeleted == false && p.State == (int)RejectState.Check && p.BillType == 1).GroupBy(p => new { p.Remark, p.PoLine, p.PartCode }).Select(p => new { RejectSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, Remark = p.Key.Remark , PartCode = p.Key.PartCode }); + //发货 + var asn = db.V_TB_ASN_DETAIL.Where(p => p.AskBillNum == _detail.AskBillNum && p.IsDeleted == false && p.State == (int)AsnState.Ship) + .GroupBy(p => new { p.AskBillNum, p.PoLine, p.PartCode }) + .Select(p => new { AsSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, AskBillNum = p.Key.AskBillNum, PartCode = p.Key.PartCode }); + + //var arrive = db.TB_ARRIVE_DETAIL.Where(p => p.Remark == _detail.AskBillNum && p.IsDeleted == false && p.State == (int)ArriveState.OK && p.BillType == (int)ArriveBillType.Receive).GroupBy(p => new { p.Remark, p.PoLine, p.PartCode }).Select(p => new { ArriveSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, Remark = p.Key.Remark, PartCode = p.Key.PartCode }); + //到货 + var arrive = db.TB_ARRIVE_DETAIL.Where(p => p.Remark == _detail.AskBillNum && p.IsDeleted == false && p.State == (int)ArriveState.OK &&p.Qty>0 ).GroupBy(p => new { p.Remark, p.PoLine, p.PartCode }).Select(p => new { ArriveSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, Remark = p.Key.Remark, PartCode = p.Key.PartCode }); + //退货 + var reject = db.TB_ARRIVE_DETAIL.Where(p => p.Remark == _detail.AskBillNum && p.IsDeleted == false && p.State == (int)ArriveState.OK && p.Qty < 0).GroupBy(p => new { p.Remark, p.PoLine, p.PartCode }).Select(p => new { ArriveSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, Remark = p.Key.Remark, PartCode = p.Key.PartCode }); + + var invoice = db.V_TB_INVOICE_ASK.Where(p => p.Remark == _detail.AskBillNum && p.State == (int)ReceiveState.Check && p.BillType == 0) + .GroupBy(p => new { p.Remark, p.PoLine, p.PartCode }).Select(p => new { InvoiceQty = p.Sum(itm => itm.InvoiceQty), PoLine = p.Key.PoLine, Remark = p.Key.Remark, PartCode = p.Key.PartCode }); + + _detail.PartDesc1 = _detail.PartDesc1 + _detail.PartDesc2; + rec.ToList().ForEach(itm => + { + if (_detail.AskBillNum == itm.Remark && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + { + _detail.ReceivedQty = itm.ReceiveSum; + } + + }); + reject.ToList().ForEach(itm => + { + if (_detail.AskBillNum == itm.Remark && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + { + _detail.RejectQty = itm.ArriveSum; + } + + }); + asn.ToList().ForEach(itm => + { + if (_detail.AskBillNum == itm.AskBillNum && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + { + _detail.ShippedQty = itm.AsSum; + } + + }); + _ask.ToList().ForEach(itm => + { + if (_detail.AskBillNum == itm.AskBillNum && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + { + _detail.TempQty = itm.AskSum; + } + }); + arrive.ToList().ForEach(itm => + { + if (_detail.AskBillNum == itm.Remark && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + { + _detail.ArriveQty = itm.ArriveSum; + } + + }); + + invoice.ToList().ForEach(itm => + { + if (_detail.AskBillNum == itm.Remark && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + { + _detail.InvoiceQty = itm.InvoiceQty; + } + + }); + _detail.OnRoadQty = Convert.ToDecimal( _detail.ShippedQty) - _detail.ArriveQty; + } + } + + } + return p_list; + } + + public static List LOAD_ASK_DETAIL_CAN(List p_list) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + if (p_list.ToList().Count > 0) + { + foreach (V_TB_ASK _detail in p_list) + { + _detail.Month = Convert.ToDateTime(_detail.EndTime).Month.ToString() + "月订单"; + if (_detail.State==0|| _detail.State==1|| _detail.State == 2) + { + + continue; + } + if (_detail.State == 6 || _detail.State == -1) + { + continue; + } + var _ask = db.V_TB_ASK_DETAIL.Where(p => p.AskBillNum == _detail.AskBillNum && p.IsDeleted == false).ToList(); + var _ask_can= Get_CAN_SHIPQTY(_ask.ToList()).Where(p=>p.CanQty>0).ToList(); + + if (_ask_can.Count != 0) + { + _detail.Flag = "1";//未完成 + } + else + { + _detail.Flag = "0";//完成 + } + //_detail.Flag = (_ask_can.Count).ToString()+ "/" +(_ask.Count).ToString(); + //_detail.Month = _detail.CreateTime.Month.ToString() + "月订单"; + } + + } + } + return p_list; + } + public static ResultObject Save_TB_ASK_DETAIL_DATE(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + string askBill = string.Empty; + DateTime beginTime = DateTime.Now; + DateTime endTime = DateTime.Now; + foreach (var itm in p_entitys) + { + var _entity = db.TB_ASK_DETAIL.Where(p => p.UID == itm.UID).FirstOrDefault(); + askBill=_entity.AskBillNum; + _entity.BeginTime =(DateTime) itm.BeginTime; + beginTime = (DateTime)itm.BeginTime; + _entity.EndTime = (DateTime)itm.EndTime; + endTime = (DateTime)itm.EndTime; + db.TB_ASK_DETAIL.AddOrUpdate(p => p.UID, _entity); + } + if (!string.IsNullOrEmpty(askBill)) + { + var _entity = db.TB_ASK.Where(p => p.AskBillNum == askBill).FirstOrDefault(); + _entity.BeginTime = beginTime; + _entity.EndTime = endTime; + db.TB_ASK.AddOrUpdate(p => p.UID, _entity); + } + if (_ret.MessageList.Count > 0) + { + _ret.State = ReturnStatus.Failed; + + } + else + { + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_DETAIL", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_DETAIL", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_DETAIL", ex.ToString()); + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + + + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_DETAIL", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + public static ResultObject Save_TB_ASK_DETAIL(List p_entitys,AskState p_state) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var itm in p_entitys) + { + itm.State = (int)p_state; + var _entity = db.TB_ASK_DETAIL.Where(p => p.UID == itm.UID).FirstOrDefault(); + _entity.AskQty = itm.AskQty; + db.TB_ASK_DETAIL.AddOrUpdate(p => p.UID, _entity); + } + if (_ret.MessageList.Count > 0) + { + _ret.State = ReturnStatus.Failed; + } + else + { + if (db.SaveChanges() != -1) + { + using (ScpEntities db1 = EntitiesFactory.CreateScpInstance()) + { + var _ls = p_entitys.Select(p => p.UID).ToList(); + if (_ls.Count > 0) + { + var _entityList = db.V_TB_ASK_DETAIL.Where(p => _ls.Contains(p.UID)).ToList(); + var _item = _entityList.FirstOrDefault(); + if (_item.AskBillNum.Contains("U")) + { + var _planList = db1.TB_PO_PLAN_EXTEND.Where(p => p.Domain == _item.Site && p.EndTime == _item.EndTime && p.PoBillNum == _item.PoBillNum).ToList(); + _planList.ForEach(p => { + var _first = _entityList.Where(itm => itm.PoBillNum == p.PoBillNum && itm.PartCode == p.PartCode && itm.EndTime == p.EndTime).FirstOrDefault(); + if (_first != null) + { + p.PlanQty = _first.AskQty; + } + }); + } + db1.SaveChanges(); + } + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_DETAIL", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_DETAIL", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_DETAIL", ex.ToString()); + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_DETAIL", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + /// + /// + /// + /// + /// + public static ResultObject Save_TB_PO(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var itm in p_entitys) + { + db.TB_PO.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_PO", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_PO", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_PO", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_PO", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + public static void test(string p_askBillNum) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _list=db.V_TB_ASK_DETAIL.Where(p => p.AskBillNum == p_askBillNum && p.IsDeleted==false).ToList(); + var _lst=Get_CAN_SHIPQTY(_list); + if (_lst.Select(p => p.CanQty).Sum() <= 0) + { + + + } + } + } + + + public static ResultObject COPY_ASK(V_TB_ASK p_ask) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _ask= db.TB_ASK.Where(p => p.AskBillNum == p_ask.AskBillNum).FirstOrDefault(); + _ask=ConvertHelper.GetObjectClone(_ask); + _ask.AskBillNum = SCP_BILLCODE_CONTROLLER.MakeASKCode(); + _ask.GUID = Guid.NewGuid(); + + _ask.State = (int)AskState.New; + db.TB_ASK.Add(_ask); + var _askDetailList = db.TB_ASK_DETAIL.Where(p => p.AskBillNum == p_ask.AskBillNum).ToList(); + _askDetailList = ConvertHelper.GetObjectClone(_askDetailList); + _askDetailList.ForEach(p => + { + p.AskBillNum = _ask.AskBillNum; + p.State = (int)AskState.New; + p.GUID = Guid.NewGuid(); + db.TB_ASK_DETAIL.Add(p); + } + ); + + int state = db.SaveChanges(); + if (state != -1) + { + _ret.MessageList.Add("复制要货单号"+_ask.AskBillNum+",请去要货明细修改要货单订货日期和要货日期"); + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Save_PO_TO_ASK", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Save_PO_TO_ASK", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Save_PO_TO_ASK", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Save_PO_TO_ASK", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + + public static ResultObject Save_ASK_TO_ASN(V_TB_ASK p_ask, List p_order_list,string p_PlateNumber + , string p_buyer, string p_buyerPhone) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + TB_ASN _t = new TB_ASN(); + string str1 = "N" + p_ask.VendId; + _t.AsnBillNum = SCP_BILLCODE_CONTROLLER.MakeASNCode_BJBQ(str1); + _t.AskBillNum = p_ask.AskBillNum; + _t.PoBillNum = p_ask.PoBillNum; + _t.ReceivedPort = p_ask.ReceivedPort; + _t.CreateUser = p_buyer; + _t.CreateTime = DateTime.Now; + _t.UpdateUser = p_buyer; + _t.UpdateTime = _t.CreateTime; + _t.ReceiveUser = p_ask.Buyer; + _t.ReceiveTime = p_ask.BeginTime; + _t.VendId = p_ask.VendId; + _t.IsDeleted= false;//操作员 + _t.CreateTime = DateTime.Now; + _t.CreateUser = p_buyer; + _t.Site = p_ask.Site; + _t.Remark = p_ask.Remark; + _t.State = (int)AsnState.New; + _t.Remark = p_ask.Remark; + _t.GUID = Guid.NewGuid(); + _t.PlateNumber = p_PlateNumber; + _t.ShipUser = p_ask.ShipUser; + _t.ShipTime = p_ask.ShipTime; + _t.SubSite = p_ask.SubSite; + _t.ReceiveTime = p_ask.ReceiveTime; + db.TB_ASN.AddOrUpdate(p => p.AsnBillNum, _t); + List _list = new List(); + + foreach (var itm in p_order_list) + { + TB_ASN_DETAIL _tDetail = new TB_ASN_DETAIL(); + _tDetail.PoBillNum = _t.PoBillNum; + _tDetail.AsnBillNum = _t.AsnBillNum; + _tDetail.PoLine = itm.PoLine; + _tDetail.PoUnit = itm.PoUnit; + _tDetail.Batch = itm.Batch; + if (!string.IsNullOrEmpty(itm.VendBatch)) + { + _tDetail.VendBatch = itm.VendBatch; + } + else + { + _tDetail.VendBatch = itm.Batch; + } + _tDetail.PackQty = itm.PackQty == 0 ? 1 : itm.PackQty; + _tDetail.PartCode = itm.PartCode; + _tDetail.State = (int)AsnState.New; + _tDetail.Qty = (decimal)itm.TempQty; + _tDetail.Price = itm.Price; + _tDetail.EndTime = itm.EndTime; + _tDetail.CreateTime = _t.CreateTime; + _tDetail.CreateUser = _t.CreateUser; + _tDetail.ProduceDate = itm.ProduceDate; + _tDetail.IsDeleted = false; + _tDetail.DockCode = itm.ReceivedPort; + _tDetail.LocUnit = itm.LocUnit; + _tDetail.UnConv = itm.UnConv; + _tDetail.State = _t.State; + _tDetail.Site= p_ask.Site; + _tDetail.ReceivedPort = itm.ReceivedPort; + _tDetail.SubSite = p_ask.SubSite; + _tDetail.Remark = itm.Remark; + _tDetail.GUID = Guid.NewGuid(); + String str = itm.PartCode.Substring(0,3); + if((str== "EXP"||str== "SPA")&& (_t.SubSite== "ZZ01"|| _t.SubSite == "CQ01")) + { + _tDetail.Batch = "000000"; + } + String str2 = itm.PartCode.Substring(0, 5); + if(str2== "SPABJ"&&_t.Site== "BJBMPT") + { + _tDetail.Batch = "000000"; + } + db.TB_ASN_DETAIL.Add(_tDetail); + var _order_detail = db.TB_ASK_DETAIL.Where(p => p.UID == itm.UID).FirstOrDefault(); + _order_detail.ShippedQty = (decimal)itm.ShippedQty; + db.TB_ASK_DETAIL.AddOrUpdate(p => p.UID, _order_detail); + + } + var list_distinct = p_order_list.DistinctBy(x => new { x.PartCode, x.Site }).ToList(); + foreach (var _itm in list_distinct) + { + //新增供应商零件 + var _lst = db.TA_VEND_PART.Where(p => p.PartCode == _itm.PartCode && p.Site == p_ask.Site && p.VendId == p_ask.VendId).ToList(); + if (_lst.Count > 0) + { + foreach (var part in _lst) + { + part.VendPackQty = _itm.PackQty == 0 ? 1 : _itm.PackQty; + } + } + else + { + _lst.Add(new TA_VEND_PART() + { + VendPackQty = _itm.PackQty == 0 ? 1 : _itm.PackQty, + PartCode = _itm.PartCode, + Site = _itm.Site, + VendId = p_ask.VendId + + }); + } + db.TA_VEND_PART.AddOrUpdate(_lst.ToArray()); + } + int state = db.SaveChanges(); + if (state != -1) + { + var _askDetailList= db.V_TB_ASK_DETAIL.Where(p => p.AskBillNum == p_ask.AskBillNum && p.IsDeleted == false).ToList();//查询要货单明细 + var _lst = Get_CAN_SHIPQTY(_askDetailList);//算出可发数量 + if (_lst.Select(p => p.CanQty).Sum() <= 0)//可发数量为零时,修改状态 + { + var _ary=db.TB_ASK.Where(p => p.AskBillNum == p_ask.AskBillNum && p.IsDeleted == false).ToList(); + _ary.ForEach(p => p.State = (int)AskState.Ship); + if (_ary.Count() > 0) + { + db.TB_ASK.AddOrUpdate(_ary.ToArray()); + } + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_ASK_TO_ASN", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_ASK_TO_ASN", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_ASK_TO_ASN", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_ASK_TO_ASN", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + public static List GET_IS_COMPLETED_SEND(List p_list) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _ls = p_list.Select(p => p.AskBillNum); + StringBuilder _buffer = new StringBuilder(); + _buffer.Append(" select distinct (C.AskBillNum)from V_TB_ASK_DETAIL C"); + _buffer.Append(" left JOIN "); + _buffer.Append(" (select SUM(Qty) as Qty, a.PoLine, a.AskBillNum, a.PartCode from v_tb_asn_detail a where a.IsDeleted=0 "); + _buffer.Append(" group by a.PoLine, a.AskBillNum, a.PartCode) AS D "); + _buffer.Append(" ON C.AskBillNum = D.AskBillNum AND C.PoLine = D.PoLine AND C.PartCode = D.PartCode "); + _buffer.Append(" WHERE C.AskQty>isnull(D.Qty,0)"); + _buffer.Append(" and c.AskBillNum in ('{0}')"); + var _str = string.Format(_buffer.ToString(), string.Join("','", _ls.ToArray())); + var _list= db.Database.SqlQuery(_str).ToList(); + + p_list.ForEach(p => { + p.IsComplete = true; + if (_list.Contains(p.AskBillNum)) + { + p.IsComplete = false; + } + }); + + } + return p_list; + } + public static List Get_CAN_SHIPQTY(List p_list) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + if (p_list.Count > 0) + { + + + var detail = p_list[0]; + var list = db.V_TB_ASN_DETAIL.Where(p => p.IsDeleted == false && detail.AskBillNum == p.AskBillNum).ToList(); + var list_back = db.TB_ARRIVE_DETAIL.Where(p => p.Remark == detail.AskBillNum && p.IsDeleted == false && p.State == (int)ArriveState.OK && p.Qty < 0 && p.BillType == 3).GroupBy(p => new { p.Remark, p.PoLine, p.PartCode, p.PoBillNum }).Select(p => new { BackSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, Remark = p.Key.Remark, PartCode = p.Key.PartCode, PoBillNum = p.Key.PoBillNum }).ToList(); + + + + var groupList = list.GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode, p.AskBillNum }).Select( + p => new + { + ShipSum = p.Sum(itm => itm.Qty), + PoLine = p.Key.PoLine, + PoBillNum = p.Key.PoBillNum, + PartCode = p.Key.PartCode, + AskBillNum = p.Key.AskBillNum + }).ToList(); + + p_list.ForEach(itm => + { + + groupList.ForEach(p => + { + if (p.PoBillNum == itm.PoBillNum && p.PoLine == itm.PoLine && p.PartCode == itm.PartCode) + { + itm.ShippedQty = p.ShipSum; + } + }); + list_back.ForEach(p => + { + if (p.PoBillNum == itm.PoBillNum && p.PoLine == itm.PoLine && p.PartCode == itm.PartCode) + { + itm.RejectQty = Math.Abs(p.BackSum);//寄售退货数 + } + }); + decimal a = itm.AskQty - (itm.ShippedQty == null ? 0 : (decimal)itm.ShippedQty) + itm.RejectQty - (itm.ReduceQty == null ? 0 : (decimal)itm.ReduceQty); + itm.CanQty = a; + itm.PackQty = (itm.PackQty == 0) ? 1 : itm.PackQty; + }); + } + + } + if(p_list.Count>0) + { + return p_list; + } + return new List(); + } + + + public static void Get_V_TB_ASK_DETAIL_List(V_TB_ASK_DETAIL p_entity, Action>> p_action) + { + + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_ASK_DETAIL; + if (p_entity.UID != 0) + { + + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (p_entity.PoLine != 0) + { + q = q.Where(p => p.PoLine == p_entity.PoLine); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (p_entity.ShippedQty != null && p_entity.ShippedQty != 0) + { + q = q.Where(p => p.ShippedQty == p_entity.ShippedQty); + } + if (p_entity.ReceivedQty != 0) + { + q = q.Where(p => p.ReceivedQty == p_entity.ReceivedQty); + } + if (!string.IsNullOrEmpty(p_entity.PoUnit)) + { + q = q.Where(p => p.PoUnit.Contains(p_entity.PoUnit)); + } + + if (p_entity.EndTime!=null) + { + q = q.Where(p =>p_entity.EndTime< p.EndTime); + } + if (!string.IsNullOrEmpty(p_entity.LocUnit)) + { + q = q.Where(p => p.LocUnit.Contains(p_entity.LocUnit)); + } + if (p_entity.Price != 0) + { + q = q.Where(p => p.Price == p_entity.Price); + } + if (!string.IsNullOrEmpty(p_entity.Currency)) + { + q = q.Where(p => p.Currency.Contains(p_entity.Currency)); + } + if (p_entity.PackQty != 0) + { + q = q.Where(p => p.PackQty == p_entity.PackQty); + } + if (p_entity.UnConv != 0) + { + q = q.Where(p => p.UnConv == p_entity.UnConv); + } + if (!string.IsNullOrEmpty(p_entity.DockCode)) + { + q = q.Where(p => p.DockCode.Contains(p_entity.DockCode)); + } + if (p_entity.State != 0) + { + q = q.Where(p => p.State == p_entity.State); + } + + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + + + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId==p_entity.VendId); + } + + if (!string.IsNullOrEmpty(p_entity.AskBillNum)) + { + q = q.Where(p => p.AskBillNum.Contains(p_entity.AskBillNum)); + } + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_DETAIL_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_DETAIL_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_DETAIL_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_DETAIL_List", e.Message); + throw e; + } + } + + + public static void Get_V_TB_ASK_DETAIL_Sum(V_TB_ASK_DETAIL p_entity,Action>> p_action) + { + + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_ASK_DETAIL; + if (p_entity.UID != 0) + { + + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (p_entity.PoLine != 0) + { + q = q.Where(p => p.PoLine == p_entity.PoLine); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (p_entity.ShippedQty!=null && p_entity.ShippedQty != 0) + { + q = q.Where(p => p.ShippedQty == p_entity.ShippedQty); + } + if (p_entity.ReceivedQty != 0) + { + q = q.Where(p => p.ReceivedQty == p_entity.ReceivedQty); + } + if (!string.IsNullOrEmpty(p_entity.PoUnit)) + { + q = q.Where(p => p.PoUnit.Contains(p_entity.PoUnit)); + } + if (!string.IsNullOrEmpty(p_entity.LocUnit)) + { + q = q.Where(p => p.LocUnit.Contains(p_entity.LocUnit)); + } + if (p_entity.Price != 0) + { + q = q.Where(p => p.Price == p_entity.Price); + } + if (!string.IsNullOrEmpty(p_entity.Currency)) + { + q = q.Where(p => p.Currency.Contains(p_entity.Currency)); + } + if (p_entity.PackQty != 0) + { + q = q.Where(p => p.PackQty == p_entity.PackQty); + } + if (p_entity.UnConv != 0) + { + q = q.Where(p => p.UnConv == p_entity.UnConv); + } + if (!string.IsNullOrEmpty(p_entity.DockCode)) + { + q = q.Where(p => p.DockCode.Contains(p_entity.DockCode)); + } + if (p_entity.State != 0) + { + q = q.Where(p => p.State == p_entity.State); + } + + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + + + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + + if (!string.IsNullOrEmpty(p_entity.AskBillNum)) + { + q = q.Where(p => p.AskBillNum.Contains(p_entity.AskBillNum)); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_DETAIL_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_DETAIL_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_DETAIL_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_DETAIL_List", e.Message); + throw e; + } + } + + + + + public static ResultObject Save_TB_ASK_STATE_BJBQ(List p_list, AskState p_state, List p_list1) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + if (p_state == AskState.Confirm) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)&& p_list1.Contains(p.Site)).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.Release); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => { + p.State = (int)AskState.Confirm; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum && itm.Site == p.Site).ToList(); + _list.ForEach(itm => itm.State = (int)AskState.Confirm); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + #region 供应商确认要货状态完成 + //var _pendingList = db.TB_PENING_ITEMS.Where(itm => itm.ITEM_NO == p.AskBillNum).ToList(); + //_pendingList.ForEach(itm => { + // itm.ITEM_STATE = (int)PENDING_STATE.COMPLETED; + // itm.ITEM_CONTENT = "要货看板已完成!"; + //} + //); + //db.TB_PENING_ITEMS.AddOrUpdate(itm => itm.GUID, _pendingList.ToArray()); + #endregion + } + ); + db.TB_ASK.AddOrUpdate(p => p.UID, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是发布状态记录!"; + } + } + if (p_state == AskState.New) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.Release); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => { + p.State = (int)AskState.New; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => itm.State = (int)AskState.New); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + + + } + // #region 供应商要货代办取消 + // var _pendingList = db.TB_PENING_ITEMS.Where(itm => itm.ITEM_NO == p.AskBillNum).ToList(); + //if (_pendingList.Count > 0) + //{ + // db.TB_PENING_ITEMS.RemoveRange(_pendingList); + //} + // #endregion + + ); + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是发布状态记录!"; + } + } + if (p_state == AskState.Release) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.New); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => + { + p.State = (int)AskState.Release; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => + { + itm.State = (int)AskState.Release; + } + ); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + #region 供应商代办任务新 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "供应商"; + _item.ITEM_NO = p.AskBillNum; + _item.ITEM_CONTENT = "要货看盘有信息"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.NEW_ASK; + _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + _item.SENDER = p.CreateUser; + _item.VEND_ID = p.VendId; + _item.SENDING_TIME = DateTime.Now; + _item.ITEM_ADDRESS = p.Site; + _item.GUID = Guid.NewGuid(); + db.TB_PENING_ITEMS.Add(_item); + #endregion + + } + ); + + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是新建状态记录!"; + } + } + if (p_state == AskState.Reject) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.New || p.State == (int)AskState.Release); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => + { + p.State = (int)AskState.Reject; + p.IsDeleted = true; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => + { + itm.State = (int)AskState.Reject; + itm.IsDeleted = true; + } + ); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + //#region 供应商要货代办作废 + //var _pendingList = db.TB_PENING_ITEMS.Where(itm => itm.ITEM_NO == p.AskBillNum).ToList(); + //db.TB_PENING_ITEMS.RemoveRange(_pendingList); + //#endregion + } + ); + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是新建或发布状态记录!"; + } + + } + if (p_state == AskState.CompleteForce) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum) && p.IsDeleted == false).ToList(); + int count = _ls.Count(p =>p.State == (int)AskState.Confirm || p.State == (int)AskState.Ship); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => + { + if(p.State==(int)AskState.Complete) + { + p.State = (int)AskState.Reject; + p.IsDeleted = true; + } + // p.State = (int)AskState.CompleteForce; + #region 修改发货单 + var _asnList = db.TB_ASN.Where(itm => itm.IsDeleted == false && itm.AskBillNum == p.AskBillNum && itm.State == 0).ToList(); + _asnList.ForEach(itm => + { + itm.State = (int)AsnState.Reject; + itm.IsDeleted = true; + var _asnDetailList = db.TB_ASN_DETAIL.Where(asn => asn.IsDeleted == false && asn.AsnBillNum == itm.AsnBillNum).ToList(); + _asnDetailList.ForEach(ad => + { + itm.State = (int)AsnState.Reject; + ad.IsDeleted = true; + } + ); + db.TB_ASN_DETAIL.AddOrUpdate(asndetail => asndetail.UID, _asnDetailList.ToArray()); + }); + db.TB_ASN.AddOrUpdate(_asnList.ToArray()); + #endregion + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum && itm.IsDeleted == false).ToList(); + _list.ForEach(itm => + { + itm.AskQty = 0; + var asn = db.V_TB_ASN_DETAIL.Where(ask => ask.AskBillNum == itm.AskBillNum && ask.IsDeleted == false && (ask.State == (int)AsnState.Ship || ask.State == (int)AsnState.Receive)) + .GroupBy(ask => new { ask.AskBillNum, ask.PoLine, ask.PartCode }) + .Select(ask => new { AsSum = ask.Sum(itm1 => itm1.Qty), PoLine = ask.Key.PoLine, AskBillNum = ask.Key.AskBillNum, PartCode = ask.Key.PartCode }).ToList(); + + asn.ForEach(itm1 => + { + if (itm1.AskBillNum == itm.AskBillNum && itm1.PoLine == itm.PoLine && itm1.PartCode == itm.PartCode) + { + itm.AskQty = itm1.AsSum; + } + }); + //itm.State = (int)AskState.CompleteForce; + } + ); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + } + ); + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是【已确认】或【已发货】状态,【发布状态】请用取消发布或看板作废!"; + } + + } + if (p_state == AskState.Receive) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.New || p.State == (int)AskState.Release); + if (count > 0) + { + _ls.ForEach(p => + { + p.State = (int)AskState.Receive; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => + { + itm.State = (int)AskState.Receive; + + } + ); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + } + ); + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是新建或发布状态记录!"; + } + + } + if(p_state == AskState.NoConfirm) + { + var _ls = db.TB_ASN.Where(p => p_list.Contains(p.AskBillNum) && p.IsDeleted==false ).ToList(); + if (_ls.Count == 0) + { + var _askList = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum) && p.IsDeleted == false).ToList(); + _askList.ForEach(p => + { + p.State = (int)AskState.Release; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => + { + itm.State = (int)AskState.Release; + } + ); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + } + ); + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _askList.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录已经有发货单据不能取消!"; + + } + + //if (count > 0) + //{ + // _ls.ForEach(p => + // { + // p.State = (int)AskState.Receive; + // var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + // _list.ForEach(itm => + // { + // itm.State = (int)AskState.Receive; + + // } + // ); + // db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + // } + // ); + // db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + //} + //else + //{ + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.Message = "选择的记录,有不是新建或发布状态记录!"; + //} + + } + if (string.IsNullOrEmpty(_ret.Message)) + { + if (db.SaveChanges() != -1) + { + + if (p_state == AskState.CompleteForce) + { + + using (ScpEntities db1 = EntitiesFactory.CreateScpInstance()) + { + if (p_list.Count > 0) + { + var _entityList = db.V_TB_ASK_DETAIL.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + + var _item = _entityList.FirstOrDefault(); + + if (_item.AskBillNum.Contains("U")) + { + var _planList = db1.TB_PO_PLAN_EXTEND.Where(p => p.Domain == _item.Site && p.EndTime == _item.EndTime && p.PoBillNum == _item.PoBillNum).ToList(); + _planList.ForEach(p => + { + + var _first = _entityList.Where(itm => itm.PoBillNum == p.PoBillNum && itm.PartCode == p.PartCode && itm.EndTime == p.EndTime).FirstOrDefault(); + if (_first != null) + { + p.PlanQty = _first.AskQty; + } + }); + } + db1.SaveChanges(); + } + } + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + } + + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + public static ResultObject Save_TB_ASK_STATE(List p_list, AskState p_state) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + if (p_state == AskState.Confirm) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.Release); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => { + p.State = (int)AskState.Confirm; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => itm.State = (int)AskState.Confirm); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + #region 供应商确认要货状态完成 + //var _pendingList = db.TB_PENING_ITEMS.Where(itm => itm.ITEM_NO == p.AskBillNum).ToList(); + //_pendingList.ForEach(itm => { + // itm.ITEM_STATE = (int)PENDING_STATE.COMPLETED; + // itm.ITEM_CONTENT = "要货看板已完成!"; + //} + //); + //db.TB_PENING_ITEMS.AddOrUpdate(itm => itm.GUID, _pendingList.ToArray()); + #endregion + } + ); + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是发布状态记录!"; + } + } + if (p_state == AskState.New) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.Release); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => { + p.State = (int)AskState.New; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => itm.State = (int)AskState.New); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + + + } + // #region 供应商要货代办取消 + // var _pendingList = db.TB_PENING_ITEMS.Where(itm => itm.ITEM_NO == p.AskBillNum).ToList(); + //if (_pendingList.Count > 0) + //{ + // db.TB_PENING_ITEMS.RemoveRange(_pendingList); + //} + // #endregion + + ); + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是发布状态记录!"; + } + } + if (p_state == AskState.Release) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.New); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => + { + p.State = (int)AskState.Release; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => + { + itm.State = (int)AskState.Release; + } + ); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + #region 供应商代办任务新 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "供应商"; + _item.ITEM_NO = p.AskBillNum; + _item.ITEM_CONTENT = "要货看盘有信息"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.NEW_ASK; + _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + _item.SENDER = p.CreateUser; + _item.VEND_ID = p.VendId; + _item.SENDING_TIME = DateTime.Now; + _item.ITEM_ADDRESS = p.Site; + _item.GUID = Guid.NewGuid(); + db.TB_PENING_ITEMS.Add(_item); + #endregion + + } + ); + + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是新建状态记录!"; + } + } + if (p_state == AskState.Reject) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.New || p.State == (int)AskState.Release); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => + { + p.State = (int)AskState.Reject; + p.IsDeleted = true; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => + { + itm.State = (int)AskState.Reject; + itm.IsDeleted = true; + } + ); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + //#region 供应商要货代办作废 + //var _pendingList = db.TB_PENING_ITEMS.Where(itm => itm.ITEM_NO == p.AskBillNum).ToList(); + //db.TB_PENING_ITEMS.RemoveRange(_pendingList); + //#endregion + } + ); + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是新建或发布状态记录!"; + } + + } + if (p_state == AskState.CompleteForce) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum) && p.IsDeleted == false).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.Confirm || p.State == (int)AskState.Ship); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => + { + if (p.State == (int)AskState.Complete) + { + p.State = (int)AskState.Reject; + p.IsDeleted = true; + } + // p.State = (int)AskState.CompleteForce; + #region 修改发货单 + var _asnList = db.TB_ASN.Where(itm => itm.IsDeleted == false && itm.AskBillNum == p.AskBillNum && itm.State == 0).ToList(); + _asnList.ForEach(itm => + { + itm.State = (int)AsnState.Reject; + itm.IsDeleted = true; + var _asnDetailList = db.TB_ASN_DETAIL.Where(asn => asn.IsDeleted == false && asn.AsnBillNum == itm.AsnBillNum).ToList(); + _asnDetailList.ForEach(ad => + { + itm.State = (int)AsnState.Reject; + ad.IsDeleted = true; + } + ); + db.TB_ASN_DETAIL.AddOrUpdate(asndetail => asndetail.UID, _asnDetailList.ToArray()); + }); + db.TB_ASN.AddOrUpdate(_asnList.ToArray()); + #endregion + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum && itm.IsDeleted == false).ToList(); + _list.ForEach(itm => + { + itm.AskQty = 0; + var asn = db.V_TB_ASN_DETAIL.Where(ask => ask.AskBillNum == itm.AskBillNum && ask.IsDeleted == false && (ask.State == (int)AsnState.Ship || ask.State == (int)AsnState.Receive)) + .GroupBy(ask => new { ask.AskBillNum, ask.PoLine, ask.PartCode }) + .Select(ask => new { AsSum = ask.Sum(itm1 => itm1.Qty), PoLine = ask.Key.PoLine, AskBillNum = ask.Key.AskBillNum, PartCode = ask.Key.PartCode }).ToList(); + + asn.ForEach(itm1 => + { + if (itm1.AskBillNum == itm.AskBillNum && itm1.PoLine == itm.PoLine && itm1.PartCode == itm.PartCode) + { + itm.AskQty = itm1.AsSum; + } + }); + //itm.State = (int)AskState.CompleteForce; + } + ); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + } + ); + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是【已确认】或【已发货】状态,【发布状态】请用取消发布或看板作废!"; + } + + } + if (p_state == AskState.Receive) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.New || p.State == (int)AskState.Release); + if (count > 0) + { + _ls.ForEach(p => + { + p.State = (int)AskState.Receive; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => + { + itm.State = (int)AskState.Receive; + + } + ); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + } + ); + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是新建或发布状态记录!"; + } + + } + if (p_state == AskState.NoConfirm) + { + var _ls = db.TB_ASN.Where(p => p_list.Contains(p.AskBillNum) && p.IsDeleted == false).ToList(); + if (_ls.Count == 0) + { + var _askList = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum) && p.IsDeleted == false).ToList(); + _askList.ForEach(p => + { + p.State = (int)AskState.Release; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => + { + itm.State = (int)AskState.Release; + } + ); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + } + ); + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _askList.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录已经有发货单据不能取消!"; + + } + + //if (count > 0) + //{ + // _ls.ForEach(p => + // { + // p.State = (int)AskState.Receive; + // var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + // _list.ForEach(itm => + // { + // itm.State = (int)AskState.Receive; + + // } + // ); + // db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + // } + // ); + // db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + //} + //else + //{ + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.Message = "选择的记录,有不是新建或发布状态记录!"; + //} + + } + if (string.IsNullOrEmpty(_ret.Message)) + { + if (db.SaveChanges() != -1) + { + + if (p_state == AskState.CompleteForce) + { + + using (ScpEntities db1 = EntitiesFactory.CreateScpInstance()) + { + if (p_list.Count > 0) + { + var _entityList = db.V_TB_ASK_DETAIL.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + + var _item = _entityList.FirstOrDefault(); + + if (_item.AskBillNum.Contains("U")) + { + var _planList = db1.TB_PO_PLAN_EXTEND.Where(p => p.Domain == _item.Site && p.EndTime == _item.EndTime && p.PoBillNum == _item.PoBillNum).ToList(); + _planList.ForEach(p => + { + + var _first = _entityList.Where(itm => itm.PoBillNum == p.PoBillNum && itm.PartCode == p.PartCode && itm.EndTime == p.EndTime).FirstOrDefault(); + if (_first != null) + { + p.PlanQty = _first.AskQty; + } + }); + } + db1.SaveChanges(); + } + } + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + } + + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + public static ResultObject Save_TB_ASK_STATE_BMPT(List p_list, AskState p_state,string site) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + if (p_state == AskState.Confirm) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.Release); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => { + p.State = (int)AskState.Confirm; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => itm.State = (int)AskState.Confirm); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + #region 供应商确认要货状态完成 + //var _pendingList = db.TB_PENING_ITEMS.Where(itm => itm.ITEM_NO == p.AskBillNum).ToList(); + //_pendingList.ForEach(itm => { + // itm.ITEM_STATE = (int)PENDING_STATE.COMPLETED; + // itm.ITEM_CONTENT = "要货看板已完成!"; + //} + //); + //db.TB_PENING_ITEMS.AddOrUpdate(itm => itm.GUID, _pendingList.ToArray()); + #endregion + } + ); + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是发布状态记录!"; + } + } + if (p_state == AskState.New) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.Release); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => { + p.State = (int)AskState.New; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => itm.State = (int)AskState.New); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + + + } + // #region 供应商要货代办取消 + // var _pendingList = db.TB_PENING_ITEMS.Where(itm => itm.ITEM_NO == p.AskBillNum).ToList(); + //if (_pendingList.Count > 0) + //{ + // db.TB_PENING_ITEMS.RemoveRange(_pendingList); + //} + // #endregion + + ); + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是发布状态记录!"; + } + } + if (p_state == AskState.Release) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.New); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => + { + p.State = (int)AskState.Release; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => + { + itm.State = (int)AskState.Release; + } + ); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + #region 供应商代办任务新 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "供应商"; + _item.ITEM_NO = p.AskBillNum; + _item.ITEM_CONTENT = "要货看盘有信息"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.NEW_ASK; + _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + _item.SENDER = p.CreateUser; + _item.VEND_ID = p.VendId; + _item.SENDING_TIME = DateTime.Now; + _item.ITEM_ADDRESS = p.Site; + _item.GUID = Guid.NewGuid(); + db.TB_PENING_ITEMS.Add(_item); + #endregion + + } + ); + + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是新建状态记录!"; + } + } + if (p_state == AskState.Reject) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.New || p.State == (int)AskState.Release); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => + { + p.State = (int)AskState.Reject; + p.IsDeleted = true; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => + { + itm.State = (int)AskState.Reject; + itm.IsDeleted = true; + } + ); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + //#region 供应商要货代办作废 + //var _pendingList = db.TB_PENING_ITEMS.Where(itm => itm.ITEM_NO == p.AskBillNum).ToList(); + //db.TB_PENING_ITEMS.RemoveRange(_pendingList); + //#endregion + } + ); + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是新建或发布状态记录!"; + } + + } + if (p_state == AskState.CompleteForce) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum) && p.IsDeleted == false&&p.Site==site).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.Confirm || p.State == (int)AskState.Ship); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => + { + if (p.State == (int)AskState.Complete) + { + p.State = (int)AskState.Reject; + p.IsDeleted = true; + } + // p.State = (int)AskState.CompleteForce; + #region 修改发货单 + var _asnList = db.TB_ASN.Where(itm => itm.IsDeleted == false && itm.AskBillNum == p.AskBillNum && itm.State == 0 && p.Site == site).ToList(); + _asnList.ForEach(itm => + { + itm.State = (int)AsnState.Reject; + itm.IsDeleted = true; + var _asnDetailList = db.TB_ASN_DETAIL.Where(asn => asn.IsDeleted == false && asn.AsnBillNum == itm.AsnBillNum && asn.Site == site).ToList(); + _asnDetailList.ForEach(ad => + { + itm.State = (int)AsnState.Reject; + ad.IsDeleted = true; + } + ); + db.TB_ASN_DETAIL.AddOrUpdate(asndetail => asndetail.UID, _asnDetailList.ToArray()); + }); + db.TB_ASN.AddOrUpdate(_asnList.ToArray()); + #endregion + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum && itm.IsDeleted == false && itm.Site == site).ToList(); + _list.ForEach(itm => + { + itm.AskQty = 0; + var asn = db.V_TB_ASN_DETAIL.Where(ask => ask.AskBillNum == itm.AskBillNum && ask.IsDeleted == false && ask.Site == site && (ask.State == (int)AsnState.Ship || ask.State == (int)AsnState.Receive)) + .GroupBy(ask => new { ask.AskBillNum, ask.PoLine, ask.PartCode,ask.Site }) + .Select(ask => new { AsSum = ask.Sum(itm1 => itm1.Qty), PoLine = ask.Key.PoLine, AskBillNum = ask.Key.AskBillNum, PartCode = ask.Key.PartCode, Site=ask.Key.Site}).ToList(); + + asn.ForEach(itm1 => + { + if (itm1.AskBillNum == itm.AskBillNum && itm1.PoLine == itm.PoLine && itm1.PartCode == itm.PartCode) + { + itm.AskQty = itm1.AsSum; + } + }); + //itm.State = (int)AskState.CompleteForce; + } + ); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + } + ); + db.TB_ASK.AddOrUpdate(p => p.UID, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是【已确认】或【已发货】状态,【发布状态】请用取消发布或看板作废!"; + } + + } + if (p_state == AskState.Receive) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.New || p.State == (int)AskState.Release); + if (count > 0) + { + _ls.ForEach(p => + { + p.State = (int)AskState.Receive; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => + { + itm.State = (int)AskState.Receive; + + } + ); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + } + ); + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是新建或发布状态记录!"; + } + + } + if (p_state == AskState.NoConfirm) + { + var _ls = db.TB_ASN.Where(p => p_list.Contains(p.AskBillNum) && p.IsDeleted == false).ToList(); + if (_ls.Count == 0) + { + var _askList = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum) && p.IsDeleted == false).ToList(); + _askList.ForEach(p => + { + p.State = (int)AskState.Release; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => + { + itm.State = (int)AskState.Release; + } + ); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + } + ); + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _askList.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录已经有发货单据不能取消!"; + + } + + //if (count > 0) + //{ + // _ls.ForEach(p => + // { + // p.State = (int)AskState.Receive; + // var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + // _list.ForEach(itm => + // { + // itm.State = (int)AskState.Receive; + + // } + // ); + // db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + // } + // ); + // db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + //} + //else + //{ + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.Message = "选择的记录,有不是新建或发布状态记录!"; + //} + + } + if (string.IsNullOrEmpty(_ret.Message)) + { + if (db.SaveChanges() != -1) + { + + if (p_state == AskState.CompleteForce) + { + + using (ScpEntities db1 = EntitiesFactory.CreateScpInstance()) + { + if (p_list.Count > 0) + { + var _entityList = db.V_TB_ASK_DETAIL.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + + var _item = _entityList.FirstOrDefault(); + + if (_item.AskBillNum.Contains("U")) + { + var _planList = db1.TB_PO_PLAN_EXTEND.Where(p => p.Domain == _item.Site && p.EndTime == _item.EndTime && p.PoBillNum == _item.PoBillNum).ToList(); + _planList.ForEach(p => + { + + var _first = _entityList.Where(itm => itm.PoBillNum == p.PoBillNum && itm.PartCode == p.PartCode && itm.EndTime == p.EndTime).FirstOrDefault(); + if (_first != null) + { + p.PlanQty = _first.AskQty; + } + }); + } + db1.SaveChanges(); + } + } + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + } + + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + public static ResultObject Save_TB_ASK_STATE_BJBBMPT(List p_list, AskState p_state,User p_user) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + if (p_state == AskState.Confirm) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.Release); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => { + p.UpdateUser = p_user.ChineseName; + p.UpdateTime = DateTime.Now; + + p.State = (int)AskState.Confirm; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => itm.State = (int)AskState.Confirm); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + #region 供应商确认要货状态完成 + //var _pendingList = db.TB_PENING_ITEMS.Where(itm => itm.ITEM_NO == p.AskBillNum).ToList(); + //_pendingList.ForEach(itm => { + // itm.ITEM_STATE = (int)PENDING_STATE.COMPLETED; + // itm.ITEM_CONTENT = "要货看板已完成!"; + //} + //); + //db.TB_PENING_ITEMS.AddOrUpdate(itm => itm.GUID, _pendingList.ToArray()); + #endregion + } + ); + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是发布状态记录!"; + } + } + if (p_state == AskState.New) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.Release); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => { + p.UpdateUser = p_user.ChineseName; + p.UpdateTime = DateTime.Now; + p.State = (int)AskState.New; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => itm.State = (int)AskState.New); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + + + } + // #region 供应商要货代办取消 + // var _pendingList = db.TB_PENING_ITEMS.Where(itm => itm.ITEM_NO == p.AskBillNum).ToList(); + //if (_pendingList.Count > 0) + //{ + // db.TB_PENING_ITEMS.RemoveRange(_pendingList); + //} + // #endregion + + ); + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是发布状态记录!"; + } + } + if (p_state == AskState.Release) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)&&p.State== (int)AskState.New).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.New); + if (count > 0) + { + _ls.ForEach(p => + { + p.UpdateUser = p_user.ChineseName; + p.UpdateTime = DateTime.Now; + p.State = (int)AskState.Release; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => + { + itm.State = (int)AskState.Release; + } + ); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + #region 供应商代办任务新 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "供应商"; + _item.ITEM_NO = p.AskBillNum; + _item.ITEM_CONTENT = "要货看盘有信息"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.NEW_ASK; + _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + _item.SENDER = p.CreateUser; + _item.VEND_ID = p.VendId; + _item.SENDING_TIME = DateTime.Now; + _item.ITEM_ADDRESS = p.Site; + _item.GUID = Guid.NewGuid(); + db.TB_PENING_ITEMS.Add(_item); + #endregion + + } + ); + + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,都不是新建状态记录!"; + } + } + if (p_state == AskState.Reject) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.New || p.State == (int)AskState.Release); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => + { + p.State = (int)AskState.Reject; + p.IsDeleted = true; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => + { + itm.State = (int)AskState.Reject; + itm.IsDeleted = true; + } + ); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + //#region 供应商要货代办作废 + //var _pendingList = db.TB_PENING_ITEMS.Where(itm => itm.ITEM_NO == p.AskBillNum).ToList(); + //db.TB_PENING_ITEMS.RemoveRange(_pendingList); + //#endregion + } + ); + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是新建或发布状态记录!"; + } + + } + if (p_state == AskState.CompleteForce) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum) && p.IsDeleted == false).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.Confirm || p.State == (int)AskState.Ship); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => + { + if (p.State == (int)AskState.Complete) + { + p.State = (int)AskState.Reject; + p.IsDeleted = true; + } + // p.State = (int)AskState.CompleteForce; + #region 修改发货单 + var _asnList = db.TB_ASN.Where(itm => itm.IsDeleted == false && itm.AskBillNum == p.AskBillNum && itm.State == 0).ToList(); + _asnList.ForEach(itm => + { + itm.State = (int)AsnState.Reject; + itm.IsDeleted = true; + var _asnDetailList = db.TB_ASN_DETAIL.Where(asn => asn.IsDeleted == false && asn.AsnBillNum == itm.AsnBillNum).ToList(); + _asnDetailList.ForEach(ad => + { + itm.State = (int)AsnState.Reject; + ad.IsDeleted = true; + } + ); + db.TB_ASN_DETAIL.AddOrUpdate(asndetail => asndetail.UID, _asnDetailList.ToArray()); + }); + db.TB_ASN.AddOrUpdate(_asnList.ToArray()); + #endregion + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum && itm.IsDeleted == false).ToList(); + _list.ForEach(itm => + { + itm.AskQty = 0; + var asn = db.V_TB_ASN_DETAIL.Where(ask => ask.AskBillNum == itm.AskBillNum && ask.IsDeleted == false && (ask.State == (int)AsnState.Ship || ask.State == (int)AsnState.Receive)) + .GroupBy(ask => new { ask.AskBillNum, ask.PoLine, ask.PartCode }) + .Select(ask => new { AsSum = ask.Sum(itm1 => itm1.Qty), PoLine = ask.Key.PoLine, AskBillNum = ask.Key.AskBillNum, PartCode = ask.Key.PartCode }).ToList(); + + asn.ForEach(itm1 => + { + if (itm1.AskBillNum == itm.AskBillNum && itm1.PoLine == itm.PoLine && itm1.PartCode == itm.PartCode) + { + itm.AskQty = itm1.AsSum; + } + }); + //itm.State = (int)AskState.CompleteForce; + } + ); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + } + ); + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是【已确认】或【已发货】状态,【发布状态】请用取消发布或看板作废!"; + } + + } + if (p_state == AskState.Receive) + { + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)AskState.New || p.State == (int)AskState.Release); + if (count > 0) + { + _ls.ForEach(p => + { + p.State = (int)AskState.Receive; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => + { + itm.State = (int)AskState.Receive; + + } + ); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + } + ); + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是新建或发布状态记录!"; + } + + } + if (p_state == AskState.NoConfirm) + { + var _ls = db.TB_ASN.Where(p => p_list.Contains(p.AskBillNum) && p.IsDeleted == false).ToList(); + if (_ls.Count == 0) + { + var _askList = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum) && p.IsDeleted == false).ToList(); + _askList.ForEach(p => + { + p.State = (int)AskState.Release; + var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + _list.ForEach(itm => + { + itm.State = (int)AskState.Release; + } + ); + db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + } + ); + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _askList.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录已经有发货单据不能取消!"; + + } + + //if (count > 0) + //{ + // _ls.ForEach(p => + // { + // p.State = (int)AskState.Receive; + // var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); + // _list.ForEach(itm => + // { + // itm.State = (int)AskState.Receive; + + // } + // ); + // db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + // } + // ); + // db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray()); + //} + //else + //{ + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.Message = "选择的记录,有不是新建或发布状态记录!"; + //} + + } + if (string.IsNullOrEmpty(_ret.Message)) + { + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + } + + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + + + public static ResultObject Save_ASK_MODIF_QTY(V_TB_ASK p_ask, List p_list) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + var _list= db.V_TB_ASK_DETAIL.Where(p => p.AskBillNum == p_ask.AskBillNum && p.IsDeleted==false).ToList(); + var _ls = Get_CAN_SHIPQTY(_list); + _ls.ForEach(p => { + var _entity = p_list.Where(itm => itm.AskBillNum == p.AskBillNum && itm.PoLine == p.PoLine && itm.PartCode == p.PartCode && itm.PoBillNum == p.PoBillNum).FirstOrDefault(); + if (_entity != null) + { + p.AskQty = _entity.AskQty; + if(_entity.AskQty 0) + { + + _ret.State = ReturnStatus.Succeed; + _ret.Result = false; + + } + else + { + + int state = db.SaveChanges(); + if (state != -1) + { + + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_ASK_TO_ASN", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_ASK_TO_ASN", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_ASK_TO_ASN", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_ASK_TO_ASN", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + + + } +} diff --git a/北京北汽/SCP/Controller/SCP_ASK_CONTROLLER_PACKAGE.cs b/北京北汽/SCP/Controller/SCP_ASK_CONTROLLER_PACKAGE.cs new file mode 100644 index 0000000..98bd189 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_ASK_CONTROLLER_PACKAGE.cs @@ -0,0 +1,267 @@ +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System; +using System.Collections.Generic; +using System.Data.Entity.Core; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ + public class SCP_ASK_CONTROLLER_PACKAGE + { + public static void Get_V_TB_ASK_DETAIL_PACKAGE_List(V_TB_ASK_DETAIL_PACKAGE p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_ASK_DETAIL_PACKAGE; + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (p_entity.PoLine != 0) + { + q = q.Where(p => p.PoLine == p_entity.PoLine); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + q = q.Where(p => p.MinPackQty!=null); + if (!string.IsNullOrEmpty(p_entity.DockCode)) + { + q = q.Where(p => p.DockCode.Contains(p_entity.DockCode)); + } + if (p_entity.State == 3 || p_entity.State == 4 || p_entity.State == 2) + { + q = q.Where(p => p.State == p_entity.State); + } + + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + + + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + + if (!string.IsNullOrEmpty(p_entity.AskBillNum)) + { + q = q.Where(p => p.AskBillNum.Contains(p_entity.AskBillNum)); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_DETAIL_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_DETAIL_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_DETAIL_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_DETAIL_List", e.Message); + throw e; + } + } + #region 青岛项目 + public static void IS_CHECK_PACKAGE(List p_list, Action> p_action) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _entity = p_list.FirstOrDefault(); + var _ask = db.V_TB_ASK_DETAIL_PACKAGE.Where + (p => p.AskBillNum == _entity.AskBillNum + && p.PoLine == _entity.PoLine + && p.PartCode == _entity.PartCode + ).FirstOrDefault(); + // var _palletPack = _ask.PalletPackQty; + if (_ask != null) + { + decimal _percent = 0; + decimal _number = 0; + List _list = new List(); + p_list.ForEach(p => + { + var _askDetail = db.V_TB_ASK_DETAIL_PACKAGE.Where + (itm => itm.AskBillNum == p.AskBillNum + && itm.PoLine == p.PoLine + && itm.PartCode == p.PartCode + ).FirstOrDefault(); + var _palletPack = _askDetail.PalletPackQty; + if (_askDetail != null) + { + _number = 0; + int _TempQty = Convert.ToInt32( p.TempQty); + int _PackQty = Convert.ToInt32(p.PackQty); + if (_TempQty / _PackQty > 0) + { + int _count = _TempQty / _PackQty; + _number += _count; + if (p.TempQty % p.PackQty > 0) + { + _number++; + } + } + else + { + if (_TempQty > 0) + { + _number++; + } + } + _percent += _number / (decimal)_palletPack;//托盘标包半分比 + // if (!string.IsNullOrEmpty(p.VendBatch)&& _number > (decimal)_palletPack) + //{ + string _str = string.Format("零件号:{0},供应商批次:{1},要货箱数:{2}箱,托盘标包数:{3}箱/托盘,占总托盘百数为:{4}", p.PartCode, p.VendBatch, _number.ToString(),_palletPack, _number / (decimal)_palletPack); + _list.Add(_str); + // } + } + }); + _ret.State = ReturnStatus.Succeed; + if (_percent <= 1) + { + _ret.Result = true; + } + else + { + _ret.Result = false; + _ret.MessageList = _list; + } + //if (_list.Count==0) + //{ + // _ret.Result = true; + //} + //else + //{ + // _ret.Result = false; + // _ret.MessageList = _list; + //} + } + else + { + _ret.State = ReturnStatus.Failed; + + } + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_DETAIL_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_DETAIL_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_DETAIL_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_DETAIL_List", e.Message); + throw e; + } + } + + #endregion + + + } +} diff --git a/北京北汽/SCP/Controller/SCP_ASN_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_ASN_CONTROLLER.cs new file mode 100644 index 0000000..c486305 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_ASN_CONTROLLER.cs @@ -0,0 +1,2834 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.Entity.Migrations; +using System.Data.Entity.Validation; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System.Data.Entity.Core; +using CK.SCP.Models.AppBoxEntity; +using CK.SCP.Models.ScpEntity.ExcelImportEntity; + +namespace CK.SCP.Controller +{ + public class SCP_ASN_CONTROLLER + { + public static void Get_V_TB_ASN_List(V_TB_ASN p_entity, Action>> p_action,string p_language="CN") + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_ASN; + + if (!string.IsNullOrEmpty(p_entity.AsnBillNum)) + { + q = q.Where(p => p.AsnBillNum.Contains(p_entity.AsnBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.AskBillNum)) + { + q = q.Where(p => p.AskBillNum.Contains(p_entity.AskBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (p_entity.State != null) + { + q = q.Where(p => p.State == p_entity.State); + } + if (!string.IsNullOrEmpty(p_entity.ShipUser)) + { + q = q.Where(p => p.ShipUser.Contains(p_entity.ShipUser)); + } + if (!string.IsNullOrEmpty(p_entity.ReceiveUser)) + { + q = q.Where(p => p.ReceiveUser.Contains(p_entity.ReceiveUser)); + } + if (!string.IsNullOrEmpty(p_entity.ErpBillNum)) + { + q = q.Where(p => p.ErpBillNum.Contains(p_entity.ErpBillNum)); + } + if (p_entity.ModType != null) + { + q = q.Where(p => p.ModType == p_entity.ModType); + } + //if (!string.IsNullOrEmpty(p_entity.Contacter)) + //{ + // q = q.Where(p => p.Contacter.Contains(p_entity.Contacter)); + //} + if (!string.IsNullOrEmpty(p_entity.Buyer)) + { + q = q.Where(p => p.Buyer.Contains(p_entity.Buyer)); + } + + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + + if (!string.IsNullOrEmpty(p_entity.State_DESC)) + { + q = q.Where(p => p.State_DESC.Contains(p_entity.State_DESC)); + } + if (!string.IsNullOrEmpty(p_entity.ModType_DESC)) + { + q = q.Where(p => p.ModType_DESC.Contains(p_entity.ModType_DESC)); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.UpdateUser)) + { + q = q.Where(p => p.UpdateUser.Contains(p_entity.UpdateUser)); + } + if (!string.IsNullOrEmpty(p_entity.UpdateInfo)) + { + q = q.Where(p => p.UpdateInfo.Contains(p_entity.UpdateInfo)); + } + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_V_TB_ASN_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_V_TB_ASN_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_V_TB_ASN_List", ex.ToString()); + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_V_TB_ASN_List", e.Message); + throw e; + } + } + /// + /// 获取托盘列表 + /// + /// 托盘 + /// 回调方法 + public static void Get_TB_Pallet_List(TB_PALLETS p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.TB_PALLETS; + if (!string.IsNullOrEmpty(p_entity.AsnBillNum)) + { + q = q.Where(p => p.AsnBillNum.Contains(p_entity.AsnBillNum)); + } + if (p_entity.Qty != 0) + { + q = q.Where(p => p.Qty == p_entity.Qty); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.Batch)) + { + q = q.Where(p => p.Batch.Contains(p_entity.Batch)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_TB_Pallet_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_TB_Pallet_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_TB_Pallet_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_TB_Pallet_List", e.Message); + throw e; + } + + } + public static void Get_V_TB_ASN_DETAIL_List(V_TB_ASN_DETAIL p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_ASN_DETAIL; + + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (p_entity.PoLine != 0) + { + q = q.Where(p => p.PoLine == p_entity.PoLine); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.PoUnit)) + { + q = q.Where(p => p.PoUnit.Contains(p_entity.PoUnit)); + } + if (!string.IsNullOrEmpty(p_entity.LocUnit)) + { + q = q.Where(p => p.LocUnit.Contains(p_entity.LocUnit)); + } + if (p_entity.Price != 0) + { + q = q.Where(p => p.Price == p_entity.Price); + } + if (!string.IsNullOrEmpty(p_entity.Currency)) + { + q = q.Where(p => p.Currency.Contains(p_entity.Currency)); + } + if (p_entity.PackQty != 0) + { + q = q.Where(p => p.PackQty == p_entity.PackQty); + } + if (p_entity.UnConv != 0) + { + q = q.Where(p => p.UnConv == p_entity.UnConv); + } + if (!string.IsNullOrEmpty(p_entity.DockCode)) + { + q = q.Where(p => p.DockCode.Contains(p_entity.DockCode)); + } + if (p_entity.State != null) + { + q = q.Where(p => p.State == p_entity.State); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.UpdateUser)) + { + q = q.Where(p => p.UpdateUser.Contains(p_entity.UpdateUser)); + } + if (!string.IsNullOrEmpty(p_entity.UpdateInfo)) + { + q = q.Where(p => p.UpdateInfo.Contains(p_entity.UpdateInfo)); + } + if (p_entity.IsDeleted != false) + { + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + } + if (!string.IsNullOrEmpty(p_entity.PartDesc1)) + { + q = q.Where(p => p.PartDesc1.Contains(p_entity.PartDesc1)); + } + if (!string.IsNullOrEmpty(p_entity.CurrencyDesc)) + { + q = q.Where(p => p.CurrencyDesc.Contains(p_entity.CurrencyDesc)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + if (!string.IsNullOrEmpty(p_entity.AsnBillNum)) + { + q = q.Where(p => p.AsnBillNum.Contains(p_entity.AsnBillNum)); + } + if (p_entity.Qty != 0) + { + q = q.Where(p => p.Qty == p_entity.Qty); + } + if (!string.IsNullOrEmpty(p_entity.VendBatch)) + { + q = q.Where(p => p.VendBatch.Contains(p_entity.VendBatch)); + } + if (!string.IsNullOrEmpty(p_entity.Batch)) + { + q = q.Where(p => p.Batch.Contains(p_entity.Batch)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_V_TB_ASN_DETAIL_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_V_TB_ASN_DETAIL_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_V_TB_ASN_DETAIL_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_V_TB_ASN_DETAIL_List", e.Message); + throw e; + } + + } + + //public static ResultObject SET_TB_ASN_REJECT(List p_list, AsnState p_state) + //{ + // ResultObject _ret = new ResultObject(); + // try + // { + // using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + // { + // if (db.TB_ASN.Where(p => p_list.Contains(p.AsnBillNum) && p.IsDeleted == false).Count() == 0) + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.Message = "存在删除记录不能操作!"; + // } + // else + // { + // if (p_state == AsnState.Reject) + // { + // var _ls = db.TB_ASN.Where(p => p_list.Contains(p.AsnBillNum)).ToList(); + // List _askbill = new List(); + // _ls.ForEach(p => { + // p.State = (int)AskState.Reject; + // p.IsDeleted = true; + // var asnDetail = db.TB_ASN_DETAIL.Where(itm => itm.AsnBillNum == p.AsnBillNum).ToList(); + // asnDetail.ForEach(itm => { + // itm.IsDeleted = true; + // itm.State = (int)AskState.Reject; + // }); + // db.TB_ASN_DETAIL.AddOrUpdate(itm => itm.UID, asnDetail.ToArray()); + // }); + // db.TB_ASN.AddOrUpdate(p => p.AsnBillNum, _ls.ToArray()); + // } + // if (string.IsNullOrEmpty(_ret.Message)) + // { + // if (db.SaveChanges() != -1) + // { + // _ret.State = ReturnStatus.Succeed; + // _ret.Result = true; + // } + // else + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.Message = "数据更新失败!"; + // } + // } + // } + + // } + // } + // catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + // { + // var sb = new StringBuilder(); + // foreach (var error in dbEx.EntityValidationErrors.ToList()) + // { + // error.ValidationErrors.ToList().ForEach(i => + // { + // sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + // }); + // } + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.ErrorList.Add(dbEx); + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_ASN_STATE", sb.ToString()); + // throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + // } + // catch (OptimisticConcurrencyException ex)//并发冲突异常 + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.ErrorList.Add(ex); + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_ASN_STATE", ex.ToString()); + // throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + // } + // catch (ScpException ex) + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.ErrorList.Add(ex); + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_ASN_STATE", ex.ToString()); + // if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + // { + // var inner = (UpdateException)ex.InnerException; + // throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + // } + // else + // { + // if (ex.InnerException != null) throw ex.InnerException; + // } + // } + // catch (Exception e) + // { + // _ret.State = ReturnStatus.Failed; + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_ASN_STATE", e.Message); + // _ret.Result = false; + // _ret.ErrorList.Add(e); + // throw e; + // } + // return _ret; + //} + + + public static ResultObject Save_TB_ASN_STATE(List p_list, AsnState p_state) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + if (db.TB_ASN.Where(p => p_list.Contains(p.AsnBillNum) && p.IsDeleted ==false).Count() == 0) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "存在删除记录不能操作!"; + } + else + { + if (p_state == AsnState.New) + { + var _ls = db.TB_ASN.Where(p => p_list.Contains(p.AsnBillNum)).ToList(); + _ls.ForEach(p => { + p.State = (int)AskState.New; + var asnDetail = db.TB_ASN_DETAIL.Where(itm => itm.AsnBillNum == p.AsnBillNum).ToList(); + asnDetail.ForEach(itm => { + itm.State = (int)AskState.New; + }); + db.TB_ASN_DETAIL.AddOrUpdate(itm => itm.UID, asnDetail.ToArray()); + }); + db.TB_ASN.AddOrUpdate(p => p.AsnBillNum, _ls.ToArray()); + } + //if (p_state == AsnState.Ship) + //{ + // var _ls = db.TB_ASN.Where(p => p_list.Contains(p.AsnBillNum) && p.IsDeleted == false).ToList(); + // if (_ls.Count(p => p.State == (int)ShipState.New) == _ls.Count) + // { + // var p = _ls[0]; + // #region 代办流程提示收货人 + // TB_PENING_ITEMS pending = new TB_PENING_ITEMS(); + // pending.ITEM_NO = p.AsnBillNum; + // pending.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.NEW_ASN; + // pending.ITEM_STATE = (int)PENDING_STATE.WAITING; + // pending.GUID = Guid.NewGuid(); + // pending.VEND_ID = p.VendId; + // pending.ROLE_NAME = "物流人员"; + // pending.SENDER = p.CreateUser; + // pending.SENDING_TIME = p.CreateTime; + // pending.RENEWER = p.CreateUser; + // pending.RENEW_TIME = p.CreateTime; + // pending.ITEM_CONTENT = string.Format("订单编号{0}发货单编号{1}已发货", p.PoBillNum, p.AsnBillNum); + // db.TB_PENING_ITEMS.Add(pending); + // #endregion; + + // } + // else + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.Message = "选择数据有不是新建状态单据!"; + // } + //} + if (p_state == AsnState.Reject) + { + var _ls = db.TB_ASN.Where(p => p_list.Contains(p.AsnBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)AsnState.New ); + if (_ls.Count == count) + { + List _askbill = new List(); + _ls.ForEach(p => { + + p.State = (int)AskState.Reject; + p.IsDeleted = true; + var asnDetail = db.TB_ASN_DETAIL.Where(itm => itm.AsnBillNum == p.AsnBillNum).ToList(); + asnDetail.ForEach(itm =>{ + itm.IsDeleted = true; + itm.State= (int)AskState.Reject; + }); + db.TB_ASN_DETAIL.AddOrUpdate(itm => itm.UID, asnDetail.ToArray()); + + }); + db.TB_ASN.AddOrUpdate(p => p.AsnBillNum, _ls.ToArray()); + + + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = string.Format("选择记录中有,不是新建状态不能作废!"); + } + + } + if (p_state == AsnState.Exception) + { + var _ls = db.TB_ASN.Where(p => p_list.Contains(p.AsnBillNum)).ToList(); + List _askbill = new List(); + _ls.ForEach(p => { + + p.State = (int)AsnState.Exception; + p.IsDeleted = false; + var asnDetail = db.TB_ASN_DETAIL.Where(itm => itm.AsnBillNum == p.AsnBillNum).ToList(); + asnDetail.ForEach(itm => { + itm.IsDeleted = false; + itm.State = (int)AsnState.Exception; + }); + db.TB_ASN_DETAIL.AddOrUpdate(itm => itm.UID, asnDetail.ToArray()); + }); + db.TB_ASN.AddOrUpdate(p => p.AsnBillNum, _ls.ToArray()); + } + + + + if (string.IsNullOrEmpty(_ret.Message)) + { + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + } + } + + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_ASN_STATE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_ASN_STATE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_ASN_STATE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_ASN_STATE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + public static DataSet ASN_REPORT(string p_AsnBillNum) + { + DataSet ds = new DataSet(); + SCP_ASN_CONTROLLER.Get_V_TB_ASN_List(new V_TB_ASN { AsnBillNum = p_AsnBillNum }, (ret) => + { + if (ret.State == ReturnStatus.Succeed) + { + if (ret.Result.Count() > 0) + { + var _asn = ret.Result.FirstOrDefault(); + V_ASN_PRINT _print = new V_ASN_PRINT(); + _print.FileNo = ""; + _print.DeliveryNo = _asn.AsnBillNum; + if(_asn.Site== "CQBMPT") + { + _print.ChineseAddress = "重庆北汽模塑科技有限公司"; + } + else + { + _print.ChineseAddress = _asn.Site_Desc; + } + + _print.EnglishAddress = ""; + _print.SupplierNo = _asn.VendId; + _print.SupplierName = _asn.VendName; + _print.SupplierContacter = _asn.ShipUser; + _print.DueDeliveryDate = _asn.ReceiveTime.ToString(); + _print.MaterialPlanner = _asn.Buyer; + _print.CAAIPhone = ""; + _print.CAAIFax = ""; + + + using (AppBoxContext _appdb = EntitiesFactory.CreateAppBoxInstance()) + { + StringBuilder _buffer = new StringBuilder(); + var _ls = _appdb.Users.Where(p => p.Roles.Select(itm => itm.Name).Contains("物流人员") && p.TA_FACTORY.Select(itm => itm.ErpDomain).Contains(_asn.Site)).ToList(); + _ls.ForEach(itm => + { + _buffer.Append(itm.ChineseName + "/" + itm.CellPhone + ";"); + }); + _print.CAAIPhone = _buffer.ToString(); + } + if (_asn.Site == "CQBMPT") + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var ask = db.TB_ASK.SingleOrDefault(t => t.AskBillNum == _asn.AskBillNum&&t.Site==_asn.Site); + _print.EnglishAddress = ask.Extend1; + var phone1 = db.TB_ADDRESS.Count(t => t.Address == ask.Extend1); + if (phone1 > 0) + { + var phone = db.TB_ADDRESS.SingleOrDefault(t => t.Address == ask.Extend1); + _print.CAAIPhone = phone.NamePone; + } + _print.CAAIFax = ask.Remark; + } + } + var dt = ConvertHelper.ToDataTable(new List { _print }); + ds.Tables.Add(dt); + + SCP_ASN_CONTROLLER.Get_V_TB_ASN_DETAIL_List(new V_TB_ASN_DETAIL() { AsnBillNum = p_AsnBillNum }, (retobj) => + { + if (retobj.State == ReturnStatus.Succeed) + { + List _lsDetail = new List(); + var _ls = retobj.Result.ToList(); + _ls.ForEach(p => + { + V_ASN_PRINT_DETAIL _detail = new V_ASN_PRINT_DETAIL(); + _detail.PartNo = p.PartCode; + _detail.PartDesc = p.PartDesc1; + _detail.Unit = p.PoUnit; + _detail.STD = p.PackQty.ToString(); + _detail.Boxes = (Math.Truncate((p.Qty / p.PackQty)) + (((p.Qty % p.PackQty) > 0) ? 1 : 0)).ToString(); + _detail.DeliverQty = p.Qty.ToString(); + _detail.ReceiveQty = p.Qty.ToString(); + _detail.PoNo = p.PoBillNum+"."+p.AskBillNum; + _detail.LineNO = p.PoLine.ToString(); + _detail.Memo = p.Remark; + _detail.Batch = p.Batch; + _detail.DockCode = p.DockCode; + _lsDetail.Add(_detail); + }); + var tb = ConvertHelper.ToDataTable(_lsDetail); + ds.Tables.Add(tb); + } + }); + } + } + }); + return ds; + } + /// + /// 获取托盘条码 + /// + /// 发货单号 + /// + public static DataSet ASN_PALLET_REPORT(string p_AsnBillNum) + { + DataSet ds = new DataSet(); + SCP_ASN_CONTROLLER.Get_V_TB_ASN_List(new V_TB_ASN { AsnBillNum = p_AsnBillNum }, (ret) => + { + if (ret.State == ReturnStatus.Succeed) + { + if (ret.Result.Count() > 0) + { + var _asn = ret.Result.FirstOrDefault(); + V_ASN_PRINT _print = new V_ASN_PRINT(); + _print.FileNo = ""; + _print.DeliveryNo = _asn.AsnBillNum; + _print.ChineseAddress = _asn.Site_Desc; + _print.EnglishAddress = ""; + _print.SupplierNo = _asn.VendId; + _print.SupplierName = _asn.VendName; + _print.SupplierContacter = _asn.ShipUser; + _print.DueDeliveryDate = _asn.ReceiveTime.ToString(); + _print.MaterialPlanner = _asn.Buyer; + _print.CAAIPhone = ""; + _print.CAAIFax = ""; + using (AppBoxContext _appdb = EntitiesFactory.CreateAppBoxInstance()) + { + StringBuilder _buffer = new StringBuilder(); + var _ls = _appdb.Users.Where(p => p.Roles.Select(itm => itm.Name).Contains("物流人员")).ToList(); + _ls.ForEach(itm => + { + _buffer.Append(itm.ChineseName + "/" + itm.CellPhone + ";"); + }); + _print.CAAIPhone = _buffer.ToString(); + } + var dt = ConvertHelper.ToDataTable(new List { _print }); + ds.Tables.Add(dt); + + SCP_ASN_CONTROLLER.Get_TB_Pallet_List(new TB_PALLETS() { AsnBillNum = p_AsnBillNum }, (retobj) => + { + if (retobj.State == ReturnStatus.Succeed) + { + List _lsDetail = new List(); + var _ls = retobj.Result.ToList(); + _ls.ForEach(p => + { + TB_PALLETS _detail = new TB_PALLETS(); + _detail.PartCode = p.PartCode; + _detail.PalletNum = p.PalletNum; + _detail.Batch = p.Batch; + _detail.Qty = p.Qty; + _detail.Box = p.Box; + _lsDetail.Add(_detail); + }); + var tb = ConvertHelper.ToDataTable(_lsDetail); + ds.Tables.Add(tb); + } + }); + } + } + }); + return ds; + } + public static DataSet ARRIVE_REPORT(string p_AsnBillNum) + { + DataSet ds = new DataSet(); + SCP_ASN_CONTROLLER.Get_V_TB_ASN_List(new V_TB_ASN { AsnBillNum = p_AsnBillNum }, (ret) => { + if (ret.State == ReturnStatus.Succeed) + { + if (ret.Result.Count() > 0) + { + var _asn = ret.Result.FirstOrDefault(); + V_ARRIVE_PRINT _print = new V_ARRIVE_PRINT(); + if (_asn.ShipTime != null) + { + DateTime dttemp; + if (DateTime.TryParse(_asn.ShipTime.ToString(), out dttemp)) + { + _print.ShipTimeDate = dttemp.ToString("yyyy-MM-dd");//发货日期 + } + } + if (_asn.ReceiveTime != null) + { + DateTime dttemp; + if (DateTime.TryParse(_asn.ReceiveTime.ToString(), out dttemp)) + { + _print.DueDeliveryDate = dttemp.ToString("yyyy-MM-dd");//到货日期 + } + } + _print.Site = _asn.Site; + _print.SupplierName = _asn.VendName;//发货单位 + _print.SupplierNo = _asn.VendId;//供应商代码 + _print.SupplierContacter = _asn.ShipUser;//供应商联系人 + _print.DeliveryNo = _asn.AsnBillNum; + _print.ChineseAddress = _asn.Site_Desc; + _print.EnglishAddress = ""; + _print.MaterialPlanner = _asn.Buyer;//采购联系人 + _print.MaterialPhone = _asn.BuyerPhone;//采购联系人电话 + _print.CAAIPhone = ""; + _print.CAAIFax = ""; + _print.STDCOUNT = "0"; + + var dt = ConvertHelper.ToDataTable(new List { _print }); + ds.Tables.Add(dt); + + SCP_ASN_CONTROLLER.Get_V_TB_ASN_DETAIL_List(new V_TB_ASN_DETAIL() { AsnBillNum = p_AsnBillNum }, (retobj) => { + decimal stdtemp = 0; + + if (retobj.State == ReturnStatus.Succeed) + { + List _lsDetail = new List(); + var _ls = retobj.Result.ToList(); + _ls.ForEach(p => { + + V_ARRIVE_PRINT_DETAIL _detail = new V_ARRIVE_PRINT_DETAIL(); + _detail.PartNo = p.PartCode; + _detail.PartDesc = p.PartDesc1; + _detail.Unit = p.PoUnit; + _detail.STD = p.PackQty.ToString(); + _detail.Boxes = (Math.Truncate((p.Qty / p.PackQty)) + (((p.Qty % p.PackQty) > 0) ? 1 : 0)).ToString(); + _detail.DeliverQty = p.Qty.ToString(); + _detail.ReceiveQty = p.Qty.ToString(); + _detail.PoNo = _print.DeliveryNo+"("+p.PoBillNum+")"; + _detail.LineNO = p.PoLine.ToString(); + _detail.Memo = p.Remark; + _detail.DockCode = p.DockCode; + _detail.ArriveState = GetArriveState(p.PoBillNum, p.PoLine, p.PartCode, p.Batch); + _detail.SpecialState = string.Empty; + _detail.VendBatch = p.VendBatch; + if (p.ProduceDate!= null) + { + DateTime dttemp; + if (DateTime.TryParse(p.ProduceDate.ToString(), out dttemp)) + { + _detail.ProduecDate = dttemp.ToString("yyyy-MM-dd");//到货日期 + } + } + // stdtemp +=_detail.Boxes; + stdtemp += Convert.ToDecimal( _detail.Boxes); + _lsDetail.Add(_detail); + }); + ds.Tables[0].Rows[0]["STDCOUNT"] = stdtemp.ToString(); + var tb = ConvertHelper.ToDataTable(_lsDetail); + ds.Tables.Add(tb); + } + }); + + } + } + }); + return ds; + } + + private static string GetArriveState(string PoBillNum, int PoLine, string PartCode, string Batch) + { + string strResult = "未到货"; + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + TB_ARRIVE_DETAIL det = db.TB_ARRIVE_DETAIL.FirstOrDefault(p => p.PoBillNum == PoBillNum && p.PoLine == PoLine && p.PartCode == PartCode && p.Batch == Batch); + + if (det != null) + { + strResult = "已到货"; + } + } + + return strResult; + } + public static ResultObject Del_TB_ASN(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var itm in p_entitys) + { + db.TB_ASN.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Del_TB_ASN", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Del_TB_ASN", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Del_TB_ASN", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Del_TB_ASN", e.Message); throw e; + } + return _ret; + } + + public static ResultObject Save_TB_CREATE_BARCODE_CUSTOM(List p_list) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + List _ls = new List(); + if (p_list.Count > 0) + { + string _asnBillNum = p_list[0].PoBillNum; + var _asn = db.TB_PO.Where(p => p.IsDeleted == false && p.PoBillNum == _asnBillNum).FirstOrDefault(); + List _asnList = new List(); + p_list.ForEach(p => + { + int _qty = 0; + int _packQty = 0; + if (int.TryParse(p.Qty.ToString(), out _qty) && int.TryParse(p.PackQty.ToString(), out _packQty)) + { + int _count = _qty / _packQty; + if (_qty / _packQty > 0) + { + for (int i = 0; i < _count; i++) + { + V_TB_ASK_DETAIL_PACKAGE _asndetail = new V_TB_ASK_DETAIL_PACKAGE(); + _asndetail.PoBillNum = p.PoBillNum; + _asndetail.Batch = p.Batch; + _asndetail.PartCode = p.PartCode; + _asndetail.ProduceDate = p.ProduceDate; + _asndetail.Qty = _packQty; + _asndetail.PoBillNum = p.PoBillNum; + _asndetail.PoLine = p.PoLine; + _asndetail.VendId = p.VendId; + _asndetail.Batch = p.Batch; + _asndetail.CreateTime = p.CreateTime; + _asndetail.CreateUser = p.CreateUser; + _asndetail.Remark = p.Remark; + _asndetail.PackQty = p.PackQty; + _asndetail.PoUnit = p.PoUnit; + _asndetail.Site = p.Site; + _asnList.Add(_asndetail); + } + if (_qty % _packQty > 0) + { + V_TB_ASK_DETAIL_PACKAGE _asndetail = new V_TB_ASK_DETAIL_PACKAGE(); + _asndetail.PoBillNum = p.PoBillNum; + _asndetail.Batch = p.Batch; + _asndetail.PartCode = p.PartCode; + _asndetail.ProduceDate = p.ProduceDate; + _asndetail.Qty = _qty % _packQty; + _asndetail.PoBillNum = p.PoBillNum; + _asndetail.PoLine = p.PoLine; + _asndetail.VendId = p.VendId; + _asndetail.Batch = p.Batch; + _asndetail.CreateTime = p.CreateTime; + _asndetail.CreateUser = p.CreateUser; + _asndetail.Remark = p.Remark; + _asndetail.PackQty = p.PackQty; + _asndetail.PoUnit = p.PoUnit; + _asndetail.Site = p.Site; + _asnList.Add(_asndetail); + } + } + else + { + if (_qty > 0) + { + V_TB_ASK_DETAIL_PACKAGE _asndetail = new V_TB_ASK_DETAIL_PACKAGE(); + _asndetail.PoBillNum = p.PoBillNum; + _asndetail.Batch = p.Batch; + _asndetail.PartCode = p.PartCode; + _asndetail.ProduceDate = p.ProduceDate; + _asndetail.Qty = _qty; + _asndetail.PoBillNum = p.PoBillNum; + _asndetail.PoLine = p.PoLine; + _asndetail.VendId = p.VendId; + _asndetail.Batch = p.Batch; + _asndetail.CreateTime = p.CreateTime; + _asndetail.CreateUser = p.CreateUser; + _asndetail.Remark = p.Remark; + _asndetail.PackQty = p.PackQty; + _asndetail.PoUnit = p.PoUnit; + _asndetail.Site = p.Site; + _asnList.Add(_asndetail); + } + } + } + }); + foreach (var itm in _asnList) + { + var _bar = SCP_BARCODE_CONTROLLER_CUSTOM.CreateBarcode(itm); + _ls.Add(_bar); + + } + db.TS_BARCODE_CUSTOM.AddOrUpdate(p => new { p.BarCode, p.BillNum }, _ls.ToArray()); + } + else + { + _ret.MessageList.Add("选择的发货明细数量为零!"); + } + if (_ret.MessageList.Count == 0) + { + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_CREATE_BARCODE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_CREATE_BARCODE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_CREATE_BARCODE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_ASN_DETAIL", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + + + + public static ResultObject Save_TB_CREATE_BARCODE(List p_list) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + List _ls = new List(); + if (p_list.Count > 0) + { + string _asnBillNum = p_list[0].AsnBillNum; + // string site= + var _asn = db.TB_ASN.Where(p => p.IsDeleted == false && p.AsnBillNum == _asnBillNum).FirstOrDefault(); + List _asnList = new List(); + int _number = 0; + p_list.ForEach(p => + { + decimal _qty = 0; + decimal _packQty = 0; + if (decimal.TryParse(p.Qty.ToString(), out _qty) && decimal.TryParse(p.PackQty.ToString(), out _packQty)) + { + decimal _n = _qty / _packQty; + var _count=int.Parse( Math.Truncate(_n).ToString()); + _number += _count; + if (_qty / _packQty > 0) + { + for (int i = 0; i < _count; i++) + { + V_TB_ASN_DETAIL _asndetail = new V_TB_ASN_DETAIL(); + _asndetail.PoBillNum = p.PoBillNum; + _asndetail.Batch = p.Batch; + _asndetail.PartCode = p.PartCode; + _asndetail.ProduceDate = p.ProduceDate; + _asndetail.Qty = _packQty; + _asndetail.AsnBillNum = p.AsnBillNum; + _asndetail.PoLine = p.PoLine; + _asndetail.VendId = p.VendId; + _asndetail.VendBatch = p.VendBatch; + _asndetail.CreateTime = p.CreateTime; + _asndetail.CreateUser = p.CreateUser; + _asndetail.Remark = p.Remark; + _asndetail.PackQty = p.PackQty; + _asndetail.PoUnit = p.PoUnit; + _asndetail.Site = p.Site; + _asnList.Add(_asndetail); + } + if (_qty % _packQty > 0) + { + _number += 1; + V_TB_ASN_DETAIL _asndetail = new V_TB_ASN_DETAIL(); + _asndetail.PoBillNum = p.PoBillNum; + _asndetail.Batch = p.Batch; + _asndetail.PartCode = p.PartCode; + _asndetail.ProduceDate = p.ProduceDate; + _asndetail.Qty = _qty % _packQty; + _asndetail.AsnBillNum = p.AsnBillNum; + _asndetail.PoLine = p.PoLine; + _asndetail.VendId = p.VendId; + _asndetail.VendBatch = p.VendBatch; + _asndetail.CreateTime = p.CreateTime; + _asndetail.CreateUser = p.CreateUser; + _asndetail.Remark = p.Remark; + _asndetail.PackQty = p.PackQty; + _asndetail.PoUnit = p.PoUnit; + _asndetail.Site = p.Site; + _asnList.Add(_asndetail); + } + } + else + { + if (_qty > 0) + { + _number += 1; + V_TB_ASN_DETAIL _asndetail = new V_TB_ASN_DETAIL(); + _asndetail.PoBillNum = p.PoBillNum; + _asndetail.Batch = p.Batch; + _asndetail.PartCode = p.PartCode; + _asndetail.ProduceDate = p.ProduceDate; + _asndetail.Qty = _qty; + _asndetail.AsnBillNum = p.AsnBillNum; + _asndetail.PoLine = p.PoLine; + _asndetail.VendId = p.VendId; + _asndetail.VendBatch = p.VendBatch; + _asndetail.CreateTime = p.CreateTime; + _asndetail.CreateUser = p.CreateUser; + _asndetail.Remark = p.Remark; + _asndetail.PackQty = p.PackQty; + _asndetail.PoUnit = p.PoUnit; + _asndetail.Site = p.Site; + _asnList.Add(_asndetail); + } + } + } + }); + if(_number >= 2000) + { + _ret.MessageList.Add("创建条码数超过2000,无法创建!"); + } + else + { + foreach (var itm in _asnList) + { + var _bar = SCP_BARCODE_CONTROLLER.CreateBarcode(itm); + _ls.Add(_bar); + } + db.TS_BARCODE.AddOrUpdate(p => new { p.BarCode, p.BillNum }, _ls.ToArray()); + } + } + else + { + _ret.MessageList.Add("选择的发货明细数量为零!"); + } + if (_ret.MessageList.Count == 0) + { + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_CREATE_BARCODE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_CREATE_BARCODE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_CREATE_BARCODE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_ASN_DETAIL", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + /// + /// 保存托盘(计算并保存) + /// + /// 发货单列表 + /// + public static ResultObject Save_TB_PALLET(List p_list) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + List _list = new List(); + int codenum = 1; //标签计数器 + string _oldpartcode = ""; //上一个托盘所装零件编号 + decimal _oldbox = 0; //上一个托盘箱数计数 + string _oldpalletnum = "";//上一个托盘码 + List _listm = new List(); + p_list.ForEach(p => + { + var _askDetail = db.TA_VEND_PART.Where + (itm => itm.VendId == p.VendId + && itm.PartCode == p.PartCode + ).FirstOrDefault(); + if (_askDetail != null) + { + var _palletPack = _askDetail.PalletPackQty; + #region 补充未满托盘 + if (p.PartCode== _oldpartcode) + { + decimal _box1 = 0; + int _TempQty1 = Convert.ToInt32(p.Qty); + int _PackQty1 = Convert.ToInt32(p.PackQty); + if (_TempQty1 / _PackQty1 > 0) + { + int _count = _TempQty1 / _PackQty1; + _box1 += _count; + if (p.Qty % p.PackQty > 0) + { + _box1++; + } + } + else + { + if (_TempQty1 > 0) + { + _box1++; + } + } + if(_box1< _oldbox) + { + TB_PALLETS pallet = new TB_PALLETS(); + pallet.AsnBillNum = p.AsnBillNum; + pallet.PartCode = p.PartCode; + pallet.Batch = p.Batch; + pallet.VendId = p.VendId; + pallet.Box = Convert.ToInt32(_box1); + pallet.Qty = p.Qty; + pallet.PalletNum = _oldpalletnum; + db.TB_PALLETS.Add(pallet); + p.Qty = 0; + } + else + { + TB_PALLETS pallet = new TB_PALLETS(); + pallet.AsnBillNum = p.AsnBillNum; + pallet.PartCode = p.PartCode; + pallet.Batch = p.Batch; + pallet.VendId = p.VendId; + pallet.Box = Convert.ToInt32(_oldbox); + pallet.Qty = _oldbox* _PackQty1; + pallet.PalletNum = _oldpalletnum; + db.TB_PALLETS.Add(pallet); + p.Qty = p.Qty- _oldbox * _PackQty1; + } + } + #endregion + #region 新托盘 + if (p.Qty != 0) + { + decimal _box = 0; + int _TempQty = Convert.ToInt32(p.Qty); + int _PackQty = Convert.ToInt32(p.PackQty); + if (_TempQty / _PackQty > 0) + { + int _count = _TempQty / _PackQty; + _box += _count; + if (p.Qty % p.PackQty > 0) + { + _box++; + } + } + else + { + if (_TempQty > 0) + { + _box++; + } + } + if (_box <= _palletPack) + { + TB_PALLETS pallet = new TB_PALLETS(); + pallet.AsnBillNum = p.AsnBillNum; + pallet.PartCode = p.PartCode; + pallet.Batch = p.Batch; + pallet.VendId = p.VendId; + pallet.Box = Convert.ToInt32(_box); + pallet.Qty = p.Qty; + pallet.PalletNum = SCP_BILLCODE_CONTROLLER.MakePalletCode_QD(codenum); + db.TB_PALLETS.Add(pallet); + _oldpartcode = p.PartCode; + _oldbox = Convert.ToInt32(_palletPack) - _box; + _oldpalletnum = pallet.PalletNum; + codenum++; + } + else + { + decimal _pallet = 0; + _pallet += Convert.ToInt32(_box) / Convert.ToInt32(_palletPack); + if (_box % _palletPack > 0) + { + _pallet++; + } + for (int i = 1; i <= _pallet;i++) + { + TB_PALLETS pallet = new TB_PALLETS(); + pallet.AsnBillNum = p.AsnBillNum; + pallet.PartCode = p.PartCode; + pallet.Batch = p.Batch; + pallet.VendId = p.VendId; + pallet.PalletNum = SCP_BILLCODE_CONTROLLER.MakePalletCode_QD(codenum); + if (i == _pallet) + { + pallet.Box = Convert.ToInt32(_box - Convert.ToDecimal(_palletPack) * (_pallet - 1)); + pallet.Qty = p.Qty - Convert.ToDecimal(_palletPack) * (_pallet - 1) * _PackQty; + } + else + { + pallet.Box = Convert.ToInt32(_palletPack); + pallet.Qty = Convert.ToDecimal(_palletPack) * _PackQty; + } + db.TB_PALLETS.Add(pallet); + codenum++; + } + } + } + #endregion + } + else + { + string _str = string.Format("零件号:{0},供应商编号:{1},没有维护托盘标包数!请先维护供应商零件信息", p.PartCode, p.VendBatch); + _list.Add(_str); + } + }); + int state = db.SaveChanges(); + if (state != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.MessageList = _listm; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_PALLET", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_PALLET", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_PALLET", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_PALLET", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + public static ResultObject Save_TB_CREATE_BARCODE_SYJB(List p_list) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + List _ls = new List(); + if (p_list.Count > 0) + { + string _asnBillNum = p_list[0].AsnBillNum; + var _asn = db.TB_ASN.Where(p => p.IsDeleted == false && p.AsnBillNum == _asnBillNum).FirstOrDefault(); + List _asnList = new List(); + p_list.ForEach(p => + { + int _qty = 0; + int _packQty = 0; + if (int.TryParse(p.Qty.ToString(), out _qty) && int.TryParse(p.PackQty.ToString(), out _packQty)) + { + int _count = _qty / _packQty; + if (_qty / _packQty > 0) + { + for (int i = 0; i < _count; i++) + { + V_TB_ASN_DETAIL _asndetail = new V_TB_ASN_DETAIL(); + _asndetail.PoBillNum = p.PoBillNum; + _asndetail.Batch = p.Batch; + _asndetail.PartCode = p.PartCode; + _asndetail.ProduceDate = p.ProduceDate; + _asndetail.Qty = _packQty; + _asndetail.AsnBillNum = p.AsnBillNum; + _asndetail.PoLine = p.PoLine; + _asndetail.VendId = p.VendId; + _asndetail.VendBatch = p.VendBatch; + _asndetail.CreateTime = p.CreateTime; + _asndetail.CreateUser = p.CreateUser; + _asndetail.Remark = p.Remark; + _asndetail.PackQty = p.PackQty; + _asndetail.PoUnit = p.PoUnit; + _asndetail.Site = p.Site; + _asndetail.AskBillNum=p.AskBillNum; + _asnList.Add(_asndetail); + } + if (_qty % _packQty > 0) + { + V_TB_ASN_DETAIL _asndetail = new V_TB_ASN_DETAIL(); + _asndetail.PoBillNum = p.PoBillNum; + _asndetail.Batch = p.Batch; + _asndetail.PartCode = p.PartCode; + _asndetail.ProduceDate = p.ProduceDate; + _asndetail.Qty = _qty % _packQty; + _asndetail.AsnBillNum = p.AsnBillNum; + _asndetail.PoLine = p.PoLine; + _asndetail.VendId = p.VendId; + _asndetail.VendBatch = p.VendBatch; + _asndetail.CreateTime = p.CreateTime; + _asndetail.CreateUser = p.CreateUser; + _asndetail.Remark = p.Remark; + _asndetail.PackQty = p.PackQty; + _asndetail.PoUnit = p.PoUnit; + _asndetail.Site = p.Site; + _asndetail.AskBillNum = p.AskBillNum; + _asnList.Add(_asndetail); + } + } + else + { + if (_qty > 0) + { + V_TB_ASN_DETAIL _asndetail = new V_TB_ASN_DETAIL(); + _asndetail.PoBillNum = p.PoBillNum; + _asndetail.Batch = p.Batch; + _asndetail.PartCode = p.PartCode; + _asndetail.ProduceDate = p.ProduceDate; + _asndetail.Qty = _qty; + _asndetail.AsnBillNum = p.AsnBillNum; + _asndetail.PoLine = p.PoLine; + _asndetail.VendId = p.VendId; + _asndetail.VendBatch = p.VendBatch; + _asndetail.CreateTime = p.CreateTime; + _asndetail.CreateUser = p.CreateUser; + _asndetail.Remark = p.Remark; + _asndetail.PackQty = p.PackQty; + _asndetail.PoUnit = p.PoUnit; + _asndetail.Site = p.Site; + _asndetail.AskBillNum = p.AskBillNum; + _asnList.Add(_asndetail); + } + } + } + + }); + foreach (var itm in _asnList) + { + var _bar = SCP_BARCODE_CONTROLLER_SYJB.CreateBarcode(itm); + _ls.Add(_bar); + + } + db.TS_BARCODE.AddOrUpdate(p => new { p.BarCode, p.BillNum }, _ls.ToArray()); + } + else + { + _ret.MessageList.Add("选择的发货明细数量为零!"); + } + if (_ret.MessageList.Count == 0) + { + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_CREATE_BARCODE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_CREATE_BARCODE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_CREATE_BARCODE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_ASN_DETAIL", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + public static ResultObject Get_TS_UNI_API(V_TB_ASN p_asn) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _list = db.TS_UNI_API.Where(p => p.BillNum == p_asn.AsnBillNum).ToList(); + if (_list.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + else + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_TS_UNI_API", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_TS_UNI_API", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_TS_UNI_API", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_TS_UNI_API", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + public static ResultObject Save_TB_ASN_DETAIL(V_TB_ASN p_asn, List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + DateTime now = DateTime.Now; + List _ls = new List(); + var _asn =db.TB_ASN.Where(p => p.IsDeleted == false && p.AsnBillNum == p_asn.AsnBillNum).ToList(); + if (_asn != null && _asn.Count>0) + { + _asn.ForEach(p => { + p.State = (int)AsnState.Ship; + p.CreateTime = now; + }); + db.TB_ASN.AddOrUpdate(p => p.UID, _asn.ToArray()); + var ask = db.TB_ASK.Where(p => p.IsDeleted == false && p.AskBillNum == p_asn.AskBillNum).ToList(); + ask.ForEach(p => p.State = (int)AskState.Ship); + db.TB_ASK.AddOrUpdate(p => p.UID, ask.ToArray()); + p_entitys.ForEach(itm => + { + + var _sum = db.V_TB_ASK_DETAIL.Where(p => p.AskBillNum == p_asn.AskBillNum && p.PartCode == itm.PartCode + && p.PoBillNum == p_asn.PoBillNum && p.PoLine == itm.PoLine && p.IsDeleted == false).Select(p => p.AskQty).Sum();//要货单要货数量 + var _currSum = db.V_TB_ASN_DETAIL.Where(p => p.AskBillNum == p_asn.AskBillNum && p.PartCode == itm.PartCode + && p.PoBillNum == p_asn.PoBillNum && p.PoLine == itm.PoLine && p.IsDeleted == false).Select(p => p.Qty).Sum();//当前存在发货单数量 + var _curr = db.V_TB_ASN_DETAIL.Where(p => p.AsnBillNum == p_asn.AsnBillNum && p.PartCode == itm.PartCode + && p.PoBillNum == p_asn.PoBillNum && p.PoLine == itm.PoLine && p.IsDeleted == false).Select(p => p.Qty).Sum(); + var _rejct = db.TB_ARRIVE_DETAIL.Where(p => p.Remark == p_asn.AskBillNum && p.PartCode == itm.PartCode + && p.PoBillNum == p_asn.PoBillNum && p.PoLine == itm.PoLine && p.IsDeleted == false&&p.BillType==3).Select(p => p.Qty).ToList().Sum(); + if (_currSum - _curr + itm.Qty- Math.Abs(_rejct) <= _sum) + { + TB_ASN_DETAIL _detail = new TB_ASN_DETAIL(); + _detail.UID = itm.UID; + _detail.UnConv = itm.UnConv; + _detail.AsnBillNum = itm.AsnBillNum; + _detail.DockCode = itm.DockCode; + _detail.Currency = itm.Currency; + _detail.Batch = itm.Batch; + _detail.CreateUser = itm.CreateUser; + _detail.CreateTime = now; + _detail.PackQty = itm.PackQty; + _detail.PartCode = itm.PartCode; + _detail.PoLine = itm.PoLine; + _detail.PoBillNum = itm.PoBillNum; + _detail.Price = itm.Price; + _detail.VendBatch = itm.VendBatch; + _detail.ProduceDate = itm.ProduceDate; + _detail.Remark = itm.Remark; + _detail.Qty = itm.Qty; + _detail.PoUnit = itm.PoUnit; + _detail.LocUnit = itm.LocUnit; + _detail.IsDeleted = itm.IsDeleted; + _detail.State = (int)AsnState.Ship; + _detail.Site = itm.Site; + _detail.SubSite = itm.SubSite; + _detail.GUID = itm.Guid; + _ls.Add(_detail); + + + TS_UNI_API api = UniApiController.CreateBy(p_asn, itm, UniApiType.Receive); + api.State = 1; + db.TS_UNI_API.AddOrUpdate(api);//同步更新中间表 + } + else + { + _ret.MessageList.Add(string.Format("行号{0}零件名称:{1}数量合计已大于要货单{2}数量", itm.PoLine, itm.PartDesc1, itm.AskBillNum)); + } + } + ); + #region 条码串接口 + //var _asnBillNum = _asn[0].AsnBillNum; + //var _barcodeList=db.TS_BARCODE.Where(p => p.BillNum == _asnBillNum).ToList(); + //_barcodeList.ForEach(itm => { + // TS_UNI_API _api =UniApiController.CreateBy(_asn[0], itm, UniApiType.BarCode); + // _api.State = 1; + // db.TS_UNI_API.AddOrUpdate(_api); + //}); + #endregion + } + if (_ret.MessageList.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + else + { + db.TB_ASN_DETAIL.AddOrUpdate(p => p.UID, _ls.ToArray()); + + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_ASN_DETAIL", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_ASN_DETAIL", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_ASN_DETAIL", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Save_TB_ASN_DETAIL", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public static ResultObject Del_TB_ASK_DETAIL(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var itm in p_entitys) + { + db.TB_ASK_DETAIL.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Del_TB_ASK_DETAIL", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Del_TB_ASK_DETAIL", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Del_TB_ASK_DETAIL", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Del_TB_ASK_DETAIL", e.Message); throw e; + } + return _ret; + } + + + public static void Get_V_TB_ASN_DETAIL_VIEW_List(V_TB_ASN_DETAIL_VIEW p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_ASN_DETAIL_VIEW; + + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (p_entity.PoLine != 0) + { + q = q.Where(p => p.PoLine == p_entity.PoLine); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + + if (p_entity.Price != 0) + { + q = q.Where(p => p.Price == p_entity.Price); + } + if (!string.IsNullOrEmpty(p_entity.Currency)) + { + q = q.Where(p => p.Currency.Contains(p_entity.Currency)); + } + if (p_entity.PackQty != 0) + { + q = q.Where(p => p.PackQty == p_entity.PackQty); + } + + if (!string.IsNullOrEmpty(p_entity.DockCode)) + { + q = q.Where(p => p.DockCode.Contains(p_entity.DockCode)); + } + if (p_entity.State != null) + { + q = q.Where(p => p.State == p_entity.State); + } + + if (!string.IsNullOrEmpty(p_entity.PartDesc1)) + { + q = q.Where(p => p.PartDesc1.Contains(p_entity.PartDesc1)); + } + + + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + if (!string.IsNullOrEmpty(p_entity.PartDesc2)) + { + q = q.Where(p => p.PartDesc2.Contains(p_entity.PartDesc2)); + } + if (!string.IsNullOrEmpty(p_entity.AsnBillNum)) + { + q = q.Where(p => p.AsnBillNum.Contains(p_entity.AsnBillNum)); + } + if (p_entity.Qty != 0) + { + q = q.Where(p => p.Qty == p_entity.Qty); + } + if (!string.IsNullOrEmpty(p_entity.VendBatch)) + { + q = q.Where(p => p.VendBatch.Contains(p_entity.VendBatch)); + } + if (!string.IsNullOrEmpty(p_entity.Batch)) + { + q = q.Where(p => p.Batch.Contains(p_entity.Batch)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (!string.IsNullOrEmpty(p_entity.AskBillNum)) + { + q = q.Where(p => p.AskBillNum.Contains(p_entity.AskBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.ReceivedPort)) + { + q = q.Where(p => p.ReceivedPort.Contains(p_entity.ReceivedPort)); + } + if (!string.IsNullOrEmpty(p_entity.PlateNumber)) + { + q = q.Where(p => p.PlateNumber.Contains(p_entity.PlateNumber)); + } + if (!string.IsNullOrEmpty(p_entity.ShipUser)) + { + q = q.Where(p => p.ShipUser.Contains(p_entity.ShipUser)); + } + if (!string.IsNullOrEmpty(p_entity.ReceiveUser)) + { + q = q.Where(p => p.ReceiveUser.Contains(p_entity.ReceiveUser)); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.UpdateUser)) + { + q = q.Where(p => p.UpdateUser.Contains(p_entity.UpdateUser)); + } + if (!string.IsNullOrEmpty(p_entity.UpdateInfo)) + { + q = q.Where(p => p.UpdateInfo.Contains(p_entity.UpdateInfo)); + } + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + + if (p_entity.ShipTimeBegin != null) + { + + q = q.Where(p => p.ShipTime>=p_entity.ShipTimeBegin); + } + + if (p_entity.ShipTimeEnd != null) + { + q = q.Where(p => p.ShipTime <= p_entity.ShipTimeEnd); + + + } + if (p_entity.ReceiveTimeBegin != null) + { + + q = q.Where(p => p.ReceiveTime >= p_entity.ReceiveTimeBegin); + } + + if (p_entity.ReceiveTimeEnd != null) + { + q = q.Where(p => p.ReceiveTime <= p_entity.ReceiveTimeEnd); + + + } + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } + if (p_entity.UserInSubSite != null && p_entity.UserInSubSite.Count > 0) + { + q = q.Where(p => p_entity.UserInSubSite.Contains(p.SubSite)); + } + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_V_TB_ASN__DETAIL_View_List", e.Message); + throw e; + } + + } + + + + + //public static List Get_CAN_SHIPQTY(List p_list) + //{ + // using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + // { + // var detail = p_list[0]; + // var list = db.V_TB_ASN_DETAIL.Where(p => p.IsDeleted == false && detail.AskBillNum == p.AskBillNum).ToList(); + + // var groupList = list.GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode, p.AskBillNum }).Select( + // p => new { + // ShipSum = p.Sum(itm => itm.Qty), + // PoLine = p.Key.PoLine, + // PoBillNum = p.Key.PoBillNum, + // PartCode = p.Key.PartCode, + // AskBillNum = p.Key.AskBillNum + // }).ToList(); + + // p_list.ForEach(itm => { + + // groupList.ForEach(p => + // { + // if (p.PoBillNum == itm.PoBillNum && p.PoLine == itm.PoLine && p.PartCode == itm.PartCode) + // { + // itm.ShippedQty = p.ShipSum; + // } + // }); + // decimal a = itm.AskQty - (itm.ShippedQty == null ? 0 : (decimal)itm.ShippedQty); + // itm.CanQty = a; + // itm.PackQty = (itm.PackQty == 0) ? 1 : itm.PackQty; + // }); + // } + // return p_list; + //} + + public static List Get_CAN_PALLET_QTY(List p_list) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + + var detail = p_list[0]; + var list = db.V_TB_PALLET_DETAIL.Where(p => p.IsDeleted == false && detail.AsnBillNum == p.AsnBillNum).ToList(); + + var groupList=list.GroupBy(p => new { p.AsnBillNum, p.PoBillNum, p.PoLine, p.PartCode }) + .Select( + + p => new + { + PalletSum = p.Sum(itm => itm.Qty), + PoLine = p.Key.PoLine, + PoBillNum = p.Key.PoBillNum, + PartCode = p.Key.PartCode, + AsnBillNum=p.Key.AsnBillNum, + } + + ).ToList(); + + p_list.ForEach(itm => + { + decimal palletedNum = 0; + groupList.ForEach(p => + { + if (p.PoBillNum == itm.PoBillNum && p.PoLine == itm.PoLine && p.PartCode == itm.PartCode) + { + palletedNum = p.PalletSum; + } + }); + decimal a = itm.Qty- palletedNum; + itm.CanQty = a; + itm.PackQty = (itm.PackQty == 0) ? 1 : itm.PackQty; + }); + } + return p_list; + } + + /// + /// 创建发货单 + /// + /// + /// + /// + /// + /// + /// + public static ResultObject Save_ASN_TO_PALLET(V_TB_ASN p_ask, List p_list, string p_PlateNumber + , string p_buyer, string p_buyerPhone) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _asn=db.V_TB_ASN.Where(p => p.AsnBillNum == p_ask.AsnBillNum).FirstOrDefault(); + TB_PALLET _t = new TB_PALLET(); + _t.AsnBillNum = _asn.AsnBillNum; + _t.PalletNum= SCP_BILLCODE_CONTROLLER.MakePalletCode(); + _t.AskBillNum = _asn.AskBillNum; + _t.PoBillNum = _asn.PoBillNum; + _t.ReceivedPort = _asn.ReceivedPort; + _t.CreateUser = _asn.CreateUser; + _t.CreateTime = _asn.CreateTime; + _t.UpdateUser = p_buyer; + _t.UpdateTime = _asn.CreateTime; + _t.ReceiveUser = _asn.Buyer; + _t.ReceiveTime = _asn.ReceiveTime; + _t.VendId = _asn.VendId; + _t.IsDeleted = false;//操作员 + _t.CreateTime = _asn.CreateTime; + _t.CreateUser = _asn.CreateUser; + _t.Site = _asn.Site; + _t.Remark = _asn.Remark; + _t.State = (int)AsnState.New; + _t.Remark = p_ask.Remark; + _t.GUID = Guid.NewGuid(); + _t.PlateNumber = string.Empty; + _t.ShipUser = p_ask.ShipUser; + _t.ShipTime = p_ask.ShipTime; + _t.ReceiveTime = p_ask.ReceiveTime; + db.TB_PALLET.AddOrUpdate(p => p.PalletNum, _t); + List _list = new List(); + foreach (var itm in p_list) + { + var _asndetail=db.V_TB_ASN_DETAIL.Where(p => p.AsnBillNum == itm.AsnBillNum && p.PartCode == itm.PartCode && p.PoBillNum == itm.PoBillNum && p.PoLine == itm.PoLine && p.IsDeleted==false).FirstOrDefault(); + TB_PALLET_DETAIL _tDetail = new TB_PALLET_DETAIL(); + _tDetail.PoBillNum = _t.PoBillNum; + _tDetail.AsnBillNum = _t.AsnBillNum; + _tDetail.PalletNum = _t.PalletNum; + _tDetail.PoLine = _asndetail.PoLine; + _tDetail.PoUnit = _asndetail.PoUnit; + _tDetail.Batch = _asndetail.Batch; + if (!string.IsNullOrEmpty(_asndetail.VendBatch)) + { + _tDetail.VendBatch = _asndetail.VendBatch; + } + else + { + _tDetail.VendBatch = _asndetail.Batch; + } + _tDetail.PackQty = _asndetail.PackQty == 0 ? 1 : _asndetail.PackQty; + _tDetail.PartCode = _asndetail.PartCode; + _tDetail.State = (int)AsnState.New; + + _tDetail.Qty = (decimal)itm.Qty; + _tDetail.Price = _asndetail.Price; + _tDetail.EndTime = _asndetail.EndTime; + _tDetail.CreateTime = _t.CreateTime; + _tDetail.CreateUser = _t.CreateUser; + _tDetail.ProduceDate = _asndetail.ProduceDate; + _tDetail.IsDeleted = false; + _tDetail.DockCode = _asndetail.ReceivedPort; + _tDetail.LocUnit = _asndetail.LocUnit; + _tDetail.UnConv = _asndetail.UnConv; + _tDetail.State = _t.State; + _tDetail.ReceivedPort = _asndetail.ReceivedPort; + _tDetail.GUID = Guid.NewGuid(); + db.TB_PALLET_DETAIL.Add(_tDetail); + //var _order_detail = db.TB_ASK_DETAIL.Where(p => p.UID == itm.UID).FirstOrDefault(); + //_order_detail.ShippedQty = (decimal)itm.ShippedQty; + //db.TB_ASK_DETAIL.AddOrUpdate(p => p.UID, _order_detail); + } + int state = db.SaveChanges(); + if (state != -1) + { + //var _askDetailList = db.V_TB_ASK_DETAIL.Where(p => p.AskBillNum == p_ask.AskBillNum && p.IsDeleted == false).ToList();//查询要货单明细 + //var _lst = Get_CAN_SHIPQTY(_askDetailList);//算出可发数量 + //if (_lst.Select(p => p.CanQty).Sum() <= 0)//可发数量为零时,修改状态 + //{ + // var _ary = db.TB_ASK.Where(p => p.AskBillNum == p_ask.AskBillNum && p.IsDeleted == false).ToList(); + // _ary.ForEach(p => p.State = (int)AskState.Ship); + // if (_ary.Count() > 0) + // { + // db.TB_ASK.AddOrUpdate(_ary.ToArray()); + // } + //} + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_ASK_TO_ASN", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_ASK_TO_ASN", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_ASK_TO_ASN", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_ASK_TO_ASN", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + /// + /// 数据导入 + /// + /// + /// + /// + /// + /// + /// + public static ResultObject EXCEL_ASN(List p_order_list, string p_creator, string p_buyer, string p_site, DateTime p_time) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + int number = 1; + List lineError = new List(); + List ErrorList = new List(); + p_order_list.ForEach + (p => + { + var _ls = CheckExcel(db, p); + if (_ls.Count > 0) + { + lineError.Add(number.ToString()); + ErrorList.Add(string.Join("
", _ls.ToArray())); + } + number++; + }); + if (lineError.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.MessageList.AddRange(ErrorList); + _ret.Result = false; + } + else + { + var GroupList = p_order_list.GroupBy(p => new { p.采购订单号, p.行号, p.零件编号, p.价格, p.供应商编码, p.单位 }).Select(p => new { 数量 = p.Sum(itm => decimal.Parse(itm.数量)), 行号 = p.Key.行号, 采购订单号 = p.Key.采购订单号, p.Key.零件编号, p.Key.价格, p.Key.供应商编码, p.Key.单位 }).ToList(); + var OrderList = GroupList.GroupBy(p => p.采购订单号).ToList(); + OrderList.ForEach((p) => + { + var list_distinct = p.GroupBy(t => new { t.零件编号, t.行号 }).ToList(); + var list = p.ToList(); + if (list_distinct.Count < list.Count) + { + _ret.MessageList.Add("相同组号,存在同一编号、行号的数据"); + return; + } + if (list.Count > 0) + { + var _entity = list.FirstOrDefault(); + TB_ASK _ask = new TB_ASK(); + _ask.AskBillNum = SCP_BILLCODE_CONTROLLER.MakeASKCode(); + _ask.State = (int)AskState.Receive; + _ask.PoBillNum = _entity.采购订单号.ToUpper(); + _ask.ModType = (int)BillModType.Contract; + _ask.Site = p_site; + _ask.BeginTime = p_time; + _ask.Buyer = p_creator; + _ask.BuyerPhone = ""; + _ask.ErpBillNum = _entity.采购订单号.ToUpper(); + _ask.EndTime = p_time; + _ask.CreateTime = p_time; + _ask.CreateUser = p_creator; + _ask.VendId = _entity.供应商编码.ToUpper(); + _ask.GUID = Guid.NewGuid(); + _ask.IsDeleted = false; + db.TB_ASK.Add(_ask); + + TB_ASN _asn = new TB_ASN(); + _asn.AsnBillNum = SCP_BILLCODE_CONTROLLER.MakeASNCode(); + _asn.AskBillNum = _ask.AskBillNum; + _asn.VendId = _entity.供应商编码.ToUpper(); ; + _asn.State = (int)AsnState.Receive; + _asn.PoBillNum = _entity.采购订单号.ToUpper(); + _asn.Site = p_site; + _asn.CreateTime = p_time; + _asn.CreateUser = p_creator; + _asn.UpdateTime = p_time; + _asn.UpdateUser = p_creator; + _asn.ShipTime = p_time; + _asn.ShipUser = p_creator; + _asn.ReceiveTime = p_time; + _asn.ReceiveUser = p_creator; + _asn.GUID = Guid.NewGuid(); + _asn.IsDeleted = false; + db.TB_ASN.Add(_asn); + + list.ForEach((itm) => + { + TB_ASK_DETAIL _t_ASK_Detail = new TB_ASK_DETAIL(); + _t_ASK_Detail.PoLine = Int32.Parse(itm.行号); + _t_ASK_Detail.Currency = ""; + _t_ASK_Detail.AskBillNum = _ask.AskBillNum; + _t_ASK_Detail.PoBillNum = _ask.PoBillNum; + _t_ASK_Detail.PoUnit = itm.单位; + _t_ASK_Detail.CreateTime = DateTime.Now; + _t_ASK_Detail.CreateUser = _ask.CreateUser; + _t_ASK_Detail.PartCode = itm.零件编号.ToUpper(); + _t_ASK_Detail.BeginTime = p_time; + _t_ASK_Detail.EndTime = p_time; + _t_ASK_Detail.TempQty = itm.数量; + _t_ASK_Detail.AskQty = itm.数量; + _t_ASK_Detail.IsDeleted = false; + _t_ASK_Detail.LocUnit = itm.单位; + _t_ASK_Detail.UnConv = 1; + _t_ASK_Detail.State = _ask.State; + _t_ASK_Detail.Price = string.IsNullOrEmpty(itm.价格) ? 0 : decimal.Parse(itm.价格); + _t_ASK_Detail.GUID = Guid.NewGuid(); + db.TB_ASK_DETAIL.Add(_t_ASK_Detail); + + TB_ASN_DETAIL _t_ASN_Detail = new TB_ASN_DETAIL(); + _t_ASN_Detail.AsnBillNum = _asn.AsnBillNum; + _t_ASN_Detail.PoLine = Int32.Parse(itm.行号); + _t_ASN_Detail.Currency = ""; + _t_ASN_Detail.PoBillNum = _asn.PoBillNum; + _t_ASN_Detail.PoUnit = itm.单位; + _t_ASN_Detail.CreateTime = DateTime.Now; + _t_ASN_Detail.CreateUser = _asn.CreateUser; + _t_ASN_Detail.PartCode = itm.零件编号.ToUpper(); + _t_ASN_Detail.Batch = p_time.ToString("yyyyMMdd"); + _t_ASN_Detail.VendBatch = p_time.ToString("yyyyMMdd"); + _t_ASN_Detail.Qty = itm.数量; + _t_ASN_Detail.State = (int)AsnState.Receive; + _t_ASN_Detail.CreateTime = p_time; + _t_ASN_Detail.CreateUser = p_creator; + _t_ASN_Detail.IsDeleted = false; + _t_ASN_Detail.GUID = Guid.NewGuid(); + _t_ASN_Detail.PoUnit = itm.单位; + _t_ASN_Detail.ProduceDate = p_time; + db.TB_ASN_DETAIL.Add(_t_ASN_Detail); + + var _reclist = p_order_list.Where(t => t.零件编号 == itm.零件编号 && t.采购订单号 == itm.采购订单号 && t.行号 == itm.行号).GroupBy(t => t.收货单号).ToList(); + _reclist.ForEach((q) => + { + var reclist = q.FirstOrDefault(); + TB_RECEIVE _rec = new TB_RECEIVE(); + _rec.RecvBillNum = reclist.收货单号; + _rec.State = (int)FormState.开放; + _rec.Remark = _ask.AskBillNum; + _rec.CreateTime = p_time; + _rec.CreateUser = p_creator; + _rec.IsDeleted = false; + _rec.GUID = System.Guid.NewGuid(); + _rec.BillType = 0; + _rec.PoBillNum = reclist.采购订单号.ToUpper(); + _rec.AsnBillNum = reclist.采购订单号.ToUpper(); + _rec.Site = p_site; + _rec.VendId = reclist.供应商编码.ToUpper(); + _rec.ShipTime = p_time; + db.TB_RECEIVE.Add(_rec); + var _recdetaillist = p_order_list.Where(f => f.收货单号 == reclist.收货单号).ToList(); + _recdetaillist.ForEach((n) => + { + TB_RECEIVE_DETAIL _t_RECEIVE_Detail = new TB_RECEIVE_DETAIL(); + _t_RECEIVE_Detail.RecvBillNum = n.收货单号; + _t_RECEIVE_Detail.PoBillNum = n.采购订单号.ToUpper(); + _t_RECEIVE_Detail.PoLine = Int32.Parse(n.行号); + _t_RECEIVE_Detail.PartCode = n.零件编号.ToUpper(); + _t_RECEIVE_Detail.Batch = n.批次; + _t_RECEIVE_Detail.VendBatch = n.供应商批次; + _t_RECEIVE_Detail.PoUnit = n.单位; + _t_RECEIVE_Detail.LocUnit = ""; + _t_RECEIVE_Detail.Qty = decimal.Parse(n.数量); + _t_RECEIVE_Detail.State = (int)FormState.开放; + _t_RECEIVE_Detail.Remark = _ask.AskBillNum; + _t_RECEIVE_Detail.CreateTime = p_time; + _t_RECEIVE_Detail.CreateUser = p_creator; + _t_RECEIVE_Detail.IsDeleted = false; + _t_RECEIVE_Detail.GUID = System.Guid.NewGuid(); + _t_RECEIVE_Detail.BillType = 0; + db.TB_RECEIVE_DETAIL.Add(_t_RECEIVE_Detail); + }); + + }); + }); + } + else + { + _ret.MessageList.Add("请检查数据后,重新导入!"); + return; + } + + if (_ret.MessageList.Count == 0) + { + int state = db.SaveChanges(); + if (state != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + ); + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "EXCEL_ASN", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "EXCEL_ASN", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "EXCEL_ASN", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "EXCEL_ASN", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + + } + private static List CheckExcel(ScpEntities db, SCP_ASN_EXCEL p_excel) + { + List ErrorList = new List(); + if (!string.IsNullOrEmpty(p_excel.采购订单号)) + { + int count = db.TB_PO_DETAIL.Count(p => p.PoBillNum == p_excel.采购订单号&&p.PartCode== p_excel.零件编号&&p.PoLine== Int32.Parse( p_excel.行号)); + if (count == 0) + { + ErrorList.Add(string.Format("订单编号{0}零件号{1}行号{2}不存在!", p_excel.采购订单号,p_excel.零件编号, p_excel.行号)); + } + } + else + { + ErrorList.Add(string.Format("订单编号为空!")); + } + if ( + string.IsNullOrEmpty(p_excel.收货单号) || + string.IsNullOrEmpty(p_excel.采购订单号) || + string.IsNullOrEmpty(p_excel.供应商编码) || + string.IsNullOrEmpty(p_excel.价格) || + string.IsNullOrEmpty(p_excel.零件编号) || + string.IsNullOrEmpty(p_excel.行号) || + string.IsNullOrEmpty(p_excel.批次) || + string.IsNullOrEmpty(p_excel.数量) || + string.IsNullOrEmpty(p_excel.单位) || + string.IsNullOrEmpty(p_excel.价格)) + { + ErrorList.Add(string.Format("收货单号【{1}】零件号【{0}】有填写为空!", p_excel.零件编号, p_excel.收货单号)); + } + return ErrorList; + } + } +} diff --git a/北京北汽/SCP/Controller/SCP_BARCODE_CONTROLLER _SYJB.cs b/北京北汽/SCP/Controller/SCP_BARCODE_CONTROLLER _SYJB.cs new file mode 100644 index 0000000..00f33d6 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_BARCODE_CONTROLLER _SYJB.cs @@ -0,0 +1,384 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System.Data.Entity.Core; + +namespace CK.SCP.Controller +{ + public static class SCP_BARCODE_CONTROLLER_SYJB + { + public static ResultObject> CreateBarcodeList(V_TB_ASN_DETAIL p_entity, int cnt = 1) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var list = new List(); + var part = db.TA_PART.FirstOrDefault(p => p.PartCode == p_entity.PartCode); + if (part == null) + { + _ret.MessageList.Add("Ϣδҵñ!"); + //throw e; + } + var vendPart + = db.TA_VEND_PART.FirstOrDefault(p => p.PartCode == p_entity.PartCode && p.VendId == p_entity.VendId); + var ret = GetBarcodeRule(p_entity.PartCode, p_entity.Batch, cnt); + + var _part = db.TA_PART.FirstOrDefault(p => p.PartCode == p_entity.PartCode && p.Site == p_entity.Site); + + if (ret.State == ReturnStatus.Succeed) + { + var barcodeRule = ret.Result; + var askbillnum = p_entity.AskBillNum; + for (int i = cnt; i > 0; i--) + { + var createTime = ScpCache.GetServerTime(); + var code = GetLastBarCode(p_entity.PartCode, p_entity.Batch, barcodeRule.LastNumber - i + 1); + if (p_entity.Site == "0210") + { + string datestr= p_entity.Batch; + if (p_entity.ProduceDate != null) + { + DateTime dttemp; + if (DateTime.TryParse(p_entity.ProduceDate.ToString(), out dttemp)) + { + datestr = dttemp.ToString("yyMMdd");// + } + } + code = GetLastBarCode_SYJB(p_entity.PartCode, datestr, barcodeRule.LastNumber - i + 1); + } + + if (part.PartDesc1.ToUpper().Contains("") || part.PartDesc1.ToUpper().Contains("LEFT") || + part.PartDesc2.ToUpper().Contains("") || part.PartDesc1.ToUpper().Contains("LEFT")) + p_entity.Remark = "L" + p_entity.Remark; + if (part.PartDesc1.ToUpper().Contains("") || part.PartDesc1.ToUpper().Contains("LEFT") || + part.PartDesc2.ToUpper().Contains("") || part.PartDesc1.ToUpper().Contains("LEFT")) + p_entity.Remark = "R" + p_entity.Remark; + string _check = (_part.Ischeck == false || _part.Ischeck == null) ? "" : "()"; + var barcode = new TS_BARCODE + { + BarCode = code, + PartCode = part.PartCode, + VendPartCode = vendPart?.VendPartCode, + Batch = p_entity.Batch, + ProduceDate = (DateTime)p_entity.ProduceDate, + SerialNum = barcodeRule.LastNumber.ToString(ScpCache.Config.кŸʽ), + PoUnit = p_entity.PoUnit, + Qty = p_entity.Qty, + BarCodeType = 1, + BillNum = p_entity.AsnBillNum, + PoBillNum = p_entity.PoBillNum, + PoBillLine = p_entity.PoLine, + VendId = p_entity.VendId, + VendBatch = p_entity.VendBatch, + CreateTime = p_entity.CreateTime, + CreateOper = p_entity.CreateUser, + State = 0, + Remark = p_entity.Remark, + PackQty = p_entity.PackQty, + Site = p_entity.Site + + }; + + if (_part == null) + { + _ret.MessageList.Add("δҵ,ŻصϢ," + p_entity.PartCode); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "CreateBarcodeList", "δҵ,ŻصϢ," + p_entity.PartCode); + } + else + { + var _isCheck = (_part.Ischeck == null) ? false : _part.Ischeck; + barcode.Qlevel = _part.Qlevel; + barcode.QMark = (_isCheck == true) ? "" : ""; + barcode.ProjectId = _part.ProjectId; + } + var fullCode = GetFullCode(barcode, askbillnum); + barcode.FullBarCode = fullCode; + list.Add(barcode); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = list; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Message = "!"; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//ʵ֤쳣 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("{0}ֶΣ{1}Ϣ{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "CreateBarcodeList", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "ֶ֤ʧ" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//ͻ쳣 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "CreateBarcodeList", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "CreateBarcodeList", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "CreateBarcodeList", e.Message); + throw e; + } + return _ret; + } + + public static string GetFullCode(TS_BARCODE barcode, string askbillnum) + { + var fullcode = string.Empty; + switch (ScpCache.Config.άʽ) + { + case "1": + fullcode = GetFullCode(barcode.BarCode, barcode.Qty, barcode.VendId, barcode.VendBatch, barcode.BillNum, + barcode.PoBillLine, barcode.ProduceDate, askbillnum,barcode.PoBillNum); + break; + case "2": + var barcodeS = new TS_BARCODE_S + { + B = barcode.BarCode, + P = barcode.PartCode, + T = barcode.Batch, + D = barcode.ProduceDate.Date, + Q = barcode.Qty, + N = barcode.BillNum, + L = barcode.PoBillLine, + V = barcode.VendId, + C = barcode.VendBatch, + //E = barcode.EqptCode, + K = barcode.PackQty, + }; + fullcode = JsonHelper.GetJson(barcodeS); + break; + } + return fullcode; + } + public static string GetFullCode(string code, decimal qty, string vendId, string vendBatch, string billnum, int linnum, + DateTime productDate, string askbillnum,string pobillnum) + { + string sp = ";"; + string fullCode = string.Empty; + fullCode += code + sp; + fullCode += qty + sp; + fullCode += vendId + sp; + fullCode += vendBatch + sp; + //fullCode += billnum + "." + linnum + sp; + fullCode += pobillnum + "." + linnum + sp; + fullCode += productDate.ToString("yyyy/MM/dd") + sp; + fullCode += askbillnum + sp; + return fullCode; + } + + + public static TS_BARCODE CreateBarcode(V_TB_ASN_DETAIL p_entity) + { + var ret = CreateBarcodeList(p_entity); + + if (ret.State == ReturnStatus.Succeed) + { + return ret.Result[0]; + } + return null; + + } + + + private static ResultObject GetBarcodeRule(string partcode, string batch, int cnt = 1) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + var ruleBatch = batch.Substring(0, 4); + var barcodeRule = db.TS_BARCODE_RULE.Find(partcode, ruleBatch); + if (barcodeRule == null) + { + barcodeRule = new TS_BARCODE_RULE + { + PartCode = partcode, + RuleBatch = ruleBatch, + LastNumber = cnt, + State = 0 + }; + } + else + { + barcodeRule.LastNumber += cnt; + } + + barcodeRule.LastBarCode = GetLastBarCode(partcode, batch, barcodeRule.LastNumber); + barcodeRule.LastTime = ScpCache.GetServerTime(); + + db.TS_BARCODE_RULE.AddOrUpdate(p => new { p.PartCode, p.RuleBatch }, barcodeRule); + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = barcodeRule; + + } + else + { + _ret.State = ReturnStatus.Failed; + + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//ʵ֤쳣 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("{0}ֶΣ{1}Ϣ{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "GetBarcodeRule", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "ֶ֤ʧ" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//ͻ쳣 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "GetBarcodeRule", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "GetBarcodeRule", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "GetBarcodeRule", e.Message); + throw e; + } + return _ret; + } + private static string GetLastBarCode(string partcode, string batch, int lastnum) + { + + var barcode = string.Empty; + barcode += partcode + ScpCache.Config.ָ; + + if (ScpCache.Config.Ӧ̼) + { + barcode += batch + ScpCache.Config.ָ; + } + else + { + barcode += batch + ScpCache.Config.ָ; + } + barcode += lastnum.ToString(ScpCache.Config.кŸʽ); + return barcode; + } + private static string GetLastBarCode_SYJB(string partcode, string producedate, int lastnum) + { + + var barcode = string.Empty; + barcode += partcode + ScpCache.Config.ָ; + + if (ScpCache.Config.Ӧ̼) + { + barcode += producedate + ScpCache.Config.ָ; + } + else + { + barcode += producedate + ScpCache.Config.ָ; + } + barcode += lastnum.ToString(ScpCache.Config.кŸʽ); + return barcode; + } + } + public class TS_BARCODE_S_SYJB + { + public string B { get; set; }//barcode + + public string P { get; set; }//partcode + + public string T { get; set; }//batch + + public DateTime D { get; set; }//producedate + + public decimal Q { get; set; }//qty + + public string N { get; set; }//billnum + + public int L { get; set; }//billline + + public string V { get; set; }//VendId + + public string C { get; set; }//vendbatch + + public string E { get; set; }//eqptcode + + public decimal K { get; set; }//packqty + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Controller/SCP_BARCODE_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_BARCODE_CONTROLLER.cs new file mode 100644 index 0000000..bcd8c08 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_BARCODE_CONTROLLER.cs @@ -0,0 +1,690 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System.Data.Entity.Core; + +namespace CK.SCP.Controller +{ + public static class SCP_BARCODE_CONTROLLER + { + + public static ResultObject Save_TB_PRINT_COUNT(TB_PRINT_COUNT p_entity) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _print=db.TB_PRINT_COUNT.Where(p => p.BillNo == p_entity.BillNo).FirstOrDefault(); + if (_print == null) + { + _print = new TB_PRINT_COUNT(); + _print.BillNo = p_entity.BillNo; + _print.PrintType = p_entity.PrintType; + _print.PrintCount = 1; + } + db.TB_PRINT_COUNT.AddOrUpdate(p => new {p.PrintType,p.BillNo }, p_entity); + + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//ʵ֤쳣 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("{0}ֶΣ{1}Ϣ{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "Save_TB_PRINT_COUNT", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "ֶ֤ʧ" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//ͻ쳣 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "Save_TB_PRINT_COUNT", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "Save_TB_PRINT_COUNT", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "Save_TB_PRINT_COUNT", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + public static ResultObject> Get_TB_PRINT_COUNT_List(TB_PRINT_COUNT p_entity) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.TB_PRINT_COUNT; + if (!string.IsNullOrEmpty(p_entity.BillNo)) + { + q = q.Where(p => p.BillNo.Contains(p_entity.BillNo)); + } + if (p_entity.PrintCount != 0) + { + q = q.Where(p => p.PrintCount == p_entity.PrintCount); + } + if (p_entity.PrintType != 0) + { + q = q.Where(p => p.PrintType == p_entity.PrintType); + } + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.ToList(); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//ʵ֤쳣 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("{0}ֶΣ{1}Ϣ{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "Get_TB_PRINT_COUNT_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "ֶ֤ʧ" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//ͻ쳣 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "Get_TB_PRINT_COUNT_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "Get_TB_PRINT_COUNT_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "Get_TB_PRINT_COUNT_List", e.Message); + throw e; + } + return _ret; + } + public static TB_ASN GetBillNum(string asn) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TB_ASN.Where(p => p.AsnBillNum==asn).FirstOrDefault(); + } + } + public static List GetBacode(string asn) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TS_BARCODE.Where(p => p.BillNum == asn).ToList(); + } + } + public static void Get_TS_BARCODE_List(TS_BARCODE p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.TS_BARCODE; + + if (!string.IsNullOrEmpty(p_entity.BarCode)) + { + q = q.Where(p => p.BarCode == p_entity.BarCode); + } + if (!string.IsNullOrEmpty(p_entity.FullBarCode)) + { + q = q.Where(p => p.FullBarCode == p_entity.FullBarCode); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode == p_entity.PartCode); + } + if (!string.IsNullOrEmpty(p_entity.VendPartCode)) + { + q = q.Where(p => p.VendPartCode == p_entity.VendPartCode); + } + if (!string.IsNullOrEmpty(p_entity.Batch)) + { + q = q.Where(p => p.Batch == p_entity.Batch); + } + if (p_entity.ManageType != 0) + { + q = q.Where(p => p.ManageType == p_entity.ManageType); + } + if (!string.IsNullOrEmpty(p_entity.SerialNum)) + { + q = q.Where(p => p.SerialNum.Contains(p_entity.SerialNum)); + } + if (p_entity.Qty != 0) + { + q = q.Where(p => p.Qty == p_entity.Qty); + } + if (p_entity.BarCodeType != 0) + { + q = q.Where(p => p.BarCodeType == p_entity.BarCodeType); + } + if (!string.IsNullOrEmpty(p_entity.BillNum)) + { + q = q.Where(p => p.BillNum.Contains(p_entity.BillNum)); + } + if (p_entity.PoBillLine != 0) + { + q = q.Where(p => p.PoBillLine == p_entity.PoBillLine); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (!string.IsNullOrEmpty(p_entity.VendBatch)) + { + q = q.Where(p => p.VendBatch == p_entity.VendBatch); + } + if (p_entity.PackQty != 0) + { + q = q.Where(p => p.PackQty == p_entity.PackQty); + } + if (!string.IsNullOrEmpty(p_entity.CreateOper)) + { + q = q.Where(p => p.CreateOper.Contains(p_entity.CreateOper)); + } + if (p_entity.State != 0) + { + q = q.Where(p => p.State == p_entity.State); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.PoUnit)) + { + q = q.Where(p => p.PoUnit.Contains(p_entity.PoUnit)); + } + if (!string.IsNullOrEmpty(p_entity.LocUnit)) + { + q = q.Where(p => p.LocUnit.Contains(p_entity.LocUnit)); + } + //if (!string.IsNullOrEmpty(p_entity.PartName)) + //{ + // q = q.Where(p => p.PartName.Contains(p_entity.PartName)); + //} + //if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + //{ + // q = q.Where(p => p_entity.UserInAddress.Contains(p.Address)); + //} + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//ʵ֤쳣 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("{0}ֶΣ{1}Ϣ{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "Get_TS_BARCODE_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "ֶ֤ʧ" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//ͻ쳣 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "Get_TS_BARCODE_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "Get_TS_BARCODE_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "Get_TS_BARCODE_List", e.Message); + throw e; + } + + } + + public static ResultObject> CreateBarcodeList(V_TB_ASN_DETAIL p_entity, int cnt = 1) + { + + ResultObject> _ret = new ResultObject>(); + try + { + + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var list = new List(); + var part = db.TA_PART.FirstOrDefault(p => p.PartCode == p_entity.PartCode); + if (part == null) + { + _ret.MessageList.Add("Ϣδҵñ!"); + //throw e; + } + var vendPart + = db.TA_VEND_PART.FirstOrDefault(p => p.PartCode == p_entity.PartCode && p.VendId == p_entity.VendId); + var ret = GetBarcodeRule(p_entity.PartCode, p_entity.Batch, cnt); + + var _part=db.TA_PART.FirstOrDefault(p=>p.PartCode==p_entity.PartCode && p.Site==p_entity.Site); + + if (ret.State == ReturnStatus.Succeed) + { + var barcodeRule = ret.Result; + for (int i = cnt; i > 0; i--) + { + var createTime = ScpCache.GetServerTime(); + var code = GetLastBarCode(p_entity.PartCode, p_entity.Batch, barcodeRule.LastNumber - i + 1); + if (part.PartDesc1.ToUpper().Contains("") || part.PartDesc1.ToUpper().Contains("LEFT") || + part.PartDesc2.ToUpper().Contains("") || part.PartDesc1.ToUpper().Contains("LEFT")) + p_entity.Remark = "L" + p_entity.Remark; + if (part.PartDesc1.ToUpper().Contains("") || part.PartDesc1.ToUpper().Contains("LEFT") || + part.PartDesc2.ToUpper().Contains("") || part.PartDesc1.ToUpper().Contains("LEFT")) + p_entity.Remark = "R" + p_entity.Remark; + string _check = (_part.Ischeck == false || _part.Ischeck == null) ? "" : "()"; + var barcode = new TS_BARCODE + { + BarCode = code, + PartCode = part.PartCode, + VendPartCode = vendPart?.VendPartCode, + Batch = p_entity.Batch, + ProduceDate = (DateTime)p_entity.ProduceDate, + SerialNum = barcodeRule.LastNumber.ToString(ScpCache.Config.кŸʽ), + PoUnit = p_entity.PoUnit, + Qty = p_entity.Qty, + BarCodeType = 1, + BillNum = p_entity.AsnBillNum, + PoBillNum=p_entity.PoBillNum, + PoBillLine = p_entity.PoLine, + VendId = p_entity.VendId, + VendBatch = p_entity.VendBatch, + CreateTime = p_entity.CreateTime, + CreateOper = p_entity.CreateUser, + State = 0, + Remark = part.Remark, + PackQty = p_entity.PackQty, + Site = p_entity.Site + + }; + + if (_part == null) + { + _ret.MessageList.Add("δҵ,ŻصϢ,"+ p_entity.PartCode); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "CreateBarcodeList", "δҵ,ŻصϢ," + p_entity.PartCode); + } + else + { + var _isCheck=(_part.Ischeck == null)?false:_part.Ischeck; + barcode.Qlevel = _part.Qlevel; + barcode.QMark = (_isCheck == true) ? "" : "ȫ"; + barcode.ProjectId = _part.ProjectId; + } + var fullCode = GetFullCode(barcode); + barcode.FullBarCode = fullCode; + list.Add(barcode); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = list; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Message = "!"; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//ʵ֤쳣 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("{0}ֶΣ{1}Ϣ{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "CreateBarcodeList", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "ֶ֤ʧ" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//ͻ쳣 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "CreateBarcodeList", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "CreateBarcodeList", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "CreateBarcodeList", e.Message); + throw e; + } + return _ret; + } + + public static string GetFullCode(TS_BARCODE barcode) + { + var fullcode = string.Empty; + switch (ScpCache.Config.άʽ) + { + case "1": + fullcode = + GetFullCode(barcode.BarCode, barcode.Qty, barcode.VendId, barcode.VendBatch, barcode.PoBillNum, + barcode.PoBillLine, barcode.ProduceDate,barcode.BillNum); + break; + //case "2": + // var barcodeS = new TS_BARCODE_S + // { + // B = barcode.BarCode, + // P = barcode.PartCode, + // T = barcode.Batch, + // D = barcode.ProduceDate.Date, + // Q = barcode.Qty, + // N = barcode.BillNum, + // L = barcode.PoBillLine, + // V = barcode.VendId, + // C = barcode.Batch, + // //E = barcode.EqptCode, + // K = barcode.PackQty, + // }; + // fullcode = JsonHelper.GetJson(barcodeS); + // break; + } + return fullcode; + } + public static string GetFullCode(string code, decimal qty, string vendId, string vendBatch, string billnum, int linnum, + DateTime productDate,string asnbillnum) + { + string sp = ";"; + string fullCode = string.Empty; + fullCode += code + sp; + fullCode += qty + sp; + fullCode += vendId + sp; + fullCode += vendBatch + sp; + fullCode += billnum + "." + linnum + sp; + fullCode += productDate.ToString("yyyy/MM/dd") + sp; + fullCode += asnbillnum + sp; + + return fullCode; + } + + + public static TS_BARCODE CreateBarcode(V_TB_ASN_DETAIL p_entity) + { + var ret = CreateBarcodeList(p_entity); + + if (ret.State == ReturnStatus.Succeed) + { + return ret.Result[0]; + } + return null; + + } + + + private static ResultObject GetBarcodeRule( string partcode, string batch, int cnt = 1) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + var ruleBatch = batch.Substring(0, 4); + var barcodeRule = db.TS_BARCODE_RULE.Find(partcode, ruleBatch); + if (barcodeRule == null) + { + barcodeRule = new TS_BARCODE_RULE + { + PartCode = partcode, + RuleBatch = ruleBatch, + LastNumber = cnt, + State = 0 + }; + } + else + { + barcodeRule.LastNumber += cnt; + } + + barcodeRule.LastBarCode = GetLastBarCode(partcode, batch, barcodeRule.LastNumber); + barcodeRule.LastTime = ScpCache.GetServerTime(); + + db.TS_BARCODE_RULE.AddOrUpdate(p => new { p.PartCode, p.RuleBatch }, barcodeRule); + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = barcodeRule; + + } + else + { + _ret.State = ReturnStatus.Failed; + + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//ʵ֤쳣 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("{0}ֶΣ{1}Ϣ{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "GetBarcodeRule", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "ֶ֤ʧ" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//ͻ쳣 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "GetBarcodeRule", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "GetBarcodeRule", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "GetBarcodeRule", e.Message); + throw e; + } + return _ret; + } + private static string GetLastBarCode(string partcode, string batch, int lastnum) + { + + var barcode = string.Empty; + barcode += partcode + ScpCache.Config.ָ; + + if (ScpCache.Config.Ӧ̼) + { + barcode += batch + ScpCache.Config.ָ; + } + else + { + barcode += batch + ScpCache.Config.ָ; + } + barcode += lastnum.ToString(ScpCache.Config.кŸʽ); + return barcode; + } + + + } + + public class TS_BARCODE_S + { + public string B { get; set; }//barcode + + public string P { get; set; }//partcode + + public string T { get; set; }//batch + + public DateTime D { get; set; }//producedate + + public decimal Q { get; set; }//qty + + public string N { get; set; }//billnum + + public int L { get; set; }//billline + + public string V { get; set; }//VendId + + public string C { get; set; }//vendbatch + + public string E { get; set; }//eqptcode + + public decimal K { get; set; }//packqty + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Controller/SCP_BARCODE_CONTROLLER_CUSTOM.cs b/北京北汽/SCP/Controller/SCP_BARCODE_CONTROLLER_CUSTOM.cs new file mode 100644 index 0000000..a47b2ff --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_BARCODE_CONTROLLER_CUSTOM.cs @@ -0,0 +1,507 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System.Data.Entity.Core; + +namespace CK.SCP.Controller +{ + public static class SCP_BARCODE_CONTROLLER_CUSTOM + { + public static void Get_TS_BARCODE_List_CUSTOM(TS_BARCODE_CUSTOM p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.TS_BARCODE_CUSTOM; + + if (!string.IsNullOrEmpty(p_entity.BarCode)) + { + q = q.Where(p => p.BarCode == p_entity.BarCode); + } + if (!string.IsNullOrEmpty(p_entity.FullBarCode)) + { + q = q.Where(p => p.FullBarCode == p_entity.FullBarCode); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode == p_entity.PartCode); + } + if (!string.IsNullOrEmpty(p_entity.VendPartCode)) + { + q = q.Where(p => p.VendPartCode == p_entity.VendPartCode); + } + if (!string.IsNullOrEmpty(p_entity.Batch)) + { + q = q.Where(p => p.Batch == p_entity.Batch); + } + if (p_entity.ManageType != 0) + { + q = q.Where(p => p.ManageType == p_entity.ManageType); + } + if (!string.IsNullOrEmpty(p_entity.SerialNum)) + { + q = q.Where(p => p.SerialNum.Contains(p_entity.SerialNum)); + } + if (p_entity.Qty != 0) + { + q = q.Where(p => p.Qty == p_entity.Qty); + } + if (p_entity.BarCodeType != 0) + { + q = q.Where(p => p.BarCodeType == p_entity.BarCodeType); + } + if (!string.IsNullOrEmpty(p_entity.BillNum)) + { + q = q.Where(p => p.BillNum.Contains(p_entity.BillNum)); + } + if (p_entity.PoBillLine != 0) + { + q = q.Where(p => p.PoBillLine == p_entity.PoBillLine); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (!string.IsNullOrEmpty(p_entity.VendBatch)) + { + q = q.Where(p => p.VendBatch == p_entity.VendBatch); + } + if (p_entity.PackQty != 0) + { + q = q.Where(p => p.PackQty == p_entity.PackQty); + } + if (!string.IsNullOrEmpty(p_entity.CreateOper)) + { + q = q.Where(p => p.CreateOper.Contains(p_entity.CreateOper)); + } + if (p_entity.State != 0) + { + q = q.Where(p => p.State == p_entity.State); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.PoUnit)) + { + q = q.Where(p => p.PoUnit.Contains(p_entity.PoUnit)); + } + if (!string.IsNullOrEmpty(p_entity.LocUnit)) + { + q = q.Where(p => p.LocUnit.Contains(p_entity.LocUnit)); + } + if (!string.IsNullOrEmpty(p_entity.PartName)) + { + q = q.Where(p => p.PartName.Contains(p_entity.PartName)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//ʵ֤쳣 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("{0}ֶΣ{1}Ϣ{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER_CUSTOM), "Get_TS_BARCODE_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "ֶ֤ʧ" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//ͻ쳣 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER_CUSTOM), "Get_TS_BARCODE_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER_CUSTOM), "Get_TS_BARCODE_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER_CUSTOM), "Get_TS_BARCODE_List", e.Message); + throw e; + } + + } + + + + public static ResultObject> CreateBarcodeList(V_TB_ASK_DETAIL_PACKAGE p_entity, int cnt = 1) + { + + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var list = new List(); + var part = db.TA_PART.FirstOrDefault(p => p.PartCode == p_entity.PartCode); + if (part == null) + { + _ret.MessageList.Add("Ϣδҵñ!"); + //throw e; + } + var vendPart + = db.TA_VEND_PART.FirstOrDefault(p => p.PartCode == p_entity.PartCode && p.VendId == p_entity.VendId); + var ret = GetBarcodeRule(p_entity.PartCode, p_entity.Batch, cnt); + + //var _part=db.TA_PART.FirstOrDefault(p=>p.PartCode==p_entity.PartCode && p.Site==p_entity.Site); + + if (ret.State == ReturnStatus.Succeed) + { + var barcodeRule = ret.Result; + for (int i = cnt; i > 0; i--) + { + var createTime = ScpCache.GetServerTime(); + var code = GetLastBarCode(p_entity.PartCode, p_entity.Batch, barcodeRule.LastNumber - i + 1); + if (part.PartDesc1.ToUpper().Contains("") || part.PartDesc1.ToUpper().Contains("LEFT") || + part.PartDesc2.ToUpper().Contains("") || part.PartDesc1.ToUpper().Contains("LEFT")) + p_entity.Remark = "L" + p_entity.Remark; + if (part.PartDesc1.ToUpper().Contains("") || part.PartDesc1.ToUpper().Contains("LEFT") || + part.PartDesc2.ToUpper().Contains("") || part.PartDesc1.ToUpper().Contains("LEFT")) + p_entity.Remark = "R" + p_entity.Remark; + //string _check = (_part.Ischeck == false || _part.Ischeck == null) ? "" : "()"; + var barcode = new TS_BARCODE_CUSTOM + { + BarCode = code, + PartCode = part.PartCode, + VendPartCode = vendPart?.VendPartCode, + Batch = p_entity.Batch, + ProduceDate = (DateTime)p_entity.ProduceDate, + SerialNum = barcodeRule.LastNumber.ToString(ScpCache.Config.кŸʽ), + PoUnit = p_entity.PoUnit, + Qty = p_entity.Qty==null?0:(decimal)p_entity.Qty, + BarCodeType = 1, + BillNum = p_entity.PoBillNum, + PoBillNum=p_entity.PoBillNum, + PoBillLine = p_entity.PoLine, + VendId = p_entity.VendId, + VendBatch = p_entity.Batch, + CreateTime = p_entity.CreateTime, + CreateOper = p_entity.CreateUser, + State = 0, + Remark = p_entity.Remark, + PackQty = (decimal)p_entity.PackQty, + Site = p_entity.Site + + }; + + //if (_part == null) + //{ + // _ret.MessageList.Add("δҵ,ŻصϢ,"+ p_entity.PartCode); + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER_CUSTOM), "CreateBarcodeList", "δҵ,ŻصϢ," + p_entity.PartCode); + //} + //else + //{ + // var _isCheck=(_part.Ischeck == null)?false:_part.Ischeck; + // barcode.Qlevel = _part.Qlevel; + // barcode.QMark = (_isCheck == true) ? "" : "ȫ"; + // barcode.ProjectId = _part.ProjectId; + //} + var fullCode = GetFullCode(barcode); + barcode.FullBarCode = fullCode; + list.Add(barcode); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = list; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Message = "!"; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//ʵ֤쳣 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("{0}ֶΣ{1}Ϣ{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER_CUSTOM), "CreateBarcodeList", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "ֶ֤ʧ" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//ͻ쳣 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER_CUSTOM), "CreateBarcodeList", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER_CUSTOM), "CreateBarcodeList", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER_CUSTOM), "CreateBarcodeList", e.Message); + throw e; + } + return _ret; + } + + public static string GetFullCode(TS_BARCODE_CUSTOM barcode) + { + var fullcode = string.Empty; + switch (ScpCache.Config.άʽ) + { + case "1": + fullcode = + GetFullCode(barcode.BarCode, barcode.Qty, barcode.VendId, barcode.VendBatch, barcode.PoBillNum, + barcode.PoBillLine, barcode.ProduceDate,barcode.BillNum); + break; + //case "2": + // var barcodeS = new TS_BARCODE_S + // { + // B = barcode.BarCode, + // P = barcode.PartCode, + // T = barcode.Batch, + // D = barcode.ProduceDate.Date, + // Q = barcode.Qty, + // N = barcode.BillNum, + // L = barcode.PoBillLine, + // V = barcode.VendId, + // C = barcode.Batch, + // //E = barcode.EqptCode, + // K = barcode.PackQty, + // }; + // fullcode = JsonHelper.GetJson(barcodeS); + // break; + } + return fullcode; + } + public static string GetFullCode(string code, decimal qty, string vendId, string vendBatch, string billnum, int linnum, + DateTime productDate,string asnbillnum) + { + string sp = ";"; + string fullCode = string.Empty; + fullCode += code + sp; + fullCode += qty + sp; + fullCode += vendId + sp; + fullCode += vendBatch + sp; + fullCode += billnum + "." + linnum + sp; + fullCode += productDate.ToString("yyyy/MM/dd") + sp; + fullCode += asnbillnum + sp; + + return fullCode; + } + + + public static TS_BARCODE_CUSTOM CreateBarcode(V_TB_ASK_DETAIL_PACKAGE p_entity) + { + var ret = CreateBarcodeList(p_entity); + + if (ret.State == ReturnStatus.Succeed) + { + return ret.Result[0]; + } + return null; + + } + + + private static ResultObject GetBarcodeRule( string partcode, string batch, int cnt = 1) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + var ruleBatch = batch.Substring(0, 4); + //var barcodeRule = db.TS_BARCODE_RULE_CUSTOM.Find(partcode, ruleBatch); + //if (barcodeRule == null) + //{ + var barcodeRule = new TS_BARCODE_RULE_CUSTOM + { + PartCode = partcode, + RuleBatch = ruleBatch, + LastNumber = cnt, + State = 0 + }; + //} + //else + //{ + // barcodeRule.LastNumber += cnt; + //} + + barcodeRule.LastBarCode = GetLastBarCode(partcode, batch, barcodeRule.LastNumber); + barcodeRule.LastTime = ScpCache.GetServerTime(); + + //db.TS_BARCODE_RULE_CUSTOM.AddOrUpdate(p => new { p.PartCode, p.RuleBatch }, barcodeRule); + //if (db.SaveChanges() != -1) + //{ + _ret.State = ReturnStatus.Succeed; + _ret.Result = barcodeRule; + + //} + //else + //{ + // _ret.State = ReturnStatus.Failed; + + //} + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//ʵ֤쳣 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("{0}ֶΣ{1}Ϣ{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER_CUSTOM), "GetBarcodeRule", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "ֶ֤ʧ" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//ͻ쳣 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER_CUSTOM), "GetBarcodeRule", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER_CUSTOM), "GetBarcodeRule", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER_CUSTOM), "GetBarcodeRule", e.Message); + throw e; + } + return _ret; + } + private static string GetLastBarCode(string partcode, string batch, int lastnum) + { + + var barcode = string.Empty; + barcode += partcode + ScpCache.Config.ָ; + + if (ScpCache.Config.Ӧ̼) + { + barcode += batch + ScpCache.Config.ָ; + } + else + { + barcode += batch + ScpCache.Config.ָ; + } + barcode += lastnum.ToString(ScpCache.Config.кŸʽ); + return barcode; + } + + + } + + public class TS_BARCODE_S_CUSTOM + { + public string B { get; set; }//barcode + + public string P { get; set; }//partcode + + public string T { get; set; }//batch + + public DateTime D { get; set; }//producedate + + public decimal Q { get; set; }//qty + + public string N { get; set; }//billnum + + public int L { get; set; }//billline + + public string V { get; set; }//VendId + + public string C { get; set; }//vendbatch + + public string E { get; set; }//eqptcode + + public decimal K { get; set; }//packqty + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Controller/SCP_BILLCODE_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_BILLCODE_CONTROLLER.cs new file mode 100644 index 0000000..cf23a48 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_BILLCODE_CONTROLLER.cs @@ -0,0 +1,276 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Infrastructure; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Utils; + +namespace CK.SCP.Controller +{ + public class SCP_BILLCODE_CONTROLLER + { + + public static string MakePLAN_ASKCode() + { + + return GetTablePK("E", "TB_ASK", "AskBillNum", "yyMMdd", 4); + + } + + public static string MakePLAN_EXTEND_ASKCode() + { + + return GetTablePK("U", "TB_ASK", "AskBillNum", "yyMMdd", 4); + + } + public static string MakePOCode() + { + + return GetTablePK("P", "TB_PO", "PoBillNum", "yyMMdd", 4); + + } + public static string MakeQualityCode() + { + + return GetTablePK("Q", "TB_QUALITY", "QualityNo", "yyMMdd", 4); + + } + public static string MakeASNCode() + { + + return GetTablePK("N", "TB_ASN", "AsnBillNum", "yyMMdd", 4); + + } + public static string MakeASNCode_BJBQ(string str) + { + + return GetTablePK(str, "TB_ASN", "AsnBillNum", "yyMMdd", 4); + + } + public static string MakePalletCode() + { + + return GetTablePK("G", "TB_PALLET", "PalletNum", "yyMMdd", 4); + + } + /// + /// 生成托盘码(青岛) + /// + /// 一次性生成多个号使用 + /// + public static string MakePalletCode_QD(int num) + { + + return GetTablePK_QD("G", "TB_PALLETS", "PalletNum", "yyMMdd", 4,num); + + } + public static string MakeASKCode_BJBQ(int num) + { + + return GetTablePK_BJBQ("K", "TB_ASK", "AskBillNum", "yyMMdd", 4,num); + + } + public static string MakeASKCode() + { + + return GetTablePK("K", "TB_ASK", "AskBillNum", "yyMMdd", 4); + + } + public static string MakeASKCode1() + { + + return GetTablePK("K", "TB_ASK", "AskBillNum", "ddMMyy", 4); + + } + /// + /// 生成收货单码 + /// + /// + public static string MakeReviceCode_ASN() + { + + return GetTablePK("C", "TB_RECEIVE", "RecvBillNum", "yyMMdd", 4); + + } + public static string MakeReviceCode() + { + + return GetTablePK("R", "TB_RECEIVE", "RecvBillNum", "yyMMdd", 4); + + } + public static string MakeRejectCode() + { + + return GetTablePK("J", "TB_REJECT", "RjctBillNum", "yyMMdd", 4); + + } + public static string MakeInvoiceCode() + { + + return GetTablePK("F", "TB_INVOICE", "InvcBillNum", "yyMMdd", 4); + + } + public static string MakeInvoiceCode(string p_vendId) + { + + return GetTablePK(p_vendId,"F" ,"TB_INVOICE", "InvcBillNum", "yyMMdd", 4); + + } + + public static string MakeCode(string p_Header, string p_TableName,string p_ColumnName) + { + + return GetTablePK(p_Header, p_TableName, p_ColumnName, "yyMMdd",4); + + } + public static string MakePoNum(int num=1) + { + return GetTablePO("P", "TB_PO", "PoBillNum", 7,num); + } + public static string GetTablePO(string Ext, string TableName, string ColName, int len,int num) + { + var _result = string.Empty; + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + string sql = "select max(right(" + ColName + "," + len.ToString() + ")+"+ num + ") from " + TableName + " where " + ColName + " like '%P[0-9]%' "; + DbRawSqlQuery result = db.Database.SqlQuery(sql); + var obj = result.FirstOrDefault(); + if (obj == null) + { + _result = Ext + "1".PadLeft(len, '0'); + } + else + { + _result = Ext + result.FirstOrDefault().ToString().PadLeft(len, '0'); + } + } + } + catch (Exception e) + { + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BILLCODE_CONTROLLER), "GetTablePK", e.Message); + } + return _result; + } + public static string GetTablePK_BJBQ(string Ext, string TableName, string ColName, string Format, int len,int num) + { + var _result = string.Empty; + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + string time = Ext + DateTime.Now.ToString(Format); + string sql = "select max(right(" + ColName + "," + len.ToString() + ")+"+ num + ") from " + TableName + " where " + ColName + " like '" + time + "%'"; + DbRawSqlQuery result = db.Database.SqlQuery(sql); + var obj = result.FirstOrDefault(); + if (obj == null) + { + _result = time + num.ToString().PadLeft(len, '0'); + } + else + { + _result = time + result.FirstOrDefault().ToString().PadLeft(len, '0'); + } + } + } + catch (Exception e) + { + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BILLCODE_CONTROLLER), "GetTablePK", e.Message); + } + return _result; + } + public static string GetTablePK(string Ext, string TableName, string ColName, string Format, int len) + { + var _result = string.Empty; + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + string time = Ext + DateTime.Now.ToString(Format); + string sql = "select max(right(" + ColName + "," + len.ToString() + ")+1) from " + TableName + " where " + ColName + " like '" + time + "%'"; + DbRawSqlQuery result = db.Database.SqlQuery(sql); + var obj = result.FirstOrDefault(); + if (obj==null) + { + _result= time + "1".PadLeft(len, '0'); + } + else + { + _result= time + result.FirstOrDefault().ToString().PadLeft(len, '0'); + } + } + } + catch(Exception e) + { + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BILLCODE_CONTROLLER), "GetTablePK", e.Message); + } + return _result; + } + + public static string GetTablePK(string p_vendId,string Ext, string TableName, string ColName, string Format, int len) + { + var _result = string.Empty; + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + string time =p_vendId+"_"+ Ext + DateTime.Now.ToString(Format); + string sql = "select max(right(" + ColName + "," + len.ToString() + ")+1) from " + TableName + " where " + ColName + " like '" + time + "%'"; + DbRawSqlQuery result = db.Database.SqlQuery(sql); + var obj = result.FirstOrDefault(); + if (obj == null) + { + _result = time + "1".PadLeft(len, '0'); + } + else + { + _result = time + result.FirstOrDefault().ToString().PadLeft(len, '0'); + } + } + } + catch (Exception e) + { + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BILLCODE_CONTROLLER), "GetTablePK", e.Message); + } + return _result; + } + + + public static string GetTablePK_QD(string Ext, string TableName, string ColName, string Format, int len,int num) + { + var _result = string.Empty; + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + string time = Ext + DateTime.Now.ToString(Format); + string sql = "select max(right(" + ColName + "," + len.ToString() + ")+1) from " + TableName + " where " + ColName + " like '" + time + "%'"; + DbRawSqlQuery result = db.Database.SqlQuery(sql); + var obj = result.FirstOrDefault(); + if (obj == null) + { + _result = time + num.ToString().PadLeft(len, '0'); + } + else + { + _result = time + (result.FirstOrDefault()+num).ToString().PadLeft(len, '0'); + } + } + } + catch (Exception e) + { + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BILLCODE_CONTROLLER), "GetTablePK", e.Message); + } + return _result; + } + } + + + + + +} diff --git a/北京北汽/SCP/Controller/SCP_COM_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_COM_CONTROLLER.cs new file mode 100644 index 0000000..bf69e5f --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_COM_CONTROLLER.cs @@ -0,0 +1,113 @@ +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ + + + public class SCP_COM_CONTROLLER + { + + public class GridPageSearch + { + public int Begin { set; get; } + + public int End { set; get; } + + public string Fields { set; get; } + + public string Where { set; get; } + + public string OrderBy { set; get; } + public string TableView { set; get; } + public DB_CONNECTION Connection { set; get; } + public GridPageSearch() + { + Fields = " * "; + Where = " 1=1 "; + OrderBy = string.Empty; + TableView = ""; + + + + Connection = DB_CONNECTION.ScpDB; + + } + + } + public static DataSet GetDataLimit(GridPageSearch p_search) + { + DataSet ds = new DataSet(); + + var dbSetting = GlobalConfig.ScpDatabase; + switch (p_search.Connection) + { + case DB_CONNECTION.AppBoxDB: + dbSetting = GlobalConfig.AppBoxDatabase; + break; + case DB_CONNECTION.DataCenterDB: + dbSetting = GlobalConfig.DataCenterDB; + break; + case DB_CONNECTION.ExchangeCenterDB: + dbSetting = GlobalConfig.ExchangeCenterDB; + break; + case DB_CONNECTION.ScpDB: + dbSetting = GlobalConfig.ScpDatabase; + break; + case DB_CONNECTION.UniApiDB: + dbSetting = GlobalConfig.UniApiDatabase; + break; + case DB_CONNECTION.WmsDB: + dbSetting = GlobalConfig.WmsDatabase; + break; + + } + var strConn = EntitiesFactory.GetEfConnectionString(dbSetting); + SqlConnection conn = new System.Data.SqlClient.SqlConnection(); + conn.ConnectionString = strConn; + if (conn.State != ConnectionState.Open) + { + conn.Open(); + } + SqlCommand cmd = new SqlCommand(); + cmd.Connection = conn; + if (p_search.Fields == "") p_search.Fields = "*"; + + string sql = @" + select {0} from ( + select ROW_NUMBER() over(order by {1}) as rows_number_9999999, {0} from {2} where {5} + ) as query_temp_table_9999999 where rows_number_9999999 between {3} and {4} and ({5}) + "; + + + object[] obj = new object[6]; + obj[0] = p_search.Fields; + obj[1] = p_search.OrderBy; + obj[2] = p_search.TableView; + obj[3] = p_search.Begin; + obj[4] = p_search.End; + obj[5] = p_search.Where; + sql = string.Format(sql, obj); + cmd.CommandText = sql; + SqlDataAdapter adapter = new SqlDataAdapter(cmd); + adapter.Fill(ds); + + SqlCommand cmd1 = new SqlCommand(); + cmd1.Connection = conn; + cmd1.CommandText = string.Format("select count(*) from {0}",p_search.TableView); + SqlDataAdapter adapter1 = new SqlDataAdapter(cmd1); + adapter1.Fill(ds); + + conn.Close(); + return ds; + } + + } +} diff --git a/北京北汽/SCP/Controller/SCP_CONFIG_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_CONFIG_CONTROLLER.cs new file mode 100644 index 0000000..43b8314 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_CONFIG_CONTROLLER.cs @@ -0,0 +1,347 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Infrastructure; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System.Data.Entity.Core; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Controller +{ + public class SCP_CONFIG_CONTROLLER + { + + public static ResultObject> Get_TA_CONFIG_List(TA_CONFIG p_entity) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.TA_CONFIG; + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.ParamName)) + { + q = q.Where(p => p.ParamName.Contains(p_entity.ParamName)); + } + if (!string.IsNullOrEmpty(p_entity.ParamValue)) + { + q = q.Where(p => p.ParamValue.Contains(p_entity.ParamValue)); + } + + q = q.Where(p => p.State!=null && p.State > 100 ); + + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.ToList(); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONFIG_CONTROLLER), "Get_TA_CONFIG_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONFIG_CONTROLLER), "Get_TA_CONFIG_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONFIG_CONTROLLER), "Get_TA_CONFIG_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONFIG_CONTROLLER), "Get_TA_CONFIG_List", e.Message); + throw e; + } + return _ret; + } + + + public static ResultObject> Get_TA_FACTORY_CONFIG_List(TA_FACTORY_CONFIG p_entity) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.TA_FACTORY_CONFIG; + if (!string.IsNullOrEmpty(p_entity.FactoryId)) + { + q = q.Where(p => p.FactoryId == p_entity.FactoryId); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.ToList(); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONFIG_CONTROLLER), "Get_TA_FACTORY_CONFIG_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONFIG_CONTROLLER), "Get_TA_FACTORY_CONFIG_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONFIG_CONTROLLER), "Get_TA_FACTORY_CONFIG_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONFIG_CONTROLLER), "Get_TA_FACTORY_CONFIG_List", e.Message); + throw e; + } + return _ret; + } + + + public ResultObject Save_TA_CONFIG(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var itm in p_entitys) + { + db.TA_CONFIG.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONFIG_CONTROLLER), "Save_TA_CONFIG", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONFIG_CONTROLLER), "Save_TA_CONFIG", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONFIG_CONTROLLER), "Save_TA_CONFIG", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONFIG_CONTROLLER), "Save_TA_CONFIG", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public ResultObject Del_TA_CONFIG(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var itm in p_entitys) + { + db.TA_CONFIG.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONFIG_CONTROLLER), "Del_TA_CONFIG", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONFIG_CONTROLLER), "Del_TA_CONFIG", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONFIG_CONTROLLER), "Del_TA_CONFIG", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONFIG_CONTROLLER), "Del_TA_CONFIG", e.Message); throw e; + } + return _ret; + } + + + } +} diff --git a/北京北汽/SCP/Controller/SCP_CONTRACT_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_CONTRACT_CONTROLLER.cs new file mode 100644 index 0000000..4c30924 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_CONTRACT_CONTROLLER.cs @@ -0,0 +1,932 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Models.ScpEntity.ExcelImportEntity; +using CK.SCP.Utils; +using System.Data.Entity.Core; + +namespace CK.SCP.Controller +{ + + + public class SCP_CONTRACT_CONTROLLER + { + public static void Get_TB_CONTRACT_List(TB_CONTRACT p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.TB_CONTRACT; + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.ContractNo)) + { + q = q.Where(p => p.ContractNo.Contains(p_entity.ContractNo)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.UpdateUser)) + { + q = q.Where(p => p.UpdateUser.Contains(p_entity.UpdateUser)); + } + if (!string.IsNullOrEmpty(p_entity.UpdateInfo)) + { + q = q.Where(p => p.UpdateInfo.Contains(p_entity.UpdateInfo)); + } + if (p_entity.IsDeleted != false) + { + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + } + if (!string.IsNullOrEmpty(p_entity.BillNo)) + { + q = q.Where(p => p.BillNo.Contains(p_entity.BillNo)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONTRACT_CONTROLLER), "Get_TB_CONTRACT_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONTRACT_CONTROLLER), "Get_TB_CONTRACT_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONTRACT_CONTROLLER), "Get_TB_CONTRACT_List", ex.ToString()); + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONTRACT_CONTROLLER), "Get_TB_CONTRACT_List", e.Message); + throw e; + } + + } + public static ResultObject> Get_TB_CONTRACT_DETAIL_List(TB_CONTRACT_DETAIL p_entity) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.TB_CONTRACT_DETAIL; + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.BillNo)) + { + q = q.Where(p => p.BillNo.Contains(p_entity.BillNo)); + } + if (!string.IsNullOrEmpty(p_entity.ContractNo)) + { + q = q.Where(p => p.ContractNo.Contains(p_entity.ContractNo)); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.PartName)) + { + q = q.Where(p => p.PartName.Contains(p_entity.PartName)); + } + if (!string.IsNullOrEmpty(p_entity.Unit)) + { + q = q.Where(p => p.Unit.Contains(p_entity.Unit)); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.UpdateUser)) + { + q = q.Where(p => p.UpdateUser.Contains(p_entity.UpdateUser)); + } + if (!string.IsNullOrEmpty(p_entity.UpdateInfo)) + { + q = q.Where(p => p.UpdateInfo.Contains(p_entity.UpdateInfo)); + } + + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.ToList(); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONTRACT_CONTROLLER), "Get_TB_CONTRACT_DETAIL_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONTRACT_CONTROLLER), "Get_TB_CONTRACT_DETAIL_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONTRACT_CONTROLLER), "Get_TB_CONTRACT_DETAIL_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONTRACT_CONTROLLER), "Get_TB_CONTRACT_DETAIL_List", e.Message); + throw e; + } + return _ret; + } + + public static List NOTIFY_COMPARE_PRICE(List p_priceList, List p_polist) + { + List msgList = new List(); + var ret= from po in p_polist + join price in p_priceList on po.PartCode equals price.PartCode + select new { VAL1 = po, VAL2 = price }; + var list = ret.Where(p=> p.VAL1.BeginTime>=p.VAL2.BeginTime && p.VAL1.BeginTime<=p.VAL2.EndTime && p.VAL1.PlanQty>=p.VAL2.QtyBegin && p.VAL1.PlanQty < p.VAL2.QtyEnd && (p.VAL1.Price> p.VAL2.Price || p.VAL1.Price==0)); + foreach(var itm in list) + { + msgList.Add(string.Format("物料编码{0}价格{1}与合同价格{2}不一致",itm.VAL1.PartCode, itm.VAL1.Price, itm.VAL2.Price)); + } + return msgList; + + } + + + + //public static List GET_TB_PRICE_LIST(List p_list) + //{ + // if (p_list.Count > 0) + // { + // using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + // { + + + // } + // } + //} + /// + /// 发票申请差额 + /// + /// + /// + public static List GET_CONTRACT_PRICE_LIST(List p_list) + { + if (p_list.Count > 0) + { + var ret= Get_TB_CONTRACT_DETAIL_PRICE_List(new TB_CONTRACT_DETAIL_PRICE() { VendId = p_list[0].VendId }); + if (ret.State == ReturnStatus.Succeed) + { + var p_priceList = ret.Result; + List msgList = new List(); + var ls = from po in p_list + join price in p_priceList on po.PartCode equals price.PartCode + select new { VAL1 = po, VAL2 = price }; + var list = ls.Where(p => p.VAL1.BeginTime >= p.VAL2.BeginTime && p.VAL1.BeginTime <= p.VAL2.EndTime && p.VAL1.Qty >= p.VAL2.QtyBegin && p.VAL1.Qty < p.VAL2.QtyEnd); + p_list.ForEach(p => + { + //p.PartDesc1 = p.PartDesc1+p.p + var _entity = list.ToList().Where(itm => itm.VAL1.PartCode == p.PartCode).FirstOrDefault(); + if (_entity != null && _entity.VAL2 != null) + { + p.ContractPrice = _entity.VAL2.Price; + p.BlancePrice = p.ContractPrice - p.Price; + } + else + { + p.ContractPrice = p.Price; + p.BlancePrice = 0; + } + }); + } + } + return p_list; + } + /// + /// 发票差额 + /// + /// + /// + public static List GET_CONTRACT_PRICE_LIST(List p_list) + { + + if (p_list.Count > 0) + { + var ret = Get_TB_CONTRACT_DETAIL_PRICE_List(new TB_CONTRACT_DETAIL_PRICE() { VendId = p_list[0].VendId }); + if (ret.State == ReturnStatus.Succeed) + { + var p_priceList = ret.Result; + List msgList = new List(); + var ls = from po in p_list + join price in p_priceList on po.PartCode equals price.PartCode + select new { VAL1 = po, VAL2 = price }; + var list = ls.Where(p => p.VAL1.BeginTime >= p.VAL2.BeginTime && p.VAL1.BeginTime <= p.VAL2.EndTime && p.VAL1.Qty >= p.VAL2.QtyBegin && p.VAL1.Qty < p.VAL2.QtyEnd); + p_list.ForEach(p => + { + var _entity = list.ToList().Where(itm => itm.VAL1.PartCode == p.PartCode).FirstOrDefault(); + if (_entity != null && _entity.VAL2 != null) + { + p.ContractPrice = _entity.VAL2.Price; + p.BlancePrice = p.ContractPrice - p.Price; + } + else + { + p.ContractPrice = p.Price; + p.BlancePrice = 0; + } + }); + } + } + return p_list; + } + public static List GET_CONTRACT_PRICE_LIST(List p_list) + { + + if (p_list.Count > 0) + { + var ret = Get_TB_CONTRACT_DETAIL_PRICE_List(new TB_CONTRACT_DETAIL_PRICE() { VendId = p_list[0].VendId }); + if (ret.State == ReturnStatus.Succeed) + { + var p_priceList = ret.Result; + List msgList = new List(); + var ls = from po in p_list + join price in p_priceList on po.PartCode equals price.PartCode + select new { VAL1 = po, VAL2 = price }; + var list = ls.Where(p => p.VAL1.BeginTime >= p.VAL2.BeginTime && p.VAL1.BeginTime <= p.VAL2.EndTime && p.VAL1.TempQty >= p.VAL2.QtyBegin && p.VAL1.TempQty < p.VAL2.QtyEnd); + p_list.ForEach(p => + { + var _entity = list.ToList().Where(itm => itm.VAL1.PartCode == p.PartCode).FirstOrDefault(); + if (_entity != null) + { + p.ContractPrice = _entity.VAL2.Price; + p.BlancePrice = p.ContractPrice - p.Price; + } + else + { + p.ContractPrice = p.Price; + p.BlancePrice = 0; + } + }); + } + } + return p_list; + } + + + public static List GET_CONTRACT_PRICE_LIST(List p_list) + { + + if (p_list.Count > 0) + { + var ret = Get_TB_CONTRACT_DETAIL_PRICE_List(new TB_CONTRACT_DETAIL_PRICE() { VendId = p_list[0].VendId }); + if (ret.State == ReturnStatus.Succeed) + { + var p_priceList = ret.Result; + List msgList = new List(); + var ls = from ask in p_list + join price in p_priceList on ask.PartCode equals price.PartCode + select new { VAL1 = ask, VAL2 = price }; + var list = ls.Where(p => p.VAL1.BeginTime >= p.VAL2.BeginTime && p.VAL1.BeginTime <= p.VAL2.EndTime && p.VAL1.AskQty >= p.VAL2.QtyBegin && p.VAL1.AskQty < p.VAL2.QtyEnd); + p_list.ForEach(p => + { + var _entity = list.ToList().Where(itm => itm.VAL1.PartCode == p.PartCode).FirstOrDefault(); + if (_entity != null) + { + p.ContractPrice = _entity.VAL2.Price; + p.BlancePrice = p.ContractPrice - p.Price; + } + else + { + p.ContractPrice = p.Price; + p.BlancePrice = 0; + } + }); + } + } + return p_list; + } + + + public static ResultObject> Get_TB_CONTRACT_DETAIL_PRICE_List(TB_CONTRACT_DETAIL_PRICE p_entity,int p_qty=0) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + + IQueryable q = db.TB_CONTRACT_DETAIL_PRICE; + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.BillNo)) + { + q = q.Where(p => p.BillNo.Contains(p_entity.BillNo)); + } + if (!string.IsNullOrEmpty(p_entity.ContractNo)) + { + q = q.Where(p => p.ContractNo.Contains(p_entity.ContractNo)); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (p_entity.QtyBegin != 0) + { + q = q.Where(p => p.QtyBegin == p_entity.QtyBegin); + } + if (p_entity.QtyEnd != 0) + { + q = q.Where(p => p.QtyBegin == p_entity.QtyBegin); + } + if (p_entity.Price != 0) + { + q = q.Where(p => p.Price == p_entity.Price); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.ToList(); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONTRACT_CONTROLLER), "Get_TB_CONTRACT_DETAIL_PRICE_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONTRACT_CONTROLLER), "Get_TB_CONTRACT_DETAIL_PRICE_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONTRACT_CONTROLLER), "Get_TB_CONTRACT_DETAIL_PRICE_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONTRACT_CONTROLLER), "Get_TB_CONTRACT_DETAIL_PRICE_List", e.Message); + throw e; + } + return _ret; + } + + public static ResultObject> Get_TB_CONTRACT_DETAIL_PRICE_List_CQ(TB_CONTRACT_DETAIL_PRICE p_entity, int p_qty = 0) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + + IQueryable q = db.TB_CONTRACT_DETAIL_PRICE; + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.BillNo)) + { + q = q.Where(p => p.BillNo.Contains(p_entity.BillNo)); + } + if (!string.IsNullOrEmpty(p_entity.ContractNo)) + { + q = q.Where(p => p.ContractNo.Contains(p_entity.ContractNo)); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (p_entity.QtyBegin != 0) + { + q = q.Where(p => p.QtyBegin == p_entity.QtyBegin); + } + if (p_entity.QtyEnd != 0) + { + q = q.Where(p => p.QtyBegin == p_entity.QtyBegin); + } + if (p_entity.Price != 0) + { + q = q.Where(p => p.Price == p_entity.Price); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.ToList(); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONTRACT_CONTROLLER), "Get_TB_CONTRACT_DETAIL_PRICE_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONTRACT_CONTROLLER), "Get_TB_CONTRACT_DETAIL_PRICE_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONTRACT_CONTROLLER), "Get_TB_CONTRACT_DETAIL_PRICE_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONTRACT_CONTROLLER), "Get_TB_CONTRACT_DETAIL_PRICE_List", e.Message); + throw e; + } + return _ret; + } + + private static string IMPORT_CONTRACT_CHECK(SCP_CONTRACT_EXCEL itm) + { + + StringBuilder _buffer = new StringBuilder(); + Regex reg = new Regex(@"^\d+(\.\d{1,5})?$"); + + if (string.IsNullOrEmpty(itm.合同编号)) + { + _buffer.AppendFormat(string.Format("导入错误合同编号未填写!")); + } + if (string.IsNullOrEmpty(itm.供应商代码) || string.IsNullOrEmpty(itm.供应商名称)) + { + _buffer.AppendFormat(string.Format("导入错误供应商编号或供应商名称未填写!")); + } + if (string.IsNullOrEmpty(itm.供应商物料号) || string.IsNullOrEmpty(itm.物料描述)) + { + _buffer.AppendFormat(string.Format("导入错误供应商物料号或供应商物料描述未填写!")); + } + + if ((!string.IsNullOrEmpty(itm.价格1) && string.IsNullOrEmpty(itm.最小起订量1)) || (string.IsNullOrEmpty(itm.价格1) && !string.IsNullOrEmpty(itm.最小起订量1))) + { + _buffer.Append("导入错误价格1或最小起订量1为空!"); + } + else + { + if (!string.IsNullOrEmpty(itm.价格1) && !string.IsNullOrEmpty(itm.最小起订量1)) + { + if (!reg.IsMatch(itm.价格1)) + { + _buffer.Append("导入价格1格式有错误!"); + } + if (!reg.IsMatch(itm.最小起订量1)) + { + _buffer.Append("导入最小起订量1格式有错误!"); + } + + } + } + + if ((!string.IsNullOrEmpty(itm.价格2) && string.IsNullOrEmpty(itm.最小起订量2)) || (string.IsNullOrEmpty(itm.价格2) && !string.IsNullOrEmpty(itm.最小起订量2))) + { + _buffer.Append("导入错误价格2或最小起订量2为空!"); + } + else + { + if (!string.IsNullOrEmpty(itm.价格2) && !string.IsNullOrEmpty(itm.最小起订量2)) + { + if (!reg.IsMatch(itm.价格2)) + { + _buffer.Append("导入价格2格式有错误!"); + } + if (!reg.IsMatch(itm.最小起订量2)) + { + _buffer.Append("导入最小起订量2格式有错误!"); + } + + } + } + if ((!string.IsNullOrEmpty(itm.价格3) && string.IsNullOrEmpty(itm.最小起订量3)) || (string.IsNullOrEmpty(itm.价格3) && !string.IsNullOrEmpty(itm.最小起订量3))) + { + _buffer.Append("导入错误价格3或最小起订量3为空!"); + } + else + { + if (!string.IsNullOrEmpty(itm.价格3) && !string.IsNullOrEmpty(itm.最小起订量3)) + { + if (!reg.IsMatch(itm.价格3)) + { + _buffer.Append("导入价格3格式有错误!"); + } + if (!reg.IsMatch(itm.最小起订量3)) + { + _buffer.Append("导入最小起订量3格式有错误!"); + } + } + } + + if ((!string.IsNullOrEmpty(itm.价格4) && string.IsNullOrEmpty(itm.最小起订量4)) || (string.IsNullOrEmpty(itm.价格4) && !string.IsNullOrEmpty(itm.最小起订量4))) + { + _buffer.Append("导入错误价格4或最小起订量4为空!"); + } + else + { + if (!string.IsNullOrEmpty(itm.价格4) && !string.IsNullOrEmpty(itm.最小起订量4)) + { + if (!reg.IsMatch(itm.价格4)) + { + _buffer.Append("导入价格4格式有错误!"); + } + if (!reg.IsMatch(itm.最小起订量4)) + { + _buffer.Append("导入最小起订量4格式有错误!"); + } + + } + } + if (_buffer.Length > 0) + { + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONTRACT_CONTROLLER), "IMPORT_CONTRACT_CHECK",_buffer.ToString()); + return _buffer.ToString(); + } + return string.Empty; + } + public static ResultObject EXCEL_IMPORT_CONTRACT(List p_contract_list, string p_creator, DateTime p_time) + { + ResultObject _ret = new ResultObject(); + int line = 1; + + foreach (var itm in p_contract_list) + { + if (!string.IsNullOrEmpty(IMPORT_CONTRACT_CHECK(itm))) + { + _ret.MessageList.Add(string.Format("第{0}行有错误!", line.ToString())); + } + line++; + } + try + { + if (_ret.MessageList.Count == 0) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _contract = p_contract_list.FirstOrDefault(); + #region 删除老合同 + var contract=db.TB_CONTRACT.Where(p => p.VendId == _contract.供应商代码 && p.ContractNo == _contract.合同编号); + if (contract.Count() > 0) + { + var c = contract.FirstOrDefault(); + if (!string.IsNullOrEmpty(c.BillNo)) + { + var detailPrice = db.TB_CONTRACT_DETAIL_PRICE.Where(p => p.BillNo ==c.BillNo); + db.TB_CONTRACT_DETAIL_PRICE.RemoveRange(detailPrice); + var detail=db.TB_CONTRACT_DETAIL.Where(p => p.BillNo ==c.BillNo); + db.TB_CONTRACT_DETAIL.RemoveRange(detail); + db.TB_CONTRACT.Remove(c); + } + } + #endregion + var _tbContract = new TB_CONTRACT(); + _tbContract.BillNo = MakeCodeHelper.MakeBillCode("HT"); + _tbContract.VendName = _contract.供应商名称; + _tbContract.VendId = _contract.供应商代码; + _tbContract.CreateUser = p_creator; + _tbContract.ContractNo = _contract.合同编号; + _tbContract.IsDeleted = false; + + db.TB_CONTRACT.Add(_tbContract); + + + var list = p_contract_list.Distinct(new SCP_CONTRACT_EXCEL_COMPARE()).ToList(); + foreach (var itm in list) + { + var _tbContract_detail = new TB_CONTRACT_DETAIL(); + _tbContract_detail.ContractNo = _tbContract.ContractNo; + _tbContract_detail.BillNo = _tbContract.BillNo; + _tbContract_detail.PartCode = itm.供应商物料号; + _tbContract_detail.CreateUser = _tbContract.CreateUser; + _tbContract_detail.CreateTime = _tbContract.CreateTime; + _tbContract_detail.IsDeleted = _tbContract.IsDeleted; + _tbContract_detail.PartName = itm.物料描述; + _tbContract_detail.Unit = itm.单位; + db.TB_CONTRACT_DETAIL.Add(_tbContract_detail); + } + foreach (var itm in p_contract_list) + { + + if (!string.IsNullOrEmpty(itm.价格1) && !string.IsNullOrEmpty(itm.最小起订量1)) + { + var _detail_price = new TB_CONTRACT_DETAIL_PRICE(); + _detail_price.BeginTime = ConvertHelper.To(itm.开始日期); + _detail_price.EndTime = ConvertHelper.To(itm.结束日期); + _detail_price.ContractNo = _tbContract.ContractNo; + _detail_price.QtyBegin = int.Parse(itm.最小起订量1); + _detail_price.QtyEnd = !string.IsNullOrEmpty(itm.最小起订量2)? int.Parse(itm.最小起订量2):999999999; + _detail_price.BillNo = _tbContract.BillNo; + _detail_price.IsDeleted = false; + _detail_price.PartCode = itm.供应商物料号; + _detail_price.Price = decimal.Parse(itm.价格1); + _detail_price.VendId = itm.供应商代码; + _detail_price.CreateUser = _tbContract.CreateUser; + _detail_price.CreateTime = _tbContract.CreateTime; + db.TB_CONTRACT_DETAIL_PRICE.Add(_detail_price); + } + if (!string.IsNullOrEmpty(itm.价格2) && !string.IsNullOrEmpty(itm.最小起订量2)) + { + var _detail_price = new TB_CONTRACT_DETAIL_PRICE(); + _detail_price.BeginTime = ConvertHelper.To(itm.开始日期); + _detail_price.EndTime = ConvertHelper.To(itm.结束日期); + _detail_price.ContractNo = _tbContract.ContractNo; + _detail_price.BillNo = _tbContract.BillNo; + _detail_price.IsDeleted = false; + _detail_price.PartCode = itm.供应商物料号; + _detail_price.QtyBegin = int.Parse(itm.最小起订量2); + _detail_price.QtyEnd = !string.IsNullOrEmpty(itm.最小起订量3) ? int.Parse(itm.最小起订量3) : 999999999; + _detail_price.Price = decimal.Parse(itm.价格2); + _detail_price.VendId = itm.供应商代码; + _detail_price.CreateUser = _tbContract.CreateUser; + _detail_price.CreateTime = _tbContract.CreateTime; + db.TB_CONTRACT_DETAIL_PRICE.Add(_detail_price); + } + if (!string.IsNullOrEmpty(itm.价格3) && !string.IsNullOrEmpty(itm.最小起订量3)) + { + var _detail_price = new TB_CONTRACT_DETAIL_PRICE(); + _detail_price.BeginTime = ConvertHelper.To(itm.开始日期); + _detail_price.EndTime = ConvertHelper.To(itm.结束日期); + _detail_price.ContractNo = _tbContract.ContractNo; + _detail_price.BillNo = _tbContract.BillNo; + _detail_price.IsDeleted = false; + _detail_price.PartCode = itm.供应商物料号; + _detail_price.QtyBegin = int.Parse(itm.最小起订量3); + _detail_price.QtyEnd = !string.IsNullOrEmpty(itm.最小起订量4) ? int.Parse(itm.最小起订量4) : 999999999; + _detail_price.CreateUser = _tbContract.CreateUser; + _detail_price.CreateTime = _tbContract.CreateTime; + _detail_price.Price = decimal.Parse(itm.价格3); + _detail_price.VendId = itm.供应商代码; + db.TB_CONTRACT_DETAIL_PRICE.Add(_detail_price); + } + if (!string.IsNullOrEmpty(itm.价格4) && !string.IsNullOrEmpty(itm.最小起订量4)) + { + var _detail_price = new TB_CONTRACT_DETAIL_PRICE(); + _detail_price.BeginTime = ConvertHelper.To(itm.开始日期); + _detail_price.EndTime = ConvertHelper.To(itm.结束日期); + _detail_price.ContractNo = _tbContract.ContractNo; + _detail_price.BillNo = _tbContract.BillNo; + _detail_price.IsDeleted = false; + + _detail_price.PartCode = itm.供应商物料号; + _detail_price.QtyBegin = int.Parse(itm.最小起订量3); + _detail_price.QtyEnd = 999999999; + _detail_price.Price = decimal.Parse(itm.价格4); + _detail_price.VendId = itm.供应商代码; + _detail_price.CreateUser = _tbContract.CreateUser; + _detail_price.CreateTime = _tbContract.CreateTime; + db.TB_CONTRACT_DETAIL_PRICE.Add(_detail_price); + } + } + + + + int state = db.SaveChanges(); + if (state != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + + } + + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONTRACT_CONTROLLER), "EXCEL_IMPORT_CONTRACT", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONTRACT_CONTROLLER), "EXCEL_IMPORT_CONTRACT", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONTRACT_CONTROLLER), "EXCEL_IMPORT_CONTRACT", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_CONTRACT_CONTROLLER), "EXCEL_IMPORT_CONTRACT", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + + } + + + } +} diff --git a/北京北汽/SCP/Controller/SCP_DC_UNI_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_DC_UNI_CONTROLLER.cs new file mode 100644 index 0000000..4ef0196 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_DC_UNI_CONTROLLER.cs @@ -0,0 +1,3662 @@ +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ExchangeCenterTables; +using CK.SCP.Models.AppBoxEntity; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Models.ScpEntity.ExcelExportEnttity; +using CK.SCP.Utils; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Transactions; +using System.Data.Entity.Core; +//using WebSrvAPITest; + +namespace CK.SCP.Controller +{ + public class SCP_DC_UNI_CONTROLLER + { + public SCP_DC_UNI_CONTROLLER() + { + + } + public static ResultObject> Get_TEA_SUBSCRIBE_List(TEA_SUBSCRIBE p_entity) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + IQueryable q = db.TEA_SUBSCRIBE; + if (!string.IsNullOrEmpty(p_entity.TableName)) + { + q = q.Where(p => p.TableName.Contains(p_entity.TableName)); + } + if (!string.IsNullOrEmpty(p_entity.Creator)) + { + q = q.Where(p => p.Creator.Contains(p_entity.Creator)); + } + if (!string.IsNullOrEmpty(p_entity.Subscriber)) + { + q = q.Where(p => p.Subscriber.Contains(p_entity.Subscriber)); + } + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.UpdateUser)) + { + q = q.Where(p => p.UpdateUser.Contains(p_entity.UpdateUser)); + } + if (p_entity.IsChecked != false) + { + q = q.Where(p => p.IsChecked == p_entity.IsChecked); + } + if (p_entity.Enable != false) + { + q = q.Where(p => p.Enable == p_entity.Enable); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.ToList(); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_DC_UNI_CONTROLLER), "Get_TEA_SUBSCRIBE_List", e.Message); + throw e; + } + return _ret; + } + + + + public ResultObject Save_TEA_SUBSCRIBE(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TEA_SUBSCRIBE.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_DC_UNI_CONTROLLER), "Save_TEA_SUBSCRIBE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public ResultObject Del_TEA_SUBSCRIBE(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TEA_SUBSCRIBE.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_DC_UNI_CONTROLLER), "Del_TEA_SUBSCRIBE", e.Message); throw e; + } + return _ret; + } + + + + public static ResultObject> Get_TEA_TASK_SUB_List(TEA_TASK_SUB p_entity) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + IQueryable q = db.TEA_TASK_SUB; + if (!string.IsNullOrEmpty(p_entity.TableName)) + { + q = q.Where(p => p.TableName.Contains(p_entity.TableName)); + } + if (!string.IsNullOrEmpty(p_entity.Creator)) + { + q = q.Where(p => p.Creator.Contains(p_entity.Creator)); + } + if (p_entity.DataCount != 0) + { + q = q.Where(p => p.DataCount == p_entity.DataCount); + } + if (!string.IsNullOrEmpty(p_entity.Subscriber)) + { + q = q.Where(p => p.Subscriber.Contains(p_entity.Subscriber)); + } + if (p_entity.FailedCount != 0) + { + q = q.Where(p => p.FailedCount == p_entity.FailedCount); + } + if (!string.IsNullOrEmpty(p_entity.FailedInfo)) + { + q = q.Where(p => p.FailedInfo.Contains(p_entity.FailedInfo)); + } + if (!string.IsNullOrEmpty(p_entity.Domain)) + { + q = q.Where(p => p.Domain.Contains(p_entity.Domain)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.UpdateUser)) + { + q = q.Where(p => p.UpdateUser.Contains(p_entity.UpdateUser)); + } + if (p_entity.IsChecked != false) + { + q = q.Where(p => p.IsChecked == p_entity.IsChecked); + } + //if (!string.IsNullOrEmpty(p_entity.TaskState)) + //{ + // q = q.Where(p => p.UpdateUser.Contains(p_entity.UpdateUser)); + //} + q = q.Where(p => p.TaskState==p_entity.TaskState); + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.OrderBy(p => p.CreateTime).ToList(); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_DC_UNI_CONTROLLER), "Get_TEA_TASK_SUB_List", e.Message); + throw e; + } + return _ret; + } + + public static ResultObject Update_TEA_TASK_SUB(ExchangeCenterContext db, TEA_TASK_SUB p_task) + { + ResultObject _ret = new ResultObject(); + try + { + var _task = db.TEA_TASK_SUB.Where(p => p.TaskID == p_task.TaskID && p.TableName == p.TableName && p.Subscriber == "SCP").FirstOrDefault(); + if (_task != null) + { + _task.TaskState = EnumTaskState.Success; + _task.DataCount = p_task.DataCount; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_DC_UNI_CONTROLLER), "Update_TEA_TASK_SUB", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + public static ResultObject CREATE_TEA_TASK_SUB(ExchangeCenterContext db, bool p_ismasterslave ,TEA_TASK_SUB p_task) + { + ResultObject _ret = new ResultObject(); + try + { + var _list = db.TEA_SUBSCRIBE.Where(p => p.Creator == "SCP" && p.TableName == p_task.TableName).ToList(); + foreach (var itm in _list) + { + var _task = new TEA_TASK_SUB(); + _task.GUID = Guid.NewGuid(); + _task.TaskID = p_task.TaskID; + _task.TaskState = EnumTaskState.Unread; + _task.TableName = p_task.TableName; + _task.Domain = p_task.Domain; + _task.Site = p_task.Site; + _task.DataCount = p_task.DataCount; + _task.Creator = itm.Creator; + _task.CreateTime = DateTime.Now; + _task.CreateUser = itm.CreateUser; + _task.UpdateTime = DateTime.Now; + _task.UpdateUser = itm.CreateUser; + _task.Subscriber = itm.Subscriber; + db.TEA_TASK_SUB.Add(_task); + } + var _task1 = new TEA_TASK(); + _task1.GUID = p_task.GUID; + _task1.DataCount = _list.Count; + _task1.TaskID = p_task.TaskID; + _task1.TableName = p_task.TableName; + _task1.Domain = p_task.Domain; + _task1.Site = p_task.Site; + _task1.IsMasterSlave = p_ismasterslave; + _task1.Creator = "SCP"; + _task1.CreateTime = DateTime.Now; + _task1.CreateUser = "SCP"; + _task1.UpdateTime = DateTime.Now; + _task1.UpdateUser = "SCP"; + db.TEA_TASK.Add(_task1); + _ret.State = ReturnStatus.Succeed; + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_List", ex.ToString()); + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_DC_UNI_CONTROLLER), "CREATE_TEA_TASK_SUB", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + public ResultObject Del_TEA_TASK_SUB(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TEA_TASK_SUB.Remove(itm); + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_DC_UNI_CONTROLLER), "Del_TEA_TASK_SUB", e.Message); throw e; + } + return _ret; + } + + + public static void ReadService(Action> p_action) + { + ResultObject result = new ResultObject(); + // ResultObject> result = new ResultObject>(); + var _result = Get_TEA_TASK_SUB_List(new TEA_TASK_SUB() { TaskState = EnumTaskState.Unread, Subscriber = "SCP" }); + if (_result.State == ReturnStatus.Succeed) + { + foreach (var _task in _result.Result) + { + ScpEntities scpdb = EntitiesFactory.CreateScpInstance(); + ExchangeCenterContext db = EntitiesFactory.CreateExchangeCenterInstance(); + DataCenterContext dc = EntitiesFactory.CreateDataCenterInstance(); + AppBoxContext authdb = EntitiesFactory.CreateAppBoxInstance(); + using (var scope = + new TransactionScope(TransactionScopeOption.Required, new TransactionOptions() + { + IsolationLevel = System.Transactions.IsolationLevel.Serializable, + Timeout = new TimeSpan(0, 20, 0) + })) + { + try + { + switch (_task.TableName) + { + //case "TED_POD": + // result = UpdatePo(db, scpdb, _task); + // break; + case "TED_RECEIPT_MSTR": + if (_task.Creator == "QAD") + { + result = UpdateRecive(db, scpdb, _task); + Update_TEA_TASK_SUB(db, _task); + EntitiesFactory.SaveDb(scpdb); + EntitiesFactory.SaveDb(db); + EntitiesFactory.SaveDb(dc); + scope.Complete(); + result.Message = _task.TaskID.ToString(); + } + else + { + result = UpdateARRIVE(db, scpdb, _task); + Update_TEA_TASK_SUB(db, _task); + EntitiesFactory.SaveDb(scpdb); + EntitiesFactory.SaveDb(db); + EntitiesFactory.SaveDb(dc); + scope.Complete(); + result.Message = _task.TaskID.ToString(); + } + break; + case "TED_RETURN_MSTR": + result = UpdateReturn(db, scpdb, _task); + result.Message = _task.TaskID.ToString(); + Update_TEA_TASK_SUB(db, _task); + EntitiesFactory.SaveDb(scpdb); + EntitiesFactory.SaveDb(db); + EntitiesFactory.SaveDb(dc); + scope.Complete(); + break; + case "TES_SUPPLIER": + var _supplierlist = db.TES_SUPPLIER.Where(p => p.TaskID == _task.TaskID).ToList(); + result = UpdateSupplier(_supplierlist, scpdb,authdb, _task); + result.Message = _task.TaskID.ToString(); + Update_TEA_TASK_SUB(db, _task); + EntitiesFactory.SaveDb(scpdb); + EntitiesFactory.SaveDb(db); + EntitiesFactory.SaveDb(dc); + EntitiesFactory.SaveDb(authdb); + scope.Complete(); + UpdateSupplierExtend(_supplierlist); + break; + case "TES_PART_MSTR": + result = UpdatePart(db, scpdb, _task); + result.Message = _task.TaskID.ToString(); + Update_TEA_TASK_SUB(db, _task); + EntitiesFactory.SaveDb(scpdb); + EntitiesFactory.SaveDb(db); + EntitiesFactory.SaveDb(dc); + scope.Complete(); + break; + case "TED_PPOD_DET": + result = UpdatePPod(db, scpdb, _task); + result.Message = _task.TaskID.ToString(); + Update_TEA_TASK_SUB(db, _task); + EntitiesFactory.SaveDb(scpdb); + EntitiesFactory.SaveDb(db); + EntitiesFactory.SaveDb(dc); + scope.Complete(); + break; + //case "TES_SITE": + // result = UpdateFactory(db, scpdb, appscpdb, _task); + // break; + } + + // p_action(result); + result.State = ReturnStatus.Succeed; + result.Result = true; + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + scope.Dispose(); + result.State = ReturnStatus.Failed; + result.ErrorList.Add(dbEx); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + scope.Dispose(); + result.State = ReturnStatus.Failed; + result.ErrorList.Add(ex); + } + catch (Exception ex) + { + scope.Dispose(); + result.State = ReturnStatus.Failed; + result.ErrorList.Add(ex); + result.Message = _task.TaskID.ToString(); + // result.MessageList.Add("任务编号:" + _task.TaskID + "错误信息:" + ex.Message); + } + } + p_action(result); + } + } + p_action(result); + } + + public static void WriteService(Action>> p_action) + { + ResultObject> result = new ResultObject>(); + List _msglist = new List(); + using (var scope = + new TransactionScope(TransactionScopeOption.Required, new TransactionOptions() + { + IsolationLevel = System.Transactions.IsolationLevel.Serializable, + Timeout = new TimeSpan(0, 20, 0) + })) + { + try + { + ScpEntities scpdb = EntitiesFactory.CreateScpInstance(); + ExchangeCenterContext db = EntitiesFactory.CreateExchangeCenterInstance(); + var _list = scpdb.TS_UNI_API.Where(p => p.State == (int)DataState.Enabled&&p.Domain== "BJBMPT").OrderBy(p => p.UID).ToList(); + var _list1 = scpdb.TS_UNI_API.Where(p => p.State == (int)DataState.Enabled && p.Domain == "BJBMPT" && p.InterfaceType== "Price").OrderBy(p => p.UID).ToList(); + + var apiii = _list1.Count(); + if (apiii > 0) { + var ret = UpdateTES_PURCHASE_PRICE(db, scpdb, _list1); + } + var billNumList = _list.Select(p => p.BillNum).Distinct(); + + foreach (var itm in billNumList) + { + var _dataList = _list.Where(p => p.BillNum == itm).ToList(); + var _asnList = _dataList.Where(P => P.InterfaceType == UniApiType.Receive.ToString()).ToList(); + if (_asnList.Count > 0) + { + var _taskId = Guid.NewGuid(); + _msglist.Add(new LogModel() { LogMessage = string.Format("发现发货单信息{0}条", _asnList.Count), LogTime = DateTime.Now.ToString(), TaskId = _taskId.ToString(), TableName = "TED_ASN_MSTR" }); + var ret = UpdateAsn(db, scpdb, _asnList, _taskId); + if (ret.State == ReturnStatus.Succeed) + { + _msglist.Add(ret.Result); + } + } + var _invoiceList = _dataList.Where(p => p.InterfaceType == UniApiType.Invoice.ToString()).ToList(); + if (_invoiceList.Count > 0) + { + var _taskId = Guid.NewGuid(); + _msglist.Add(new LogModel() { LogMessage = string.Format("发现发票信息{0}条", _invoiceList.Count), LogTime = DateTime.Now.ToString(), TaskId = _taskId.ToString(), TableName = "TED_INVOICE_MSTR" }); + var ret = UpdateInvoice(db, scpdb,_invoiceList, _taskId); + if (ret.State == ReturnStatus.Succeed) + { + _msglist.Add(ret.Result); + } + } + var _poList = _dataList.Where(p => p.InterfaceType == UniApiType.PO.ToString()).ToList(); + if (_poList.Count > 0) + { + var _taskId = Guid.NewGuid(); + _msglist.Add(new LogModel() { LogMessage = string.Format("发现订单信息{0}条", _poList.Count), LogTime = DateTime.Now.ToString(), TaskId = _taskId.ToString(), TableName = "TED_PO_MSTR" }); + var ret = UpdatePo(db, scpdb, _poList, _taskId); + if (ret.State == ReturnStatus.Succeed) + { + _msglist.Add(ret.Result); + } + } + //var _priceList = _dataList.Where(p => p.InterfaceType == UniApiType.Price.ToString()).ToList(); + //if (_priceList.Count > 0) + //{ + // var _taskId = Guid.NewGuid(); + // _msglist.Add(new LogModel() { LogMessage = string.Format("发现价格单信息{0}条", _priceList.Count), LogTime = DateTime.Now.ToString(), TaskId = _taskId.ToString(), TableName = "TES_PURCHASE_PRICE" }); + // var ret = UpdatePrice(db, scpdb, _priceList, _taskId); + // if (ret.State == ReturnStatus.Succeed) + // { + // _msglist.Add(ret.Result); + // } + //} + Thread.Sleep(10); + } + EntitiesFactory.SaveDb(scpdb); + EntitiesFactory.SaveDb(db); + scope.Complete(); + result.State = ReturnStatus.Succeed; + result.Result = _msglist; + } + catch(Exception e) + { + _msglist.Add(new LogModel() { LogMessage = e.Message, LogTime = DateTime.Now.ToString(), TaskId =string.Empty, TableName = "ERROR" }); + result.State = ReturnStatus.Failed; + result.Result = _msglist; + scope.Dispose(); + + } + //finally + //{ + + //} + + } + p_action(result); + } + public static ResultObject UpdateTES_PURCHASE_PRICE(ExchangeCenterContext db, ScpEntities scpdb, List _priceList) + { + + ResultObject _ret = new ResultObject(); + try + { + List _teslist = new List(); + var _api = _priceList.FirstOrDefault(); + + foreach (var detail in _priceList) + { + + Guid _taskguid = Guid.NewGuid(); + TES_PURCHASE_PRICE _entity = new TES_PURCHASE_PRICE(); + _entity.GUID = Guid.NewGuid(); + _entity.PriceList = detail.BillNum; + _entity.Currency = detail.Currency; + _entity.PartCode = detail.PartCode; + _entity.Um = detail.PoUnit; + _entity.Start = detail.CreateTime; + _entity.ExpireDate = detail.PutTime; + _entity.CreateUser = "scp"; + _entity.ProductLine = ""; + _entity.AmountType = "P"; + _entity.CreateTime = DateTime.Now; + _entity.Remark = detail.Extend1; + _entity.TaskID = _taskguid; + _entity.CommandType = "A"; + _entity.DataID = Guid.NewGuid(); + _entity.Domain = detail.Domain; + _entity.Site = detail.Site; + _entity.SupplierCode = detail.VendId; + _entity.VendAmount = detail.Price; + _entity.Desc = detail.Batch; + _entity.Amount = detail.Qty; + _teslist.Add(_entity); + detail.State = (int)BillState.Finish; + var ret = CREATE_TEA_TASK_SUB(db, false, + new TEA_TASK_SUB() + { + DataCount = _teslist.Count, + TaskID = _taskguid, + TableName = "TES_PURCHASE_PRICE", + Site = _entity.Site, + Domain = _entity.Domain, + CreateTime = _entity.CreateTime, + CreateUser = _api.CreateOper, + Creator = "SCP", + }); + } + db.TES_PURCHASE_PRICE.AddOrUpdate(_teslist.ToArray()); + + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = e.InnerException.Message; + } + return _ret; + } + + //public static ResultObject UpdateAsnDetail(ExchangeCenterContext db, ScpEntities scpdb,List p_asnDetailList) + //{ + // ResultObject _ret = new ResultObject(); + // try + // { + // foreach (var itm in p_asnDetailList) + // { + + // } + + // } + // catch (Exception e) + // { + // _ret.State = ReturnStatus.Failed; + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateAsnDetail", e.Message); + // _ret.Result = false; + // _ret.ErrorList.Add(e); + // throw e; + // } + // return _ret; + //} + + public static List GetASN(string p_asn) + { + List _ls = new List(); + + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + _ls = db.TED_ASN_MSTR.Where(p => p.ASN == p_asn).ToList(); + } + return _ls; + } + public static List GetASN_ASN(string p_asn) + { + List _ls = new List(); + + using (var db = EntitiesFactory.CreateScpInstance()) + { + _ls = db.TB_ASN.Where(p => p.AsnBillNum == p_asn&&p.State==3).ToList(); + } + return _ls; + } + + + public static ResultObject UpdateAsn(ExchangeCenterContext db, ScpEntities scpdb, List _asnList, Guid p_taskID/*EnumCommandType p_command*/) + { + ResultObject _ret = new ResultObject(); + try + { + List _ls = new List(); + + if (_asnList.FirstOrDefault() != null) + { + var _api = _asnList.FirstOrDefault(); + TED_ASN_MSTR _asn = new TED_ASN_MSTR(); + var asn = JsonConvert.DeserializeObject(_api.Extend1); + _asn.ASN = _api.BillNum; + _asn.CommandType = "A"; + _asn.CreateTime = _api.CreateTime; + _asn.CreateUser = _api.CreateOper; + _asn.KanbanBillNum = asn.AskBillNum; + _asn.PurchaseOrder = asn.PoBillNum.Trim(); + + if(_api.Domain=="CQBMPT") + { + _asn.Domain = "CQBMPT"; + _asn.Site = "CQ01"; + } + else + { + _asn.Site = asn.SubSite; + _asn.Domain = asn.Site; + } + + _asn.Supplier = asn.VendId.Trim(); + _asn.TaskID = p_taskID; + _asn.DataID = Guid.NewGuid(); + _asn.ShippingDate = asn.ShipTime == null ? DateTime.Now : asn.ShipTime.Value; + _asn.PromiseDate = asn.ReceiveTime == null ? DateTime.Now : asn.ReceiveTime.Value; + db.TED_ASN_MSTR.Add(_asn); + foreach (var detail in _asnList) + { + TED_ASN_DET _entity = new TED_ASN_DET(); + var asnDetail = JsonConvert.DeserializeObject(_api.Extend2); + _entity.ASN = detail.BillNum; + _entity.PurchaseOrder = asn.PoBillNum.Trim(); + _entity.Line = detail.ErpLineNum; + _entity.PartCode = detail.PartCode.Trim(); + _entity.Lot = detail.Batch; + _entity.Qty = detail.Qty; + _entity.TaskID = p_taskID; + _entity.PackQty = detail.PackQty; + _entity.Location = asnDetail.DockCode; + _entity.Reference = ""; + _entity.SupplierLot = detail.VendBatch; + _entity.WareClass = ""; + _entity.WareId = ""; + _entity.Price = detail.Price; + _entity.PoUm = detail.PoUnit; + _entity.LocUm = detail.LocUnit; + _entity.Conv = detail.UmConv; + _entity.PartType = ""; + _entity.VendBatch = detail.VendBatch; + _entity.ProduceDate = asnDetail.ProduceDate == null ? DateTime.Now : asnDetail.ProduceDate.Value; + _entity.DueDate = asnDetail.EndTime == null ? DateTime.Now : asnDetail.EndTime.Value; + _entity.CreateUser = detail.CreateOper; + _entity.CreateTime = detail.CreateTime; + _entity.CommandType = "A"; + if (_api.Domain == "CQBMPT") + { + _entity.Domain = "CQBMPT"; + _entity.Site = "CQ01"; + } + else + { + _entity.Site = asn.SubSite; + _entity.Domain = asn.Site; + } + _entity.DataID = Guid.NewGuid(); + db.TED_ASN_DET.Add(_entity); + _ls.Add(_entity); + detail.State = (int)BillState.Finish; + detail.PutTime = DateTime.Now; + } + var ret = CREATE_TEA_TASK_SUB(db, true, new TEA_TASK_SUB() + { + DataCount = _asnList.Count, + TaskID = p_taskID, + TableName = "TED_ASN_MSTR", + Site = asn.SubSite, + Domain = asn.Site, + CreateTime = _api.CreateTime, + CreateUser = _api.CreateOper, + Creator = "SCP", + }); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = new LogModel() { LogMessage=string.Format("成功发布发货单信息{0}条", _asnList.Count), LogTime=DateTime.Now.ToString(), TaskId= p_taskID.ToString(), TableName= "TED_ASN_MSTR" }; + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateAsn", e.Message); + _ret.Result = new LogModel() { LogMessage = "发布发货单信息失败", LogTime = DateTime.Now.ToString(), TaskId = p_taskID.ToString(), TableName = "TED_ASN_MSTR" }; ; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + private static ResultObject UpdatePPod(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity /*UniApiEntities idb, ScpEntities wdb, string seq*/) + { + ResultObject _ret = new ResultObject(); + + string _sql = "SELECT a.*\n" + +"FROM (SELECT Ppod_Nbr, Ppod_Line, Ppod_Part, Ppod_Desc, Ppod_Type, Pod_Wolot, Ppod_pricum, Ppod_reccum, \n" + +" Ppod_qty_ord, Ppod_Qty_Std, Ppod_Due_Date, Ppod_Loc_Um, Ppod_Um, Ppod_Um_Conv, Ppod_Vend, \n" + +" Ppod_Buyer, Ppod_Buyer_Phone, Ppod_Prj, Ppod_Plan, GUID , UID, CreateUser, CreateTime, Remark, \n" + +" TaskID, CommandType, DataID, Domain, Site, CASE LEN(replace([Ppod_rev], '-', '')) \n" + +" WHEN 8 THEN replace([Ppod_rev], '-', '') + '000' WHEN 11 THEN replace([Ppod_rev], '-', '') \n" + +" END AS Ppod_rev\n" + +" FROM TED_PPOD_DET\n" + +" WHERE (TaskID = '{0}')) AS a INNER JOIN\n" + +" (SELECT TaskId, Ppod_nbr, Ppod_line, Domain, Ppod_part, Ppod_due_date, Ppod_vend, \n" + +" MAX(CASE LEN(replace([Ppod_rev], '-', '')) WHEN 8 THEN replace([Ppod_rev], '-', '') \n" + +" + '000' WHEN 11 THEN replace([Ppod_rev], '-', '') END) AS Ppod_rev\n" + +" FROM TED_PPOD_DET\n" + +" WHERE (TaskId = '{0}')\n" + +" GROUP BY TaskId, Ppod_nbr, Ppod_line, Domain, Ppod_part, Ppod_due_date, Ppod_vend) AS b ON \n" + +" a.TaskID = b.TaskId AND a.Domain = b.Domain AND a.Ppod_Due_Date = b.Ppod_due_date AND \n" + +" a.Ppod_Line = b.Ppod_line AND a.Ppod_Nbr = b.Ppod_nbr AND a.Ppod_Vend = b.Ppod_vend AND \n" + +" a.Ppod_Part = b.Ppod_part AND a.Ppod_rev = b.Ppod_rev"; + + //string _sql = "select * from\n" + + //"(SELECT [xxqad_ppod_uid]\n" + + //" ,[xxqad_ppod_seq]\n" + + //" ,[xxqad_ppod_nbr]\n" + + //" ,[xxqad_ppod_line]\n" + + //" ,case\n" + + //" LEN(replace([xxqad_ppod_rev],'-',''))\n" + + //" when 8 then replace([xxqad_ppod_rev],'-','')+'000'\n" + + //" when 11 then replace([xxqad_ppod_rev],'-','') end as xxqad_ppod_rev\n" + + //" ,[xxqad_ppod_site]\n" + + //" ,[xxqad_ppod_domain]\n" + + //" ,[xxqad_ppod_part]\n" + + //" ,[xxqad_ppod_desc]\n" + + //" ,[xxqad_ppod_type]\n" + + //" ,[xxqad_ppod_wolot]\n" + + //" ,[xxqad_ppod_pricum]\n" + + //" ,[xxqad_ppod_reccum]\n" + + //" ,[xxqad_ppod_qty_ord]\n" + + //" ,[xxqad_ppod_qty_std]\n" + + //" ,[xxqad_ppod_due_date]\n" + + //" ,[xxqad_ppod_loc_um]\n" + + //" ,[xxqad_ppod_um]\n" + + //" ,[xxqad_ppod_um_conv]\n" + + //" ,[xxqad_ppod_vend]\n" + + //" ,[xxqad_ppod_buyer]\n" + + //" ,[xxqad_ppod_buyer_phone]\n" + + //" ,[xxqad_ppod_status]\n" + + //" ,[xxqad_ppod_qadread]\n" + + //" ,[xxqad_ppod_wmsread]\n" + + //" ,[xxqad_ppod_scmread]\n" + + //" ,[xxqad_ppod_mesread]\n" + + //" ,[xxqad_ppod_rmks]\n" + + //" ,[xxqad_ppod_createdt]\n" + + //" ,[xxqad_ppod_createur]\n" + + //" ,[xxqad_ppod_updatedt]\n" + + //" ,[xxqad_ppod_prj]\n" + //其他地区注释此项 + //" ,[xxqad_ppod_plan]\n" + //其他地区注释此项 + //" ,[xxqad_ppod_updateur] from xxqad_ppod_det\n" + + //" where xxqad_ppod_seq = '{0}' and xxqad_ppod_scmread = '0'\n" + + //" ) as a\n" + + //"inner join\n" + + //"(\n" + + //"SELECT\n" + + //" xxqad_ppod_seq\n" + + //" ,[xxqad_ppod_nbr]\n" + + //" ,[xxqad_ppod_line]\n" + + //" ,[xxqad_ppod_domain]\n" + + //" ,[xxqad_ppod_part]\n" + + //" ,[xxqad_ppod_due_date]\n" + + //" ,[xxqad_ppod_vend]\n" + + //" ,max(\n" + + //" case\n" + + //" LEN(replace([xxqad_ppod_rev],'-',''))\n" + + //" when 8 then replace([xxqad_ppod_rev],'-','')+'000'\n" + + //" when 11 then replace([xxqad_ppod_rev],'-','') end\n" + + //" ) as xxqad_ppod_rev\n" + + //" FROM [xxqad_ppod_det]\n" + + //" where xxqad_ppod_seq = '{0}' and xxqad_ppod_scmread = '0'\n" + + //" group by\n" + + //" xxqad_ppod_seq\n" + + //" ,[xxqad_ppod_nbr]\n" + + //" ,[xxqad_ppod_line]\n" + + //" ,[xxqad_ppod_domain]\n" + + //" ,[xxqad_ppod_part]\n" + + //" ,[xxqad_ppod_due_date]\n" + + //" ,[xxqad_ppod_vend]) as b\n" + + //" on\n" + + //" a.xxqad_ppod_seq=b.xxqad_ppod_seq\n" + + //" and a.xxqad_ppod_domain=b.xxqad_ppod_domain\n" + + //" and a.xxqad_ppod_due_date=b.xxqad_ppod_due_date\n" + + //" and a.xxqad_ppod_line=b.xxqad_ppod_line\n" + + //" and a.xxqad_ppod_nbr=b.xxqad_ppod_nbr\n" + + //" and a.xxqad_ppod_vend=b.xxqad_ppod_vend\n" + + //" and a.xxqad_ppod_part=b.xxqad_ppod_part\n" + + //" and a.xxqad_ppod_rev=b.xxqad_ppod_rev"; + _sql = string.Format(_sql, p_entity.TaskID.ToString()); + var _ppodList = db.Database.SqlQuery(_sql).ToList(); + + List _list = new List(); + + try + { + + foreach (var itm in _ppodList) + { + + var _plan = scpdb.TB_PO_PLAN.Where(p => p.PoBillNum == itm.Ppod_Nbr && p.PartCode == itm.Ppod_Part && p.EndTime == itm.Ppod_Due_Date && p.Domain == itm.Domain && p.Site == itm.Site && p.Version == itm.Ppod_Rev).FirstOrDefault(); + if (_plan != null) + { + _plan.PlanQty = itm.Ppod_qty_ord; + continue; + + } + _plan = new TB_PO_PLAN(); + _plan.PoBillNum = itm.Ppod_Nbr; + _plan.VendId = itm.Ppod_Vend; + _plan.IsDeleted = false;//操作员 + _plan.CreateTime = DateTime.Parse(DateTime.Now.ToShortDateString()); + _plan.CreateUser = itm.CreateUser; + _plan.Domain = itm.Domain; + _plan.Site = itm.Site; + _plan.PlanType = (int)PoPlanType.New; + _plan.ErpBillNum = itm.Ppod_Nbr; + _plan.BeginTime = itm.CreateTime == null ? DateTime.Now : itm.CreateTime; + _plan.EndTime = itm.Ppod_Due_Date; + _plan.Buyer = itm.Ppod_Buyer; + _plan.BuyerPhone = itm.Ppod_Buyer_Phone; + _plan.PoLine = itm.Ppod_Line; + _plan.PoUnit = itm.Ppod_Um; + + _plan.PartCode = itm.Ppod_Part; + _plan.EndTime = itm.Ppod_Due_Date; + _plan.PlanQty = itm.Ppod_qty_ord; + _plan.IsDeleted = false; + _plan.LocUnit = itm.Ppod_Um; + _plan.UnConv = itm.Ppod_Um_Conv; + _plan.State = (int)AskState.New; + _plan.GUID = Guid.NewGuid(); + _plan.Version = itm.Ppod_Rev; + _plan.Extend1 = itm.Ppod_Prj; + _plan.Extend2 = itm.Ppod_Plan; + //_plan.Extend3 = itm.LastRece; + //_plan.PackQty = itm.OutstandQty; + _list.Add(_plan); + } + + List _ls = new List(); + foreach (var itm in _list) + { + var _count = _ls.Count(p => p.PoBillNum == itm.PoBillNum && p.PartCode == itm.PartCode && p.EndTime == itm.EndTime && p.Domain == p.Domain && p.Site == itm.Site && p.Version == itm.Version); + if (_count == 0) + { + _ls.Add(itm); + } + } + scpdb.TB_PO_PLAN.AddOrUpdate(_ls.ToArray()); + + _ret.MessageList.Add(string.Format("更新计划数据{0}任务编号{1}", _ppodList.Count.ToString(), p_entity.TaskID)); + + Console.WriteLine($"更新看板数据:{_ppodList.Count}"); + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateSupplierPart", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + + } + public static ResultObject UpdatePo(ExchangeCenterContext db, ScpEntities scpdb, List _poList, Guid p_taskID/*EnumCommandType p_command*/) + { + ResultObject _ret = new ResultObject(); + try + { + List _ls = new List(); + + if (_poList.FirstOrDefault() != null) + { + var _api = _poList.FirstOrDefault(); + TED_PO_MSTR _po = new TED_PO_MSTR(); + _po.GUID= Guid.NewGuid(); + _po.PurchaseOrder = _api.BillNum; + _po.ModeType = _api.SubBillType.ToString(); + _po.Supplier = _api.VendId; + _po.Contact = _api.Buyer; + _po.ShipTo = _api.Site; + _po.OrderDate = _api.CreateTime; + _po.DueDate = _api.PutTime; + _po.Confirm = true; + _po.Buyer= _api.Buyer; + if (_api.SubBillType == 1) { + _po.ScheduledOrder =true ; + } + else + { + _po.ScheduledOrder = false; + } + _po.BuyerPhone = _api.BuyerPhone; + _po.Status = (int)PoState.Open; + _po.Taxclass = _api.Extend1; + _po.StartDate = DateTime.Now; + _po.EndDate = _api.ValidDate; + _po.CreateUser = _api.VendBatch; + _po.CreateTime = DateTime.Now; + _po.Domain = _api.Domain; + _po.Site = _api.Site; + _po.Remark = _api.Extend2; + _po.CommandType = "A"; + _po.TaskID = p_taskID; + _po.DataID = Guid.NewGuid(); + _po.Pricelist= _api.VendId.ToUpper().Trim() + _api.Site.Trim().Substring(1, 1) + _api.Site.Substring(3, 1).Trim(); + db.TED_PO_MSTR.Add(_po); + foreach (var detail in _poList) + { + TED_PO_DET _entity = new TED_PO_DET(); + _entity.GUID= Guid.NewGuid(); + _entity.PurchaseOrder = detail.BillNum; + _entity.Line = detail.ErpLineNum; + _entity.PartCode = detail.PartCode; + _entity.Qty = detail.Qty; + _entity.QtyOpen = 0; + _entity.PackQty = 1; + _entity.Currency = "CNY"; + _entity.Price = detail.Price; + _entity.Pricelist = _po.Pricelist; + _entity.PoUm = detail.PoUnit; + _entity.LocUm = detail.LocUnit; + _entity.Conv = 1; + _entity.Status = 1; + _entity.Operation = 0; + _entity.Firmdays = 7; + _entity.Scheduledays = 7; + _entity.Schedulemonth = 1; + _entity.Transportdays = 0; + _entity.StartDate = DateTime.Now; + _entity.EndDate = detail.ValidDate; + _entity.CreateUser = detail.VendBatch; + _entity.CreateTime = DateTime.Now; + _entity.DataID= Guid.NewGuid(); + _entity.TaskID = _po.TaskID; + _entity.CommandType = "A"; + _entity.Domain = _po.Domain; + _entity.Site = _po.Site; + _entity.Scheduleweeks = 2; + _entity.DueDate = detail.PutTime; + _entity.PoType = detail.ModType; + db.TED_POD_DET.Add(_entity); + _ls.Add(_entity); + detail.State = (int)BillState.Finish; + } + var ret = CREATE_TEA_TASK_SUB(db, true, new TEA_TASK_SUB() + { + DataCount = _poList.Count, + TaskID = p_taskID, + TableName = "TED_PO_MSTR", + Site = _po.Site, + Domain = _po.Domain, + CreateTime = _api.CreateTime, + CreateUser = _api.CreateOper, + Creator = "SCP", + }); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = new LogModel() { LogMessage = string.Format("成功发布采购订单信息{0}条", _poList.Count), LogTime = DateTime.Now.ToString(), TaskId = p_taskID.ToString(), TableName = "TED_PO_DET" }; + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateAsn", e.Message); + _ret.Result = new LogModel() { LogMessage = "发布采购订单信息失败", LogTime = DateTime.Now.ToString(), TaskId = p_taskID.ToString(), TableName = "TED_PO_DET" }; ; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + //public static ResultObject UpdatePrice(ExchangeCenterContext db, ScpEntities scpdb, List _PriceList, Guid p_taskID/*EnumCommandType p_command*/) + //{ + // ResultObject _ret = new ResultObject(); + // try + // { + // List _ls = new List(); + + // TES_PURCHASE_PRICE _entity = new TES_PURCHASE_PRICE(); + // var _api = _PriceList.FirstOrDefault(); + // foreach (var detail in _PriceList) + // { + // _entity.GUID= Guid.NewGuid(); + // _entity.PriceList = detail.BillNum; + // _entity.Currency = detail.Currency; + // _entity.PartCode = detail.PartCode; + // _entity.Um = detail.PoUnit; + // _entity.Start = detail.CreateTime; + // _entity.ExpireDate = detail.PutTime; + // _entity.CreateUser = "scp"; + // _entity.ProductLine = ""; + // _entity.AmountType = "P"; + // _entity.CreateTime = DateTime.Now; + // _entity.Remark = detail.Extend1; + // _entity.TaskID = p_taskID; + // _entity.CommandType = "A"; + // _entity.DataID = Guid.NewGuid(); + // _entity.Domain = detail.Domain; + // _entity.Site = detail.Site; + // _entity.SupplierCode = detail.VendId; + // _entity.VendAmount = detail.Price; + // _entity.Desc = detail.Batch; + // _entity.Amount = detail.Qty; + // db.TES_PURCHASE_PRICE.Add(_entity); + // _ls.Add(_entity); + // detail.State = (int)BillState.Finish; + // } + // var ret = CREATE_TEA_TASK_SUB(db, true, new TEA_TASK_SUB() + // { + // DataCount = _PriceList.Count, + // TaskID = p_taskID, + // TableName = "TES_PURCHASE_PRICE", + // Site = _entity.Site, + // Domain = _entity.Domain, + // CreateTime = _entity.CreateTime, + // CreateUser = _api.CreateOper, + // Creator = "SCP", + // }); + // _ret.State = ReturnStatus.Succeed; + // _ret.Result = new LogModel() { LogMessage = string.Format("成功发布价格单信息{0}条", _PriceList.Count), LogTime = DateTime.Now.ToString(), TaskId = p_taskID.ToString(), TableName = "TES_PURCHASE_PRICE" }; + // } + // catch (Exception e) + // { + // _ret.State = ReturnStatus.Failed; + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateAsn", e.Message); + // _ret.Result = new LogModel() { LogMessage = "发布价格单信息失败", LogTime = DateTime.Now.ToString(), TaskId = p_taskID.ToString(), TableName = "TES_PURCHASE_PRICE" }; ; + // _ret.ErrorList.Add(e); + // throw e; + // } + // return _ret; + //} + + public static ResultObject UpdateReciveDetail(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity) + { + ResultObject _ret = new ResultObject(); + try + { + var scpRcveDetailList = new List(); + var _reciveDetailList = db.TED_RECEIPT_DET.Where(p => p.TaskID == p_entity.TaskID).ToList(); + foreach (var detail in _reciveDetailList) + { + var poLineNum = Convert.ToInt32(detail.Line); + var scpRcvDetail = + scpdb.TB_RECEIVE_DETAIL.SingleOrDefault( + p => p.RecvBillNum == detail.ReceiveNbr && + p.PoBillNum == detail.PurchaseOrder && + p.PoLine == detail.Line && + p.PartCode == detail.PartCode && + p.Batch == detail.Lot + ); + if (scpRcvDetail == null) + { + //int istate = 0; + //if (isRerviceOk == false) + //{ + // istate = (int)FormState.关闭; + //} + //else + //{ + // istate = (int)FormState.开放; + //} + scpRcvDetail = new TB_RECEIVE_DETAIL(); + scpRcvDetail.RecvBillNum = detail.ReceiveNbr.Trim();//收货单号 + scpRcvDetail.PoBillNum = detail.PurchaseOrder.Trim();//采购单 + scpRcvDetail.PoLine = detail.Line;//订单行 + scpRcvDetail.PartCode = detail.PartCode.ToUpper().Trim();//零件号 + scpRcvDetail.Batch = detail.PartCode;//批次 + scpRcvDetail.VendBatch = detail.SupplierLot;//供应商批号 + scpRcvDetail.PoUnit = detail.Um;//采购单位 + scpRcvDetail.LocUnit = detail.logisticsUm;//物流单位 + scpRcvDetail.Qty = detail.ReceiveQuantity;//收货总量 //DockCode = ?,//收货口 + scpRcvDetail.State = 0;// (int)FormState.关闭, + scpRcvDetail.Remark = detail.Remark; + scpRcvDetail.CreateTime = detail.CreateTime == null ? DateTime.Now : (DateTime)detail.CreateTime;//创建日期 + scpRcvDetail.CreateUser = detail.CreateUser;//创建用户 + scpRcvDetail.IsDeleted = false; + scpRcvDetail.GUID = detail.TaskID; + scpRcvDetail.BillType = 0; + scpRcvDetail.SubSite = detail.Shipto; + scpRcvDetail.Site = detail.Domain; + scpRcvDetail.Currency = detail.Currency; + scpRcvDetail.Currencyamount = detail.Currencyamount; + + scpRcvDetail.ExchangeRateType = detail.Exchangeratetype; + scpRcvDetail.WorkOrderID = detail.WorkOrderID; + scpRcvDetail.POSite = detail.Posite; + scpRcvDetail.POCost = detail.Purchasecost; + scpRcvDetail.POStandardCost = detail.Purchasestandardcost; + scpRcvDetail.ReceiptType = detail.receipttype; + scpRcvDetail.ReturnReasonCode = detail.Returnreason; + scpRcvDetail.Requestedby = detail.Requestby; + scpRcvDetail.TaxEnvironment = detail.Taxenvironment; + scpRcvDetail.TaxIn = detail.taxin; + scpRcvDetail.TaxUsage = detail.Taxusage; + scpRcvDetail.TaxClass = detail.Taxclass; + scpRcvDetail.PurchaseType = detail.Purchasetype; + scpRcvDetail.UMConversion = detail.Umconversion; + scpRcveDetailList.Add(scpRcvDetail); + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateAsnDetail", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + + } + + public static ResultObject UpdateRecive(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity) + { + ResultObject _ret = new ResultObject(); + try + { + var _reciveList = db.TED_RECEIPT_MSTR.Where(p => p.TaskID == p_entity.TaskID).ToList(); + var _scpPoDetailList = new List(); + foreach (var detail in _reciveList) + { + var scpRcv = scpdb.TB_RECEIVE.SingleOrDefault(p => p.RecvBillNum != null && p.RecvBillNum == detail.ReceiveNbr && p.Site == detail.Domain && p.SubSite == detail.Site); + var scpRcvList = new List(); + bool isRerviceOk = false; + if (!string.IsNullOrEmpty(detail.Site) && !string.IsNullOrEmpty(detail.Domain)) + { + string _domain = detail.Domain; + string _site = detail.Site; + List configs = scpdb.TA_FACTORY_CONFIG.Where(p => p.FactoryId == _domain).ToList(); + foreach (TA_FACTORY_CONFIG cfg in configs) + { + TA_CONFIG tacfg = scpdb.TA_CONFIG.Where(p => p.UID == cfg.ConfigId).SingleOrDefault(); + if (tacfg != null && !string.IsNullOrEmpty(tacfg.ParamName) && tacfg.ParamName == "收货自动审核") + { + if ("允许" == tacfg.ParamValue) + { + isRerviceOk = true; + } + } + } + } + if (scpRcv == null) + { + int istate = 0; + if (isRerviceOk == false) + { + istate = (int)FormState.关闭; + } + else + { + istate = (int)FormState.开放; + } + scpRcv = new TB_RECEIVE + { + RecvBillNum = detail.ReceiveNbr,//收货单号 + State = istate, + Remark = "", + CreateTime = detail.ReceiptDate == null ? DateTime.Now : (DateTime)detail.ReceiptDate,//创建日期 + CreateUser = detail.CreateUser,//创建用户 + IsDeleted = false, + GUID = detail.TaskID, + BillType = 0 + }; + scpRcvList.Add(scpRcv); + } + scpRcv.PoBillNum = detail.PurchaseOrder.Trim();//采购单 + scpRcv.AsnBillNum = detail.ASN;//发货单号 + scpRcv.Site = detail.Domain;//地点 + scpRcv.VendId = detail.Supplier.Trim();//供货商名称 + scpRcv.ShipTime = detail.ReceiptDate;//收货日期 + scpRcv.SubSite = detail.Site; + scpdb.TB_RECEIVE.AddOrUpdate(scpRcvList.ToArray()); + } + + var scpRcveDetailList = new List(); + var _reciveDetailList = db.TED_RECEIPT_DET.Where(p => p.TaskID == p_entity.TaskID).ToList(); + foreach (var detail in _reciveDetailList) + { + var poLineNum = Convert.ToInt32(detail.Line); + var scpRcvDetail = + scpdb.TB_RECEIVE_DETAIL.FirstOrDefault( + p => p.RecvBillNum == detail.ReceiveNbr && + p.PoBillNum == detail.PurchaseOrder && + p.PoLine == detail.Line && + p.PartCode == detail.PartCode + + && p.SubSite==detail.Site + ); + if (scpRcvDetail == null) + { + + //int istate = 0; + //if (isRerviceOk == false) + //{ + // istate = (int)FormState.关闭; + //} + //else + //{ + // istate = (int)FormState.开放; + //} + scpRcvDetail = new TB_RECEIVE_DETAIL(); + scpRcvDetail.RecvBillNum = detail.ReceiveNbr;//收货单号 + scpRcvDetail.PoBillNum = detail.PurchaseOrder.Trim();//采购单 + scpRcvDetail.PoLine = detail.Line;//订单行 + scpRcvDetail.PartCode = detail.PartCode.Trim();//零件号 + scpRcvDetail.Batch = detail.Lot;//批次 + scpRcvDetail.VendBatch = detail.SupplierLot;//供应商批号 + scpRcvDetail.PoUnit = detail.Um;//采购单位 + scpRcvDetail.LocUnit = detail.logisticsUm;//物流单位 + //收货总量 //DockCode = ?,//收货口 + scpRcvDetail.State = 1;// (int)FormState.关闭, + scpRcvDetail.Remark = detail.Remark; + scpRcvDetail.CreateTime = detail.CreateTime == null ? DateTime.Now : (DateTime)detail.CreateTime;//创建日期 + scpRcvDetail.CreateUser = detail.CreateUser;//创建用户 + scpRcvDetail.IsDeleted = false; + scpRcvDetail.GUID = detail.TaskID; + scpRcvDetail.BillType = 0; + scpRcvDetail.SubSite = detail.Shipto; + scpRcvDetail.Site = detail.Domain; + scpRcvDetail.Currency = detail.Currency; + scpRcvDetail.Currencyamount = detail.Currencyamount; + scpRcvDetail.ExchangeRate = detail.Exchangerate==null?"1":detail.Exchangerate.Value.ToString(); + scpRcvDetail.ExchangeRate1 = detail.Exchangerate2 == null ? "1" : detail.Exchangerate2.Value.ToString(); + scpRcvDetail.ExchangeRateType = detail.Exchangeratetype; + scpRcvDetail.WorkOrderID = detail.WorkOrderID; + scpRcvDetail.POSite = detail.Posite; + scpRcvDetail.POCost = detail.Purchasecost; + scpRcvDetail.POStandardCost = detail.Purchasestandardcost; + scpRcvDetail.ReceiptType = detail.receipttype; + scpRcvDetail.ReturnReasonCode = detail.Returnreason; + scpRcvDetail.Requestedby = detail.Requestby; + scpRcvDetail.TaxEnvironment = detail.Taxenvironment; + scpRcvDetail.TaxIn = detail.taxin; + scpRcvDetail.TaxUsage = detail.Taxusage; + scpRcvDetail.TaxClass = detail.Taxclass; + scpRcvDetail.PurchaseType = detail.Purchasetype; + scpRcvDetail.UMConversion = detail.Umconversion; + scpRcveDetailList.Add(scpRcvDetail); + } + scpRcvDetail.Qty = detail.ReceiveQuantity; + } + // var _str=JsonHelper.GetJson>(scpRcveDetailList); + scpdb.TB_RECEIVE_DETAIL.AddOrUpdate(scpRcveDetailList.ToArray()); + _ret.State = ReturnStatus.Succeed; + _ret.MessageList.Add(string.Format("QAD收货单更新{0}任务编号{1}", _reciveDetailList.Count().ToString(), p_entity.TaskID)); + _ret.Result = true; + // var retDetail=UpdateReciveDetail(db, scpdb, p_entity); + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateRecive", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + _ret.MessageList.Add(string.Format("QAD收货单更新失败任务编号{0}", p_entity.TaskID)); + throw e; + } + return _ret; + } + + + public static ResultObject UpdateARRIVE(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity) + { + ResultObject _ret = new ResultObject(); + try + { + var _reciveList = db.TED_RECEIPT_MSTR.Where(p => p.TaskID == p_entity.TaskID && !string.IsNullOrEmpty(p.ReceiveNbr)).ToList(); + var _scpPoDetailList = new List(); + foreach (var detail in _reciveList) + { + var scpRcv = scpdb.TB_ARRIVE.SingleOrDefault(p => p.ArrvBillNum != null && p.ArrvBillNum == detail.ReceiveNbr && p.Site == detail.Domain && p.SubSite == detail.Site); + var scpRcvList = new List(); + bool isRerviceOk = false; + if (!string.IsNullOrEmpty(detail.Site) && !string.IsNullOrEmpty(detail.Domain)) + { + string _domain = detail.Domain; + string _site = detail.Site; + List configs = scpdb.TA_FACTORY_CONFIG.Where(p => p.FactoryId == _domain).ToList(); + foreach (TA_FACTORY_CONFIG cfg in configs) + { + TA_CONFIG tacfg = scpdb.TA_CONFIG.Where(p => p.UID == cfg.ConfigId).SingleOrDefault(); + if (tacfg != null && !string.IsNullOrEmpty(tacfg.ParamName) && tacfg.ParamName == "收货自动审核") + { + if ("允许" == tacfg.ParamValue) + { + isRerviceOk = true; + } + } + } + } + if (scpRcv == null) + { + int istate = 0; + if (isRerviceOk == false) + { + istate = (int)FormState.关闭; + } + else + { + istate = (int)FormState.开放; + } + scpRcv = new TB_ARRIVE + { + ArrvBillNum = detail.ReceiveNbr,//收货单号 + State = istate, + Remark = "", + CreateTime = detail.CreateTime == null ? DateTime.Now : (DateTime)detail.CreateTime,//创建日期 + CreateUser = detail.CreateUser,//创建用户 + IsDeleted = false, + GUID = detail.TaskID, + BillType = 0 + }; + scpRcvList.Add(scpRcv); + } + scpRcv.PoBillNum = detail.PurchaseOrder;//采购单 + scpRcv.AsnBillNum = detail.ASN;//发货单号 + + if (!string.IsNullOrEmpty(detail.ASN)) + { + var _entity=scpdb.TB_ASN.Where(p => p.AsnBillNum == detail.ASN).FirstOrDefault(); + if (_entity != null) + { + _entity.State = 4; + } + } + scpRcv.Site = detail.Domain;//地点 + scpRcv.VendId = detail.Supplier.Trim();//供货商名称 + scpRcv.ShipTime = detail.ReceiptDate;//收货日期 + scpRcv.SubSite = detail.Site; + scpdb.TB_ARRIVE.AddOrUpdate(scpRcvList.ToArray()); + } + + var scpRcveDetailList = new List(); + var _reciveDetailList = db.TED_RECEIPT_DET.Where(p => p.TaskID == p_entity.TaskID && !string.IsNullOrEmpty(p.ReceiveNbr)).ToList(); + foreach (var detail in _reciveDetailList) + { + var poLineNum = Convert.ToInt32(detail.Line); + var scpRcvDetail = + scpdb.TB_ARRIVE_DETAIL.SingleOrDefault( + p => p.ArrvBillNum == detail.ReceiveNbr && + p.PoBillNum == detail.PurchaseOrder && + p.PoLine == detail.Line && + p.PartCode == detail.PartCode && + p.Batch == detail.Lot + &&p.SubSite==detail.Site + ); + if (scpRcvDetail == null) + { + + //int istate = 0; + //if (isRerviceOk == false) + //{ + // istate = (int)FormState.关闭; + //} + //else + //{ + // istate = (int)FormState.开放; + //} + scpRcvDetail = new TB_ARRIVE_DETAIL(); + scpRcvDetail.ArrvBillNum = detail.ReceiveNbr;//收货单号 + scpRcvDetail.PoBillNum = detail.PurchaseOrder.Trim();//采购单 + scpRcvDetail.PoLine = detail.Line;//订单行 + scpRcvDetail.PartCode = detail.PartCode;//零件号 + scpRcvDetail.Batch = detail.Lot;//批次 + scpRcvDetail.VendBatch = detail.SupplierLot;//供应商批号 + scpRcvDetail.PoUnit = detail.Um;//采购单位 + scpRcvDetail.LocUnit = detail.logisticsUm;//物流单位 + scpRcvDetail.Qty = detail.ReceiveQuantity;//收货总量 //DockCode = ?,//收货口 + scpRcvDetail.State = 1;// (int)FormState.关闭, + scpRcvDetail.Remark = detail.Remark; + scpRcvDetail.CreateTime = detail.CreateTime == null ? DateTime.Now : (DateTime)detail.CreateTime;//创建日期 + scpRcvDetail.CreateUser = detail.CreateUser;//创建用户 + scpRcvDetail.IsDeleted = false; + scpRcvDetail.GUID = detail.TaskID; + scpRcvDetail.BillType = 0; + scpRcvDetail.SubSite = detail.Site; + scpRcvDetail.Site = detail.Domain; + scpRcveDetailList.Add(scpRcvDetail); + } + } + var _str = JsonHelper.GetJson>(scpRcveDetailList); + scpdb.TB_ARRIVE_DETAIL.AddOrUpdate(scpRcveDetailList.ToArray()); + _ret.State = ReturnStatus.Succeed; + _ret.MessageList.Add(string.Format("到货单更新{0}任务编号{1}", _reciveDetailList.Count().ToString(), p_entity.TaskID)); + _ret.Result = true; + // var retDetail=UpdateReciveDetail(db, scpdb, p_entity); + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateRecive", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + _ret.MessageList.Add(string.Format("到货单更新失败任务编号{0}", p_entity.TaskID)); + throw e; + } + return _ret; + } + + + + public static ResultObject UpdateInvoiceDetail(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity) + { + ResultObject _ret = new ResultObject(); + try + { + + + + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateAsnDetail", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + + } + + public static ResultObject UpdateInvoice(ExchangeCenterContext db, ScpEntities scpdb, List p_invoiceList, Guid p_taskId) + { + ResultObject _ret = new ResultObject(); + List _mstList = new List(); + List _detList = new List(); + // List _addList = new List(); + try + { + if (p_invoiceList.FirstOrDefault() != null) + { + var _api = p_invoiceList.FirstOrDefault(); + #region 发票主表 + TED_INVOICE_MSTR _invMast = new TED_INVOICE_MSTR(); + var _vinvoice = JsonConvert.DeserializeObject(_api.Extend1); + _invMast.GUID = Guid.NewGuid(); + _invMast.Status = "0"; + _invMast.Invoice_ID = 1000; + _invMast.InvoiceReference = _vinvoice.InvoiceNum; + _invMast.CreateInvoice = true; + _invMast.Supplier = _vinvoice.VendId.Trim(); + _invMast.SupplierName = _vinvoice.VendName.Trim(); + _invMast.Rowid = Guid.NewGuid().ToString(); + _invMast.InvoiceIsTaxable = true; + _invMast.InvoiceHoldAmountTC = _vinvoice.Amount.Value; + _invMast.InvoiceVoucher = 0; + _invMast.InvoiceRegistrationNbr = 1000; + _invMast.PostingDate = _vinvoice.PostingDate==null?DateTime.Now:_vinvoice.PostingDate.Value; + _invMast.Currency = "CNY"; + _invMast.InvoiceDate = _vinvoice.UpdateTime == null ? DateTime.Now : _vinvoice.UpdateTime.Value; + _invMast.GUID = Guid.NewGuid(); + _invMast.Invoice_ID = 1000; + _invMast.CreateInvoice = true; + _invMast.PaymentCondCode = "90"; + _invMast.InvoiceDueDate = _invMast.InvoiceDate.AddDays(int.Parse(_invMast.PaymentCondCode)); + _invMast.InvoiceIsStatusFinal = true; + _invMast.InvoicePostingYear = _vinvoice.PostingDate==null?DateTime.Now.Year: _vinvoice.PostingDate.Value.Year; + _invMast.APMatchingIsStatusFinal = true; + _invMast.InvoiceRemark = _vinvoice.InvcBillNum;//发票编号 + _invMast.CreateWithAmountIsTax = true; + _invMast.InvoiceAmountTC = _vinvoice.TaxAmount == null ? 0 : _vinvoice.TaxAmount.Value; + _invMast.InvoiceIsTaxable = true; + _invMast.CreateUser = _vinvoice.CreateUser; + _invMast.CreateTime = DateTime.Now; + _invMast.Remark = _vinvoice.Remark; + _invMast.TaskID = p_taskId; + _invMast.CommandType = "A"; + _invMast.DataID = Guid.NewGuid(); + _invMast.Domain = _vinvoice.Site; + _invMast.Site = _vinvoice.SubSite; + _invMast.CInvoiceCostCenterCode = _vinvoice.CInvoiceCostCenterCode; + _invMast.CInvoiceReference = _vinvoice.InvoiceNum; + _invMast.CInvoiceDescription = _vinvoice.CInvoiceDescription; + _invMast.CInvoiceType = _vinvoice.CInvoiceType; + _invMast.CInvoiceDivisionCode = _vinvoice.CInvoiceDivisionCode; + + _mstList.Add(_invMast); + #endregion + #region 发票差异 + if ((_vinvoice.ContractPrice != null && _vinvoice.ContractPrice.Value != 0) ) + { + _invMast.InvoiceHoldAmountTC = _vinvoice.Amount.Value + _vinvoice.ContractPrice.Value; + + //_add.VatDebitCC = _vinvoice.ContractPrice.Value;//折扣 + //_add.VatDebitLC = _vinvoice.BlancePrice.Value;//税额调整 + //_add.VatDebitTC = _vinvoice.ContractPrice.Value; + // _addList.Add(_add); + } + if ((_vinvoice.BlancePrice != null && _vinvoice.BlancePrice.Value != 0)) + { + _invMast.InvoiceAmountTC = (_vinvoice.TaxAmount == null ? 0 : _vinvoice.TaxAmount.Value) + _vinvoice.BlancePrice.Value; + } + #endregion + #region 发票明细 + foreach (var detail in p_invoiceList) + { + TED_INVOICE_DET _entity = new TED_INVOICE_DET(); + var _invDetail = JsonConvert.DeserializeObject(detail.Extend2); + _entity.CommandType = "A"; + _entity.GUID = _invDetail.GUID; + _entity.Status =_invMast.Status; + _entity.PurchaseOrder = _invDetail.PoBillNum; + _entity.Line = _invDetail.PoLineNum; + _entity.ReceiveNbr = _invDetail.RecvBillNum; + _entity.MatchQuantity = _invDetail.Qty; + _entity.MatchPrice = _invDetail.Price + ((_invDetail.BlancePrice==null)?0: _invDetail.BlancePrice.Value); + _entity.IsPvodFinished = true; + _entity.UsageDate = DateTime.Now; + _entity.IsRecalculateTaxes = true; + _entity.ParentRowid = _invMast.Rowid; + _entity.CreateUser = _invDetail.CreateUser; + _entity.CreateTime = _invDetail.CreateTime; + _entity.Remark = _invDetail.Remark; + _entity.TaskID = p_taskId; + _entity.CommandType = "A"; + _entity.DataID = Guid.NewGuid(); + _entity.Domain = _invDetail.Site.Trim(); + _entity.Site = _invDetail.SubSite.Trim(); + _entity.PartCode = _invDetail.PartCode; + _entity.Tax = _invDetail.Tax.ToString(); + _detList.Add(_entity); + detail.State = (int)BillState.Finish; + detail.PutTime = DateTime.Now; + + } + #endregion + var ret = CREATE_TEA_TASK_SUB(db, true, new TEA_TASK_SUB() + { + DataCount = p_invoiceList.Count, + TaskID = p_taskId, + TableName = "TED_INVOICE_MSTR", + Site = _vinvoice.SubSite.Trim(), + Domain = _vinvoice.Site, + CreateTime = _api.CreateTime, + CreateUser = _api.CreateOper, + Creator = "SCP", + }); + } + db.TED_INVOICE_MSTR.AddOrUpdate(_mstList.ToArray()); + db.TED_INVOICE_DET.AddOrUpdate(_detList.ToArray()); + //db.TED_INVOICE_ADD.AddOrUpdate(_addList.ToArray()); + + var str=JsonHelper.GetJson(_mstList.ToArray()); + var str1=JsonHelper.GetJson(_detList.ToArray()); + + _ret.State = ReturnStatus.Succeed; + _ret.Result = new LogModel() { LogMessage = string.Format("成功发布发票信息{0}条",_detList.Count), LogTime = DateTime.Now.ToString(), TaskId = p_taskId.ToString(), TableName = "TED_INVOICE_MSTR" }; + + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateInvoice", e.Message); + _ret.Result = new LogModel() { LogMessage = "发布发票信息失败", LogTime = DateTime.Now.ToString(), TaskId = p_taskId.ToString(), TableName = "TED_INVOICE_MSTR" }; ; + _ret.ErrorList.Add(e); + + throw e; + } + return _ret; + + } + //public static ResultObject UpdateReturnDetail(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity) + //{ + // ResultObject _ret = new ResultObject(); + // try + // { + // var scpRcveDetailList = new List(); + // var _reciveDetailList = db.TED_RETURN_DET.Where(p => p.TaskID == p_entity.TaskID).ToList(); + // foreach (var detail in _reciveDetailList) + // { + + // var poLineNum = Convert.ToInt32(detail.Line); + // var scpRcvDetail = + // scpdb.TB_RECEIVE_DETAIL.SingleOrDefault( + // p => p.RecvBillNum == detail.ReturnNbr && + // p.PoBillNum == detail.PurchaseOrder && + // p.PoLine == detail.Line && + // p.PartCode == detail.PartCode && + // p.Batch == detail.Lot + // ); + // if (scpRcvDetail == null) + // { + // //int istate = 0; + // //if (isRerviceOk == false) + // //{ + // // istate = (int)FormState.关闭; + // //} + // //else + // //{ + // // istate = (int)FormState.开放; + // //} + // scpRcvDetail = new TB_RECEIVE_DETAIL + // { + // RecvBillNum = detail.ReturnNbr,//收货单号 + // PoBillNum = detail.PurchaseOrder,//采购单 + // PoLine = detail.Line,//订单行 + // PartCode = detail.PartCode,//零件号 + // Batch = detail.PartCode,//批次 + // VendBatch = detail.SupplierLot,//供应商批号 + // PoUnit = detail.Um,//采购单位 + // LocUnit = detail.logisticsUm,//物流单位 + // Qty = detail.ReturnQuantity,//收货总量 //DockCode = ?,//收货口 + // State = 0,// (int)FormState.关闭, + // Remark = detail.Remark, + // CreateTime = detail.CreateTime == null ? DateTime.Now : (DateTime)detail.CreateTime,//创建日期 + // CreateUser = detail.CreateUser,//创建用户 + // IsDeleted = false, + // GUID = System.Guid.NewGuid(), + // BillType = 0 + // }; + // scpRcveDetailList.Add(scpRcvDetail); + // } + // } + // } + // catch (Exception e) + // { + // _ret.State = ReturnStatus.Failed; + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateAsnDetail", e.Message); + // _ret.Result = false; + // _ret.ErrorList.Add(e); + // throw e; + // } + // return _ret; + //} + + public static ResultObject UpdateReturn(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity) + { + ResultObject _ret = new ResultObject(); + try + { + var _reciveList = db.TED_RETURN_MSTR.Where(p => p.TaskID == p_entity.TaskID && !string.IsNullOrEmpty(p.ReturnNbr)).ToList(); + var _scpPoDetailList = new List(); + foreach (var detail in _reciveList) + { + var scpRcv = scpdb.TB_ARRIVE.SingleOrDefault(p => p.ArrvBillNum != null && p.ArrvBillNum == detail.ReturnNbr && p.Site == detail.Domain && p.SubSite == detail.Site); + var scpRcvList = new List(); + bool isRerviceOk = false; + if (!string.IsNullOrEmpty(detail.Site) && !string.IsNullOrEmpty(detail.Domain)) + { + string _domain = detail.Domain; + string _site = detail.Site; + List configs = scpdb.TA_FACTORY_CONFIG.Where(p => p.FactoryId == _domain).ToList(); + foreach (TA_FACTORY_CONFIG cfg in configs) + { + TA_CONFIG tacfg = scpdb.TA_CONFIG.Where(p => p.UID == cfg.ConfigId).SingleOrDefault(); + if (tacfg != null && !string.IsNullOrEmpty(tacfg.ParamName) && tacfg.ParamName == "收货自动审核") + { + if ("允许" == tacfg.ParamValue) + { + isRerviceOk = true; + } + } + } + } + if (scpRcv == null) + { + int istate = 0; + if (isRerviceOk == false) + { + istate = (int)FormState.关闭; + } + else + { + istate = (int)FormState.开放; + } + scpRcv = new TB_ARRIVE + { + ArrvBillNum = detail.ReturnNbr,//收货单号 + State = istate, + Remark = "", + CreateTime = detail.CreateTime == null ? DateTime.Now : (DateTime)detail.CreateTime,//创建日期 + CreateUser = detail.CreateUser,//创建用户 + IsDeleted = false, + GUID = detail.TaskID, + BillType = 1 + }; + scpRcvList.Add(scpRcv); + } + scpRcv.PoBillNum = detail.PurchaseOrder;//采购单 + scpRcv.AsnBillNum = detail.ASN;//发货单号 + + if (!string.IsNullOrEmpty(detail.ASN)) + { + var _entity=scpdb.TB_ASN.Where(p => p.AsnBillNum == detail.ASN).FirstOrDefault(); + if (_entity != null) + { + _entity.State = 4; + } + } + scpRcv.Site = detail.Domain;//地点 + scpRcv.VendId = detail.Supplier;//供货商名称 + scpRcv.ShipTime = detail.ReturnDate;//收货日期 + scpRcv.SubSite = detail.Site; + scpdb.TB_ARRIVE.AddOrUpdate(scpRcvList.ToArray()); + } + + var scpRcveDetailList = new List(); + var _reciveDetailList = db.TED_RETURN_DET.Where(p => p.TaskID == p_entity.TaskID ).ToList(); + var _recive = db.TED_RETURN_MSTR.Where(p => p.TaskID == p_entity.TaskID && !string.IsNullOrEmpty(p.ReturnNbr)).FirstOrDefault(); + if (_recive != null) + { + foreach (var detail in _reciveDetailList) + { + detail.ReturnNbr = _recive.ReturnNbr; + var poLineNum = Convert.ToInt32(detail.Line); + var scpRcvDetail = + scpdb.TB_ARRIVE_DETAIL.SingleOrDefault( + p => p.ArrvBillNum == detail.ReturnNbr && + p.PoBillNum == detail.PurchaseOrder && + p.PoLine == detail.Line && + p.PartCode == detail.PartCode && + p.Batch == detail.Lot + && p.SubSite == detail.Site + ); + if (scpRcvDetail == null) + { + + //int istate = 0; + //if (isRerviceOk == false) + //{ + // istate = (int)FormState.关闭; + //} + //else + //{ + // istate = (int)FormState.开放; + //} + scpRcvDetail = new TB_ARRIVE_DETAIL(); + scpRcvDetail.ArrvBillNum = detail.ReturnNbr;//收货单号 + scpRcvDetail.PoBillNum = detail.PurchaseOrder;//采购单 + scpRcvDetail.PoLine = detail.Line;//订单行 + scpRcvDetail.PartCode = detail.PartCode;//零件号 + scpRcvDetail.Batch = detail.Lot;//批次 + scpRcvDetail.VendBatch = detail.SupplierLot;//供应商批号 + scpRcvDetail.PoUnit = detail.Um;//采购单位 + scpRcvDetail.LocUnit = detail.logisticsUm;//物流单位 + scpRcvDetail.Qty = detail.ReturnQuantity;//收货总量 //DockCode = ?,//收货口 + scpRcvDetail.State = 1;// (int)FormState.关闭, + scpRcvDetail.Remark = detail.Remark; + scpRcvDetail.CreateTime = detail.CreateTime == null ? DateTime.Now : (DateTime)detail.CreateTime;//创建日期 + scpRcvDetail.CreateUser = detail.CreateUser;//创建用户 + scpRcvDetail.IsDeleted = false; + scpRcvDetail.GUID = detail.TaskID; + scpRcvDetail.BillType = 1; + scpRcvDetail.SubSite = detail.Site; + scpRcvDetail.Site = detail.Domain; + + scpRcveDetailList.Add(scpRcvDetail); + } + } + var _str = JsonHelper.GetJson>(scpRcveDetailList); + scpdb.TB_ARRIVE_DETAIL.AddOrUpdate(scpRcveDetailList.ToArray()); + } + _ret.State = ReturnStatus.Succeed; + _ret.MessageList.Add(string.Format("退货单更新{0}任务编号{1}", _reciveDetailList.Count().ToString(), p_entity.TaskID)); + _ret.Result = true; + // var retDetail=UpdateReciveDetail(db, scpdb, p_entity); + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateRecive", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + _ret.MessageList.Add(string.Format("退货单更新失败任务编号{0}", p_entity.TaskID)); + throw e; + } + return _ret; + + } + + + public static ResultObject UpdatePoDetail(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity) + { + ResultObject _ret = new ResultObject(); + try + { + var _poDetailList = db.TED_POD_DET.Where(p => p.TaskID == p_entity.TaskID).ToList(); + var _scpPoDetailList = new List(); + foreach (var detail in _poDetailList) + { + var lineNum = Convert.ToInt32(detail.Line); + var PoDetail = + scpdb.TB_PO_DETAIL.SingleOrDefault( + p => p.PoBillNum == detail.PurchaseOrder && p.PoLine == lineNum && p.SubSite == detail.Site && p.Site == detail.Domain); + if (PoDetail == null) + { + PoDetail = new TB_PO_DETAIL + { + PoBillNum = detail.PurchaseOrder,//订单号 + PoLine = lineNum,//订单行 + IsDeleted = false, + GUID = detail.TaskID + }; + _scpPoDetailList.Add(PoDetail); + } + PoDetail.PartCode = detail.PartCode;//零件号-物料号 + PoDetail.PlanQty = detail.Qty;//订货数量-采购量 + PoDetail.PoUnit = detail.PoUm;//采购单位 + PoDetail.LocUnit = detail.LocUm;//存储单位 + PoDetail.Price = ScpCache.Config.项目名称 == ProjectName.重庆北汽模塑.ToString()? 0 : detail.Price; + PoDetail.Currency = detail.Currency;//币种 + PoDetail.PackQty = detail.PackQty;//标包数量 + PoDetail.UnConv = detail.Conv;//转换率 + PoDetail.State = Convert.ToInt32(detail.Status);//状态 + PoDetail.Remark = detail.Remark;//备注 + PoDetail.CreateTime = detail.CreateTime == null ? DateTime.Now : (DateTime)detail.CreateTime;//创建日期 + PoDetail.CreateUser = detail.CreateUser;//创建用户 + PoDetail.UpdateTime = detail.CreateTime == null ? DateTime.Now : (DateTime)detail.CreateTime;//创建日期 + PoDetail.UpdateUser = detail.CreateUser;//创建用户 + } + scpdb.TB_PO_DETAIL.AddOrUpdate(_scpPoDetailList.ToArray()); + //Console.WriteLine($"更新 采购订单 数据:{qadPoDetailList.Count}"); + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "Save_TEA_TASK_SUB", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + public static ResultObject UpdatePo(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity) + { + ResultObject _ret = new ResultObject(); + try + { + var _poList = db.TED_PO_MSTR.Where(p => p.TaskID == p_entity.TaskID).ToList(); + var _scpPolist = new List(); + foreach (var po in _poList) + { + var _po = scpdb.TB_PO.SingleOrDefault(p => p.ErpBillNum == po.PurchaseOrder && p.Site == po.Domain && p.SubSite == po.Site); + if (_po == null) + { + int temp; + _po = new TB_PO + { + PoBillNum = po.PurchaseOrder,//订单号 + ErpBillNum = po.PurchaseOrder,//ERP订单号 + VendId = po.Supplier,//供应商编号 + ModType = Int32.TryParse(po.ModeType, out temp) ? temp : (int?)null, //单据类型(1:日程单,2:离散订单) + Contacter = po.Contact,//联系人 + Site = po.Domain,//地点 + State = (int)FormState.开放,//状态 + Remark = po.Remark,//说明 + CreateTime = po.CreateTime == null ? DateTime.Now : (DateTime)po.CreateTime,//创建日期 + CreateUser = po.CreateUser,//创建用户 + IsDeleted = false, + GUID =po.TaskID, + BeginTime = po.OrderDate == null ? DateTime.Now : po.OrderDate,//创建日期 + EndTime = po.DueDate//收货结束时间 + }; + int _count = _scpPolist.Count(p => p.ErpBillNum == po.PurchaseOrder && p.Site == po.Domain && p.SubSite == po.Site); + if (_count == 0) + { + _scpPolist.Add(_po); + } + } + _po.Contacter = po.Contact; + _po.Buyer = _po.Buyer; + _po.BuyerPhone = _po.BuyerPhone; + _po.UpdateTime = _po.UpdateTime;//更新日期 + _po.UpdateUser = _po.UpdateUser;//更新用户 + } + scpdb.TB_PO.AddOrUpdate(_scpPolist.ToArray()); + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "Save_TEA_TASK_SUB", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + + + /// + /// 更新供应商 + /// + /// + /// + /// + /// + public static ResultObject UpdateSupplier(List p_list, ScpEntities scpdb, AppBoxContext authdb, TEA_TASK_SUB p_entity) + { + Dictionary _dic = new Dictionary(); + _dic.Add("BJBMPT", "BJ01"); + _dic.Add("CQBMPT", "CQ01"); + _dic.Add("ZZBMPT", "ZZ01"); + _dic.Add("HFBMPT", "HF01"); + ResultObject _ret = new ResultObject(); + try + { + var _venderlist = new List(); + foreach (var supplier in p_list) + { + foreach (var item in _dic) + { + var _supplier = scpdb.TA_VENDER.FirstOrDefault(p => p.VendId == supplier.SupplierCode && p.Site == item.Key); + if (_supplier == null) + { + _supplier = new TA_VENDER + { + VendId = supplier.SupplierCode.ToUpper(), + VendAbbCode = "0", + State = 1, + }; + } + _supplier.VendName = string.IsNullOrEmpty(supplier.SupplierName) ? supplier.SupplierName : supplier.SupplierName; + + _supplier.SubSite = item.Value;//地点 + _supplier.Site = item.Key;//域 + _supplier.Remark = supplier.TaskID.ToString();//任务ID + + var vendname = string.Format("{0}@{1}", _supplier.VendId.ToUpper(), _supplier.Site.ToUpper()); + var _first = authdb.Users.Where(p => p.Name == vendname).FirstOrDefault(); + var _vend = authdb.Roles.Where(p => p.Name == "供应商").FirstOrDefault(); + var _factory = authdb.TA_FACTORY.Where(p => p.ErpDomain == _supplier.Site.ToUpper()).FirstOrDefault(); + if (_first == null && _vend != null && _factory != null) + { + User _entity = new User(); + _entity.Name = vendname; + _entity.Remark = _supplier.Site.ToUpper(); + _entity.Password = PasswordUtil.CreateDbPassword("99999999"); + _entity.ChineseName = _supplier.VendName; + _entity.Email = _supplier.VendId + "@163.com"; + _entity.Gender = "男"; + _entity.Enabled = true; + _entity.Roles = new List(); + Role t = authdb.Set().Local.Where(x => x.ID == _vend.ID).FirstOrDefault(); + if (t == null) + { + t = new Role { ID = _vend.ID }; + authdb.Set().Attach(t); + } + _entity.Roles.Add(t); + _entity.TA_FACTORY = new List(); + TA_FACTORY f = authdb.Set().Local.Where(x => x.ID == _factory.ID).FirstOrDefault(); + if (f == null) + { + f = new TA_FACTORY { ID = _factory.ID }; + authdb.Set().Attach(f); + } + _entity.TA_FACTORY.Add(f); + authdb.Users.Add(_entity); + } + _venderlist.Add(_supplier); + } + } + scpdb.TA_VENDER.AddOrUpdate(_venderlist.ToArray()); + _ret.State = ReturnStatus.Succeed; + _ret.MessageList.Add(string.Format("更新表{0}任务ID{1}成功!", "TES_SUPPLIER", p_entity.TaskID)); + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateSupplier", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + + private static void UpdateSupplierExtend(List p_vendList ) + { + var _ls = new List(); + using (var db = EntitiesFactory.CreateAppBoxInstance()) + { + foreach (var qadData in p_vendList) + { + try + { + var vendname = string.Format("{0}@{1}", qadData.SupplierCode.ToUpper(), qadData.Domain.ToUpper()); + var _first = db.Users.Where(p => p.Name == vendname).FirstOrDefault(); + if (_first != null) + { + var _ef = db.VenderUsers.FirstOrDefault(p => p.VenderId == qadData.SupplierCode && p.UserId == _first.ID) ?? new VenderUsers() + { + UserId = _first.ID, + VenderId = qadData.SupplierCode.ToUpper() + }; + _ls.Add(_ef); + } + } + catch + { + } + db.VenderUsers.AddOrUpdate(_ls.ToArray()); + } + } + } + + /// + /// 更新供应商零件 + /// + /// + /// + /// + /// + /// + public static ResultObject UpdateSupplierPart(DataCenterContext dc, ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity) + { + ResultObject _ret = new ResultObject(); + try + { + var _supplierpartlist = db.TES_SUPPLIER_PART.Where(p => p.TaskID == p_entity.TaskID).ToList(); + var _venderpartlist = new List(); + decimal _packqty = 1; + foreach (var supplierpart in _supplierpartlist) + { + var _supplierpart = scpdb.TA_VEND_PART.SingleOrDefault(p => p.VendId == supplierpart.Supplier && p.PartCode == supplierpart.PartCode && p.VendPartCode == supplierpart.SupplierPart && p.Site == supplierpart.Domain ); + if (_supplierpart == null) + { + var _pack = dc.TS_PACK.SingleOrDefault(p => p.PartCode == supplierpart.PartCode && p.Site == supplierpart.Domain && p.Site == supplierpart.Site); + if (_pack != null) + { + } + _supplierpart = new TA_VEND_PART + { + VendId = supplierpart.Supplier.ToUpper(),//供应商编号 + PartCode = supplierpart.PartCode.ToUpper(),//对应物料号 + VendPartCode = supplierpart.SupplierPart.ToUpper(),//供应商物料号 + VendPackQty = _packqty,//供应商物料号 + State = 1,//状态(0:失效 1:有效) + Remark = "", + CreateTime = supplierpart.CreateTime == null ? DateTime.Now : (DateTime)supplierpart.CreateTime,//创建日期 + CreateUser = supplierpart.CreateUser,//创建用户 + TransportationTime = 1, + IsDeleted = false, + GUID = new Guid() + }; + } + _supplierpart.Site = string.IsNullOrEmpty(_supplierpart.Site) ? supplierpart.Domain : _supplierpart.Site; + _supplierpart.SubSite = string.IsNullOrEmpty(_supplierpart.SubSite) ? supplierpart.Site : _supplierpart.SubSite; + _supplierpart.VendPartCode = supplierpart.SupplierPart?.ToUpper() ?? supplierpart.PartCode.ToUpper(); + _supplierpart.VendPackQty = _packqty; + _supplierpart.TransportationTime = 1; + _supplierpart.UpdateTime = DateTime.Now;//更新日期 + _supplierpart.UpdateUser = supplierpart.CreateUser;//更新用户 + _supplierpart.Remark = supplierpart.TaskID.ToString();//任务ID + _venderpartlist.Add(_supplierpart); + } + scpdb.TA_VEND_PART.AddOrUpdate(_venderpartlist.ToArray()); + _ret.State = ReturnStatus.Succeed; + _ret.MessageList.Add(string.Format("更新表{0}任务ID{1}成功!", "TES_SUPPLIER_PART", p_entity.TaskID)); + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateSupplierPart", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + /// + /// 更新零件 + /// + /// + /// + /// + /// + public static ResultObject UpdatePart(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity) + { + ResultObject _ret = new ResultObject(); + try + { + var _partmstrlist = db.TES_PART_MSTR.Where(p => p.TaskID == p_entity.TaskID&&p.CommandType!="D").ToList(); + var _partmstrlistD = db.TES_PART_MSTR.Where(p => p.TaskID == p_entity.TaskID&&p.CommandType=="D").ToList(); + var _partlist = new List(); + var _partlistD = new List(); + foreach (var part in _partmstrlist) + { + var _part = scpdb.TA_PART.SingleOrDefault(p => p.PartCode == part.PartCode && p.Site == part.Domain ); + + if (_part == null) + { + _part = new TA_PART + { + PartCode = part.PartCode.ToUpper(), + ErpPartCode = part.PartCode.ToUpper(), + }; + } + _part.PartDesc1 = part.Desc1; + _part.PartDesc2 = string.IsNullOrEmpty(part.Desc2)?string.Empty: part.Desc2; + if (!string.IsNullOrEmpty(part.Group)) + { + _part.ProjectId = part.Group; + } + else + { + _part.ProjectId ="public"; + + } + _part.Unit = !string.IsNullOrEmpty(part.Um) ? part.Um.ToUpper() : "EA"; + + _part.State = part.Status; + if (part.InspectType != null) + { + _part.Ischeck = (part.InspectType == 0) ? true : false; + } + + if (!string.IsNullOrEmpty(part.PartType)) + { + if (part.PartType.Substring(0, 2) == "12") + { + _part.PartGroup = "AST"; + } + else + { + _part.PartGroup = "其他"; + } + } + _part.Qlevel = string.IsNullOrEmpty(part.Qgrade)?string.Empty: part.Qgrade; + _part.State = part.Status; + _part.Site = part.Domain; + // _part.SubSite = part.Site; + _part.Remark = part.TaskID.ToString(); + _partlist.Add(_part); + } + if (_partmstrlistD.Count() > 0) + { + foreach (var depart in _partmstrlistD) + { + var _part = scpdb.TA_PART.FirstOrDefault(p => p.PartCode == depart.PartCode && p.Site == depart.Domain); + if (_part != null) + { + _partlistD.Add(_part); + } + } + } + + var str= JsonHelper.GetJson>(_partlist); + + scpdb.TA_PART.AddOrUpdate(_partlist.ToArray()); + if (_partlistD.Count() > 0) + { + scpdb.TA_PART.DeleteRangeByKey(_partlistD.ToArray()); + } + + _ret.State = ReturnStatus.Succeed; + _ret.MessageList.Add(string.Format("更新表{0}任务ID{1}成功!", "TES_PART_MSTR", p_entity.TaskID)); + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdatePart", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + public static ResultObject UpdateFactory(ExchangeCenterContext db, ScpEntities scpdb, AppBoxContext appscpdb, TEA_TASK_SUB p_entity) + { + ResultObject _ret = new ResultObject(); + try + { + var _factorylist = db.TES_SITE.Where(p => p.TaskID == p_entity.TaskID).ToList(); + var _appboxfactorylist = new List(); + var _scpfactorylist = new List(); + foreach(var factory in _factorylist) + { + var item1 = appscpdb.TA_FACTORY.SingleOrDefault(p => p.ErpDomain == factory.Domain && p.ErpSite == factory.Site); + if (item1 == null) + { + item1 = new TA_FACTORY + { + ErpDomain = factory.Domain, + ErpSite = factory.Site, + GUID = Guid.NewGuid(), + State = 1, + CreateTime = DateTime.Now, + CreateUser= factory.CreateUser + }; + } + item1.FactoryId = factory.Domain; + item1.ZipCode = factory.Domain; + item1.FactoryName = factory.Desc; + item1.Address = ""; + item1.Remark = factory.Remark; + item1.Tel = ""; + item1.Fax = ""; + item1.UpdateTime = DateTime.Now; + item1.UpdateUser = factory.CreateUser; + _appboxfactorylist.Add(item1); + var item2 = scpdb.TB_FACTORY.SingleOrDefault(p => p.ErpDomain == factory.Domain && p.ErpSite == factory.Site); + if (item2 == null) + { + item2 = new TB_FACTORY + { + ErpDomain = factory.Domain, + ErpSite = factory.Site, + GUID = Guid.NewGuid(), + State = 1, + CreateTime = DateTime.Now, + CreateUser = factory.CreateUser + }; + } + item2.FactoryId = factory.Domain; + item2.ZipCode = factory.Domain; + item2.FactoryName = factory.Desc; + item2.Address = ""; + item2.Remark = factory.Remark; + item2.Tel = ""; + item2.Fax = ""; + item2.UpdateTime = DateTime.Now; + item2.UpdateUser = factory.CreateUser; + _scpfactorylist.Add(item2); + } + appscpdb.TA_FACTORY.AddOrUpdate(_appboxfactorylist.ToArray()); + scpdb.TB_FACTORY.AddOrUpdate(_scpfactorylist.ToArray()); + if (appscpdb.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateFactory", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + + public static ResultObject UpdateTES_PURCHASE_PRICE(List p_list, string domain, string site, string name, bool flag,int ConfirmState) + { + + ResultObject _ret = new ResultObject(); + if (ConfirmState!=(int)PriceState.FConfirm) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + return _ret; + } + try + { + ScpEntities scpdb = EntitiesFactory.CreateScpInstance(); + ExchangeCenterContext db = EntitiesFactory.CreateExchangeCenterInstance(); + List _teslist = new List(); + var _ls = scpdb.V_TB_PRICE.Where(p => p_list.Contains(p.UID)).ToList(); + + foreach (var _price in _ls) + { + Guid _taskguid = Guid.NewGuid(); + TS_UNI_API _item = new TS_UNI_API(); + + + var _vend = _price.VendId.Trim(); + var _partCode = _price.PartCode.Trim(); + var _domain = _price.Site.Trim(); + var _site = _price.SubSite.Trim(); + _item.BillNum = (_vend + _site.Substring(1, 1) + _site.Substring(3, 1)).Trim(); + _item.InterfaceType = "Price"; + if (_price.Extend2 == "是") + { + _item.Batch = "Yes"; + } + else if (_price.Extend2 == "否") + { + _item.Batch = "No"; + } + _item.Qty = _price.Amt+_price.SharingPrice; + _item.Price = _price.Amt; + _item.State = 1; + _item.ValidDate = DateTime.Now; + _item.ErpLineNum = 1; + _item.PartCode =_partCode;//零件编号 + _item.Domain = _domain;//域 + _item.Site = _site;//地点 + _item.Extend1 = _price.Remarks; + _item.CreateTime = Convert.ToDateTime(_price.StartTime);//开始时间 + _item.PutTime = Convert.ToDateTime(_price.EndTime);//结束时间 + _item.CreateOper = _price.Creator; + _item.Currency = _price.Curr;//货币 + var _first = scpdb.TA_PART.Where(itm => itm.PartCode == _partCode).FirstOrDefault(); + if (_first != null) + { + _item.PoUnit = _first.Unit; + } + else + { + + _item.PoUnit = _price.Unit;//单位 + } + if(_domain == "BJBMPT") + { + + var po = scpdb.V_TB_PO_DETAIL.Count(p => p.PartCode == _partCode&&p.Site== "BJBMPT"&&p.VendId== _vend.Trim()); + if (po > 0) + { + var _list = scpdb.V_TB_PO_DETAIL.Where(p => p.PartCode == _partCode && p.Site == "BJBMPT" && p.VendId == _vend.Trim()).ToList(); + foreach(var b in _list) + { + var PP = scpdb.TB_PO_DETAIL.FirstOrDefault(p => p.PartCode == b.PartCode && p.Site == "BJBMPT" && p.PoBillNum == b.PoBillNum); + PP.Price = _item.Price; + scpdb.TB_PO_DETAIL.AddOrUpdate(PP); + } + + + } + + } + _teslist.Add(_item); + + } + + scpdb.TS_UNI_API.AddOrUpdate(_teslist.ToArray()); + + if (scpdb.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message =e.InnerException.Message; + } + return _ret; + } + + public static ResultObject UpdateTES_PURCHASE_PRICE_TemporaryPrice(List p_list, string domain, string site, string name, bool flag) + { + + ResultObject _ret = new ResultObject(); + + try + { + ScpEntities scpdb = EntitiesFactory.CreateScpInstance(); + ExchangeCenterContext db = EntitiesFactory.CreateExchangeCenterInstance(); + List _teslist = new List(); + var _ls = scpdb.V_TB_PRICE_TemporaryPrice.Where(p => p_list.Contains(p.UID)).ToList(); + + foreach (var _price in _ls) + { + Guid _taskguid = Guid.NewGuid(); + TS_UNI_API _item = new TS_UNI_API(); + + + var _vend = _price.VendId.Trim(); + var _partCode = _price.PartCode.Trim(); + var _domain = _price.Site.Trim(); + var _site = _price.SubSite.Trim(); + _item.BillNum = (_vend + _site.Substring(1, 1) + _site.Substring(3, 1)).Trim(); + _item.InterfaceType = "Price"; + + _item.Batch = "No"; + + _item.Qty = _price.Amt + _price.SharingPrice; + _item.Price = _price.Amt; + _item.State = 1; + _item.ValidDate = DateTime.Now; + _item.ErpLineNum = 1; + _item.PartCode = _partCode;//零件编号 + _item.Domain = _domain;//域 + _item.Site = _site;//地点 + _item.Extend1 = _price.Remarks; + _item.CreateTime = Convert.ToDateTime(_price.StartTime);//开始时间 + _item.PutTime = Convert.ToDateTime(_price.EndTime);//结束时间 + _item.CreateOper = _price.Creator; + _item.Currency = _price.Curr;//货币 + var _first = scpdb.TA_PART.Where(itm => itm.PartCode == _partCode).FirstOrDefault(); + if (_first != null) + { + _item.PoUnit = _first.Unit; + } + else + { + + _item.PoUnit = _price.Unit;//单位 + } + + _teslist.Add(_item); + + } + + scpdb.TS_UNI_API.AddOrUpdate(_teslist.ToArray()); + + if (scpdb.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = e.InnerException.Message; + } + return _ret; + } + public static ResultObject WritePo(List p_order_list, string site, string p_creator, DateTime p_time, BillModType p_modtype, string subsite, string p_chineseName, string p_buyerPhone) + { + ResultObject _ret = new ResultObject(); + using (var scope = + new TransactionScope(TransactionScopeOption.Required, new TransactionOptions() + { + IsolationLevel = System.Transactions.IsolationLevel.Serializable, + Timeout = new TimeSpan(0, 20, 0) + })) + { + try + { + ScpEntities scpdb = EntitiesFactory.CreateScpInstance(); + ExchangeCenterContext db = EntitiesFactory.CreateExchangeCenterInstance(); + var OrderList = p_order_list.GroupBy(p => p.订单编号).ToList(); + string _polist = ""; + int _num = 1; + OrderList.ForEach((p) => + { + var list = p.ToList(); + if (list.Count > 0) + { + #region 日程单 + if (p_modtype == BillModType.Contract) + { + var _entity = list.FirstOrDefault(); + var _po = scpdb.TB_PO.SingleOrDefault(t => t.PoBillNum == _entity.订单编号/* && t.State == state*/ && t.Site == site && t.SubSite == subsite && t.VendId == _entity.供应商编号.ToUpper()); + if (_po == null) + { + _po = new TB_PO { GUID = Guid.NewGuid(), PoBillNum = _entity.订单编号.ToUpper(), State = (int)PoState.Open, Site = site, SubSite = subsite, VendId = _entity.供应商编号.Trim().ToUpper() }; + } + _po.ErpBillNum = _entity.订单编号.Trim().ToUpper();; + _po.ModType = (int)p_modtype; + _po.Contacter = p_chineseName;// _entity.联系人; + _po.Buyer = p_chineseName;// _entity.联系人; + _po.Site = site.Trim().ToUpper(); + _po.BuyerPhone = p_buyerPhone; + _po.Remark = _entity.备注; + _po.IsDeleted = false; + _po.State = (int)PoState.Open; + _po.CreateTime = DateTime.Now; + _po.CreateUser = p_creator; + _po.BeginTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间); + _po.EndTime = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(_entity.要求到货日期); + _po.Pricelist = _entity.供应商编号.Trim().ToUpper() + subsite.Substring(1, 1) + subsite.Substring(3, 1); + _po.Taxclass = _entity.税率; + _po.SubSite= subsite.Trim().ToUpper(); + scpdb.TB_PO.AddOrUpdate(_po); + + list.ForEach((itm) => + { + TB_PO_DETAIL _PO_Detail = new TB_PO_DETAIL(); + _PO_Detail.Currency = "CNY"; + _PO_Detail.PoBillNum = _po.PoBillNum; + _PO_Detail.PartCode = itm.零件号.Trim(); + var part = scpdb.TA_PART.FirstOrDefault(t => t.PartCode == itm.零件号 && t.Site == _po.Site); + _PO_Detail.PoLine =int.Parse(itm.行号); + _PO_Detail.PoUnit = part.Unit; + _PO_Detail.CreateTime = DateTime.Now; + _PO_Detail.CreateUser = p_creator; + _PO_Detail.BeginTime = string.IsNullOrEmpty(itm.订单创建时间) ? DateTime.Now : DateTime.Parse(itm.订单创建时间); + _PO_Detail.EndTime = string.IsNullOrEmpty(itm.要求到货日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(itm.要求到货日期); + _PO_Detail.PlanQty = decimal.Parse(itm.数量); + _PO_Detail.IsDeleted = false; + _PO_Detail.LocUnit = part.Unit; + _PO_Detail.UnConv = 1; + _PO_Detail.State= (int)PoState.Open; + _PO_Detail.Remark = itm.备注; + _PO_Detail.Price = string.IsNullOrEmpty(itm.单价) ? 0 : decimal.Parse(itm.单价); + _PO_Detail.Workorderlot = string.IsNullOrEmpty(itm.加工单号) ? 0 : int.Parse(itm.加工单号); + _PO_Detail.PoType = itm.订单类型; + _PO_Detail.Operation = string.IsNullOrEmpty(itm.工序) ? 0 : int.Parse(itm.工序); + _PO_Detail.Location = itm.库位; + _PO_Detail.Firmdays = string.IsNullOrEmpty(itm.固定天数) ? 7 : int.Parse(itm.固定天数); + _PO_Detail.Scheduledays = string.IsNullOrEmpty(itm.日程天数) ? 7 : int.Parse(itm.日程天数); + _PO_Detail.Scheduleweeks = string.IsNullOrEmpty(itm.日程周数) ? 2 : int.Parse(itm.日程周数); + _PO_Detail.Schedulemonth = string.IsNullOrEmpty(itm.日程月数) ? 1 : int.Parse(itm.日程月数); + _PO_Detail.Supplieritem = itm.供应商零件; + _PO_Detail.Dliverypatterncode = itm.发货样式; + _PO_Detail.Deliverytimecode = itm.发货时间样式; + _PO_Detail.Transportdays = string.IsNullOrEmpty(itm.运输周期) ? 0 : int.Parse(itm.运输周期); + _PO_Detail.Site= site.Trim().ToUpper(); + _PO_Detail.SubSite = subsite.Trim().ToUpper(); + TS_UNI_API Ts = new TS_UNI_API(); + Ts.InterfaceType = "PO"; + Ts.TableName = "TS_UNI_API"; + Ts.Batch = _entity.供应商编号.Trim().ToUpper(); + Ts.BillType = 702; + Ts.SubBillType = 1; + Ts.BillNum = _entity.订单编号.Trim().ToUpper(); + Ts.PartCode = _PO_Detail.PartCode.Trim(); + Ts.Qty = decimal.Parse(_entity.数量); + Ts.State = 1; + Ts.CreateOper = _entity.联系人; + Ts.CreateTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间); + Ts.PutTime = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now : DateTime.Parse(_entity.要求到货日期); + Ts.VendId = _entity.供应商编号.Trim().ToUpper(); + Ts.PoUnit = part.Unit; + Ts.LocUnit = part.Unit; + Ts.ValidDate = string.IsNullOrEmpty(_entity.订单截至日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(_entity.订单截至日期); + Ts.ErpBillNum = _entity.订单编号; + Ts.Buyer = _entity.采购员; + Ts.BuyerPhone = _entity.采购员电话; + Ts.Price = decimal.Parse(_entity.单价); + Ts.Site = subsite.Trim().ToUpper(); + Ts.Domain = site.Trim().ToUpper(); + Ts.Extend1 = _entity.税率; + Ts.Extend2 = _entity.备注; + Ts.CreateOper= _entity.采购员; + Ts.VendBatch= p_creator; + Ts.ErpLineNum = _PO_Detail.PoLine; + if (_entity.订单类型.ToUpper() == "S") + { + Ts.ModType = _entity.订单类型.ToUpper(); + } + scpdb.TB_PO_DETAIL.AddOrUpdate(_PO_Detail); + scpdb.TS_UNI_API.Add(Ts); + }); + _polist = _polist + _po.PoBillNum + ","; + } + #endregion + #region 离散单 (离散单只增加不修改) + if (p_modtype == BillModType.Non_Contract) + { + var _entity = list.FirstOrDefault(); + TB_PO _po = new TB_PO(); + _po.GUID = Guid.NewGuid(); + _po.PoBillNum = SCP_BILLCODE_CONTROLLER.MakePoNum(_num); + _po.State = (int)PoState.Open; + _po.Site = site.Trim().ToUpper(); + _po.SubSite = subsite.Trim().ToUpper(); + _po.VendId = _entity.供应商编号.Trim().ToUpper(); + _po.ErpBillNum = _po.PoBillNum; + _po.ModType = (int)p_modtype; + _po.Contacter = p_chineseName;// _entity.联系人; + _po.Buyer = p_chineseName;// _entity.联系人; + _po.BuyerPhone = p_buyerPhone; + _po.Site = site.Trim().ToUpper(); + _po.Remark = _entity.备注; + _po.IsDeleted = false; + _po.CreateTime = DateTime.Now; + _po.CreateUser = p_creator; + _po.BeginTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间); + _po.EndTime = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(_entity.要求到货日期); + _po.Pricelist = _entity.供应商编号.ToUpper() + subsite.Substring(1, 1) + subsite.Substring(3, 1); + _po.Taxclass = _entity.税率; + scpdb.TB_PO.AddOrUpdate(_po); + TB_ASK _ask = new TB_ASK(); + _ask.AskBillNum = SCP_BILLCODE_CONTROLLER.MakeASKCode_BJBQ(_num); + _ask.GUID = Guid.NewGuid(); + _ask.PoBillNum = _po.PoBillNum; + _ask.VendId = _entity.供应商编号.Trim().ToUpper(); + _ask.IsDeleted = false; + _ask.CreateTime = DateTime.Now; + _ask.CreateUser = p_creator; + _ask.Site = site.Trim().ToUpper(); + _ask.ReceivedPort = "";//交货口 + _ask.State = (int)AskState.New; + _ask.Remark = _entity.备注; + _ask.ModType = (int)p_modtype; + _ask.ErpBillNum = _po.PoBillNum; + _ask.BeginTime = p_time; + _ask.EndTime = DateTime.Parse(_entity.要求到货日期); + _ask.Buyer = p_chineseName; + _ask.BuyerPhone = p_buyerPhone; + _ask.SubSite = subsite; + scpdb.TB_ASK.Add(_ask); + + int _number = 1; + list.ForEach((itm) => + { + + TB_PO_DETAIL _PO_Detail = new TB_PO_DETAIL(); + _PO_Detail.GUID = Guid.NewGuid(); + _PO_Detail.PartCode = itm.零件号.Trim().ToUpper(); + var part = scpdb.TA_PART.FirstOrDefault(t => t.PartCode == itm.零件号 && t.Site == _po.Site); + _PO_Detail.PoLine = _number; + _PO_Detail.PoBillNum = _po.PoBillNum; + _PO_Detail.State = (int)PoState.Open; + _PO_Detail.Site = site.Trim().ToUpper(); + _PO_Detail.SubSite = subsite.Trim().ToUpper(); + _PO_Detail.Currency = "CNY"; + _PO_Detail.PoUnit = part.Unit; + _PO_Detail.Remark = itm.备注; + _PO_Detail.CreateTime = DateTime.Now; + _PO_Detail.CreateUser = p_creator; + _PO_Detail.BeginTime = string.IsNullOrEmpty(itm.订单创建时间) ? DateTime.Now : DateTime.Parse(itm.订单创建时间); + _PO_Detail.EndTime = string.IsNullOrEmpty(itm.要求到货日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(itm.要求到货日期); + _PO_Detail.PlanQty = decimal.Parse(itm.数量); + _PO_Detail.IsDeleted = false; + _PO_Detail.LocUnit = part.Unit; + _PO_Detail.UnConv = 1; + _PO_Detail.Price = string.IsNullOrEmpty(itm.单价) ? 0 : decimal.Parse(itm.单价); + _PO_Detail.Workorderlot = string.IsNullOrEmpty(itm.加工单号) ? 0 : int.Parse(itm.加工单号); + _PO_Detail.PoType = itm.订单类型; + _PO_Detail.Operation = string.IsNullOrEmpty(itm.工序) ? 0 : int.Parse(itm.工序); + _PO_Detail.Location = itm.库位; + _PO_Detail.Firmdays = string.IsNullOrEmpty(itm.固定天数) ? 7 : int.Parse(itm.固定天数); + _PO_Detail.Scheduledays = string.IsNullOrEmpty(itm.日程天数) ? 7 : int.Parse(itm.日程天数); + _PO_Detail.Scheduleweeks = string.IsNullOrEmpty(itm.日程周数) ? 2 : int.Parse(itm.日程周数); + _PO_Detail.Schedulemonth = string.IsNullOrEmpty(itm.日程月数) ? 1 : int.Parse(itm.日程月数); + _PO_Detail.Supplieritem = itm.供应商零件; + _PO_Detail.Dliverypatterncode = itm.发货样式; + _PO_Detail.Deliverytimecode = itm.发货时间样式; + _PO_Detail.Transportdays = string.IsNullOrEmpty(itm.运输周期) ? 0 : int.Parse(itm.运输周期); + _PO_Detail.TempQty = decimal.Parse(itm.数量); + //_PO_Detail.Extend = itm.供应商编号; + TB_ASK_DETAIL _tDetail = new TB_ASK_DETAIL(); + _tDetail.Remark = itm.备注; + _tDetail.PoBillNum = _po.PoBillNum; + _tDetail.AskBillNum = _ask.AskBillNum; + _tDetail.PoLine = _number; + _tDetail.PoUnit = part.Unit; + _tDetail.CreateTime = DateTime.Now; + _tDetail.CreateUser = p_creator; + _tDetail.PartCode = itm.零件号.ToUpper().Trim(); + _tDetail.ReceivedPort = ""; + _tDetail.BeginTime = p_time; + _tDetail.EndTime = Convert.ToDateTime(itm.要求到货日期); + _tDetail.TempQty = 0; + _tDetail.AskQty = Decimal.Parse(itm.数量); + _tDetail.IsDeleted = false; + _tDetail.LocUnit = part.Unit; + _tDetail.UnConv = 1; + _tDetail.State = (int)PoState.Open; + _tDetail.SubSite = subsite.Trim().ToUpper(); + _tDetail.Site = site.Trim().ToUpper(); + _tDetail.Price = Decimal.Parse(itm.单价); + _tDetail.GUID = Guid.NewGuid(); + _tDetail.Currency = itm.币种; + + TS_UNI_API Ts = new TS_UNI_API(); + Ts.InterfaceType = "PO"; + Ts.TableName = "TS_UNI_API"; + Ts.Batch = _entity.供应商编号.Trim().ToUpper(); + Ts.BillType = 702; + Ts.SubBillType = 2; + Ts.BillNum = _po.PoBillNum.Trim().ToUpper(); + Ts.PartCode = _tDetail.PartCode.Trim().ToUpper(); + Ts.Qty = _tDetail.AskQty; + Ts.State = 1; + Ts.CreateOper = _entity.联系人; + Ts.CreateTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间); + Ts.PutTime = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now : DateTime.Parse(_entity.要求到货日期); + Ts.VendId = _entity.供应商编号.Trim().ToUpper(); + Ts.PoUnit = part.Unit; + Ts.LocUnit = part.Unit; + Ts.ValidDate = string.IsNullOrEmpty(_entity.订单截至日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(_entity.订单截至日期); + Ts.Buyer = _entity.采购员; + Ts.BuyerPhone = _entity.采购员电话; + Ts.Price = _tDetail.Price; + Ts.Site = subsite.Trim().ToUpper(); + Ts.Domain = site.Trim().ToUpper(); + Ts.Extend1 = _entity.税率; + Ts.Extend2 = _entity.备注; + Ts.CreateOper = _entity.采购员; + Ts.VendBatch = p_creator; + Ts.ErpBillNum= _po.PoBillNum; + Ts.ErpLineNum = _PO_Detail.PoLine; + if (!string.IsNullOrEmpty(_entity.订单类型)) + { + if (_entity.订单类型.ToUpper() == "S") + { + Ts.ModType = _entity.订单类型.ToUpper(); + } + } + + scpdb.TB_ASK_DETAIL.Add(_tDetail); + scpdb.TB_PO_DETAIL.AddOrUpdate(_PO_Detail); + scpdb.TS_UNI_API.Add(Ts); + _number++; + }); + _polist = _polist + _po.PoBillNum + ","; + } + #endregion + } + //var ret = CREATE_TEA_TASK_SUB(db, true, new TEA_TASK_SUB() + //{ + // DataCount = 1, + // TaskID = taskid, + // TableName = "TED_PO_MSTR", + // Site = subsite.Trim().ToUpper(), + // Domain = site.Trim().ToUpper(), + // CreateTime = p_time, + // CreateUser = p_creator, + // Creator = "SCP", + //}); + _num++; + Thread.Sleep(10); + } + ); + EntitiesFactory.SaveDb(scpdb); + EntitiesFactory.SaveDb(db); + scope.Complete(); + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + _ret.Message= _polist; + + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "InsterPo", e.Message); + _ret.Result = false; + _ret.Message = e.InnerException.Message; + scope.Dispose(); + + } + } + return _ret; + } + public static ResultObject WritePo_PO(List p_order_list, string site, string p_creator, DateTime p_time, BillModType p_modtype, string subsite, string p_chineseName, string p_buyerPhone) + { + ResultObject _ret = new ResultObject(); + using (var scope = + new TransactionScope(TransactionScopeOption.Required, new TransactionOptions() + { + IsolationLevel = System.Transactions.IsolationLevel.Serializable, + Timeout = new TimeSpan(0, 20, 0) + })) + { + try + { + ScpEntities scpdb = EntitiesFactory.CreateScpInstance(); + ExchangeCenterContext db = EntitiesFactory.CreateExchangeCenterInstance(); + var OrderList = p_order_list.GroupBy(p => p.订单编号).ToList(); + string _polist = ""; + int _num = 1; + OrderList.ForEach((p) => + { + var list = p.ToList(); + if (list.Count > 0) + { + #region 日程单 + if (p_modtype == BillModType.Contract) + { + var _entity = list.FirstOrDefault(); + var _po = scpdb.TB_PO.SingleOrDefault(t => t.PoBillNum == _entity.订单编号/* && t.State == state*/ && t.Site == site && t.SubSite == subsite && t.VendId == _entity.供应商编号.ToUpper()); + if (_po == null) + { + _po = new TB_PO { GUID = Guid.NewGuid(), PoBillNum = _entity.订单编号.ToUpper(), State = (int)PoState.Open, Site = site, SubSite = subsite, VendId = _entity.供应商编号.Trim().ToUpper() }; + } + _po.ErpBillNum = _entity.订单编号.Trim().ToUpper(); ; + _po.ModType = (int)p_modtype; + _po.Contacter = p_chineseName;// _entity.联系人; + _po.Buyer = p_chineseName;// _entity.联系人; + _po.Site = site.Trim().ToUpper(); + _po.State= (int)PoState.Open; + _po.BuyerPhone = p_buyerPhone; + _po.Remark = _entity.备注; + _po.IsDeleted = false; + _po.CreateTime = DateTime.Now; + _po.CreateUser = p_creator; + _po.BeginTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间); + _po.EndTime = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(_entity.要求到货日期); + _po.Pricelist = _entity.供应商编号.Trim().ToUpper() + subsite.Substring(1, 1) + subsite.Substring(3, 1); + _po.Taxclass = _entity.税率; + _po.SubSite = subsite.Trim().ToUpper(); + scpdb.TB_PO.AddOrUpdate(_po); + + list.ForEach((itm) => + { + TB_PO_DETAIL _PO_Detail = new TB_PO_DETAIL(); + _PO_Detail.Currency = "CNY"; + _PO_Detail.PoBillNum = _po.PoBillNum; + _PO_Detail.PartCode = itm.零件号; + var part = scpdb.TA_PART.FirstOrDefault(t=>t.PartCode== itm.零件号&&t.Site==_po.Site); + _PO_Detail.PoLine = int.Parse(itm.行号); + _PO_Detail.PoUnit = part.Unit; + _PO_Detail.CreateTime = DateTime.Now; + _PO_Detail.CreateUser = p_creator; + _PO_Detail.BeginTime = string.IsNullOrEmpty(itm.订单创建时间) ? DateTime.Now : DateTime.Parse(itm.订单创建时间); + _PO_Detail.EndTime = string.IsNullOrEmpty(itm.要求到货日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(itm.要求到货日期); + _PO_Detail.PlanQty = decimal.Parse(itm.数量); + _PO_Detail.IsDeleted = false; + _PO_Detail.LocUnit = part.Unit; + _PO_Detail.UnConv = 1; + _PO_Detail.Remark = itm.备注; + _PO_Detail.Price = string.IsNullOrEmpty(itm.单价) ? 0 : decimal.Parse(itm.单价); + _PO_Detail.Workorderlot = string.IsNullOrEmpty(itm.加工单号) ? 0 : int.Parse(itm.加工单号); + _PO_Detail.PoType = itm.订单类型; + _PO_Detail.Operation = string.IsNullOrEmpty(itm.工序) ? 0 : int.Parse(itm.工序); + _PO_Detail.Location = itm.库位; + _PO_Detail.Firmdays = string.IsNullOrEmpty(itm.固定天数) ? 7 : int.Parse(itm.固定天数); + _PO_Detail.Scheduledays = string.IsNullOrEmpty(itm.日程天数) ? 7 : int.Parse(itm.日程天数); + _PO_Detail.Scheduleweeks = string.IsNullOrEmpty(itm.日程周数) ? 2 : int.Parse(itm.日程周数); + _PO_Detail.Schedulemonth = string.IsNullOrEmpty(itm.日程月数) ? 1 : int.Parse(itm.日程月数); + _PO_Detail.Supplieritem = itm.供应商零件; + _PO_Detail.Dliverypatterncode = itm.发货样式; + _PO_Detail.Deliverytimecode = itm.发货时间样式; + _PO_Detail.Transportdays = string.IsNullOrEmpty(itm.运输周期) ? 0 : int.Parse(itm.运输周期); + _PO_Detail.Site = site.Trim().ToUpper(); + _PO_Detail.State = (int)PoState.Open; + _PO_Detail.SubSite = subsite.Trim().ToUpper(); + TS_UNI_API Ts = new TS_UNI_API(); + Ts.InterfaceType = "PO"; + Ts.TableName = "TS_UNI_API"; + Ts.Batch = _entity.供应商编号.Trim(); + Ts.BillType = 702; + Ts.SubBillType = 1; + Ts.BillNum = _entity.订单编号.Trim().ToUpper(); + Ts.PartCode = _PO_Detail.PartCode.Trim(); + Ts.Qty = decimal.Parse(_entity.数量); + Ts.State = 1; + Ts.CreateOper = _entity.联系人; + Ts.CreateTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间); + Ts.PutTime = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now : DateTime.Parse(_entity.要求到货日期); + Ts.VendId = _entity.供应商编号.Trim(); + Ts.PoUnit = part.Unit; + Ts.LocUnit = part.Unit; + Ts.ValidDate = string.IsNullOrEmpty(_entity.订单截至日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(_entity.订单截至日期); + Ts.ErpBillNum = _entity.订单编号.Trim(); + Ts.Buyer = _entity.采购员; + Ts.BuyerPhone = _entity.采购员电话; + Ts.Price = decimal.Parse(_entity.单价); + Ts.Site = subsite.Trim().ToUpper(); + Ts.Domain = site.Trim().ToUpper(); + Ts.Extend1 = _entity.税率; + Ts.Extend2 = _entity.备注; + Ts.CreateOper = _entity.采购员; + Ts.VendBatch = p_creator; + Ts.ErpLineNum = _PO_Detail.PoLine; + scpdb.TB_PO_DETAIL.AddOrUpdate(_PO_Detail); + scpdb.TS_UNI_API.Add(Ts); + }); + _polist = _polist + _po.PoBillNum + ","; + } + #endregion + #region 离散单 (离散单只增加不修改) + if (p_modtype == BillModType.Non_Contract) + { + var _entity = list.FirstOrDefault(); + TB_PO _po = new TB_PO(); + _po.GUID = Guid.NewGuid(); + _po.PoBillNum = SCP_BILLCODE_CONTROLLER.MakePoNum(_num); + _po.State = (int)PoState.Open; + _po.Site = site.Trim().ToUpper(); + _po.SubSite = subsite.Trim().ToUpper(); + _po.VendId = _entity.供应商编号.Trim().ToUpper(); + _po.ErpBillNum = _po.PoBillNum; + _po.ModType = (int)p_modtype; + _po.Contacter = p_chineseName;// _entity.联系人; + _po.Buyer = p_chineseName;// _entity.联系人; + _po.BuyerPhone = p_buyerPhone; + _po.Site = site.Trim().ToUpper(); + _po.Remark = _entity.备注; + _po.IsDeleted = false; + _po.CreateTime = DateTime.Now; + _po.CreateUser = p_creator; + _po.BeginTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间); + _po.EndTime = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(_entity.要求到货日期); + _po.Pricelist = _entity.供应商编号.ToUpper() + subsite.Substring(1, 1) + subsite.Substring(3, 1); + _po.Taxclass = _entity.税率; + scpdb.TB_PO.AddOrUpdate(_po); + + int _number = 1; + list.ForEach((itm) => + { + + TB_PO_DETAIL _PO_Detail = new TB_PO_DETAIL(); + _PO_Detail.GUID = Guid.NewGuid(); + _PO_Detail.PartCode = itm.零件号.Trim().ToUpper(); + var part = scpdb.TA_PART.FirstOrDefault(t => t.PartCode == itm.零件号 && t.Site == _po.Site); + _PO_Detail.PoLine = _number; + _PO_Detail.PoBillNum = _po.PoBillNum.Trim(); + _PO_Detail.State = (int)PoState.Open; + _PO_Detail.Site = site.Trim().ToUpper(); + _PO_Detail.SubSite = subsite.Trim().ToUpper(); + _PO_Detail.Currency = "CNY"; + _PO_Detail.PoUnit = part.Unit; + _PO_Detail.Remark = itm.备注; + _PO_Detail.CreateTime = DateTime.Now; + _PO_Detail.CreateUser = p_creator; + _PO_Detail.BeginTime = string.IsNullOrEmpty(itm.订单创建时间) ? DateTime.Now : DateTime.Parse(itm.订单创建时间); + _PO_Detail.EndTime = string.IsNullOrEmpty(itm.要求到货日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(itm.要求到货日期); + _PO_Detail.PlanQty = decimal.Parse(itm.数量); + _PO_Detail.IsDeleted = false; + _PO_Detail.LocUnit = part.Unit; + _PO_Detail.UnConv = 1; + _PO_Detail.Price = string.IsNullOrEmpty(itm.单价) ? 0 : decimal.Parse(itm.单价); + _PO_Detail.Workorderlot = string.IsNullOrEmpty(itm.加工单号) ? 0 : int.Parse(itm.加工单号); + _PO_Detail.PoType = itm.订单类型; + _PO_Detail.Operation = string.IsNullOrEmpty(itm.工序) ? 0 : int.Parse(itm.工序); + _PO_Detail.Location = itm.库位; + _PO_Detail.Firmdays = string.IsNullOrEmpty(itm.固定天数) ? 7 : int.Parse(itm.固定天数); + _PO_Detail.Scheduledays = string.IsNullOrEmpty(itm.日程天数) ? 7 : int.Parse(itm.日程天数); + _PO_Detail.Scheduleweeks = string.IsNullOrEmpty(itm.日程周数) ? 2 : int.Parse(itm.日程周数); + _PO_Detail.Schedulemonth = string.IsNullOrEmpty(itm.日程月数) ? 1 : int.Parse(itm.日程月数); + _PO_Detail.Supplieritem = itm.供应商零件; + _PO_Detail.Dliverypatterncode = itm.发货样式; + _PO_Detail.Deliverytimecode = itm.发货时间样式; + _PO_Detail.Transportdays = string.IsNullOrEmpty(itm.运输周期) ? 0 : int.Parse(itm.运输周期); + _PO_Detail.TempQty = decimal.Parse(itm.数量); + //_PO_Detail.Extend = itm.供应商编号; + + TS_UNI_API Ts = new TS_UNI_API(); + Ts.InterfaceType = "PO"; + Ts.TableName = "TS_UNI_API"; + Ts.Batch = _entity.供应商编号.Trim(); + Ts.BillType = 702; + Ts.SubBillType = 2; + Ts.BillNum = _po.PoBillNum.Trim().ToUpper(); + Ts.PartCode = _PO_Detail.PartCode.Trim(); + Ts.Qty = _PO_Detail.PlanQty; + Ts.State = 1; + Ts.CreateOper = _entity.联系人; + Ts.CreateTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间); + Ts.PutTime = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now : DateTime.Parse(_entity.要求到货日期); + Ts.VendId = _entity.供应商编号.Trim(); + Ts.PoUnit = part.Unit; + Ts.LocUnit = part.Unit; + Ts.ValidDate = string.IsNullOrEmpty(_entity.订单截至日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(_entity.订单截至日期); + Ts.Buyer = _entity.采购员; + Ts.BuyerPhone = _entity.采购员电话; + Ts.Price = _PO_Detail.Price; + Ts.Site = subsite.Trim().ToUpper(); + Ts.Domain = site.Trim().ToUpper(); + Ts.Extend1 = _entity.税率; + Ts.Extend2 = _entity.备注; + Ts.CreateOper = _entity.采购员; + Ts.VendBatch = p_creator; + Ts.ErpBillNum = _po.PoBillNum.Trim(); + Ts.ErpLineNum = _number; + scpdb.TB_PO_DETAIL.AddOrUpdate(_PO_Detail); + scpdb.TS_UNI_API.Add(Ts); + _number++; + }); + _polist = _polist + _po.PoBillNum.Trim() + ","; + } + #endregion + } + //var ret = CREATE_TEA_TASK_SUB(db, true, new TEA_TASK_SUB() + //{ + // DataCount = 1, + // TaskID = taskid, + // TableName = "TED_PO_MSTR", + // Site = subsite.Trim().ToUpper(), + // Domain = site.Trim().ToUpper(), + // CreateTime = p_time, + // CreateUser = p_creator, + // Creator = "SCP", + //}); + _num++; + Thread.Sleep(10); + } + ); + EntitiesFactory.SaveDb(scpdb); + EntitiesFactory.SaveDb(db); + scope.Complete(); + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + _ret.Message = _polist; + + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "InsterPo", e.Message); + _ret.Result = false; + _ret.Message = e.InnerException.Message; + scope.Dispose(); + + } + } + return _ret; + } + + public static ResultObject WritePo_PO_PO(List p_order_list, string site, string p_creator, DateTime p_time, BillModType p_modtype, string subsite, string p_chineseName, string p_buyerPhone) + { + ResultObject _ret = new ResultObject(); + using (var scope = + new TransactionScope(TransactionScopeOption.Required, new TransactionOptions() + { + IsolationLevel = System.Transactions.IsolationLevel.Serializable, + Timeout = new TimeSpan(0, 20, 0) + })) + { + try + { + ScpEntities scpdb = EntitiesFactory.CreateScpInstance(); + ExchangeCenterContext db = EntitiesFactory.CreateExchangeCenterInstance(); + var OrderList = p_order_list.GroupBy(p => p.订单编号).ToList(); + string _polist = ""; + int _num = 1; + OrderList.ForEach((p) => + { + var list = p.ToList(); + if (list.Count > 0) + { + #region 日程单 + if (p_modtype == BillModType.Contract) + { + var _entity = list.FirstOrDefault(); + var _po = scpdb.TB_PO.SingleOrDefault(t => t.PoBillNum == _entity.订单编号/* && t.State == state*/ && t.Site == site && t.SubSite == subsite && t.VendId == _entity.供应商编号.ToUpper()); + if (_po == null) + { + _po = new TB_PO { GUID = Guid.NewGuid(), PoBillNum = _entity.订单编号.ToUpper(), State = (int)PoState.Open, Site = site, SubSite = subsite, VendId = _entity.供应商编号.Trim().ToUpper() }; + } + _po.ErpBillNum = _entity.订单编号.Trim().ToUpper(); ; + _po.ModType = (int)p_modtype; + _po.Contacter = p_chineseName;// _entity.联系人; + _po.Buyer = p_chineseName;// _entity.联系人; + _po.Site = site.Trim().ToUpper(); + _po.BuyerPhone = p_buyerPhone; + _po.Remark = _entity.备注; + _po.IsDeleted = false; + _po.CreateTime = DateTime.Now; + _po.CreateUser = p_creator; + _po.BeginTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间); + _po.EndTime = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(_entity.要求到货日期); + _po.Pricelist = _entity.供应商编号.Trim().ToUpper() + subsite.Substring(1, 1) + subsite.Substring(3, 1); + _po.Taxclass = _entity.税率; + _po.SubSite = subsite.Trim().ToUpper(); + scpdb.TB_PO.AddOrUpdate(_po); + + list.ForEach((itm) => + { + TB_PO_DETAIL _PO_Detail = new TB_PO_DETAIL(); + _PO_Detail.Currency = "CNY"; + _PO_Detail.PoBillNum = _po.PoBillNum; + _PO_Detail.PartCode = itm.零件号; + _PO_Detail.PoLine = int.Parse(itm.行号); + _PO_Detail.PoUnit = itm.单位; + _PO_Detail.CreateTime = DateTime.Now; + _PO_Detail.CreateUser = p_creator; + _PO_Detail.BeginTime = string.IsNullOrEmpty(itm.订单创建时间) ? DateTime.Now : DateTime.Parse(itm.订单创建时间); + _PO_Detail.EndTime = string.IsNullOrEmpty(itm.要求到货日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(itm.要求到货日期); + _PO_Detail.PlanQty = decimal.Parse(itm.数量); + _PO_Detail.IsDeleted = false; + _PO_Detail.LocUnit = itm.单位; + _PO_Detail.PoUnit = itm.单位; + _PO_Detail.UnConv = 1; + _PO_Detail.Remark = itm.备注; + _PO_Detail.Price = string.IsNullOrEmpty(itm.单价) ? 0 : decimal.Parse(itm.单价); + _PO_Detail.Workorderlot = string.IsNullOrEmpty(itm.加工单号) ? 0 : int.Parse(itm.加工单号); + _PO_Detail.PoType = itm.订单类型; + _PO_Detail.Operation = string.IsNullOrEmpty(itm.工序) ? 0 : int.Parse(itm.工序); + _PO_Detail.Location = itm.库位; + _PO_Detail.Firmdays = string.IsNullOrEmpty(itm.固定天数) ? 7 : int.Parse(itm.固定天数); + _PO_Detail.Scheduledays = string.IsNullOrEmpty(itm.日程天数) ? 7 : int.Parse(itm.日程天数); + _PO_Detail.Scheduleweeks = string.IsNullOrEmpty(itm.日程周数) ? 2 : int.Parse(itm.日程周数); + _PO_Detail.Schedulemonth = string.IsNullOrEmpty(itm.日程月数) ? 1 : int.Parse(itm.日程月数); + _PO_Detail.Supplieritem = itm.供应商零件; + _PO_Detail.Dliverypatterncode = itm.发货样式; + _PO_Detail.Deliverytimecode = itm.发货时间样式; + _PO_Detail.Transportdays = string.IsNullOrEmpty(itm.运输周期) ? 0 : int.Parse(itm.运输周期); + _PO_Detail.Site = site.Trim().ToUpper(); + _PO_Detail.SubSite = subsite.Trim().ToUpper(); + TS_UNI_API Ts = new TS_UNI_API(); + Ts.InterfaceType = "PO"; + Ts.TableName = "TS_UNI_API"; + Ts.Batch = _entity.供应商编号; + Ts.BillType = 702; + Ts.SubBillType = 1; + Ts.BillNum = _entity.订单编号; + Ts.PartCode = _PO_Detail.PartCode; + Ts.Qty = decimal.Parse(_entity.数量); + Ts.State = 1; + Ts.CreateOper = _entity.联系人; + Ts.CreateTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间); + Ts.PutTime = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now : DateTime.Parse(_entity.要求到货日期); + Ts.VendId = _entity.供应商编号; + Ts.PoUnit = _entity.单位; + Ts.LocUnit = _entity.单位; + Ts.ValidDate = string.IsNullOrEmpty(_entity.订单截至日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(_entity.订单截至日期); + Ts.ErpBillNum = _entity.订单编号; + Ts.Buyer = _entity.采购员; + Ts.BuyerPhone = _entity.采购员电话; + Ts.Price = decimal.Parse(_entity.单价); + Ts.Site = subsite.Trim().ToUpper(); + Ts.Domain = site.Trim().ToUpper(); + Ts.Extend1 = _entity.税率; + Ts.Extend2 = _entity.备注; + Ts.CreateOper = _entity.采购员; + Ts.VendBatch = p_creator; + Ts.ErpLineNum = _PO_Detail.PoLine; + scpdb.TB_PO_DETAIL.AddOrUpdate(_PO_Detail); + scpdb.TS_UNI_API.Add(Ts); + }); + _polist = _polist + _po.PoBillNum + ","; + } + #endregion + #region 离散单 (离散单只增加不修改) + if (p_modtype == BillModType.Non_Contract) + { + var _entity = list.FirstOrDefault(); + TB_PO _po = new TB_PO(); + _po.GUID = Guid.NewGuid(); + _po.PoBillNum = _entity.订单编号; + _po.State = (int)PoState.Open; + _po.Site = site.Trim().ToUpper(); + _po.SubSite = subsite.Trim().ToUpper(); + _po.VendId = _entity.供应商编号.Trim().ToUpper(); + _po.ErpBillNum = _po.PoBillNum; + _po.ModType = (int)p_modtype; + _po.Contacter = p_chineseName;// _entity.联系人; + _po.Buyer = p_chineseName;// _entity.联系人; + _po.BuyerPhone = p_buyerPhone; + _po.Site = site.Trim().ToUpper(); + _po.Remark = _entity.备注; + _po.IsDeleted = false; + _po.CreateTime = DateTime.Now; + _po.CreateUser = p_creator; + _po.BeginTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间); + _po.EndTime = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(_entity.要求到货日期); + _po.Pricelist = _entity.供应商编号.ToUpper() + subsite.Substring(1, 1) + subsite.Substring(3, 1); + _po.Taxclass = _entity.税率; + scpdb.TB_PO.AddOrUpdate(_po); + + int _number = 1; + list.ForEach((itm) => + { + + TB_PO_DETAIL _PO_Detail = new TB_PO_DETAIL(); + _PO_Detail.GUID = Guid.NewGuid(); + _PO_Detail.PartCode = itm.零件号.Trim().ToUpper(); + _PO_Detail.PoLine = int.Parse(itm.行号); + _PO_Detail.PoBillNum = _po.PoBillNum; + _PO_Detail.State = (int)PoState.Open; + _PO_Detail.Site = site.Trim().ToUpper(); + _PO_Detail.SubSite = subsite.Trim().ToUpper(); + _PO_Detail.Currency = "CNY"; + _PO_Detail.PoUnit = itm.单位; + _PO_Detail.Remark = itm.备注; + _PO_Detail.CreateTime = DateTime.Now; + _PO_Detail.CreateUser = p_creator; + _PO_Detail.BeginTime = string.IsNullOrEmpty(itm.订单创建时间) ? DateTime.Now : DateTime.Parse(itm.订单创建时间); + _PO_Detail.EndTime = string.IsNullOrEmpty(itm.要求到货日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(itm.要求到货日期); + _PO_Detail.PlanQty = decimal.Parse(itm.数量); + _PO_Detail.IsDeleted = false; + _PO_Detail.LocUnit = itm.单位; + _PO_Detail.PoUnit = itm.单位; + _PO_Detail.UnConv = 1; + _PO_Detail.Price = string.IsNullOrEmpty(itm.单价) ? 0 : decimal.Parse(itm.单价); + _PO_Detail.Workorderlot = string.IsNullOrEmpty(itm.加工单号) ? 0 : int.Parse(itm.加工单号); + _PO_Detail.PoType = itm.订单类型; + _PO_Detail.Operation = string.IsNullOrEmpty(itm.工序) ? 0 : int.Parse(itm.工序); + _PO_Detail.Location = itm.库位; + _PO_Detail.Firmdays = string.IsNullOrEmpty(itm.固定天数) ? 7 : int.Parse(itm.固定天数); + _PO_Detail.Scheduledays = string.IsNullOrEmpty(itm.日程天数) ? 7 : int.Parse(itm.日程天数); + _PO_Detail.Scheduleweeks = string.IsNullOrEmpty(itm.日程周数) ? 2 : int.Parse(itm.日程周数); + _PO_Detail.Schedulemonth = string.IsNullOrEmpty(itm.日程月数) ? 1 : int.Parse(itm.日程月数); + _PO_Detail.Supplieritem = itm.供应商零件; + _PO_Detail.Dliverypatterncode = itm.发货样式; + _PO_Detail.Deliverytimecode = itm.发货时间样式; + _PO_Detail.Transportdays = string.IsNullOrEmpty(itm.运输周期) ? 0 : int.Parse(itm.运输周期); + _PO_Detail.TempQty = decimal.Parse(itm.数量); + //_PO_Detail.Extend = itm.供应商编号; + + TS_UNI_API Ts = new TS_UNI_API(); + Ts.InterfaceType = "PO"; + Ts.TableName = "TS_UNI_API"; + Ts.Batch = _entity.供应商编号; + Ts.BillType = 702; + Ts.SubBillType = 2; + Ts.BillNum = _po.PoBillNum; + Ts.PartCode = _PO_Detail.PartCode; + Ts.Qty = _PO_Detail.PlanQty; + Ts.State = 1; + Ts.CreateOper = _entity.联系人; + Ts.CreateTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间); + Ts.PutTime = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now : DateTime.Parse(_entity.要求到货日期); + Ts.VendId = _entity.供应商编号; + Ts.PoUnit = _entity.单位; + Ts.LocUnit = _entity.单位; + Ts.ValidDate = string.IsNullOrEmpty(_entity.订单截至日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(_entity.订单截至日期); + Ts.Buyer = _entity.采购员; + Ts.BuyerPhone = _entity.采购员电话; + Ts.Price = _PO_Detail.Price; + Ts.Site = subsite.Trim().ToUpper(); + Ts.Domain = site.Trim().ToUpper(); + Ts.Extend1 = _entity.税率; + Ts.Extend2 = _entity.备注; + Ts.CreateOper = _entity.采购员; + Ts.VendBatch = p_creator; + Ts.ErpBillNum = _po.PoBillNum; + Ts.ErpLineNum = int.Parse(itm.行号); + scpdb.TB_PO_DETAIL.AddOrUpdate(_PO_Detail); + scpdb.TS_UNI_API.Add(Ts); + _number++; + }); + _polist = _polist + _po.PoBillNum + ","; + } + #endregion + } + //var ret = CREATE_TEA_TASK_SUB(db, true, new TEA_TASK_SUB() + //{ + // DataCount = 1, + // TaskID = taskid, + // TableName = "TED_PO_MSTR", + // Site = subsite.Trim().ToUpper(), + // Domain = site.Trim().ToUpper(), + // CreateTime = p_time, + // CreateUser = p_creator, + // Creator = "SCP", + //}); + _num++; + Thread.Sleep(10); + } + ); + EntitiesFactory.SaveDb(scpdb); + EntitiesFactory.SaveDb(db); + scope.Complete(); + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + _ret.Message = _polist; + + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "InsterPo", e.Message); + _ret.Result = false; + _ret.Message = e.InnerException.Message; + scope.Dispose(); + + } + } + return _ret; + } + public static ResultObject InsterPo(List p_order_list, string site, string p_creator, DateTime p_time, BillModType p_modtype, string subsite) + { + ScpEntities scpdb = EntitiesFactory.CreateScpInstance(); + ExchangeCenterContext db = EntitiesFactory.CreateExchangeCenterInstance(); + ResultObject _ret = new ResultObject(); + + try + { + var OrderList = p_order_list.GroupBy(p => p.订单编号).ToList(); + OrderList.ForEach((p) => + { + Guid taskid = Guid.NewGuid(); + var list = p.ToList(); + if (list.Count > 0) + { + var _entity = list.FirstOrDefault(); + // int state = (int)PoState.Open; + var update_po = scpdb.TB_PO.FirstOrDefault(t => t.PoBillNum == _entity.订单编号/* && t.State == state*/ && t.Site == site && t.SubSite == subsite && t.VendId == _entity.供应商编号.ToUpper()); + + TED_PO_MSTR _po = new TED_PO_MSTR(); + _po.GUID = Guid.NewGuid(); + _po.PurchaseOrder = _entity.订单编号; + _po.Supplier = _entity.供应商编号.ToUpper(); + _po.Contact = _entity.联系人; + _po.ShipTo = subsite.Trim().ToUpper();//发往 + _po.OrderDate = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间); + _po.DueDate = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now : DateTime.Parse(_entity.要求到货日期); + _po.StartDate = string.IsNullOrEmpty(_entity.订单开始时间) ? DateTime.Now : DateTime.Parse(_entity.订单开始时间);//订单日期 + _po.EndDate = string.IsNullOrEmpty(_entity.订单截至日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(_entity.订单截至日期); + _po.MadeIn = ""; + _po.Confirm = true; + _po.Buyer = _entity.采购员; + _po.BuyerPhone = _entity.采购员电话; + _po.Status = (int)PoState.Open; + if (p_modtype == BillModType.Contract) + { + _po.ScheduledOrder = true; + } + else + { + _po.ScheduledOrder = false; + } + _po.CreateUser = p_creator; + _po.CreateTime = p_time; + _po.Remark = _entity.备注; ; + _po.TaskID = taskid; + if (update_po != null) + { + _po.CommandType = "U"; + } + else + { + _po.CommandType = "A"; + } + _po.Domain = site.Trim().ToUpper(); + _po.ModeType = ((int)p_modtype).ToString(); + _po.Site = subsite.Trim().ToUpper(); + _po.DataID = Guid.NewGuid(); + _po.Pricelist = _entity.供应商编号 + subsite.Substring(1, 1) + subsite.Substring(3, 1); + _po.Taxclass = _entity.税率; + db.TED_PO_MSTR.Add(_po); + list.ForEach((itm) => + { + int _poline = Int32.Parse(itm.行号); + var update_po_detail = scpdb.TB_PO_DETAIL.FirstOrDefault(t => t.PartCode == itm.零件号 && t.PoLine == _poline && t.PoBillNum == itm.订单编号 /*&& t.State == state*/ && t.Site == site && t.SubSite == subsite); + TED_PO_DET _PO_Detail = new TED_PO_DET(); + _PO_Detail.GUID = Guid.NewGuid(); + _PO_Detail.PurchaseOrder = itm.订单编号; + _PO_Detail.Line = Int32.Parse(itm.行号); + _PO_Detail.Currency = "CNY"; + _PO_Detail.PoType = itm.订单类型; + _PO_Detail.PartCode = itm.零件号.ToUpper(); + _PO_Detail.Qty = decimal.Parse(itm.数量); + _PO_Detail.QtyOpen = 0; + _PO_Detail.PackQty = 1; + _PO_Detail.Currency = itm.币种; + _PO_Detail.Price = string.IsNullOrEmpty(itm.单价) ? 0 : decimal.Parse(itm.单价); + _PO_Detail.PoUm = itm.单位; + _PO_Detail.LocUm = itm.单位; + _PO_Detail.Conv = 1; + _PO_Detail.DueDate = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now : DateTime.Parse(_entity.要求到货日期); + _PO_Detail.Status = (int)PoState.Open; + _PO_Detail.CreateTime = DateTime.Parse(itm.订单创建时间); + _PO_Detail.StartDate = string.IsNullOrEmpty(_entity.零件开始时间) ? p_time : DateTime.Parse(_entity.零件开始时间); + _PO_Detail.EndDate = string.IsNullOrEmpty(_entity.零件截至日期) ? DateTime.Now.AddYears(10) : DateTime.Parse(_entity.零件截至日期); + _PO_Detail.CreateUser = p_creator; + _PO_Detail.TaskID = taskid; + if (update_po_detail != null) + { + _PO_Detail.CommandType = "U"; + } + else + { + _PO_Detail.CommandType = "A"; + } + _PO_Detail.DataID = Guid.NewGuid(); + _PO_Detail.Domain = site.Trim().ToUpper(); + _PO_Detail.Site = subsite.Trim().ToUpper(); + _PO_Detail.Workorderlot = itm.加工单号; + _PO_Detail.PoType = itm.订单类型; + _PO_Detail.Operation = string.IsNullOrEmpty(itm.工序) ? 0 : int.Parse(itm.工序); + _PO_Detail.Location = itm.库位; + _PO_Detail.Firmdays = string.IsNullOrEmpty(itm.固定天数) ? 7 : int.Parse(itm.固定天数); + _PO_Detail.Scheduledays = string.IsNullOrEmpty(itm.日程天数) ? 7 : int.Parse(itm.日程天数); + _PO_Detail.Scheduleweeks = string.IsNullOrEmpty(itm.日程周数) ? 2 : int.Parse(itm.日程周数); + _PO_Detail.Schedulemonth = string.IsNullOrEmpty(itm.日程月数) ? 1 : int.Parse(itm.日程月数); + _PO_Detail.Supplieritem = itm.供应商零件; + _PO_Detail.Dliverypatterncode = itm.发货样式; + _PO_Detail.Deliverytimecode = itm.发货时间样式; + _PO_Detail.Transportdays = string.IsNullOrEmpty(itm.运输周期) ? 0 : int.Parse(itm.运输周期); + _PO_Detail.Pricelist = _entity.供应商编号 + subsite.Substring(1, 1) + subsite.Substring(3, 1); + db.TED_POD_DET.Add(_PO_Detail); + }); + + } + var ret = CREATE_TEA_TASK_SUB(db, true ,new TEA_TASK_SUB() + { + DataCount = 1, + TaskID = taskid, + TableName = "TED_PO_MSTR", + Site = subsite.Trim().ToUpper(), + Domain = site.Trim().ToUpper(), + CreateTime = p_time, + CreateUser = p_creator, + Creator = "SCP", + }); + }); + + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "InsterPo", e.Message); + _ret.Result = false; + _ret.Message = e.InnerException.Message; + //throw e; + } + return _ret; + } + + public static ResultObject UpdatePo(List p_po_list, string site, string p_creator, DateTime p_time, string subsite) + { + ScpEntities scpdb = EntitiesFactory.CreateScpInstance(); + ExchangeCenterContext db = EntitiesFactory.CreateExchangeCenterInstance(); + ResultObject _ret = new ResultObject(); + try + { + foreach(var _num in p_po_list) + { + Guid taskid = Guid.NewGuid(); + TED_PO_MSTR item = new TED_PO_MSTR(); + + var _mstr = scpdb.TB_PO.FirstOrDefault(t => t.PoBillNum == _num && t.State == (int)PoState.Open); + if (_mstr!= null) + { + // var uid = oldpolist.Select(p => p.UID).Max(); + // var _mstr = db.TED_PO_MSTR.FirstOrDefault(t => t.UID == uid); + + var oldpodetaillist = scpdb.TB_PO_DETAIL.Where(q => q.PoBillNum == _num && q.State == (int)PoState.Open).ToList() ; + item.CommandType = "U"; + item.GUID = Guid.NewGuid(); + item.DataID = _mstr.GUID; + item.Status = (int)PoState.Close; + item.TaskID = taskid; + + item.PurchaseOrder = _mstr.PoBillNum; + item.Supplier = _mstr.VendId; + item.Contact = _mstr.Buyer; + item.ShipTo = _mstr.SubSite;//发往 + item.OrderDate = _mstr.CreateTime;//订单日期 + item.DueDate = Convert.ToDateTime(_mstr.EndTime); + item.StartDate = _mstr.CreateTime;//订单日期 + item.EndDate =Convert.ToDateTime( _mstr.EndTime); + item.MadeIn = ""; + item.Confirm = true; + item.Buyer = _mstr.Buyer; + item.BuyerPhone = _mstr.BuyerPhone; + item.ScheduledOrder = _mstr.ModType==1?true:false; + item.CreateUser = _mstr.CreateUser; + item.CreateTime = _mstr.CreateTime; + item.Remark = "订单关闭" ; + item.Domain = _mstr.Site; + item.ModeType = _mstr.ModType.ToString(); + item.Site = _mstr.SubSite; + item.Pricelist = _mstr.Pricelist; + item.Taxclass = _mstr.Taxclass; + db.TED_PO_MSTR.Add(item); + if (oldpodetaillist.Count > 0) + { + foreach (var po_detail in oldpodetaillist) + { + TED_PO_DET _PO_Detail = new TED_PO_DET(); + _PO_Detail.GUID = Guid.NewGuid(); + _PO_Detail.PurchaseOrder = po_detail.PoBillNum; + _PO_Detail.Line = po_detail.PoLine; + _PO_Detail.Currency = po_detail.Currency; + _PO_Detail.PoType = po_detail.PoType; + _PO_Detail.PartCode = po_detail.PartCode.ToUpper(); + _PO_Detail.Qty = po_detail.PlanQty; + _PO_Detail.QtyOpen = po_detail.ShippedQty; + _PO_Detail.PackQty = po_detail.PackQty; + _PO_Detail.Currency = po_detail.Currency; + _PO_Detail.Price = po_detail.Price; + _PO_Detail.PoUm = po_detail.PoUnit; + _PO_Detail.LocUm = po_detail.PoUnit; + _PO_Detail.Conv = 1; + _PO_Detail.Status = (int)PoState.Close; + _PO_Detail.CreateTime = po_detail.CreateTime; + _PO_Detail.StartDate = Convert.ToDateTime(po_detail.BeginTime); + _PO_Detail.EndDate = Convert.ToDateTime(po_detail.EndTime); + _PO_Detail.CreateUser = po_detail.CreateUser; + _PO_Detail.TaskID = taskid; + _PO_Detail.CommandType = "U"; + _PO_Detail.DataID = po_detail.GUID; + _PO_Detail.Domain = po_detail.Site; + _PO_Detail.Site = po_detail.SubSite; + _PO_Detail.Workorderlot = po_detail.Workorderlot.ToString(); + _PO_Detail.PoType = po_detail.PoType; + _PO_Detail.Operation = po_detail.Operation; + _PO_Detail.Location = po_detail.Location; + _PO_Detail.Firmdays = po_detail.Firmdays; + _PO_Detail.Scheduledays = po_detail.Scheduledays; + _PO_Detail.Scheduleweeks = po_detail.Scheduleweeks; + _PO_Detail.Schedulemonth = po_detail.Schedulemonth; + _PO_Detail.Supplieritem = po_detail.Supplieritem; + _PO_Detail.Dliverypatterncode = po_detail.Dliverypatterncode; + _PO_Detail.Deliverytimecode = po_detail.Deliverytimecode; + _PO_Detail.Transportdays = po_detail.Transportdays; + db.TED_POD_DET.Add(_PO_Detail); + } + } + var ret = CREATE_TEA_TASK_SUB(db, true, new TEA_TASK_SUB() + { + DataCount = 1, + TaskID = taskid, + TableName = "TED_PO_MSTR", + Site = subsite, + Domain = site, + CreateTime = p_time, + CreateUser = p_creator, + Creator = "SCP", + }); + } + + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "InsterPo", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + return _ret; + } + } + +} diff --git a/北京北汽/SCP/Controller/SCP_EXCEL_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_EXCEL_CONTROLLER.cs new file mode 100644 index 0000000..9ec769f --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_EXCEL_CONTROLLER.cs @@ -0,0 +1,420 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Data; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Models.ScpEntity.ExcelExportEnttity; +using CK.SCP.Models.ScpEntity.ExcelImportEntity; +using CK.SCP.Utils; + +namespace CK.SCP.Controller +{ + public class SCP_EXCEL_CONTROLLER + { + public static DataSet GET_PO_EXECEL(List p_lst,bool p_IsDetail=false) + { + DataSet _ds = new DataSet(); + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + if (p_IsDetail == false) + { + var _ls = db.V_TB_PO.Where(p => p_lst.Contains(p.PoBillNum)).ToList(); + var _exportList = new List(); + _ls.ForEach(itm => + { + SCP_PO_EXPORT _export = new SCP_PO_EXPORT(); + _export.状态 = itm.State_DESC; + _export.订单类型 = itm.ModType_DESC; + _export.订单编号 = itm.PoBillNum; + _export.Erp订单编号 = itm.ErpBillNum; + _export.供应商编码 = itm.VendId; + _export.供应商名称 = itm.VendName; + _export.订货日期 = itm.BeginTime == null ? string.Empty : ((DateTime)itm.BeginTime).ToString("yyyyMMdd"); + _export.收货地点 = itm.Site; + _export.收货人 = itm.Buyer; + _export.收货人电话 = itm.BuyerPhone; + _export.备注 = itm.Remark; + _exportList.Add(_export); + }); + var _dt = ConvertHelper.ToDataTable(_exportList); + _ds.Tables.Add(_dt); + } + var _detailList = db.V_TB_PO_DETAIL.Where(p => p_lst.Contains(p.PoBillNum)).ToList(); + _detailList = SCP_PO_CONTROLLER.LOAD_PO_DETAIL_SUM(_detailList); + var _exportDetailList = new List(); + _detailList.ForEach(itm => + { + var po_detail = new SCP_PO_DETAIL_EXPORT(); + po_detail.订单编号 = itm.PoBillNum; + po_detail.供应商编码 = itm.VendId; + po_detail.供应商名称 = itm.VendName; + po_detail.状态 = itm.State_DESC; + po_detail.行号 = itm.PoLine.ToString(); + po_detail.零件名 = itm.PartDesc1; + po_detail.零件编 = itm.PartCode; + po_detail.订单数 = itm.PlanQty.ToString(); + po_detail.已要数 = itm.TempQty == null ? string.Empty : itm.TempQty.ToString(); + po_detail.发货数 = itm.ShippedQty.ToString(); + po_detail.收货数 = itm.ReceivedQty.ToString(); + po_detail.退货数 = itm.RejectQty; + po_detail.到货日期 = itm.EndTime == null ? string.Empty : ((DateTime)itm.BeginTime).ToString("yyyyMMdd"); ; + po_detail.单位 = itm.PoUnit; + _exportDetailList.Add(po_detail); + }); + var _list_dt = ConvertHelper.ToDataTable(_exportDetailList); + _ds.Tables.Add(_list_dt); + } + return _ds; + } + + public static List GET_PO_EXECEL_Model(List p_lst, bool p_IsDetail = false) + { + DataSet _ds = new DataSet(); + var _exportDetailList = new List(); + + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + var _detailList = db.V_TB_PO_DETAIL.Where(p => p_lst.Contains(p.UID.ToString())).ToList(); + var polist=_detailList.Select(p => p.PoBillNum); + var _po = db.V_TB_PO.Where(p =>polist.Contains(p.PoBillNum)).FirstOrDefault(); + + + + _detailList.ForEach(itm => + { + var po_detail = new SCP_PO_DETAIL_EXPORT_MODEL(); + po_detail.订单编号 = itm.PoBillNum; + po_detail.行号 = itm.PoLine.ToString(); + po_detail.零件名 = itm.PartDesc1; + if (!string.IsNullOrEmpty(itm.PartDesc2)) + { + po_detail.零件名 += itm.PartDesc2; + } + + po_detail.零件编码 = itm.PartCode; + po_detail.订单数 = "0"; + po_detail.供应商 = itm.VendName; + po_detail.供应商编码 = itm.VendId; + po_detail.订货日期 =DateTime.Now.ToShortDateString(); + po_detail.到货日期 = DateTime.Now.ToShortDateString(); + po_detail.单位 = itm.PoUnit; + po_detail.域名 = _po.Site; + po_detail.地点 = _po.SubSite; + po_detail.计划员 = _po.Buyer; + po_detail.计划员电话 = _po.BuyerPhone; + po_detail.价格 = itm.Price.ToString(); + po_detail.币种 = itm.Currency; + po_detail.收货口 = itm.DockCode; + po_detail.项目编号 = itm.ProjectId; + _exportDetailList.Add(po_detail); + + }); + //var _list_dt = ConvertHelper.ToDataTable(_exportDetailList); + //_ds.Tables.Add(_list_dt);/ + } + return _exportDetailList; + } + + + + public static DataSet GET_PALLET_EXECEL(List p_lst) + { + DataSet _ds = new DataSet(); + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + + var _ls = db.V_TB_PALLET_DETAIL.Where(p => p_lst.Contains(p.AsnBillNum)).ToList(); + var _exportList = new List(); + _ls.ForEach(itm => + { + SCP_PALLET_EXPORT _entity = new SCP_PALLET_EXPORT(); + + _entity.订单号 = itm.PoBillNum; + _entity.发货单号 = itm.AsnBillNum; + _entity.托盘号 = itm.PalletNum; + _entity.托盘名 = itm.PlateNumber; + _entity.零件编号 = itm.PartCode; + _entity.零件名称 = itm.PartDesc1 + itm.PartDesc2; + _entity.数量 = itm.Qty.ToString(); + _entity.包装数量 = itm.PackQty.ToString(); + + _entity.供应商 = itm.VendName; + + _exportList.Add(_entity); + }); + var _dt = ConvertHelper.ToDataTable(_exportList); + _ds.Tables.Add(_dt); + + } + return _ds; + + } + + + + + public static DataSet GET_ASK_EXECEL(List p_lst) + { + DataSet _ds = new DataSet(); + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _ls = db.V_TB_ASK.Where(p => p_lst.Contains(p.AskBillNum)).ToList(); + var _exportList = new List(); + _ls.ForEach(itm => + { + SCP_ASK_EXPORT _entity = new SCP_ASK_EXPORT(); + _entity.状态 = itm.State_DESC; + _entity.单据类型 = itm.ModType_DESC; + _entity.要货单号 = itm.AskBillNum; + _entity.订单号 = itm.PoBillNum; + _entity.ERP订单号 = itm.ErpBillNum; + _entity.供应商 = itm.VendName; + _entity.订货日期 = itm.BeginTime == null ? string.Empty : itm.BeginTime.Value.ToString("yyyyMMdd"); + _entity.地点 = itm.Site_Desc; + _entity.到货日期 = itm.EndTime == null ? string.Empty : itm.EndTime.Value.ToString("yyyyMMdd"); + _entity.收货人 = itm.Buyer; + _entity.收货电话 = itm.BuyerPhone; + _exportList.Add(_entity); + }); + var _dt = ConvertHelper.ToDataTable(_exportList); + _ds.Tables.Add(_dt); + var _detailList = db.V_TB_ASK_DETAIL.Where(p => p_lst.Contains(p.AskBillNum)).ToList(); + var _exportDetailList = new List(); + _detailList.ForEach(itm => + { + SCP_ASK_DETAIL_EXPORT _entity = new SCP_ASK_DETAIL_EXPORT(); + _entity.要货单号 = itm.AskBillNum; + _entity.行号 = itm.PoLine.ToString(); + _entity.零件名称 = itm.PartDesc1; + _entity.零件号 = itm.PartCode; + _entity.单位 = itm.PoUnit; + _entity.标包数量 = itm.PackQty.ToString(); + _entity.币种 = itm.CurrencyDesc; + _entity.价格 = itm.Price.ToString(); + _entity.要货数量 = itm.AskQty.ToString(); + _entity.说明 = string.IsNullOrEmpty(itm.Remark)?string.Empty:itm.Remark.ToString(); + _entity.订货日期 = itm.BeginTime == null ? string.Empty : itm.BeginTime.Value.ToString("yyyyMMdd"); + _exportDetailList.Add(_entity); + + }); + var _list_dt = ConvertHelper.ToDataTable(_exportDetailList); + _ds.Tables.Add(_list_dt); + } + return _ds; + + } + public static DataSet GET_ASN_EXECEL(List p_lst) + { + DataSet _ds = new DataSet(); + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _ls = db.V_TB_ASN.Where(p => p_lst.Contains(p.AsnBillNum)).ToList(); + var _exportList = new List(); + _ls.ForEach(itm => + { + var _entity = new SCP_ASN_EXPORT(); + _entity.状态 = itm.State_DESC; + _entity.发货单号 = itm.AsnBillNum; + _entity.车牌号 = itm.PlateNumber; + _entity.供应商 = itm.VendName; + _entity.订单号 = itm.PoBillNum; + _entity.发货时间 = itm.ShipTime == null ? string.Empty : itm.ShipTime.Value.ToString("yyyyMMdd"); + _entity.发货人 = itm.ShipUser; + _entity.收货时间 = itm.ReceiveTime == null ? string.Empty : itm.ReceiveTime.Value.ToString("yyyyMMdd"); + _entity.收货人 = itm.ReceiveUser; + _entity.发往地点 = itm.Site_Desc; + _entity.备注 = itm.Remark; + _exportList.Add(_entity); + + }); + var _dt = ConvertHelper.ToDataTable(_exportList); + _ds.Tables.Add(_dt); + var _exportDetailList = new List(); + var _detailList = db.V_TB_ASN_DETAIL.Where(p => p_lst.Contains(p.AsnBillNum)).ToList(); + _detailList.ForEach(itm =>{ + var _entity = new SCP_ASN_DETAIL_EXPORT(); + + _entity.发货单号 = itm.AsnBillNum; + _entity.标包数量 = itm.PackQty.ToString(); + _entity.发货数量 = itm.Qty.ToString(); + _entity.零件编号 = itm.PartCode; + _entity.零件名称 = itm.PartDesc1; + _entity.币种 = itm.CurrencyDesc; + _entity.批次 = itm.Batch; + _entity.供应商批次 = itm.VendBatch; + _entity.生产日期 = itm.ProduceDate==null?string.Empty: itm.ProduceDate.Value.ToString("yyyyMMdd"); + _entity.单位 = itm.PoUnit; + _entity.价格 = itm.Price.ToString(); + _exportDetailList.Add(_entity); + }); + var _list_dt = ConvertHelper.ToDataTable(_exportDetailList); + _ds.Tables.Add(_list_dt); + } + return _ds; + } + public static List GET_PRICE_EXECEL_Mode2(List p_lst, bool p_IsDetail = false) + { + DataSet _ds = new DataSet(); + var _exportDetailList = new List(); + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + + var _po = db.TB_PRICE.Where(p => p_lst.Contains(p.UID.ToString())).ToList(); + + + _po.ForEach(itm => + { + var po_detail = new SCP_PRICE_EXPORT(); + po_detail.标识 = itm.UID.ToString(); + po_detail.币种 = itm.Curr; + po_detail.单位 = itm.Unit; + po_detail.备注 = itm.Remarks; + po_detail.域 = itm.Site; + po_detail.零件编码 = itm.PartCode; + po_detail.供应商编号 = itm.VendId; + po_detail.地点 = itm.SubSite; + po_detail.是否临时价格 = itm.TemporaryPrice.ToString(); + po_detail.零件基础价格 = itm.Amt.ToString(); + po_detail.开始时间 = itm.StartTime.ToString(); + po_detail.结束时间 = itm.EndTime.ToString(); + po_detail.最新开始时间 = ""; + po_detail.最新结束时间 = ""; + _exportDetailList.Add(po_detail); + }); + + //var _dt = ConvertHelper.ToDataTable(_exportList); + //_ds.Tables.Add(_dt); + } + return _exportDetailList; + } + public static DataSet GET_INVOICE_EXECEL(List p_lst) + { + DataSet _ds = new DataSet(); + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _ls = db.V_TB_INVOICE.Where(p => p_lst.Contains(p.InvcBillNum)).ToList(); + var _exportList = new List(); + _ls.ForEach(itm => + { + var _entity = new SCP_INVOICE_EXPORT(); + _entity.状态 = itm.State_DESC; + _entity.发票单号 = itm.InvcBillNum; + _entity.金税票号 = itm.InvoiceNum; + _entity.供应商 = itm.VendName; + _entity.金额 = itm.Amount.ToString(); + _entity.税率 = itm.Tax.ToString(); + _entity.税额 = itm.TaxAmount.ToString(); + _entity.折扣金额 = itm.ContractPrice.ToString(); + _entity.税额调整 = itm.BlancePrice.ToString(); + _entity.开票金额 = itm.Total.ToString(); + _entity.创建时间 = itm.CreateTime == null ? string.Empty : itm.CreateTime.Value.ToString("yyyyMMdd"); + _entity.快递单号 = itm.ExpressNum; + _entity.备注 = itm.Remark; + _exportList.Add(_entity); + }); + var _dt = ConvertHelper.ToDataTable(_exportList); + _ds.Tables.Add(_dt); + var _exportDetailList = new List(); + var _detailList = db.V_TB_INVOICE_DETAIL.Where(p => p_lst.Contains(p.InvcBillNum)).ToList(); + _detailList.ForEach(itm => { + var _entity = new SCP_INVOICE_DETAIL_EXPORT(); + _entity.发票编号 = itm.InvcBillNum; + _entity.金税票号 = itm.InvoiceNum; + _entity.项目编号 = !string.IsNullOrEmpty(itm.ProjectId)?itm.ProjectId:string.Empty; + _entity.订单号 = itm.PoBillNum; + _entity.订单行 = itm.PoLineNum.ToString(); + _entity.发货单 = itm.AsnBillNum; + _entity.零件名称 = itm.PartDesc1; + _entity.零件号 = itm.PartCode; + _entity.币种 = itm.Currency; + _entity.单价 = itm.Price.ToString(); + _entity.要货日期 = itm.BeginTime == null ? string.Empty : itm.BeginTime.Value.ToString("yyyyMMdd"); + _entity.折扣价格 = itm.DiscountPrice.ToString(); + _entity.折扣备注 = itm.DiscountRemark; + _entity.开票数量 = itm.Qty.ToString(); + _entity.备注 = itm.Remark; + _exportDetailList.Add(_entity); + }); + var _list_dt = ConvertHelper.ToDataTable(_exportDetailList); + _ds.Tables.Add(_list_dt); + } + return _ds; + } + + public static DataSet GET_ARRIVE_EXECEL(List p_lst,string p_vendid="") + { + DataSet _ds = new DataSet(); + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + List _ls = new List(); + if (!string.IsNullOrEmpty(p_vendid)) + { _ls = db.V_TB_ARRIVE.Where(p => p_lst.Contains(p.ArrvBillNum) && p.VendId == p_vendid).ToList(); } + else + { + _ls = db.V_TB_ARRIVE.Where(p => p_lst.Contains(p.ArrvBillNum) ).ToList(); + } + + var str=JsonHelper.GetJson(_ls); + var _exportList = new List(); + _ls.ForEach(itm => + { + var _entity = new SCP_ARRIVE_EXPORT(); + _entity.状态 = itm.State_DESC; + _entity.单据类型 = itm.BillType_DESC; + _entity.到货单号 = itm.ArrvBillNum; + _entity.发货单号 = itm.AsnBillNum; + _entity.要货看板号 = itm.AskBillNum; + _entity.订单号 = itm.PoBillNum; + _entity.供应商 = itm.VendName; + _entity.供应商编码 = itm.VendId; + _entity.地点 = itm.SubSite; + _entity.地点名称 = itm.Site_Desc; + _entity.到货日期 = itm.ShipTime == null ? string.Empty : itm.ShipTime.ToString("yyyyMMdd"); + _exportList.Add(_entity); + }); + var _dt = ConvertHelper.ToDataTable(_exportList); + _ds.Tables.Add(_dt); + var _exportDetailList = new List(); + + List _detailList = new List(); + if (!string.IsNullOrEmpty(p_vendid)) + { + _detailList = db.V_TB_ARRIVE_DETAIL.Where(p => p_lst.Contains(p.ArrvBillNum) && p.VendId == p_vendid).ToList(); + } + else + { + _detailList = db.V_TB_ARRIVE_DETAIL.Where(p => p_lst.Contains(p.ArrvBillNum) ).ToList(); + } + + + _detailList.ForEach(itm => { + var _entity = new SCP_ARRIVE_DETAIL_EXPORT(); + _entity.单据号 =itm.ArrvBillNum; + _entity.发货单号 = itm.AsnBillNum; + _entity.订单号 = itm.PoBillNum; + _entity.订单行 = itm.PoLine.ToString(); + _entity.零件号 = itm.PartCode; + _entity.零件名称 = itm.PartDesc1; + _entity.单位 = itm.Unit; + _entity.数量 = itm.Qty.ToString(); + _entity.时间 = itm.ShipTime == null ? string.Empty : itm.ShipTime.Value.ToString("yyyyMMdd"); + _entity.备注 = itm.Remark; + _exportDetailList.Add(_entity); + }); + var _list_dt = ConvertHelper.ToDataTable(_exportDetailList); + _ds.Tables.Add(_list_dt); + } + return _ds; + } + } +} diff --git a/北京北汽/SCP/Controller/SCP_EXCEPTION_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_EXCEPTION_CONTROLLER.cs new file mode 100644 index 0000000..2686f66 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_EXCEPTION_CONTROLLER.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Validation; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Utils; + +namespace CK.SCP.Controller +{ + public class SCP_EXCEPTION_CONTROLLER + { + public static void GetEntityFrameWorkMessage(Exception p_ex,Type p_type,string p_medth) + { + if (p_ex is DbEntityValidationException) + { + var ex = p_ex as DbEntityValidationException; + var errorMessages = ex.EntityValidationErrors + .SelectMany(validationResult => validationResult.ValidationErrors) + .Select(m => m.ErrorMessage); + var fullErrorMessage = string.Join(", ", errorMessages); + LogHelper.Writlog(LogHelper.LogType.Error, p_type, p_medth, fullErrorMessage); + } + } + } +} diff --git a/北京北汽/SCP/Controller/SCP_FORECAST_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_FORECAST_CONTROLLER.cs new file mode 100644 index 0000000..973fc68 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_FORECAST_CONTROLLER.cs @@ -0,0 +1,430 @@ +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Models.ScpEntity.ExcelExportEnttity; +using CK.SCP.Utils; +using System; +using System.Collections.Generic; +using System.Data.Entity.Core; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ + public class SCP_FORECAST_CONTROLLER + { + /// + /// 获取数据 + /// + /// + /// + public static void Get_V_TB_FORECAST_List(V_TB_FORECAST p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (Models.ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_FORECAST; + + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId == p_entity.VendId); + } + if (p_entity.BillStateList != null && p_entity.BillStateList.Count > 0) + { + q = q.Where(p => p_entity.BillStateList.Contains((int)p.State)); + } + if (!string.IsNullOrEmpty(p_entity.State_DESC)) + { + q = q.Where(p => p.State_DESC.Contains(p_entity.State_DESC)); + } + if (!string.IsNullOrEmpty(p_entity.Month)) + { + q = q.Where(p => p.Month == p_entity.Month); + } + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser == p_entity.CreateUser); + } + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Get_V_TB_FORECAST_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Get_V_TB_FORECAST_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Get_V_TB_FORECAST_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Get_V_TB_FORECAST_List", e.Message); + throw e; + } + } + /// + /// EXCEL导入 + /// + /// + /// + /// + public static ResultObject EXCEL_FORECAST_MOD(List p_order_list, string p_creator, string site) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + int number = 1; + List lineError = new List(); + List ErrorList = new List(); + var _lst = p_order_list; + _lst.ForEach + (p => + { + var _ls = CheckExcelMode_Forecast(db, p); + if (_ls.Count > 0) + { + lineError.Add(number.ToString()); + ErrorList.Add(string.Join("
", _ls.ToArray())); + } + number++; + }); + if (lineError.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.MessageList.AddRange(ErrorList); + _ret.Result = false; + } + else + { + _lst.ForEach(p => + { + var _item = db.TB_FORECAST.SingleOrDefault(t => t.PartCode == p.零件编号.ToUpper() && t.VendId == p.供应商编码 && t.Month == p.月份&&t.State!=(int)ForecastState.Reject) ?? + new TB_FORECAST { PartCode = p.零件编号.ToUpper(), VendId = p.供应商编码, Month = p.月份, GUID = System.Guid.NewGuid() }; + _item.MonthQty1 = decimal.Parse(p.预测1); + _item.MonthQty2 = decimal.Parse(p.预测2); + _item.MonthQty3 = decimal.Parse(p.预测3); + _item.IsDeleted = false; + _item.CreateUser = p_creator; + _item.CreateTime = DateTime.Now; + _item.State = (int)ForecastState.New; + _item.UpdateInfo = ""; + _item.Site = site; + db.TB_FORECAST.AddOrUpdate(_item); + }); + if (_ret.MessageList.Count == 0) + { + int state = db.SaveChanges(); + if (state != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "EXCEL_FORECAST_MOD", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "EXCEL_FORECAST_MOD", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "EXCEL_FORECAST_MOD", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "EXCEL_FORECAST_MOD", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + /// + /// 导入验证 + /// + /// + /// + /// + private static List CheckExcelMode_Forecast(ScpEntities db, SCP_FORECAST_EXPORT p_excel) + { + List ErrorList = new List(); + var _item = db.TB_FORECAST.SingleOrDefault(t => t.PartCode == p_excel.零件编号.ToUpper() && t.VendId == p_excel.供应商编码 && t.Month == p_excel.月份 && t.State == (int)ForecastState.Confirm); + if (_item != null) + { + ErrorList.Add(string.Format("零件编号【{0}】,月份【{1}】,供应商【{2}】的数据供应商已确认无法修改", p_excel.零件编号, p_excel.月份, p_excel.供应商编码)); + } + if ( + string.IsNullOrEmpty(p_excel.零件编号) || + string.IsNullOrEmpty(p_excel.供应商编码) || + string.IsNullOrEmpty((p_excel.月份).ToString()) || + string.IsNullOrEmpty(p_excel.预测1) || + string.IsNullOrEmpty(p_excel.预测2) || + string.IsNullOrEmpty(p_excel.预测3)) + { + ErrorList.Add(string.Format("零件编号【{0}】有填写为空!", p_excel.零件编号)); + } + return ErrorList; + } + + public static ResultObject Save_TB_FORECAST_STATE(List p_list, string p_user, ForecastState State) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + if (State == ForecastState.Confirm) + { + var _ls = db.TB_FORECAST.Where(p => p_list.Contains(p.UID)).ToList(); + int count = _ls.Count(p => p.State == (int)ForecastState.New); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => + { + p.State = (int)ForecastState.Confirm; + p.UpdateTime = DateTime.Now; + p.UpdateUser = p_user; + p.UpdateInfo = "供应商确认"; + } + ); + db.TB_FORECAST.AddOrUpdate(p => p.UID, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有已经确认的数据!"; + } + } + if (State == ForecastState.Reject) + { + var _ls = db.TB_FORECAST.Where(p => p_list.Contains(p.UID)).ToList(); + int count = _ls.Count(p => p.State == (int)ForecastState.New); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => + { + p.State = (int)ForecastState.Reject; + p.UpdateTime = DateTime.Now; + p.UpdateUser = p_user; + p.UpdateInfo = "作废"; + p.IsDeleted = true ; + } + ); + db.TB_FORECAST.AddOrUpdate(p => p.UID, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有已经确认的数据!"; + } + } + if (State == ForecastState.New) + { + var _ls = db.TB_FORECAST.Where(p => p_list.Contains(p.UID)).ToList(); + int count = _ls.Count(p => p.State == (int)ForecastState.Confirm); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => + { + p.State = (int)ForecastState.New; + p.UpdateTime = DateTime.Now; + p.UpdateUser = p_user; + p.UpdateInfo = "取消确认"; + } + ); + db.TB_FORECAST.AddOrUpdate(p => p.UID, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是确认的数据!"; + } + } + if (string.IsNullOrEmpty(_ret.Message)) + { + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + + return _ret; + } + } +} diff --git a/北京北汽/SCP/Controller/SCP_INFO_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_INFO_CONTROLLER.cs new file mode 100644 index 0000000..4009058 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_INFO_CONTROLLER.cs @@ -0,0 +1,473 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Models.ScpEntity.ExcelImportEntity; +using CK.SCP.Utils; +using System.Data.Entity.Core; + +namespace CK.SCP.Controller +{ + public class SCP_INFO_CONTROLLER + { + public static void Get_V_INFO_List(V_INFO p_entity,Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_INFO; + if (p_entity.ID != 0) + { + q = q.Where(p => p.ID == p_entity.ID); + } + if (!string.IsNullOrEmpty(p_entity.FactoryCode)) + { + q = q.Where(p => p.FactoryCode.Contains(p_entity.FactoryCode)); + } + if (!string.IsNullOrEmpty(p_entity.InfoType)) + { + q = q.Where(p => p.InfoType.Contains(p_entity.InfoType)); + } + if (!string.IsNullOrEmpty(p_entity.FactoryName)) + { + q = q.Where(p => p.FactoryName.Contains(p_entity.FactoryName)); + } + if (!string.IsNullOrEmpty(p_entity.SupplierCode)) + { + if (!string.IsNullOrEmpty(p_entity.UserName)) + { + q = q.Where(p => p.SupplierCode.Contains(p_entity.SupplierCode) || p.UserName.Contains(p_entity.UserName)); + } + else + { + q = q.Where(p => p.SupplierCode.Contains(p_entity.SupplierCode)); + } + } + else + { + if (!string.IsNullOrEmpty(p_entity.UserName)) + { + q = q.Where(p => p.UserName.Contains(p_entity.UserName)); + } + } + //var _time = DateTime.Now.AddMonths(-1); + //q = q.Where(p => p.AddTime > _time); + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + if (!string.IsNullOrEmpty(p_entity.Title)) + { + q = q.Where(p => p.Title.Contains(p_entity.Title)); + } + if (!string.IsNullOrEmpty(p_entity.Content)) + { + q = q.Where(p => p.Content.Contains(p_entity.Content)); + } + + if (!string.IsNullOrEmpty(p_entity.Enable)) + { + q = q.Where(p => p.Enable.Contains(p_entity.Enable)); + } + //if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + //{ + // q = q.Where(p => p_entity.UserInAddress.Contains(p.FactoryCode)); + //} + //if (p_entity.UserInVendIds!= null && p_entity.UserInVendIds.Count > 0) + //{ + // q = q.Where(p => p_entity.UserInVendIds.Contains(p.SupplierCode)); + //} + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INFO_CONTROLLER), "Get_V_INFO_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INFO_CONTROLLER), "Get_V_INFO_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INFO_CONTROLLER), "Get_V_INFO_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INFO_CONTROLLER), "Get_V_INFO_List", e.Message); + throw e; + } + + } + + public static void Get_V_INFO_New(V_INFO p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_INFO; + if (p_entity.ID != 0) + { + q = q.Where(p => p.ID == p_entity.ID); + } + if (!string.IsNullOrEmpty(p_entity.FactoryCode)) + { + q = q.Where(p => p.FactoryCode.Contains(p_entity.FactoryCode)); + } + if (!string.IsNullOrEmpty(p_entity.InfoType)) + { + q = q.Where(p => p.InfoType.Contains(p_entity.InfoType)); + } + if (!string.IsNullOrEmpty(p_entity.FactoryName)) + { + q = q.Where(p => p.FactoryName.Contains(p_entity.FactoryName)); + } + if (!string.IsNullOrEmpty(p_entity.SupplierCode)) + { + q = q.Where(p => p.SupplierCode.Contains(p_entity.SupplierCode)); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + if (!string.IsNullOrEmpty(p_entity.Title)) + { + q = q.Where(p => p.Title.Contains(p_entity.Title)); + } + if (!string.IsNullOrEmpty(p_entity.Content)) + { + q = q.Where(p => p.Content.Contains(p_entity.Content)); + } + if (!string.IsNullOrEmpty(p_entity.UserName)) + { + q = q.Where(p => p.UserName.Contains(p_entity.UserName)); + } + if (!string.IsNullOrEmpty(p_entity.Enable)) + { + q = q.Where(p => p.Enable.Contains(p_entity.Enable)); + } + //if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + //{ + // q = q.Where(p => p_entity.UserInAddress.Contains(p.Address)); + //} + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INFO_CONTROLLER), "Get_V_INFO_New", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INFO_CONTROLLER), "Get_V_INFO_New", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INFO_CONTROLLER), "Get_V_INFO_New", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INFO_CONTROLLER), "Get_V_INFO_New", e.Message); + throw e; + } + + } + + + + public static ResultObject SaveInfo(TA_INFO model) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + db.TA_Info.AddOrUpdate(model); + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INFO_CONTROLLER), "SaveInfo", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INFO_CONTROLLER), "SaveInfo", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INFO_CONTROLLER), "SaveInfo", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INFO_CONTROLLER), "SaveInfo", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + public static bool UpdateInfo(TA_INFO model) + { + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + db.TA_Info.AddOrUpdate(p => p.ID, model); + db.SaveChanges(); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INFO_CONTROLLER), "UpdateInfo", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INFO_CONTROLLER), "UpdateInfo", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INFO_CONTROLLER), "UpdateInfo", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INFO_CONTROLLER), "UpdateInfo", e.Message); + throw e; + } + return true; + } + public static TA_INFO GetlistByBillNo(int id) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TA_Info.SingleOrDefault(p => p.ID == id); + } + } + public static V_INFO GetInfoByBillNo(int id) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.V_INFO.SingleOrDefault(p => p.ID == id); + } + } + + public static void DeleteById(int id) + { + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var info = db.TA_Info.SingleOrDefault(p => p.ID == id); + if (info != null) db.TA_Info.Remove(info); + db.SaveChanges(); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INFO_CONTROLLER), "DeleteById", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INFO_CONTROLLER), "DeleteById", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INFO_CONTROLLER), "DeleteById", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INFO_CONTROLLER), "DeleteById", e.Message); + throw e; + } + } + } +} diff --git a/北京北汽/SCP/Controller/SCP_INTERFACE_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_INTERFACE_CONTROLLER.cs new file mode 100644 index 0000000..30dd407 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_INTERFACE_CONTROLLER.cs @@ -0,0 +1,1606 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System.Data.Entity.Core; +using System.Web; +using CK.SCP.Models.UniApiEntity; + +namespace CK.SCP.Controller + + +{ + + + + public class SCP_INTERFACE_CONTROLLER + { + + public static ResultObject> Get_xxqad_pt_mstr_List(xxqad_pt_mstr p_entity) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + IQueryable q = db.xxqad_pt_mstr; + if (p_entity.xxqad_pt_uid != 0) + { + q = q.Where(p => p.xxqad_pt_uid == p_entity.xxqad_pt_uid); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pt_seq)) + { + q = q.Where(p => p.xxqad_pt_seq.Contains(p_entity.xxqad_pt_seq)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pt_part)) + { + q = q.Where(p => p.xxqad_pt_part.Contains(p_entity.xxqad_pt_part)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pt_domain)) + { + q = q.Where(p => p.xxqad_pt_domain.Contains(p_entity.xxqad_pt_domain)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pt_site)) + { + q = q.Where(p => p.xxqad_pt_site.Contains(p_entity.xxqad_pt_site)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pt_um)) + { + q = q.Where(p => p.xxqad_pt_um.Contains(p_entity.xxqad_pt_um)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pt_desc1)) + { + q = q.Where(p => p.xxqad_pt_desc1.Contains(p_entity.xxqad_pt_desc1)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pt_desc2)) + { + q = q.Where(p => p.xxqad_pt_desc2.Contains(p_entity.xxqad_pt_desc2)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pt_dsgn_grp)) + { + q = q.Where(p => p.xxqad_pt_dsgn_grp.Contains(p_entity.xxqad_pt_dsgn_grp)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pt_promo)) + { + q = q.Where(p => p.xxqad_pt_promo.Contains(p_entity.xxqad_pt_promo)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pt_part_type)) + { + q = q.Where(p => p.xxqad_pt_part_type.Contains(p_entity.xxqad_pt_part_type)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pt_group)) + { + q = q.Where(p => p.xxqad_pt_group.Contains(p_entity.xxqad_pt_group)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pt_prod_line)) + { + q = q.Where(p => p.xxqad_pt_prod_line.Contains(p_entity.xxqad_pt_prod_line)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pt_status)) + { + q = q.Where(p => p.xxqad_pt_status.Contains(p_entity.xxqad_pt_status)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pt_qadread)) + { + q = q.Where(p => p.xxqad_pt_qadread.Contains(p_entity.xxqad_pt_qadread)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pt_wmsread)) + { + q = q.Where(p => p.xxqad_pt_wmsread.Contains(p_entity.xxqad_pt_wmsread)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pt_scmread)) + { + q = q.Where(p => p.xxqad_pt_scmread.Contains(p_entity.xxqad_pt_scmread)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pt_mesread)) + { + q = q.Where(p => p.xxqad_pt_mesread.Contains(p_entity.xxqad_pt_mesread)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pt_rmks)) + { + q = q.Where(p => p.xxqad_pt_rmks.Contains(p_entity.xxqad_pt_rmks)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pt_createur)) + { + q = q.Where(p => p.xxqad_pt_createur.Contains(p_entity.xxqad_pt_createur)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pt_updateur)) + { + q = q.Where(p => p.xxqad_pt_updateur.Contains(p_entity.xxqad_pt_updateur)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.ToList(); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_pt_mstr), "Get_xxqad_pt_mstr_List", e.Message); + throw e; + } + return _ret; + } + + + public ResultObject Save_xxqad_pt_mstr(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + foreach (var itm in p_entitys) + { + db.xxqad_pt_mstr.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_pt_mstr), "Save_xxqad_pt_mstr", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public ResultObject Del_xxqad_pt_mstr(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + foreach (var itm in p_entitys) + { + db.xxqad_pt_mstr.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_pt_mstr), "Del_xxqad_pt_mstr", e.Message); throw e; + } + return _ret; + } + + + + + + public static ResultObject> Get_xxqad_vd_mstr_List(xxqad_vd_mstr p_entity) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + IQueryable q = db.xxqad_vd_mstr; + if (p_entity.xxqad_vd_uid != 0) + { + q = q.Where(p => p.xxqad_vd_uid == p_entity.xxqad_vd_uid); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_seq)) + { + q = q.Where(p => p.xxqad_vd_seq.Contains(p_entity.xxqad_vd_seq)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_addr)) + { + q = q.Where(p => p.xxqad_vd_addr.Contains(p_entity.xxqad_vd_addr)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_domain)) + { + q = q.Where(p => p.xxqad_vd_domain.Contains(p_entity.xxqad_vd_domain)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_name)) + { + q = q.Where(p => p.xxqad_vd_name.Contains(p_entity.xxqad_vd_name)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_line1)) + { + q = q.Where(p => p.xxqad_vd_line1.Contains(p_entity.xxqad_vd_line1)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_line2)) + { + q = q.Where(p => p.xxqad_vd_line2.Contains(p_entity.xxqad_vd_line2)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_line3)) + { + q = q.Where(p => p.xxqad_vd_line3.Contains(p_entity.xxqad_vd_line3)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_country)) + { + q = q.Where(p => p.xxqad_vd_country.Contains(p_entity.xxqad_vd_country)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_city)) + { + q = q.Where(p => p.xxqad_vd_city.Contains(p_entity.xxqad_vd_city)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_phone)) + { + q = q.Where(p => p.xxqad_vd_phone.Contains(p_entity.xxqad_vd_phone)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_fax)) + { + q = q.Where(p => p.xxqad_vd_fax.Contains(p_entity.xxqad_vd_fax)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_pst_id)) + { + q = q.Where(p => p.xxqad_vd_pst_id.Contains(p_entity.xxqad_vd_pst_id)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_attn)) + { + q = q.Where(p => p.xxqad_vd_attn.Contains(p_entity.xxqad_vd_attn)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_curr)) + { + q = q.Where(p => p.xxqad_vd_curr.Contains(p_entity.xxqad_vd_curr)); + } + if (p_entity.xxqad_vd_tax != 0) + { + q = q.Where(p => p.xxqad_vd_tax == p_entity.xxqad_vd_tax); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_promo)) + { + q = q.Where(p => p.xxqad_vd_promo.Contains(p_entity.xxqad_vd_promo)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_type)) + { + q = q.Where(p => p.xxqad_vd_type.Contains(p_entity.xxqad_vd_type)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_qadread)) + { + q = q.Where(p => p.xxqad_vd_qadread.Contains(p_entity.xxqad_vd_qadread)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_wmsread)) + { + q = q.Where(p => p.xxqad_vd_wmsread.Contains(p_entity.xxqad_vd_wmsread)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_scmread)) + { + q = q.Where(p => p.xxqad_vd_scmread.Contains(p_entity.xxqad_vd_scmread)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_mesread)) + { + q = q.Where(p => p.xxqad_vd_mesread.Contains(p_entity.xxqad_vd_mesread)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_rmks)) + { + q = q.Where(p => p.xxqad_vd_rmks.Contains(p_entity.xxqad_vd_rmks)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_createur)) + { + q = q.Where(p => p.xxqad_vd_createur.Contains(p_entity.xxqad_vd_createur)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vd_updateur)) + { + q = q.Where(p => p.xxqad_vd_updateur.Contains(p_entity.xxqad_vd_updateur)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.ToList(); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_vd_mstr), "Get_xxqad_vd_mstr_List", e.Message); + throw e; + } + return _ret; + } + + + public ResultObject Save_xxqad_vd_mstr(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + foreach (var itm in p_entitys) + { + db.xxqad_vd_mstr.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_vd_mstr), "Save_xxqad_vd_mstr", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public ResultObject Del_xxqad_vd_mstr(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + foreach (var itm in p_entitys) + { + db.xxqad_vd_mstr.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_vd_mstr), "Del_xxqad_vd_mstr", e.Message); throw e; + } + return _ret; + } + + + + + + public static ResultObject> Get_xxqad_vp_mstr_List(xxqad_vp_mstr p_entity) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + IQueryable q = db.xxqad_vp_mstr; + if (p_entity.xxqad_vp_uid != 0) + { + q = q.Where(p => p.xxqad_vp_uid == p_entity.xxqad_vp_uid); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vp_seq)) + { + q = q.Where(p => p.xxqad_vp_seq.Contains(p_entity.xxqad_vp_seq)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vp_addr)) + { + q = q.Where(p => p.xxqad_vp_addr.Contains(p_entity.xxqad_vp_addr)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vp_part)) + { + q = q.Where(p => p.xxqad_vp_part.Contains(p_entity.xxqad_vp_part)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vp_domain)) + { + q = q.Where(p => p.xxqad_vp_domain.Contains(p_entity.xxqad_vp_domain)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vp_vend_part)) + { + q = q.Where(p => p.xxqad_vp_vend_part.Contains(p_entity.xxqad_vp_vend_part)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vp_site)) + { + q = q.Where(p => p.xxqad_vp_site.Contains(p_entity.xxqad_vp_site)); + } + if (p_entity.xxqad_vp_comment != 0) + { + q = q.Where(p => p.xxqad_vp_comment == p_entity.xxqad_vp_comment); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vp_qadread)) + { + q = q.Where(p => p.xxqad_vp_qadread.Contains(p_entity.xxqad_vp_qadread)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vp_wmsread)) + { + q = q.Where(p => p.xxqad_vp_wmsread.Contains(p_entity.xxqad_vp_wmsread)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vp_scmread)) + { + q = q.Where(p => p.xxqad_vp_scmread.Contains(p_entity.xxqad_vp_scmread)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vp_mesread)) + { + q = q.Where(p => p.xxqad_vp_mesread.Contains(p_entity.xxqad_vp_mesread)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vp_rmks)) + { + q = q.Where(p => p.xxqad_vp_rmks.Contains(p_entity.xxqad_vp_rmks)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vp_createur)) + { + q = q.Where(p => p.xxqad_vp_createur.Contains(p_entity.xxqad_vp_createur)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_vp_updateur)) + { + q = q.Where(p => p.xxqad_vp_updateur.Contains(p_entity.xxqad_vp_updateur)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.ToList(); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_vp_mstr), "Get_xxqad_vp_mstr_List", e.Message); + throw e; + } + return _ret; + } + + + public ResultObject Save_xxqad_vp_mstr(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + foreach (var itm in p_entitys) + { + db.xxqad_vp_mstr.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_vp_mstr), "Save_xxqad_vp_mstr", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public ResultObject Del_xxqad_vp_mstr(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + foreach (var itm in p_entitys) + { + db.xxqad_vp_mstr.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_vp_mstr), "Del_xxqad_vp_mstr", e.Message); throw e; + } + return _ret; + } + + + + + + + public static ResultObject> Get_xxqad_pod_det_List(xxqad_pod_det p_entity) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + IQueryable q = db.xxqad_pod_det; + if (p_entity.xxqad_pod_uid != 0) + { + q = q.Where(p => p.xxqad_pod_uid == p_entity.xxqad_pod_uid); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_seq)) + { + q = q.Where(p => p.xxqad_pod_seq.Contains(p_entity.xxqad_pod_seq)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_nbr)) + { + q = q.Where(p => p.xxqad_pod_nbr.Contains(p_entity.xxqad_pod_nbr)); + } + if (p_entity.xxqad_pod_line != 0) + { + q = q.Where(p => p.xxqad_pod_line == p_entity.xxqad_pod_line); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_modtype)) + { + q = q.Where(p => p.xxqad_pod_modtype.Contains(p_entity.xxqad_pod_modtype)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_site)) + { + q = q.Where(p => p.xxqad_pod_site.Contains(p_entity.xxqad_pod_site)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_domain)) + { + q = q.Where(p => p.xxqad_pod_domain.Contains(p_entity.xxqad_pod_domain)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_part)) + { + q = q.Where(p => p.xxqad_pod_part.Contains(p_entity.xxqad_pod_part)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_desc)) + { + q = q.Where(p => p.xxqad_pod_desc.Contains(p_entity.xxqad_pod_desc)); + } + if (p_entity.xxqad_pod_qty_ord != 0) + { + q = q.Where(p => p.xxqad_pod_qty_ord == p_entity.xxqad_pod_qty_ord); + } + if (p_entity.xxqad_pod_qty_rct != 0) + { + q = q.Where(p => p.xxqad_pod_qty_rct == p_entity.xxqad_pod_qty_rct); + } + if (p_entity.xxqad_pod_qty_std != 0) + { + q = q.Where(p => p.xxqad_pod_qty_std == p_entity.xxqad_pod_qty_std); + } + if (p_entity.xxqad_pod_price != 0) + { + q = q.Where(p => p.xxqad_pod_price == p_entity.xxqad_pod_price); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_curr)) + { + q = q.Where(p => p.xxqad_pod_curr.Contains(p_entity.xxqad_pod_curr)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_loc_um)) + { + q = q.Where(p => p.xxqad_pod_loc_um.Contains(p_entity.xxqad_pod_loc_um)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_um)) + { + q = q.Where(p => p.xxqad_pod_um.Contains(p_entity.xxqad_pod_um)); + } + if (p_entity.xxqad_pod_um_conv != 0) + { + q = q.Where(p => p.xxqad_pod_um_conv == p_entity.xxqad_pod_um_conv); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_vend)) + { + q = q.Where(p => p.xxqad_pod_vend.Contains(p_entity.xxqad_pod_vend)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_name)) + { + q = q.Where(p => p.xxqad_pod_name.Contains(p_entity.xxqad_pod_name)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_attn)) + { + q = q.Where(p => p.xxqad_pod_attn.Contains(p_entity.xxqad_pod_attn)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_ship)) + { + q = q.Where(p => p.xxqad_pod_ship.Contains(p_entity.xxqad_pod_ship)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_made)) + { + q = q.Where(p => p.xxqad_pod_made.Contains(p_entity.xxqad_pod_made)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_buyer)) + { + q = q.Where(p => p.xxqad_pod_buyer.Contains(p_entity.xxqad_pod_buyer)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_buyer_phone)) + { + q = q.Where(p => p.xxqad_pod_buyer_phone.Contains(p_entity.xxqad_pod_buyer_phone)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_status)) + { + q = q.Where(p => p.xxqad_pod_status.Contains(p_entity.xxqad_pod_status)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_qadread)) + { + q = q.Where(p => p.xxqad_pod_qadread.Contains(p_entity.xxqad_pod_qadread)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_wmsread)) + { + q = q.Where(p => p.xxqad_pod_wmsread.Contains(p_entity.xxqad_pod_wmsread)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_scmread)) + { + q = q.Where(p => p.xxqad_pod_scmread.Contains(p_entity.xxqad_pod_scmread)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_mesread)) + { + q = q.Where(p => p.xxqad_pod_mesread.Contains(p_entity.xxqad_pod_mesread)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_rmks)) + { + q = q.Where(p => p.xxqad_pod_rmks.Contains(p_entity.xxqad_pod_rmks)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_createur)) + { + q = q.Where(p => p.xxqad_pod_createur.Contains(p_entity.xxqad_pod_createur)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_pod_updateur)) + { + q = q.Where(p => p.xxqad_pod_updateur.Contains(p_entity.xxqad_pod_updateur)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.ToList(); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_pod_det), "Get_xxqad_pod_det_List", e.Message); + throw e; + } + return _ret; + } + + + public ResultObject Save_xxqad_pod_det(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + foreach (var itm in p_entitys) + { + db.xxqad_pod_det.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_pod_det), "Save_xxqad_pod_det", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public ResultObject Del_xxqad_pod_det(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + foreach (var itm in p_entitys) + { + db.xxqad_pod_det.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_pod_det), "Del_xxqad_pod_det", e.Message); throw e; + } + return _ret; + } + + + + + + + public static ResultObject> Get_xxwms_rc_det_List(xxwms_rc_det p_entity) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + IQueryable q = db.xxwms_rc_det; + if (p_entity.xxwms_rc_uid != 0) + { + q = q.Where(p => p.xxwms_rc_uid == p_entity.xxwms_rc_uid); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rc_seq)) + { + q = q.Where(p => p.xxwms_rc_seq.Contains(p_entity.xxwms_rc_seq)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rc_nbr)) + { + q = q.Where(p => p.xxwms_rc_nbr.Contains(p_entity.xxwms_rc_nbr)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rc_ps_nbr)) + { + q = q.Where(p => p.xxwms_rc_ps_nbr.Contains(p_entity.xxwms_rc_ps_nbr)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rc_po_nbr)) + { + q = q.Where(p => p.xxwms_rc_po_nbr.Contains(p_entity.xxwms_rc_po_nbr)); + } + if (p_entity.xxwms_rc_po_line != 0) + { + q = q.Where(p => p.xxwms_rc_po_line == p_entity.xxwms_rc_po_line); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rc_part)) + { + q = q.Where(p => p.xxwms_rc_part.Contains(p_entity.xxwms_rc_part)); + } + if (p_entity.xxwms_rc_qty_total != 0) + { + q = q.Where(p => p.xxwms_rc_qty_total == p_entity.xxwms_rc_qty_total); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rc_site)) + { + q = q.Where(p => p.xxwms_rc_site.Contains(p_entity.xxwms_rc_site)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rc_vend)) + { + q = q.Where(p => p.xxwms_rc_vend.Contains(p_entity.xxwms_rc_vend)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rc_ware_class)) + { + q = q.Where(p => p.xxwms_rc_ware_class.Contains(p_entity.xxwms_rc_ware_class)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rc_ware)) + { + q = q.Where(p => p.xxwms_rc_ware.Contains(p_entity.xxwms_rc_ware)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rc_loc)) + { + q = q.Where(p => p.xxwms_rc_loc.Contains(p_entity.xxwms_rc_loc)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rc_po_um)) + { + q = q.Where(p => p.xxwms_rc_po_um.Contains(p_entity.xxwms_rc_po_um)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rc_loc_um)) + { + q = q.Where(p => p.xxwms_rc_loc_um.Contains(p_entity.xxwms_rc_loc_um)); + } + if (p_entity.xxwms_rc_conv != 0) + { + q = q.Where(p => p.xxwms_rc_conv == p_entity.xxwms_rc_conv); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rc_lot)) + { + q = q.Where(p => p.xxwms_rc_lot.Contains(p_entity.xxwms_rc_lot)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rc_vend_batch)) + { + q = q.Where(p => p.xxwms_rc_vend_batch.Contains(p_entity.xxwms_rc_vend_batch)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rc_qadread)) + { + q = q.Where(p => p.xxwms_rc_qadread.Contains(p_entity.xxwms_rc_qadread)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rc_wmsread)) + { + q = q.Where(p => p.xxwms_rc_wmsread.Contains(p_entity.xxwms_rc_wmsread)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rc_scmread)) + { + q = q.Where(p => p.xxwms_rc_scmread.Contains(p_entity.xxwms_rc_scmread)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rc_mesread)) + { + q = q.Where(p => p.xxwms_rc_mesread.Contains(p_entity.xxwms_rc_mesread)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rc_rmks)) + { + q = q.Where(p => p.xxwms_rc_rmks.Contains(p_entity.xxwms_rc_rmks)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rc_createur)) + { + q = q.Where(p => p.xxwms_rc_createur.Contains(p_entity.xxwms_rc_createur)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rc_updateur)) + { + q = q.Where(p => p.xxwms_rc_updateur.Contains(p_entity.xxwms_rc_updateur)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rc_domain)) + { + q = q.Where(p => p.xxwms_rc_domain.Contains(p_entity.xxwms_rc_domain)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.ToList(); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxwms_rc_det), "Get_xxwms_rc_det_List", e.Message); + throw e; + } + return _ret; + } + + + public ResultObject Save_xxwms_rc_det(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + foreach (var itm in p_entitys) + { + db.xxwms_rc_det.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxwms_rc_det), "Save_xxwms_rc_det", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public ResultObject Del_xxwms_rc_det(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + foreach (var itm in p_entitys) + { + db.xxwms_rc_det.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxwms_rc_det), "Del_xxwms_rc_det", e.Message); throw e; + } + return _ret; + } + + + + + + public static ResultObject> Get_xxwms_rt_det_List(xxwms_rt_det p_entity) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + IQueryable q = db.xxwms_rt_det; + if (p_entity.xxwms_rt_uid != 0) + { + q = q.Where(p => p.xxwms_rt_uid == p_entity.xxwms_rt_uid); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rt_seq)) + { + q = q.Where(p => p.xxwms_rt_seq.Contains(p_entity.xxwms_rt_seq)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rt_nbr)) + { + q = q.Where(p => p.xxwms_rt_nbr.Contains(p_entity.xxwms_rt_nbr)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rt_po_nbr)) + { + q = q.Where(p => p.xxwms_rt_po_nbr.Contains(p_entity.xxwms_rt_po_nbr)); + } + if (p_entity.xxwms_rt_po_line != 0) + { + q = q.Where(p => p.xxwms_rt_po_line == p_entity.xxwms_rt_po_line); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rt_part)) + { + q = q.Where(p => p.xxwms_rt_part.Contains(p_entity.xxwms_rt_part)); + } + if (p_entity.xxwms_rt_qty_total != 0) + { + q = q.Where(p => p.xxwms_rt_qty_total == p_entity.xxwms_rt_qty_total); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rt_site)) + { + q = q.Where(p => p.xxwms_rt_site.Contains(p_entity.xxwms_rt_site)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rt_vend)) + { + q = q.Where(p => p.xxwms_rt_vend.Contains(p_entity.xxwms_rt_vend)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rt_ware_class)) + { + q = q.Where(p => p.xxwms_rt_ware_class.Contains(p_entity.xxwms_rt_ware_class)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rt_ware)) + { + q = q.Where(p => p.xxwms_rt_ware.Contains(p_entity.xxwms_rt_ware)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rt_loc)) + { + q = q.Where(p => p.xxwms_rt_loc.Contains(p_entity.xxwms_rt_loc)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rt_po_um)) + { + q = q.Where(p => p.xxwms_rt_po_um.Contains(p_entity.xxwms_rt_po_um)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rt_loc_um)) + { + q = q.Where(p => p.xxwms_rt_loc_um.Contains(p_entity.xxwms_rt_loc_um)); + } + if (p_entity.xxwms_rt_conv != 0) + { + q = q.Where(p => p.xxwms_rt_conv == p_entity.xxwms_rt_conv); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rt_lot)) + { + q = q.Where(p => p.xxwms_rt_lot.Contains(p_entity.xxwms_rt_lot)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rt_vend_batch)) + { + q = q.Where(p => p.xxwms_rt_vend_batch.Contains(p_entity.xxwms_rt_vend_batch)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rt_qadread)) + { + q = q.Where(p => p.xxwms_rt_qadread.Contains(p_entity.xxwms_rt_qadread)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rt_wmsread)) + { + q = q.Where(p => p.xxwms_rt_wmsread.Contains(p_entity.xxwms_rt_wmsread)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rt_scmread)) + { + q = q.Where(p => p.xxwms_rt_scmread.Contains(p_entity.xxwms_rt_scmread)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rt_mesread)) + { + q = q.Where(p => p.xxwms_rt_mesread.Contains(p_entity.xxwms_rt_mesread)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rt_rmks)) + { + q = q.Where(p => p.xxwms_rt_rmks.Contains(p_entity.xxwms_rt_rmks)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rt_createur)) + { + q = q.Where(p => p.xxwms_rt_createur.Contains(p_entity.xxwms_rt_createur)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rt_updateur)) + { + q = q.Where(p => p.xxwms_rt_updateur.Contains(p_entity.xxwms_rt_updateur)); + } + if (!string.IsNullOrEmpty(p_entity.xxwms_rt_domain)) + { + q = q.Where(p => p.xxwms_rt_domain.Contains(p_entity.xxwms_rt_domain)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.ToList(); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxwms_rt_det), "Get_xxwms_rt_det_List", e.Message); + throw e; + } + return _ret; + } + + + public ResultObject Save_xxwms_rt_det(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + foreach (var itm in p_entitys) + { + db.xxwms_rt_det.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxwms_rt_det), "Save_xxwms_rt_det", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public ResultObject Del_xxwms_rt_det(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + foreach (var itm in p_entitys) + { + db.xxwms_rt_det.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxwms_rt_det), "Del_xxwms_rt_det", e.Message); throw e; + } + return _ret; + } + + + + + + + + public static ResultObject> Get_xxscm_inv_det_List(xxscm_inv_det p_entity) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + IQueryable q = db.xxscm_inv_det; + if (p_entity.xxscm_inv_uid != 0) + { + q = q.Where(p => p.xxscm_inv_uid == p_entity.xxscm_inv_uid); + } + if (!string.IsNullOrEmpty(p_entity.xxscm_inv_seq)) + { + q = q.Where(p => p.xxscm_inv_seq.Contains(p_entity.xxscm_inv_seq)); + } + if (!string.IsNullOrEmpty(p_entity.xxscm_inv_domain)) + { + q = q.Where(p => p.xxscm_inv_domain.Contains(p_entity.xxscm_inv_domain)); + } + if (!string.IsNullOrEmpty(p_entity.xxscm_inv_site)) + { + q = q.Where(p => p.xxscm_inv_site.Contains(p_entity.xxscm_inv_site)); + } + if (!string.IsNullOrEmpty(p_entity.xxscm_inv_nbr)) + { + q = q.Where(p => p.xxscm_inv_nbr.Contains(p_entity.xxscm_inv_nbr)); + } + if (!string.IsNullOrEmpty(p_entity.xxscm_inv_vend)) + { + q = q.Where(p => p.xxscm_inv_vend.Contains(p_entity.xxscm_inv_vend)); + } + if (!string.IsNullOrEmpty(p_entity.xxscm_inv_invoice)) + { + q = q.Where(p => p.xxscm_inv_invoice.Contains(p_entity.xxscm_inv_invoice)); + } + if (!string.IsNullOrEmpty(p_entity.xxscm_inv_curr)) + { + q = q.Where(p => p.xxscm_inv_curr.Contains(p_entity.xxscm_inv_curr)); + } + if (!string.IsNullOrEmpty(p_entity.xxscm_inv_order)) + { + q = q.Where(p => p.xxscm_inv_order.Contains(p_entity.xxscm_inv_order)); + } + if (!string.IsNullOrEmpty(p_entity.xxscm_inv_line)) + { + q = q.Where(p => p.xxscm_inv_line.Contains(p_entity.xxscm_inv_line)); + } + if (!string.IsNullOrEmpty(p_entity.xxscm_inv_receiver)) + { + q = q.Where(p => p.xxscm_inv_receiver.Contains(p_entity.xxscm_inv_receiver)); + } + if (!string.IsNullOrEmpty(p_entity.xxscm_inv_asn)) + { + q = q.Where(p => p.xxscm_inv_asn.Contains(p_entity.xxscm_inv_asn)); + } + if (!string.IsNullOrEmpty(p_entity.xxscm_inv_part)) + { + q = q.Where(p => p.xxscm_inv_part.Contains(p_entity.xxscm_inv_part)); + } + if (p_entity.xxscm_inv_qty != 0) + { + q = q.Where(p => p.xxscm_inv_qty == p_entity.xxscm_inv_qty); + } + if (p_entity.xxscm_inv_price != 0) + { + q = q.Where(p => p.xxscm_inv_price == p_entity.xxscm_inv_price); + } + + if (p_entity.xxscm_inv_taxamt != 0) + { + q = q.Where(p => p.xxscm_inv_taxamt == p_entity.xxscm_inv_taxamt); + } + if (p_entity.xxscm_inv_amt != 0) + { + q = q.Where(p => p.xxscm_inv_amt == p_entity.xxscm_inv_amt); + } + if (!string.IsNullOrEmpty(p_entity.xxscm_inv_qadread)) + { + q = q.Where(p => p.xxscm_inv_qadread.Contains(p_entity.xxscm_inv_qadread)); + } + if (!string.IsNullOrEmpty(p_entity.xxscm_inv_wmsread)) + { + q = q.Where(p => p.xxscm_inv_wmsread.Contains(p_entity.xxscm_inv_wmsread)); + } + if (!string.IsNullOrEmpty(p_entity.xxscm_inv_scmread)) + { + q = q.Where(p => p.xxscm_inv_scmread.Contains(p_entity.xxscm_inv_scmread)); + } + if (!string.IsNullOrEmpty(p_entity.xxscm_inv_mesread)) + { + q = q.Where(p => p.xxscm_inv_mesread.Contains(p_entity.xxscm_inv_mesread)); + } + if (!string.IsNullOrEmpty(p_entity.xxscm_inv_rmks)) + { + q = q.Where(p => p.xxscm_inv_rmks.Contains(p_entity.xxscm_inv_rmks)); + } + if (!string.IsNullOrEmpty(p_entity.xxscm_inv_createur)) + { + q = q.Where(p => p.xxscm_inv_createur.Contains(p_entity.xxscm_inv_createur)); + } + if (!string.IsNullOrEmpty(p_entity.xxscm_inv_updateur)) + { + q = q.Where(p => p.xxscm_inv_updateur.Contains(p_entity.xxscm_inv_updateur)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.ToList(); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxscm_inv_det), "Get_xxscm_inv_det_List", e.Message); + throw e; + } + return _ret; + } + + + public ResultObject Save_xxscm_inv_det(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + foreach (var itm in p_entitys) + { + db.xxscm_inv_det.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxscm_inv_det), "Save_xxscm_inv_det", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public ResultObject Del_xxscm_inv_det(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + foreach (var itm in p_entitys) + { + db.xxscm_inv_det.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxscm_inv_det), "Del_xxscm_inv_det", e.Message); throw e; + } + return _ret; + } + + + + + + + public static ResultObject> Get_xxqad_prh_det_List(xxqad_prh_det p_entity) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + IQueryable q = db.xxqad_prh_det; + if (p_entity.xxqad_prh_uid != 0) + { + q = q.Where(p => p.xxqad_prh_uid == p_entity.xxqad_prh_uid); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_seq)) + { + q = q.Where(p => p.xxqad_prh_seq.Contains(p_entity.xxqad_prh_seq)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_receiver)) + { + q = q.Where(p => p.xxqad_prh_receiver.Contains(p_entity.xxqad_prh_receiver)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_psnbr)) + { + q = q.Where(p => p.xxqad_prh_psnbr.Contains(p_entity.xxqad_prh_psnbr)); + } + if (p_entity.xxqad_prh_trnbr != 0) + { + q = q.Where(p => p.xxqad_prh_trnbr == p_entity.xxqad_prh_trnbr); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_trtype)) + { + q = q.Where(p => p.xxqad_prh_trtype.Contains(p_entity.xxqad_prh_trtype)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_po_nbr)) + { + q = q.Where(p => p.xxqad_prh_po_nbr.Contains(p_entity.xxqad_prh_po_nbr)); + } + if (p_entity.xxqad_prh_po_line != 0) + { + q = q.Where(p => p.xxqad_prh_po_line == p_entity.xxqad_prh_po_line); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_part)) + { + q = q.Where(p => p.xxqad_prh_part.Contains(p_entity.xxqad_prh_part)); + } + if (p_entity.xxqad_prh_qty_rcvd != 0) + { + q = q.Where(p => p.xxqad_prh_qty_rcvd == p_entity.xxqad_prh_qty_rcvd); + } + if (p_entity.xxqad_prh_qty_ord != 0) + { + q = q.Where(p => p.xxqad_prh_qty_ord == p_entity.xxqad_prh_qty_ord); + } + if (p_entity.xxqad_prh_pur_cost != 0) + { + q = q.Where(p => p.xxqad_prh_pur_cost == p_entity.xxqad_prh_pur_cost); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_curr)) + { + q = q.Where(p => p.xxqad_prh_curr.Contains(p_entity.xxqad_prh_curr)); + } + if (p_entity.xxqad_prh_curr_amt != 0) + { + q = q.Where(p => p.xxqad_prh_curr_amt == p_entity.xxqad_prh_curr_amt); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_site)) + { + q = q.Where(p => p.xxqad_prh_site.Contains(p_entity.xxqad_prh_site)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_vend)) + { + q = q.Where(p => p.xxqad_prh_vend.Contains(p_entity.xxqad_prh_vend)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_ware_class)) + { + q = q.Where(p => p.xxqad_prh_ware_class.Contains(p_entity.xxqad_prh_ware_class)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_ware)) + { + q = q.Where(p => p.xxqad_prh_ware.Contains(p_entity.xxqad_prh_ware)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_loc)) + { + q = q.Where(p => p.xxqad_prh_loc.Contains(p_entity.xxqad_prh_loc)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_po_um)) + { + q = q.Where(p => p.xxqad_prh_po_um.Contains(p_entity.xxqad_prh_po_um)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_loc_um)) + { + q = q.Where(p => p.xxqad_prh_loc_um.Contains(p_entity.xxqad_prh_loc_um)); + } + if (p_entity.xxqad_prh_conv != 0) + { + q = q.Where(p => p.xxqad_prh_conv == p_entity.xxqad_prh_conv); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_lot)) + { + q = q.Where(p => p.xxqad_prh_lot.Contains(p_entity.xxqad_prh_lot)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_vend_batch)) + { + q = q.Where(p => p.xxqad_prh_vend_batch.Contains(p_entity.xxqad_prh_vend_batch)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_qadread)) + { + q = q.Where(p => p.xxqad_prh_qadread.Contains(p_entity.xxqad_prh_qadread)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_wmsread)) + { + q = q.Where(p => p.xxqad_prh_wmsread.Contains(p_entity.xxqad_prh_wmsread)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_scmread)) + { + q = q.Where(p => p.xxqad_prh_scmread.Contains(p_entity.xxqad_prh_scmread)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_mesread)) + { + q = q.Where(p => p.xxqad_prh_mesread.Contains(p_entity.xxqad_prh_mesread)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_rmks)) + { + q = q.Where(p => p.xxqad_prh_rmks.Contains(p_entity.xxqad_prh_rmks)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_createur)) + { + q = q.Where(p => p.xxqad_prh_createur.Contains(p_entity.xxqad_prh_createur)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_updateur)) + { + q = q.Where(p => p.xxqad_prh_updateur.Contains(p_entity.xxqad_prh_updateur)); + } + if (!string.IsNullOrEmpty(p_entity.xxqad_prh_domain)) + { + q = q.Where(p => p.xxqad_prh_domain.Contains(p_entity.xxqad_prh_domain)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.ToList(); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_prh_det), "Get_xxqad_prh_det_List", e.Message); + throw e; + } + return _ret; + } + + + public ResultObject Save_xxqad_prh_det(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + foreach (var itm in p_entitys) + { + db.xxqad_prh_det.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_prh_det), "Save_xxqad_prh_det", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public ResultObject Del_xxqad_prh_det(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance()) + { + foreach (var itm in p_entitys) + { + db.xxqad_prh_det.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_prh_det), "Del_xxqad_prh_det", e.Message); throw e; + } + return _ret; + } + + + +} +} diff --git a/北京北汽/SCP/Controller/SCP_INVOICE_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_INVOICE_CONTROLLER.cs new file mode 100644 index 0000000..f3a5a75 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_INVOICE_CONTROLLER.cs @@ -0,0 +1,3425 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Models.ScpEntity.ExcelImportEntity; +using CK.SCP.Utils; +using System.Data.Entity.Core; + +namespace CK.SCP.Controller +{ + + public class SCP_INVOICE_CONTROLLER + { + public static void Get_V_TB_INVOICE_BY_CG_List(V_TB_INVOICE p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_INVOICE; + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.InvcBillNum)) + { + q = q.Where(p => p.InvcBillNum.Contains(p_entity.InvcBillNum)); + } + + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + //if (p_entity.BeginTime != null && !p_entity.BeginTime.ToString().Contains("0001/1/1")) + //{ + // q = q.Where(p => p.CreateTime >= p_entity.BeginTime); + //} + //if (p_entity.EndTime != null && !p_entity.EndTime.ToString().Contains("0001/1/1")) + //{ + // q = q.Where(p => p.CreateTime <= p_entity.EndTime); + //} + if (!string.IsNullOrEmpty(p_entity.InvoiceNum)) + { + q = q.Where(p => p.InvoiceNum.Contains(p_entity.InvoiceNum)); + } + if (p_entity.BillStateList != null && p_entity.BillStateList.Count > 0) + { + q = q.Where(p => p_entity.BillStateList.Contains(p.State)); + } + else if (p_entity.State != 0) + { + q = q.Where(p => p.State == p_entity.State); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (p_entity.Tax != null) + { + q = q.Where(p => p.Tax == p_entity.Tax); + } + if (p_entity.TaxAmount != null) + { + q = q.Where(p => p.TaxAmount == p_entity.TaxAmount); + } + if (p_entity.Amount != null) + { + q = q.Where(p => p.Amount == p_entity.Amount); + } + if (p_entity.Total != null) + { + q = q.Where(p => p.Total == p_entity.Total); + } + if (!string.IsNullOrEmpty(p_entity.ExpressNum)) + { + q = q.Where(p => p.ExpressNum.Contains(p_entity.ExpressNum)); + } + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + if (p_entity.UserInSubSite != null && p_entity.UserInSubSite.Count > 0) + { + q = q.Where(p => p_entity.UserInSubSite.Contains(p.SubSite)); + } + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } + if (p_entity.InvoiceList != null && p_entity.InvoiceList.Count > 0) + { + q = q.Where(p => p_entity.InvoiceList.Contains(p.InvcBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + q = q.Where(p => p_entity.IsRed == p.IsRed); + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_List", ex.ToString()); + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_List", e.Message); + throw e; + } + + } + + + + + + public static List Get_V_TB_INVOICE_BY_TIME(string p_begin,string p_end,string p_po,string p_asn) + { + List _list = new List(); + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + StringBuilder _builder = new StringBuilder(); + _builder.Append( "SELECT DISTINCT InvcBillNum FROM TB_INVOICE_DETAIL a Inner join TB_RECEIVE B on A.RecvBillNum = B.RecvBillNum\r\n"); + _builder.AppendFormat(" WHERE 1=1 \r\n"); + if (!string.IsNullOrEmpty(p_begin)) + { + _builder.AppendFormat(" and B.ShipTime >= cast('{0}' as datetime) \r\n", p_begin); + } + if (!string.IsNullOrEmpty(p_end)) + { + _builder.AppendFormat(" and B.ShipTime <= cast('{0}' as datetime) \r\n", p_end); + } + if (!string.IsNullOrEmpty(p_po)) + { + _builder.AppendFormat(" AND A.PoBillNum='{0}' \r\n", p_po); + } + if (!string.IsNullOrEmpty(p_asn)) + { + _builder.AppendFormat(" and A.AsnBillNum='{0}' \r\n",p_asn); + } + _list =db.Database.SqlQuery(_builder.ToString()).ToList(); + + } + return _list; + } + + + public static void Get_V_TB_INVOICE_List(V_TB_INVOICE p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_INVOICE; + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.InvcBillNum)) + { + q = q.Where(p => p.InvcBillNum.Contains(p_entity.InvcBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + + if (!string.IsNullOrEmpty(p_entity.InvoiceNum)) + { + q = q.Where(p => p.InvoiceNum.Contains(p_entity.InvoiceNum)); + } + if (p_entity.BillStateList != null && p_entity.BillStateList.Count > 0) + { + q = q.Where(p => p_entity.BillStateList.Contains(p.State)); + } + else if (p_entity.State != 0) + { + q = q.Where(p => p.State == p_entity.State); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (p_entity.Tax != null) + { + q = q.Where(p => p.Tax == p_entity.Tax); + } + if (p_entity.TaxAmount != null) + { + q = q.Where(p => p.TaxAmount == p_entity.TaxAmount); + } + if (p_entity.Amount != null) + { + q = q.Where(p => p.Amount == p_entity.Amount); + } + if (p_entity.Total != null) + { + q = q.Where(p => p.Total == p_entity.Total); + } + if (!string.IsNullOrEmpty(p_entity.ExpressNum)) + { + q = q.Where(p => p.ExpressNum.Contains(p_entity.ExpressNum)); + } + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (p_entity.InvoiceList!=null && p_entity.InvoiceList.Count>0) + { + q = q.Where(p => p_entity.InvoiceList.Contains(p.InvcBillNum)); + } + if (p_entity.EndTimeb!= null) + { + q = q.Where(p => p.EndTimeb == p_entity.EndTimeb); + } + if (p_entity.StartTime != null) + { + q = q.Where(p => p.StartTime == p_entity.StartTime); + } + // q = q.Where(p => p_entity.IsRed == p.IsRed); + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_List", e.Message); + throw e; + } + + } + + + + public static void Get_V_TB_INVOICE_List(List p_ls, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_INVOICE; + //if (p_entity.UID != 0) + //{ + // q = q.Where(p => p.UID == p_entity.UID); + //} + if (p_ls!=null && p_ls.Count>0) + { + q = q.Where(p => p_ls.Contains(p.InvcBillNum)); + } + //if (!string.IsNullOrEmpty(p_entity.VendId)) + //{ + // q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + //} + //if (!string.IsNullOrEmpty(p_entity.VendName)) + //{ + // q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + //} + + //if (!string.IsNullOrEmpty(p_entity.InvoiceNum)) + //{ + // q = q.Where(p => p.InvoiceNum.Contains(p_entity.InvoiceNum)); + //} + //if (p_entity.BillStateList != null && p_entity.BillStateList.Count > 0) + //{ + // q = q.Where(p => p_entity.BillStateList.Contains(p.State)); + //} + //else if (p_entity.State != 0) + //{ + // q = q.Where(p => p.State == p_entity.State); + //} + //if (!string.IsNullOrEmpty(p_entity.Remark)) + //{ + // q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + //} + //if (p_entity.Tax != null) + //{ + // q = q.Where(p => p.Tax == p_entity.Tax); + //} + //if (p_entity.TaxAmount != null) + //{ + // q = q.Where(p => p.TaxAmount == p_entity.TaxAmount); + //} + //if (p_entity.Amount != null) + //{ + // q = q.Where(p => p.Amount == p_entity.Amount); + //} + //if (p_entity.Total != null) + //{ + // q = q.Where(p => p.Total == p_entity.Total); + //} + //if (!string.IsNullOrEmpty(p_entity.ExpressNum)) + //{ + // q = q.Where(p => p.ExpressNum.Contains(p_entity.ExpressNum)); + //} + //if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + //{ + // q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + //} + + //if (!string.IsNullOrEmpty(p_entity.CreateUser)) + //{ + // q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + //} + //if (p_entity.InvoiceList != null && p_entity.InvoiceList.Count > 0) + //{ + // q = q.Where(p => p_entity.InvoiceList.Contains(p.InvcBillNum)); + //} + //// q = q.Where(p => p_entity.IsRed == p.IsRed); + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_List", e.Message); + throw e; + } + + } + + + + + + + + + + public static void Get_V_TB_INVOICE_ERP_List(V_TB_INVOICE p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_INVOICE; + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.InvcBillNum)) + { + q = q.Where(p => p.InvcBillNum.Contains(p_entity.InvcBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + + if (!string.IsNullOrEmpty(p_entity.InvoiceNum)) + { + q = q.Where(p => p.InvoiceNum.Contains(p_entity.InvoiceNum)); + } + if (p_entity.BillStateList != null && p_entity.BillStateList.Count > 0) + { + q = q.Where(p => p_entity.BillStateList.Contains(p.State)); + } + else if (p_entity.State != 0) + { + q = q.Where(p => p.State == p_entity.State); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (p_entity.Tax != null) + { + q = q.Where(p => p.Tax == p_entity.Tax); + } + if (p_entity.TaxAmount != null) + { + q = q.Where(p => p.TaxAmount == p_entity.TaxAmount); + } + if (p_entity.Amount != null) + { + q = q.Where(p => p.Amount == p_entity.Amount); + } + if (p_entity.Total != null) + { + q = q.Where(p => p.Total == p_entity.Total); + } + if (!string.IsNullOrEmpty(p_entity.ExpressNum)) + { + q = q.Where(p => p.ExpressNum.Contains(p_entity.ExpressNum)); + } + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (p_entity.InvoiceList != null && p_entity.InvoiceList.Count > 0) + { + q = q.Where(p => p_entity.InvoiceList.Contains(p.InvcBillNum)); + } + // q = q.Where(p => p_entity.IsRed == p.IsRed); + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_List", e.Message); + throw e; + } + + } + + + public static void Get_V_TB_INVOICE_DETAIL_List(V_TB_INVOICE_DETAIL p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_INVOICE_DETAIL; + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.InvcBillNum)) + { + q = q.Where(p => p.InvcBillNum.Contains(p_entity.InvcBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (p_entity.PoLineNum != 0) + { + q = q.Where(p => p.PoLineNum == p_entity.PoLineNum); + } + if (!string.IsNullOrEmpty(p_entity.AsnBillNum)) + { + q = q.Where(p => p.AsnBillNum.Contains(p_entity.AsnBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.Batch)) + { + q = q.Where(p => p.Batch.Contains(p_entity.Batch)); + } + if (!string.IsNullOrEmpty(p_entity.VendBatch)) + { + q = q.Where(p => p.VendBatch.Contains(p_entity.VendBatch)); + } + if (p_entity.Qty != 0) + { + q = q.Where(p => p.Qty == p_entity.Qty); + } + if (!string.IsNullOrEmpty(p_entity.PoUnit)) + { + q = q.Where(p => p.PoUnit.Contains(p_entity.PoUnit)); + } + if (p_entity.Price != 0) + { + q = q.Where(p => p.Price == p_entity.Price); + } + if (!string.IsNullOrEmpty(p_entity.Currency)) + { + q = q.Where(p => p.Currency.Contains(p_entity.Currency)); + } + if (p_entity.PackQty != null) + { + q = q.Where(p => p.PackQty == p_entity.PackQty); + } + if (p_entity.State != null) + { + q = q.Where(p => p.State == p_entity.State); + } + if (!string.IsNullOrEmpty(p_entity.InvoiceNum)) + { + q = q.Where(p => p.InvoiceNum.Contains(p_entity.InvoiceNum)); + } + if (!string.IsNullOrEmpty(p_entity.ExpressNum)) + { + q = q.Where(p => p.ExpressNum.Contains(p_entity.ExpressNum)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (!string.IsNullOrEmpty(p_entity.CurrencyDesc)) + { + q = q.Where(p => p.CurrencyDesc.Contains(p_entity.CurrencyDesc)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (p_entity.Tax != null) + { + q = q.Where(p => p.Tax == p_entity.Tax); + } + if (!string.IsNullOrEmpty(p_entity.RecvBillNum)) + { + q = q.Where(p => p.RecvBillNum.Contains(p_entity.RecvBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.PartDesc1)) + { + q = q.Where(p => p.PartDesc1.Contains(p_entity.PartDesc1)); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + q = q.Where(p => p.IsRed == p_entity.IsRed); + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_DETAIL_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_DETAIL_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_DETAIL_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_DETAIL_List", e.Message); + throw e; + } + + } + + + public static void Get_V_TB_INVOICE_DETAIL_List(List p_list, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_INVOICE_DETAIL; + if (p_list.Count>0) + { + q = q.Where(p => p_list.Contains(p.InvcBillNum)); + } + //if (p_entity.UID != 0) + //{ + // q = q.Where(p => p.UID == p_entity.UID); + //} + + //if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + //{ + // q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + //} + //if (p_entity.PoLineNum != 0) + //{ + // q = q.Where(p => p.PoLineNum == p_entity.PoLineNum); + //} + //if (!string.IsNullOrEmpty(p_entity.AsnBillNum)) + //{ + // q = q.Where(p => p.AsnBillNum.Contains(p_entity.AsnBillNum)); + //} + //if (!string.IsNullOrEmpty(p_entity.PartCode)) + //{ + // q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + //} + //if (!string.IsNullOrEmpty(p_entity.Batch)) + //{ + // q = q.Where(p => p.Batch.Contains(p_entity.Batch)); + //} + //if (!string.IsNullOrEmpty(p_entity.VendBatch)) + //{ + // q = q.Where(p => p.VendBatch.Contains(p_entity.VendBatch)); + //} + //if (p_entity.Qty != 0) + //{ + // q = q.Where(p => p.Qty == p_entity.Qty); + //} + //if (!string.IsNullOrEmpty(p_entity.PoUnit)) + //{ + // q = q.Where(p => p.PoUnit.Contains(p_entity.PoUnit)); + //} + //if (p_entity.Price != 0) + //{ + // q = q.Where(p => p.Price == p_entity.Price); + //} + //if (!string.IsNullOrEmpty(p_entity.Currency)) + //{ + // q = q.Where(p => p.Currency.Contains(p_entity.Currency)); + //} + //if (p_entity.PackQty != null) + //{ + // q = q.Where(p => p.PackQty == p_entity.PackQty); + //} + //if (p_entity.State != null) + //{ + // q = q.Where(p => p.State == p_entity.State); + //} + //if (!string.IsNullOrEmpty(p_entity.InvoiceNum)) + //{ + // q = q.Where(p => p.InvoiceNum.Contains(p_entity.InvoiceNum)); + //} + //if (!string.IsNullOrEmpty(p_entity.ExpressNum)) + //{ + // q = q.Where(p => p.ExpressNum.Contains(p_entity.ExpressNum)); + //} + //if (!string.IsNullOrEmpty(p_entity.VendId)) + //{ + // q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + //} + //if (!string.IsNullOrEmpty(p_entity.CurrencyDesc)) + //{ + // q = q.Where(p => p.CurrencyDesc.Contains(p_entity.CurrencyDesc)); + //} + //if (!string.IsNullOrEmpty(p_entity.Site)) + //{ + // q = q.Where(p => p.Site.Contains(p_entity.Site)); + //} + //if (p_entity.Tax != null) + //{ + // q = q.Where(p => p.Tax == p_entity.Tax); + //} + //if (!string.IsNullOrEmpty(p_entity.RecvBillNum)) + //{ + // q = q.Where(p => p.RecvBillNum.Contains(p_entity.RecvBillNum)); + //} + //if (!string.IsNullOrEmpty(p_entity.PartDesc1)) + //{ + // q = q.Where(p => p.PartDesc1.Contains(p_entity.PartDesc1)); + //} + //if (!string.IsNullOrEmpty(p_entity.CreateUser)) + //{ + // q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + //} + //q = q.Where(p => p.IsRed == p_entity.IsRed); + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_DETAIL_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_DETAIL_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_DETAIL_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_INVOICE_DETAIL_List", e.Message); + throw e; + } + + } + + + + public static ResultObject CREATE_TB_INVOICE(V_TB_INVOICE p_entity,List p_list) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _tax=db.TA_VENDER.Where(p => p.VendId == p_entity.VendId).Select(p => p.Tax).FirstOrDefault(); + TB_INVOICE invoice = new TB_INVOICE(); + invoice.InvcBillNum = SCP_BILLCODE_CONTROLLER.MakeInvoiceCode(); + invoice.VendId = p_entity.VendId; + invoice.CreateTime = DateTime.Now; + invoice.InvoiceNum = ""; + invoice.ExpressNum = ""; + invoice.Remark = p_entity.Remark; + invoice.CreateUser = p_entity.CreateUser; + invoice.CreateTime = DateTime.Now; + invoice.Site = p_entity.Site; + invoice.State = (int)InvoiceState.New; + invoice.IsDeleted = false; + invoice.GUID = Guid.NewGuid(); + invoice.Tax = p_entity.Tax; + invoice.IsRed = false; + invoice.ContractPrice = p_entity.ContractPrice; + invoice.BlancePrice = p_entity.BlancePrice; + invoice.SubSite = p_entity.SubSite; + db.TB_INVOICE.AddOrUpdate(invoice); + + p_list.ForEach(p => { + + TB_INVOICE_DETAIL invocieDetail = new TB_INVOICE_DETAIL(); + invocieDetail.InvcBillNum= invoice.InvcBillNum; + invocieDetail.AsnBillNum = p.AsnBillNum; + invocieDetail.PoBillNum = p.PoBillNum; + invocieDetail.PoLineNum = p.PoLine; + invocieDetail.RecvBillNum = p.RecvBillNum; + invocieDetail.CreateUser = invoice.CreateUser; + invocieDetail.CreateTime = invoice.CreateTime; + invocieDetail.PoUnit = p.PoUnit; //自己改数据库 + //invocieDetail.LocUnit = p.LocUnit;//自己改数据库 + invocieDetail.PartCode = p.PartCode; + invocieDetail.Price = p.Price;//自己改数据库 + invocieDetail.DiscountPrice = p.DiscountPrice;//供应商价格 + invocieDetail.Batch = p.Batch; + invocieDetail.VendBatch = p.VendBatch; + invocieDetail.Qty = p.Qty; + invocieDetail.Currency = p.Currency;//自己改数据库 + invocieDetail.IsDeleted = false; + invocieDetail.State = (int)InvoiceState.New; + invocieDetail.GUID = Guid.NewGuid(); + invocieDetail.Remark = p.Remark; + invocieDetail.IsRed = false; + invocieDetail.BlancePrice = p.BlancePrice; + invocieDetail.SubSite = p.SubSite; + db.TB_INVOICE_DETAIL.AddOrUpdate(invocieDetail); + + }); + + #region 采购员代办任务新 + //TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + //_item.ROLE_NAME = "采购人员"; + //_item.ITEM_ADDRESS = invoice.Site; + //_item.ITEM_NO = invoice.InvcBillNum; + //_item.ITEM_CONTENT = "新的采购发票申请!"; + //_item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.APPLY_INVOICE; + //_item.ITEM_STATE = (int)PENDING_STATE.WAITING; + //_item.SENDER = invoice.CreateUser; + //_item.VEND_ID = invoice.VendId; + //_item.SENDING_TIME = DateTime.Now; + ////_item.ITEM_ADDRESS = _entity.Site; + //_item.GUID = Guid.NewGuid(); + //db.TB_PENING_ITEMS.Add(_item); + #endregion + + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "CREATE_TB_INVOICE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "CREATE_TB_INVOICE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "CREATE_TB_INVOICE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "CREATE_TB_INVOICE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + /// + /// 创建发票(模具分摊计数) + /// + /// + /// + /// 是否限额验证 + /// + public static ResultObject CREATE_TB_INVOICE_MOLDSHARING(V_TB_INVOICE p_entity, List p_list) + { + ResultObject _ret = new ResultObject(); + List _list = new List(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + // var _tax = db.TA_VENDER.Where(p => p.VendId == p_entity.VendId).Select(p => p.Tax).FirstOrDefault(); + var _quota = db.TA_VENDER.Where(p => p.VendId == p_entity.VendId).Select(p => p.Quota).FirstOrDefault(); + decimal _total = 0; + TB_INVOICE invoice = new TB_INVOICE(); + invoice.InvcBillNum = SCP_BILLCODE_CONTROLLER.MakeInvoiceCode(p_entity.VendId); + invoice.VendId = p_entity.VendId; + invoice.CreateTime = DateTime.Now; + invoice.InvoiceNum = ""; + invoice.ExpressNum = ""; + invoice.Remark = p_entity.Remark; + invoice.CreateUser = p_entity.CreateUser; + invoice.CreateTime = DateTime.Now; + invoice.Site = p_entity.Site; + invoice.State = (int)InvoiceState.New; + invoice.IsDeleted = false; + invoice.GUID = Guid.NewGuid(); + invoice.Tax = p_entity.Tax; + invoice.IsRed = false; + invoice.ContractPrice = p_entity.ContractPrice; + invoice.BlancePrice = p_entity.BlancePrice; + invoice.SubSite = p_entity.SubSite; + db.TB_INVOICE.AddOrUpdate(invoice); + p_list.ForEach(p => { + TB_INVOICE_DETAIL invocieDetail = new TB_INVOICE_DETAIL(); + invocieDetail.InvcBillNum = invoice.InvcBillNum; + invocieDetail.AsnBillNum = p.AsnBillNum; + invocieDetail.PoBillNum = p.PoBillNum; + invocieDetail.PoLineNum = p.PoLine; + invocieDetail.RecvBillNum = p.RecvBillNum; + invocieDetail.CreateUser = invoice.CreateUser; + invocieDetail.CreateTime = invoice.CreateTime; + invocieDetail.PoUnit = p.PoUnit; //自己改数据库 + //invocieDetail.LocUnit = p.LocUnit;//自己改数据库 + invocieDetail.PartCode = p.PartCode; + invocieDetail.Price = p.Price;//自己改数据库 + invocieDetail.Batch = p.Batch; + invocieDetail.VendBatch = p.VendBatch; + invocieDetail.Qty = p.Qty; + invocieDetail.Currency = p.Currency;//自己改数据库 + invocieDetail.IsDeleted = false; + invocieDetail.State = (int)InvoiceState.New; + invocieDetail.GUID = Guid.NewGuid(); + invocieDetail.Remark = p.Remark; + invocieDetail.IsRed = false; + invocieDetail.BlancePrice = p.BlancePrice;//模具分摊价格 + invocieDetail.DiscountPrice = p.DiscountPrice;//供应商价格 + invocieDetail.SubSite = p.SubSite; + invocieDetail.Site = p.Site; + invocieDetail.TemporaryPrice = p.TemporaryPrice; + db.TB_INVOICE_DETAIL.AddOrUpdate(invocieDetail); + //var _moldsharing = db.TA_MoldSharing.SingleOrDefault(t => t.VendId == p.VendId.ToUpper() && t.PartCode == p.PartCode.ToUpper() && t.Qty != t.Count); + //var _price = db.TB_PRICE.Where(q => p.State != (int)PriceState.Reject && q.PartCode == p.PartCode).ToList(); + //if (_moldsharing != null && p.BlancePrice > 0) + //{ + // var _num = _moldsharing.Count + p.Qty; + // if (_moldsharing.Qty < _num) + // { + // string _str = "供应商" + _moldsharing.VendId + "零件名称" + _moldsharing.PartCode + "超过分摊数量" + (_num - _moldsharing.Qty).ToString(); + // _list.Add(_str); + // } + // if (_num == _moldsharing.Qty && _price.Count > 0) + // { + // _price.ForEach(t => + // { + // t.State = (int)PriceState.New; + // db.TB_PRICE.AddOrUpdate(t); + // }); + // } + // _moldsharing.Count = _num; + // db.TA_MoldSharing.AddOrUpdate(_moldsharing); + // TA_MOLDSHARING_INVOICE MoldSharingInvoice = new TA_MOLDSHARING_INVOICE(); + // MoldSharingInvoice.InvcBillNum = invoice.InvcBillNum; + // MoldSharingInvoice.MoldSharingId = _moldsharing.UID; + // db.TA_MoldSharing_Invoice.Add(MoldSharingInvoice); + //} + //_total += Convert.ToDecimal(p.Qty * p.Price + p.Qty * p.Price * p_entity.Tax + p.BlancePrice * p.Qty); + }); + + #region 采购员代办任务新 + //TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + //_item.ROLE_NAME = "采购人员"; + //_item.ITEM_ADDRESS = invoice.Site; + //_item.ITEM_NO = invoice.InvcBillNum; + //_item.ITEM_CONTENT = "新的采购发票申请!"; + //_item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.APPLY_INVOICE; + //_item.ITEM_STATE = (int)PENDING_STATE.WAITING; + //_item.SENDER = invoice.CreateUser; + //_item.VEND_ID = invoice.VendId; + //_item.SENDING_TIME = DateTime.Now; + ////_item.ITEM_ADDRESS = _entity.Site; + //_item.GUID = Guid.NewGuid(); + //db.TB_PENING_ITEMS.Add(_item); + #endregion + if (_list.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.MessageList = _list; + } + else + { + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "CREATE_TB_INVOICE_MOLDSHARING", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "CREATE_TB_INVOICE_MOLDSHARING", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "CREATE_TB_INVOICE_MOLDSHARING", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "CREATE_TB_INVOICE_MOLDSHARING", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + + + /// + /// 创建发票(模具分摊计数) + /// + /// + /// + /// 是否限额验证 + /// + public static ResultObject CREATE_TB_INVOICE_MOLDSHARING(V_TB_INVOICE p_entity, List p_list, bool p_quota) + { + ResultObject _ret = new ResultObject(); + List _list = new List(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + // var _tax = db.TA_VENDER.Where(p => p.VendId == p_entity.VendId).Select(p => p.Tax).FirstOrDefault(); + var _quota = db.TA_VENDER.Where(p => p.VendId == p_entity.VendId).Select(p => p.Quota).FirstOrDefault(); + decimal _total = 0; + TB_INVOICE invoice = new TB_INVOICE(); + invoice.InvcBillNum = SCP_BILLCODE_CONTROLLER.MakeInvoiceCode(p_entity.VendId); + invoice.VendId = p_entity.VendId; + invoice.CreateTime = DateTime.Now; + invoice.InvoiceNum = ""; + invoice.ExpressNum = ""; + invoice.Remark = p_entity.Remark; + invoice.CreateUser = p_entity.CreateUser; + invoice.CreateTime = DateTime.Now; + invoice.Site = p_entity.Site; + invoice.State = (int)InvoiceState.New; + invoice.IsDeleted = false; + invoice.GUID = Guid.NewGuid(); + invoice.Tax = p_entity.Tax; + invoice.IsRed = false; + invoice.ContractPrice = p_entity.ContractPrice; + invoice.BlancePrice = p_entity.BlancePrice; + invoice.SubSite = p_entity.SubSite; + db.TB_INVOICE.AddOrUpdate(invoice); + p_list.ForEach(p => { + TB_INVOICE_DETAIL invocieDetail = new TB_INVOICE_DETAIL(); + invocieDetail.InvcBillNum = invoice.InvcBillNum; + invocieDetail.AsnBillNum = p.AsnBillNum; + invocieDetail.PoBillNum = p.PoBillNum; + invocieDetail.PoLineNum = p.PoLine; + invocieDetail.RecvBillNum = p.RecvBillNum; + invocieDetail.CreateUser = invoice.CreateUser; + invocieDetail.CreateTime = invoice.CreateTime; + invocieDetail.PoUnit = p.PoUnit; //自己改数据库 + //invocieDetail.LocUnit = p.LocUnit;//自己改数据库 + invocieDetail.PartCode = p.PartCode; + invocieDetail.Price = p.Price;//自己改数据库 + invocieDetail.Batch = p.Batch; + invocieDetail.VendBatch = p.VendBatch; + invocieDetail.Qty = p.Qty; + invocieDetail.Currency = p.Currency;//自己改数据库 + invocieDetail.IsDeleted = false; + invocieDetail.State = (int)InvoiceState.New; + invocieDetail.GUID = Guid.NewGuid(); + invocieDetail.Remark = p.Remark; + invocieDetail.IsRed = false; + invocieDetail.BlancePrice = p.BlancePrice;//模具分摊价格 + invocieDetail.DiscountPrice = p.DiscountPrice;//供应商价格 + invocieDetail.SubSite = p.SubSite; + invocieDetail.Site = p.Site; + invocieDetail.TemporaryPrice = p.TemporaryPrice; + db.TB_INVOICE_DETAIL.AddOrUpdate(invocieDetail); + var _moldsharing = db.TA_MoldSharing.SingleOrDefault(t => t.VendId == p.VendId.ToUpper() && t.PartCode == p.PartCode.ToUpper() && t.Qty != t.Count); + var _price = db.TB_PRICE.Where(q => p.State != (int)PriceState.Reject && q.PartCode == p.PartCode).ToList(); + if (_moldsharing != null && p.BlancePrice > 0) + { + if (p.Qty > 0) + { + var _num = _moldsharing.Count + p.Qty; + + if (_moldsharing.Qty < _num) + { + string _str = "供应商" + _moldsharing.VendId + "零件名称" + _moldsharing.PartCode + "超过分摊数量" + (_num - _moldsharing.Qty).ToString(); + _list.Add(_str); + } + if (_num == _moldsharing.Qty && _price.Count > 0) + { + _price.ForEach(t => + { + t.State = (int)PriceState.New; + db.TB_PRICE.AddOrUpdate(t); + }); + } + _moldsharing.Count = _num; + db.TA_MoldSharing.AddOrUpdate(_moldsharing); + TA_MOLDSHARING_INVOICE MoldSharingInvoice = new TA_MOLDSHARING_INVOICE(); + MoldSharingInvoice.InvcBillNum = invoice.InvcBillNum; + MoldSharingInvoice.MoldSharingId = _moldsharing.UID; + db.TA_MoldSharing_Invoice.Add(MoldSharingInvoice); + } + } + _total += Convert.ToDecimal(p.Qty * p.Price + p.Qty * p.Price * p_entity.Tax + p.BlancePrice * p.Qty); + }); + if (_total > _quota && _quota != 0 && p_quota) + { + string _str = "发票总额超过限额:" + _quota; + _list.Add(_str); + } + #region 采购员代办任务新 + //TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + //_item.ROLE_NAME = "采购人员"; + //_item.ITEM_ADDRESS = invoice.Site; + //_item.ITEM_NO = invoice.InvcBillNum; + //_item.ITEM_CONTENT = "新的采购发票申请!"; + //_item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.APPLY_INVOICE; + //_item.ITEM_STATE = (int)PENDING_STATE.WAITING; + //_item.SENDER = invoice.CreateUser; + //_item.VEND_ID = invoice.VendId; + //_item.SENDING_TIME = DateTime.Now; + ////_item.ITEM_ADDRESS = _entity.Site; + //_item.GUID = Guid.NewGuid(); + //db.TB_PENING_ITEMS.Add(_item); + #endregion + if (_list.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.MessageList = _list; + } + else + { + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "CREATE_TB_INVOICE_MOLDSHARING", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "CREATE_TB_INVOICE_MOLDSHARING", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "CREATE_TB_INVOICE_MOLDSHARING", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "CREATE_TB_INVOICE_MOLDSHARING", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + public static ResultObject SAVE_TB_INVOICE_STATE(string p_billno, InvoiceState p_state) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _entity = db.TB_INVOICE.Where(p => p.InvcBillNum == p_billno).FirstOrDefault(); + if (p_state == InvoiceState.Apply) + { + #region 采购员代办任务新 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "采购人员"; + _item.ITEM_ADDRESS = _entity.Site; + _item.ITEM_NO = p_billno; + _item.ITEM_CONTENT = "新的采购发票申请!"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.APPLY_INVOICE; + _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + _item.SENDER = _entity.CreateUser; + _item.VEND_ID = _entity.VendId; + _item.SENDING_TIME = DateTime.Now; + //_item.ITEM_ADDRESS = _entity.Site; + _item.GUID = Guid.NewGuid(); + db.TB_PENING_ITEMS.Add(_item); + #endregion + } + if (p_state == InvoiceState.CheckFail) + { + #region 供应商代办采购退回任务新 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "供应商"; + _item.ITEM_NO = p_billno; + _item.ITEM_CONTENT = "采购审核退回发票申请!"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.PO_AUDIT_BACK; + _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + _item.SENDER = _entity.CreateUser; + _item.VEND_ID = _entity.VendId; + _item.SENDING_TIME = DateTime.Now; + //_item.ITEM_ADDRESS = _entity.Site; + _item.GUID = Guid.NewGuid(); + db.TB_PENING_ITEMS.Add(_item); + #endregion + } + if (p_state == InvoiceState.CheckSuccess) + { + #region 供应商代办采购退回任务新 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "供应商"; + _item.ITEM_NO = p_billno; + _item.ITEM_CONTENT = "采购审核通过发票申请!"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.PO_AUDIT_PASS; + _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + _item.SENDER = _entity.CreateUser; + _item.VEND_ID = _entity.VendId; + _item.SENDING_TIME = DateTime.Now; + //_item.ITEM_ADDRESS = _entity.Site; + _item.GUID = Guid.NewGuid(); + db.TB_PENING_ITEMS.Add(_item); + #endregion + + List _lists = db.TB_ASN.Where(p => p.AsnBillNum == "" && p.IsDeleted == false).ToList();//p_asnBillNum + if (_lists.Count > 0) + { + _lists.ForEach(itm => itm.State = (int)AsnState.Receive); + db.TB_ASN.AddOrUpdate(p => p.UID, _lists.ToArray()); + var _entitys = _lists.FirstOrDefault(); + var _asnList = db.TB_ASN.Where(p => p.AskBillNum == _entitys.AskBillNum && p.IsDeleted == false); + var _count = _asnList.Count(p => p.State == (int)AsnState.Receive); + if (_asnList.Count() == _count) + { + var _askList = db.TB_ASK.Where(p => p.AskBillNum == _entitys.AskBillNum && p.IsDeleted == false).ToList(); + _askList.ForEach(itm => itm.State = (int)AskState.Receive); + db.TB_ASK.AddOrUpdate(p => p.UID, _askList.ToArray()); + } + } + } + if (p_state == InvoiceState.FinanceFail) + { + #region 财务审核退回任务新 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "供应商"; + _item.ITEM_NO = p_billno; + _item.ITEM_CONTENT = "财务审核退回发票申请!"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.FC_AUDIT_BACK; + _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + _item.SENDER = _entity.CreateUser; + _item.VEND_ID = _entity.VendId; + _item.SENDING_TIME = DateTime.Now; + //_item.ITEM_ADDRESS = _entity.Site; + _item.GUID = Guid.NewGuid(); + db.TB_PENING_ITEMS.Add(_item); + #endregion + } + if (p_state == InvoiceState.FinanceReceive) + { + var _ary=db.TB_PENING_ITEMS.Where(itm => itm.INVOICE_NO == _entity.InvcBillNum).ToArray(); + db.TB_PENING_ITEMS.RemoveRange(_ary); + #region 财务审核通过任务新 + + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "供应商"; + _item.ITEM_NO = p_billno; + _item.ITEM_CONTENT = "财务审核接收发票!"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.FC_AUDIT_PASS; + _item.ITEM_STATE = (int)PENDING_STATE.COMPLETED; + _item.SENDER = _entity.CreateUser; + _item.VEND_ID = _entity.VendId; + _item.SENDING_TIME = DateTime.Now; + //_item.ITEM_ADDRESS = _entity.Site; + _item.GUID = Guid.NewGuid(); + db.TB_PENING_ITEMS.Add(_item); + #endregion + } + if (p_state == InvoiceState.Mail) + { + #region 财务审核通过任务新 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "财务人员"; + _item.ITEM_NO = p_billno; + _item.ITEM_CONTENT = "财务审核接收发票申请!"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.NEW_ASK; + _item.ITEM_STATE = (int)PENDING_STATE.COMPLETED; + _item.SENDER = _entity.CreateUser; + _item.VEND_ID = _entity.VendId; + _item.SENDING_TIME = DateTime.Now; + //_item.ITEM_ADDRESS = _entity.Site; + _item.GUID = Guid.NewGuid(); + db.TB_PENING_ITEMS.Add(_item); + #endregion + } + + var _list = db.TB_INVOICE_DETAIL.Where(p => p.InvcBillNum == p_billno).ToList(); + _list.ForEach(p => { + p.State = (int)p_state; + + }); + + _entity.State = (int)p_state; + + if (p_state == InvoiceState.Reject) + { + _entity.State = (int)p_state; + _entity.IsDeleted = true; + + _list = db.TB_INVOICE_DETAIL.Where(p => p.InvcBillNum == p_billno).ToList(); + _list.ForEach(p => { + p.State = (int)p_state; + p.IsDeleted = true; + }); + } + + db.TB_INVOICE_DETAIL.AddOrUpdate(p => p.UID, _list.ToArray()); + db.TB_INVOICE.AddOrUpdate(p => p.UID,_entity); + + if (string.IsNullOrEmpty(_ret.Message)) + { + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + } + + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SAVE_TB_INVOICE_STATE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SAVE_TB_INVOICE_STATE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SAVE_TB_INVOICE_STATE", ex.ToString()); + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SAVE_TB_INVOICE_STATE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + public static ResultObject SAVE_TB_INVOICE_STATE(V_TB_INVOICE invoice, InvoiceState p_state,string p_username="", string p_flag = "") + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _entity = db.TB_INVOICE.Where(p => p.InvcBillNum == invoice.InvcBillNum).FirstOrDefault(); + if (p_state == InvoiceState.Apply) + { + + #region 采购员代办任务新 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "采购负责人"; + _item.ITEM_ADDRESS = _entity.Site; + _item.ITEM_NO = invoice.InvcBillNum; + _item.ITEM_CONTENT = "新的采购发票申请!"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.APPLY_INVOICE; + _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + _item.SENDER = _entity.CreateUser; + _item.VEND_ID = _entity.VendId; + _item.SENDING_TIME = DateTime.Now; + //_item.ITEM_ADDRESS = _entity.Site; + _item.GUID = Guid.NewGuid(); + db.TB_PENING_ITEMS.Add(_item); + #endregion + _entity.InvoiceNum = invoice.InvoiceNum; + _entity.ExpressNum = invoice.ExpressNum; + _entity.ContractPrice = invoice.ContractPrice; + _entity.BlancePrice = invoice.BlancePrice; + _entity.StartTime = invoice.StartTime; + _entity.EndTimeb = invoice.EndTimeb; + + } + if (p_state == InvoiceState.CheckFail) + { + #region 供应商代办采购退回任务新 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "供应商"; + _item.ITEM_NO = invoice.InvcBillNum; + _item.ITEM_CONTENT = "采购审核退回发票申请!"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.PO_AUDIT_BACK; + _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + _item.SENDER = p_username; + _item.VEND_ID = _entity.VendId; + _item.SENDING_TIME = DateTime.Now; + //_item.ITEM_ADDRESS = _entity.Site; + _item.GUID = Guid.NewGuid(); + db.TB_PENING_ITEMS.Add(_item); + #endregion + + } + if (p_state == InvoiceState.CheckSuccess) + { + #region 供应商代办采购退回任务新 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "供应商"; + _item.ITEM_NO = invoice.InvcBillNum; + _item.ITEM_CONTENT = "采购审核通过发票申请!"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.PO_AUDIT_PASS; + _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + _item.SENDER = p_username; + _item.VEND_ID = _entity.VendId; + _item.SENDING_TIME = DateTime.Now; + //_item.ITEM_ADDRESS = _entity.Site; + _item.GUID = Guid.NewGuid(); + db.TB_PENING_ITEMS.Add(_item); + #endregion + + TB_INVOICE_DETAIL detail = db.TB_INVOICE_DETAIL.Where(p => p.InvcBillNum == invoice.InvcBillNum).FirstOrDefault(); + if (detail != null) + { + List _lists = db.TB_ASN.Where(p => p.AsnBillNum == detail.AsnBillNum && p.IsDeleted == false).ToList();//p_asnBillNum + if (_lists.Count > 0) + { + _lists.ForEach(itm => itm.State = (int)AsnState.Receive); + db.TB_ASN.AddOrUpdate(p => p.UID, _lists.ToArray()); + var _entitys = _lists.FirstOrDefault(); + var _asnList = db.TB_ASN.Where(p => p.AskBillNum == _entitys.AskBillNum && p.IsDeleted == false); + var _count = _asnList.Count(p => p.State == (int)AsnState.Receive); + if (_asnList.Count() == _count) + { + var _askList = db.TB_ASK.Where(p => p.AskBillNum == _entitys.AskBillNum && p.IsDeleted == false).ToList(); + _askList.ForEach(itm => itm.State = (int)AskState.Receive); + db.TB_ASK.AddOrUpdate(p => p.UID, _askList.ToArray()); + } + } + } + } + if (p_state == InvoiceState.FinanceFail) + { + #region 财务审核退回任务新 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "供应商"; + _item.ITEM_NO = invoice.InvcBillNum; + _item.ITEM_CONTENT = "财务审核退回发票申请!"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.FC_AUDIT_BACK; + _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + _item.SENDER = p_username; + _item.VEND_ID = _entity.VendId; + _item.SENDING_TIME = DateTime.Now; + //_item.ITEM_ADDRESS = _entity.Site; + _item.GUID = Guid.NewGuid(); + db.TB_PENING_ITEMS.Add(_item); + #endregion + + + } + if (p_state == InvoiceState.FinanceReceive) + { + + var _ary = db.TB_PENING_ITEMS.Where(itm => itm.INVOICE_NO == _entity.InvcBillNum).ToArray(); + db.TB_PENING_ITEMS.RemoveRange(_ary); + + #region 财务审核通过任务新 + + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "供应商"; + _item.ITEM_NO = invoice.InvcBillNum; + _item.ITEM_CONTENT = "财务审核接收发票!"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.FC_AUDIT_PASS; + _item.ITEM_STATE = (int)PENDING_STATE.COMPLETED; + _item.SENDER = p_username; + _item.VEND_ID = _entity.VendId; + _item.SENDING_TIME = DateTime.Now; + //_item.ITEM_ADDRESS = _entity.Site; + _item.GUID = Guid.NewGuid(); + db.TB_PENING_ITEMS.Add(_item); + #endregion + + + } + if (p_state == InvoiceState.Mail) + { + #region 财务审核通过任务新 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "财务人员"; + _item.ITEM_NO = invoice.InvcBillNum; + _item.ITEM_CONTENT = "财务审核接收发票申请!"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.NEW_ASK; + _item.ITEM_STATE = (int)PENDING_STATE.COMPLETED; + _item.SENDER = p_username; + _item.VEND_ID = _entity.VendId; + _item.SENDING_TIME = DateTime.Now; + //_item.ITEM_ADDRESS = _entity.Site; + _item.GUID = Guid.NewGuid(); + db.TB_PENING_ITEMS.Add(_item); + #endregion + + _entity.InvoiceNum = invoice.InvoiceNum; + _entity.ExpressNum = invoice.ExpressNum; + + _entity.ContractPrice = invoice.ContractPrice; + _entity.BlancePrice = invoice.BlancePrice; + + } + + var _list = db.TB_INVOICE_DETAIL.Where(p => p.InvcBillNum == invoice.InvcBillNum).ToList(); + _list.ForEach(p => { + p.State = (int)p_state; + + }); + + _entity.State = (int)p_state; + + if (p_state == InvoiceState.Reject) + { + _entity.State = (int)p_state; + _entity.IsDeleted = true; + + _list = db.TB_INVOICE_DETAIL.Where(p => p.InvcBillNum == invoice.InvcBillNum).ToList(); + _list.ForEach(p => { + p.State = (int)p_state; + p.IsDeleted = true; + if (!string.IsNullOrEmpty(p_flag)) + { + var _moldsharing = db.TA_MoldSharing.SingleOrDefault(t => t.VendId == invoice.VendId.ToUpper() && t.PartCode == p.PartCode.ToUpper()); + if (_moldsharing != null) + { + var _deletelist = db.TA_MoldSharing_Invoice.Where(q => q.MoldSharingId == _moldsharing.UID && q.InvcBillNum == invoice.InvcBillNum).ToList(); + if (_deletelist != null && _deletelist.Count > 0) + { + var emu = db.TA_MoldSharing_Invoice.RemoveRange(_deletelist.ToArray()); + } + if (_moldsharing != null) + { + var _num = _moldsharing.Count - p.Qty; + _moldsharing.Count = _num; + db.TA_MoldSharing.AddOrUpdate(_moldsharing); + } + } + } + }); + } + + db.TB_INVOICE_DETAIL.AddOrUpdate(p => p.UID, _list.ToArray()); + db.TB_INVOICE.AddOrUpdate(p => p.UID, _entity); + + if (string.IsNullOrEmpty(_ret.Message)) + { + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + } + + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SAVE_TB_INVOICE_STATE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SAVE_TB_INVOICE_STATE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SAVE_TB_INVOICE_STATE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SAVE_TB_INVOICE_STATE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + public ResultObject Del_TB_INVOICE(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var itm in p_entitys) + { + db.TB_INVOICE.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Del_TB_INVOICE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Del_TB_INVOICE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Del_TB_INVOICE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Del_TB_INVOICE", e.Message); throw e; + } + return _ret; + } + + public static ResultObject SAVE_TB_INVOICE_APPLY(V_TB_INVOICE p_invoice, List p_list,string p_flag="") + { + ResultObject _ret = new ResultObject(); + List _list = new List(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _bill=db.TB_INVOICE.Where(itm => itm.InvcBillNum == p_invoice.InvcBillNum).FirstOrDefault(); + _bill.InvoiceNum = p_invoice.InvoiceNum; + _bill.ExpressNum = p_invoice.ExpressNum; + _bill.ContractPrice = p_invoice.ContractPrice; + _bill.BlancePrice = p_invoice.BlancePrice; + _bill.DiscountPrice = p_invoice.DiscountPrice; + _bill.DiscountRemark = p_invoice.DiscountRemark; + _bill.Tax = p_invoice.Tax; + _bill.Remark = p_invoice.Remark; + _bill.State = (int)p_invoice.State; + db.TB_INVOICE.AddOrUpdate(p => p.InvcBillNum, _bill); + p_list.ForEach(p => { + var _detail=db.TB_INVOICE_DETAIL.Where(itm => itm.UID == p.UID).FirstOrDefault(); + var _qty = _detail.Qty - p.Qty; + _detail.State =(int)p.State; + _detail.Qty = p.Qty; + _detail.Price = p.Price; + _detail.ContractPrice = p.ContractPrice; + _detail.BlancePrice = p.BlancePrice; + _detail.DiscountPrice = p.DiscountPrice; + _detail.DiscountRemark = p.DiscountRemark; + if (_detail.Qty == 0) + { + _detail.State = (int)InvoiceState.Reject; + _detail.IsDeleted = true; + } + _detail.Remark = p.Remark; + db.TB_INVOICE_DETAIL.AddOrUpdate(itm=>itm.UID,_detail); + if(!string.IsNullOrEmpty(p_flag)&& p.BlancePrice>0) + { + var _ms = db.TA_MoldSharing.SingleOrDefault(t => t.PartCode == _detail.PartCode && t.VendId == _bill.VendId); + var _price = db.TB_PRICE.Where(q => p.State != (int)PriceState.Reject && q.PartCode == p.PartCode).ToList(); + if (_ms != null) + { + _ms.Count = _ms.Count - _qty; + if (_ms.Count > _ms.Qty) + { + string _str = "供应商" + _ms.VendId + "零件名称" + _ms.PartCode + "超出分摊数量" + (_ms.Count - _ms.Qty).ToString(); + _list.Add(_str); + } + if(_ms.Count == _ms.Qty&& _price.Count>0) + { + _price.ForEach(t => + { + t.State = (int)PriceState.New; + db.TB_PRICE.AddOrUpdate(t); + }); + } + db.TA_MoldSharing.AddOrUpdate(_ms); + } + } + }); + + #region 供应商代办采购退回任务新 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "供应商"; + _item.ITEM_NO = _bill.InvcBillNum; + _item.ITEM_CONTENT = "采购审核退回发票申请!"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.PO_AUDIT_BACK; + _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + _item.SENDER = _bill.CreateUser; + _item.VEND_ID = _bill.VendId; + _item.SENDING_TIME = DateTime.Now; + _item.ITEM_ADDRESS = _bill.Site; + _item.GUID = Guid.NewGuid(); + db.TB_PENING_ITEMS.Add(_item); + #endregion + + if (_list.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.MessageList = _list; + } + else + { + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SAVE_TB_INVOICE_APPLY", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SAVE_TB_INVOICE_APPLY", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SAVE_TB_INVOICE_APPLY", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SAVE_TB_INVOICE_APPLY", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + public static ResultObject SAVE_TB_INVOICE_RED(V_TB_INVOICE p_invoice, List p_list) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + TB_INVOICE _bill = db.TB_INVOICE.Where(itm => itm.InvcBillNum == p_invoice.InvcBillNum && itm.IsDeleted==false).FirstOrDefault(); + + + if (_bill != null) + { + + _bill.InvcBillNum = p_invoice.InvcBillNum; + _bill.Site = p_invoice.Site; + _bill.InvoiceNum = p_invoice.InvoiceNum; + _bill.ExpressNum = p_invoice.ExpressNum; + _bill.VendId = p_invoice.VendId; + _bill.Tax = p_invoice.Tax; + _bill.State = (int)p_invoice.State; + _bill.Remark = p_invoice.Remark; + if (p_invoice.CreateTime != null) + { + _bill.CreateTime = DateTime.Parse(p_invoice.CreateTime.ToString()); + } + _bill.CreateUser = p_invoice.CreateUser; + if (p_invoice.UpdateTime != null) + { + _bill.UpdateTime = DateTime.Parse(p_invoice.UpdateTime.ToString()); + } + _bill.UpdateUser = p_invoice.UpdateUser; + _bill.UpdateInfo = p_invoice.UpdateInfo; + _bill.IsDeleted = p_invoice.IsDeleted; + _bill.GUID = p_invoice.GUID; + _bill.ContractPrice = p_invoice.ContractPrice; + _bill.BlancePrice = p_invoice.BlancePrice; + _bill.DiscountPrice = p_invoice.DiscountPrice; + _bill.DiscountRemark = p_invoice.DiscountRemark; + _bill.IsRed = true; + + db.TB_INVOICE.AddOrUpdate(itm => itm.UID, _bill); + + p_list.ForEach(p => + { + TB_INVOICE_DETAIL _detail = new TB_INVOICE_DETAIL(); + _detail.InvcBillNum = p.InvcBillNum; + _detail.RecvBillNum = p.RecvBillNum; + _detail.AsnBillNum = p.AsnBillNum; + _detail.PoBillNum = p.PoBillNum; + _detail.PoLineNum = p.PoLineNum; + _detail.PartCode = p.PartCode; + _detail.Batch = p.Batch; + if (p.ProduceDate != null) + { + _detail.ProduceDate = DateTime.Parse(p.ProduceDate.ToString()); + } + _detail.VendBatch = p.VendBatch; + _detail.Qty = p.Qty; + _detail.PoUnit = p.PoUnit; + _detail.Price = p.Price; + _detail.Currency = p.Currency; + if (p.PackQty != null) + { + _detail.PackQty = decimal.Parse(p.PackQty.ToString()); + } + if (p.State != null) + { + _detail.State = int.Parse(p.State.ToString()); + } + _detail.Remark = p.Remark; + if (p.CreateTime != null) + { + _detail.CreateTime = DateTime.Parse(p.CreateTime.ToString()); + } + _detail.CreateUser = p.CreateUser; + if (p.UpdateTime != null) + { + _detail.UpdateTime = DateTime.Parse(p.UpdateTime.ToString()); + } + _detail.UpdateUser = p.UpdateUser; + _detail.UpdateInfo = p.UpdateInfo; + _detail.IsDeleted = p.IsDeleted; + _detail.GUID = p.GUID; + if (p.BeginTime != null) + { + _detail.BeginTime = DateTime.Parse(p.BeginTime.ToString()); + } + _detail.ContractPrice = p.ContractPrice; + _detail.BlancePrice = p.BlancePrice; + _detail.DiscountPrice = p.DiscountPrice; + _detail.DiscountRemark = p.DiscountRemark; + _detail.IsRed =true; + + db.TB_INVOICE_DETAIL.Add(_detail); + }); + + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + else + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SAVE_TB_INVOICE", "发票记录未查询到"); + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SAVE_TB_INVOICE_APPLY", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SAVE_TB_INVOICE_APPLY", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SAVE_TB_INVOICE_APPLY", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SAVE_TB_INVOICE_APPLY", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + public ResultObject Del_TB_INVOICE_DETAIL(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var itm in p_entitys) + { + db.TB_INVOICE_DETAIL.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Del_TB_INVOICE_DETAIL", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Del_TB_INVOICE_DETAIL", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Del_TB_INVOICE_DETAIL", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Del_TB_INVOICE_DETAIL", e.Message); throw e; + } + return _ret; + } + + public static ResultObject CaiWu_Return_Reason(string p_InvcBillNum,string p_Memo) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + TB_INVOICE invoice = db.TB_INVOICE.Where(p => p.InvcBillNum == p_InvcBillNum).FirstOrDefault(); + + if (invoice != null) + { + invoice.State = (int)InvoiceState.FinanceFail; + invoice.Remark = p_Memo; + invoice.InvoiceNum = ""; + invoice.ExpressNum = ""; + + db.TB_INVOICE.AddOrUpdate(invoice); + + List invoicedetail = db.TB_INVOICE_DETAIL.Where(p => p.InvcBillNum == p_InvcBillNum).ToList(); + + foreach (TB_INVOICE_DETAIL det in invoicedetail) + { + det.State = (int)InvoiceState.FinanceFail; + } + + #region 财务审核退回任务新 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "供应商"; + _item.ITEM_NO = invoice.InvcBillNum; + _item.ITEM_CONTENT = "财务审核退回发票申请!"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.FC_AUDIT_BACK; + _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + _item.SENDER = invoice.CreateUser; + _item.VEND_ID = invoice.VendId; + _item.SENDING_TIME = DateTime.Now; + _item.ITEM_ADDRESS = invoice.Site; + _item.GUID = Guid.NewGuid(); + db.TB_PENING_ITEMS.Add(_item); + #endregion + + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + _ret.Message = invoice.VendId; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = invoice.VendId; + } + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = invoice.VendId; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "CaiWu_Return_Reason", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "CaiWu_Return_Reason", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "CaiWu_Return_Reason", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "CaiWu_Return_Reason", e.Message); throw e; + } + return _ret; + } + + public static ResultObject UpdateMemoByInvcBillNum(string p_InvcBillNum, string p_Memo) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + TB_INVOICE invoice = db.TB_INVOICE.Where(p => p.InvcBillNum == p_InvcBillNum).FirstOrDefault(); + + invoice.Remark = p_Memo; + + + db.TB_INVOICE.AddOrUpdate(invoice); + + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "UpdateMemoByInvcBillNum", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "UpdateMemoByInvcBillNum", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "UpdateMemoByInvcBillNum", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "UpdateMemoByInvcBillNum", e.Message); throw e; + } + return _ret; + } + + + public static ResultObject UpdateMemoByInvcBillNum(string p_InvcBillNum, string p_Memo, decimal p_blan, string p_inv) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + TB_INVOICE invoice = db.TB_INVOICE.Where(p => p.InvcBillNum == p_InvcBillNum).FirstOrDefault(); + + invoice.Remark = p_Memo; + invoice.BlancePrice = p_blan; + invoice.InvoiceNum = p_inv; + + db.TB_INVOICE.AddOrUpdate(invoice); + + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "UpdateMemoByInvcBillNum", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "UpdateMemoByInvcBillNum", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "UpdateMemoByInvcBillNum", ex.ToString()); + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "UpdateMemoByInvcBillNum", e.Message); throw e; + } + return _ret; + } + public static ResultObject UpdateMemoByInvcBillNum(string p_InvcBillNum, string p_Memo, decimal p_blan, string p_inv, + string p_CInvoiceCostCenterCode , + string p_CInvoiceDescription, + string p_CInvoiceDivisionCode, + string p_CInvoiceType, + DateTime? p_PostingDate + ) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + TB_INVOICE invoice = db.TB_INVOICE.Where(p => p.InvcBillNum == p_InvcBillNum).FirstOrDefault(); + invoice.CInvoiceCostCenterCode = p_CInvoiceCostCenterCode; + invoice.CInvoiceDescription = p_CInvoiceDescription; + invoice.CInvoiceDivisionCode = p_CInvoiceDivisionCode; + invoice.CInvoiceType = p_CInvoiceType; + invoice.PostingDate = p_PostingDate; + invoice.Remark = p_Memo; + invoice.BlancePrice = p_blan; + invoice.InvoiceNum = p_inv; + + db.TB_INVOICE.AddOrUpdate(invoice); + + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "UpdateMemoByInvcBillNum", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "UpdateMemoByInvcBillNum", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "UpdateMemoByInvcBillNum", ex.ToString()); + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "UpdateMemoByInvcBillNum", e.Message); throw e; + } + return _ret; + } + + + + public static ResultObject SET_INVOICE_STATE(string p_InvcBillNum, InvoiceState p_state) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + TB_INVOICE invoice = db.TB_INVOICE.Where(p => p.InvcBillNum == p_InvcBillNum).FirstOrDefault(); + + if (invoice != null) + { + invoice.State = (int)p_state; + + + + db.TB_INVOICE.AddOrUpdate(invoice); + + List invoicedetail = db.TB_INVOICE_DETAIL.Where(p => p.InvcBillNum == p_InvcBillNum).ToList(); + + foreach (TB_INVOICE_DETAIL det in invoicedetail) + { + det.State = (int)p_state; + } + + //财务审核通过,把所有代办信息设为已办状态 + if (p_state == InvoiceState.FinanceReceive) + { + List items = db.TB_PENING_ITEMS.Where(p => p.ITEM_NO == p_InvcBillNum).ToList(); + + foreach (TB_PENING_ITEMS item in items) + { + item.ITEM_STATE = (int)PENDING_STATE.COMPLETED; + } + + + List _ls = db.V_TB_INVOICE_DETAIL.Where(p => p.InvcBillNum == p_InvcBillNum).ToList(); + V_TB_INVOICE _bill= db.V_TB_INVOICE.Where(p => p.InvcBillNum == p_InvcBillNum).FirstOrDefault(); + foreach (V_TB_INVOICE_DETAIL itm in _ls) + { + TS_UNI_API _api = UniApiController.CreateBy(_bill,itm ,UniApiType.Invoice); + _api.State = 1; + db.TS_UNI_API.AddOrUpdate(_api); + itm.State = (int)p_state; + } + + } + //财务取消收票,把所有代办信息设为等待状态 + //if (p_state == InvoiceState.Mail) + //{ + // List items = db.TB_PENING_ITEMS.Where(p => p.ITEM_NO == p_InvcBillNum).ToList(); + + // foreach (TB_PENING_ITEMS item in items) + // { + // item.ITEM_STATE = (int)PENDING_STATE.WAITING; + // } + //} + + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + _ret.Message = invoice.VendId; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = invoice.VendId; + } + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = invoice.VendId; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SET_INVOICE_STATE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SET_INVOICE_STATE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SET_INVOICE_STATE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SET_INVOICE_STATE", e.Message); throw e; + } + return _ret; + } + + + public static ResultObject SET_INVOICE_STATE(string p_InvcBillNum, InvoiceState p_state, + string p_CInvoiceCostCenterCode, + string p_CInvoiceDescription, + string p_CInvoiceDivisionCode, + string p_CInvoiceType, + DateTime? p_PostingDate + ) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + TB_INVOICE invoice = db.TB_INVOICE.Where(p => p.InvcBillNum == p_InvcBillNum).FirstOrDefault(); + + + if (invoice != null) + { + invoice.State = (int)p_state; + + invoice.CInvoiceCostCenterCode = p_CInvoiceCostCenterCode; + invoice.CInvoiceDescription = p_CInvoiceDescription; + invoice.CInvoiceDivisionCode = p_CInvoiceDivisionCode; + invoice.CInvoiceType = p_CInvoiceType; + invoice.PostingDate = p_PostingDate; + + + db.TB_INVOICE.AddOrUpdate(invoice); + + List invoicedetail = db.TB_INVOICE_DETAIL.Where(p => p.InvcBillNum == p_InvcBillNum).ToList(); + + foreach (TB_INVOICE_DETAIL det in invoicedetail) + { + det.State = (int)p_state; + } + + //财务审核通过,把所有代办信息设为已办状态 + if (p_state == InvoiceState.FinanceReceive) + { + List items = db.TB_PENING_ITEMS.Where(p => p.ITEM_NO == p_InvcBillNum).ToList(); + + foreach (TB_PENING_ITEMS item in items) + { + item.ITEM_STATE = (int)PENDING_STATE.COMPLETED; + } + List _ls = db.V_TB_INVOICE_DETAIL.Where(p => p.InvcBillNum == p_InvcBillNum).ToList(); + V_TB_INVOICE _bill = db.V_TB_INVOICE.Where(p => p.InvcBillNum == p_InvcBillNum).FirstOrDefault(); + + var _colne=ConvertHelper.GetObjectClone(_bill); + + _colne.CInvoiceCostCenterCode = p_CInvoiceCostCenterCode; + _colne.CInvoiceDescription = p_CInvoiceDescription; + _colne.CInvoiceDivisionCode = p_CInvoiceDivisionCode; + _colne.CInvoiceType = p_CInvoiceType; + _colne.PostingDate = p_PostingDate; + + + foreach (V_TB_INVOICE_DETAIL itm in _ls) + { + TS_UNI_API _api = UniApiController.CreateBy(_colne, itm, UniApiType.Invoice); + _api.State = 1; + db.TS_UNI_API.AddOrUpdate(_api); + itm.State = (int)p_state; + } + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + _ret.Message = invoice.VendId; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = invoice.VendId; + } + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = invoice.VendId; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SET_INVOICE_STATE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SET_INVOICE_STATE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SET_INVOICE_STATE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SET_INVOICE_STATE", e.Message); throw e; + } + return _ret; + } + + //public static ResultObject SET_INVOICE_STATE(List p_ls, InvoiceState p_state, + // string p_CInvoiceCostCenterCode, + // string p_CInvoiceDescription, + // string p_CInvoiceDivisionCode, + // string p_CInvoiceType, + // DateTime? p_PostingDate + // ) + //{ + // ResultObject _ret = new ResultObject(); + // try + // { + // using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + // { + // var invoiceList = db.TB_INVOICE.Where(p =>p_ls.Contains(p.InvcBillNum) ).ToList(); + // foreach (var invoice in invoiceList) + // { + // invoice.State = (int)p_state; + // invoice.CInvoiceCostCenterCode = p_CInvoiceCostCenterCode; + // invoice.CInvoiceDescription = p_CInvoiceDescription; + // invoice.CInvoiceDivisionCode = p_CInvoiceDivisionCode; + // invoice.CInvoiceType = p_CInvoiceType; + // invoice.PostingDate = p_PostingDate; + // } + // db.TB_INVOICE.AddOrUpdate(invoiceList.ToArray()); + + + // List invoicedetail = db.TB_INVOICE_DETAIL.Where(p =>p_ls.Contains(p.InvcBillNum) ).ToList(); + + // foreach (TB_INVOICE_DETAIL det in invoicedetail) + // { + // det.State = (int)p_state; + // } + + // if (p_state == InvoiceState.FinanceReceive) + // { + // //List items = db.TB_PENING_ITEMS.Where(p => p.ITEM_NO == p_InvcBillNum).ToList(); + + // //foreach (TB_PENING_ITEMS item in items) + // //{ + // // item.ITEM_STATE = (int)PENDING_STATE.COMPLETED; + // //} + // List _ls = db.V_TB_INVOICE_DETAIL.Where(p => p.InvcBillNum == p_InvcBillNum).ToList(); + // V_TB_INVOICE _bill = db.V_TB_INVOICE.Where(p => p.InvcBillNum == p_InvcBillNum).FirstOrDefault(); + + // var _colne = ConvertHelper.GetObjectClone(_bill); + + // _colne.CInvoiceCostCenterCode = p_CInvoiceCostCenterCode; + // _colne.CInvoiceDescription = p_CInvoiceDescription; + // _colne.CInvoiceDivisionCode = p_CInvoiceDivisionCode; + // _colne.CInvoiceType = p_CInvoiceType; + // _colne.PostingDate = p_PostingDate; + + + // foreach (V_TB_INVOICE_DETAIL itm in _ls) + // { + // TS_UNI_API _api = UniApiController.CreateBy(_colne, itm, UniApiType.Invoice); + // _api.State = 1; + // db.TS_UNI_API.AddOrUpdate(_api); + // itm.State = (int)p_state; + // } + // } + + + + + + // if (invoice != null) + // { + + + + + + // List invoicedetail = db.TB_INVOICE_DETAIL.Where(p => p.InvcBillNum == p_InvcBillNum).ToList(); + + // foreach (TB_INVOICE_DETAIL det in invoicedetail) + // { + // det.State = (int)p_state; + // } + + // //财务审核通过,把所有代办信息设为已办状态 + // if (p_state == InvoiceState.FinanceReceive) + // { + // List items = db.TB_PENING_ITEMS.Where(p => p.ITEM_NO == p_InvcBillNum).ToList(); + + // foreach (TB_PENING_ITEMS item in items) + // { + // item.ITEM_STATE = (int)PENDING_STATE.COMPLETED; + // } + // List _ls = db.V_TB_INVOICE_DETAIL.Where(p => p.InvcBillNum == p_InvcBillNum).ToList(); + // V_TB_INVOICE _bill = db.V_TB_INVOICE.Where(p => p.InvcBillNum == p_InvcBillNum).FirstOrDefault(); + + // var _colne = ConvertHelper.GetObjectClone(_bill); + + // _colne.CInvoiceCostCenterCode = p_CInvoiceCostCenterCode; + // _colne.CInvoiceDescription = p_CInvoiceDescription; + // _colne.CInvoiceDivisionCode = p_CInvoiceDivisionCode; + // _colne.CInvoiceType = p_CInvoiceType; + // _colne.PostingDate = p_PostingDate; + + + // foreach (V_TB_INVOICE_DETAIL itm in _ls) + // { + // TS_UNI_API _api = UniApiController.CreateBy(_colne, itm, UniApiType.Invoice); + // _api.State = 1; + // db.TS_UNI_API.AddOrUpdate(_api); + // itm.State = (int)p_state; + // } + // } + // if (db.SaveChanges() != -1) + // { + // _ret.State = ReturnStatus.Succeed; + // _ret.Result = true; + // _ret.Message = invoice.VendId; + // } + // else + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.Message = invoice.VendId; + // } + // } + // else + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.Message = invoice.VendId; + // } + // } + // } + // catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + // { + // var sb = new StringBuilder(); + + // foreach (var error in dbEx.EntityValidationErrors.ToList()) + // { + + // error.ValidationErrors.ToList().ForEach(i => + // { + // sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + // }); + // } + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.ErrorList.Add(dbEx); + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SET_INVOICE_STATE", sb.ToString()); + // throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + // } + // catch (OptimisticConcurrencyException ex)//并发冲突异常 + // { + + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.ErrorList.Add(ex); + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SET_INVOICE_STATE", ex.ToString()); + // throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + // } + // catch (ScpException ex) + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.ErrorList.Add(ex); + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SET_INVOICE_STATE", ex.ToString()); + + // if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + // { + // var inner = (UpdateException)ex.InnerException; + + + // throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + // } + // else + // { + // if (ex.InnerException != null) throw ex.InnerException; + // } + // } + // catch (Exception e) + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.ErrorList.Add(e); + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "SET_INVOICE_STATE", e.Message); throw e; + // } + // return _ret; + //} + + + + + + + public static ResultObject Add_New_Red_Invoice(V_TB_INVOICE p_entity) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _invoice = db.TB_INVOICE.Where(p => p.InvcBillNum == p_entity.InvcBillNum).FirstOrDefault(); + var _invoicedetail = db.TB_INVOICE_DETAIL.Where(p => p.InvcBillNum == p_entity.InvcBillNum).FirstOrDefault(); + if (_invoice != null) + { + if (_invoicedetail != null) + { + TB_INVOICE_DETAIL invocieDetail = new TB_INVOICE_DETAIL(); + invocieDetail.InvcBillNum = _invoicedetail.InvcBillNum; + //invocieDetail.RecvBillNum = _invoicedetail.RecvBillNum; + //invocieDetail.AsnBillNum = _invoicedetail.AsnBillNum; + invocieDetail.PoBillNum = _invoicedetail.PoBillNum; + invocieDetail.PoLineNum = 0;// _invoicedetail.PoLineNum; + invocieDetail.PartCode = ""; // _invoicedetail.PartCode; + invocieDetail.Batch = "";// _invoicedetail.Batch; + //invocieDetail.VendBatch = _invoicedetail.VendBatch; + invocieDetail.Qty = 0; + //invocieDetail.PoUnit = _invoicedetail.PoUnit; //自己改数据库 + invocieDetail.Price = 0;//自己改数据库 + invocieDetail.Currency = _invoicedetail.Currency;//自己改数据库 + invocieDetail.State = _invoicedetail.State; + invocieDetail.Remark = "";//_invoicedetail.Remark; + invocieDetail.CreateUser = _invoicedetail.CreateUser; + invocieDetail.CreateTime = _invoicedetail.CreateTime; + //invocieDetail.LocUnit = p.LocUnit;//自己改数据库 + invocieDetail.IsDeleted = false; + invocieDetail.GUID = Guid.NewGuid(); + invocieDetail.IsRed = false; + db.TB_INVOICE_DETAIL.Add(invocieDetail); + } + else + { + TB_INVOICE_DETAIL invocieDetail = new TB_INVOICE_DETAIL(); + invocieDetail.InvcBillNum = _invoice.InvcBillNum; + //invocieDetail.RecvBillNum = _invoicedetail.RecvBillNum; + //invocieDetail.AsnBillNum = _invoicedetail.AsnBillNum; + invocieDetail.PoBillNum = "";// _invoice.PoBillNum; + invocieDetail.PoLineNum = 0;// _invoicedetail.PoLineNum; + invocieDetail.PartCode = ""; // _invoicedetail.PartCode; + invocieDetail.Batch = "";// _invoicedetail.Batch; + //invocieDetail.VendBatch = _invoicedetail.VendBatch; + invocieDetail.Qty = 0; + //invocieDetail.PoUnit = _invoicedetail.PoUnit; //自己改数据库 + invocieDetail.Price = 0;//自己改数据库 + invocieDetail.Currency = "CNY";// _invoice.Currency;//自己改数据库 + invocieDetail.State = _invoice.State; + invocieDetail.Remark = "";//_invoicedetail.Remark; + invocieDetail.CreateUser = _invoice.CreateUser; + invocieDetail.CreateTime = _invoice.CreateTime; + //invocieDetail.LocUnit = p.LocUnit;//自己改数据库 + invocieDetail.IsDeleted = false; + invocieDetail.GUID = Guid.NewGuid(); + invocieDetail.IsRed = false; + + db.TB_INVOICE_DETAIL.Add(invocieDetail); + } + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "CREATE_TB_INVOICE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "CREATE_TB_INVOICE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "CREATE_TB_INVOICE", ex.ToString()); + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "CREATE_TB_INVOICE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + } +} diff --git a/北京北汽/SCP/Controller/SCP_LOGINNUMBER_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_LOGINNUMBER_CONTROLLER.cs new file mode 100644 index 0000000..8a818b0 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_LOGINNUMBER_CONTROLLER.cs @@ -0,0 +1,155 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Infrastructure; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System.Data.Entity.Core; +using CK.SCP.Models.Enums; +using CK.SCP.Models.AppBoxEntity; + +namespace CK.SCP.Controller +{ + public class SCP_LOGINNUMBER_CONTROLLER + { + public static TA_LOGINNUMBER GetlistUserNumber(string username) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TA_LOGINNUMBER.Where(p => p.Name == username).FirstOrDefault(); + } + } + public static ResultObject Save_TA_LOGINNUMBER(string username, LoginNumer p_state,string date) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + using (AppBoxContext _appdb = EntitiesFactory.CreateAppBoxInstance()) + { + var user = _appdb.Users.FirstOrDefault(t => t.Name == username); + + if (user == null) + { + _ret.MessageList.Add("用户名"+ username+"不存在,请输入正确用户名"); + } + else + { + var login = db.TA_LOGINNUMBER.FirstOrDefault(p => p.Name == username); + if (p_state == LoginNumer.Sussess && login != null) + { + db.TA_LOGINNUMBER.Remove(login); + } + + if (login != null && p_state == LoginNumer.Faile) + { + if (login.Number == 4&&login.Time==date) + { + login.Number = 5; + db.TA_LOGINNUMBER.AddOrUpdate(login); + + user.Enabled = false; + _appdb.Users.AddOrUpdate(user); + _appdb.SaveChanges(); + + _ret.MessageList.Add("因您连续五次输入密码错误,该账号已经被设为未启用状态,请联系系统管理员"); + } + else if(login.Number <4 && login.Time == date) + { + login.Number = login.Number + 1; + db.TA_LOGINNUMBER.AddOrUpdate(login); + }else if(login.Time != date) + { + login.Time = date; + login.Number = 1; + db.TA_LOGINNUMBER.AddOrUpdate(login); + } + } + else if (login == null && p_state == LoginNumer.Faile) + { + TA_LOGINNUMBER log = new TA_LOGINNUMBER(); + log.Name = username; + log.Number = 1; + log.Time = DateTime.Now.ToShortDateString(); + db.TA_LOGINNUMBER.AddOrUpdate(log); + } + } + } + + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_LOGINNUMBER_CONTROLLER), "Save_TA_LOGINNUMBER", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_LOGINNUMBER_CONTROLLER), "Save_TA_LOGINNUMBER", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_LOGINNUMBER_CONTROLLER), "Save_TA_LOGINNUMBER", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_LOGINNUMBER_CONTROLLER), "Save_TA_LOGINNUMBER", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + } +} diff --git a/北京北汽/SCP/Controller/SCP_MoldSharing_Controller.cs b/北京北汽/SCP/Controller/SCP_MoldSharing_Controller.cs new file mode 100644 index 0000000..6f8a288 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_MoldSharing_Controller.cs @@ -0,0 +1,437 @@ +using System; +using System.Linq; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using CK.SCP.Models; +using System.Data; +using System.Data.Entity.Core; +using System.Text; +using CK.SCP.Models.ScpEntity.ExcelExportEnttity; +using System.Collections.Generic; +using System.Data.Entity.Migrations; + +namespace CK.SCP.Controller +{ + public class SCP_MoldSharing_Controller + { + /// + /// 获取模具分摊列表 + /// + /// + /// + public static void Get_V_TA_MoldSharing_List(V_TA_MOLDSHARING p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TA_MOLDSHARING; + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode == p_entity.PartCode); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId == p_entity.VendId); + } + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "Get_V_TA_MoldSharing_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "Get_V_TA_MoldSharing_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "Get_V_TA_MoldSharing_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "Get_V_TA_MoldSharing_List", e.Message); + throw e; + } + + } + /// + /// 模具分摊导入 + /// + /// + /// + /// + /// + public static ResultObject EXCEL_MOLDSHARING_MOD(List p_order_list, string site, string p_creator) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + int number = 1; + List lineError = new List(); + List ErrorList = new List(); + var _lst = p_order_list; + _lst.ForEach(p => + { + var _ls = CheckExcelMode_MoldSharing(db, p, site); + if (_ls.Count > 0) + { + lineError.Add(number.ToString()); + ErrorList.Add(string.Join("
", _ls.ToArray())); + } + number++; + }); + if (lineError.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.MessageList.AddRange(ErrorList); + _ret.Result = false; + } + else + { + _lst.ForEach(p => + { + var _moldsharing = db.TA_MoldSharing.SingleOrDefault(t => t.VendId == p.供应商编码.ToUpper() && t.PartCode == p.零件编码.ToUpper()) ?? + new TA_MOLDSHARING + { + VendId = p.供应商编码.ToUpper(), + PartCode = p.零件编码.ToUpper(), + CreateTime = DateTime.Now, + CreateUser = p_creator, + IsDeleted = false, + Count = 0, + }; + _moldsharing.Price = decimal.Parse(p.价格); + _moldsharing.Qty = decimal.Parse(p.分摊数量); + _moldsharing.UpdateTime = DateTime.Now; + _moldsharing.UpdateUser = p_creator; + _moldsharing.Site = site; + db.TA_MoldSharing.AddOrUpdate(_moldsharing); + }); + if (_ret.MessageList.Count == 0) + { + int state = db.SaveChanges(); + if (state != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "EXCEL_MOLDSHARING_MOD", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "EXCEL_MOLDSHARING_MOD", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "EXCEL_MOLDSHARING_MOD", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "EXCEL_MOLDSHARING_MOD", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + public static List CheckMode_MoldSharing(ScpEntities db, SCP_MOLDSHARING_EXPORT p_excel, string site) + { + List ErrorList = new List(); + + int count = db.TA_MoldSharing.Count(p => p.VendId == p_excel.供应商编码 && p.Site == site&&p.PartCode==p_excel.零件编码); + if (count <= 0) + { + ErrorList.Add(string.Format("供应商{0}零件编码{1}已存在分摊数据,不可修改分摊价格和数量!", p_excel.供应商编码, p_excel.零件编码)); + } + return ErrorList; + + + } + /// + /// 数据检验 + /// + /// + /// + /// + /// + public static List CheckExcelMode_MoldSharing(ScpEntities db, SCP_MOLDSHARING_EXPORT p_excel, string site) + { + List ErrorList = new List(); + if (!string.IsNullOrEmpty(p_excel.供应商编码)) + { + int count = db.TA_VENDER.Count(p => p.VendId == p_excel.供应商编码 && p.Site == site); + if (count <= 0) + { + ErrorList.Add(string.Format("供应商{0}不存在!", p_excel.供应商编码)); + } + } + else + { + ErrorList.Add(string.Format("供应商代码为空!")); + } + if (!string.IsNullOrEmpty(p_excel.零件编码)) + { + int count = db.TA_PART.Count(p => p.PartCode == p_excel.零件编码 && p.Site == site); + if (count <= 0) + { + ErrorList.Add(string.Format("零件编号{0}不存在!", p_excel.零件编码)); + } + } + else + { + ErrorList.Add(string.Format("零件号为空!")); + } + if ( + string.IsNullOrEmpty(p_excel.供应商编码) || + string.IsNullOrEmpty(p_excel.零件编码) || + string.IsNullOrEmpty(p_excel.价格) || string.IsNullOrEmpty(p_excel.分摊数量)) + { + ErrorList.Add(string.Format("供应商代码【{0}】零件编号【{1}】有填写为空!", p_excel.供应商编码, p_excel.零件编码)); + } + return ErrorList; + } + /// + /// 获取模具分摊价格(沈阳模具分摊) + /// + /// + /// + public static List GET_MoldSharing_LIST_SYJB(List p_list) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + if (p_list.Count > 0) + { + p_list.ForEach(p => + { + var _entity = db.TA_MoldSharing.Where(itm => itm.Qty > itm.Count && itm.PartCode == p.PartCode && itm.VendId == p.VendId).FirstOrDefault(); + if (_entity != null) + { + p.Price = decimal.Parse(_entity.Price.ToString()); + } + }); + } + } + return p_list; + } + /// + /// 获取模具分摊价格 + /// + /// + /// + public static List GET_MoldSharing_LIST(List p_list) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + if (p_list.Count > 0) + { + p_list.ForEach(p => + { + var _entity = db.TA_MoldSharing.Where(itm => itm.Qty > itm.Count && itm.PartCode == p.PartCode && itm.VendId == p.VendId).FirstOrDefault(); + if (_entity != null) + { + p.BlancePrice = decimal.Parse(_entity.Price.ToString()); + } + else + { + p.BlancePrice = 0; + } + }); + } + } + return p_list; + } + public static ResultObject Save_TA_MOLDSHARING_STATE (List p_list, string p_user, bool p_isdelete) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + if (p_isdelete == true) + { + var _ls = db.TA_MoldSharing.Where(p => p_list.Contains(p.UID)&& p.Count != 0).ToList(); + if (_ls.Count <= 0) + { + _ls.ForEach(p => + { + p.IsDeleted = true; + p.UpdateTime = DateTime.Now; + p.UpdateUser = p_user; + } + ); + db.TA_MoldSharing.AddOrUpdate(p => p.UID, _ls.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,已经开始计数不能删除!"; + } + } + if (string.IsNullOrEmpty(_ret.Message)) + { + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "Save_TA_MOLDSHARING_STATE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "Save_TA_MOLDSHARING_STATE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "Save_TA_MOLDSHARING_STATE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "Save_TA_MOLDSHARING_STATE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + + return _ret; + } + } +} diff --git a/北京北汽/SCP/Controller/SCP_PALLET_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_PALLET_CONTROLLER.cs new file mode 100644 index 0000000..a6e8f4b --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_PALLET_CONTROLLER.cs @@ -0,0 +1,598 @@ +using CK.SCP.Controller; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System; +using System.Collections.Generic; +using System.Data.Entity.Core; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ + public class SCP_PALLET_CONTROLLER + { + public static void Get_V_TB_PALLET_List(V_TB_PALLET p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_PALLET; + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.AsnBillNum)) + { + q = q.Where(p => p.AsnBillNum.Contains(p_entity.AsnBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.AskBillNum)) + { + q = q.Where(p => p.AskBillNum.Contains(p_entity.AskBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.ShipUser)) + { + q = q.Where(p => p.ShipUser.Contains(p_entity.ShipUser)); + } + if (!string.IsNullOrEmpty(p_entity.ReceiveUser)) + { + q = q.Where(p => p.ReceiveUser.Contains(p_entity.ReceiveUser)); + } + if (!string.IsNullOrEmpty(p_entity.ErpBillNum)) + { + q = q.Where(p => p.ErpBillNum.Contains(p_entity.ErpBillNum)); + } + if (p_entity.ModType != null) + { + q = q.Where(p => p.ModType == p_entity.ModType); + } + if (!string.IsNullOrEmpty(p_entity.Buyer)) + { + q = q.Where(p => p.Buyer.Contains(p_entity.Buyer)); + } + if (!string.IsNullOrEmpty(p_entity.BuyerPhone)) + { + q = q.Where(p => p.BuyerPhone.Contains(p_entity.BuyerPhone)); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + if (!string.IsNullOrEmpty(p_entity.ModType_DESC)) + { + q = q.Where(p => p.ModType_DESC.Contains(p_entity.ModType_DESC)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (!string.IsNullOrEmpty(p_entity.State_DESC)) + { + q = q.Where(p => p.State_DESC.Contains(p_entity.State_DESC)); + } + if (!string.IsNullOrEmpty(p_entity.PlateNumber)) + { + q = q.Where(p => p.PlateNumber.Contains(p_entity.PlateNumber)); + } + if (!string.IsNullOrEmpty(p_entity.Site_Desc)) + { + q = q.Where(p => p.Site_Desc.Contains(p_entity.Site_Desc)); + } + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + //if (!string.IsNullOrEmpty(p_entity.ReceivedPort)) + //{ + // q = q.Where(p => p.ReceivedPort.Contains(p_entity.ReceivedPort)); + //} + //if (!string.IsNullOrEmpty(p_entity.CreateUser)) + //{ + // q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + //} + //if (!string.IsNullOrEmpty(p_entity.UpdateUser)) + //{ + // q = q.Where(p => p.UpdateUser.Contains(p_entity.UpdateUser)); + //} + //if (!string.IsNullOrEmpty(p_entity.UpdateInfo)) + //{ + // q = q.Where(p => p.UpdateInfo.Contains(p_entity.UpdateInfo)); + //} + //if (p_entity.IsDeleted != false) + //{ + // q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + //} + //if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + //{ + // q = q.Where(p => p_entity.UserInAddress.Contains(p.)); + //} + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_PALLET_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_PALLET_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_PALLET_List", ex.ToString()); + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_V_TB_PALLET_List", e.Message); + throw e; + } + + } + /// + /// 获取托盘列表 + /// + /// + /// + public static void Get_TB_PALLETS_List(TB_PALLETS p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.TB_PALLETS; + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.AsnBillNum)) + { + q = q.Where(p => p.AsnBillNum.Contains(p_entity.AsnBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_TB_PALLETS_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_TB_PALLETS_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_TB_PALLETS_List", ex.ToString()); + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_INVOICE_CONTROLLER), "Get_TB_PALLETS_List", e.Message); + throw e; + } + + } + public ResultObject Save_V_TB_PALLET(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var itm in p_entitys) + { + db.TB_PALLET.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(V_TB_PALLET), "Save_V_TB_PALLET", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public ResultObject Del_V_TB_PALLET(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var itm in p_entitys) + { + db.TB_PALLET.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(V_TB_PALLET), "Del_V_TB_PALLET", e.Message); throw e; + } + return _ret; + } + + + + + + + public static void Get_V_TB_PALLET_DETAIL_List(V_TB_PALLET_DETAIL p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_PALLET_DETAIL; + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (p_entity.PoLine != 0) + { + q = q.Where(p => p.PoLine == p_entity.PoLine); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.PoUnit)) + { + q = q.Where(p => p.PoUnit.Contains(p_entity.PoUnit)); + } + if (!string.IsNullOrEmpty(p_entity.LocUnit)) + { + q = q.Where(p => p.LocUnit.Contains(p_entity.LocUnit)); + } + if (p_entity.Price != 0) + { + q = q.Where(p => p.Price == p_entity.Price); + } + if (!string.IsNullOrEmpty(p_entity.Currency)) + { + q = q.Where(p => p.Currency.Contains(p_entity.Currency)); + } + if (p_entity.PackQty != 0) + { + q = q.Where(p => p.PackQty == p_entity.PackQty); + } + if (p_entity.UnConv != 0) + { + q = q.Where(p => p.UnConv == p_entity.UnConv); + } + if (!string.IsNullOrEmpty(p_entity.DockCode)) + { + q = q.Where(p => p.DockCode.Contains(p_entity.DockCode)); + } + if (p_entity.State != null) + { + q = q.Where(p => p.State == p_entity.State); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.UpdateUser)) + { + q = q.Where(p => p.UpdateUser.Contains(p_entity.UpdateUser)); + } + if (!string.IsNullOrEmpty(p_entity.UpdateInfo)) + { + q = q.Where(p => p.UpdateInfo.Contains(p_entity.UpdateInfo)); + } + if (p_entity.IsDeleted != false) + { + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + } + if (!string.IsNullOrEmpty(p_entity.PartDesc1)) + { + q = q.Where(p => p.PartDesc1.Contains(p_entity.PartDesc1)); + } + if (!string.IsNullOrEmpty(p_entity.CurrencyDesc)) + { + q = q.Where(p => p.CurrencyDesc.Contains(p_entity.CurrencyDesc)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + if (!string.IsNullOrEmpty(p_entity.PartDesc2)) + { + q = q.Where(p => p.PartDesc2.Contains(p_entity.PartDesc2)); + } + if (!string.IsNullOrEmpty(p_entity.AsnBillNum)) + { + q = q.Where(p => p.AsnBillNum.Contains(p_entity.AsnBillNum)); + } + if (p_entity.Qty != 0) + { + q = q.Where(p => p.Qty == p_entity.Qty); + } + if (!string.IsNullOrEmpty(p_entity.VendBatch)) + { + q = q.Where(p => p.VendBatch.Contains(p_entity.VendBatch)); + } + if (!string.IsNullOrEmpty(p_entity.Batch)) + { + q = q.Where(p => p.Batch.Contains(p_entity.Batch)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (!string.IsNullOrEmpty(p_entity.AskBillNum)) + { + q = q.Where(p => p.AskBillNum.Contains(p_entity.AskBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.PalletNum)) + { + q = q.Where(p => p.PalletNum.Contains(p_entity.PalletNum)); + } + if (!string.IsNullOrEmpty(p_entity.ReceivedPort)) + { + q = q.Where(p => p.ReceivedPort.Contains(p_entity.ReceivedPort)); + } + if (!string.IsNullOrEmpty(p_entity.ReceivedPort_Desc)) + { + q = q.Where(p => p.ReceivedPort_Desc.Contains(p_entity.ReceivedPort_Desc)); + } + //if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + //{ + // q = q.Where(p => p_entity.UserInAddress.Contains(p.Address)); + //} + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(V_TB_PALLET_DETAIL), "Get_V_TB_PALLET_DETAIL_List", e.Message); + throw e; + } + } + + + public static ResultObject Save_TB_PALLET_STATE(List p_list, PalletState p_state) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + if (p_state == PalletState.Reject) + { + var _ls = db.TB_PALLET.Where(p => p_list.Contains(p.PalletNum)).ToList(); + + _ls.ForEach(p => + { + p.State = (int)AskState.Reject; + p.IsDeleted = true; + var _list = db.TB_PALLET_DETAIL.Where(itm => itm.PalletNum == p.PalletNum).ToList(); + _list.ForEach(itm => + { + itm.State = (int)PalletState.Reject; + itm.IsDeleted = true; + } + ); + db.TB_PALLET_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + } + ); + db.TB_PALLET.AddOrUpdate(p => p.PalletNum, _ls.ToArray()); + } + + + + if (string.IsNullOrEmpty(_ret.Message)) + { + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + } + + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PALLET_CONTROLLER), "Save_TB_PALLET_STATE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PALLET_CONTROLLER), "Save_TB_PALLET_STATE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PALLET_CONTROLLER), "Save_TB_PALLET_STATE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PALLET_CONTROLLER), "Save_TB_PALLET_STATE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + } + + +} diff --git a/北京北汽/SCP/Controller/SCP_PENING_ITEMS_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_PENING_ITEMS_CONTROLLER.cs new file mode 100644 index 0000000..7d47d6b --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_PENING_ITEMS_CONTROLLER.cs @@ -0,0 +1,298 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System.Data.Entity.Core; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Controller +{ + public class SCP_PENING_ITEMS_CONTROLLER + { + public static ResultObject> Get_TB_PENING_ITEMS_List(TB_PENING_ITEMS p_entity) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.TB_PENING_ITEMS; + if (!string.IsNullOrEmpty(p_entity.ITEM_NO)) + { + q = q.Where(p => p.ITEM_NO.Contains(p_entity.ITEM_NO)); + } + if (!string.IsNullOrEmpty(p_entity.ITEM_CONTENT)) + { + q = q.Where(p => p.ITEM_CONTENT.Contains(p_entity.ITEM_CONTENT)); + } + if (p_entity.ITEM_TYPE!=0) + { + q = q.Where(p => p.ITEM_TYPE==p_entity.ITEM_TYPE); + } + if (!string.IsNullOrEmpty(p_entity.SENDER)) + { + q = q.Where(p => p.SENDER.Contains(p_entity.SENDER)); + } + //if (p_entity.MESSAGE_STATE!=0) + //{ + q = q.Where(p => p.MESSAGE_STATE == p_entity.MESSAGE_STATE); + //} + + q = q.Where(p => p.ITEM_STATE==p_entity.ITEM_STATE); + + if (p_entity.UserInAddress!=null && p_entity.UserInAddress.Count>0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.ITEM_ADDRESS)); + } + + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count>0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VEND_ID)); + } + + if (!string.IsNullOrEmpty(p_entity.RENEWER)) + { + q = q.Where(p => p.RENEWER.Contains(p_entity.RENEWER)); + } + + + var _time = DateTime.Now.AddMonths(-1); + q = q.Where(p => p.SENDING_TIME>_time ); + + + if (p_entity.UserInRoles != null && p_entity.UserInRoles.Count > 0) + { + q = q.Where(p => p_entity.UserInRoles.Contains(p.ROLE_NAME)); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.ToList(); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PENING_ITEMS_CONTROLLER), "Get_TB_PENING_ITEMS_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PENING_ITEMS_CONTROLLER), "Get_TB_PENING_ITEMS_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PENING_ITEMS_CONTROLLER), "Get_TB_PENING_ITEMS_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PENING_ITEMS_CONTROLLER), "Get_TB_PENING_ITEMS_List", e.Message); + throw e; + } + return _ret; + } + + + public static ResultObject Save_TB_PENING_ITEMS(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + db.TB_PENING_ITEMS.AddOrUpdate(p=>p.GUID,p_entitys.ToArray()); + + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PENING_ITEMS_CONTROLLER), "Save_TB_PENING_ITEMS", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PENING_ITEMS_CONTROLLER), "Save_TB_PENING_ITEMS", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PENING_ITEMS_CONTROLLER), "Save_TB_PENING_ITEMS", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PENING_ITEMS_CONTROLLER), "Save_TB_PENING_ITEMS", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public static ResultObject Del_TB_PENING_ITEMS(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + foreach (var itm in p_entitys) + { + db.TB_PENING_ITEMS.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PENING_ITEMS_CONTROLLER), "Del_TB_PENING_ITEMS", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PENING_ITEMS_CONTROLLER), "Del_TB_PENING_ITEMS", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PENING_ITEMS_CONTROLLER), "Del_TB_PENING_ITEMS", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PENING_ITEMS_CONTROLLER), "Del_TB_PENING_ITEMS", e.Message); throw e; + } + return _ret; + } + + } +} diff --git a/北京北汽/SCP/Controller/SCP_PLAN_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_PLAN_CONTROLLER.cs new file mode 100644 index 0000000..ce4a2b0 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_PLAN_CONTROLLER.cs @@ -0,0 +1,1924 @@ +using CK.SCP.Models; +using CK.SCP.Models.AppBoxEntity; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.Entity.Core; +using System.Data.Entity.Migrations; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ + public class SCP_PLAN_CONTROLLER + { + public static void Get_V_TB_PO_PLAN_EXTEND_List(V_TB_PO_PLAN_EXTEND p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_PO_PLAN_EXTEND; + if (!string.IsNullOrEmpty(p_entity.Domain)) + { + q = q.Where(p => p.Domain.Contains(p_entity.Domain)); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (!string.IsNullOrEmpty(p_entity.AskBillNum)) + { + q = q.Where(p => p.AskBillNum.Contains(p_entity.AskBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.Version)) + { + q = q.Where(p => p.Version.Contains(p_entity.Version)); + } + if (!string.IsNullOrEmpty(p_entity.PartDesc)) + { + q = q.Where(p => p.PartDesc.Contains(p_entity.PartDesc)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (p_entity.EndTime != null) + { + q = q.Where(p => p.EndTime == p_entity.EndTime.Value); + } + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Domain)); + } + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(V_TB_PO_PLAN_EXTEND), "Get_V_TB_PO_PLAN_EXTEND_List", e.Message); + throw e; + } + } + + //public static void Get_V_TB_PO_PLAN_List(V_TB_PO_PLAN p_entity, Action>> p_action) + //{ + // ResultObject> _ret = new ResultObject>(); + // try + // { + // using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + // { + // IQueryable q = db.V_TB_PO_PLAN; + // if (!string.IsNullOrEmpty(p_entity.Domain)) + // { + // q = q.Where(p => p.Domain.Contains(p_entity.Domain)); + // } + // if (!string.IsNullOrEmpty(p_entity.PartCode)) + // { + // q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + // } + // if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + // { + // q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + // } + // if (!string.IsNullOrEmpty(p_entity.Site)) + // { + // q = q.Where(p => p.Site.Contains(p_entity.Site)); + // } + // if (!string.IsNullOrEmpty(p_entity.AskBillNum)) + // { + // q = q.Where(p => p.AskBillNum.Contains(p_entity.AskBillNum)); + // } + // if (!string.IsNullOrEmpty(p_entity.Version)) + // { + // q = q.Where(p => p.Version.Contains(p_entity.Version)); + // } + // if (!string.IsNullOrEmpty(p_entity.PartDesc)) + // { + // q = q.Where(p => p.PartDesc.Contains(p_entity.PartDesc)); + // } + // if (!string.IsNullOrEmpty(p_entity.VendId)) + // { + // q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + // } + // if (p_entity.EndTime != null) + // { + // q = q.Where(p => p.EndTime == p_entity.EndTime.Value); + // } + + // if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + // { + // q = q.Where(p => p_entity.UserInAddress.Contains(p.Domain)); + // } + // if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + // { + // q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + // } + // _ret.State = ReturnStatus.Succeed; + // _ret.Result = q; + // p_action(_ret); + // } + // } + // catch (Exception e) + // { + // _ret.State = ReturnStatus.Failed; + // _ret.ErrorList.Add(e); + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(V_TB_PO_PLAN), "Get_V_TB_PO_PLAN_List", e.Message); + // throw e; + // } + //} + + + //public static DataTable Get_TB_PLAN_REPORT(V_TB_PO_PLAN p_plan) + //{ + // DataTable dt = new DataTable(); + // DataTable dt1 = new DataTable(); + // DataTable dt2 = new DataTable(); + // DataTable dt3 = new DataTable(); + // string _sqlString = "SELECT * FROM ( SELECT partcode,endtime,planqty,partdesc,pounit,domain,pobillnum,poline FROM V_TB_PO_PLAN where {0}\n " + + // ") A\n" + + // " pivot ( sum(planQty) for a.endtime in (\n" + + // " {1}\n" + + // ")\n" + + // ") as ourpivot "; + + // string _sql = "SELECT DISTINCT(ENDTIME) FROM V_TB_PO_PLAN where {0} ORDER BY ENDTIME"; + + // string _askBillSql = "SELECT * FROM V_TB_ASK_DETAIL where VENDID = '{0}' AND EndTime IN ({1}) AND AskBillNum like 'E%' "; + + // string _asn_recive = "SELECT A.PartCode, A.PoBillNum, A.PoLine, SUM(A.Qty) AS AsnQty, SUM(ISNULL(B.Qty, 0)) AS ReciveQty,\n" + + // " SUM(ISNULL(C.AskQty, 0)) AS AskQty\n" + + // "FROM V_TB_ASN_DETAIL AS A LEFT OUTER JOIN\n" + + // " V_TB_RECEIVE_DETAIL AS B ON A.AsnBillNum = B.AsnBillNum AND A.PartCode = B.PartCode AND\n" + + // " A.PoBillNum = B.PoBillNum AND A.PoLine = B.PoLine INNER JOIN\n" + + // " TB_ASK_DETAIL AS C ON A.AskBillNum = C.AskBillNum AND A.PartCode = C.PartCode AND\n" + + // " A.PoBillNum = C.PoBillNum AND A.PoLine = C.PoLine\n" + + // "WHERE (A.AskBillNum LIKE 'E%') AND (A.State > 0) and {0}\n" + + // "GROUP BY A.PartCode, A.PoBillNum, A.PoLine"; + // var dbSetting = GlobalConfig.ScpDatabase; + // try + // { + // var strConn = EntitiesFactory.GetEfConnectionString(dbSetting); + // SqlConnection conn = new System.Data.SqlClient.SqlConnection(); + // conn.ConnectionString = strConn; + // if (conn.State != ConnectionState.Open) + // { + // conn.Open(); + // } + // #region 结束时间范围 + // SqlCommand cmd = new SqlCommand(); + // cmd.Connection = conn; + // string where1 = " 1=1 "; + // if (!string.IsNullOrEmpty(p_plan.PartCode)) + // { + // where1 += string.Format(" and partcode='{0}' ", p_plan.PartCode); + // } + // if (!string.IsNullOrEmpty(p_plan.VendId)) + // { + // where1 += string.Format(" and VendId='{0}' ", p_plan.VendId); + // } + // if (!string.IsNullOrEmpty(p_plan.PoBillNum)) + // { + // where1 += string.Format(" and PoBillNum='{0}' ", p_plan.PoBillNum); + // } + // if (p_plan.EndTime_Begin != null) + // { + // where1 += string.Format(" and EndTime>='{0}'", p_plan.EndTime_Begin.Value.ToString("yyyy-MM-dd")); + // } + // else + // { + // where1 += string.Format(" and EndTime>='{0}'", DateTime.Now.ToString("yyyy-MM-dd")); + // } + // if (p_plan.EndTime_End != null) + // { + // where1 += string.Format(" and EndTime<='{0}'", p_plan.EndTime_End.Value.ToString("yyyy-MM-dd")); + // } + // else + // { + // where1 += string.Format(" and EndTime<='{0}'", DateTime.Now.AddMonths(1).ToString("yyyy-MM-dd")); + // } + // cmd.CommandText = string.Format(_sql, where1); + // SqlDataAdapter adapter = new SqlDataAdapter(cmd); + // adapter.Fill(dt); + + // #endregion + // List _ls = new List(); + // List _ls1 = new List(); + // foreach (DataRow row in dt.Rows) + // { + // _ls.Add(string.Format("[{0}]", row["EndTime"].ToString())); + // _ls1.Add(string.Format("'{0}'", row["EndTime"].ToString())); + // } + // if (_ls.Count > 0) + // { + // #region 计划行转列 + // SqlCommand cmd1 = new SqlCommand(); + // cmd1.Connection = conn; + // string where = "1=1 "; + // if (!string.IsNullOrEmpty(p_plan.PartCode)) + // { + // where += string.Format(" and partcode='{0}' ", p_plan.PartCode); + // } + // where += string.Format(" and VendId='{0}' ", p_plan.VendId); + // if (!string.IsNullOrEmpty(p_plan.PoBillNum)) + // { + // where += string.Format(" and PoBillNum='{0}' ", p_plan.PoBillNum); + // } + // cmd1.CommandText = string.Format(_sqlString, where, string.Join(",", _ls.ToArray())); + // var adapter1 = new SqlDataAdapter(cmd1); + // adapter1.Fill(dt1); + // #endregion + + // #region 此范围内的看板号 + // SqlCommand cmd2 = new SqlCommand(); + // cmd2.Connection = conn; + // cmd2.CommandText = string.Format(_askBillSql, p_plan.VendId, string.Join(",", _ls1.ToArray())); + // SqlDataAdapter adapter2 = new SqlDataAdapter(cmd2); + // adapter2.Fill(dt2); + // #endregion + + // List _askList = new List(); + // foreach (DataRow row in dt2.Rows) + // { + // _askList.Add(string.Format("'{0}'", row["AskBillNum"].ToString())); + // } + // if (_askList.Count > 0) + // { + // SqlCommand cmd3 = new SqlCommand(); + // cmd3.Connection = conn; + // cmd3.CommandText = string.Format(_asn_recive, string.Format(" A.askBillNum in ({0}) ", string.Join(",", _askList.ToArray()))); + // SqlDataAdapter adapter3 = new SqlDataAdapter(cmd3); + // adapter3.Fill(dt3); + // } + // var column0 = dt1.Columns.Add("要货数量"); + // var column1 = dt1.Columns.Add("收货数量"); + // var column2 = dt1.Columns.Add("发货数量"); + // var column3 = dt1.Columns.Add("未发数量"); + // var column4 = dt1.Columns.Add("未收数量"); + // foreach (DataRow dr in dt1.Rows) + // { + // foreach (DataRow row in dt3.Rows) + // { + // if ( + // dr["PartCode"].ToString() == row["PartCode"].ToString() + // && dr["PoBillNum"].ToString() == row["PoBillNum"].ToString() + // && dr["PoLine"].ToString() == row["PoLine"].ToString()) + // { + // dr["要货数量"] = row["ReciveQty"].ToString(); + // dr["收货数量"] = row["ReciveQty"].ToString(); + // dr["发货数量"] = row["AsnQty"].ToString(); + // dr["未收数量"] = decimal.Parse(row["AsnQty"].ToString()) - decimal.Parse(row["ReciveQty"].ToString()); + // dr["未发数量"] = decimal.Parse(row["AskQty"].ToString()) - decimal.Parse(row["AsnQty"].ToString()); + // } + // } + // } + // foreach (DataColumn column in dt1.Columns) + // { + // try + // { + // var _dt1 = DateTime.Parse(column.ColumnName); + // var _curDate = _dt1.ToString("yyyy-MM-dd"); + // column.ColumnName = _curDate + "(预测)";//要货预测头 + + // foreach (DataRow row in dt2.Rows) + // { + // var _cur = DateTime.Parse(row["EndTime"].ToString()).ToString("yyyy-MM-dd");//看板时间 + // StringBuilder _buf = new StringBuilder(); + // if (_curDate == _cur) + // { + // var _ask = row["AskBillNum"].ToString(); + // column.ColumnName = _cur + "(" + _ask + ")"; + // switch (int.Parse(row["state"].ToString())) + // { + // case (int)AskState.New: + // column.ColumnName = _cur + "(" + _ask + ")" + "(计划)"; + // break; + // case (int)AskState.Ship: + // column.ColumnName = _cur + "(" + _ask + ")" + "(已发货)"; + // break; + // case (int)AskState.Confirm: + // column.ColumnName = _cur + "(" + _ask + ")" + "(已确认)"; + // break; + // case (int)AskState.Release: + // column.ColumnName = _cur + "(" + _ask + ")" + "(已发布)"; + // break; + // case (int)AskState.Receive: + // column.ColumnName = _cur + "(" + _ask + ")" + "(已收货)"; + // break; + // } + // } + // } + // } + // catch + // { + // continue; + // } + // } + // dt1.Columns["PartCode"].ColumnName = "零件编码"; + // dt1.Columns["PartDesc"].ColumnName = "零件描述"; + // dt1.Columns["PoUnit"].ColumnName = "单位"; + // dt1.Columns["PoBillNum"].ColumnName = "订单编号"; + // dt1.Columns["PoLine"].ColumnName = "行号"; + // dt1.Columns["Domain"].ColumnName = "域"; + // } + // conn.Close(); + // } + // catch (SqlException ex) + // { + // throw new Exception($"系统无法连接到数据库:{dbSetting},请检查配置的服务器,数据库,用户名和密码等信息是否正确。{Environment.NewLine}{ex}"); + // } + // return dt1; + //} + + + public static DataTable Get_TB_PLAN_REPORT_EXTEND(V_TB_PO_PLAN_EXTEND p_plan, bool IsOutput) + { + DataTable dt = new DataTable(); + DataTable dt1 = new DataTable(); + DataTable dt2 = new DataTable(); + DataTable dt3 = new DataTable(); + + + + string _sqlString = "SELECT a.partcode,a.PartDesc1+a.PartDesc2 as PartDesc,a.pounit,a.Site as domain,A.subsite as site,a.pobillnum,a.poline,a.Vendid , {0} FROM V_TB_PO_DETAIL A LEFT JOIN\n" + + "(\n" + + "SELECT * FROM ( SELECT partcode,endtime,planqty,partdesc,pounit,domain,site,pobillnum,poline,Vendid FROM V_TB_PO_PLAN_EXTEND where {1}\n" + + " ) A\n" + + " pivot ( sum(planQty) for a.endtime in ({0})\n" + + ") as ourpivot) B ON A.PoBillNum=B.PoBillNum AND A.PoLine=B.PoLine AND A.PartCode=B.PartCode and a.Site=b.Domain WHERE {2} ORDER BY A.PoLine"; + + + /*计划时间长度*/ + + + + + string _sql = "SELECT convert(varchar(10),EndTime ,23) EndTime FROM (\n" + + "SELECT DISTINCT(EndTime) EndTime FROM V_TB_PO_PLAN_EXTEND where {0}) A ORDER BY ENDTIME"; + + //string _sql = "SELECT convert(varchar(10),DISTINCT(ENDTIME) ,23) FROM V_TB_PO_PLAN_EXTEND where {0} ORDER BY ENDTIME"; + /*导出预测导入模板*/ + if (IsOutput == true) + { + _sql = "select convert(varchar(10),DATEADD(day,number,GETDATE()) ,23) endtime\n" + + "from master.dbo.spt_values\n" + + "where type='p'\n" + + "AND number<=DATEDIFF(day,GETDATE(),DATEADD(DAY,-1,DATEADD(MM,DATEDIFF(MM,0,GETDATE())+6,0)))"; + } + /*查询结束的看遍内容*/ + string _askBillSql = "SELECT * FROM V_TB_ASK_DETAIL where PoBillNum='{0}' and EndTime IN ({1}) AND AskBillNum like 'U%' and State>-1 "; + /*要货收发货数量统计*/ + //string _asn_recive = "SELECT A.PartCode, A.PoBillNum, A.PoLine, SUM(A.Qty) AS AsnQty, SUM(ISNULL(B.Qty, 0)) AS ReciveQty,\n" + + //" SUM(ISNULL(C.AskQty, 0)) AS AskQty\n" + + //"FROM V_TB_ASN_DETAIL AS A LEFT OUTER JOIN\n" + + //" V_TB_RECEIVE_DETAIL AS B ON A.AsnBillNum = B.AsnBillNum AND A.PartCode = B.PartCode AND\n" + + //" A.PoBillNum = B.PoBillNum AND A.PoLine = B.PoLine INNER JOIN\n" + + //" TB_ASK_DETAIL AS C ON A.AskBillNum = C.AskBillNum AND A.PartCode = C.PartCode AND\n" + + //" A.PoBillNum = C.PoBillNum AND A.PoLine = C.PoLine\n" + + //"WHERE (A.AskBillNum LIKE 'U%') AND (A.State > 0) and {0}\n" + + //"GROUP BY A.PartCode, A.PoBillNum, A.PoLine"; + + + + + string _asn_recive = "SELECT C.PartCode, C.PoBillNum, C.PoLine, SUM(ISNULL(A.Qty, 0)) AS AsnQty, SUM(ISNULL(B.qty, 0)) AS ReciveQty,\n" + + " SUM(ISNULL(C.AskQty, 0)) AS AskQty\n" + + "FROM TB_ASK_DETAIL AS C LEFT OUTER JOIN\n" + + " V_TB_ASN_DETAIL AS A ON A.AskBillNum = C.AskBillNum AND A.PartCode = C.PartCode AND\n" + + " A.PoBillNum = C.PoBillNum AND A.PoLine = C.PoLine AND A.STATE>-1 LEFT OUTER JOIN\n" + + " V_TB_RECEIVE_DETAIL AS B ON A.AsnBillNum = B.AsnBillNum AND A.PartCode = B.PartCode AND\n" + + " A.PoBillNum = B.PoBillNum AND A.PoLine = B.PoLine\n" + + "WHERE (C.AskBillNum LIKE 'U%') AND (C.State >= 0) AND (C.AskBillNum IN ({0}))\n" + + "GROUP BY C.PartCode, C.PoBillNum, C.PoLine"; + + + /*初始化预测模板填写*/ + string _posql = "SELECT * FROM ( SELECT partcode, convert(varchar(10),EndTime ,23) endtime,0 as planqty, isnull(PartDesc1,'') +isnull(PartDesc2,'') as partdesc,pounit,Site as domain,pobillnum,poline,vendid FROM V_TB_PO_DETAIL where {0}\n" + + " ) A\n" + + " pivot ( sum(planQty) for a.endtime in (\n" + + "{1}\n" + + " )\n" + + " ) as ourpivot"; + + var dbSetting = GlobalConfig.ScpDatabase; + SqlConnection conn = new System.Data.SqlClient.SqlConnection(); + try + { + var strConn = EntitiesFactory.GetEfConnectionString(dbSetting); + + conn.ConnectionString = strConn; + if (conn.State != ConnectionState.Open) + { + conn.Open(); + } + #region 结束时间范围 + SqlCommand cmd = new SqlCommand(); + cmd.Connection = conn; + string where1 = " 1=1 "; + if (!string.IsNullOrEmpty(p_plan.PartCode)) + { + where1 += string.Format(" and partcode='{0}' ", p_plan.PartCode); + } + if (!string.IsNullOrEmpty(p_plan.VendId)) + { + where1 += string.Format(" and VendId='{0}' ", p_plan.VendId); + } + if (!string.IsNullOrEmpty(p_plan.PoBillNum)) + { + where1 += string.Format(" and PoBillNum='{0}' ", p_plan.PoBillNum); + } + if (p_plan.EndTime_Begin != null) + { + where1 += string.Format(" and EndTime>='{0}'", p_plan.EndTime_Begin.Value.ToString("yyyy-MM-dd")); + } + else + { + where1 += string.Format(" and EndTime>='{0}'", DateTime.Now.ToString("yyyy-MM-dd")); + } + if (p_plan.EndTime_End != null) + { + where1 += string.Format(" and EndTime<='{0}'", p_plan.EndTime_End.Value.ToString("yyyy-MM-dd")); + } + else + { + where1 += string.Format(" and EndTime<='{0}'", DateTime.Now.AddMonths(6).ToString("yyyy-MM-dd")); + } + cmd.CommandText = string.Format(_sql, where1); + SqlDataAdapter adapter = new SqlDataAdapter(cmd); + adapter.Fill(dt); + + + #endregion + List _ls = new List(); + List _ls1 = new List(); + foreach (DataRow row in dt.Rows) + { + if (IsOutput == true) + { + var _date = DateTime.Parse(row["EndTime"].ToString());//去掉周六周日 + if ((int)_date.DayOfWeek != 0 || (int)_date.DayOfWeek != 6) + { + _ls.Add(string.Format("[{0}]", row["EndTime"].ToString())); + } + _ls1.Add(string.Format("'{0}'", row["EndTime"].ToString())); + } + else + { + _ls.Add(string.Format("[{0}]", row["EndTime"].ToString())); + _ls1.Add(string.Format("'{0}'", row["EndTime"].ToString())); + } + } + if (_ls.Count > 0) + { + #region 计划行转列 + SqlCommand cmd1 = new SqlCommand(); + cmd1.Connection = conn; + string Bwhere = "1=1 "; + string Awhere = "1=1"; + + if (!string.IsNullOrEmpty(p_plan.PartCode)) + { + Bwhere += string.Format(" and PartCode='{0}' ", p_plan.PartCode); + Awhere += string.Format(" and A.partcode='{0}' ", p_plan.PartCode); + } + if (!string.IsNullOrEmpty(p_plan.VendId)) + { + Bwhere += string.Format(" and VendId='{0}' ", p_plan.VendId); + Awhere += string.Format(" and A.VendId='{0}' ", p_plan.VendId); + } + + if (!string.IsNullOrEmpty(p_plan.PoBillNum)) + { + Bwhere += string.Format(" and PoBillNum='{0}' ", p_plan.PoBillNum); + Awhere += string.Format(" and A.PoBillNum='{0}' ", p_plan.PoBillNum); + } + cmd1.CommandText = string.Format(_sqlString, string.Join(",", _ls.ToArray()), Bwhere, Awhere); + var adapter1 = new SqlDataAdapter(cmd1); + adapter1.Fill(dt1); + #endregion + if (dt1.Rows.Count == 0) + { + + #region 是否使用订单生成模板 + DataTable poTable = new DataTable(); + + SqlCommand pocmd = new SqlCommand(); + pocmd.Connection = conn; + string poWhere = "1=1 "; + //poWhere += string.Format(" and VendId='{0}' ", p_plan.VendId); + if (!string.IsNullOrEmpty(p_plan.PoBillNum)) + { + poWhere += string.Format(" and PoBillNum='{0}' ", p_plan.PoBillNum); + } + pocmd.CommandText = string.Format(_posql, poWhere, string.Join(",", _ls.ToArray())); + var poAdapter = new SqlDataAdapter(pocmd); + poAdapter.Fill(poTable); + dt1 = poTable; + foreach (DataColumn itm in dt1.Columns) + { + itm.DataType = System.Type.GetType("System.String"); + } + + DataColumn _column = new DataColumn("计划天数"); + + dt1.Columns.Add(_column); + DataColumn _column1 = new DataColumn("版本号"); + + dt1.Columns.Add(_column1); + + foreach (DataRow row in dt1.Rows) + { + row["版本号"] = DateTime.Now.ToString("yyyy-MM-dd").Replace("-", string.Empty).Replace("/", string.Empty) + "0001"; + } + + #endregion + } + else + { + + #region 此范围内的看板号 + SqlCommand cmd2 = new SqlCommand(); + cmd2.Connection = conn; + cmd2.CommandText = string.Format(_askBillSql, p_plan.PoBillNum, string.Join(",", _ls1.ToArray())); + SqlDataAdapter adapter2 = new SqlDataAdapter(cmd2); + adapter2.Fill(dt2); + #endregion + List _askList = new List(); + foreach (DataRow row in dt2.Rows) + { + _askList.Add(string.Format("'{0}'", row["AskBillNum"].ToString())); + } + if (_askList.Count > 0) + { + SqlCommand cmd3 = new SqlCommand(); + cmd3.Connection = conn; + cmd3.CommandText = string.Format(_asn_recive, string.Join(",", _askList.ToArray())); + SqlDataAdapter adapter3 = new SqlDataAdapter(cmd3); + adapter3.Fill(dt3); + } + + + var column1 = dt1.Columns.Add("收货数量"); + + var column2 = dt1.Columns.Add("发货数量"); + + var column3 = dt1.Columns.Add("要货数量"); + + var column5 = dt1.Columns.Add("版本号"); + + var column6 = dt1.Columns.Add("计划天数"); + + string _maxCode = string.Empty; + + if (IsOutput == true) + { + DataTable dt5 = new DataTable(); + string _max = string.Format("SELECT MAX(Version) as max FROM [TB_PO_PLAN_EXTEND] where PoBillNum = '{0}' and site='{1}'", p_plan.PoBillNum, p_plan.Domain); + SqlCommand cmd5 = new SqlCommand(); + cmd5.Connection = conn; + cmd5.CommandText = _max; + var adapter5 = new SqlDataAdapter(cmd5); + adapter5.Fill(dt5); + if (dt5.Rows[0]["max"] != null && dt5.Rows[0]["max"].ToString() != string.Empty && string.IsNullOrEmpty(Regex.Replace(dt5.Rows[0]["max"].ToString(), @"\d{11,12}", string.Empty))) + { + + if (dt5.Rows[0]["max"].ToString().Length == 11) + { + string _oldDate = dt5.Rows[0]["max"].ToString().Substring(0, 7); + string _newDate = DateTime.Now.ToString("yyyy-MM-dd").Replace("/", string.Empty); + if (long.Parse(_oldDate) == long.Parse(_newDate)) + { + _maxCode = (long.Parse(dt5.Rows[0]["max"].ToString()) + 1).ToString(); + } + if (long.Parse(_newDate) > long.Parse(_oldDate)) + { + _maxCode = _newDate + "0001"; + } + } + + if (dt5.Rows[0]["max"].ToString().Length == 12) + { + string _oldDate = dt5.Rows[0]["max"].ToString().Substring(0, 8); + string _newDate = DateTime.Now.ToString("yyyy-MM-dd").Replace("-", string.Empty); + if (long.Parse(_oldDate) == long.Parse(_newDate)) + { + _maxCode = (long.Parse(dt5.Rows[0]["max"].ToString()) + 1).ToString(); + } + if (long.Parse(_newDate) > long.Parse(_oldDate)) + { + _maxCode = _newDate + "0001"; + } + } + + } + else + { + string _newDate = DateTime.Now.ToString("yyyy-MM-dd").Replace("-", string.Empty).Replace("/", string.Empty); + _maxCode = _newDate + "0001"; + } + } + foreach (DataRow dr in dt1.Rows) + { + foreach (DataRow row in dt3.Rows) + { + if ( + dr["PartCode"].ToString() == row["PartCode"].ToString() + && dr["PoBillNum"].ToString() == row["PoBillNum"].ToString() + && dr["PoLine"].ToString() == row["PoLine"].ToString()) + { + dr["收货数量"] = row["ReciveQty"].ToString(); + dr["发货数量"] = row["AsnQty"].ToString(); + dr["要货数量"] = row["AskQty"].ToString(); + //dr["未收数量"] = decimal.Parse(row["AsnQty"].ToString()) - decimal.Parse(row["ReciveQty"].ToString()); + //dr["未发数量"] = decimal.Parse(row["AskQty"].ToString()) - decimal.Parse(row["AsnQty"].ToString()); + } + } + } + if (IsOutput == true) + { + foreach (DataRow row in dt1.Rows) + { + row["版本号"] = _maxCode; + } + } + foreach (DataColumn column in dt1.Columns) + { + try + { + var _dt1 = DateTime.Parse(column.ColumnName); + var _curDate = _dt1.ToString("yyyy-MM-dd"); + column.ColumnName = _curDate + "(预测)"; + foreach (DataRow row in dt2.Rows) + { + var _cur = DateTime.Parse(row["EndTime"].ToString()).ToString("yyyy-MM-dd"); + StringBuilder _buf = new StringBuilder(); + if (_curDate == _cur) + { + var _ask = row["AskBillNum"].ToString(); + column.ColumnName = _cur + "(" + _ask + ")"; + switch (int.Parse(row["state"].ToString())) + { + case (int)AskState.New: + column.ColumnName = _cur + "(" + _ask + ")" + "(计划)"; + break; + case (int)AskState.Ship: + column.ColumnName = _cur + "(" + _ask + ")" + "(已发货)"; + break; + case (int)AskState.Confirm: + column.ColumnName = _cur + "(" + _ask + ")" + "(已确认)"; + break; + case (int)AskState.Release: + column.ColumnName = _cur + "(" + _ask + ")" + "(已发布)"; + break; + case (int)AskState.Receive: + column.ColumnName = _cur + "(" + _ask + ")" + "(已收货)"; + break; + } + } + } + } + catch + { + continue; + } + } + } + dt1.Columns["VendID"].ColumnName = "供应商编码"; + dt1.Columns["PartCode"].ColumnName = "零件编码"; + dt1.Columns["PartDesc"].ColumnName = "零件描述"; + dt1.Columns["PoUnit"].ColumnName = "单位"; + dt1.Columns["PoBillNum"].ColumnName = "订单编号"; + dt1.Columns["PoLine"].ColumnName = "行号"; + dt1.Columns["Site"].ColumnName = "地点"; + dt1.Columns["Domain"].ColumnName = "域"; + if (IsOutput == true) + { + dt1.Columns["版本号"].SetOrdinal(0); + dt1.Columns["计划天数"].SetOrdinal(1); + } + } + conn.Close(); + } + catch (Exception ex) + { + conn.Close(); + throw new Exception($"系统无法连接到数据库:{dbSetting},请检查配置的服务器,数据库,用户名和密码等信息是否正确。{Environment.NewLine}{ex}"); + } + return dt1; + } + + + public static DataTable EXPORT_TB_PO_PLAN_EXTEND(V_TB_PO_PLAN_EXTEND p_plan) + { + + V_TB_PO_PLAN_EXTEND _plan = new V_TB_PO_PLAN_EXTEND(); + _plan.VendId = p_plan.VendId; + _plan.PoBillNum = p_plan.PoBillNum; + _plan.Domain = p_plan.Domain; + + DataTable tb = Get_TB_PLAN_REPORT_EXTEND(_plan, true); + + return tb; + } + + + + + public class TB_PO_PLAN_EXTEND_TEMP + { + public string AskBillNum { set; get; } + public string AsnBillNum { set; get; } + } + public static ResultObject IMPORT_TB_PO_PLAN_EXTEND(DataTable p_table, User p_user, bool IsAutoRelse) + { + string _sqlString = "SELECT askbillNum FROM TB_ASK where TB_ASK.AskBillNum LIKE 'U%' and TB_ASK.ENDTIME in ({0}) and TB_ASK.pobillnum='{1}' and TB_ASK.Site='{2}'"; + + string _asnSqlString = "select CONVERT(varchar(100), TB_ASK.EndTime, 23) as EndTime from TB_ASK inner join tb_asn on TB_ASK.AskBillNum=TB_ASN.AskBillNum \n" + + "where tb_asn.State>-1 and TB_ASK.AskBillNum like 'U%' AND TB_ASK.ENDTIME in ({0}) and TB_ASK.pobillnum='{1}' and tb_ask.site='{2}'"; + string _delPlan = "delete from TB_PO_PLAN_EXTEND where pobillnum ='{0}' and domain='{1}' and endtime in ({2}) "; + string _delString = "delete from tb_ask where askbillnum in ({0}) "; + string _delDetailString = "delete from tb_ask_detail where askbillnum in ({0}) "; + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + List _versionList = new List(); + List _ls = new List(); + List _partcodeList = new List(); + List _vendcodeList = new List(); + List _poList = new List(); + List _siteList = new List(); + List _dayList = new List(); + List _endTimelist = new List(); + List _askbillList = new List(); + #region 列校验 + List _checkDay = new List(); + + string[] _checkColumnAry = new string[] { + "版本号", + "计划天数", + "零件编码", + "订单编号", + "行号", + "供应商编码", + "域", + "单位" + }; + int _checkNum = 0; + + foreach (DataColumn column in p_table.Columns) + { + if (!column.ColumnName.Contains("版本号") && + !column.ColumnName.Contains("计划天数") && + !column.ColumnName.Contains("零件编码") && + !column.ColumnName.Contains("零件描述") && + !column.ColumnName.Contains("订单编号") && + !column.ColumnName.Contains("行号") && + !column.ColumnName.Contains("供应商编码") && + !column.ColumnName.Contains("域") && + !column.ColumnName.Contains("收货数量") && + !column.ColumnName.Contains("要货数量") && + !column.ColumnName.Contains("发货数量") && + !column.ColumnName.Contains("单位") && !column.ColumnName.Contains("地点") + ) + { + var _reg1 = Regex.Match(column.ColumnName, @"\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}\([a-zA-Z]{1}\d{10}\)\([\u4e00-\u9fa5]+\)"); + var _reg2 = Regex.Match(column.ColumnName, @"\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}\([\u4e00-\u9fa5]+\)"); + var _reg3 = Regex.Match(column.ColumnName, @"\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}"); + if (!string.IsNullOrEmpty(_reg3.Value) && !_endTimelist.Contains(_reg3.Value)) + { + _endTimelist.Add(string.Format("'{0}'", DateTime.Parse(_reg3.Value).ToString("yyyy-MM-dd"))); + } + else + { + _ret.MessageList.Add(_reg3.Value + "交货日期有重复日期!"); + } + if (string.IsNullOrEmpty(_reg1.Value) && string.IsNullOrEmpty(_reg2.Value)) + { + _ret.MessageList.Add(string.Format("{0}列格式不对", column.ColumnName)); + } + } + else + { + foreach (DataRow dr in p_table.Rows)//导入计划EXCEL行转列 + { + if (column.ColumnName == "订单编号") + { + if (!_poList.Contains(dr["订单编号"].ToString().Trim())) + { + _poList.Add(dr["订单编号"].ToString().Trim()); + } + } + if (column.ColumnName == "版本号") + { + if (!_versionList.Contains(dr["版本号"].ToString().Trim())) + { + _versionList.Add(dr["版本号"].ToString().Trim()); + } + } + if (column.ColumnName == "零件编码") + { + if (!_partcodeList.Contains(dr["零件编码"].ToString().Trim())) + { + _partcodeList.Add(dr["零件编码"].ToString().Trim()); + } + } + if (column.ColumnName == "供应商编码") + { + if (!_vendcodeList.Contains(dr["供应商编码"].ToString().Trim())) + { + _vendcodeList.Add(dr["供应商编码"].ToString().Trim()); + } + } + if (column.ColumnName == "域") + { + if (!_siteList.Contains(dr["域"].ToString().Trim())) + { + _siteList.Add(dr["域"].ToString().Trim()); + } + } + if (column.ColumnName == "计划天数") + { + if (dr["计划天数"] != null) + { + _dayList.Add(dr["计划天数"].ToString().Trim()); + } + } + } + if (_checkColumnAry.Contains(column.ColumnName.Trim())) + { + _checkNum++; + } + } + } + + string _pobillNum = p_table.Rows[0]["订单编号"].ToString(); + string _site = p_table.Rows[0]["域"].ToString(); + string _sql = string.Format(_asnSqlString, string.Join(",", _endTimelist.ToArray()), _pobillNum, _site); + var _asnCurList = db.Database.SqlQuery(_sql).ToList(); + if (_asnCurList.Count > 0) + { + _endTimelist = _endTimelist.Where(p => !_asnCurList.Contains(p.Replace("'", string.Empty))).ToList(); + } + if (_versionList.Distinct().Count() > 1) + { + _ret.MessageList.Add("导入模板中多个版本号!"); + } + if (_vendcodeList.Distinct().Count() > 1) + { + _ret.MessageList.Add("导入模板中有多个供应商编码!"); + } + if (_versionList.Distinct().Count() == 1) + { + var _version = _versionList.FirstOrDefault().Replace("/", string.Empty); + var _first = db.TB_PO_PLAN_EXTEND.Where(p => p.VendId == _vendcodeList.FirstOrDefault() && p.PoBillNum == _poList.FirstOrDefault() && p.Version == _version).FirstOrDefault(); + if (_first != null) + { + if (long.Parse(_version) <= long.Parse(_first.Version)) + { + _ret.MessageList.Add("版本号必须大于上期版本号"); + } + } + } + if (_checkNum != _checkColumnAry.Length) + { + _ret.MessageList.Add("版本号、计划天数、零件编码、订单编号、行号、供应商编码、域、单位为必填列"); + } + #endregion + if (_ret.MessageList.Count == 0) + { + if (_endTimelist.Count > 0) + { + var _sql1 = string.Format(_sqlString, string.Join(",", _endTimelist.ToArray()), _poList.FirstOrDefault(), _siteList.FirstOrDefault()); + var _askList = db.Database.SqlQuery(_sql1).ToList(); + #region 发货单位空的看板 + if (_askList.Count > 0) + { + var _list = new List(); + _askList.ForEach(p => + { + _list.Add(string.Format("'{0}'", p)); + }); + string _askStr = string.Format(_delString, string.Join(",", _list.ToArray())); + int _askdel = db.Database.ExecuteSqlCommand(_askStr); + if (_askdel > 0) + { + string _askDetailStr = string.Format(_delDetailString, string.Join(",", _list.ToArray()), _siteList.FirstOrDefault()); + int _askdelDetail = db.Database.ExecuteSqlCommand(_askDetailStr); + } + } + + int delPlanState = db.Database.ExecuteSqlCommand(string.Format(_delPlan, _pobillNum, _site, string.Join(",", _endTimelist.ToArray()))); + + #endregion + } + + foreach (DataColumn colum in p_table.Columns) + { + if (colum.ColumnName.Contains("(预测)")) + { + + var _reg3 = Regex.Match(colum.ColumnName, @"\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}"); + colum.ColumnName = DateTime.Parse(_reg3.Value).ToString("yyyy-MM-dd"); + } + if (colum.ColumnName.Contains("(计划)")) + { + var _reg3 = Regex.Match(colum.ColumnName, @"\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}"); + colum.ColumnName = DateTime.Parse(_reg3.Value).ToString("yyyy-MM-dd"); + + } + + if (colum.ColumnName.Contains("(已确认)")) + { + var _reg3 = Regex.Match(colum.ColumnName, @"\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}"); + colum.ColumnName = DateTime.Parse(_reg3.Value).ToString("yyyy-MM-dd"); + //_endTimelist.Add(string.Format("'{0}'", colum.ColumnName)); + } + if (colum.ColumnName.Contains("(已发布)")) + { + var _reg3 = Regex.Match(colum.ColumnName, @"\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}"); + colum.ColumnName = DateTime.Parse(_reg3.Value).ToString("yyyy-MM-dd"); + } + + if (_endTimelist.Contains(string.Format("'{0}'", colum.ColumnName)))//没有被发货单占用的要货看板结束时间 + { + foreach (DataRow dr in p_table.Rows)//导入计划EXCEL行转列 + { + DateTime _dt = new DateTime(); + if (DateTime.TryParse(colum.ColumnName, out _dt)) + { + if (dr[colum.ColumnName] != null && !string.IsNullOrEmpty(dr[colum.ColumnName].ToString())) + { + try + { + var _planQty = decimal.Parse(dr[colum.ColumnName].ToString()); + if (_planQty > 0) + { + TB_PO_PLAN_EXTEND _extend = new TB_PO_PLAN_EXTEND(); + _extend.PartCode = dr["零件编码"].ToString(); + _extend.Version = _versionList.FirstOrDefault().Replace("/", string.Empty); + _extend.PoBillNum = dr["订单编号"].ToString(); + _extend.PoLine = int.Parse(dr["行号"].ToString()); + _extend.PlanQty = decimal.Parse(dr[colum.ColumnName].ToString()); + _extend.BeginTime = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")); + _extend.EndTime = DateTime.Parse(colum.ColumnName); + _extend.Domain = dr["域"].ToString(); + _extend.VendId = dr["供应商编码"].ToString(); + _extend.CreateTime = DateTime.Now; + _extend.Site = dr["地点"].ToString(); + _extend.PoUnit = dr["单位"].ToString(); + _ls.Add(_extend); + } + } + catch (Exception e) + { + throw e; + } + } + } + } + } + } + db.TB_PO_PLAN_EXTEND.AddOrUpdate(_ls.ToArray()); + if (db.SaveChanges() != -1) + { + if (_dayList.Count > 0) + { + var _askday = int.Parse(_dayList.FirstOrDefault()); + var _planDayList = _ls.Select(p => p.EndTime).Distinct(); + if (_askday > _planDayList.Count()) + { + _ret.MessageList.Add("计划天数不能大于导入天数!"); + } + else + { + var _askEndTime = _planDayList.OrderBy(p => p).Take(_askday); + foreach (var itm in _askEndTime) + { + var list = _ls.Where(p => p.EndTime == itm && p.VendId == _vendcodeList.FirstOrDefault() && p.PoBillNum == _poList.FirstOrDefault()).ToList(); + var rsult = PLAN_EXTEND_TO_ASK(list, p_user, IsAutoRelse); + if (rsult.State == ReturnStatus.Succeed) + { + + } + else + { + _ret.MessageList.AddRange(rsult.MessageList.ToArray()); + } + } + } + } + else + { + + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + if (_ret.MessageList.Count == 0) + { + + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TB_PO_PLAN_EXTEND), "IMPORT_TB_PO_PLAN_EXTEND", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + //public static void Get_TB_PO_PLAN(TB_PO_PLAN p_entity, Action>> p_action) + //{ + // ResultObject> _ret = new ResultObject>(); + // try + // { + // using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + // { + // IQueryable q = db.TB_PO_PLAN; + // if (!string.IsNullOrEmpty(p_entity.Domain)) + // { + // q = q.Where(p => p.Domain.Contains(p_entity.Domain)); + // } + // if (!string.IsNullOrEmpty(p_entity.PartCode)) + // { + // q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + // } + // if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + // { + // q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + // } + // if (!string.IsNullOrEmpty(p_entity.Site)) + // { + // q = q.Where(p => p.Site.Contains(p_entity.Site)); + // } + + // if (!string.IsNullOrEmpty(p_entity.Version)) + // { + // q = q.Where(p => p.Version.Contains(p_entity.Version)); + // } + + // if (!string.IsNullOrEmpty(p_entity.VendId)) + // { + // q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + // } + // if (p_entity.EndTime != null) + // { + // q = q.Where(p => p.EndTime == p_entity.EndTime); + // } + + // //if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + // //{ + // // q = q.Where(p => p_entity.UserInAddress.Contains(p.Address)); + // //} + // _ret.State = ReturnStatus.Succeed; + // _ret.Result = q; + // p_action(_ret); + // } + // } + // catch (Exception e) + // { + // _ret.State = ReturnStatus.Failed; + // _ret.ErrorList.Add(e); + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(V_TB_PO_PLAN), "Get_TB_PO_PLAN", e.Message); + // throw e; + // } + + + //} + + + + + + //public ResultObject Save_V_TB_PO_PLAN(List p_entitys) + //{ + // ResultObject _ret = new ResultObject(); + // try + // { + // using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + // { + // foreach (var itm in p_entitys) + // { + // db.V_TB_PO_PLAN.AddOrUpdate(itm); + // } + // if (db.SaveChanges() != -1) + // { + // _ret.State = ReturnStatus.Succeed; + // _ret.Result = true; + // } + // else + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // } + // } + // } + // catch (Exception e) + // { + // _ret.State = ReturnStatus.Failed; + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(V_TB_PO_PLAN), "Save_V_TB_PO_PLAN", e.Message); + // _ret.Result = false; + // _ret.ErrorList.Add(e); + // throw e; + // } + // return _ret; + //} + + + + //public ResultObject Del_V_TB_PO_PLAN(List p_entitys) + //{ + // ResultObject _ret = new ResultObject(); + // try + // { + // using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + // { + // foreach (var itm in p_entitys) + // { + // db.V_TB_PO_PLAN.Remove(itm); + // } + // if (db.SaveChanges() != -1) + // { + // _ret.State = ReturnStatus.Succeed; + // _ret.Result = true; + // } + // else + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // } + // } + // } + // catch (Exception e) + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.ErrorList.Add(e); + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(V_TB_PO_PLAN), "Del_V_TB_PO_PLAN", e.Message); throw e; + // } + // return _ret; + //} + + public static void Get_V_TB_PO_PLAN_DETAIL_List(V_TB_PO_PLAN_DETAIL p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_PO_PLAN_DETAIL; + + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.AskBillNum)) + { + q = q.Where(p => p.AskBillNum.Contains(p_entity.AskBillNum)); + } + if (p_entity.EndTime != null) + { + q = q.Where(p => p.EndTime == p_entity.EndTime.Value); + } + if (!string.IsNullOrEmpty(p_entity.Version)) + { + q = q.Where(p => p.Version.Contains(p_entity.Version)); + } + if (!string.IsNullOrEmpty(p_entity.Domain)) + { + q = q.Where(p => p.Domain.Contains(p_entity.Domain)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(V_TB_PO_PLAN_DETAIL), "Get_V_TB_PO_PLAN_DETAIL_List", e.Message); + throw e; + } + + } + + + public ResultObject Save_V_TB_PO_PLAN_DETAIL(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var itm in p_entitys) + { + db.V_TB_PO_PLAN_DETAIL.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(V_TB_PO_PLAN_DETAIL), "Save_V_TB_PO_PLAN_DETAIL", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public ResultObject Del_V_TB_PO_PLAN_DETAIL(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var itm in p_entitys) + { + db.V_TB_PO_PLAN_DETAIL.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(V_TB_PO_PLAN_DETAIL), "Del_V_TB_PO_PLAN_DETAIL", e.Message); throw e; + } + return _ret; + } + + + //public static ResultObject PLAN_TO_ASK(List p_order_list, User p_user, bool IsAutoPublish = false) + //{ + // ResultObject _ret = new ResultObject(); + // try + // { + // using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + // { + // //p_order_list.ForEach(p => + // //{ + // // if (string.IsNullOrEmpty(p.PlanQty)) + // // { + // // p.PlanQty = 0; + // // } + // //}); + // //int number = 1; + // List lineError = new List(); + // List ErrorList = new List(); + // var _lst = p_order_list.Where(p => p.PlanQty != 0).ToList(); + // //_lst.ForEach + // //(p => + // //{ + // // //var _ls = CheckExcelMode(db, p); + // // if (_ls.Count > 0) + // // { + // // lineError.Add(number.ToString()); + // // ErrorList.Add(string.Join("
", _ls.ToArray())); + // // } + // // number++; + // //}); + // if (lineError.Count > 0) + // { + // _ret.State = ReturnStatus.Failed; + // _ret.MessageList.AddRange(ErrorList); + // _ret.Result = false; + // } + // else + // { + // var VenderList = _lst.Select(p => p.VendId).Distinct(); + // var PartCodeList = _lst.Select(p => p.PartCode).Distinct(); + // var OrderList = _lst.GroupBy(p => p.PoBillNum).ToList(); + // OrderList.ForEach((p) => + // { + // var list = p.ToList(); + // if (list.Count > 0) + // { + // var _entity = list.FirstOrDefault(); + // TB_ASK _ask = new TB_ASK(); + // _ask.AskBillNum = SCP_BILLCODE_CONTROLLER.MakePLAN_ASKCode(); + // _ask.VendId = _entity.VendId; + // _ask.State = (int)AskState.New; + // _ask.PoBillNum = _entity.PoBillNum; + // _ask.ModType = (int)BillModType.Contract; + // _ask.Site = _entity.Domain; + // _ask.Remark = _entity.Version; + // if (IsAutoPublish) + // { + // _ask.State = (int)AskState.Release; + // } + // else + // { + // _ask.State = (int)AskState.New; + // } + // _ask.BeginTime = DateTime.Now; + // _ask.Buyer = p_user.ChineseName; + // _ask.BuyerPhone = p_user.CellPhone; + // _ask.ErpBillNum = _entity.PoBillNum; + // _ask.EndTime = _entity.EndTime; + // _ask.CreateTime = DateTime.Now; + // _ask.CreateUser = p_user.Name; + // _ask.VendId = _entity.VendId; + // _ask.GUID = Guid.NewGuid(); + // _ask.ReceivedPort = string.Empty; + // _ask.IsDeleted = false; + // db.TB_ASK.Add(_ask); + // #region 供应商新任务代办接口 + // TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + // _item.ROLE_NAME = "供应商"; + // _item.ITEM_NO = _ask.AskBillNum; + // _item.ITEM_CONTENT = "要货看盘有信息"; + // _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.NEW_ASK; + // _item.VEND_ID = _ask.VendId; + // _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + // _item.SENDER = p_user.ChineseName; + // _item.SENDING_TIME = DateTime.Now; + // db.TB_PENING_ITEMS.Add(_item); + // #endregion + // // int _number = 1; + // List _ls = new List(); + // list.ForEach((itm) => + // { + // var _number = _ls.Count(p1 => p1.PoBillNum == _ask.PoBillNum + // && p1.PoLine == itm.PoLine && p1.PartCode == itm.PartCode); + // if (_number > 0) + // { + // _ret.MessageList.Add(string.Format("已经存在订单为{0}行号为{1}零件编码为{2}", itm.PoBillNum, itm.PoLine.ToString(), itm.PartCode)); + // } + // TB_ASK_DETAIL _t_ASK_Detail = new TB_ASK_DETAIL(); + // //_t_ASK_Detail.PoLine = _number; + // _t_ASK_Detail.PoLine = itm.PoLine; + // _t_ASK_Detail.Currency = "CNY"; + // _t_ASK_Detail.AskBillNum = _ask.AskBillNum; + // _t_ASK_Detail.PoBillNum = _ask.PoBillNum; + // _t_ASK_Detail.PoUnit = itm.PoUnit; + // _t_ASK_Detail.CreateTime = DateTime.Now; + // _t_ASK_Detail.CreateUser = _ask.CreateUser; + // _t_ASK_Detail.PartCode = itm.PartCode; + // _t_ASK_Detail.BeginTime = _ask.BeginTime; + // _t_ASK_Detail.EndTime = itm.EndTime; + // _t_ASK_Detail.TempQty = itm.PlanQty; + // _t_ASK_Detail.AskQty = itm.PlanQty; + // _t_ASK_Detail.IsDeleted = false; + // _t_ASK_Detail.LocUnit = itm.PoUnit; + // _t_ASK_Detail.UnConv = 1; + // _t_ASK_Detail.Remark = itm.Version; + // _t_ASK_Detail.State = _ask.State; + // // _t_ASK_Detail.Price = string.IsNullOrEmpty(itm.) ? 0 : decimal.Parse(itm.价格); + // _t_ASK_Detail.GUID = Guid.NewGuid(); + // _t_ASK_Detail.Remark = _ask.Site; + // db.TB_ASK_DETAIL.Add(_t_ASK_Detail); + // _ls.Add(_t_ASK_Detail); + // // _number++; + // }); + + // } + // else + // { + // _ret.MessageList.Add("ERP订单编号已存在,请重新导入!"); + + // } + // if (_ret.MessageList.Count == 0) + // { + // int state = db.SaveChanges(); + // if (state != -1) + // { + // _ret.State = ReturnStatus.Succeed; + // _ret.Result = true; + // } + // else + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // } + // } + // else + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // } + // } + // ); + // } + // } + // } + // catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + // { + // var sb = new StringBuilder(); + // foreach (var error in dbEx.EntityValidationErrors.ToList()) + // { + // error.ValidationErrors.ToList().ForEach(i => + // { + // sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + // }); + // } + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.ErrorList.Add(dbEx); + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", sb.ToString()); + // throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + // } + // catch (OptimisticConcurrencyException ex)//并发冲突异常 + // { + + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.ErrorList.Add(ex); + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", ex.ToString()); + // throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + // } + // catch (ScpException ex) + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.ErrorList.Add(ex); + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", ex.ToString()); + + // if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + // { + // var inner = (UpdateException)ex.InnerException; + + + // throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + // } + // else + // { + // if (ex.InnerException != null) throw ex.InnerException; + // } + // } + // catch (Exception e) + // { + // _ret.State = ReturnStatus.Failed; + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", e.Message); + // _ret.Result = false; + // _ret.ErrorList.Add(e); + // throw e; + // } + // return _ret; + + //} + + public static ResultObject PLAN_EXTEND_TO_ASK(List p_order_list, User p_user, bool IsAutoPublish = false) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + //p_order_list.ForEach(p => + //{ + // if (string.IsNullOrEmpty(p.PlanQty)) + // { + // p.PlanQty = 0; + // } + //}); + //int number = 1; + List lineError = new List(); + List ErrorList = new List(); + var _lst = p_order_list.Where(p => p.PlanQty > 0).ToList(); + //_lst.ForEach + //(p => + //{ + // //var _ls = CheckExcelMode(db, p); + // if (_ls.Count > 0) + // { + // lineError.Add(number.ToString()); + // ErrorList.Add(string.Join("
", _ls.ToArray())); + // } + // number++; + //}); + if (lineError.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.MessageList.AddRange(ErrorList); + _ret.Result = false; + } + else + { + var VenderList = _lst.Select(p => p.VendId).Distinct(); + var PartCodeList = _lst.Select(p => p.PartCode).Distinct(); + var OrderList = _lst.GroupBy(p => p.PoBillNum).ToList(); + OrderList.ForEach((p) => + { + + var list = p.ToList(); + if (list.Count > 0) + { + var _entity = list.FirstOrDefault(); + var _priceList= db.V_TB_PRICE.Where(price => price.StartTime <= _entity.EndTime && _entity.EndTime <= price.EndTime &&price.VendId== _entity.VendId); + if (_priceList != null && _priceList.Count() > 0) + { + + + TB_ASK _ask = new TB_ASK(); + _ask.AskBillNum = SCP_BILLCODE_CONTROLLER.MakePLAN_EXTEND_ASKCode(); + _ask.VendId = _entity.VendId; + _ask.State = (int)AskState.New; + _ask.PoBillNum = _entity.PoBillNum; + _ask.ModType = (int)BillModType.Contract; + _ask.Site = _entity.Domain; + _ask.SubSite = _entity.Site; + if (IsAutoPublish) + { + _ask.State = (int)AskState.Release; + } + else + { + _ask.State = (int)AskState.New; + } + _ask.BeginTime = DateTime.Now; + _ask.Buyer = p_user.ChineseName; + _ask.BuyerPhone = p_user.CellPhone; + _ask.ErpBillNum = _entity.PoBillNum; + _ask.EndTime = _entity.EndTime; + _ask.CreateTime = DateTime.Now; + _ask.CreateUser = p_user.Name; + _ask.VendId = _entity.VendId; + _ask.GUID = Guid.NewGuid(); + _ask.ReceivedPort = string.Empty; + _ask.IsDeleted = false; + db.TB_ASK.Add(_ask); + #region 供应商新任务代办接口 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "供应商"; + _item.ITEM_NO = _ask.AskBillNum; + _item.ITEM_CONTENT = "要货看盘有信息"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.NEW_ASK; + _item.VEND_ID = _ask.VendId; + _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + _item.SENDER = p_user.ChineseName; + _item.SENDING_TIME = DateTime.Now; + db.TB_PENING_ITEMS.Add(_item); + #endregion + // int _number = 1; + List _ls = new List(); + list.ForEach((itm) => + { + + + + + var _number = _ls.Count(p1 => p1.PoBillNum == _ask.PoBillNum + && p1.PoLine == itm.PoLine && p1.PartCode == itm.PartCode); + if (_number > 0) + { + _ret.MessageList.Add(string.Format("已经存在订单为{0}行号为{1}零件编码为{2}", itm.PoBillNum, itm.PoLine.ToString(), itm.PartCode)); + } + TB_ASK_DETAIL _t_ASK_Detail = new TB_ASK_DETAIL(); + //_t_ASK_Detail.PoLine = _number; + _t_ASK_Detail.PoLine = itm.PoLine; + _t_ASK_Detail.Currency = "CNY"; + _t_ASK_Detail.AskBillNum = _ask.AskBillNum; + _t_ASK_Detail.PoBillNum = _ask.PoBillNum; + _t_ASK_Detail.PoUnit = itm.PoUnit; + _t_ASK_Detail.CreateTime = DateTime.Now; + _t_ASK_Detail.CreateUser = _ask.CreateUser; + _t_ASK_Detail.PartCode = itm.PartCode; + _t_ASK_Detail.BeginTime = _ask.BeginTime; + _t_ASK_Detail.EndTime = itm.EndTime; + _t_ASK_Detail.TempQty = itm.PlanQty; + _t_ASK_Detail.AskQty = itm.PlanQty; + _t_ASK_Detail.IsDeleted = false; + _t_ASK_Detail.LocUnit = itm.PoUnit; + _t_ASK_Detail.UnConv = 1; + _t_ASK_Detail.SubSite = _ask.SubSite; + _t_ASK_Detail.Site = _ask.Site; + _t_ASK_Detail.State = _ask.State; + + var _askPrice = _priceList.Where(t => t.PartCode == itm.PartCode && t.VendId == itm.VendId).FirstOrDefault(); + if (_askPrice != null) + { + _t_ASK_Detail.Price = _askPrice.Amt; + } + else + { + _ret.MessageList.Add(string.Format("供应商编号{0}零件{1}计划到货时间{2}内无价格表!",_ask.VendId,_t_ASK_Detail.PartCode,_ask.EndTime)); + } + _t_ASK_Detail.GUID = Guid.NewGuid(); + + db.TB_ASK_DETAIL.Add(_t_ASK_Detail); + _ls.Add(_t_ASK_Detail); + // _number++; + }); + } + else + { + _ret.MessageList.Add(string.Format("供应商编号{0}计划到货时间{1}范围内无价格表!",_entity.VendId,_entity.EndTime)); + } + + } + else + { + _ret.MessageList.Add("ERP订单编号已存在,请重新导入!"); + + } + if (_ret.MessageList.Count == 0) + { + int state = db.SaveChanges(); + if (state != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + ); + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + + } + + //public static void Get_TB_PLAN_CUSTOM_List(TB_PLAN_CUSTOM p_entity, Action>> p_action) + //{ + // ResultObject> _ret = new ResultObject>(); + // try + // { + // using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + // { + // IQueryable q = db.TB_PLAN_CUSTOM; + // if (p_entity.UID != 0) + // { + // q = q.Where(p => p.UID == p_entity.UID); + // } + // if (!string.IsNullOrEmpty(p_entity.VendID)) + // { + // q = q.Where(p => p.VendID.Contains(p_entity.VendID)); + // } + // if (!string.IsNullOrEmpty(p_entity.PlanData)) + // { + // q = q.Where(p => p.PlanData.Contains(p_entity.PlanData)); + // } + // if (!string.IsNullOrEmpty(p_entity.Version)) + // { + // q = q.Where(p => p.Version.Contains(p_entity.Version)); + // } + // //if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + // //{ + // // q = q.Where(p => p_entity.UserInAddress.Contains(p.Address)); + // //} + // _ret.State = ReturnStatus.Succeed; + // _ret.Result = q; + // p_action(_ret); + // } + // } + // catch (Exception e) + // { + // _ret.State = ReturnStatus.Failed; + // _ret.ErrorList.Add(e); + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(TB_PLAN_CUSTOM), "Get_TB_PLAN_CUSTOM_List", e.Message); + // throw e; + // } + + //} + + + //public static ResultObject Save_TB_PLAN_CUSTOM(List p_entitys) + //{ + // ResultObject _ret = new ResultObject(); + // try + // { + // using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + // { + // foreach (var itm in p_entitys) + // { + // db.TB_PLAN_CUSTOM.AddOrUpdate(itm); + // } + // if (db.SaveChanges() != -1) + // { + // _ret.State = ReturnStatus.Succeed; + // _ret.Result = true; + // } + // else + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // } + // } + // } + // catch (Exception e) + // { + // _ret.State = ReturnStatus.Failed; + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(TB_PLAN_CUSTOM), "Save_TB_PLAN_CUSTOM", e.Message); + // _ret.Result = false; + // _ret.ErrorList.Add(e); + // throw e; + // } + // return _ret; + //} + + + + + + + //public ResultObject Del_TB_PLAN_CUSTOM(List p_entitys) + //{ + // ResultObject _ret = new ResultObject(); + // try + // { + // using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + // { + // foreach (var itm in p_entitys) + // { + // db.TB_PLAN_CUSTOM.Remove(itm); + // } + // if (db.SaveChanges() != -1) + // { + // _ret.State = ReturnStatus.Succeed; + // _ret.Result = true; + // } + // else + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // } + // } + // } + // catch (Exception e) + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.ErrorList.Add(e); + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(TB_PLAN_CUSTOM), "Del_TB_PLAN_CUSTOM", e.Message); throw e; + // } + // return _ret; + //} + //public ResultObject PLAN_TO_ASN(DataTable p_table) + //{ + // ResultObject _ret = new ResultObject(); + // try + // { + // using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + // { + + + + // //foreach (var itm in p_entitys) + // //{ + // // db.TB_PLAN_CUSTOM.Remove(itm); + // //} + // //if (db.SaveChanges() != -1) + // //{ + // // _ret.State = ReturnStatus.Succeed; + // // _ret.Result = true; + // //} + // //else + // //{ + // // _ret.State = ReturnStatus.Failed; + // // _ret.Result = false; + // //} + // } + // } + // catch (Exception e) + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.ErrorList.Add(e); + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(TB_PLAN_CUSTOM), "PLAN_TO_ASN", e.Message); throw e; + // } + // return _ret; + //} + + + } +} diff --git a/北京北汽/SCP/Controller/SCP_PLAN_MONTH_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_PLAN_MONTH_CONTROLLER.cs new file mode 100644 index 0000000..c6a6948 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_PLAN_MONTH_CONTROLLER.cs @@ -0,0 +1,152 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; +using System.Data.Entity.Core; +using CK.SCP.Models.Enums; +using CK.SCP.Utils; + +namespace CK.SCP.Controller +{ + public class SCP_PLAN_MONTH_CONTROLLER + { + public static TB_PlanMonth GetPlanMonthById(int id) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TB_PlanMonth.SingleOrDefault(p => p.ID == id); + } + } + + public static bool UpdatePlanMonthById(TB_PlanMonth model) + { + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + model.IsSend = "是"; + model.SendTime = DateTime.Now; + db.TB_PlanMonth.AddOrUpdate(model); + db.SaveChanges(); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + Utils.LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PLAN_MONTH_CONTROLLER), "UpdatePlanMonthById", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PLAN_MONTH_CONTROLLER), "UpdatePlanMonthById", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PLAN_MONTH_CONTROLLER), "UpdatePlanMonthById", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PLAN_MONTH_CONTROLLER), "UpdatePlanMonthById", e.Message); throw e; + } + return true; + } + public static TA_VENDER GetVend() + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TA_VENDER.OrderByDescending(p => p.Email).SingleOrDefault(p => p.Email != null); + } + } + + public static List GetVendList() + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TA_VENDER.ToList(); + } + } + + public static bool SaveTbPlanMonth(TB_PlanMonth model) + { + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + db.TB_PlanMonth.AddOrUpdate(model); + db.SaveChanges(); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + Utils.LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PLAN_MONTH_CONTROLLER), "SaveTbPlanMonth", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PLAN_MONTH_CONTROLLER), "SaveTbPlanMonth", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PLAN_MONTH_CONTROLLER), "SaveTbPlanMonth", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PLAN_MONTH_CONTROLLER), "SaveTbPlanMonth", e.Message); throw e; + } + return true; + } + } +} diff --git a/北京北汽/SCP/Controller/SCP_PO_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_PO_CONTROLLER.cs new file mode 100644 index 0000000..540b479 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_PO_CONTROLLER.cs @@ -0,0 +1,5373 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Models.ScpEntity.ExcelImportEntity; +using CK.SCP.Utils; +using System.Data.Entity.Core; +using CK.SCP.Models.ScpEntity.ExcelExportEnttity; +using System.Text.RegularExpressions; +using System.Data.SqlClient; + +namespace CK.SCP.Controller +{ + public class SCP_PO_CONTROLLER + { + + public static void Get_V_TB_PO_List(V_TB_PO p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_PO; + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum == p_entity.PoBillNum); + } + if (!string.IsNullOrEmpty(p_entity.ErpBillNum)) + { + q = q.Where(p => p.ErpBillNum.Contains(p_entity.ErpBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (p_entity.ModType != null) + { + q = q.Where(p => p.ModType == p_entity.ModType); + } + if (!string.IsNullOrEmpty(p_entity.Contacter)) + { + q = q.Where(p => p.Contacter.Contains(p_entity.Contacter)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (!string.IsNullOrEmpty(p_entity.Buyer)) + { + q = q.Where(p => p.Buyer.Contains(p_entity.Buyer)); + } + if (!string.IsNullOrEmpty(p_entity.BuyerPhone)) + { + q = q.Where(p => p.BuyerPhone.Contains(p_entity.BuyerPhone)); + } + if (p_entity.State != null) + { + q = q.Where(p => p.State == p_entity.State); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.UpdateUser)) + { + q = q.Where(p => p.UpdateUser.Contains(p_entity.UpdateUser)); + } + if (!string.IsNullOrEmpty(p_entity.UpdateInfo)) + { + q = q.Where(p => p.UpdateInfo.Contains(p_entity.UpdateInfo)); + } + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + if (p_entity.BeginTime != null) + { + q = q.Where(p => p.BeginTime >= p_entity.BeginTime); + } + if (p_entity.EndTime != null) + { + q = q.Where(p => p.BeginTime <= p_entity.EndTime); + } + //if (p_entity.UserInAddress.FirstOrDefault() != null && p_entity.UserInAddress.Count > 0) + //{ + // q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + //} + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } + if (p_entity.UserInSubSite != null && p_entity.UserInSubSite.Count > 0) + { + q = q.Where(p => p_entity.UserInSubSite.Contains(p.SubSite)); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + var _po = db.TB_PO_DETAIL.Where(p => p.PartCode == p_entity.PartCode && p.IsDeleted == false); + if (_po.Count() > 0) + { + List _list = new List(); + _po.ToList().ForEach(itm => + { + _list.Add(itm.PoBillNum); + }); + if (_list.Count() > 0) + { + q = q.Where(p => _list.Contains(p.PoBillNum)); + } + } + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Get_V_TB_PO_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Get_V_TB_PO_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Get_V_TB_PO_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Get_V_TB_PO_List", e.Message); + throw e; + } + } + + + public static List LOAD_ASK_DETAIL_SUM(List p_list) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + if (p_list.Count > 0) + { + var _detail = p_list[0]; + var _ask = db.TB_ASK_DETAIL.Where(p => p.PoBillNum == _detail.PoBillNum && p.IsDeleted == false) + .GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode }) + .Select(p => new { AskSum = p.Sum(itm => itm.AskQty), PoLine = p.Key.PoLine, PoBillNum = p.Key.PoBillNum, PartCode = p.Key.PartCode }); + p_list.ForEach(p => + { + _ask.ToList().ForEach(itm => + { + if (p.PoBillNum == itm.PoBillNum && p.PoLine == itm.PoLine && p.PartCode == itm.PartCode) + { + p.TempQty = itm.AskSum; + } + }); + }); + } + } + return p_list; + } + public static List LOAD_PO_DETAIL_SUM(List p_list) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + if (p_list.Count > 0) + { + //var _detail = p_list[0]; + foreach (V_TB_PO_DETAIL _detail in p_list) + { + var _ask = db.TB_ASK_DETAIL.Where(p => p.PoBillNum == _detail.PoBillNum && p.IsDeleted == false).GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode }).Select(p => new { AskSum = p.Sum(itm => itm.AskQty), PoLine = p.Key.PoLine, PoBillNum = p.Key.PoBillNum, PartCode = p.Key.PartCode }); + + var rec = db.TB_RECEIVE_DETAIL.Where(p => p.PoBillNum == _detail.PoBillNum && p.IsDeleted == false && p.State == (int)ReceiveState.Check && p.BillType == 0) + .GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode }).Select(p => new { ReceiveSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, PoBillNum = p.Key.PoBillNum, PartCode = p.Key.PartCode }); + + //var reject = db.TB_RECEIVE_DETAIL.Where(p => p.PoBillNum == _detail.PoBillNum && p.IsDeleted == false && p.State == (int)RejectState.Check && p.BillType == 1) + // .GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode }).Select(p => new { RejectSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, PoBillNum = p.Key.PoBillNum, PartCode = p.Key.PartCode }); + + var asn = db.TB_ASN_DETAIL.Where(p => p.PoBillNum == _detail.PoBillNum && p.IsDeleted == false && (p.State == (int)AsnState.Ship || p.State == (int)AsnState.Receive)) + .GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode }) + .Select(p => new { AsSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, PoBillNum = p.Key.PoBillNum, PartCode = p.Key.PartCode }); + var arrive = db.TB_ARRIVE_DETAIL.Where(p => p.PoBillNum == _detail.PoBillNum && p.IsDeleted == false && p.State == (int)ArriveState.OK && p.BillType == (int)ArriveBillType.Receive) + .GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode, p.SubSite }).Select(p => new { ArriveSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, PoBillNum = p.Key.PoBillNum, PartCode = p.Key.PartCode, Subsite = p.Key.SubSite }); + var reject = db.TB_ARRIVE_DETAIL.Where(p => p.PoBillNum == _detail.PoBillNum && p.IsDeleted == false && p.State == (int)ArriveState.OK && p.BillType == (int)ArriveBillType.Reject) + .GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode, p.SubSite }).Select(p => new { RejectSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, PoBillNum = p.Key.PoBillNum, PartCode = p.Key.PartCode, Subsite = p.Key.SubSite }); + _detail.PartDesc1 = _detail.PartDesc1 + _detail.PartDesc2; + rec.ToList().ForEach(itm => + { + if (_detail.PoBillNum == itm.PoBillNum && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + { + _detail.ReceivedQty = itm.ReceiveSum; + } + }); + reject.ToList().ForEach(itm => + { + if (_detail.PoBillNum == itm.PoBillNum && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode && _detail.SubSite == itm.Subsite) + { + _detail.RejectQty = itm.RejectSum.ToString(); + } + + }); + asn.ToList().ForEach(itm => + { + if (_detail.PoBillNum == itm.PoBillNum && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + { + _detail.ShippedQty = itm.AsSum; + } + }); + _ask.ToList().ForEach(itm => + { + if (_detail.PoBillNum == itm.PoBillNum && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + { + _detail.TempQty = itm.AskSum; + } + }); + arrive.ToList().ForEach(itm => + { + if (_detail.PoBillNum == itm.PoBillNum && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode && _detail.SubSite == itm.Subsite) + { + _detail.ArriveQty = itm.ArriveSum.ToString(); + } + }); + } + } + + } + return p_list; + } + public static ResultObject Save_TB_PO_STATE(List p_list, PoState p_state) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + if (p_state == PoState.Close) + { + var _pols = db.TB_PO.Where(t => p_list.Contains(t.PoBillNum) && t.IsDeleted == false).ToList(); + if (_pols.Count > 0) + { + _pols.ForEach(p => + { + p.State = (int)PoState.Close; + var _list = db.TB_PO_DETAIL.Where(itm => itm.PoBillNum == p.PoBillNum).ToList(); + _list.ForEach(itm => itm.State = (int)PoState.Close); + db.TB_PO_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + } + ); + db.TB_PO.AddOrUpdate(t => t.UID, _pols.ToArray()); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是发布状态记录!"; + } + if (_ret.MessageList.Count == 0) + { + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + public static ResultObject Save_TB_PO_STATE_Detail(List p_list, List p_list1, PoState p_state) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var po in p_list) + { + foreach (var po1 in p_list1) + { + var PoDetail = db.TB_PO_DETAIL.SingleOrDefault(p => p.PoBillNum == po && p.PartCode == po1); + PoDetail.State = (int)PoState.Close; + db.TB_PO_DETAIL.AddOrUpdate(PoDetail); + + } + } + + + if (_ret.MessageList.Count == 0) + { + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + public static ResultObject Save_TB_PO_STATE_Detail_Close(List p_list, List p_list1, PoState p_state) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var po in p_list) + { + foreach (var po1 in p_list1) + { + var PoDetail = db.TB_ASK_DETAIL.SingleOrDefault(p => p.PoBillNum == po && p.PartCode == po1); + PoDetail.AskQty=0; + db.TB_ASK_DETAIL.AddOrUpdate(PoDetail); + + } + } + + + if (_ret.MessageList.Count == 0) + { + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_STATE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + //public static ResultObject Save_TB_PO_STATE(List p_list, PoState p_state) + //{ + // ResultObject _ret = new ResultObject(); + //try + //{ + // using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + // { + // if (db.TB_ASN.Where(p => p_list.Contains(p.PoBillNum)).Count() == 0) + // { + // if(p_state==PoState.Reject) + // { + // var _askDetailList = db.TB_ASK_DETAIL.Where(p => p_list.Contains(p.PoBillNum)).ToList(); + // db.TB_ASK_DETAIL.RemoveRange(_askDetailList);//移除要货看板明细 + + // var _ls = db.TB_ASK.Where(p => p_list.Contains(p.PoBillNum)).ToList(); + // db.TB_ASK.RemoveRange(_ls.ToArray());//移除要货看板 + + + // var _lsPending = db.TB_PENING_ITEMS.Where(p => p_list.Contains(p.ITEM_NO)).ToList(); + // db.TB_PENING_ITEMS.RemoveRange(_lsPending.ToArray());//移除代办 + + // var _list = db.TB_PO.Where(p => p_list.Contains(p.PoBillNum)).ToList(); + + // int count = _ls.Count(p => p.State == (int)AskState.New || p.State == (int)AskState.Release); + + // if (_list.Count > 0 && _list.Count == count) + // { + // _list.ForEach(p => + // { + // p.State = (int)PoState.Reject; + // p.IsDeleted = true; + // var _poList = db.TB_PO_DETAIL.Where(itm => itm.PoBillNum == p.PoBillNum).ToList(); + // _poList.ForEach(itm => + // { + + // itm.State = (int)PoState.Reject; + // itm.IsDeleted = true; + // }); + // db.TB_PO_DETAIL.AddOrUpdate(itm => itm.UID, _poList.ToArray()); + // } + + // ); + // db.TB_PO.AddOrUpdate(p => p.PoBillNum, _list.ToArray()); + // } + // else + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.Message = "选择的记录,有不是新建或发布状态记录!"; + // } + + // } + // if (p_state == PoState.Complete) + // { + // var _list = db.TB_PO.Where(p => p_list.Contains(p.PoBillNum)).ToList(); + + + // _list.ForEach(p => + // { + // p.State = (int)PoState.Complete; + // p.IsDeleted = true; + // var _poList = db.TB_PO_DETAIL.Where(itm => itm.PoBillNum == p.PoBillNum).ToList(); + // _poList.ForEach(itm => + // { + // itm.State = (int)PoState.Complete; + // }); + // db.TB_PO_DETAIL.AddOrUpdate(itm => itm.UID, _poList.ToArray()); + // } + + // ); + // db.TB_PO.AddOrUpdate(p => p.PoBillNum, _list.ToArray()); + + + // } + // if (p_state == PoState.CompleteForce) + // { + // var _list = db.TB_PO.Where(p => p_list.Contains(p.PoBillNum)).ToList(); + // _list.ForEach(p => + // { + // p.State = (int)PoState.CompleteForce; + // p.IsDeleted = true; + // var _poList = db.TB_PO_DETAIL.Where(itm => itm.PoBillNum == p.PoBillNum).ToList(); + // _poList.ForEach(itm => + // { + // itm.State = (int)PoState.CompleteForce; + // }); + // db.TB_PO_DETAIL.AddOrUpdate(itm => itm.UID, _poList.ToArray()); + // } + + // ); + // db.TB_PO.AddOrUpdate(p => p.PoBillNum, _list.ToArray()); + + // } + // if (p_state == PoState.Release) + // { + // var _list = db.TB_PO.Where(p => p_list.Contains(p.PoBillNum)).ToList(); + + // int count = _list.Count(p => p.State == (int)AskState.New); + + // if (_list.Count > 0 && _list.Count == count) + // { + // _list.ForEach(p => + // { + // p.State = (int)PoState.Release; + + // var _poList = db.TB_PO_DETAIL.Where(itm => itm.PoBillNum == p.PoBillNum).ToList(); + // _poList.ForEach(itm => + // { + // itm.State = (int)PoState.Release; + // }); + // db.TB_PO_DETAIL.AddOrUpdate(itm => itm.UID, _poList.ToArray()); + // } + // ); + // db.TB_PO.AddOrUpdate(p => p.PoBillNum, _list.ToArray()); + + // } + // else + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.Message = "选择的记录,有不是新建状态记录!"; + // } + + // } + // if (p_state == PoState.New) + // { + // var _AskDetailList = db.TB_ASK_DETAIL.Where(p => p_list.Contains(p.PoBillNum)).ToList(); + // if (_AskDetailList.Count > 0) + // { + // db.TB_ASK_DETAIL.RemoveRange(_AskDetailList);//移除要货看板明细 + // } + // var _ls = db.TB_ASK.Where(p => p_list.Contains(p.PoBillNum)).ToList(); + // if (_ls.Count > 0) + // { + // #region 供应商要货代办作废 + // var _pList = _ls.Select(p => p.AskBillNum).ToList(); + // var _pendingList = db.TB_PENING_ITEMS.Where(itm => _pList.Contains(itm.ITEM_NO)).ToList(); + // if (_pendingList.Count > 0) + // { + // db.TB_PENING_ITEMS.RemoveRange(_pendingList); + // } + // #endregion + // db.TB_ASK.RemoveRange(_ls.ToArray());//移除要货看板 + // } + // var _list = db.TB_PO.Where(p => p_list.Contains(p.PoBillNum)).ToList(); + + // int count = _list.Count(p => p.State == (int)AskState.Release); + + // if (_list.Count > 0 && _list.Count == count) + // { + // _list.ForEach(p => + // { + // p.State = (int)PoState.New; + // p.IsDeleted = false; + // var _poList = db.TB_PO_DETAIL.Where(itm => itm.PoBillNum == p.PoBillNum).ToList(); + // _poList.ForEach(itm => + // { + // itm.State = (int)PoState.New; + // }); + // db.TB_PO_DETAIL.AddOrUpdate(itm => itm.UID, _poList.ToArray()); + // }); + + + // db.TB_PO.AddOrUpdate(p => p.PoBillNum, _list.ToArray()); + // } + // else + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.Message = "选择的记录,有不是发布状态记录!"; + // } + + // } + + // if (db.SaveChanges() != -1) + // { + // _ret.State = ReturnStatus.Succeed; + // _ret.Result = true; + // } + // else + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.Message = "数据更新失败!"; + // } + // } + // else + // { + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + // _ret.Message = "该订单已经存在发货单,不能取消发布!"; + // } + // } + //} + //catch (Exception e) + //{ + // _ret.State = ReturnStatus.Failed; + // LogHelper.Writlog(LogHelper.LogType.Error, typeof(TB_PO), "Save_TB_PO", e.Message); + // _ret.Result = false; + // _ret.ErrorList.Add(e); + // throw e; + //} + // return _ret; + //} + + + public static ResultObject Save_TB_PO(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var itm in p_entitys) + { + db.TB_PO.AddOrUpdate(p => p.PoBillNum, itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Save_TB_PO", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Save_TB_PO", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Save_TB_PO", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Save_TB_PO", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + private static List CheckExcelPackQty(ScpEntities db, SCP_PO_EXCEL p_excel) + { + List ErrorList = new List(); + var _ls = db.TA_VEND_PART.Where(p => p.PartCode == p_excel.零件号 && p.VendId == p_excel.供应商编号).ToList(); + if (_ls.Count != 0) + { + if (_ls[0].VendPackQty != 0) + { + if (Convert.ToDecimal(p_excel.数量) % _ls[0].VendPackQty > 0) + { + ErrorList.Add(string.Format("分组【{2}】零件号【{0}】行号【{1}】不是整箱!标包数为【{3}】", p_excel.零件号, p_excel.行号, p_excel.分组编号, _ls[0].VendPackQty)); + } + } + } + return ErrorList; + } + private static List CheckExcel(ScpEntities db, SCP_PO_EXCEL p_excel) + { + List ErrorList = new List(); + if (!string.IsNullOrEmpty(p_excel.QAD订单号)) + { + int count = db.TB_PO.Count(p => p.PoBillNum == p_excel.QAD订单号); + if (count == 0) + { + ErrorList.Add(string.Format("订单编号{0}不存在!", p_excel.QAD订单号)); + } + } + else + { + ErrorList.Add(string.Format("订单编号为空!")); + } + + + var _count = db.TB_PO_DETAIL.Count(p => p.PoBillNum == p_excel.QAD订单号 && p.PartCode == p_excel.零件号 && p.PoLine.ToString() == p_excel.行号); + if ( + string.IsNullOrEmpty(p_excel.分组编号) || + string.IsNullOrEmpty(p_excel.QAD订单号) || + string.IsNullOrEmpty(p_excel.供应商编号) || + string.IsNullOrEmpty(p_excel.订货日期) || + string.IsNullOrEmpty(p_excel.要求到货日期) || + string.IsNullOrEmpty(p_excel.零件号) || + string.IsNullOrEmpty(p_excel.要货地点) || + string.IsNullOrEmpty(p_excel.交货联系人) || + string.IsNullOrEmpty(p_excel.交货联系人电话) || + string.IsNullOrEmpty(p_excel.数量) || + string.IsNullOrEmpty(p_excel.单位) || + string.IsNullOrEmpty(p_excel.价格) || + string.IsNullOrEmpty(p_excel.币种)) + { + ErrorList.Add(string.Format("分组【{1}】零件号【{0}】有填写为空!", p_excel.零件号, p_excel.分组编号)); + } + if (_count == 0) + { + ErrorList.Add(string.Format("分组【{2}】零件号【{0}】行号【{1}】不存在!", p_excel.零件号, p_excel.行号, p_excel.分组编号)); + } + + return ErrorList; + + } + + + + private static List CheckExcelMode(ScpEntities db, SCP_PO_DETAIL_EXPORT_MODEL p_excel) + { + List ErrorList = new List(); + if (!string.IsNullOrEmpty(p_excel.订单编号)) + { + int count = db.TB_PO.Count(p => p.PoBillNum == p_excel.订单编号); + if (count == 0) + { + ErrorList.Add(string.Format("订单编号{0}不存在!", p_excel.订单编号)); + } + } + else + { + ErrorList.Add(string.Format("订单编号为空!")); + } + decimal _result = 0; + + if (!decimal.TryParse(p_excel.订单数, out _result)) + { + ErrorList.Add(string.Format("订单编号{0}零件编号{1}数量填写有问题", p_excel.订单编号, p_excel.零件编码)); + } + + + var _count = db.TB_PO_DETAIL.Count(p => p.PoBillNum == p_excel.订单编号 && p.PartCode == p_excel.零件编码 && p.PoLine.ToString() == p_excel.行号); + if ( + + string.IsNullOrEmpty(p_excel.订单编号) || + string.IsNullOrEmpty(p_excel.行号) || + string.IsNullOrEmpty(p_excel.订货日期) || + string.IsNullOrEmpty(p_excel.到货日期) || + string.IsNullOrEmpty(p_excel.零件编码) || + string.IsNullOrEmpty(p_excel.零件名) || + string.IsNullOrEmpty(p_excel.域名) || + string.IsNullOrEmpty(p_excel.地点) || + string.IsNullOrEmpty(p_excel.计划员) || + string.IsNullOrEmpty(p_excel.计划员电话) || + string.IsNullOrEmpty(p_excel.订单数) || + string.IsNullOrEmpty(p_excel.单位)) + { + ErrorList.Add(string.Format("分组【{1}】零件名称【{0}】有填写为空!", p_excel.零件名, p_excel.订单编号)); + } + //else + //{ + // if (!Regex.IsMatch(p_excel.计划员电话, @"^1[1,9]\d{9}$")) + // { + // ErrorList.Add(string.Format("订单编号{0}零件编号{1}计划员手机号填写有问题", p_excel.订单编号, p_excel.零件编码)); + // } + + //} + + if (_count == 0) + { + ErrorList.Add(string.Format("分组【{2}】零件名称【{0}】行号【{1}】不存在!", p_excel.零件名, p_excel.行号, p_excel.订单编号)); + } + + var _askDate = DateTime.Parse(p_excel.订货日期); + + var checkcount = db.TB_PRICE.Where(p => p.PartCode == p_excel.零件编码 && p.Site == p_excel.域名 && p.SubSite == p_excel.地点 && p.State == (int)PriceState.FConfirm && p.VendId == p_excel.供应商编码 && p.StartTime <= _askDate && _askDate <= p.EndTime).ToList(); + if (checkcount.Count == 0) + { + + ErrorList.Add(string.Format("零件名称【{0}】供应编码【{1}】价格表没有维护信息!", p_excel.零件编码, p_excel.供应商编码)); + } + else + { + p_excel.价格 = checkcount[0].Amt.ToString(); + } + + + return ErrorList; + + } + /// + /// 供应商零件导入验证 + /// + /// + /// + /// + private static List CheckExcelMode_VenderPart(ScpEntities db, SCP_VENDER_PART_EXPORT p_excel) + { + List ErrorList = new List(); + if (!string.IsNullOrEmpty(p_excel.供应商代码)) + { + int count = db.TA_VENDER.Count(p => p.VendId == p_excel.供应商代码 && p.Site == p_excel.域); + if (count <= 0) + { + ErrorList.Add(string.Format("域{1}供应商{0}不存在!", p_excel.供应商代码, p_excel.域)); + } + } + else + { + ErrorList.Add(string.Format("供应商代码为空!")); + } + if (!string.IsNullOrEmpty(p_excel.零件号)) + { + int count = db.TA_PART.Count(p => p.PartCode == p_excel.零件号 && p.Site == p_excel.域); + if (count <= 0) + { + ErrorList.Add(string.Format("域{1}零件编号{0}不存在!", p_excel.零件号, p_excel.域)); + } + } + else + { + ErrorList.Add(string.Format("零件号为空!")); + } + if ( + string.IsNullOrEmpty(p_excel.供应商代码) || + string.IsNullOrEmpty(p_excel.零件号) || + string.IsNullOrEmpty(p_excel.标包数) || string.IsNullOrEmpty(p_excel.供应商零件号) ||/*string.IsNullOrEmpty(p_excel.小包装数)||string.IsNullOrEmpty(p_excel.托盘包装数)||*/string.IsNullOrEmpty(p_excel.域)) + { + ErrorList.Add(string.Format("域【{2}】供应商代码【{0}】零件编号【{1}】有填写为空!", p_excel.供应商代码, p_excel.零件号, p_excel.域)); + } + return ErrorList; + } + /// + /// 供应商导入验证 + /// + /// + /// + /// + private static List CheckExcelMode_Vender(ScpEntities db, SCP_VENDER_EXPORT p_excel) + { + List ErrorList = new List(); + if ( + string.IsNullOrEmpty(p_excel.供应商编号) || + string.IsNullOrEmpty(p_excel.供应商名称) || + string.IsNullOrEmpty(p_excel.域)) + { + ErrorList.Add(string.Format("供应商编号【{0}】有填写为空!", p_excel.供应商编号)); + } + return ErrorList; + + } + private static List CheckExcelMode_Vender1(ScpEntities db, SCP_PRICE_EXPORT p_excel) + { + List ErrorList = new List(); + + + if ( + + string.IsNullOrEmpty(p_excel.零件最新价格) || + string.IsNullOrEmpty(p_excel.最新开始时间)) + + { + ErrorList.Add(string.Format("标识【{0}】供应商编号【{1}】有填写为空!", p_excel.标识, p_excel.供应商编号)); + + } + else + { + if (p_excel.币种 != "CNY" && p_excel.币种 != "EUR" && p_excel.币种 != "USD") + { + ErrorList.Add(string.Format("供应商编号为【{0}】的零件编号【{1}】币种填写错误,只能是CNY或者EUR或者USD!", p_excel.供应商编号, p_excel.零件编码)); + } + DateTime st6 = DateTime.Parse(p_excel.结束时间); + DateTime st2 = DateTime.Parse(st6.ToShortDateString()); + + DateTime st7 = DateTime.Parse(p_excel.最新开始时间); + DateTime st1 = DateTime.Parse(st7.ToShortDateString()); + + DateTime st5 = DateTime.Parse(p_excel.开始时间); + DateTime st3=DateTime.Parse( st5.ToShortDateString()); + + Decimal st4 = Decimal.Parse(p_excel.零件基础价格); + DateTime dd = st2.AddDays(1); + DateTime dd1 = st1.AddYears(10); + int b = int.Parse(p_excel.是否临时价格); + var Th = db.TB_PRICE.SingleOrDefault(p => p.UID.ToString() == p_excel.标识 && p.VendId == p_excel.供应商编号 && p.PartCode == p_excel.零件编码 + && p.Amt == st4 && p.SubSite == p_excel.地点 &&p.Curr==p_excel.币种&&p.Unit==p_excel.单位 + ); + if (Th == null) + { + ErrorList.Add(string.Format("标识【{0}】供应商编号【{1}】的导出数据不能修改!", p_excel.标识, p_excel.供应商编号)); + } + else + { + if ((DateTime.Parse(Th.StartTime.ToString())).ToShortDateString()!=st3.ToShortDateString()|| (DateTime.Parse(Th.EndTime.ToString())).ToShortDateString() != st2.ToShortDateString()) + { + ErrorList.Add(string.Format("标识【{0}】供应商编号【{1}】的导出数据不能修改!", p_excel.标识, p_excel.供应商编号)); + } + DateTime STA =DateTime.Parse(Th.StartTime.ToString()); + if(DateTime.Parse(STA.ToShortDateString())!= st3) + { + ErrorList.Add(string.Format("标识【{0}】供应商编号【{1}】的导出数据不能修改!", p_excel.标识, p_excel.供应商编号)); + } + if (Th.State != (int)PriceState.FConfirm) + { + ErrorList.Add(string.Format("标识【{0}】供应商编号【{1}】不是财务已审核的数据,不能导入!", p_excel.标识, p_excel.供应商编号)); + } + if (st1 <= st3 || st1 > dd || st1 == st2) + { + ErrorList.Add(string.Format("标识【{0}】供应商编号【{1}】最新开始时间填写错误!", p_excel.标识, p_excel.供应商编号)); + } + if(st1>st2&& st1 < dd) + { + ErrorList.Add(string.Format("标识【{0}】供应商编号【{1}】最新开始时间填写错误!", p_excel.标识, p_excel.供应商编号)); + } + if (string.IsNullOrEmpty(p_excel.最新结束时间)) + { + p_excel.最新结束时间 = dd1.ToShortDateString(); + } + else + { + if (DateTime.Parse(p_excel.最新结束时间) <= st1 || DateTime.Parse(p_excel.最新结束时间) <= st2 || DateTime.Parse(p_excel.最新结束时间) <= st3) + { + ErrorList.Add(string.Format("标识【{0}】供应商编号【{1}】最新结束时间填写错误!", p_excel.标识, p_excel.供应商编号)); + } + + } + var _second1 = db.TB_PRICE.Where(p => p.PartCode == p_excel.零件编码 && p.VendId == p_excel.供应商编号&&p.SubSite== p_excel.地点&&p.State!=-1).Select(r => r.UID).Max(); + int a = 0; + int.TryParse(p_excel.标识, out a); + if (a < _second1) + { + ErrorList.Add(string.Format("标识【{0}】供应商编号为【{1}】的零件编号【{2}】价格表里已经存在!", p_excel.标识, p_excel.供应商编号, p_excel.零件编码)); + + + } + return ErrorList; + } + + return ErrorList; + } + return ErrorList; + } + /// + /// 价格导入验证 + /// + /// + /// + /// + /// + private static List CheckExcelMode_Price(ScpEntities db, SCP_PRICE_EXPORT p_excel) + { + List ErrorList = new List(); + if (string.IsNullOrEmpty(p_excel.供应商编号) || string.IsNullOrEmpty(p_excel.结束时间) || string.IsNullOrEmpty(p_excel.开始时间) || + string.IsNullOrEmpty(p_excel.零件编码) || string.IsNullOrEmpty(p_excel.币种) || string.IsNullOrEmpty(p_excel.单位) || + string.IsNullOrEmpty(p_excel.零件基础价格) || string.IsNullOrEmpty(p_excel.域) || string.IsNullOrEmpty(p_excel.地点) || + string.IsNullOrEmpty(p_excel.是否临时价格)) + { + ErrorList.Add(string.Format("供应商编码【{0}】零件编号【{1}】有填写为空!", p_excel.供应商编号, p_excel.零件编码)); + } + else + { + if (p_excel.币种 != "CNY"&& p_excel.币种 != "EUR" && p_excel.币种 != "USD") + { + ErrorList.Add(string.Format("供应商编号为【{0}】的零件编号【{1}】币种填写错误,只能是CNY或者EUR或者USD!", p_excel.供应商编号, p_excel.零件编码)); + } + var Site = db.TB_FACTORY.Where(p=>p.ErpSite== p_excel.域).FirstOrDefault(); + var _first = db.TA_PART.Where(p => p.PartCode == p_excel.零件编码 &&p.Site== p_excel.域).FirstOrDefault(); + if (_first == null) + { + ErrorList.Add(string.Format("供应商编号为【{0}】的零件编号【{1}】零件表里无数据,无法导入!", p_excel.供应商编号, p_excel.零件编码)); + } + else + { + p_excel.单位 = _first.Unit; + if (_first.State == "SP") + { + ErrorList.Add(string.Format("零件编号【{0}】状态为SP,无法导入!", p_excel.零件编码)); + } + } + + p_excel.供应商编号 = !string.IsNullOrEmpty(p_excel.供应商编号) ? p_excel.供应商编号.Trim() : string.Empty; + + var _count = db.TA_VENDER.Where(p => p.VendId == p_excel.供应商编号&&p.Site== p_excel.域).Count(); + if (_count == 0) + { + ErrorList.Add(string.Format("未找到供应商编号为【{0}】无法导入!", p_excel.供应商编号)); + } + + + DateTime st = DateTime.Parse(p_excel.开始时间); + DateTime et = DateTime.Parse(p_excel.结束时间); + DateTime st_st = Convert.ToDateTime(st.ToShortDateString()); + DateTime et_st = Convert.ToDateTime(et.ToShortDateString()); + var _Site = new SqlParameter("@Site", p_excel.域); + var _SubSite = new SqlParameter("@SubSite", p_excel.地点); + var _VendId = new SqlParameter("@VendId", p_excel.供应商编号); + var _PartCode = new SqlParameter("@PartCode", p_excel.零件编码); + if (st > et) + { + ErrorList.Add(string.Format("供应商{0}零件编号{1}的结束时间需要大于开始时间!", p_excel.供应商编号, p_excel.零件编码)); + } + //var price = db.TB_PRICE.Count(p => p.PartCode == p_excel.零件编码.Trim() && p.VendId == p_excel.供应商编号.Trim() && p.StartTime == st && p.EndTime == et && p.Site == p_excel.域&&p.State!=-1); + //if (price > 0) + //{ + // ErrorList.Add(string.Format("供应商{0}零件编号{1}价格单已经存在!", p_excel.供应商编号, p_excel.零件编码)); + //} + string check = "select * from tb_price where uid in\n" + + "(\n" + + " select max(uid) uid\n" + + " from tb_price WHERE\n" + + " state<>-1 and Site=@Site AND SubSite=@SubSite AND VendId =@VendId AND PartCode=@PartCode \n" + + " group by vendid,partcode,subsite,site\n" + + ") "; + var _price = db.Database.SqlQuery(check, _Site, _SubSite, _VendId, _PartCode).FirstOrDefault(); + + if (_price != null) + { + ErrorList.Add(string.Format("供应商{0}零件编号{1}价格单已经存在,如要修改价格单信息请到价格单修改菜单进行操作!", p_excel.供应商编号, p_excel.零件编码)); + //if (st_st < Convert.ToDateTime(_price.StartTime.Value.ToShortDateString()) || st_st > et_st || st_st == et_st)//更新价格时间判断 + //{ + // ErrorList.Add(string.Format("供应商{0}零件编号{1}开始时间结束时间不正确!", p_excel.供应商编号, p_excel.零件编码)); + //} + //if (st_st > Convert.ToDateTime(_price.StartTime.Value.ToShortDateString()))//添加价格记录时间判断 + //{ + // if (st.ToShortDateString() != (_price.EndTime.Value.AddDays(1)).ToShortDateString()) + // { + // ErrorList.Add(string.Format("供应商{0}零件编号{1}开始日期必须为{2}", p_excel.供应商编号, p_excel.零件编码, _price.EndTime.Value.AddDays(1).ToShortDateString().Replace("-", "/"))); + // } + // if (_price.State != (int)PriceState.FConfirm) + // { + // ErrorList.Add(string.Format("供应商{0}零件编号{1},新添价格的上期价格不是审批状态", p_excel.供应商编号, p_excel.零件编码)); + // } + + + //} + } + + } + return ErrorList; + } + /// + /// 零件导入验证 + /// + /// + /// + /// + private static List CheckExcelMode_Part(ScpEntities db, SCP_PART_EXPORT p_excel) + { + List ErrorList = new List(); + //if (!string.IsNullOrEmpty(p_excel.零件编号)) + //{ + // int count = db.TA_PART.Count(p => p.PartCode == p_excel.零件编号&&p.Site== site); + // if (count > 0) + // { + // ErrorList.Add(string.Format("零件编号{0}已经存在!", p_excel.零件编号)); + // } + //} + //else + //{ + // ErrorList.Add(string.Format("零件编号为空!")); + //} + if ( + string.IsNullOrEmpty(p_excel.零件编号) || + string.IsNullOrEmpty(p_excel.单位) || + string.IsNullOrEmpty(p_excel.状态) || + string.IsNullOrEmpty(p_excel.零件名称) || + string.IsNullOrEmpty(p_excel.项目编号) || + string.IsNullOrEmpty(p_excel.域) || string.IsNullOrEmpty(p_excel.零件类型)) + { + ErrorList.Add(string.Format("零件编号【{0}】有填写为空!", p_excel.零件编号)); + } + return ErrorList; + } + /// + /// 订单导入检查 + /// + /// + /// + /// + private static List CheckExcelMode_Po(ScpEntities db, SCP_PO_EXPORT_IMPORT_MODEL p_excel, BillModType p_modtype, string site, string subsite = null) + { + List ErrorList = new List(); + + decimal _result = 0; + if (!decimal.TryParse(p_excel.数量, out _result)) + { + ErrorList.Add(string.Format("订单编号【{0}】零件编号【{1}】数量填写有问题", p_excel.订单编号, p_excel.数量)); + } + + //var _checkpartcode = db.TA_PART.Count(p => p.PartCode == p_excel.零件号&&p.State.ToUpper()!="SP"); + //if (_checkpartcode == 0) + //{ + // ErrorList.Add(string.Format("订单编号为【{0}】的零件编号【{1}】零件表里无数据,无法导入!", p_excel.订单编号,p_excel.零件号 )); + //} + + var _checkpart = db.TA_PART.FirstOrDefault(p => p.PartCode == p_excel.零件号&&p.Site== site); + if (_checkpart != null) + { + if (_checkpart.State.ToUpper() != "SP") + { + p_excel.单位 = _checkpart.Unit; + } + else + { + ErrorList.Add(string.Format("订单编号为【{0}】的零件编号【{1}】零件表零件停用,无法导入!", p_excel.订单编号, p_excel.零件号)); + } + } + var _checkpart1= db.TA_PART.Count(p => p.PartCode == p_excel.零件号 && p.Site == site); + if (_checkpart1 == 0) + { + ErrorList.Add(string.Format("订单编号为【{0}】的零件编号【{1}】零件表里无数据,无法导入!", p_excel.订单编号, p_excel.零件号)); + } + + + DateTime _d = DateTime.Now; + + #region 日程单验证 + + + + if (p_modtype == BillModType.Contract) + { + if (string.IsNullOrEmpty(p_excel.订单编号) || string.IsNullOrEmpty(p_excel.行号) || string.IsNullOrEmpty(p_excel.订单创建时间) || + string.IsNullOrEmpty(p_excel.要求到货日期) || string.IsNullOrEmpty(p_excel.零件号) || string.IsNullOrEmpty(p_excel.数量) || + string.IsNullOrEmpty(p_excel.税率)) + { + ErrorList.Add(string.Format("分组【{1}】零件名称【{0}】有填写为空!", p_excel.零件号, p_excel.订单编号)); + } + else + { + if (!string.IsNullOrEmpty(p_excel.备注)&&p_excel.备注.Length > 50) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的备注长度必须小于50", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (!string.IsNullOrEmpty(p_excel.零件截至日期)) + { + DateTime year = DateTime.Parse(p_excel.零件截至日期); + if (year.Year > 2049) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的零件截止日期必须大于等于2049年!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + } + if (!string.IsNullOrEmpty(p_excel.订单截至日期)) + { + DateTime year = DateTime.Parse(p_excel.订单截至日期); + if (year.Year > 2049) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的订单截止日期必须大于等于2049年!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + } + string _ponumber = p_excel.供应商编号.ToUpper() + subsite.Substring(1, 1) + subsite.Substring(3, 1); + if (p_excel.订单编号.ToUpper() != _ponumber.ToUpper()) + { + ErrorList.Add(string.Format("订单编号【{0}】行号【{1}】零件号【{2}】的订单编号不正确,请更换订单编号!", p_excel.订单编号, p_excel.行号, p_excel.零件号)); + } + + int _polinr = Int32.Parse(p_excel.行号); + var _partlist = db.TB_PO_DETAIL.Where(p => p.PoBillNum == p_excel.订单编号 && p.PartCode == p_excel.零件号 && p.PoLine != _polinr).ToList(); + if (_partlist.Count > 0) + { + ErrorList.Add(string.Format("订单编号【{0}】零件号【{1}】已经存在(系统:行号-【{2}】),请更换零件号!", p_excel.订单编号, p_excel.零件号, _partlist[0].PoLine)); + } + int linecount = db.TB_PO_DETAIL.Count(p => p.PoBillNum == p_excel.订单编号 && p.PoLine == _polinr && p.PartCode != p_excel.零件号); + if (linecount > 0) + { + ErrorList.Add(string.Format("订单编号【{0}】行号【{1}】已经存在,请更换行号!", p_excel.订单编号, p_excel.行号)); + } + var checkcount = db.TB_PRICE.Where(p => p.PartCode == p_excel.零件号 && p.Site == site && p.SubSite == subsite && p.State != (int)PriceState.Reject && p.VendId == p_excel.供应商编号 && p.StartTime <= DateTime.Now && DateTime.Now <= p.EndTime).ToList(); + if (checkcount.Count == 0) + { + ErrorList.Add(string.Format("零件名称【{0}】供应编码【{1}】价格表没有维护信息!", p_excel.零件号, p_excel.供应商编号)); + } + else + { + p_excel.单价 = checkcount[0].Amt.ToString(); + p_excel.单位 = checkcount[0].Unit; + p_excel.币种 = checkcount[0].Curr; + } + if (string.IsNullOrEmpty(p_excel.订单类型)) + { + ErrorList.Add(string.Format("订单编号【{0}】行号【{1}】订单类型为空,委外订单填 S,普通订单填 M!", p_excel.订单编号, p_excel.行号)); + } + if (p_excel.数量 != "0") + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的要货数量应该为零!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (DateTime.TryParse(p_excel.订单创建时间, out _d) && DateTime.TryParse(p_excel.订单创建时间, out _d)) + { + if (DateTime.Parse(p_excel.要求到货日期) < DateTime.Parse(p_excel.订单创建时间)) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】要求到货日期不能小于订单创建时间日期!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + + } + else + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的订单创建日期或要求到货日期要求为文本格式!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + //if (DateTime.Parse(p_excel.零件开始时间) > DateTime.Parse(p_excel.零件截至日期)) + //{ + // ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】零件截止日期不能小于零件开始日期!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + //} + //if (DateTime.Parse(p_excel.零件开始时间) < DateTime.Parse(p_excel.订单创建时间)) + //{ + // ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】零件开始时间不能小于订单创建时间!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + //} + //if (DateTime.Parse(p_excel.零件截至日期) > DateTime.Parse(p_excel.要求到货日期)) + //{ + // ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】零件截至日期不能大于要求到货日期!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + //} + if (!Regex.IsMatch(p_excel.税率, "^[0-9]{1,2}$")) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】税率最大应为2位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + //if (!string.IsNullOrEmpty(p_excel.订单类型)) + //{ + // if (p_excel.订单类型.ToUpper() == "S") + // { + // if (string.IsNullOrEmpty(p_excel.加工单号) || !Regex.IsMatch(p_excel.加工单号, "^[0-9]{1,8}$")) + // { + // ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】加工单最大8位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + // } + // if (string.IsNullOrEmpty(p_excel.工序) || !Regex.IsMatch(p_excel.工序, "^[0-9]{1,6}$")) + // { + // ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】工序最大6位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + // } + // } + // else + // { + // ErrorList.Add(string.Format("{0}订单类型必须填写为S为转包订单,不填写为正常订单", p_excel.订单编号)); + // } + // //注释结束 + + //} + if (!string.IsNullOrEmpty(p_excel.库位) && p_excel.库位.Length > 8) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】库位最大8位字符!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (!string.IsNullOrEmpty(p_excel.固定天数) && !Regex.IsMatch(p_excel.固定天数, "^[0-9]{1,4}$")) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】固定天数最大4位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (!string.IsNullOrEmpty(p_excel.日程天数) && !Regex.IsMatch(p_excel.日程天数, "^[0-9]{1,3}$")) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】日程天数最大3位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (!string.IsNullOrEmpty(p_excel.日程周数) && !Regex.IsMatch(p_excel.日程周数, "^[0-9]{1,3}$")) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】日程周数最大3位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (!string.IsNullOrEmpty(p_excel.日程月数) && !Regex.IsMatch(p_excel.日程月数, "^[0-9]{1,3}$")) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】日程月数最大3位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (!string.IsNullOrEmpty(p_excel.发货样式) && p_excel.发货样式.Length > 2) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】发货样式最大2位字符!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (!string.IsNullOrEmpty(p_excel.发货时间样式) && p_excel.发货时间样式.Length > 2) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】发货时间样式最大2位字符!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (!string.IsNullOrEmpty(p_excel.运输周期) && !Regex.IsMatch(p_excel.运输周期, "^[0-9]{1,3}$")) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】运输周期最大3位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (!string.IsNullOrEmpty(p_excel.库位) && p_excel.库位.Length > 8) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】库位最大8位字符!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + } + } + #endregion + #region 离散单验证 + + + if (p_modtype == BillModType.Non_Contract) + { + //if (!string.IsNullOrEmpty(p_excel.订单编号)) + //{ + // int count = db.TB_PO.Count(p => p.PoBillNum == p_excel.订单编号); + // if (count > 0) + // { + // ErrorList.Add(string.Format("订单编号{0}已经存在!", p_excel.订单编号)); + // } + //} + //else + //{ + // ErrorList.Add(string.Format("订单编号为空!")); + //} + if (/*string.IsNullOrEmpty(p_excel.订单编号) || string.IsNullOrEmpty(p_excel.行号) ||*/string.IsNullOrEmpty(p_excel.订单截至日期) || + string.IsNullOrEmpty(p_excel.要求到货日期) || string.IsNullOrEmpty(p_excel.零件号) || string.IsNullOrEmpty(p_excel.数量) || + string.IsNullOrEmpty(p_excel.订单创建时间) || string.IsNullOrEmpty(p_excel.税率)) + { + ErrorList.Add(string.Format("分组【{1}】零件名称【{0}】有填写为空!", p_excel.零件号, p_excel.订单编号)); + } + else + { + if (!string.IsNullOrEmpty(p_excel.备注) && p_excel.备注.Length > 50) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的备注长度必须小于50", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + decimal a = decimal.Parse(p_excel.数量); + if (a <= 0) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的数量不能小于等于0", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (!string.IsNullOrEmpty(p_excel.零件截至日期)) + { + DateTime year = DateTime.Parse(p_excel.零件截至日期); + if (year.Year > 2049) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的零件截止日期必须大于等于2049年!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + } + if (!string.IsNullOrEmpty(p_excel.订单截至日期)) + { + DateTime year =DateTime.Parse(p_excel.订单截至日期); + if (year.Year > 2049) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的订单截止日期必须大于等于2049年!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + } + var checkcount = db.TB_PRICE.Where(p => p.PartCode == p_excel.零件号 && p.Site == site && p.SubSite == subsite && p.State == (int)PriceState.FConfirm && p.VendId == p_excel.供应商编号 && p.StartTime <= DateTime.Now && DateTime.Now <= p.EndTime).ToList(); + if (checkcount.Count == 0) + { + ErrorList.Add(string.Format("零件名称【{0}】供应编码【{1}】价格表没有维护信息!", p_excel.零件号, p_excel.供应商编号)); + } + else + { + p_excel.单价 = checkcount[0].Amt.ToString(); + p_excel.单位 = checkcount[0].Unit; + p_excel.币种 = checkcount[0].Curr; + } + if (!Regex.IsMatch(p_excel.税率, "^[0-9]{1,2}$")) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】税率最大2位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (DateTime.TryParse(p_excel.订单创建时间, out _d) && DateTime.TryParse(p_excel.订单创建时间, out _d)) + { + if (DateTime.Parse(p_excel.要求到货日期) < DateTime.Parse(p_excel.订单创建时间)) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】要求到货日期不能小于订单创建时间日期!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + } + else + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的订单创建日期或要求到货日期要求为文本格式!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + //if (DateTime.Parse(p_excel.零件开始时间) > DateTime.Parse(p_excel.零件截至日期)) + //{ + // ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】零件截止日期不能小于零件开始日期!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + //} + //if (DateTime.Parse(p_excel.零件开始时间) < DateTime.Parse(p_excel.订单创建时间)) + //{ + // ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】零件开始时间不能小于订单创建时间!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + //} + //if (DateTime.Parse(p_excel.零件截至日期) > DateTime.Parse(p_excel.要求到货日期)) + //{ + // ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】零件截至日期不能大于要求到货日期!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + //} + if (!string.IsNullOrEmpty(p_excel.订单类型)) + { + if (p_excel.订单类型.ToUpper() != "S" && p_excel.订单类型.ToUpper() != "M") + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的订单类型只能为M或S!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + //注释结束 + if (p_excel.订单类型.ToUpper() == "S") + { + if (string.IsNullOrEmpty(p_excel.加工单号) || !Regex.IsMatch(p_excel.加工单号, "^[0-9]{1,8}$")) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】加工单最大8位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (string.IsNullOrEmpty(p_excel.工序) || !Regex.IsMatch(p_excel.工序, "^[0-9]{1,6}$")) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】工序最大6位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + } + + + + + } + if (!string.IsNullOrEmpty(p_excel.库位) && p_excel.库位.Length > 8) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】库位最大8位字符!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + } + } + #endregion + return ErrorList; + } + //重庆订单导入验证 + private static List CheckExcelMode_Po_CQ(ScpEntities db, SCP_PO_EXPORT_IMPORT_MODEL p_excel, BillModType p_modtype, string site , string subsite ) + { + List ErrorList = new List(); + + decimal _result = 0; + if (!decimal.TryParse(p_excel.数量, out _result)) + { + ErrorList.Add(string.Format("订单编号【{0}】零件编号【{1}】数量填写有问题", p_excel.订单编号, p_excel.数量)); + } + + //var _checkpartcode = db.TA_PART.Count(p => p.PartCode == p_excel.零件号&&p.State.ToUpper()!="SP"); + //if (_checkpartcode == 0) + //{ + // ErrorList.Add(string.Format("订单编号为【{0}】的零件编号【{1}】零件表里无数据,无法导入!", p_excel.订单编号,p_excel.零件号 )); + //} + + var _checkpart = db.TA_PART.FirstOrDefault(p => p.PartCode == p_excel.零件号&&p.Site== site); + if (_checkpart != null) + { + if (_checkpart.State.ToUpper() != "SP") + { + p_excel.单位 = _checkpart.Unit; + } + else + { + ErrorList.Add(string.Format("订单编号为【{0}】的零件编号【{1}】零件表零件停用,无法导入!", p_excel.订单编号, p_excel.零件号)); + } + } + var _checkpart1 = db.TA_PART.Count(p => p.PartCode == p_excel.零件号 && p.Site == site); + if (_checkpart1 == 0) + { + + ErrorList.Add(string.Format("订单编号为【{0}】的零件编号【{1}】零件表里无数据,无法导入!", p_excel.订单编号, p_excel.零件号)); + } + + + DateTime _d = DateTime.Now; + + #region 日程单验证 + + + + if (p_modtype == BillModType.Contract) + { + if (string.IsNullOrEmpty(p_excel.订单编号) || string.IsNullOrEmpty(p_excel.行号) || string.IsNullOrEmpty(p_excel.订单创建时间) || + string.IsNullOrEmpty(p_excel.要求到货日期) || string.IsNullOrEmpty(p_excel.零件号) || string.IsNullOrEmpty(p_excel.数量) || + string.IsNullOrEmpty(p_excel.税率)) + { + ErrorList.Add(string.Format("分组【{1}】零件名称【{0}】有填写为空!", p_excel.零件号, p_excel.订单编号)); + } + else + { + if (!string.IsNullOrEmpty(p_excel.备注) && p_excel.备注.Length > 50) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的备注长度必须小于50", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (!string.IsNullOrEmpty(p_excel.零件截至日期)) + { + DateTime year = DateTime.Parse(p_excel.零件截至日期); + if (year.Year > 2049) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的零件截止日期必须大于等于2049年!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + } + if (!string.IsNullOrEmpty(p_excel.订单截至日期)) + { + DateTime year = DateTime.Parse(p_excel.订单截至日期); + if (year.Year > 2049) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的订单截止日期必须大于等于2049年!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + } + var pode = db.TB_PO_DETAIL.Count(p=>p.PoBillNum== p_excel.订单编号&&p.PartCode==p_excel.零件号); + if (pode > 0) + { + ErrorList.Add(string.Format("订单号【{1}】零件号【{0}】已存在!", p_excel.零件号, p_excel.订单编号)); + } + //string _ponumber = p_excel.供应商编号.ToUpper() + subsite.Substring(1, 1) + subsite.Substring(3, 1); + //if (p_excel.订单编号.ToUpper() != _ponumber.ToUpper()) + //{ + // ErrorList.Add(string.Format("订单编号【{0}】行号【{1}】零件号【{2}】的订单编号不正确,请更换订单编号!", p_excel.订单编号, p_excel.行号, p_excel.零件号)); + //} + + int _polinr = Int32.Parse(p_excel.行号); + var _partlist = db.TB_PO_DETAIL.Where(p => p.PoBillNum == p_excel.订单编号 && p.PartCode == p_excel.零件号 && p.PoLine != _polinr).ToList(); + if (_partlist.Count > 0) + { + ErrorList.Add(string.Format("订单编号【{0}】零件号【{1}】已经存在(系统:行号-【{2}】),请更换零件号!", p_excel.订单编号, p_excel.零件号, _partlist[0].PoLine)); + } + int linecount = db.TB_PO_DETAIL.Count(p => p.PoBillNum == p_excel.订单编号 && p.PoLine == _polinr && p.PartCode != p_excel.零件号); + if (linecount > 0) + { + ErrorList.Add(string.Format("订单编号【{0}】行号【{1}】已经存在,请更换行号!", p_excel.订单编号, p_excel.行号)); + } + var checkcount = db.TB_PRICE.Where(p => p.PartCode == p_excel.零件号 && p.Site == site && p.SubSite == subsite && p.State != (int)PriceState.Reject && p.VendId == p_excel.供应商编号 && p.StartTime <= DateTime.Now && DateTime.Now <= p.EndTime).ToList(); + if (checkcount.Count == 0) + { + ErrorList.Add(string.Format("零件编号【{0}】供应编码【{1}】价格表没有维护信息!", p_excel.零件号, p_excel.供应商编号)); + } + else + { + p_excel.单价 = checkcount[0].Amt.ToString(); + p_excel.单位 = checkcount[0].Unit; + p_excel.币种 = checkcount[0].Curr; + } + + if (p_excel.数量 != "0") + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的要货数量应该为零!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (DateTime.TryParse(p_excel.订单创建时间, out _d) && DateTime.TryParse(p_excel.订单创建时间, out _d)) + { + if (DateTime.Parse(p_excel.要求到货日期) < DateTime.Parse(p_excel.订单创建时间)) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】要求到货日期不能小于订单创建时间日期!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + + } + else + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的订单创建日期或要求到货日期要求为文本格式!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + //if (DateTime.Parse(p_excel.零件开始时间) > DateTime.Parse(p_excel.零件截至日期)) + //{ + // ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】零件截止日期不能小于零件开始日期!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + //} + //if (DateTime.Parse(p_excel.零件开始时间) < DateTime.Parse(p_excel.订单创建时间)) + //{ + // ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】零件开始时间不能小于订单创建时间!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + //} + //if (DateTime.Parse(p_excel.零件截至日期) > DateTime.Parse(p_excel.要求到货日期)) + //{ + // ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】零件截至日期不能大于要求到货日期!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + //} + if (!Regex.IsMatch(p_excel.税率, "^[0-9]{1,2}$")) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】税率最大应为2位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + //if (!string.IsNullOrEmpty(p_excel.订单类型)) + //{ + // if (p_excel.订单类型.ToUpper() == "S") + // { + // if (string.IsNullOrEmpty(p_excel.加工单号) || !Regex.IsMatch(p_excel.加工单号, "^[0-9]{1,8}$")) + // { + // ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】加工单最大8位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + // } + // if (string.IsNullOrEmpty(p_excel.工序) || !Regex.IsMatch(p_excel.工序, "^[0-9]{1,6}$")) + // { + // ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】工序最大6位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + // } + // } + // else + // { + // ErrorList.Add(string.Format("{0}订单类型必须填写为S为转包订单,不填写为正常订单", p_excel.订单编号)); + // } + // //注释结束 + + //} + if (!string.IsNullOrEmpty(p_excel.库位) && p_excel.库位.Length > 8) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】库位最大8位字符!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (!string.IsNullOrEmpty(p_excel.固定天数) && !Regex.IsMatch(p_excel.固定天数, "^[0-9]{1,4}$")) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】固定天数最大4位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (!string.IsNullOrEmpty(p_excel.日程天数) && !Regex.IsMatch(p_excel.日程天数, "^[0-9]{1,3}$")) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】日程天数最大3位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (!string.IsNullOrEmpty(p_excel.日程周数) && !Regex.IsMatch(p_excel.日程周数, "^[0-9]{1,3}$")) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】日程周数最大3位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (!string.IsNullOrEmpty(p_excel.日程月数) && !Regex.IsMatch(p_excel.日程月数, "^[0-9]{1,3}$")) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】日程月数最大3位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (!string.IsNullOrEmpty(p_excel.发货样式) && p_excel.发货样式.Length > 2) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】发货样式最大2位字符!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (!string.IsNullOrEmpty(p_excel.发货时间样式) && p_excel.发货时间样式.Length > 2) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】发货时间样式最大2位字符!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (!string.IsNullOrEmpty(p_excel.运输周期) && !Regex.IsMatch(p_excel.运输周期, "^[0-9]{1,3}$")) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】运输周期最大3位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (!string.IsNullOrEmpty(p_excel.库位) && p_excel.库位.Length > 8) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】库位最大8位字符!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + } + } + #endregion + #region 离散单验证 + + + if (p_modtype == BillModType.Non_Contract) + { + //if (!string.IsNullOrEmpty(p_excel.订单编号)) + //{ + // int count = db.TB_PO.Count(p => p.PoBillNum == p_excel.订单编号); + // if (count > 0) + // { + // ErrorList.Add(string.Format("订单编号{0}已经存在!", p_excel.订单编号)); + // } + //} + //else + //{ + // ErrorList.Add(string.Format("订单编号为空!")); + //} + if (/*string.IsNullOrEmpty(p_excel.订单编号) || string.IsNullOrEmpty(p_excel.行号) ||*/string.IsNullOrEmpty(p_excel.订单截至日期) || + string.IsNullOrEmpty(p_excel.要求到货日期) || string.IsNullOrEmpty(p_excel.零件号) || string.IsNullOrEmpty(p_excel.数量) || + string.IsNullOrEmpty(p_excel.订单创建时间) || string.IsNullOrEmpty(p_excel.税率)) + { + ErrorList.Add(string.Format("分组【{1}】零件名称【{0}】有填写为空!", p_excel.零件号, p_excel.订单编号)); + } + else + { + if (!string.IsNullOrEmpty(p_excel.备注) && p_excel.备注.Length > 50) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的备注长度必须小于50", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + decimal a = decimal.Parse(p_excel.数量); + if (a <= 0) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的数量不能小于等于0", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (!string.IsNullOrEmpty(p_excel.零件截至日期)) + { + DateTime year = DateTime.Parse(p_excel.零件截至日期); + if (year.Year > 2049) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的零件截止日期必须大于等于2049年!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + } + if (!string.IsNullOrEmpty(p_excel.订单截至日期)) + { + DateTime year = DateTime.Parse(p_excel.订单截至日期); + if (year.Year > 2049) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的订单截止日期必须大于等于2049年!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + } + var checkcount = db.TB_PRICE.Where(p => p.PartCode == p_excel.零件号 && p.Site == site && p.SubSite == subsite && p.State == (int)PriceState.FConfirm && p.VendId == p_excel.供应商编号 && p.StartTime <= DateTime.Now && DateTime.Now <= p.EndTime).ToList(); + if (checkcount.Count == 0) + { + ErrorList.Add(string.Format("零件编号【{0}】供应编码【{1}】价格表没有维护信息!", p_excel.零件号, p_excel.供应商编号)); + } + else + { + p_excel.单价 = checkcount[0].Amt.ToString(); + p_excel.单位 = checkcount[0].Unit; + p_excel.币种 = checkcount[0].Curr; + } + if (!Regex.IsMatch(p_excel.税率, "^[0-9]{1,2}$")) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】税率最大2位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (DateTime.TryParse(p_excel.订单创建时间, out _d) && DateTime.TryParse(p_excel.订单创建时间, out _d)) + { + if (DateTime.Parse(p_excel.要求到货日期) < DateTime.Parse(p_excel.订单创建时间)) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】要求到货日期不能小于订单创建时间日期!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + } + else + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的订单创建日期或要求到货日期要求为文本格式!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + //if (DateTime.Parse(p_excel.零件开始时间) > DateTime.Parse(p_excel.零件截至日期)) + //{ + // ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】零件截止日期不能小于零件开始日期!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + //} + //if (DateTime.Parse(p_excel.零件开始时间) < DateTime.Parse(p_excel.订单创建时间)) + //{ + // ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】零件开始时间不能小于订单创建时间!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + //} + //if (DateTime.Parse(p_excel.零件截至日期) > DateTime.Parse(p_excel.要求到货日期)) + //{ + // ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】零件截至日期不能大于要求到货日期!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + //} + if (!string.IsNullOrEmpty(p_excel.订单类型)) + { + if (p_excel.订单类型.ToUpper() != "S" && p_excel.订单类型.ToUpper() != "M") + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的订单类型只能为M或S!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + //注释结束 + if (p_excel.订单类型.ToUpper() == "S") + { + if (string.IsNullOrEmpty(p_excel.加工单号) || !Regex.IsMatch(p_excel.加工单号, "^[0-9]{1,8}$")) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】加工单最大8位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + if (string.IsNullOrEmpty(p_excel.工序) || !Regex.IsMatch(p_excel.工序, "^[0-9]{1,6}$")) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】工序最大6位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + } + + + + + } + if (!string.IsNullOrEmpty(p_excel.库位) && p_excel.库位.Length > 8) + { + ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】库位最大8位字符!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); + } + } + } + #endregion + return ErrorList; + } + /// + /// 北京安通林 + /// + /// + /// + /// + /// + /// + /// + public static ResultObject EXCEL_PO_TO_ASK_MOD(List p_order_list, string p_creator, string p_buyer, DateTime p_time, BillModType p_modtype, bool IsAutoPublish = false) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + p_order_list.ForEach(p => + { + if (string.IsNullOrEmpty(p.订单数)) + { + p.订单数 = "0"; + } + }); + + int number = 1; + List lineError = new List(); + List ErrorList = new List(); + var _lst = p_order_list.Where(p => p.订单数 != "0").ToList(); + _lst.ForEach + (p => + { + var _ls = CheckExcelMode(db, p); + if (_ls.Count > 0) + { + lineError.Add(number.ToString()); + ErrorList.Add(string.Join("
", _ls.ToArray())); + } + number++; + }); + if (lineError.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.MessageList.AddRange(ErrorList); + _ret.Result = false; + } + else + { + var VenderList = _lst.Select(p => p.供应商编码).Distinct(); + var PartCodeList = _lst.Select(p => p.零件编码).Distinct(); + var OrderList = _lst.GroupBy(p => new { p.订单编号, p.订货日期 }).ToList(); + OrderList.ForEach((p) => + { + var list = p.ToList(); + if (list.Count > 0) + { + var _entity = list.FirstOrDefault(); + TB_ASK _ask = new TB_ASK(); + _ask.AskBillNum = SCP_BILLCODE_CONTROLLER.MakeASKCode(); + _ask.VendId = _entity.供应商编码; + _ask.State = (int)AskState.New; + _ask.PoBillNum = _entity.订单编号; + _ask.ModType = (int)BillModType.Contract; + _ask.Site = _entity.域名; + _ask.SubSite = _entity.地点; + if (IsAutoPublish) + { + _ask.State = (int)AskState.Release; + } + else + { + _ask.State = (int)AskState.New; + } + _ask.BeginTime = DateTime.Parse(_entity.订货日期); + _ask.Buyer = p_buyer; + _ask.BuyerPhone = _entity.计划员电话; + _ask.ErpBillNum = _entity.订单编号; + _ask.EndTime = DateTime.Parse(_entity.到货日期); + _ask.CreateTime = DateTime.Now; + _ask.CreateUser = p_creator; + _ask.VendId = _entity.供应商编码; + _ask.GUID = Guid.NewGuid(); + _ask.ReceivedPort = _entity.收货口; + _ask.IsDeleted = false; + db.TB_ASK.Add(_ask); + #region 供应商新任务代办接口 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "供应商"; + _item.ITEM_NO = _ask.AskBillNum; + _item.ITEM_CONTENT = "要货看盘有信息"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.NEW_ASK; + _item.VEND_ID = _ask.VendId; + _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + _item.SENDER = _entity.计划员; + _item.SENDING_TIME = DateTime.Now; + db.TB_PENING_ITEMS.Add(_item); + #endregion + // int _number = 1; + List _ls = new List(); + list.ForEach((itm) => + { + var _number = _ls.Count(p1 => p1.PoBillNum == _ask.PoBillNum + && p1.PoLine == Int32.Parse(itm.行号) && p1.PartCode == itm.零件编码 && itm.域名 == p1.Remark); + if (_number > 0) + { + _ret.MessageList.Add(string.Format("已经存在订单为{0}行号为{1}零件编码为{2}", itm.订单编号, itm.行号, itm.零件编码)); + } + + TB_ASK_DETAIL _t_ASK_Detail = new TB_ASK_DETAIL(); + //_t_ASK_Detail.PoLine = _number; + _t_ASK_Detail.PoLine = Int32.Parse(itm.行号); + _t_ASK_Detail.Currency = itm.币种; + _t_ASK_Detail.AskBillNum = _ask.AskBillNum; + _t_ASK_Detail.PoBillNum = _ask.PoBillNum; + _t_ASK_Detail.PoUnit = itm.单位; + _t_ASK_Detail.CreateTime = DateTime.Now; + _t_ASK_Detail.CreateUser = _ask.CreateUser; + _t_ASK_Detail.PartCode = itm.零件编码; + _t_ASK_Detail.BeginTime = DateTime.Parse(itm.订货日期); + _t_ASK_Detail.EndTime = DateTime.Parse(itm.到货日期); + _t_ASK_Detail.TempQty = decimal.Parse(itm.订单数); + _t_ASK_Detail.AskQty = decimal.Parse(itm.订单数); + _t_ASK_Detail.IsDeleted = false; + _t_ASK_Detail.LocUnit = itm.单位; + _t_ASK_Detail.UnConv = 1; + _t_ASK_Detail.Site = _ask.Site; + _t_ASK_Detail.SubSite = _ask.SubSite; + _t_ASK_Detail.DockCode = itm.收货口; + _t_ASK_Detail.State = _ask.State; + _t_ASK_Detail.Price = string.IsNullOrEmpty(itm.价格) ? 0 : decimal.Parse(itm.价格); + _t_ASK_Detail.GUID = Guid.NewGuid(); + _t_ASK_Detail.Remark = _ask.Site; + db.TB_ASK_DETAIL.Add(_t_ASK_Detail); + _ls.Add(_t_ASK_Detail); + // _number++; + }); + + } + else + { + _ret.MessageList.Add("ERP订单编号已存在,请重新导入!"); + + } + if (_ret.MessageList.Count == 0) + { + int state = db.SaveChanges(); + if (state != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + ); + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + + } + + + /// + /// 北汽模塑 + /// + /// + /// + /// + /// + /// + /// + public static ResultObject EXCEL_PO_TO_ASK_MOD_BJMS(List p_order_list, string p_creator, string str1, string p_buyer, DateTime p_time, BillModType p_modtype, bool IsAutoPublish = false) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + p_order_list.ForEach(p => + { + if (string.IsNullOrEmpty(p.订单数)) + { + p.订单数 = "0"; + } + }); + + int number = 1; + List lineError = new List(); + List ErrorList = new List(); + var _lst = p_order_list.Where(p => p.订单数 != "0").ToList(); + _lst.ForEach + (p => + { + var _ls = CheckExcelMode(db, p); + if (_ls.Count > 0) + { + lineError.Add(number.ToString()); + ErrorList.Add(string.Join("
", _ls.ToArray())); + } + number++; + }); + if (lineError.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.MessageList.AddRange(ErrorList); + _ret.Result = false; + } + else + { + var VenderList = _lst.Select(p => p.供应商编码).Distinct(); + var PartCodeList = _lst.Select(p => p.零件编码).Distinct(); + var OrderList = _lst.GroupBy(p => new { p.订单编号, p.订货日期 }).ToList(); + OrderList.ForEach((p) => + { + var list = p.ToList(); + if (list.Count > 0) + { + var _entity = list.FirstOrDefault(); + TB_ASK _ask = new TB_ASK(); + _ask.AskBillNum = SCP_BILLCODE_CONTROLLER.MakeASKCode(); + _ask.VendId = _entity.供应商编码; + _ask.State = (int)AskState.New; + _ask.PoBillNum = _entity.订单编号; + _ask.ModType = (int)BillModType.Contract; + _ask.Site = _entity.域名; + _ask.SubSite = _entity.地点; + if (IsAutoPublish) + { + _ask.State = (int)AskState.Release; + } + else + { + _ask.State = (int)AskState.New; + } + _ask.BeginTime = DateTime.Parse(_entity.订货日期); + _ask.Buyer = p_buyer; + _ask.BuyerPhone = _entity.计划员电话; + _ask.ErpBillNum = _entity.订单编号; + _ask.EndTime = DateTime.Parse(_entity.到货日期); + _ask.CreateTime = DateTime.Now; + _ask.CreateUser = p_creator; + _ask.VendId = _entity.供应商编码; + _ask.GUID = Guid.NewGuid(); + _ask.ReceivedPort = _entity.收货口; + _ask.IsDeleted = false; + _ask.Extend1 = str1; + _ask.Remark = _entity.备注; + db.TB_ASK.Add(_ask); + #region 供应商新任务代办接口 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "供应商"; + _item.ITEM_NO = _ask.AskBillNum; + _item.ITEM_CONTENT = "要货看盘有信息"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.NEW_ASK; + _item.VEND_ID = _ask.VendId; + _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + _item.SENDER = _entity.计划员; + _item.SENDING_TIME = DateTime.Now; + db.TB_PENING_ITEMS.Add(_item); + #endregion + // int _number = 1; + List _ls = new List(); + list.ForEach((itm) => + { + var _number = _ls.Count(p1 => p1.PoBillNum == _ask.PoBillNum + && p1.PoLine == Int32.Parse(itm.行号) && p1.PartCode == itm.零件编码 && itm.域名 == p1.Remark); + if (_number > 0) + { + _ret.MessageList.Add(string.Format("已经存在订单为{0}行号为{1}零件编码为{2}", itm.订单编号, itm.行号, itm.零件编码)); + } + + TB_ASK_DETAIL _t_ASK_Detail = new TB_ASK_DETAIL(); + //_t_ASK_Detail.PoLine = _number; + _t_ASK_Detail.PoLine = Int32.Parse(itm.行号); + _t_ASK_Detail.Currency = itm.币种; + _t_ASK_Detail.AskBillNum = _ask.AskBillNum; + _t_ASK_Detail.PoBillNum = _ask.PoBillNum; + _t_ASK_Detail.PoUnit = itm.单位; + _t_ASK_Detail.CreateTime = DateTime.Now; + _t_ASK_Detail.CreateUser = _ask.CreateUser; + _t_ASK_Detail.PartCode = itm.零件编码; + _t_ASK_Detail.BeginTime = DateTime.Parse(itm.订货日期); + _t_ASK_Detail.EndTime = DateTime.Parse(itm.到货日期); + _t_ASK_Detail.TempQty = decimal.Parse(itm.订单数); + _t_ASK_Detail.AskQty = decimal.Parse(itm.订单数); + _t_ASK_Detail.IsDeleted = false; + _t_ASK_Detail.LocUnit = itm.单位; + _t_ASK_Detail.UnConv = 1; + _t_ASK_Detail.Site = _ask.Site; + _t_ASK_Detail.SubSite = _ask.SubSite; + _t_ASK_Detail.DockCode = itm.收货口; + _t_ASK_Detail.State = _ask.State; + _t_ASK_Detail.Price = string.IsNullOrEmpty(itm.价格) ? 0 : decimal.Parse(itm.价格); + _t_ASK_Detail.GUID = Guid.NewGuid(); + _t_ASK_Detail.Remark = _ask.Site; + db.TB_ASK_DETAIL.Add(_t_ASK_Detail); + _ls.Add(_t_ASK_Detail); + // _number++; + }); + + } + else + { + _ret.MessageList.Add("ERP订单编号已存在,请重新导入!"); + + } + if (_ret.MessageList.Count == 0) + { + int state = db.SaveChanges(); + if (state != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + ); + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + + } + /// + /// 供应商零件导入 + /// + /// + /// + /// + /// + public static ResultObject EXCEL_VENDER_PART_MOD(List p_order_list, string p_creator) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + int number = 1; + List lineError = new List(); + List ErrorList = new List(); + var _lst = p_order_list; + _lst.ForEach(p => + { + var _count = _lst.Count(itm => itm.供应商代码 == p.供应商代码 && itm.零件号 == p.零件号 && itm.域 == p.域); + if (_count > 1) + { + lineError.Add(string.Format("导入的域{2}供应商{0}零件编号{1}有重复", p.供应商代码, p.零件号, p.域)); + ErrorList = lineError; + } + }); + _lst.ForEach(p => + { + var _ls = CheckExcelMode_VenderPart(db, p); + if (_ls.Count > 0) + { + lineError.Add(number.ToString()); + ErrorList.Add(string.Join("
", _ls.ToArray())); + } + number++; + }); + if (lineError.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.MessageList.AddRange(ErrorList); + _ret.Result = false; + } + else + { + _lst.ForEach(p => + { + var _venderpart = db.TA_VEND_PART.SingleOrDefault(t => t.VendId == p.供应商代码.ToUpper() && t.PartCode == p.零件号.ToUpper() && t.Site == p.域) ?? + new TA_VEND_PART + { + VendId = p.供应商代码.ToUpper(), + PartCode = p.零件号.ToUpper(), + State = 1, + CreateTime = DateTime.Now, + CreateUser = p_creator, + IsDeleted = false, + GUID = System.Guid.NewGuid(), + Site = p.域, + }; + _venderpart.VendPartCode = p.零件号.ToUpper(); + _venderpart.VendPackQty = decimal.Parse(p.标包数); + //_venderpart.MinPackQty = decimal.Parse(p.小包装数); + //_venderpart.PalletPackQty = decimal.Parse(p.托盘包装数); + _venderpart.PoUnit = p.单位; + _venderpart.Remark = ""; + _venderpart.VendPartCode = p.供应商零件号.ToUpper(); + _venderpart.UpdateTime = DateTime.Now; + _venderpart.UpdateUser = p_creator; + db.TA_VEND_PART.AddOrUpdate(_venderpart); + }); + if (_ret.MessageList.Count == 0) + { + int state = db.SaveChanges(); + if (state != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_VENDER_PART_MOD", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_VENDER_PART_MOD", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_VENDER_PART_MOD", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_VENDER_PART_MOD", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + /// + /// 供应商导入 + /// + /// + /// + /// + /// + public static ResultObject EXCEL_VENDER_MOD(List p_order_list, string p_creator) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + int number = 1; + List lineError = new List(); + List ErrorList = new List(); + var _lst = p_order_list; + _lst.ForEach(p => + { + var _count = _lst.Count(itm => itm.供应商编号 == p.供应商编号 && itm.域 == p.域); + if (_count > 1) + { + lineError.Add(string.Format("导入零件域{1}编号{0}有重复", p.供应商编号, p.域)); + ErrorList = lineError; + } + }); + _lst.ForEach(p => + { + var _ls = CheckExcelMode_Vender(db, p); + if (_ls.Count > 0) + { + lineError.Add(number.ToString()); + ErrorList.Add(string.Join("
", _ls.ToArray())); + } + number++; + }); + if (lineError.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.MessageList.AddRange(ErrorList); + _ret.Result = false; + } + else + { + _lst.ForEach(p => + { + var _vender = db.TA_VENDER.SingleOrDefault(t => t.VendId == p.供应商编号.ToUpper() && t.Site == p.域) ?? + new TA_VENDER { VendId = p.供应商编号.ToUpper(), State = 1, Site = p.域 }; + _vender.VendName = p.供应商名称; + _vender.VendAbbCode = string.IsNullOrEmpty(p.供应商缩写) ? "0" : p.供应商缩写; + _vender.VendType = p.供应商类型; + _vender.Country = p.国家; + _vender.City = p.城市; + _vender.Currency = p.币种; + _vender.Address = p.地址; + _vender.ZipCode = p.邮编; + _vender.Contacter = p.联系人; + _vender.Phone = p.电话; + _vender.Fax = p.传真; + _vender.Remark = p.备注; + _vender.Tax = Convert.ToDecimal(p.税率); + db.TA_VENDER.AddOrUpdate(_vender); + }); + if (_ret.MessageList.Count == 0) + { + int state = db.SaveChanges(); + if (state != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_VENDER_MOD", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_VENDER_MOD", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_VENDER_MOD", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_VENDER_MOD", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + public static List CheckMode_MoldSharing(ScpEntities db, SCP_PRICE_EXPORT p_excel) + { + List ErrorList = new List(); + + int count = db.TA_MoldSharing.Count(p => p.VendId == p_excel.供应商编号.ToUpper() && p.Site == p_excel.域 && p.PartCode == p_excel.零件编码.ToUpper() && p.Count != 0); + if (count > 0) + { + ErrorList.Add(string.Format("供应商{0}零件编码{1}已存在分摊数据,不可修改分摊价格和数量!", p_excel.供应商编号, p_excel.零件编码)); + } + return ErrorList; + } + /// + /// 价格导入 + /// + /// + /// + /// + /// + public static ResultObject EXCEL_PRICE_MOD(List p_order_list, string p_createuser, List p_rolelist) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + int number = 1; + List lineError = new List(); + List ErrorList = new List(); + var _lst = p_order_list; + int _state = (int)PriceState.New; + _lst.ForEach + (p => + { + var _count = _lst.Count(itm => itm.域 == p.域 && itm.地点 == p.地点 && itm.供应商编号 == p.供应商编号 && itm.零件编码 == p.零件编码); + if (_count > 1) + { + lineError.Add(string.Format("导入的模板供应商编号{0}零件编号{3}有重复,请修改时间!", p.供应商编号, p.开始时间, p.结束时间, p.零件编码)); + ErrorList = lineError; + } + + var _ls = CheckExcelMode_Price(db, p); + if (_ls.Count > 0) + { + lineError.Add(number.ToString()); + ErrorList.Add(string.Join("
", _ls.ToArray())); + } + number++; + }); + var _sharinglist = _lst.Where(t => !string.IsNullOrEmpty(t.供应商编号) && !string.IsNullOrEmpty(t.零件编码) && t.累计分摊价格 != "0" && t.累计分摊数量 != "0" && !string.IsNullOrEmpty(t.累计分摊价格) && !string.IsNullOrEmpty(t.累计分摊数量)).ToList().DistinctBy(x => new { x.供应商编号, x.零件编码, x.累计分摊价格, x.累计分摊数量, x.域 }).ToList(); + if (_sharinglist.Count > 0) + { + _sharinglist.ForEach(p => + { + var _ls = CheckMode_MoldSharing(db, p); + if (_ls.Count > 0) + { + lineError.Add(number.ToString()); + ErrorList.Add(string.Join("
", _ls.ToArray())); + } + number++; + }); + } + if (lineError.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.MessageList.AddRange(ErrorList); + _ret.Result = false; + } + else + { + _lst.ForEach(p => + { + var _price = new TB_PRICE(); + string starttime = DateTime.Parse(p.开始时间).ToShortDateString(); + string endtime = DateTime.Parse(p.结束时间).ToShortDateString(); + DateTime st = DateTime.Parse(p.开始时间); + + DateTime et = DateTime.Parse(p.结束时间); + #region 201909011修改 + var _Site = new SqlParameter("@Site", p.域); + var _SubSite = new SqlParameter("@SubSite", p.地点); + var _VendId = new SqlParameter("@VendId", p.供应商编号); + var _PartCode = new SqlParameter("@PartCode", p.零件编码); + string sqlString = "select * from tb_price where uid in\n" + + "(\n" + + " select max(uid) uid\n" + + " from tb_price WHERE\n" + + " state<>-1 and Site=@Site AND SubSite=@SubSite AND VendId =@VendId AND PartCode=@PartCode \n" + + " group by vendid,partcode,subsite,site\n" + + ") "; + var updaet_price = db.Database.SqlQuery(sqlString, _Site, _SubSite, _VendId, _PartCode).FirstOrDefault(); + #endregion + if (updaet_price != null && updaet_price.StartTime.Value == st) + { + _price = updaet_price; + } + _price.State = _state; + _price.VendId = p.供应商编号.Trim(); + _price.PartCode = p.零件编码.Trim(); + _price.StartTime = DateTime.Parse(starttime); + _price.EndTime = DateTime.Parse(endtime); + _price.Curr = p.币种; + _price.Unit = p.单位; + _price.Amt = decimal.Parse(p.零件基础价格); + _price.Site = p.域.Trim(); + _price.SubSite = p.地点.Trim(); + _price.Remarks = p.备注; + _price.TemporaryPrice = Int32.Parse(p.是否临时价格); + _price.Creator = p_createuser; + _price.IsPost = 0; + + _price.EndTime = (_price.EndTime > DateTime.Parse("2049-12-31")) ? DateTime.Parse("2049-12-31") : _price.EndTime; + + //_price.IsDeleted = false; + //_price.CreateUser = p_createuser; + //_price.CreateTime = DateTime.Now; + //_price.GUID = Guid.NewGuid(); + db.TB_PRICE.AddOrUpdate(_price); + }); + _sharinglist.ForEach(p => + { + var _moldsharing = db.TA_MoldSharing.SingleOrDefault(t => t.VendId == p.供应商编号.ToUpper() && t.PartCode == p.零件编码.ToUpper() && t.Site == p.域) ?? + new TA_MOLDSHARING + { + VendId = p.供应商编号.ToUpper().Trim(), + PartCode = p.零件编码.ToUpper().Trim(), + CreateTime = DateTime.Now, + CreateUser = p_createuser, + IsDeleted = false, + Count = 0, + }; + _moldsharing.Price = decimal.Round((decimal.Parse(p.累计分摊价格) / decimal.Parse(p.累计分摊数量)), 2); + _moldsharing.Qty = decimal.Parse(p.累计分摊数量); + _moldsharing.UpdateTime = DateTime.Now; + _moldsharing.UpdateUser = p_createuser; + _moldsharing.TotalPrice = decimal.Parse(p.累计分摊价格); + _moldsharing.Site = p.域; + db.TA_MoldSharing.AddOrUpdate(_moldsharing); + }); + if (_ret.MessageList.Count == 0) + { + int state = db.SaveChanges(); + if (state != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PRICE_MOD", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PRICE_MOD", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PRICE_MOD", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PRICE_MOD", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + _ret.MessageList.Add(e.Message); + //throw e; + } + return _ret; + } + /// + /// 零件导入 + /// + /// + /// + /// + /// + public static ResultObject EXCEL_PART_MOD(List p_order_list, string p_creator) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + int number = 1; + List lineError = new List(); + List ErrorList = new List(); + var _lst = p_order_list; + _lst.ForEach(p => + { + var _count = _lst.Count(itm => itm.零件编号 == p.零件编号 && itm.域 == p.域); + if (_count > 1) + { + lineError.Add(string.Format("导入零件域{1}编号{0}有重复", p.零件编号, p.域)); + ErrorList = lineError; + } + }); + _lst.ForEach + (p => + { + var _ls = CheckExcelMode_Part(db, p); + if (_ls.Count > 0) + { + lineError.Add(number.ToString()); + ErrorList.Add(string.Join("
", _ls.ToArray())); + } + number++; + }); + if (lineError.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.MessageList.AddRange(ErrorList); + _ret.Result = false; + } + else + { + _lst.ForEach(p => + { + var _part = db.TA_PART.SingleOrDefault(t => t.PartCode == p.零件编号.ToUpper() && t.Site == p.域) ?? + new TA_PART { PartCode = p.零件编号.ToUpper(), Site = p.域 }; + _part.PartCode = p.零件编号; + _part.ErpPartCode = p.零件编号; + _part.PartDesc1 = p.零件名称; + _part.PartDesc2 = ""; + _part.ProjectId = p.项目编号; + _part.Unit = p.单位; + _part.PartGroup = p.零件类型; + _part.State = p.状态; + _part.Remark = p.备注; + db.TA_PART.AddOrUpdate(_part); + }); + if (_ret.MessageList.Count == 0) + { + int state = db.SaveChanges(); + if (state != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PART_MOD", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PART_MOD", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PART_MOD", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PART_MOD", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + public static ResultObject EXCEL_PRICE_MOD1(List p_order_list, string p_createuser, List p_rolelist) + { + ResultObject _ret = new ResultObject(); + try + { + int number = 1; + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + List lineError = new List(); + List ErrorList = new List(); + var _lst = p_order_list; + + _lst.ForEach + (p => + { + var _count = _lst.Count(itm => itm.供应商编号 == p.供应商编号 && itm.零件编码 == p.零件编码); + if (_count > 1) + { + lineError.Add(string.Format("导入的模板供应商编号{0}零件编号{3}有重复,请修改时间!", p.供应商编号, p.开始时间, p.结束时间, p.零件编码)); + ErrorList = lineError; + } + + }); + + + _lst.ForEach(p => + { + var _ls = CheckExcelMode_Vender1(db, p); + if (_ls.Count > 0) + { + lineError.Add(number.ToString()); + ErrorList.Add(string.Join("
", _ls.ToArray())); + } + number++; + }); + + if (lineError.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.MessageList.AddRange(ErrorList); + _ret.Result = false; + } + else + { + + _lst.ForEach(p => + { + string starttime = Convert.ToDateTime(p.最新开始时间).ToShortDateString(); + string endtime = Convert.ToDateTime(p.最新结束时间).ToShortDateString(); + var _vender = db.TB_PRICE.SingleOrDefault(t => t.VendId == p.供应商编号.ToUpper() && t.PartCode == p.零件编码 && t.UID.ToString() == p.标识 && t.SubSite == p.地点 && t.Site == p.域); + if (_vender == null) + { + lineError.Add(string.Format("供应商编号{0}零件编号{3}数据不存在", p.供应商编号, p.开始时间, p.结束时间, p.零件编码)); + ErrorList = lineError; + } + if (DateTime.Parse(p.最新开始时间)< DateTime.Parse(p.结束时间) && DateTime.Parse(p.最新开始时间) >DateTime.Parse(p.开始时间)) + { + + _vender.EndTime = Convert.ToDateTime(DateTime.Parse(starttime).AddDays(-1)); + _vender.Extend3 = "价格表修改"; + var _PR = db.V_TB_PRICE.FirstOrDefault(t => t.VendId == p.供应商编号.ToUpper() && t.PartCode == p.零件编码 && t.UID.ToString() == p.标识 && t.SubSite == p.地点 && t.Site == p.域); + if (_PR != null) + { + TS_UNI_API TS = new TS_UNI_API(); + TS.InterfaceType = "Price"; + TS.BillNum = (_PR.VendId + _PR.SubSite.Substring(1, 1) + _PR.SubSite.Substring(3, 1)).Trim(); + TS.PartCode = _PR.PartCode; + if (_PR.TemporaryPrice == 0) + { + TS.Batch = "No"; + } + else + { + TS.Batch = "Yes"; + } + TS.Qty = _PR.Amt + _PR.SharingPrice; + TS.Price = _PR.Amt; + TS.State = 1; + TS.ValidDate = DateTime.Now; + TS.ErpLineNum = 1; + TS.Domain = _PR.Site;//域 + TS.Site = _PR.SubSite;//地点 + TS.Extend1 = _PR.Remarks; + TS.CreateTime = Convert.ToDateTime(_PR.StartTime);//开始时间 + TS.PutTime = Convert.ToDateTime(DateTime.Parse(starttime).AddDays(-1));//结束时间 + TS.CreateOper = _PR.Creator; + TS.Currency = _PR.Curr;//货币 + var _first = db.TA_PART.Where(itm => itm.PartCode == p.零件编码).FirstOrDefault(); + if (_first != null) + { + TS.PoUnit = _first.Unit; + } + else + { + TS.PoUnit = _PR.Unit;//单位 + } + db.TS_UNI_API.Add(TS); + } + + db.TB_PRICE.AddOrUpdate(_vender); + } + TB_PRICE tb = new TB_PRICE(); + tb.State = 0; + tb.Extend3 = "价格表修改增加"; + tb.VendId = p.供应商编号; + tb.PartCode = p.零件编码; + tb.Curr = p.币种; + tb.Unit = p.单位; + tb.Remarks = p.备注; + tb.Amt = Convert.ToDecimal(p.零件最新价格); + tb.Site = p.域; + tb.SubSite = p.地点; + tb.StartTime = Convert.ToDateTime(starttime); + tb.EndTime = Convert.ToDateTime(endtime); + tb.Creator = p_createuser; + tb.IsPost = 0; + tb.TemporaryPrice = Int32.Parse(p.是否临时价格); + db.TB_PRICE.Add(tb); + }); + + + if (_ret.MessageList.Count == 0) + { + + db.BulkSaveChanges(); + + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + //} + //else + //{ + // _ret.State = ReturnStatus.Failed; + // _ret.Result = false; + //} + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + + + + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PRICE_MOD", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PRICE_MOD", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PRICE_MOD", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PRICE_MOD", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + _ret.MessageList.Add(e.Message); + //throw e; + } + return _ret; + } + /// + /// 订单导入 + /// + /// + /// + /// + /// + /// + /// + public static ResultObject EXCEL_PO_MOD(List p_order_list, string site, string p_creator, DateTime p_time, BillModType p_modtype, string subsite) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + int number = 1; + List lineError = new List(); + List ErrorList = new List(); + var _lst = p_order_list; + _lst.ForEach(p => + { + var _count = _lst.Count(itm => itm.订单编号 == p.订单编号 && itm.行号 == p.行号); + if (_count > 1) + { + lineError.Add(string.Format("导入订单编号{0}行号{1}有重复", p.订单编号, p.行号)); + ErrorList = lineError; + } + }); + _lst.ForEach(p => + { + var _count = _lst.Count(itm => itm.订单编号 == p.订单编号 && itm.零件号 == p.零件号 && itm.行号 == p.行号); + if (_count > 1) + { + lineError.Add(string.Format("导入订单编号{0}行号{1}零件编码{2}有重复", p.订单编号, p.行号, p.零件号)); + ErrorList = lineError; + } + }); + + _lst.ForEach + (p => + { + var _ls = CheckExcelMode_Po(db, p, p_modtype,site); + if (_ls.Count > 0) + { + lineError.Add(number.ToString()); + ErrorList.Add(string.Join("
", _ls.ToArray())); + } + number++; + }); + if (lineError.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.MessageList.AddRange(ErrorList); + _ret.Result = false; + } + else + { + var OrderList = _lst.GroupBy(p => p.订单编号).ToList(); + OrderList.ForEach((p) => + { + var list = p.ToList(); + if (list.Count > 0) + { + var _entity = list.FirstOrDefault(); + TB_PO _po = new TB_PO(); + _po.PoBillNum = _entity.订单编号; + _po.ErpBillNum = _entity.订单编号; + _po.VendId = _entity.供应商编号.ToUpper(); + _po.ModType = (int)p_modtype; + _po.Contacter = _entity.联系人; + _po.Site = site; + _po.Remark = _entity.备注; + _po.State = (int)PoState.Open; + _po.GUID = Guid.NewGuid(); + _po.IsDeleted = false; + _po.CreateTime = DateTime.Parse(_entity.订单创建时间); + _po.CreateUser = p_creator; + _po.BeginTime = p_time; + _po.EndTime = DateTime.Parse(_entity.要求到货日期); + _po.Site = site; + _po.SubSite = subsite; + db.TB_PO.Add(_po); + // int _number = 1; + list.ForEach((itm) => + { + TB_PO_DETAIL _PO_Detail = new TB_PO_DETAIL(); + _PO_Detail.PoLine = Int32.Parse(itm.行号); + _PO_Detail.Currency = "CNY"; + _PO_Detail.PoBillNum = itm.订单编号; + _PO_Detail.PoUnit = itm.单位; + _PO_Detail.CreateTime = DateTime.Parse(itm.订单创建时间); + _PO_Detail.CreateUser = p_creator; + _PO_Detail.PartCode = itm.零件号; + _PO_Detail.BeginTime = DateTime.Parse(itm.零件开始时间); + _PO_Detail.EndTime = DateTime.Parse(itm.零件截至日期); + _PO_Detail.PlanQty = decimal.Parse(itm.数量); + _PO_Detail.IsDeleted = false; + _PO_Detail.LocUnit = itm.单位; + _PO_Detail.PoUnit = itm.单位; + _PO_Detail.UnConv = 1; + _PO_Detail.State = (int)PoState.Open; + _PO_Detail.Price = string.IsNullOrEmpty(itm.单价) ? 0 : decimal.Parse(itm.单价); + _PO_Detail.GUID = Guid.NewGuid(); + _PO_Detail.SubSite = subsite; + db.TB_PO_DETAIL.Add(_PO_Detail); + // _number++; + }); + } + else + { + _ret.MessageList.Add("ERP订单编号已存在,请重新导入!"); + return; + } + + if (_ret.MessageList.Count == 0) + { + int state = db.SaveChanges(); + if (state != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + ); + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + + } + public static ResultObject Check_PO_ASK(List p_list) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + List ErrorList = new List(); + var _ls = db.TB_ASK.Where(p => p_list.Contains(p.PoBillNum) && p.IsDeleted == false).ToList(); + if (_ls.Count > 0) + { + var polist = _ls.Select(p => p.PoBillNum).Distinct().ToList(); + polist.ForEach(t => + { + ErrorList.Add(string.Format("订单编号【{0}】已有要货看板无法关闭!", t)); + }); + } + if (ErrorList.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.MessageList.AddRange(ErrorList); + _ret.Result = false; + } + else + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Check_PO_ASK", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Check_PO_ASK", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Check_PO_ASK", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Check_PO_ASK", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + public static ResultObject Check_PO_ASK_Detail(List p_list, List p_list1) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + List ErrorList = new List(); + foreach(var po in p_list) + { + foreach(var po1 in p_list1) + { + var _ls = db.TB_ASK_DETAIL.Count(p =>p.PoBillNum==po&&p.PartCode==po1 && p.IsDeleted == false); + if (_ls > 0) + { + ErrorList.Add("订单号【{0}】零件号【{1}】已生成看板,不能关闭"); + } + } + } + if (ErrorList.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.MessageList.AddRange(ErrorList); + _ret.Result = false; + } + else + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Check_PO_ASK", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Check_PO_ASK", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Check_PO_ASK", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Check_PO_ASK", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + public static ResultObject Check_PO_ASK_Close_Detail(List p_list, List p_list1) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + List ErrorList = new List(); + foreach (var po in p_list) + { + foreach (var po1 in p_list1) + { + var _ls = db.TB_ASK_DETAIL.Count(p => p.PoBillNum == po && p.PartCode == po1 && p.IsDeleted == false); + if (_ls == 0) + { + ErrorList.Add("订单号【{0}】零件号【{1}】还没有对应的看板呢"); + } + } + } + if (ErrorList.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.MessageList.AddRange(ErrorList); + _ret.Result = false; + } + else + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Check_PO_ASK", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Check_PO_ASK", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Check_PO_ASK", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Check_PO_ASK", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + public static ResultObject Check_EXCEL_PO_MOD(List p_order_list, BillModType p_modtype, string site, string subsite) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + //int number = 1; + List lineError = new List(); + List ErrorList = new List(); + + + + + //var _cl = p_order_list.GroupBy(p => new { p.订单编号, p.供应商编号, p.订单创建时间, p.要求到货日期 }).ToList(); + //var _ctl = p_order_list.GroupBy(p => p.订单编号).ToList(); + //if (_cl.Count != _ctl.Count) + //{ + // lineError.Add("相同订单号下存在订单创建日期和要求到货日期不相同的数据!"); + // ErrorList = lineError; + //} + //注释结束 + var _lst = p_order_list; + var PoList = _lst.Select(itm => itm.订单编号).Distinct().ToList(); + foreach (var po in PoList) + { + var vendcount = _lst.Where(itm => itm.订单编号 == po).Select(itm => itm.供应商编号).Distinct().ToList(); + if (vendcount.Count() > 1) + { + lineError.Add(string.Format("导入订单编号【{0}】对应两个供应商了,麻烦修改", po)); + ErrorList = lineError; + } + } + p_order_list.ForEach(p => + { + var _count1 = _lst.Count(itm => itm.订单编号 == p.订单编号 && itm.行号 == p.行号); + var _count2 = _lst.Count(itm => itm.订单编号 == p.订单编号 && itm.零件号 == p.零件号); + if (_count1 > 1 && p_modtype == BillModType.Contract) + { + lineError.Add(string.Format("导入订单编号【{0}】行号【{1}】有重复", p.订单编号, p.行号)); + ErrorList = lineError; + } + if (_count2 > 1) + { + lineError.Add(string.Format("导入订单编号【{0}】零件编码【{1}】有重复", p.订单编号, p.零件号)); + ErrorList = lineError; + } + + + }); + p_order_list.ForEach + (p => + { + var _ls = CheckExcelMode_Po(db, p, p_modtype, site, subsite); + if (_ls.Count > 0) + { + ErrorList.Add(string.Join("
", _ls.ToArray())); + } + }); + if (ErrorList.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.MessageList.AddRange(ErrorList); + _ret.Result = false; + } + else + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + + } + public static ResultObject Check_EXCEL_PO_MOD_CQ(List p_order_list, BillModType p_modtype, string site, string subsite) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + int number = 1; + List lineError = new List(); + List ErrorList = new List(); + + + + + //var _cl = p_order_list.GroupBy(p => new { p.订单编号, p.供应商编号, p.订单创建时间, p.要求到货日期 }).ToList(); + //var _ctl = p_order_list.GroupBy(p => p.订单编号).ToList(); + //if (_cl.Count != _ctl.Count) + //{ + // lineError.Add("相同订单号下存在订单创建日期和要求到货日期不相同的数据!"); + // ErrorList = lineError; + //} + //注释结束 + var _lst = p_order_list; + var VenderList = _lst.Select(itm => itm.订单编号).Distinct().ToList(); + var PartCodeList = _lst.Select(itm => itm.供应商编号).Distinct().ToList(); + if (VenderList.Count != PartCodeList.Count) + { + lineError.Add(string.Format("存在多个供应商编号对应一个订单号")); + ErrorList = lineError; + } + p_order_list.ForEach(p => + { + var _count1 = _lst.Count(itm => itm.订单编号 == p.订单编号 && itm.行号 == p.行号); + var _count2 = _lst.Count(itm => itm.订单编号 == p.订单编号 && itm.零件号 == p.零件号); + + + if (_count1 > 1 && p_modtype == BillModType.Contract) + { + lineError.Add(string.Format("导入订单编号【{0}】行号【{1}】有重复", p.订单编号, p.行号)); + ErrorList = lineError; + } + if (_count2 > 1) + { + lineError.Add(string.Format("导入订单编号【{0}】零件编码【{1}】有重复", p.订单编号, p.零件号)); + ErrorList = lineError; + } + + }); + p_order_list.ForEach + (p => + { + var _ls = CheckExcelMode_Po_CQ(db, p, p_modtype, site, subsite); + if (_ls.Count > 0) + { + lineError.Add(number.ToString()); + ErrorList.Add(string.Join("
", _ls.ToArray())); + } + number++; + }); + if (lineError.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.MessageList.AddRange(ErrorList); + _ret.Result = false; + } + else + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + + } + public static ResultObject Save_EXCEL_PO_MOD(List p_order_list, string site, string p_creator, DateTime p_time, BillModType p_modtype, string subsite, string p_chineseName, string p_buyerPhone) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + List lineError = new List(); + List ErrorList = new List(); + var _lst = p_order_list; + string _polist = ""; + var OrderList = _lst.GroupBy(p => p.订单编号).ToList(); + OrderList.ForEach((p) => + { + var list = p.ToList(); + if (list.Count > 0) + { + #region 日程单 + if (p_modtype == BillModType.Contract) + { + var _entity = list.FirstOrDefault(); + var _po = db.TB_PO.SingleOrDefault(t => t.PoBillNum == _entity.订单编号/* && t.State == state*/ && t.Site == site && t.SubSite == subsite && t.VendId == _entity.供应商编号.ToUpper()) ?? + new TB_PO { GUID = Guid.NewGuid(), PoBillNum = _entity.订单编号.ToUpper(), State = (int)PoState.Open, Site = site, SubSite = subsite, VendId = _entity.供应商编号.ToUpper() }; + _po.ErpBillNum = _entity.订单编号.ToUpper(); + _po.ModType = (int)p_modtype; + _po.Contacter = p_chineseName;// _entity.联系人; + _po.Buyer = p_chineseName;// _entity.联系人; + _po.BuyerPhone = p_buyerPhone; + _po.Site = site; + _po.Remark = _entity.备注; + _po.IsDeleted = false; + _po.CreateTime = DateTime.Parse(_entity.订单创建时间); + _po.CreateUser = p_creator; + _po.BeginTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间); + _po.EndTime = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now.AddYears(30) : DateTime.Parse(_entity.要求到货日期); + _po.Pricelist = _entity.供应商编号.ToUpper() + subsite.Substring(1, 1) + subsite.Substring(3, 1); + _po.Taxclass = _entity.税率; + db.TB_PO.AddOrUpdate(_po); + list.ForEach((itm) => + { + int _poline = Int32.Parse(itm.行号); + var _PO_Detail = db.TB_PO_DETAIL.FirstOrDefault(t => t.PartCode == itm.零件号 && t.PoLine == _poline && t.PoBillNum == itm.订单编号 /*&& t.State == state*/ && t.Site == site && t.SubSite == subsite) ?? + new TB_PO_DETAIL { GUID = Guid.NewGuid(), PartCode = itm.零件号.ToUpper(), PoLine = _poline, PoBillNum = itm.订单编号.ToUpper(), State = (int)PoState.Open, Site = site, SubSite = subsite }; + _PO_Detail.Currency = "CNY"; + _PO_Detail.PoUnit = itm.单位; + _PO_Detail.CreateTime = DateTime.Parse(itm.订单创建时间); + _PO_Detail.CreateUser = p_creator; + _PO_Detail.BeginTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间); + _PO_Detail.EndTime = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now.AddYears(30) : DateTime.Parse(_entity.要求到货日期); + _PO_Detail.PlanQty = decimal.Parse(itm.数量); + _PO_Detail.IsDeleted = false; + _PO_Detail.LocUnit = itm.单位; + _PO_Detail.PoUnit = itm.单位; + _PO_Detail.UnConv = 1; + _PO_Detail.Price = string.IsNullOrEmpty(itm.单价) ? 0 : decimal.Parse(itm.单价); + _PO_Detail.Workorderlot = string.IsNullOrEmpty(itm.加工单号) ? 0 : int.Parse(itm.加工单号); + _PO_Detail.PoType = itm.订单类型; + _PO_Detail.Operation = string.IsNullOrEmpty(itm.工序) ? 0 : int.Parse(itm.工序); + _PO_Detail.Location = itm.库位; + _PO_Detail.Firmdays = string.IsNullOrEmpty(itm.固定天数) ? 7 : int.Parse(itm.固定天数); + _PO_Detail.Scheduledays = string.IsNullOrEmpty(itm.日程天数) ? 7 : int.Parse(itm.日程天数); + _PO_Detail.Scheduleweeks = string.IsNullOrEmpty(itm.日程周数) ? 2 : int.Parse(itm.日程周数); + _PO_Detail.Schedulemonth = string.IsNullOrEmpty(itm.日程月数) ? 1 : int.Parse(itm.日程月数); + _PO_Detail.Supplieritem = itm.供应商零件.ToUpper(); + _PO_Detail.Dliverypatterncode = itm.发货样式; + _PO_Detail.Deliverytimecode = itm.发货时间样式; + _PO_Detail.Transportdays = string.IsNullOrEmpty(itm.运输周期) ? 0 : int.Parse(itm.运输周期); + db.TB_PO_DETAIL.AddOrUpdate(_PO_Detail); + }); + _polist = _polist + _po.PoBillNum + ","; + } + #endregion + #region 离散单 + if (p_modtype == BillModType.Non_Contract) + { + var _entity = list.FirstOrDefault(); + TB_PO _po = new TB_PO(); + _po.GUID = Guid.NewGuid(); + _po.PoBillNum = SCP_BILLCODE_CONTROLLER.MakePoNum(); + _po.State = (int)PoState.Open; + _po.Site = site; + _po.SubSite = subsite; + _po.VendId = _entity.供应商编号.ToUpper(); + _po.ErpBillNum = _po.PoBillNum; + _po.ModType = (int)p_modtype; + _po.Contacter = p_chineseName;// _entity.联系人; + _po.Buyer = p_chineseName;// _entity.联系人; + _po.BuyerPhone = p_buyerPhone; + _po.Site = site; + _po.Remark = _entity.备注; + _po.IsDeleted = false; + _po.CreateTime = DateTime.Parse(_entity.订单创建时间); + _po.CreateUser = p_creator; + _po.BeginTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间); + _po.EndTime = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now.AddYears(30) : DateTime.Parse(_entity.要求到货日期); + _po.Pricelist = _entity.供应商编号.ToUpper() + subsite.Substring(1, 1) + subsite.Substring(3, 1); + _po.Taxclass = _entity.税率; + db.TB_PO.AddOrUpdate(_po); + TB_ASK _ask = new TB_ASK(); + _ask.AskBillNum = SCP_BILLCODE_CONTROLLER.MakeASKCode(); + _ask.GUID = Guid.NewGuid(); + _ask.PoBillNum = _po.PoBillNum; + _ask.VendId = _entity.供应商编号.ToUpper(); + _ask.IsDeleted = false; + _ask.CreateTime = DateTime.Now; + _ask.CreateUser = p_creator; + _ask.Site = site; + _ask.ReceivedPort = "";//交货口 + _ask.State = (int)AskState.New; + _ask.Remark = _entity.备注; + _ask.ModType = (int)p_modtype; + _ask.ErpBillNum = _po.PoBillNum; + _ask.BeginTime = p_time; + _ask.EndTime = DateTime.Parse(_entity.要求到货日期); + _ask.Buyer = p_chineseName; + _ask.BuyerPhone = p_buyerPhone; + _ask.SubSite = subsite; + db.TB_ASK.Add(_ask); + int _number = 1; + list.ForEach((itm) => + { + TB_PO_DETAIL _PO_Detail = new TB_PO_DETAIL(); + _PO_Detail.GUID = Guid.NewGuid(); + _PO_Detail.PartCode = itm.零件号.Trim().ToUpper(); + _PO_Detail.PoLine = _number; + _PO_Detail.PoBillNum = _po.PoBillNum; + _PO_Detail.State = (int)PoState.Open; + _PO_Detail.Site = site; + _PO_Detail.SubSite = subsite; + _PO_Detail.Currency = "CNY"; + _PO_Detail.PoUnit = itm.单位; + _PO_Detail.CreateTime = DateTime.Parse(itm.订单创建时间); + _PO_Detail.CreateUser = p_creator; + _PO_Detail.BeginTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间); + _PO_Detail.EndTime = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now.AddYears(30) : DateTime.Parse(_entity.要求到货日期); + _PO_Detail.PlanQty = decimal.Parse(itm.数量); + _PO_Detail.IsDeleted = false; + _PO_Detail.LocUnit = itm.单位; + _PO_Detail.PoUnit = itm.单位; + _PO_Detail.UnConv = 1; + _PO_Detail.Price = string.IsNullOrEmpty(itm.单价) ? 0 : decimal.Parse(itm.单价); + _PO_Detail.Workorderlot = string.IsNullOrEmpty(itm.加工单号) ? 0 : int.Parse(itm.加工单号); + _PO_Detail.PoType = itm.订单类型; + _PO_Detail.Operation = string.IsNullOrEmpty(itm.工序) ? 0 : int.Parse(itm.工序); + _PO_Detail.Location = itm.库位; + _PO_Detail.Firmdays = string.IsNullOrEmpty(itm.固定天数) ? 7 : int.Parse(itm.固定天数); + _PO_Detail.Scheduledays = string.IsNullOrEmpty(itm.日程天数) ? 7 : int.Parse(itm.日程天数); + _PO_Detail.Scheduleweeks = string.IsNullOrEmpty(itm.日程周数) ? 2 : int.Parse(itm.日程周数); + _PO_Detail.Schedulemonth = string.IsNullOrEmpty(itm.日程月数) ? 1 : int.Parse(itm.日程月数); + _PO_Detail.Supplieritem = itm.供应商零件; + _PO_Detail.Dliverypatterncode = itm.发货样式; + _PO_Detail.Deliverytimecode = itm.发货时间样式; + _PO_Detail.Transportdays = string.IsNullOrEmpty(itm.运输周期) ? 0 : int.Parse(itm.运输周期); + _PO_Detail.TempQty = decimal.Parse(itm.数量); + TB_ASK_DETAIL _tDetail = new TB_ASK_DETAIL(); + _tDetail.Remark = itm.备注; + _tDetail.PoBillNum = _po.PoBillNum; + _tDetail.AskBillNum = _ask.AskBillNum; + _tDetail.PoLine = _number; + _tDetail.PoUnit = itm.单位; + _tDetail.CreateTime = DateTime.Now; + _tDetail.CreateUser = p_creator; + _tDetail.PartCode = itm.零件号.Trim().ToUpper(); + _tDetail.ReceivedPort = ""; + _tDetail.BeginTime = p_time; + _tDetail.EndTime = Convert.ToDateTime(itm.要求到货日期); + _tDetail.TempQty = 0; + _tDetail.AskQty = Decimal.Parse(itm.数量); + _tDetail.IsDeleted = false; + _tDetail.LocUnit = itm.单位; + _tDetail.UnConv = 1; + _tDetail.State = (int)PoState.Open; + _tDetail.SubSite = subsite; + _tDetail.Site = site; + _tDetail.Price = Decimal.Parse(itm.单价); + _tDetail.GUID = Guid.NewGuid(); + _tDetail.Currency = itm.币种; + db.TB_ASK_DETAIL.Add(_tDetail); + db.TB_PO_DETAIL.AddOrUpdate(_PO_Detail); + _number++; + }); + _polist = _polist + _po.PoBillNum + "
"; + } + #endregion + } + else + { + _ret.MessageList.Add("ERP订单编号已存在,请重新导入!"); + return; + } + } + ); + if (_ret.MessageList.Count == 0) + { + int state = db.SaveChanges(); + if (state != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + _ret.Message = _polist; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + + } + public static List EXCEL_ASK_Check(List p_order_list) + { + List ErrorList = new List(); + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + p_order_list.ForEach + (p => + { + //var _ls = CheckExcel(db, p); + var _checkls = CheckExcelPackQty(db, p); + if (_checkls.Count > 0) + { + ErrorList.Add(string.Join("
", _checkls.ToArray())); + } + }); + } + return ErrorList; + } + public static ResultObject EXCEL_PO_TO_ASK(List p_order_list, string p_creator, string p_buyer, DateTime p_time, BillModType p_modtype, bool IsAutoPublish = false) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + int number = 1; + List lineError = new List(); + List ErrorList = new List(); + p_order_list.ForEach + (p => + { + var _ls = CheckExcel(db, p); + if (_ls.Count > 0) + { + lineError.Add(number.ToString()); + ErrorList.Add(string.Join("
", _ls.ToArray())); + } + number++; + + }); + if (lineError.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.MessageList.AddRange(ErrorList); + _ret.Result = false; + } + else + { + + + + var VenderList = p_order_list.Select(p => p.供应商编号).Distinct(); + var PartCodeList = p_order_list.Select(p => p.零件号).Distinct(); + var OrderList = p_order_list.GroupBy(p => p.分组编号).ToList(); + OrderList.ForEach((p) => + { + var list_distinct = p.GroupBy(t => new { t.零件号, t.行号 }).ToList(); + var list = p.ToList(); + if (list_distinct.Count < list.Count) + { + _ret.MessageList.Add("相同组号,存在同一编号、行号的数据"); + return; + } + if (list.Count > 0) + { + + var _entity = list.FirstOrDefault(); + TB_ASK _ask = new TB_ASK(); + _ask.AskBillNum = SCP_BILLCODE_CONTROLLER.MakeASKCode(); + _ask.VendId = _entity.要货地点; + _ask.State = (int)AskState.New; + _ask.PoBillNum = _entity.QAD订单号.ToUpper(); + _ask.ModType = (int)BillModType.Contract; + _ask.Site = _entity.要货地点; + if (IsAutoPublish) + { + _ask.State = (int)AskState.Release; + } + else + { + _ask.State = (int)AskState.New; + } + _ask.BeginTime = DateTime.Parse(_entity.订货日期); + _ask.Buyer = _entity.交货联系人; + _ask.BuyerPhone = _entity.交货联系人电话; + _ask.ErpBillNum = _entity.QAD订单号.ToUpper(); + _ask.EndTime = DateTime.Parse(_entity.要求到货日期); + _ask.CreateTime = DateTime.Parse(_entity.订货日期); + _ask.CreateUser = p_creator; + _ask.VendId = _entity.供应商编号.ToUpper(); + _ask.GUID = Guid.NewGuid(); + _ask.IsDeleted = false; + db.TB_ASK.Add(_ask); + + #region 供应商新任务代办接口 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "供应商"; + _item.ITEM_NO = _ask.AskBillNum; + _item.ITEM_CONTENT = "要货看盘有信息"; + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.NEW_ASK; + _item.VEND_ID = _ask.VendId; + _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + _item.SENDER = _entity.交货联系人; + _item.SENDING_TIME = DateTime.Now; + db.TB_PENING_ITEMS.Add(_item); + #endregion + + // int _number = 1; + list.ForEach((itm) => + { + TB_ASK_DETAIL _t_ASK_Detail = new TB_ASK_DETAIL(); + //_t_ASK_Detail.PoLine = _number; + _t_ASK_Detail.PoLine = Int32.Parse(itm.行号); + _t_ASK_Detail.Currency = itm.币种; + _t_ASK_Detail.AskBillNum = _ask.AskBillNum; + _t_ASK_Detail.PoBillNum = _ask.PoBillNum; + _t_ASK_Detail.PoUnit = itm.单位; + _t_ASK_Detail.CreateTime = DateTime.Now; + _t_ASK_Detail.CreateUser = _ask.CreateUser; + _t_ASK_Detail.PartCode = itm.零件号.ToUpper(); + _t_ASK_Detail.BeginTime = DateTime.Parse(itm.订货日期); + _t_ASK_Detail.EndTime = DateTime.Parse(itm.要求到货日期); + _t_ASK_Detail.TempQty = decimal.Parse(itm.数量); + _t_ASK_Detail.AskQty = decimal.Parse(itm.数量); + _t_ASK_Detail.IsDeleted = false; + _t_ASK_Detail.LocUnit = itm.单位; + _t_ASK_Detail.UnConv = 1; + _t_ASK_Detail.State = _ask.State; + _t_ASK_Detail.Price = string.IsNullOrEmpty(itm.价格) ? 0 : decimal.Parse(itm.价格); + _t_ASK_Detail.GUID = Guid.NewGuid(); + db.TB_ASK_DETAIL.Add(_t_ASK_Detail); + // _number++; + + }); + } + else + { + _ret.MessageList.Add("ERP订单编号已存在,请重新导入!"); + return; + } + + if (_ret.MessageList.Count == 0) + { + int state = db.SaveChanges(); + if (state != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + ); + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_TO_ASK", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + + } + + + public static ResultObject Save_PO_TO_ASK(V_TB_PO p_order, List p_order_list, string p_buyer, string p_buyerPhone, string p_creator) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + //foreach (var itm in p_order_list) + //{ + + // var checkcount = db.TB_PRICE.Where(p => p.PartCode == itm.PartCode && p.Site == itm.Site && p.SubSite == itm.SubSite && p.State == (int)PriceState.FConfirm && p.VendId == itm.VendId && p.StartTime <= DateTime.Now && DateTime.Now <= p.EndTime).ToList(); + // if (checkcount.Count == 0) + // { + + // _ret.MessageList.Add(string.Format("零件名称【{0}】供应编码【{1}】价格表没有信息或没财务审核!", itm.PartCode,p_order.VendId )); + // } + // else + // { + // itm.Price = checkcount[0].Amt; + // } + //} + TB_ASK _t = new TB_ASK(); + _t.AskBillNum = SCP_BILLCODE_CONTROLLER.MakeASKCode(); + _t.PoBillNum = p_order.PoBillNum; + _t.VendId = p_order.VendId; + _t.IsDeleted = false;//操作员 + _t.CreateTime = DateTime.Now; + _t.CreateUser = p_creator; + _t.Site = p_order.Site; + _t.ReceivedPort = p_order.ReceivedPort; + _t.Remark = p_order.Remark; + _t.State = (int)AskState.New; + _t.Remark = p_order.Remark; + _t.GUID = Guid.NewGuid(); + _t.ModType = (int)p_order.ModType; + _t.ErpBillNum = p_order.ErpBillNum; + _t.BeginTime = (DateTime)p_order.BeginTime; + var _date = p_order.BeginTime; + if (p_order_list.Count > 0) + { + _date = p_order_list[0].EndTime; + } + _t.EndTime = _date; + _t.Buyer = p_buyer; + _t.BuyerPhone = p_buyerPhone; + _t.SubSite = p_order.SubSite; + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _t); + List _list = new List(); + foreach (var itm in p_order_list) + { + TB_ASK_DETAIL _tDetail = new TB_ASK_DETAIL(); + _tDetail.Remark = _t.Remark; + _tDetail.PoBillNum = _t.PoBillNum; + _tDetail.AskBillNum = _t.AskBillNum; + _tDetail.PoLine = itm.PoLine; + _tDetail.PoUnit = itm.PoUnit; + _tDetail.CreateTime = DateTime.Now; + _tDetail.CreateUser = p_creator; + _tDetail.PartCode = itm.PartCode; + _tDetail.ReceivedPort = itm.ReceivedPort; + _tDetail.BeginTime = itm.BeginTime; + _tDetail.EndTime = itm.EndTime; + _tDetail.TempQty = itm.TempQty == null ? 0 : (decimal)itm.TempQty; + _tDetail.AskQty = (decimal)itm.PublishQty; + _tDetail.IsDeleted = false; + _tDetail.LocUnit = itm.LocUnit; + _tDetail.UnConv = itm.UnConv; + _tDetail.State = (int)p_order.State; + _tDetail.SubSite = itm.SubSite; + _tDetail.Site = itm.Site; + _tDetail.Price = itm.Price; + _tDetail.Remark = itm.Remark; + _tDetail.GUID = Guid.NewGuid(); + _tDetail.Currency = itm.Currency; + db.TB_ASK_DETAIL.Add(_tDetail); + var _order_detail = db.TB_PO_DETAIL.Where(p => p.UID == itm.UID).FirstOrDefault(); + _order_detail.TempQty = itm.TempQty; + db.TB_PO_DETAIL.AddOrUpdate(p => p.UID, _order_detail); + } + int state = db.SaveChanges(); + if (state != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Save_PO_TO_ASK", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Save_PO_TO_ASK", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Save_PO_TO_ASK", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Save_PO_TO_ASK", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + public static ResultObject Save_PO_TO_ASK_CQ(V_TB_PO p_order, List p_order_list, string p_buyer, string p_buyerPhone, string p_creator,string remark,string Ssite) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + //foreach (var itm in p_order_list) + //{ + + // var checkcount = db.TB_PRICE.Where(p => p.PartCode == itm.PartCode && p.Site == itm.Site && p.SubSite == itm.SubSite && p.State == (int)PriceState.FConfirm && p.VendId == itm.VendId && p.StartTime <= DateTime.Now && DateTime.Now <= p.EndTime).ToList(); + // if (checkcount.Count == 0) + // { + + // _ret.MessageList.Add(string.Format("零件名称【{0}】供应编码【{1}】价格表没有信息或没财务审核!", itm.PartCode,p_order.VendId )); + // } + // else + // { + // itm.Price = checkcount[0].Amt; + // } + //} + TB_ASK _t = new TB_ASK(); + _t.AskBillNum = SCP_BILLCODE_CONTROLLER.MakeASKCode(); + _t.PoBillNum = p_order.PoBillNum; + _t.VendId = p_order.VendId; + _t.IsDeleted = false;//操作员 + _t.CreateTime = DateTime.Now; + _t.CreateUser = p_creator; + _t.Site = p_order.Site; + _t.ReceivedPort = p_order.ReceivedPort; + _t.State = (int)AskState.New; + _t.Remark = remark; + _t.GUID = Guid.NewGuid(); + _t.ModType = (int)p_order.ModType; + _t.ErpBillNum = p_order.ErpBillNum; + _t.BeginTime = (DateTime)p_order.BeginTime; + var _date = p_order.BeginTime; + if (p_order_list.Count > 0) + { + _date = p_order_list[0].EndTime; + } + _t.EndTime = _date; + _t.Buyer = p_buyer; + _t.BuyerPhone = p_buyerPhone; + _t.SubSite = p_order.SubSite; + _t.Extend1 = Ssite; + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _t); + List _list = new List(); + foreach (var itm in p_order_list) + { + TB_ASK_DETAIL _tDetail = new TB_ASK_DETAIL(); + _tDetail.Remark = remark; + _tDetail.PoBillNum = _t.PoBillNum; + _tDetail.AskBillNum = _t.AskBillNum; + _tDetail.PoLine = itm.PoLine; + _tDetail.PoUnit = itm.PoUnit; + _tDetail.CreateTime = DateTime.Now; + _tDetail.CreateUser = p_creator; + _tDetail.PartCode = itm.PartCode; + _tDetail.ReceivedPort = itm.ReceivedPort; + _tDetail.BeginTime = itm.BeginTime; + _tDetail.EndTime = itm.EndTime; + _tDetail.TempQty = itm.TempQty == null ? 0 : (decimal)itm.TempQty; + _tDetail.AskQty = (decimal)itm.PublishQty; + _tDetail.IsDeleted = false; + _tDetail.LocUnit = itm.LocUnit; + _tDetail.UnConv = itm.UnConv; + _tDetail.State = (int)p_order.State; + _tDetail.SubSite = itm.SubSite; + _tDetail.Site = itm.Site; + if (itm.Site == "BJBMPT") + { + var price = db.TB_PRICE.Where(p => p.PartCode == itm.PartCode&&p.State>-1&&p.VendId== p_order.VendId).Max(p => p.UID); + var pri = db.TB_PRICE.FirstOrDefault(t=>t.UID==price); + _tDetail.Price = pri.Amt; + } + else + { + _tDetail.Price = itm.Price; + } + + _tDetail.Remark = itm.Remark; + _tDetail.GUID = Guid.NewGuid(); + _tDetail.Currency = itm.Currency; + db.TB_ASK_DETAIL.Add(_tDetail); + var _order_detail = db.TB_PO_DETAIL.Where(p => p.UID == itm.UID).FirstOrDefault(); + _order_detail.TempQty = itm.TempQty; + db.TB_PO_DETAIL.AddOrUpdate(p => p.UID, _order_detail); + } + int state = db.SaveChanges(); + if (state != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Save_PO_TO_ASK", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Save_PO_TO_ASK", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Save_PO_TO_ASK", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Save_PO_TO_ASK", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + public static void Get_V_TB_PO_DETAIL_OUTPUT_List(V_TB_PO_DETAIL p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_PO_DETAIL; + + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum == p_entity.PoBillNum); + } + if (!string.IsNullOrEmpty(p_entity.ErpBillNum)) + { + q = q.Where(p => p.ErpBillNum.Contains(p_entity.ErpBillNum)); + } + if (p_entity.BeginTime != null) + { + q = q.Where(p => p.BeginTime >= p_entity.BeginTime); + } + if (p_entity.EndTime != null) + { + q = q.Where(p => p.BeginTime <= p_entity.EndTime); + } + + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + + + if (p_entity.ModType != null) + { + q = q.Where(p => p.ModType == p_entity.ModType); + } + if (!string.IsNullOrEmpty(p_entity.ProjectId)) + { + q = q.Where(p => p.ProjectId.Contains(p_entity.ProjectId)); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (p_entity.State != null) + { + q = q.Where(p => p.State == p_entity.State); + } + //q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + + //IQueryable _aq = db.TB_ASK_DETAIL; + //_aq = _aq.Where(p => p.PoBillNum == p_entity.PoBillNum); + //var _a=_aq.GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode }).Select(p => new { AskSum = p.Max(itm=>itm .AskQty),PoLine=p.Key }); + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + if (p_entity.UserInSubSite != null && p_entity.UserInSubSite.Count > 0) + { + q = q.Where(p => p_entity.UserInSubSite.Contains(p.SubSite)); + } + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Get_V_TB_PO_DETAIL_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Get_V_TB_PO_DETAIL_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Get_V_TB_PO_DETAIL_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Get_V_TB_PO_DETAIL_List", e.Message); + throw e; + } + + } + + + + public static void Get_V_TB_PO_DETAIL_List(V_TB_PO_DETAIL p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_PO_DETAIL; + + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum == p_entity.PoBillNum); + } + if (!string.IsNullOrEmpty(p_entity.ErpBillNum)) + { + q = q.Where(p => p.ErpBillNum.Contains(p_entity.ErpBillNum)); + } + if (p_entity.BeginTime != null) + { + q = q.Where(p => p.BeginTime >= p_entity.BeginTime); + } + if (p_entity.EndTime != null) + { + q = q.Where(p => p.BeginTime <= p_entity.EndTime); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName == p_entity.VendName); + } + if (p_entity.ModType != null) + { + q = q.Where(p => p.ModType == p_entity.ModType); + } + if (!string.IsNullOrEmpty(p_entity.ProjectId)) + { + q = q.Where(p => p.ProjectId == p_entity.ProjectId); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode == p_entity.PartCode); + } + if (p_entity.State != null) + { + q = q.Where(p => p.State == p_entity.State); + } + //q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + + //IQueryable _aq = db.TB_ASK_DETAIL; + //_aq = _aq.Where(p => p.PoBillNum == p_entity.PoBillNum); + //var _a=_aq.GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode }).Select(p => new { AskSum = p.Max(itm=>itm .AskQty),PoLine=p.Key }); + if (p_entity.UserInAddress.FirstOrDefault() != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + if (p_entity.UserInSubSite != null && p_entity.UserInSubSite.Count > 0) + { + q = q.Where(p => p_entity.UserInSubSite.Contains(p.SubSite)); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Get_V_TB_PO_DETAIL_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Get_V_TB_PO_DETAIL_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Get_V_TB_PO_DETAIL_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Get_V_TB_PO_DETAIL_List", e.Message); + throw e; + } + + } + + + #region 沈阳金杯 + public static ResultObject Save_PO_TO_ASK_SYJB(V_TB_PO p_order, List p_order_list + , string p_buyer, string p_buyerPhone) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + TB_ASK _t = new TB_ASK(); + _t.AskBillNum = SCP_BILLCODE_CONTROLLER.MakeASKCode(); + _t.PoBillNum = p_order.PoBillNum; + _t.VendId = p_order.VendId; + _t.IsDeleted = false;//操作员 + _t.CreateTime = DateTime.Now; + _t.CreateUser = p_buyer; + _t.Site = p_order.Site; + _t.Remark = p_order.Remark; + _t.State = (int)AskState.Release; + _t.Remark = p_order.Remark; + _t.GUID = p_order.GUID; + _t.ModType = (int)p_order.ModType; + _t.ErpBillNum = p_order.ErpBillNum; + _t.BeginTime = (DateTime)p_order.BeginTime; + _t.EndTime = p_order.BeginTime; + _t.Buyer = p_buyer; + _t.BuyerPhone = p_buyerPhone; + db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _t); + List _list = new List(); + foreach (var itm in p_order_list) + { + TB_ASK_DETAIL _tDetail = new TB_ASK_DETAIL(); + _tDetail.PoBillNum = _t.PoBillNum; + _tDetail.AskBillNum = _t.AskBillNum; + _tDetail.PoLine = itm.PoLine; + _tDetail.PoUnit = itm.PoUnit; + _tDetail.CreateTime = DateTime.Now; + _tDetail.CreateUser = p_buyer; + _tDetail.PartCode = itm.PartCode; + _tDetail.BeginTime = itm.BeginTime; + _tDetail.EndTime = itm.EndTime; + _tDetail.Currency = itm.Currency; + _tDetail.TempQty = itm.TempQty == null ? 0 : (decimal)itm.TempQty; + _tDetail.AskQty = (decimal)itm.PlanQty; + _tDetail.IsDeleted = false; + _tDetail.LocUnit = itm.LocUnit; + _tDetail.UnConv = itm.UnConv; + _tDetail.State = (int)p_order.State; + _tDetail.Price = itm.Price; + _tDetail.GUID = itm.GUID; + db.TB_ASK_DETAIL.Add(_tDetail); + var _order_detail = db.TB_PO_DETAIL.Where(p => p.UID == itm.UID).FirstOrDefault(); + _order_detail.TempQty = itm.TempQty; + db.TB_PO_DETAIL.AddOrUpdate(p => p.UID, _order_detail); + } + int state = db.SaveChanges(); + if (state != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TB_PO), "Save_PO_TO_ASK", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + public static void Get_V_TB_PO_DETAIL_List_STATISTICS(V_TB_PO_DETAIL p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_PO_DETAIL; + + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.ErpBillNum)) + { + q = q.Where(p => p.ErpBillNum.Contains(p_entity.ErpBillNum)); + } + if (p_entity.BeginTime != null) + { + q = q.Where(p => p.BeginTime >= p_entity.BeginTime); + } + if (p_entity.EndTime != null) + { + q = q.Where(p => p.BeginTime <= p_entity.EndTime); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode == p_entity.PartCode); + } + if (p_entity.State != null) + { + q = q.Where(p => p.State == p_entity.State); + } + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } + //IQueryable _aq = db.TB_ASK_DETAIL; + //_aq = _aq.Where(p => p.PoBillNum == p_entity.PoBillNum); + //var _a=_aq.GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode }).Select(p => new { AskSum = p.Max(itm=>itm .AskQty),PoLine=p.Key }); + //if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + //{ + // q = q.Where(p => p_entity.UserInAddress.Contains(p.Address)); + //} + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Get_V_TB_PO_DETAIL_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Get_V_TB_PO_DETAIL_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Get_V_TB_PO_DETAIL_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Get_V_TB_PO_DETAIL_List", e.Message); + throw e; + } + + } + + public static void Get_V_TA_VENDER(V_TB_PO_DETAIL p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + List result = new List(); + + IQueryable q = db.V_TA_VENDER; + + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + + IQueryable q2 = db.TB_ASN; + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q2 = q2.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (p_entity.BeginTime != null) + { + q2 = q2.Where(p => p.ShipTime >= p_entity.BeginTime); + } + if (p_entity.EndTime != null) + { + q2 = q2.Where(p => p.ShipTime <= p_entity.EndTime); + } + + //返回全部供应商 + if (string.IsNullOrEmpty(p_entity.PoBillNum) && p_entity.BeginTime == null && p_entity.EndTime == null) + { + result = q.ToList(); + } + //返回符合条件发货单里的供应商 + else + { + List lsVendId = new List(); + + q.ToList().ForEach(p => + { + q2.ToList().ForEach(itm => + { + if (p.VendId == itm.VendId) + { + if (!lsVendId.Contains(p.VendId)) + { + result.Add(p); + + lsVendId.Add(p.VendId); + } + } + }); + }); + } + + + _ret.State = ReturnStatus.Succeed; + _ret.Result = result.AsQueryable(); + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Get_V_TB_PO_DETAIL_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Get_V_TB_PO_DETAIL_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Get_V_TB_PO_DETAIL_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "Get_V_TB_PO_DETAIL_List", e.Message); + throw e; + } + + } + + public static List LOAD_PO_DETAIL_SUM_PROMPTNESS(V_TB_PO_DETAIL p_entity, List p_list) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + if (p_list.Count > 0) + { + //var _detail = p_list[0]; + foreach (V_TA_VENDER _detail in p_list) + { + IQueryable q = db.TB_ASN.Where(p => p.VendId == _detail.VendId && p_entity.UserInAddress.Contains(p.Site)); + + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (p_entity.BeginTime != null) + { + q = q.Where(p => p.ShipTime >= p_entity.BeginTime); + } + if (p_entity.EndTime != null) + { + q = q.Where(p => p.ShipTime <= p_entity.EndTime); + } + + int asnNo = q.ToList().Count;//是发货数量 + + int arriveNo = 0; + + q.ToList().ForEach(p => + { + TB_ARRIVE q2 = db.TB_ARRIVE.FirstOrDefault(p1 => p1.AsnBillNum == p.AsnBillNum && p_entity.UserInAddress.Contains(p1.Site) && p1.BillType.ToString() == "0"); + + if (q2 != null && q2.ShipTime != null && p.ShipTime != null && q2.ShipTime <= p.ShipTime) + { + arriveNo += 1; + } + + }); + + _detail.ShippedQty = asnNo.ToString();//发货数量 + _detail.ArriveQty = arriveNo.ToString();//到货数量 + if (asnNo == 0) + { + _detail.Promptness = "0%";//及时率 + } + else + { + double temp = (arriveNo / asnNo) * 100; + _detail.Promptness = temp.ToString("0.00") + "% ";//及时率 + } + //arrive.ToList().ForEach(itm => + //{ + // if (_detail.PoBillNum == itm.PoBillNum && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + // { + // _detail.ArriveQty = itm.ArriveSum.ToString(); + // } + + //}); + } + } + + } + return p_list; + } + #endregion + } +} diff --git a/北京北汽/SCP/Controller/SCP_QUALITY_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_QUALITY_CONTROLLER.cs new file mode 100644 index 0000000..5789fa6 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_QUALITY_CONTROLLER.cs @@ -0,0 +1,565 @@ +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ + public class SCP_QUALITY_CONTROLLER + { + public static void Get_TB_QUALITY_List(V_TB_QUALITY p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_QUALITY; + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.Type)) + { + q = q.Where(p => p.Type.Contains(p_entity.Type)); + } + if (!string.IsNullOrEmpty(p_entity.Barcode)) + { + q = q.Where(p => p.Barcode == p_entity.Barcode); + } + if (!string.IsNullOrEmpty(p_entity.Loccode)) + { + q = q.Where(p => p.Loccode.Contains(p_entity.Loccode)); + } + if (!string.IsNullOrEmpty(p_entity.Pobillnum)) + { + q = q.Where(p => p.Pobillnum == p_entity.Pobillnum); + } + if (p_entity.Poline != 0) + { + q = q.Where(p => p.Poline == p_entity.Poline); + } + if (!string.IsNullOrEmpty(p_entity.Inspecttype)) + { + q = q.Where(p => p.Inspecttype.Contains(p_entity.Inspecttype)); + } + if (!string.IsNullOrEmpty(p_entity.Partcode)) + { + q = q.Where(p => p.Partcode == p_entity.Partcode); + } + if (!string.IsNullOrEmpty(p_entity.Batch)) + { + q = q.Where(p => p.Batch.Contains(p_entity.Batch)); + } + if (p_entity.Inspqty != null) + { + q = q.Where(p => p.Inspqty == p_entity.Inspqty); + } + if (p_entity.Passqty != null) + { + q = q.Where(p => p.Passqty == p_entity.Passqty); + } + if (p_entity.Failqty != null) + { + q = q.Where(p => p.Failqty == p_entity.Failqty); + } + if (p_entity.EndTime != null) + { + q = q.Where(p => p_entity.EndTime >= p.Billtime); + } + if (p_entity.BeginTime != null) + { + q = q.Where(p => p_entity.BeginTime <= p.Billtime); + } + if (!string.IsNullOrEmpty(p_entity.Vendid)) + { + q = q.Where(p => p.Vendid.Contains(p_entity.Vendid)); + } + if (!string.IsNullOrEmpty(p_entity.Vendbatch)) + { + q = q.Where(p => p.Vendbatch.Contains(p_entity.Vendbatch)); + } + if (!string.IsNullOrEmpty(p_entity.Domain)) + { + q = q.Where(p => p.Domain.Contains(p_entity.Domain)); + } + if (!string.IsNullOrEmpty(p_entity.By1)) + { + q = q.Where(p => p.By1.Contains(p_entity.By1)); + } + if (!string.IsNullOrEmpty(p_entity.By2)) + { + q = q.Where(p => p.By2.Contains(p_entity.By2)); + } + + if (!string.IsNullOrEmpty(p_entity.QualityNo)) + { + q = q.Where(p => p.QualityNo.Contains(p_entity.QualityNo)); + } + if (!string.IsNullOrEmpty(p_entity.ProjectId)) + { + q = q.Where(p => p.ProjectId.Contains(p_entity.ProjectId)); + } + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.Vendid)); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TB_QUALITY), "Get_TB_QUALITY_List", e.Message); + throw e; + } + + } + + public static void Get_TB_RETURN_List(V_TB_RETURN p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_RETURN; + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.Type)) + { + q = q.Where(p => p.Type.Contains(p_entity.Type)); + } + if (!string.IsNullOrEmpty(p_entity.Barcode)) + { + q = q.Where(p => p.Barcode == p_entity.Barcode); + } + if (!string.IsNullOrEmpty(p_entity.Loccode)) + { + q = q.Where(p => p.Loccode.Contains(p_entity.Loccode)); + } + if (!string.IsNullOrEmpty(p_entity.Pobillnum)) + { + q = q.Where(p => p.Pobillnum == p_entity.Pobillnum); + } + if (p_entity.Poline != 0) + { + q = q.Where(p => p.Poline == p_entity.Poline); + } + if (!string.IsNullOrEmpty(p_entity.Inspecttype)) + { + q = q.Where(p => p.Inspecttype.Contains(p_entity.Inspecttype)); + } + if (!string.IsNullOrEmpty(p_entity.Partcode)) + { + q = q.Where(p => p.Partcode == p_entity.Partcode); + } + if (!string.IsNullOrEmpty(p_entity.Batch)) + { + q = q.Where(p => p.Batch.Contains(p_entity.Batch)); + } + if (p_entity.Inspqty != null) + { + q = q.Where(p => p.Inspqty == p_entity.Inspqty); + } + if (p_entity.Passqty != null) + { + q = q.Where(p => p.Passqty == p_entity.Passqty); + } + if (p_entity.Failqty != null) + { + q = q.Where(p => p.Failqty == p_entity.Failqty); + } + if (p_entity.EndTime != null) + { + q = q.Where(p => p.EndTime > p.Billtime); + + } + if (p_entity.BeginTime != null) + { + q = q.Where(p => p.BeginTime < p.Billtime); + } + if (!string.IsNullOrEmpty(p_entity.Vendid)) + { + q = q.Where(p => p.Vendid.Contains(p_entity.Vendid)); + } + if (!string.IsNullOrEmpty(p_entity.Vendbatch)) + { + q = q.Where(p => p.Vendbatch.Contains(p_entity.Vendbatch)); + } + if (!string.IsNullOrEmpty(p_entity.Domain)) + { + q = q.Where(p => p.Domain.Contains(p_entity.Domain)); + } + if (!string.IsNullOrEmpty(p_entity.By1)) + { + q = q.Where(p => p.By1.Contains(p_entity.By1)); + } + if (!string.IsNullOrEmpty(p_entity.By2)) + { + q = q.Where(p => p.By2.Contains(p_entity.By2)); + } + + if (!string.IsNullOrEmpty(p_entity.QualityNo)) + { + q = q.Where(p => p.QualityNo.Contains(p_entity.QualityNo)); + } + + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.Vendid)); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TB_QUALITY), "Get_TB_RETURN_List", e.Message); + throw e; + } + + } + + + + public static void Get_TB_ASN_QUALITY_List(V_TB_ASN p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + StringBuilder _buffer = new StringBuilder(); + _buffer.Append("select * from V_TB_ASN WHERE AsnBillNum in ("); + _buffer.Append("SELECT DISTINCT b.BillNum FROM dbo.TB_QUALITY AS a INNER JOIN"); + _buffer.Append(" dbo.TS_BARCODE AS b ON a.Barcode = ISNULL(b.PartCode, N'') + '.' + ISNULL(b.Batch, N'') AND a.Vendid = b.VendId)"); + string _sql = _buffer.ToString(); + var q=db.Database.SqlQuery(_sql).AsQueryable(); + if (!string.IsNullOrEmpty(p_entity.AsnBillNum)) + { + q = q.Where(p => p.AsnBillNum.Contains(p_entity.AsnBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.AskBillNum)) + { + q = q.Where(p => p.AskBillNum.Contains(p_entity.AskBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (p_entity.State != null) + { + q = q.Where(p => p.State == p_entity.State); + } + if (!string.IsNullOrEmpty(p_entity.ShipUser)) + { + q = q.Where(p => p.ShipUser.Contains(p_entity.ShipUser)); + } + if (!string.IsNullOrEmpty(p_entity.ReceiveUser)) + { + q = q.Where(p => p.ReceiveUser.Contains(p_entity.ReceiveUser)); + } + if (!string.IsNullOrEmpty(p_entity.ErpBillNum)) + { + q = q.Where(p => p.ErpBillNum.Contains(p_entity.ErpBillNum)); + } + if (p_entity.ModType != null) + { + q = q.Where(p => p.ModType == p_entity.ModType); + } + //if (!string.IsNullOrEmpty(p_entity.Contacter)) + //{ + // q = q.Where(p => p.Contacter.Contains(p_entity.Contacter)); + //} + if (!string.IsNullOrEmpty(p_entity.Buyer)) + { + q = q.Where(p => p.Buyer.Contains(p_entity.Buyer)); + } + + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + + if (!string.IsNullOrEmpty(p_entity.State_DESC)) + { + q = q.Where(p => p.State_DESC.Contains(p_entity.State_DESC)); + } + if (!string.IsNullOrEmpty(p_entity.ModType_DESC)) + { + q = q.Where(p => p.ModType_DESC.Contains(p_entity.ModType_DESC)); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.UpdateUser)) + { + q = q.Where(p => p.UpdateUser.Contains(p_entity.UpdateUser)); + } + if (!string.IsNullOrEmpty(p_entity.UpdateInfo)) + { + q = q.Where(p => p.UpdateInfo.Contains(p_entity.UpdateInfo)); + } + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TB_QUALITY), "Get_TB_QUALITY_List", e.Message); + throw e; + } + } + public static ResultObject Save_ASN_TO_QUALITY(List p_asnList,string p_user) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var itm in p_asnList) + { + var _entity = db.V_TB_ASN_DETAIL.Where(p => p.UID == itm.UID).FirstOrDefault(); + var _asn=db.V_TB_ASN.Where(p => p.AsnBillNum == _entity.AsnBillNum).FirstOrDefault(); + if (_entity != null) + { + TB_QUALITY _quality = new TB_QUALITY(); + _quality.QualityNo = SCP_BILLCODE_CONTROLLER.MakeQualityCode(); + _quality.Failqty = itm.FailQty; + _quality.Pobillnum = itm.PoBillNum; + _quality.Billtime = DateTime.Parse(DateTime.Now.ToShortDateString()); + _quality.Poline = itm.PoLine; + _quality.By1 = itm.AsnBillNum; + _quality.CreateTime = DateTime.Parse(DateTime.Now.ToShortDateString()); + _quality.CreateUser = p_user; + _quality.Domain = _entity.Site; + _quality.Vendid = _entity.VendId; + _quality.Partcode = _entity.PartCode; + _quality.Batch = _entity.Batch; + _quality.Barcode = _entity.PartCode + "." + _entity.Batch; + _quality.Failreason = itm.FailReason; + _quality.Site = _asn.Site; + + db.TB_QUALITY.AddOrUpdate(_quality); + } + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TB_QUALITY), "Save_ASN_TO_QUALITY", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + public static ResultObject Save_ASN_TO_RETURN(List p_asnList, string p_user) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var itm in p_asnList) + { + var _entity = db.V_TB_ASN_DETAIL.Where(p => p.UID == itm.UID).FirstOrDefault(); + var _asn = db.V_TB_ASN.Where(p => p.AsnBillNum == _entity.AsnBillNum).FirstOrDefault(); + if (_entity != null) + { + TB_RETURN _quality = new TB_RETURN(); + _quality.QualityNo = SCP_BILLCODE_CONTROLLER.MakeQualityCode(); + _quality.Failqty = itm.FailQty; + _quality.Pobillnum = itm.PoBillNum; + _quality.Billtime = DateTime.Parse(DateTime.Now.ToShortDateString()); + _quality.Poline = itm.PoLine; + _quality.AsnBillNum = itm.AsnBillNum; + _quality.RejectBillNum = itm.RejectBillNum; + _quality.CreateTime = itm.CreateTime; + _quality.CreateUser = p_user; + _quality.Domain = _entity.Site; + _quality.Vendid = _entity.VendId; + _quality.Partcode = _entity.PartCode; + _quality.Batch = _entity.Batch; + _quality.Barcode = _entity.PartCode + "." + _entity.Batch; + _quality.Failreason = itm.FailReason; + _quality.Site = _asn.Site; + db.TB_RETURN.AddOrUpdate(_quality); + } + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TB_RETURN), "Save_ASN_TO_QUALITY", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + + public ResultObject Save_TB_QUALITY(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var itm in p_entitys) + { + db.TB_QUALITY.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TB_QUALITY), "Save_TB_QUALITY", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + public static ResultObject Del_TB_QUALITY(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _ids= p_entitys.Select(q => q.UID).ToList(); + var query=db.TB_QUALITY.Where(p => _ids.Contains(p.UID)); + var _ls=query.ToList(); + db.TB_QUALITY.RemoveRange(_ls); + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TB_QUALITY), "Del_TB_QUALITY", e.Message); throw e; + } + return _ret; + } + public static ResultObject Del_TB_RETURN(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _ids = p_entitys.Select(q => q.UID).ToList(); + var query = db.TB_RETURN.Where(p => _ids.Contains(p.UID)); + var _ls = query.ToList(); + db.TB_RETURN.RemoveRange(_ls); + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TB_QUALITY), "Del_TB_QUALITY", e.Message); throw e; + } + return _ret; + } + } +} diff --git a/北京北汽/SCP/Controller/SCP_RECEIVE_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_RECEIVE_CONTROLLER.cs new file mode 100644 index 0000000..f458646 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_RECEIVE_CONTROLLER.cs @@ -0,0 +1,2222 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using CK.SCP.Controller; +using CK.SCP.Models.Enums; +using CK.SCP.Models.AppBoxEntity; +using System.Data.Entity.Core; +using CK.SCP.Models.ScpEntity.ExcelImportEntity; +using System.Data; +using System.Data.SqlClient; +using System.Text.RegularExpressions; + +namespace CK.SCP.Controller +{ + public class SCP_RECIVECE_CONTROLLER + { + public static void Get_V_TB_RECEIVE_GG_List(V_TB_RECEIVE p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + IQueryable q = db.V_TB_RECEIVE; + + if (!string.IsNullOrEmpty(p_entity.RecvBillNum)) + { + q = q.Where(p => p.RecvBillNum.Contains(p_entity.RecvBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.AsnBillNum)) + { + q = q.Where(p => p.AsnBillNum.Contains(p_entity.AsnBillNum)); + } + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + if (p_entity.UserInSubSite != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInSubSite.Contains(p.SubSite)); + } + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } + + if (p_entity.State == 0 || p_entity.State == 1 || p_entity.State == 2) + { + q = q.Where(p => p.State == p_entity.State); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (p_entity.IsDeleted != false) + { + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + if (!string.IsNullOrEmpty(p_entity.OperName)) + { + q = q.Where(p => p.OperName.Contains(p_entity.OperName)); + } + if (!string.IsNullOrEmpty(p_entity.Site_Desc)) + { + q = q.Where(p => p.Site_Desc.Contains(p_entity.Site_Desc)); + } + if (!string.IsNullOrEmpty(p_entity.BillType_DESC)) + { + q = q.Where(p => p.BillType_DESC.Contains(p_entity.BillType_DESC)); + } + //if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + //{ + // q = q.Where(p => p_entity.UserInAddress.Contains(p.Address)); + //} + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_List", e.Message); + throw e; + } + + } + + + public static void Get_V_TB_RECEIVE_List(V_TB_RECEIVE p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_RECEIVE; + + if (!string.IsNullOrEmpty(p_entity.RecvBillNum)) + { + q = q.Where(p => p.RecvBillNum.Contains(p_entity.RecvBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.AsnBillNum)) + { + q = q.Where(p => p.AsnBillNum.Contains(p_entity.AsnBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (p_entity.State == 0 || p_entity.State == 1 || p_entity.State == 2) + { + q = q.Where(p => p.State == p_entity.State); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (p_entity.IsDeleted != false) + { + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + if (!string.IsNullOrEmpty(p_entity.OperName)) + { + q = q.Where(p => p.OperName.Contains(p_entity.OperName)); + } + if (!string.IsNullOrEmpty(p_entity.Site_Desc)) + { + q = q.Where(p => p.Site_Desc.Contains(p_entity.Site_Desc)); + } + if (!string.IsNullOrEmpty(p_entity.BillType_DESC)) + { + q = q.Where(p => p.BillType_DESC.Contains(p_entity.BillType_DESC)); + } + //if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + //{ + // q = q.Where(p => p_entity.UserInAddress.Contains(p.Address)); + //} + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_List", e.Message); + throw e; + } + + } + + + + public static void Get_V_TB_RECEIVE_DETAIL_List(List p_list, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _ary=p_list.Select(p => "'"+p.RecvBillNum+"'").ToList().ToArray(); + if (_ary.Count() > 0) + { + string str = string.Join(",", _ary); + string _sql = string.Format("SELECT * FROM [V_TB_RECEIVE_DETAIL] where RecvBillNum in ({0})",str); + IQueryable q = db.Database.SqlQuery(_sql).AsQueryable(); + + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + + p_action(_ret); + } + + + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_DETAIL_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_DETAIL_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_DETAIL_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_DETAIL_List", e.Message); + throw e; + } + + } + + /// + /// 保存到货 + /// + /// + /// + /// + /// + public static ResultObject Save_TB_RECEIVE(V_TB_ASN_DETAIL p_entity, List p_list,string currentuser) + { + ResultObject _ret = new ResultObject(); + var scpRcvList = new List(); + var scpRcveDetailList = new List(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + DateTime now = DateTime.Now; + var _asn = db.TB_ASN.Where(p => p.IsDeleted == false && p.AsnBillNum == p_entity.AsnBillNum).ToList(); + + if (_asn != null && _asn.Count > 0) + { + _asn.ForEach(p => + { + p.State = (int)AsnState.Receive; + p.CreateTime = now; + }); + db.TB_ASN.AddOrUpdate(p => p.UID, _asn.ToArray()); + var _asndetail = db.TB_ASN_DETAIL.Where(p => p.IsDeleted == false && p.AsnBillNum == p_entity.AsnBillNum).ToList(); + _asndetail.ForEach(p => + { + p.State = (int)AsnState.Receive; + p.CreateTime = now; + }); + db.TB_ASN_DETAIL.AddOrUpdate(p => p.UID, _asndetail.ToArray()); + + TB_RECEIVE scpRcv = new TB_RECEIVE(); + scpRcv.RecvBillNum = SCP_BILLCODE_CONTROLLER.MakeReviceCode_ASN();//收货单号 + scpRcv.State = (int)FormState.开放; + scpRcv.Remark = ""; + scpRcv.CreateTime = DateTime.Now;//创建日期 + scpRcv.CreateUser = currentuser;//创建用户 + scpRcv.IsDeleted = false; + scpRcv.GUID = System.Guid.NewGuid(); + scpRcv.BillType = 0; + scpRcv.PoBillNum = p_entity.PoBillNum;//采购单 + scpRcv.AsnBillNum = p_entity.AsnBillNum;//发货单号 + scpRcv.Site = p_entity.Site;//地点 + scpRcv.VendId = p_entity.VendId;//供货商名称 + scpRcv.ShipTime = now;//收货日期 + scpRcvList.Add(scpRcv); + db.TB_RECEIVE.AddOrUpdate(p => p.UID,scpRcvList.ToArray()); + + p_list.ForEach(item => + { + TB_RECEIVE_DETAIL scpRcvDetail = new TB_RECEIVE_DETAIL(); + scpRcvDetail.RecvBillNum = SCP_BILLCODE_CONTROLLER.MakeReviceCode_ASN();//收货单号 + scpRcvDetail.PoBillNum = item.PoBillNum;//采购单 + scpRcvDetail.PoLine = item.PoLine;//订单行 + scpRcvDetail.PartCode = item.PartCode;//零件号 + scpRcvDetail.Batch = item.Batch;//批次 + scpRcvDetail.VendBatch = item.VendBatch;//供应商批号 + scpRcvDetail.PoUnit = item.PoUnit;//采购单位 + scpRcvDetail.LocUnit = item.LocUnit;//基本单位 + scpRcvDetail.Qty = item.Qty;//收货总量 + //scpRcvDetail.DockCode = "";//收货口 + scpRcvDetail.State = (int)FormState.开放;// (int)FormState.关闭, + scpRcvDetail.Remark = item.Remark; + scpRcvDetail.CreateTime = DateTime.Now;//创建日期 + scpRcvDetail.CreateUser = currentuser;//创建用户 + scpRcvDetail.IsDeleted = false; + scpRcvDetail.GUID = System.Guid.NewGuid(); + scpRcvDetail.BillType = 0; + scpRcveDetailList.Add(scpRcvDetail); + }); + db.TB_RECEIVE_DETAIL.AddOrUpdate(p => p.UID,scpRcveDetailList.ToArray()); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Save_TB_RECEIVE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Save_TB_RECEIVE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Save_TB_RECEIVE", ex.ToString()); + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Save_TB_RECEIVE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + public static void Get_V_TB_RECEIVE_DETAIL_List(V_TB_RECEIVE_DETAIL p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_RECEIVE_DETAIL; + + if (!string.IsNullOrEmpty(p_entity.RecvBillNum)) + { + q = q.Where(p => p.RecvBillNum == p_entity.RecvBillNum); + } + if (p_entity.PoLine != 0) + { + q = q.Where(p => p.PoLine == p_entity.PoLine); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.Batch)) + { + q = q.Where(p => p.Batch.Contains(p_entity.Batch)); + } + if (p_entity.Qty != 0) + { + q = q.Where(p => p.Qty == p_entity.Qty); + } + if (!string.IsNullOrEmpty(p_entity.DockCode)) + { + q = q.Where(p => p.DockCode.Contains(p_entity.DockCode)); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (p_entity.IsDeleted != false) + { + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + } + if (!string.IsNullOrEmpty(p_entity.AsnBillNum)) + { + q = q.Where(p => p.AsnBillNum.Contains(p_entity.AsnBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (!string.IsNullOrEmpty(p_entity.OperName)) + { + q = q.Where(p => p.OperName.Contains(p_entity.OperName)); + } + if (!string.IsNullOrEmpty(p_entity.PartDesc1)) + { + q = q.Where(p => p.PartDesc1.Contains(p_entity.PartDesc1)); + } + if (p_entity.State != 0) + { + q = q.Where(p => p.State == p_entity.State); + } + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + //if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + //{ + // q = q.Where(p => p_entity.UserInAddress.Contains(p.Address)); + //} + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_DETAIL_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_DETAIL_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_DETAIL_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_DETAIL_List", e.Message); + throw e; + } + + } + + public static ResultObject Save_TB_RECEIVE_STATE(List p_list, ReceiveState p_state, string userName) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + if (p_state == ReceiveState.Check) + { + + var _ls = db.V_TB_RECEIVE.Where(p => p_list.Contains(p.RecvBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)ReceiveState.Receive); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => + { + p.OperName = userName; + p.State = (int)ReceiveState.Check; + var _list = db.TB_RECEIVE_DETAIL.Where(itm => itm.RecvBillNum == p.RecvBillNum).ToList(); + _list.ForEach(itm => itm.State = (int)ReceiveState.Check); + db.TB_RECEIVE_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + #region 收货审核提醒供应商提起发票申请 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "供应商"; + _item.ITEM_NO = p.RecvBillNum; + _item.ITEM_CONTENT = string.Format("收货单号{0}发货单号{1},已收货!请申请发票", p.RecvBillNum, _ls[0].AsnBillNum); + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.PO_AUDIT_PASS; + _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + _item.SENDER = p.CreateUser; + _item.VEND_ID = p.VendId; + _item.SENDING_TIME = DateTime.Now; + //_item.ITEM_ADDRESS = p.Site_Desc; + _item.ITEM_ADDRESS = p.Site; + _item.GUID = Guid.NewGuid(); + db.TB_PENING_ITEMS.Add(_item); + #endregion + } + ); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是收货状态记录!"; + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + } + if (p_state == ReceiveState.Reject) + { + var _ls = db.V_TB_RECEIVE.Where(p => p_list.Contains(p.RecvBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)ReceiveState.Receive); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => + { + p.OperName = userName; + p.State = (int)ReceiveState.Reject; + p.IsDeleted = true; + var _list = db.TB_RECEIVE_DETAIL.Where(itm => itm.RecvBillNum == p.RecvBillNum).ToList(); + _list.ForEach(itm => + { + itm.State = (int)ReceiveState.Reject; + itm.IsDeleted = true; + } + + ); + db.TB_RECEIVE_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + + + } + ); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是收货状态记录!"; + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + + } + + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Save_TB_RECEIVE_STATE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Save_TB_RECEIVE_STATE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Save_TB_RECEIVE_STATE", ex.ToString()); + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Save_TB_RECEIVE_STATE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + public static List Get_V_TB_RECEIVE_LIST(List p_list) + { + + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + p_list.ForEach(itm => + { + + //var _sum= db.TB_INVOICE_DETAIL.Where(p => p.RecvBillNum == itm.RecvBillNum && p.PartCode == itm.PartCode && p.Batch==itm.Batch && p.IsDeleted==false).Select(p=>p.Qty).Sum(); + var _sum = db.TB_INVOICE_DETAIL.Where(p => p.RecvBillNum == itm.RecvBillNum && p.PartCode == itm.PartCode && p.PoBillNum==itm.PoBillNum && p.PoLineNum==itm.PoLine && p.Batch == itm.Batch && p.IsDeleted == false && p.Site==itm.Site && p.SubSite==itm.SubSite). + ToArray().Sum(p => new decimal?(p.Qty)).GetValueOrDefault(); + itm.CanQty = itm.Qty - _sum; + }); + + } + return p_list; + + } + + public static List Get_V_TB_INVOICE_LIST(List p_list) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + p_list.ForEach(itm => + { + try + { + var _recSum = db.V_TB_RECEIVE_DETAIL.Where(p => p.RecvBillNum == itm.RecvBillNum && p.PartCode == itm.PartCode && p.Batch == itm.Batch && p.IsDeleted == false).Select(p => p.Qty).Sum(); + + if (itm.RecvBillNum.Substring(0, 1) == "R") + { + _recSum = 0 - Math.Abs(_recSum); + } + var _sum = db.V_TB_INVOICE_DETAIL.Where(p => p.RecvBillNum == itm.RecvBillNum && p.PartCode == itm.PartCode && p.Batch == itm.Batch && p.IsDeleted == false).Select(p => p.Qty).Sum(); + if (_recSum - _sum <= 0) + { + itm.CanQty = 0; + } + else + { + itm.CanQty = _recSum - _sum; + } + } + catch + { + itm.CanQty = 0; + } + + + }); + + } + return p_list; + } + + public static DataTable Get_TB_RECEIVE_PLAN(V_TB_ARRIVE_DETAIL p_plan, string p_date,int p_State=1) + { + string _sql = string.Empty; + + + + + if (p_State == 1) + { + _sql = "SELECT D.PROJECTID,b.VENDNAME, c.* FROM(SELECT partcode,PartDesc1, Qty, CONVERT(varchar(100), CreateTime, 23) as endtime,PoUnit,SubSite,VendId FROM V_TB_ARRIVE_DETAIL where BillType_DESC='到货单'\n" + + " ) A\n" + + " pivot(sum(Qty) for a.endtime in ( {1}\n" + + "\n" + + " )\n" + + " ) as C left join TA_VENDER B ON C.VENDID=B.VENDID LEFT JOIN TA_PART D ON C.PARTCODE=D.PARTCODE where {0};"; + } + + + if (p_State == 2) + { + _sql = "SELECT D.PROJECTID,b.VENDNAME, c.* FROM(SELECT partcode,PartDesc1, Qty, CONVERT(varchar(100), CreateTime, 23) as endtime,PoUnit,SubSite,VendId FROM V_TB_ARRIVE_DETAIL where BillType_DESC='退货单'\n" + + " ) A\n" + + " pivot(sum(Qty) for a.endtime in ( {1}\n" + + "\n" + + " )\n" + + " ) as C left join TA_VENDER B ON C.VENDID=B.VENDID LEFT JOIN TA_PART D ON C.PARTCODE=D.PARTCODE where {0};"; + } + + + string _sqlDate = "select '[' + convert(varchar(10), DATEADD(day, number, CAST('{0}' as datetime)), 23) + ']' endtime\n" + + " from master.dbo.spt_values\n" + + " where type = 'p'\n" + + " AND number<= DATEDIFF(day, CAST('{0}' as datetime), DATEADD(DAY, -1, DATEADD(MM, DATEDIFF(MM, 0, CAST('{0}' as datetime)) + 1, 0)))"; + + + DataTable dt = new DataTable(); + DataTable _tbDate = new DataTable(); + + var dbSetting = GlobalConfig.ScpDatabase; + SqlConnection conn = new System.Data.SqlClient.SqlConnection(); + try + { + var strConn = EntitiesFactory.GetEfConnectionString(dbSetting); + + conn.ConnectionString = strConn; + if (conn.State != ConnectionState.Open) + { + conn.Open(); + } + SqlCommand cmdDate = new SqlCommand(); + cmdDate.Connection = conn; + cmdDate.CommandText = string.Format(_sqlDate, p_date); + SqlDataAdapter adapter1 = new SqlDataAdapter(cmdDate); + adapter1.Fill(_tbDate); + + List _dateList = new List(); + foreach (DataRow row in _tbDate.Rows) + { + _dateList.Add(row["endtime"].ToString()); + } + + + + + SqlCommand cmd = new SqlCommand(); + cmd.Connection = conn; + string where1 = " 1=1 "; + if (!string.IsNullOrEmpty(p_plan.PartCode)) + { + where1 += string.Format(" and C.partcode='{0}' ", p_plan.PartCode); + } + if (!string.IsNullOrEmpty(p_plan.VendId)) + { + where1 += string.Format(" and C.VendId='{0}' ", p_plan.VendId); + } + if (!string.IsNullOrEmpty(p_plan.ProjectId)) + { + where1 += string.Format(" and ProjectId like '{0}%' ", p_plan.ProjectId); + } + + if (!string.IsNullOrEmpty(p_plan.SubSite)) + { + where1 += string.Format(" and C.SUBSITE = '{0}' ", p_plan.SubSite); + } + //if (!string.IsNullOrEmpty(p_plan.PoBillNum)) + //{ + // where1 += string.Format(" and PoBillNum='{0}' ", p_plan.PoBillNum); + //} + //if (p_plan.EndTime_Begin != null) + //{ + // where1 += string.Format(" and EndTime>='{0}'", p_plan.EndTime_Begin.Value.ToString("yyyy-MM-dd")); + //} + //else + //{ + // where1 += string.Format(" and EndTime>='{0}'", DateTime.Now.ToString("yyyy-MM-dd")); + //} + //if (p_plan.EndTime_End != null) + //{ + // where1 += string.Format(" and EndTime<='{0}'", p_plan.EndTime_End.Value.ToString("yyyy-MM-dd")); + //} + //else + //{ + // where1 += string.Format(" and EndTime<='{0}'", DateTime.Now.AddMonths(1).ToString("yyyy-MM-dd")); + //} + cmd.CommandText = string.Format(_sql, where1, string.Join(",", _dateList.ToArray())); + SqlDataAdapter adapter = new SqlDataAdapter(cmd); + adapter.Fill(dt); + dt.Columns.Add("合计"); + dt.Columns["PartCode"].ColumnName = "零件编号"; + dt.Columns["VendId"].ColumnName = "供应商编号"; + dt.Columns["VendName"].ColumnName = "供应商名称"; + dt.Columns["PartDesc1"].ColumnName = "零件名称"; + dt.Columns["SubSite"].ColumnName = "分厂地点"; + dt.Columns["PoUnit"].ColumnName = "单位"; + dt.Columns["Projectid"].ColumnName = "项目编号"; + foreach (DataRow row in dt.Rows) + { + decimal num = 0; + foreach (DataColumn column in dt.Columns) + { + var _reg = Regex.Match(column.ColumnName, @"\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}"); + if (!string.IsNullOrEmpty(_reg.Value)) + { + if (row[column.ColumnName] != null && !string.IsNullOrEmpty(row[column.ColumnName].ToString())) + { + num += decimal.Parse(row[column.ColumnName].ToString()); + } + } + } + row["合计"] = num; + } + + + conn.Close(); + } + catch (SqlException ex) + { + conn.Close(); + throw new Exception($"系统无法连接到数据库:{dbSetting},请检查配置的服务器,数据库,用户名和密码等信息是否正确。{Environment.NewLine}{ex}"); + } + return dt; + } + + public static ResultObject> Get_V_TB_RECEIVE_LIST_List(V_TB_RECEIVE_LIST p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_RECEIVE_LIST; + if (!string.IsNullOrEmpty(p_entity.ProjectId)) + { + q = q.Where(p => p.ProjectId.Contains(p_entity.ProjectId)); + } + if (!string.IsNullOrEmpty(p_entity.RecvBillNum)) + { + q = q.Where(p => p.RecvBillNum == p_entity.RecvBillNum); + } + if (p_entity.PoLine != 0) + { + q = q.Where(p => p.PoLine == p_entity.PoLine); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.Batch)) + { + q = q.Where(p => p.Batch.Contains(p_entity.Batch)); + } + + + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (p_entity.IsDeleted != false) + { + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + } + if (!string.IsNullOrEmpty(p_entity.AsnBillNum)) + { + q = q.Where(p => p.AsnBillNum.Contains(p_entity.AsnBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + + + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + + + + if (p_entity.BeginTime != null) + { + q = q.Where(p => p.ShipTime >= p_entity.BeginTime); + } + if (p_entity.Site != null) + { + q = q.Where(p => p.Site == p_entity.Site); + } + if (p_entity.SubSite != null) + { + q = q.Where(p => p.SubSite == p_entity.SubSite); + } + if (p_entity.EndTime != null) + { + q = q.Where(p => p.ShipTime <= p_entity.EndTime); + } + + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } + + if (p_entity.UIDList != null && p_entity.UIDList.Count > 0) + { + q = q.Where(p => p_entity.UIDList.Contains(p.UID)); + } + //if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + //{ + // q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + //} + if (p_entity.UserInSubSite != null && p_entity.UserInSubSite.Count > 0) + { + q = q.Where(p => p_entity.UserInSubSite.Contains(p.SubSite)); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_LIST_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_LIST_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_LIST_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_LIST_List", e.Message); + throw e; + } + return _ret; + } + + + + public static ResultObject> Get_V_TB_RECEIVE_LIST_PRICE(string p_vendId,List p_list, Action>> p_action) + { + var _ls = p_list.Select(itm => itm.PartCode); + StringBuilder _buffer = new StringBuilder(); + _buffer.Append(" SELECT * FROM TB_PRICE WHERE UID IN"); + _buffer.Append("( SELECT MAX(UID) AS UID FROM TB_PRICE AS A"); + _buffer.AppendFormat(" where A.VendId='{0}' AND A.PartCode IN ('{1}') ",p_vendId,String.Join("','",_ls)); + _buffer.Append(" GROUP BY VendId, Site,SubSite, PartCode, StartTime, EndTime)"); + + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.Database.SqlQuery(_buffer.ToString()).AsQueryable(); + + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_LIST_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_LIST_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_LIST_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_RECEIVE_LIST_List", e.Message); + throw e; + } + return _ret; + } + + + + + public static void Get_V_TB_ARRIVE_List(V_TB_ARRIVE p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_ARRIVE; + if (p_entity.BeginTime != null) + { + q = q.Where(p => p.ShipTime >= p_entity.BeginTime); + } + if (p_entity.EndTime != null) + { + q = q.Where(p => p.ShipTime <= p_entity.EndTime); + } + if (!string.IsNullOrEmpty(p_entity.ArrvBillNum)) + { + q = q.Where(p => p.ArrvBillNum==p_entity.ArrvBillNum); + } + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum==p_entity.PoBillNum); + } + if (!string.IsNullOrEmpty(p_entity.AsnBillNum)) + { + q = q.Where(p => p.AsnBillNum==p_entity.AsnBillNum); + } + if (!string.IsNullOrEmpty(p_entity.AskBillNum)) + { + q = q.Where(p => p.AskBillNum == p_entity.AskBillNum); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site==p_entity.Site); + } + if (!string.IsNullOrEmpty(p_entity.SubSite)) + { + q = q.Where(p => p.SubSite==p_entity.SubSite); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId==p_entity.VendId); + } + if (!string.IsNullOrEmpty(p_entity.BillType_DESC)) + { + q = q.Where(p => p.BillType_DESC == p_entity.BillType_DESC); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (p_entity.IsDeleted != false) + { + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + if (!string.IsNullOrEmpty(p_entity.OperName)) + { + q = q.Where(p => p.OperName.Contains(p_entity.OperName)); + } + if (!string.IsNullOrEmpty(p_entity.Site_Desc)) + { + q = q.Where(p => p.Site_Desc.Contains(p_entity.Site_Desc)); + } + if (p_entity.UserInSubSite != null && p_entity.UserInSubSite.Count > 0) + { + q = q.Where(p => p_entity.UserInSubSite.Contains(p.SubSite)); + } + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } + //if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + //{ + // q = q.Where(p => p_entity.UserInAddress.Contains(p.Address)); + //} + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_ARRIVE_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + Console.WriteLine(ex.ToString()); + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_ARRIVE_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + Console.WriteLine(ex.ToString()); + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_ARRIVE_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + //Console.WriteLine(inner?.StateEntries[0].EntitySet.Name); + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_ARRIVE_List", e.Message); + throw e; + } + + } + public static ResultObject Save_TB_ARRIVE_STATE(List p_list, ReceiveState p_state, string userName) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _ls = db.V_TB_ARRIVE.Where(p => p_list.Contains(p.ArrvBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)ReceiveState.Receive); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => + { + p.OperName = userName; + p.State = (int)ReceiveState.Check; + var _list = db.TB_ARRIVE_DETAIL.Where(itm => itm.ArrvBillNum == p.ArrvBillNum).ToList(); + _list.ForEach(itm => itm.State = (int)ReceiveState.Check); + db.TB_ARRIVE_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + #region 收货审核提醒供应商提起发票申请 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "供应商"; + _item.ITEM_NO = p.ArrvBillNum; + _item.ITEM_CONTENT = string.Format("到货单号{0}发货单号{1},已到货!请申请发票", p.ArrvBillNum, _ls[0].AsnBillNum); + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.PO_AUDIT_PASS; + _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + _item.SENDER = p.CreateUser; + _item.VEND_ID = p.VendId; + _item.SENDING_TIME = DateTime.Now; + //_item.ITEM_ADDRESS = p.Site_Desc; + _item.ITEM_ADDRESS = p.Site; + _item.GUID = Guid.NewGuid(); + db.TB_PENING_ITEMS.Add(_item); + #endregion + } + ); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是到货状态记录!"; + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Save_TB_ARRIVE_STATE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + Console.WriteLine(ex.ToString()); + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Save_TB_ARRIVE_STATE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + Console.WriteLine(ex.ToString()); + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Save_TB_ARRIVE_STATE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + //Console.WriteLine(inner?.StateEntries[0].EntitySet.Name); + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Save_TB_ARRIVE_STATE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + public static void GetNumber(string p_asnBillNum) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _list = db.TB_ASN.Where(p => p.AsnBillNum == p_asnBillNum && p.IsDeleted == false).ToList(); + if (_list.Count > 0) + { + _list.ForEach(itm => itm.State = (int)AsnState.Receive); + db.TB_ASN.AddOrUpdate(p => p.UID, _list.ToArray()); + var _entity = _list.FirstOrDefault(); + var _asnList = db.TB_ASN.Where(p => p.AskBillNum == _entity.AskBillNum && p.IsDeleted == false); + var _count = _asnList.Count(p => p.State == (int)AsnState.Receive); + if (_asnList.Count() == _count) + { + var _askList = db.TB_ASK.Where(p => p.AskBillNum == _entity.AskBillNum && p.IsDeleted == false).ToList(); + _askList.ForEach(itm => itm.State = (int)AskState.Receive); + db.TB_ASK.AddOrUpdate(p => p.UID, _askList.ToArray()); + } + } + } + } + + public static void Get_V_TB_ARRIVE_DETAIL_List(V_TB_ARRIVE_DETAIL p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_ARRIVE_DETAIL; + + if (!string.IsNullOrEmpty(p_entity.ArrvBillNum)) + { + q = q.Where(p => p.ArrvBillNum == p_entity.ArrvBillNum); + } + if (p_entity.PoLine != 0) + { + q = q.Where(p => p.PoLine == p_entity.PoLine); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.Batch)) + { + q = q.Where(p => p.Batch.Contains(p_entity.Batch)); + } + if (p_entity.Qty != 0) + { + q = q.Where(p => p.Qty == p_entity.Qty); + } + if (!string.IsNullOrEmpty(p_entity.DockCode)) + { + q = q.Where(p => p.DockCode.Contains(p_entity.DockCode)); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (p_entity.IsDeleted != false) + { + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + } + if (!string.IsNullOrEmpty(p_entity.AsnBillNum)) + { + q = q.Where(p => p.AsnBillNum.Contains(p_entity.AsnBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (!string.IsNullOrEmpty(p_entity.SubSite)) + { + q = q.Where(p => p.SubSite.Contains(p_entity.SubSite)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (!string.IsNullOrEmpty(p_entity.OperName)) + { + q = q.Where(p => p.OperName.Contains(p_entity.OperName)); + } + if (!string.IsNullOrEmpty(p_entity.PartDesc1)) + { + q = q.Where(p => p.PartDesc1.Contains(p_entity.PartDesc1)); + } + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_ARRIVE_DETAIL_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + Console.WriteLine(ex.ToString()); + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_ARRIVE_DETAIL_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + Console.WriteLine(ex.ToString()); + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_ARRIVE_DETAIL_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + //Console.WriteLine(inner?.StateEntries[0].EntitySet.Name); + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Get_V_TB_ARRIVE_DETAIL_List", e.Message); + throw e; + } + + } + + + + public static List COMPARE_DETAIL_SUM(string p_number) + { + List _ls = new List(); + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _list=db.V_TB_PO_DETAIL.Where(p => p.PoBillNum == p_number).ToList(); + if (_list.Count > 0) + { + //var _detail = p_list[0]; + foreach (V_TB_PO_DETAIL _detail in _list) + { + //var _ask = db.TB_ASK_DETAIL.Where(p => p.PoBillNum == _detail.PoBillNum && p.IsDeleted == false).GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode }).Select(p => new { AskSum = p.Sum(itm => itm.AskQty), PoLine = p.Key.PoLine, PoBillNum = p.Key.PoBillNum, PartCode = p.Key.PartCode }); + + var rec = db.TB_RECEIVE_DETAIL.Where(p => p.PoBillNum == _detail.PoBillNum && p.IsDeleted == false && p.BillType == 0).GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode }).Select(p => new { ReceiveSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, PoBillNum = p.Key.PoBillNum, PartCode = p.Key.PartCode }); + + var reject = db.TB_RECEIVE_DETAIL.Where(p => p.PoBillNum == _detail.PoBillNum && p.IsDeleted == false && p.BillType == 1).GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode }).Select(p => new { RejectSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, PoBillNum = p.Key.PoBillNum, PartCode = p.Key.PartCode }); + + var asn = db.TB_ASN_DETAIL.Where(p => p.PoBillNum == _detail.PoBillNum && p.IsDeleted == false && p.State == (int)AsnState.Ship).GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode }).Select(p => new { AsSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, PoBillNum = p.Key.PoBillNum, PartCode = p.Key.PartCode }); + + //var arrive = db.TB_ARRIVE_DETAIL.Where(p => p.PoBillNum == _detail.PoBillNum && p.IsDeleted == false && p.State == (int)ArriveState.OK && p.BillType == (int)ArriveBillType.Receive).GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode }).Select(p => new { ArriveSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, PoBillNum = p.Key.PoBillNum, PartCode = p.Key.PartCode }); + + + _detail.PartDesc1 = _detail.PartDesc1 + _detail.PartDesc2; + rec.ToList().ForEach(itm => + { + if (_detail.PoBillNum == itm.PoBillNum && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + { + _detail.ReceivedQty = itm.ReceiveSum; + } + + }); + reject.ToList().ForEach(itm => + { + if (_detail.PoBillNum == itm.PoBillNum && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + { + _detail.RejectQty = itm.RejectSum.ToString(); + } + + }); + asn.ToList().ForEach(itm => + { + if (_detail.PoBillNum == itm.PoBillNum && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + { + _detail.ShippedQty = itm.AsSum; + } + + }); + //_ask.ToList().ForEach(itm => + //{ + // if (_detail.PoBillNum == itm.PoBillNum && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + // { + // _detail.TempQty = itm.AskSum; + // } + //}); + //arrive.ToList().ForEach(itm => + //{ + // if (_detail.PoBillNum == itm.PoBillNum && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + // { + // _detail.ArriveQty = itm.ArriveSum.ToString(); + // } + + //}); + + + + } + } + + + _ls=_list; + + } + return _ls; + + + } + + public static List COMPARE_PO(string p_number) + { + List _ls = new List(); + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _list = db.V_TB_PO_DETAIL.Where(p => p.PoBillNum == p_number).ToList(); + if (_list.Count > 0) + { + //var _detail = p_list[0]; + foreach (V_TB_PO_DETAIL _detail in _list) + { + //var _ask = db.TB_ASK_DETAIL.Where(p => p.PoBillNum == _detail.PoBillNum && p.IsDeleted == false).GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode }).Select(p => new { AskSum = p.Sum(itm => itm.AskQty), PoLine = p.Key.PoLine, PoBillNum = p.Key.PoBillNum, PartCode = p.Key.PartCode }); + + var rec = db.TB_RECEIVE_DETAIL.Where(p => p.PoBillNum == _detail.PoBillNum && p.IsDeleted == false && p.BillType == 0).GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode }).Select(p => new { ReceiveSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, PoBillNum = p.Key.PoBillNum, PartCode = p.Key.PartCode }); + + var reject = db.TB_RECEIVE_DETAIL.Where(p => p.PoBillNum == _detail.PoBillNum && p.IsDeleted == false && p.BillType == 1).GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode }).Select(p => new { RejectSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, PoBillNum = p.Key.PoBillNum, PartCode = p.Key.PartCode }); + + var asn = db.TB_ASN_DETAIL.Where(p => p.PoBillNum == _detail.PoBillNum && p.IsDeleted == false && p.State == (int)AsnState.Ship).GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode }).Select(p => new { AsSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, PoBillNum = p.Key.PoBillNum, PartCode = p.Key.PartCode }); + + //var arrive = db.TB_ARRIVE_DETAIL.Where(p => p.PoBillNum == _detail.PoBillNum && p.IsDeleted == false && p.State == (int)ArriveState.OK && p.BillType == (int)ArriveBillType.Receive).GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode }).Select(p => new { ArriveSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, PoBillNum = p.Key.PoBillNum, PartCode = p.Key.PartCode }); + + + _detail.PartDesc1 = _detail.PartDesc1 + _detail.PartDesc2; + rec.ToList().ForEach(itm => + { + if (_detail.PoBillNum == itm.PoBillNum && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + { + _detail.ReceivedQty = itm.ReceiveSum; + } + + }); + reject.ToList().ForEach(itm => + { + if (_detail.PoBillNum == itm.PoBillNum && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + { + _detail.RejectQty = itm.RejectSum.ToString(); + } + + }); + asn.ToList().ForEach(itm => + { + if (_detail.PoBillNum == itm.PoBillNum && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + { + _detail.ShippedQty = itm.AsSum; + } + + }); + //_ask.ToList().ForEach(itm => + //{ + // if (_detail.PoBillNum == itm.PoBillNum && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + // { + // _detail.TempQty = itm.AskSum; + // } + //}); + //arrive.ToList().ForEach(itm => + //{ + // if (_detail.PoBillNum == itm.PoBillNum && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) + // { + // _detail.ArriveQty = itm.ArriveSum.ToString(); + // } + + //}); + + + + } + } + + + _ls = _list; + + } + return _ls; + + + } + public static ResultObject Save_Reject(List p_list) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _ls = p_list.Select(p => p.UID).ToList(); + + var _list=db.TB_RECEIVE_DETAIL.Where(p => _ls.Contains(p.UID)).ToList(); + _list.ForEach(p => { + var _entity=p_list.Where(itm => itm.UID == p.UID).FirstOrDefault(); + if (_entity != null) + { + p.Remark = _entity.Remark; + //p.AsnBillNum = _entity.AsnBillNum; + } + + }); + + db.TB_RECEIVE_DETAIL.AddOrUpdate(_list.ToArray()); + + int state = db.SaveChanges(); + if (state != -1) + { + + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_ASK_TO_ASN", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_ASK_TO_ASN", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_ASK_TO_ASN", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_ASK_TO_ASN", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + /// + /// 获取退货数量 + /// + /// + /// + public static List Get_V_TB_ASN_DETAIL(List p_list) + { + + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + p_list.ForEach(itm => + { + + var _sum= db.V_TB_RECEIVE_DETAIL.Where(p => p.AsnBillNum == itm.AsnBillNum && p.PartCode == itm.PartCode && p.Batch == itm.Batch && p.IsDeleted == false&&p.VendBatch==itm.VendBatch&&p.BillType_DESC== "退货单").Select(p => p.Qty).DefaultIfEmpty().Sum(); + itm.CanRejectQty = itm.Qty - _sum; + }); + + } + return p_list; + } + /// + /// 数据导入 + /// + /// + /// + /// + /// + /// + /// + public static ResultObject EXCEL_RECEIVE(List p_order_list, string p_creator, string p_buyer, string p_site, DateTime p_time) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + int number = 1; + List lineError = new List(); + List ErrorList = new List(); + p_order_list.ForEach + (p => + { + var _ls = CheckExcel(db, p); + if (_ls.Count > 0) + { + lineError.Add(number.ToString()); + ErrorList.Add(string.Join("
", _ls.ToArray())); + } + number++; + }); + if (lineError.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.MessageList.AddRange(ErrorList); + _ret.Result = false; + } + else + { + var GroupList = p_order_list.GroupBy(p => new { p.采购订单号, p.行号, p.零件编号, p.价格, p.供应商编码, p.单位 }).Select(p => new { 数量 = p.Sum(itm => decimal.Parse(itm.数量)), 行号 = p.Key.行号, 采购订单号 = p.Key.采购订单号, p.Key.零件编号, p.Key.价格, p.Key.供应商编码, p.Key.单位 }).ToList(); + var OrderList = GroupList.GroupBy(p => p.采购订单号).ToList(); + OrderList.ForEach((p) => + { + var list_distinct = p.GroupBy(t => new { t.零件编号, t.行号 }).ToList(); + var list = p.ToList(); + if (list_distinct.Count < list.Count) + { + _ret.MessageList.Add("相同组号,存在同一编号、行号的数据"); + return; + } + if (list.Count > 0) + { + var _entity = list.FirstOrDefault(); + TB_ASK _ask = new TB_ASK(); + _ask.AskBillNum = SCP_BILLCODE_CONTROLLER.MakeASKCode(); + _ask.State = (int)AskState.Receive; + _ask.PoBillNum = _entity.采购订单号.ToUpper(); + _ask.ModType = (int)BillModType.Contract; + _ask.Site = p_site; + _ask.BeginTime = p_time; + _ask.Buyer = p_creator; + _ask.BuyerPhone = ""; + _ask.ErpBillNum = _entity.采购订单号.ToUpper(); + _ask.EndTime = p_time; + _ask.CreateTime = p_time; + _ask.CreateUser = p_creator; + _ask.VendId = _entity.供应商编码.ToUpper(); + _ask.GUID = Guid.NewGuid(); + _ask.IsDeleted = false; + db.TB_ASK.Add(_ask); + + TB_ASN _asn = new TB_ASN(); + _asn.AsnBillNum = SCP_BILLCODE_CONTROLLER.MakeASNCode(); + _asn.AskBillNum = _ask.AskBillNum; + _asn.VendId = _entity.供应商编码.ToUpper(); ; + _asn.State = (int)AsnState.Receive; + _asn.PoBillNum = _entity.采购订单号.ToUpper(); + _asn.Site = p_site; + _asn.CreateTime = p_time; + _asn.CreateUser = p_creator; + _asn.UpdateTime = p_time; + _asn.UpdateUser = p_creator; + _asn.ShipTime = p_time; + _asn.ShipUser = p_creator; + _asn.ReceiveTime = p_time; + _asn.ReceiveUser = p_creator; + _asn.GUID = Guid.NewGuid(); + _asn.IsDeleted = false; + db.TB_ASN.Add(_asn); + + list.ForEach((itm) => + { + TB_ASK_DETAIL _t_ASK_Detail = new TB_ASK_DETAIL(); + _t_ASK_Detail.PoLine = Int32.Parse(itm.行号); + _t_ASK_Detail.Currency = ""; + _t_ASK_Detail.AskBillNum = _ask.AskBillNum; + _t_ASK_Detail.PoBillNum = _ask.PoBillNum; + _t_ASK_Detail.PoUnit = itm.单位; + _t_ASK_Detail.CreateTime = DateTime.Now; + _t_ASK_Detail.CreateUser = _ask.CreateUser; + _t_ASK_Detail.PartCode = itm.零件编号.ToUpper(); + _t_ASK_Detail.BeginTime = p_time; + _t_ASK_Detail.EndTime = p_time; + _t_ASK_Detail.TempQty = itm.数量; + _t_ASK_Detail.AskQty = itm.数量; + _t_ASK_Detail.IsDeleted = false; + _t_ASK_Detail.LocUnit = itm.单位; + _t_ASK_Detail.UnConv = 1; + _t_ASK_Detail.State = _ask.State; + _t_ASK_Detail.Price = string.IsNullOrEmpty(itm.价格) ? 0 : decimal.Parse(itm.价格); + _t_ASK_Detail.GUID = Guid.NewGuid(); + db.TB_ASK_DETAIL.Add(_t_ASK_Detail); + + TB_ASN_DETAIL _t_ASN_Detail = new TB_ASN_DETAIL(); + _t_ASN_Detail.AsnBillNum = _asn.AsnBillNum; + _t_ASN_Detail.PoLine = Int32.Parse(itm.行号); + _t_ASN_Detail.Currency = ""; + _t_ASN_Detail.PoBillNum = _asn.PoBillNum; + _t_ASN_Detail.PoUnit = itm.单位; + _t_ASN_Detail.CreateTime = DateTime.Now; + _t_ASN_Detail.CreateUser = _asn.CreateUser; + _t_ASN_Detail.PartCode = itm.零件编号.ToUpper(); + _t_ASN_Detail.Batch = p_time.ToString("yyyyMMdd"); + _t_ASN_Detail.VendBatch = p_time.ToString("yyyyMMdd"); + _t_ASN_Detail.Qty = itm.数量; + _t_ASN_Detail.State = (int)AsnState.Receive; + _t_ASN_Detail.CreateTime = p_time; + _t_ASN_Detail.CreateUser = p_creator; + _t_ASN_Detail.IsDeleted = false; + _t_ASN_Detail.GUID = Guid.NewGuid(); + _t_ASN_Detail.PoUnit = itm.单位; + _t_ASN_Detail.ProduceDate = p_time; + db.TB_ASN_DETAIL.Add(_t_ASN_Detail); + + var _reclist = p_order_list.Where(t => t.零件编号 == itm.零件编号 && t.采购订单号 == itm.采购订单号 && t.行号 == itm.行号).GroupBy(t => t.收货单号).ToList(); + _reclist.ForEach((q) => + { + var reclist = q.FirstOrDefault(); + TB_RECEIVE _rec = new TB_RECEIVE(); + _rec.RecvBillNum = reclist.收货单号; + _rec.State = (int)FormState.开放; + _rec.Remark = _ask.AskBillNum; + _rec.CreateTime = p_time; + _rec.CreateUser = p_creator; + _rec.IsDeleted = false; + _rec.GUID = System.Guid.NewGuid(); + _rec.BillType = 0; + _rec.PoBillNum = reclist.采购订单号.ToUpper(); + _rec.AsnBillNum = reclist.采购订单号.ToUpper(); + _rec.Site = p_site; + _rec.VendId = reclist.供应商编码.ToUpper(); + _rec.ShipTime = p_time; + db.TB_RECEIVE.Add(_rec); + var _recdetaillist = p_order_list.Where(f => f.收货单号 == reclist.收货单号).ToList(); + _recdetaillist.ForEach((n) => + { + TB_RECEIVE_DETAIL _t_RECEIVE_Detail = new TB_RECEIVE_DETAIL(); + _t_RECEIVE_Detail.RecvBillNum = n.收货单号; + _t_RECEIVE_Detail.PoBillNum = n.采购订单号.ToUpper(); + _t_RECEIVE_Detail.PoLine = Int32.Parse(n.行号); + _t_RECEIVE_Detail.PartCode = n.零件编号.ToUpper(); + _t_RECEIVE_Detail.Batch = n.批次; + _t_RECEIVE_Detail.VendBatch = n.供应商批次; + _t_RECEIVE_Detail.PoUnit = n.单位; + _t_RECEIVE_Detail.LocUnit = ""; + _t_RECEIVE_Detail.Qty = decimal.Parse(n.数量); + _t_RECEIVE_Detail.State = (int)FormState.开放; + _t_RECEIVE_Detail.Remark = _ask.AskBillNum; + _t_RECEIVE_Detail.CreateTime = p_time; + _t_RECEIVE_Detail.CreateUser = p_creator; + _t_RECEIVE_Detail.IsDeleted = false; + _t_RECEIVE_Detail.GUID = System.Guid.NewGuid(); + _t_RECEIVE_Detail.BillType = 0; + db.TB_RECEIVE_DETAIL.Add(_t_RECEIVE_Detail); + }); + + }); + }); + } + else + { + _ret.MessageList.Add("请检查数据后,重新导入!"); + return; + } + + if (_ret.MessageList.Count == 0) + { + int state = db.SaveChanges(); + if (state != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + ); + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "EXCEL_RECEIVE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "EXCEL_RECEIVE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "EXCEL_RECEIVE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "EXCEL_RECEIVE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + + } + private static List CheckExcel(ScpEntities db, SCP_ASN_EXCEL p_excel) + { + List ErrorList = new List(); + if (!string.IsNullOrEmpty(p_excel.采购订单号)) + { + int count = db.TB_PO_DETAIL.Count(p => p.PoBillNum == p_excel.采购订单号 && p.PartCode == p_excel.零件编号 && p.PoLine.ToString() == p_excel.行号); + if (count == 0) + { + ErrorList.Add(string.Format("订单编号{0}零件号{1}行号{2}不存在!", p_excel.采购订单号, p_excel.零件编号, p_excel.行号)); + } + } + else + { + ErrorList.Add(string.Format("订单编号为空!")); + } + if ( + string.IsNullOrEmpty(p_excel.收货单号) || + string.IsNullOrEmpty(p_excel.采购订单号) || + string.IsNullOrEmpty(p_excel.供应商编码) || + string.IsNullOrEmpty(p_excel.价格) || + string.IsNullOrEmpty(p_excel.零件编号) || + string.IsNullOrEmpty(p_excel.行号) || + string.IsNullOrEmpty(p_excel.批次) || + string.IsNullOrEmpty(p_excel.数量) || + string.IsNullOrEmpty(p_excel.单位) || + string.IsNullOrEmpty(p_excel.价格)) + { + ErrorList.Add(string.Format("收货单号【{1}】零件号【{0}】有填写为空!", p_excel.零件编号, p_excel.收货单号)); + } + return ErrorList; + } + } +} diff --git a/北京北汽/SCP/Controller/SCP_RECIVE_PORT_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_RECIVE_PORT_CONTROLLER.cs new file mode 100644 index 0000000..5428f28 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_RECIVE_PORT_CONTROLLER.cs @@ -0,0 +1,254 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using CK.SCP.Controller; +using System.Data.Entity.Core; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Controller +{ + public class SCP_RECIVE_PORT_CONTROLLER + { + + + public static ResultObject> Get_TA_REVICE_PORT_List(TA_REVICE_PORT p_entity) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.TA_REVICE_PORT; + if (!string.IsNullOrEmpty(p_entity.PORT_NO)) + { + q = q.Where(p => p.PORT_NO.Contains(p_entity.PORT_NO)); + } + if (!string.IsNullOrEmpty(p_entity.PORT_DESCRIPTION)) + { + q = q.Where(p => p.PORT_DESCRIPTION.Contains(p_entity.PORT_DESCRIPTION)); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.ToList(); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVE_PORT_CONTROLLER), "Get_TA_REVICE_PORT_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVE_PORT_CONTROLLER), "Get_TA_REVICE_PORT_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVE_PORT_CONTROLLER), "Get_TA_REVICE_PORT_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVE_PORT_CONTROLLER), "Get_TA_REVICE_PORT_List", e.Message); + throw e; + } + return _ret; + } + + + public static ResultObject Save_TA_REVICE_PORT(TA_REVICE_PORT p_entity) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + db.TA_REVICE_PORT.AddOrUpdate(p_entity); + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVE_PORT_CONTROLLER), "Save_TA_REVICE_PORT", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVE_PORT_CONTROLLER), "Save_TA_REVICE_PORT", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVE_PORT_CONTROLLER), "Save_TA_REVICE_PORT", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVE_PORT_CONTROLLER), "Save_TA_REVICE_PORT", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public static ResultObject Del_TA_REVICE_PORT(TA_REVICE_PORT p_entity) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + db.TA_REVICE_PORT.Remove(p_entity); + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVE_PORT_CONTROLLER), "Del_TA_REVICE_PORT", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVE_PORT_CONTROLLER), "Del_TA_REVICE_PORT", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVE_PORT_CONTROLLER), "Del_TA_REVICE_PORT", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVE_PORT_CONTROLLER), "Del_TA_REVICE_PORT", e.Message); throw e; + } + return _ret; + } + } +} diff --git a/北京北汽/SCP/Controller/SCP_REJECT_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_REJECT_CONTROLLER.cs new file mode 100644 index 0000000..d05816a --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_REJECT_CONTROLLER.cs @@ -0,0 +1,367 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using CK.SCP.Controller; +using CK.SCP.Models.Enums; +using System.Data.Entity.Core; + +namespace CK.SCP.Controller +{ + public class SCP_REJECT_CONTROLLER + { + public static void Get_V_TB_REJECT_List(V_TB_REJECT p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_REJECT; + + if (!string.IsNullOrEmpty(p_entity.RjctBillNum)) + { + q = q.Where(p => p.RjctBillNum == p_entity.RjctBillNum); + } + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.AsnBillNum)) + { + q = q.Where(p => p.AsnBillNum.Contains(p_entity.AsnBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (p_entity.State != 0) + { + q = q.Where(p => p.State == p_entity.State); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (p_entity.IsDeleted != false) + { + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + if (!string.IsNullOrEmpty(p_entity.OperName)) + { + q = q.Where(p => p.OperName.Contains(p_entity.OperName)); + } + if (!string.IsNullOrEmpty(p_entity.Site_Desc)) + { + q = q.Where(p => p.Site_Desc.Contains(p_entity.Site_Desc)); + } + //if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + //{ + // q = q.Where(p => p_entity.UserInAddress.Contains(p.Address)); + //} + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + + p_action(_ret); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(V_TB_REJECT), "Get_V_TB_REJECT_List", e.Message); + throw e; + } + + } + + + + public static void Get_V_TB_REJECT_DETAIL_List(V_TB_REJECT_DETAIL p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_REJECT_DETAIL; + + if (!string.IsNullOrEmpty(p_entity.RjctBillNum)) + { + q = q.Where(p => p.RjctBillNum == p_entity.RjctBillNum); + } + if (p_entity.PoLine != 0) + { + q = q.Where(p => p.PoLine == p_entity.PoLine); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.Batch)) + { + q = q.Where(p => p.Batch.Contains(p_entity.Batch)); + } + if (p_entity.Qty != 0) + { + q = q.Where(p => p.Qty == p_entity.Qty); + } + + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (p_entity.IsDeleted != false) + { + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + } + if (!string.IsNullOrEmpty(p_entity.AsnBillNum)) + { + q = q.Where(p => p.AsnBillNum.Contains(p_entity.AsnBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (!string.IsNullOrEmpty(p_entity.OperName)) + { + q = q.Where(p => p.OperName.Contains(p_entity.OperName)); + } + if (!string.IsNullOrEmpty(p_entity.PartDesc1)) + { + q = q.Where(p => p.PartDesc1.Contains(p_entity.PartDesc1)); + } + if (p_entity.State != 0) + { + q = q.Where(p => p.State == p_entity.State); + } + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + //if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + //{ + // q = q.Where(p => p_entity.UserInAddress.Contains(p.Address)); + //} + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(V_TB_REJECT_DETAIL), "Get_V_TB_REJECT_DETAIL_List", e.Message); + throw e; + } + + } + public static ResultObject Save_TB_REJECT_STATE(List p_list, RejectState p_state) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _ls = db.V_TB_REJECT.Where(p => p_list.Contains(p.RjctBillNum)).ToList(); + int count = _ls.Count(p => p.State == (int)RejectState.NoReceive); + if (count == _ls.Count && _ls.Count > 0) + { + _ls.ForEach(p => + { + p.State = (int)RejectState.Check; + var _list = db.TB_REJECT_DETAIL.Where(itm => itm.RjctBillNum == p.RjctBillNum).ToList(); + _list.ForEach(itm => itm.State = (int)RejectState.Check); + db.TB_REJECT_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray()); + #region 退货审核提醒供应商提起发票申请 + TB_PENING_ITEMS _item = new TB_PENING_ITEMS(); + _item.ROLE_NAME = "供应商"; + _item.ITEM_NO = p.RjctBillNum; + _item.ITEM_CONTENT = string.Format("退货单号{0}发货单号{1},已拒绝收货!", p.RjctBillNum, _ls[0].AsnBillNum); + _item.ITEM_TYPE = (int)PENDING_MESSAGE_TYPE.FC_AUDIT_BACK; + _item.ITEM_STATE = (int)PENDING_STATE.WAITING; + _item.SENDER = p.CreateUser; + _item.VEND_ID = p.VendId; + _item.SENDING_TIME = DateTime.Now; + _item.ITEM_ADDRESS = p.Site_Desc; + _item.GUID = Guid.NewGuid(); + db.TB_PENING_ITEMS.Add(_item); + #endregion + } + ); + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "选择的记录,有不是拒收状态记录!"; + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(V_TB_REJECT_DETAIL), "Save_TB_REJECT_STATE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + /// + /// 保存退货 + /// + /// + /// + /// + /// + public static ResultObject Save_TB_REJECT(V_TB_ASN_DETAIL p_entity, List p_list, string currentuser) + { + ResultObject _ret = new ResultObject(); + var scpRcvList = new List(); + var scpRcveDetailList = new List(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + TB_RECEIVE scpRcv = new TB_RECEIVE(); + scpRcv.RecvBillNum = SCP_BILLCODE_CONTROLLER.MakeReviceCode();//退货单号 + scpRcv.State = (int)FormState.开放; + scpRcv.Remark = ""; + scpRcv.CreateTime = DateTime.Now;//创建日期 + scpRcv.CreateUser = currentuser;//创建用户 + scpRcv.IsDeleted = false; + scpRcv.GUID = System.Guid.NewGuid(); + scpRcv.BillType = 1; + scpRcv.PoBillNum = p_entity.PoBillNum;//采购单 + scpRcv.AsnBillNum = p_entity.AsnBillNum;//发货单号 + scpRcv.Site = p_entity.Site;//地点 + scpRcv.VendId = p_entity.VendId;//供货商名称 + scpRcv.ShipTime = DateTime.Now;//收货日期 + scpRcvList.Add(scpRcv); + db.TB_RECEIVE.AddOrUpdate(p => p.UID, scpRcvList.ToArray()); + + p_list.ForEach(item => + { + TB_RECEIVE_DETAIL scpRcvDetail = new TB_RECEIVE_DETAIL(); + scpRcvDetail.RecvBillNum = SCP_BILLCODE_CONTROLLER.MakeReviceCode();//退货单号 + scpRcvDetail.PoBillNum = item.PoBillNum;//采购单 + scpRcvDetail.PoLine = item.PoLine;//订单行 + scpRcvDetail.PartCode = item.PartCode;//零件号 + scpRcvDetail.Batch = item.Batch;//批次 + scpRcvDetail.VendBatch = item.VendBatch;//供应商批号 + scpRcvDetail.PoUnit = item.PoUnit;//采购单位 + scpRcvDetail.LocUnit = item.LocUnit;//基本单位 + scpRcvDetail.Qty = item.RejectQty;//退货数量 + //scpRcvDetail.DockCode = "";//收货口 + scpRcvDetail.State = (int)FormState.开放;// (int)FormState.关闭, + scpRcvDetail.Remark = item.Remark; + scpRcvDetail.CreateTime = DateTime.Now;//创建日期 + scpRcvDetail.CreateUser = currentuser;//创建用户 + scpRcvDetail.IsDeleted = false; + scpRcvDetail.GUID = System.Guid.NewGuid(); + scpRcvDetail.BillType = 1; + scpRcveDetailList.Add(scpRcvDetail); + }); + db.TB_RECEIVE_DETAIL.AddOrUpdate(p => p.UID, scpRcveDetailList.ToArray()); + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Save_TB_RECEIVE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Save_TB_RECEIVE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Save_TB_RECEIVE", ex.ToString()); + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_RECIVECE_CONTROLLER), "Save_TB_RECEIVE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + } +} diff --git a/北京北汽/SCP/Controller/SCP_REPORT_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_REPORT_CONTROLLER.cs new file mode 100644 index 0000000..56f56be --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_REPORT_CONTROLLER.cs @@ -0,0 +1,1577 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System.Data.Entity.Core; +using System.Web; +using System.Data.SqlClient; +using System.Data; +using CK.SCP.Models.ScpEntity.ExcelExportEnttity; +using System.Text.RegularExpressions; + +namespace CK.SCP.Controller +{ + public class SCP_REPORT_CONTROLLER + { + + public static void Get_V_TB_ASK_RECEIVE_List(TB_ASK_RECEIVE p_entity, Action>> p_action) + { + + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + + IQueryable q = db.TB_ASK_RECEIVE; + if (p_entity.RecvBeginTime != null) + { + q = q.Where(p => p.RecvTime >= p_entity.RecvBeginTime); + } + if (p_entity.RecvEndTime != null) + { + q = q.Where(p => p.RecvTime <= p_entity.RecvEndTime); + } + + if (!string.IsNullOrEmpty(p_entity.AskBillNum)) + { + q = q.Where(p => p.AskBillNum.Contains(p_entity.AskBillNum)); + } + + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + var _ls = p_entity.PartCode.Split(new char[] { ',' }); + + q = q.Where(p => _ls.Contains(p.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.PartDesc1)) + { + q = q.Where(p => p.PartDesc1.Contains(p_entity.PartDesc1)); + } + if (!string.IsNullOrEmpty(p_entity.ProjectId)) + { + q = q.Where(p => p.ProjectId.Contains(p_entity.ProjectId)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site == p_entity.Site); + } + if (!string.IsNullOrEmpty(p_entity.Buyer)) + { + q = q.Where(p => p.Buyer == p_entity.Buyer); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId == p_entity.VendId); + } + + + if (p_entity.State != null) + { + switch (p_entity.State) + { + case 0: + q = q.Where(p => p.AskQty > 0 && p.Qty == 0 && p.ReviceQty == 0); + break; + case 1: + q = q.Where(p => p.AskQty > 0 && p.Qty > 0 && p.ReviceQty == 0); + break; + case 2: + q = q.Where(p => p.AskQty == p.ReviceQty); + break; + case 3: + q = q.Where(p => p.ReviceQty > 0 && p.AskQty > p.ReviceQty); + break; + } + } + + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_TIMELY_DELIVERY_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_TIMELY_DELIVERY_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_TIMELY_DELIVERY_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_TIMELY_DELIVERY_List", e.Message); + throw e; + } + } + + //public override DataTable GetPagedDataTable(int pageIndex, int pageSize) + //{ + // SetWhere(); + + // if (StrOrder == "") StrOrder = "UserType desc, UserName asc"; + + // int rowbegin = (pageIndex * pageSize) + 1; + // int rowend = (pageIndex + 1) * pageSize; + + // return GetDataLimit(rowbegin, rowend, "", StrWhere + " and " + StrSearch, StrOrder); + //} + + + //public virtual DataTable GetDataLimit(int rows1, int rows2, string fields, string strwhere, string orderby) + //{ + // if (fields == "") fields = "*"; + + // string sql = @" + // select {0} from ( + // select ROW_NUMBER() over(order by {1}) as rows_number_9999999, {0} from {2} where {5} + // ) as query_temp_table_9999999 where rows_number_9999999 between {3} and {4} and ({5}) + // "; + + // object[] obj = new object[6]; + // obj[0] = fields; + // obj[1] = orderby; + // obj[2] = TableName; + // obj[3] = rows1; + // obj[4] = rows2; + // obj[5] = strwhere; + // sql = string.Format(sql, obj); + + // return db.Exec_DataSet(sql).Tables[0]; + //} + + public static void Get_SCP_PO_REPORT(List p_list, Action> p_action) + { + + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + DataSet _ds = new DataSet(); + List _ls = new List(); + SCP_PO_REPORT _report = new SCP_PO_REPORT(); + + var _askList=db.V_TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); + + if (_askList.Count>0) + { + var _ask=_askList.FirstOrDefault(); + var _poList= _askList.Select(p => p.PoBillNum).Distinct().ToList(); + _report.AuditTime = _ask.UpdateTime.Value.ToShortDateString(); + _report.Auditor = _ask.UpdateUser; + _report.FactoryName = _ask.Site_Desc; + _report.ContectPhone = _ask.BuyerPhone; + _report.MaterialPlanner = _ask.Buyer; + _report.VendName = _ask.VendName; + _report.VendId = _ask.VendId; + _report.AskBillNum = string.Join(",", p_list.ToArray()); + _report.PoBillNum = string.Join(",", _poList.ToArray()); + + + + var _first = db.TA_VENDER.Where(p => p.VendId == _ask.VendId).FirstOrDefault(); + if (_first != null) + { + _report.VendPhone =_first.Phone; + } + _ls.Add(_report); + List _detailList = new List(); + + var _askDetailList = db.V_TB_ASK_DETAIL.Where(p => p_list.Contains(p.AskBillNum)).OrderBy(p => p.PartCode).ThenBy(p => p.EndTime).ToList(); + decimal _sum = 0; + foreach (var itm in _askDetailList) + { + + SCP_PO_REPORT_DETAIL _detail = new SCP_PO_REPORT_DETAIL(); + _detail.PartCode = itm.PartCode; + _detail.PartDesc1 = (string.IsNullOrEmpty(itm.PartDesc1) ? string.Empty : itm.PartDesc2) + (string.IsNullOrEmpty(itm.PartDesc1) ? string.Empty : itm.PartDesc1); + _detail.PoUnit = itm.PoUnit; + _detail.AskQty = itm.AskQty; + _detail.PoBillNum = itm.PoBillNum; + _detail.PoLine = itm.PoLine; + _detail.Price = itm.Price; + _detail.BeginTime = itm.BeginTime.Value; + _detail.EndTime = (itm.EndTime != null) ? itm.EndTime.Value : itm.BeginTime.Value; + decimal _subTotal = Math.Round(itm.Price * itm.AskQty,2); + _detail.SubTotal = _subTotal.ToString(); + _sum += _subTotal; + _detailList.Add(_detail); + + } + _report.TotalPrice = Math.Round(_sum, 2).ToString(); + + + var dt = ConvertHelper.ToDataTable(_ls); + _ds.Tables.Add(dt); + + var _dt1 = ConvertHelper.ToDataTable(_detailList); + _ds.Tables.Add(_dt1); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = _ds; + p_action(_ret); + } + } + + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_List", e.Message); + throw e; + } + } + + public static DataTable Get_RECEIVE_YEAR(V_TB_RECEIVE_DETAIL p_detail, string p_year ,int p_state=1) + { + + string _sql = "SELECT D.*,E.VENDNAME,F.PROJECTID FROM({0}) c pivot(sum(c.数量) for c.M in (一月, 二月, 三月, 四月, 五月, 六月, 七月, 八月, 九月, 十月, 十一月, 十二月)) as d LEFT JOIN TA_VENDER E on D.vendid=E.VENDID LEFT JOIN TA_PART F ON f.partcode =d.partcode where {1}"; + string sqlString = string.Empty; + + if (p_state == 1) + { + sqlString = "SELECT * FROM\n" + + "(\n" + + "SELECT SUM(qty)数量,PartCode,'{0}' AS M ,VendId,SubSite,PartDesc1,PoUnit\n" + + " FROM [V_TB_ARRIVE_DETAIL] where createtime between '{1}' and '{2}' and [BillType_DESC]='到货单' group by PartCode,VendId,SubSite,PartDesc1,PoUnit) {4}"; + } + if (p_state == 2) + { + sqlString = "SELECT * FROM\n" + + "(\n" + + "SELECT SUM(qty)数量,PartCode,'{0}' AS M ,VendId,SubSite,PartDesc1,PoUnit\n" + + " FROM [V_TB_ARRIVE_DETAIL] where createtime between '{1}' and '{2}' and [BillType_DESC]='退货单' group by PartCode,VendId,SubSite,PartDesc1,PoUnit) {4}"; + } + + + Dictionary dic = new Dictionary(); + StringBuilder _buffer = new StringBuilder(); + for (int i = 1; i < 13; i++) + { + string _begin = string.Empty; + string _end = string.Empty; + if (i < 10) + { + _begin = p_year + "-" + "0" + i.ToString() + "-" + "01"; + _end = DateTime.Parse(_begin).AddMonths(1).AddDays(-1).ToString("yyyy-MM-dd"); + } + else + { + _begin = p_year + "-" + i.ToString() + "-" + "01"; + _end = DateTime.Parse(_begin).AddMonths(1).AddDays(-1).ToString("yyyy-MM-dd"); + } + if (i == 12) + { + _buffer.AppendFormat(sqlString, "十二月", _begin, _end, p_detail.Site, "A" + i.ToString() + "\r\n"); + } + else + { + string _month = string.Empty; + switch (i) + { + case 1: + _month = "一月"; + break; + case 2: + _month = "二月"; + break; + case 3: + _month = "三月"; + break; + case 4: + _month = "四月"; + break; + case 5: + _month = "五月"; + break; + case 6: + _month = "六月"; + break; + case 7: + _month = "七月"; + break; + case 8: + _month = "八月"; + break; + case 9: + _month = "九月"; + break; + case 10: + _month = "十月"; + break; + case 11: + _month = "十一月"; + break; + } + _buffer.AppendFormat(sqlString, _month, _begin, _end, p_detail.Site, "A" + i.ToString() + "\r\n UNION ALL \r\n"); + } + } + string _str = _buffer.ToString(); + + string where1 = " 1=1 "; + if (!string.IsNullOrEmpty(p_detail.PartCode)) + { + where1 += string.Format(" and D.Partcode='{0}' ", p_detail.PartCode); + } + if (!string.IsNullOrEmpty(p_detail.VendId)) + { + where1 += string.Format(" and D.VendId='{0}' ", p_detail.VendId); + } + if (!string.IsNullOrEmpty(p_detail.ProjectId)) + { + where1 += string.Format(" and ProjectId like '{0}%' ", p_detail.ProjectId); + } + if (!string.IsNullOrEmpty(p_detail.SubSite)) + { + where1 += string.Format(" and D.SubSite = '{0}' ", p_detail.SubSite); + } + string _sql1 = string.Format(_sql, _str, where1); + + DataTable dt = new DataTable(); + DataTable _tbDate = new DataTable(); + var dbSetting = GlobalConfig.ScpDatabase; + SqlConnection conn = new System.Data.SqlClient.SqlConnection(); + try + { + var strConn = EntitiesFactory.GetEfConnectionString(dbSetting); + + conn.ConnectionString = strConn; + if (conn.State != ConnectionState.Open) + { + conn.Open(); + } + SqlCommand cmd = new SqlCommand(); + + cmd.Connection = conn; + + cmd.CommandText = string.Format(_sql1); + SqlDataAdapter adapter = new SqlDataAdapter(cmd); + adapter.Fill(dt); + dt.Columns.Add("合计"); + dt.Columns["PartCode"].ColumnName = "零件编号"; + dt.Columns["VendId"].ColumnName = "供应商编号"; + dt.Columns["VendName"].ColumnName = "供应商名称"; + dt.Columns["PartDesc1"].ColumnName = "零件名称"; + dt.Columns["SubSite"].ColumnName = "站点"; + dt.Columns["PoUnit"].ColumnName = "单位"; + dt.Columns["ProjectId"].ColumnName = "项目编号"; + foreach (DataRow row in dt.Rows) + { + decimal num = 0; + foreach (DataColumn column in dt.Columns) + { + var _reg = Regex.Match(column.ColumnName, @"月"); + if (!string.IsNullOrEmpty(_reg.Value)) + { + if (row[column.ColumnName] != null && !string.IsNullOrEmpty(row[column.ColumnName].ToString())) + { + num += decimal.Parse(row[column.ColumnName].ToString()); + } + } + } + row["合计"] = num; + } + } + catch + { } + return dt; + } + + public static string GET_V_SUPPLIERS_REGUALARLY_LIST_SQL(V_SUPPLIERS_REGUALARLY p_entity) + { + StringBuilder _buffer = new StringBuilder(); + + _buffer.Append("SELECT temp2.Qty / temp1.ReciveSumQty AS Regularly, temp1.ReciveSumQty, temp2.PoBillNum, temp2.AsnBillNum, "); + _buffer.Append(" temp2.PartCode, temp2.PartDesc1, temp2.Qty, temp2.AskQty, temp2.AskBillNum, temp2.ProjectId, temp2.PoLine, temp2.ShipTime,temp2.RecTime , "); + _buffer.Append(" temp2.RecvBillNum ,temp2.Site ,temp2.Scope, temp2.ReceiveTimeScope "); + _buffer.Append("FROM(SELECT SUM(a.Qty) AS ReciveSumQty, a.PoLine, a.PoBillNum, C.AskBillNum, a.PartCode "); + _buffer.Append(" FROM V_TB_RECEIVE_DETAIL AS a INNER JOIN "); + _buffer.Append(" V_TB_ASN_DETAIL AS C ON a.AsnBillNum = C.AsnBillNum AND a.PartCode = C.PartCode AND "); + _buffer.Append(" a.PoBillNum = C.PoBillNum AND a.PoLine = C.PoLine INNER JOIN "); + _buffer.Append(" TB_ASN AS e ON a.AsnBillNum = e.AsnBillNum LEFT OUTER JOIN "); + _buffer.Append(" V_TB_ASK_DETAIL AS B ON C.AskBillNum = B.AskBillNum AND B.PartCode = C.PartCode AND "); + _buffer.Append(" B.PoBillNum = C.PoBillNum AND B.PoLine = C.PoLine "); + _buffer.AppendFormat("WHERE(a.IsDeleted = 0) AND(a.Site = '{0}') ",p_entity.Site); + _buffer.Append(" GROUP BY a.PoLine, a.PoBillNum, C.AskBillNum, a.PartCode) AS temp1 INNER JOIN "); + _buffer.Append(" (SELECT a.PoBillNum, a.AsnBillNum, a.PartCode, a.PartDesc1, a.Qty, B.AskQty, C.AskBillNum, f.ProjectId, a.PoLine,e.ShipTime,a.ShipTime as RecTime, "); + _buffer.Append(" a.RecvBillNum, a.VendId, D.VendName ,a.site ,DATEDIFF(day, e.ShipTime, a.ShipTime) as Scope ,isnull(D.ReceiveTimeScope,0) as ReceiveTimeScope "); + _buffer.Append(" FROM V_TB_RECEIVE_DETAIL AS a INNER JOIN "); + _buffer.Append(" V_TB_ASN_DETAIL AS C ON a.AsnBillNum = C.AsnBillNum AND a.PartCode = C.PartCode AND "); + _buffer.Append(" a.PoBillNum = C.PoBillNum AND a.PoLine = C.PoLine INNER JOIN "); + _buffer.Append(" TB_ASN AS e ON a.AsnBillNum = e.AsnBillNum LEFT OUTER JOIN "); + _buffer.Append(" V_TB_ASK_DETAIL AS B ON C.AskBillNum = B.AskBillNum AND B.PartCode = C.PartCode AND "); + _buffer.Append(" B.PoBillNum = C.PoBillNum AND B.PoLine = C.PoLine LEFT OUTER JOIN "); + _buffer.Append(" TA_VENDER AS D ON a.VendId = D.VendId LEFT OUTER JOIN "); + _buffer.Append(" TA_PART AS f ON a.PartCode = f.PartCode INNER JOIN TA_VEND_PART as s on a.VendId=s.VendId and a.PartCode=s.PartCode and a.Site=s.Site "); + _buffer.Append(" WHERE(DATEDIFF(day, DATEADD(day, ISNULL(D.ReceiveTimeScope, 0), e.ShipTime), a.ShipTime) < s.TransportationTime ) "); + _buffer.AppendFormat(" AND(a.IsDeleted = 0) AND(a.Site = '{0}')) AS temp2 ON ", p_entity.Site); + _buffer.Append(" temp1.AskBillNum = temp2.AskBillNum AND temp1.PoBillNum = temp2.PoBillNum AND "); + _buffer.Append(" temp1.PartCode = temp2.PartCode AND temp1.PoLine = temp2.PoLine "); + + return _buffer.ToString(); + + } + + + + + + + public static string GET_SQE(V_TB_ASN_DETAIL p_entity) + { + StringBuilder _buffer = new StringBuilder(); + _buffer.Append("SELECT B.VendName,a.VendId ,b.FailQty, a.RecQty from "); + _buffer.Append(" (select SUM(Qty) as RecQty,VendId from V_TB_RECEIVE_DETAIL "); + + _buffer.Append(" WHERE 1=1 "); + if (!string.IsNullOrEmpty(p_entity.SQE_BeginTime)) + { + _buffer.AppendFormat(" AND V_TB_RECEIVE_DETAIL.CreateTime>=CAST('{0}' as datetime) ", p_entity.SQE_BeginTime); + } + if (!string.IsNullOrEmpty(p_entity.SQE_EndTime)) + { + _buffer.AppendFormat(" AND V_TB_RECEIVE_DETAIL.CreateTime<=CAST('{0}' as datetime) ", p_entity.SQE_EndTime); + } + _buffer.Append(" group by VendId ) as A INNER JOIN"); + _buffer.Append(" (select SUM(Failqty) as FailQty,V_TB_QUALITY.VendId,V_TB_QUALITY.VendName from V_TB_QUALITY "); + _buffer.Append(" inner join V_TB_RECEIVE "); + _buffer.Append(" on V_TB_RECEIVE.AsnBillNum=V_TB_QUALITY.By1 "); + _buffer.AppendFormat(" WHERE 1=1 "); + if (!string.IsNullOrEmpty(p_entity.SQE_BeginTime)) + { + _buffer.AppendFormat(" AND V_TB_RECEIVE.CreateTime>=CAST('{0}' as datetime) ", p_entity.SQE_BeginTime); + } + if (!string.IsNullOrEmpty(p_entity.SQE_EndTime)) + { + _buffer.AppendFormat(" AND V_TB_RECEIVE.CreateTime<=CAST('{0}' as datetime) ", p_entity.SQE_EndTime); + } + _buffer.Append(" group by V_TB_QUALITY.VendId, V_TB_QUALITY.VendName "); + _buffer.Append(" ) as B ON A.VendId=B.Vendid "); + return _buffer.ToString(); + + } + + + public static string GET_V_TB_RECEIVE_INVOICE_SQL(V_TB_RECEIVE_INVOICE p_entity) + { + StringBuilder _builder = new StringBuilder(); + _builder.Append(" SELECT A.UID, A.RecvBillNum, A.PoLine, A.PartCode, A.Batch, A.Qty, A.DockCode, A.Remark, A.CreateTime, A.CreateUser, "); + _builder.Append(" A.IsDeleted, A.GUID, A.AsnBillNum, A.Site, A.VendId, A.ShipTime, A.OperName, A.PartDesc1, A.State, A.PoBillNum, "); + _builder.Append(" B.VendName, B.Site_Desc,isnull(p.Price,0) as price, p.Currency, A.Unit, A.VendBatch, A.PoUnit, A.LocUnit, A.BillType_DESC, "); + _builder.Append(" B.State_DESC, p.BeginTime,SUM(isnull(C.Qty,0)) as InvQty,an.AskBillNum "); + _builder.Append(" FROM dbo.V_TB_RECEIVE_DETAIL AS A LEFT OUTER JOIN "); + _builder.Append(" dbo.V_TB_RECEIVE AS B ON A.RecvBillNum = B.RecvBillNum LEFT OUTER JOIN "); + _builder.Append(" dbo.V_TB_PO_DETAIL AS p ON A.PoBillNum = p.PoBillNum AND A.PoLine = p.PoLine AND A.PartCode = p.PartCode "); + _builder.Append(" "); + _builder.Append(" left join V_TB_INVOICE_DETAIL C "); + _builder.Append(" "); + _builder.Append(" ON A.PoBillNum = c.PoBillNum AND A.PoLine = C.PoLineNum AND A.PartCode = C.PartCode AND C.RecvBillNum = A.RecvBillNum "); + _builder.Append(" inner join TB_PO po on a.PoBillNum = po.PoBillNum "); + _builder.Append(" "); + _builder.Append(" inner join V_TB_ASN an on a.AsnBillNum = an.AsnBillNum "); + _builder.Append(" where po.ModType = 1 and (C.IsDeleted = 0 or C.IsDeleted IS NULL) AND aN.IsDeleted = 0 "); + _builder.Append(" "); + _builder.Append(" group by "); + _builder.Append(" "); + _builder.Append(" A.UID, A.RecvBillNum, A.PoLine, A.PartCode, A.Batch, A.Qty, A.DockCode, A.Remark, A.CreateTime, A.CreateUser, "); + _builder.Append(" A.IsDeleted, A.GUID, A.AsnBillNum, A.Site, A.VendId, A.ShipTime, A.OperName, A.PartDesc1, A.State, A.PoBillNum, "); + _builder.Append(" B.VendName, B.Site_Desc, p.Price, p.Currency, A.Unit, A.VendBatch, A.PoUnit, A.LocUnit, A.BillType_DESC, "); + _builder.Append(" B.State_DESC, p.BeginTime,an.AskBillNum "); + _builder.Append(" union all "); + _builder.Append(" "); + _builder.Append(" SELECT A.UID, A.RecvBillNum, A.PoLine, A.PartCode, A.Batch, A.Qty, A.DockCode, A.Remark, A.CreateTime, A.CreateUser, "); + _builder.Append(" A.IsDeleted, A.GUID, A.AsnBillNum, A.Site, A.VendId, A.ShipTime, A.OperName, A.PartDesc1, A.State, A.PoBillNum, "); + _builder.Append(" B.VendName, B.Site_Desc, isnull(p.Price,0) as price, p.Currency, A.Unit, A.VendBatch, A.PoUnit, A.LocUnit, A.BillType_DESC, "); + _builder.Append(" B.State_DESC, p.BeginTime,SUM(isnull(C.Qty,0)) as InvQty,ak.AskBillNum "); + _builder.Append(" FROM dbo.V_TB_RECEIVE_DETAIL AS A LEFT OUTER JOIN "); + _builder.Append(" dbo.V_TB_RECEIVE AS B ON A.RecvBillNum = B.RecvBillNum LEFT OUTER JOIN "); + _builder.Append(" dbo.V_TB_PO_DETAIL AS p ON A.PoBillNum = p.PoBillNum AND A.PoLine = p.PoLine AND A.PartCode = p.PartCode "); + _builder.Append(" "); + _builder.Append(" left join V_TB_INVOICE_DETAIL C "); + _builder.Append(" "); + _builder.Append(" ON A.PoBillNum = c.PoBillNum AND A.PoLine = C.PoLineNum AND A.PartCode = C.PartCode AND C.RecvBillNum = A.RecvBillNum "); + _builder.Append(" inner join TB_PO po on a.PoBillNum = po.PoBillNum "); + _builder.Append(" "); + _builder.Append(" inner join V_TB_ASK ak on a.PoBillNum = ak.PoBillNum "); + _builder.Append(" where po.ModType = 2 and (C.IsDeleted = 0 or C.IsDeleted IS NULL) AND ak.IsDeleted = 0 "); + _builder.Append(" "); + _builder.Append(" group by "); + _builder.Append(" "); + _builder.Append(" A.UID, A.RecvBillNum, A.PoLine, A.PartCode, A.Batch, A.Qty, A.DockCode, A.Remark, A.CreateTime, A.CreateUser, "); + _builder.Append(" A.IsDeleted, A.GUID, A.AsnBillNum, A.Site, A.VendId, A.ShipTime, A.OperName, A.PartDesc1, A.State, A.PoBillNum, "); + _builder.Append(" B.VendName, B.Site_Desc, p.Price, p.Currency, A.Unit, A.VendBatch, A.PoUnit, A.LocUnit, A.BillType_DESC, "); + _builder.Append(" B.State_DESC, p.BeginTime,ak.AskBillNum "); + return _builder.ToString(); + } + + public static string GetV_TIMELY_DELIVERY_SQL(V_TIMELY_DELIVERY p_entity) + { + StringBuilder _builder = new StringBuilder(); + _builder.Append(" SELECT AskQty, ReduceQty, Qty, s1.AskBillNum, PoBillNum, s1.PoLine, s1.PartCode, Number, PartDesc1, GUID, IsDeleted, BeginTime, EndTime, UID, ValidityDays, Site, VendId,DATEDIFF(day, s2.RecvTime, EndTime) AS ReviceDelayDay, RecvTime ,VendName ,s2.ReviceQty "); + _builder.Append(" FROM(SELECT A.AskQty, ISNULL(A.ReduceQty, 0) AS ReduceQty, SUM(CASE WHEN b.State >= 3 THEN b.Qty ELSE 0 END) "); + _builder.Append(" AS Qty, A.AskBillNum, A.PoBillNum, A.PoLine, A.PartCode, A.AskQty - ISNULL(A.ReduceQty, 0) "); + _builder.Append(" - SUM(CASE WHEN b.State >= 3 THEN b.Qty ELSE 0 END) AS Number, A.PartDesc1, A.CreateTime, "); + _builder.Append(" A.CreateUser, A.UpdateTime, A.UpdateUser, A.UpdateInfo, A.GUID, A.IsDeleted, A.BeginTime, A.EndTime, "); + _builder.Append(" A.UID, DATEDIFF(day, DATEADD(day, A.ValidityDays, ISNULL(MAX(B.UpdateTime), GETDATE())), A.EndTime) "); + _builder.Append(" AS ValidityDays, A.Site, A.VendId ,a.VendName "); + _builder.Append(" FROM dbo.V_TB_ASK_DETAIL AS A LEFT OUTER JOIN "); + _builder.Append(" dbo.V_TB_ASN_DETAIL AS B ON A.AskBillNum = B.AskBillNum AND A.PoLine = B.PoLine AND "); + _builder.Append(" A.PartCode = B.PartCode "); + _builder.Append(" left join TB_PO p on a.PoBillNum=p.PoBillNum "); + _builder.Append(" WHERE(A.IsDeleted = 0) AND(A.State > 1) and p.ModType=1 "); + + if (p_entity.BeginTime != null) + { + _builder.AppendFormat("AND a.BeginTime>=CAST('{0}' as datetime)", p_entity.BeginTime.Value.ToString()); + } + if (p_entity.EndTime != null) + { + _builder.AppendFormat("AND a.BeginTime<=CAST('{0}' as datetime)", p_entity.EndTime.Value.ToString()); + } + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + _builder.AppendFormat("AND a.PoBillNum='{0}'",p_entity.PoBillNum); + } + if (!string.IsNullOrEmpty(p_entity.AskBillNum)) + { + _builder.AppendFormat("AND a.AskBillNum='{0}'", p_entity.AskBillNum); + } + _builder.Append(" GROUP BY A.AskBillNum, A.PoBillNum, A.PoLine, A.PartCode, A.AskQty, A.ReduceQty, A.PartDesc1, A.CreateTime, "); + _builder.Append(" A.CreateUser, A.UpdateTime, A.UpdateUser, A.UpdateInfo, A.GUID, A.BeginTime, A.EndTime, A.IsDeleted, "); + _builder.Append(" A.UID, A.ValidityDays, A.Site, A.VendId,a.VendName) AS s1 "); + _builder.Append(" "); + _builder.Append(" left join "); + _builder.Append(" (SELECT rd.PoLine, rd.PartCode, sum(rd.qty) AS ReviceQty, ad.AskBillNum,max(rd.ShipTime) as RecvTime FROM V_TB_RECEIVE_DETAIL rd inner join V_TB_ASN_DETAIL ad on rd.AsnBillNum=ad.AsnBillNum "); + _builder.Append(" and rd.PoLine= ad.PoLine and rd.PartCode= ad.PartCode AND RD.Site= ad.Site and RD.SubSite= ad.SubSite "); + _builder.Append(" "); + _builder.Append(" group by rd.PoLine, rd.PartCode, ad.AskBillNum) as s2 "); + _builder.Append(" on s1.AskBillNum=s2.AskBillNum and s1.PartCode=s2.PartCode and s1.PoLine=s2.PoLine "); + _builder.Append(" union all "); + _builder.Append(" SELECT AskQty, ReduceQty, Qty, s1.AskBillNum, PoBillNum, s1.PoLine, s1.PartCode, Number, PartDesc1, GUID, IsDeleted, BeginTime, EndTime, UID, ValidityDays, Site, VendId,DATEDIFF(day, s2.RecvTime, EndTime) AS ReviceDelayDay, RecvTime,VendName ,s2.ReviceQty "); + _builder.Append(" FROM(SELECT A.AskQty, ISNULL(A.ReduceQty, 0) AS ReduceQty, SUM(CASE WHEN b.State >= 3 THEN b.Qty ELSE 0 END) "); + _builder.Append(" AS Qty, A.AskBillNum, A.PoBillNum, A.PoLine, A.PartCode, A.AskQty - ISNULL(A.ReduceQty, 0) "); + _builder.Append(" - SUM(CASE WHEN b.State >= 3 THEN b.Qty ELSE 0 END) AS Number, A.PartDesc1, A.CreateTime, "); + _builder.Append(" A.CreateUser, A.UpdateTime, A.UpdateUser, A.UpdateInfo, A.GUID, A.IsDeleted, A.BeginTime, A.EndTime, "); + _builder.Append(" A.UID, DATEDIFF(day, DATEADD(day, A.ValidityDays, ISNULL(MAX(B.UpdateTime), GETDATE())), A.EndTime) "); + _builder.Append(" AS ValidityDays, A.Site, A.VendId ,a.VendName "); + _builder.Append(" FROM dbo.V_TB_ASK_DETAIL AS A LEFT OUTER JOIN "); + _builder.Append(" dbo.V_TB_ASN_DETAIL AS B ON A.AskBillNum = B.AskBillNum AND A.PoLine = B.PoLine AND "); + _builder.Append(" A.PartCode = B.PartCode "); + _builder.Append(" left join TB_PO p on a.PoBillNum=p.PoBillNum "); + _builder.Append(" WHERE(A.IsDeleted = 0) AND(A.State > 1) and p.ModType=2 "); + + if (p_entity.BeginTime != null) + { + _builder.AppendFormat("AND A.BeginTime>=CAST('{0}' as datetime)", p_entity.BeginTime.Value.ToString()); + } + if (p_entity.EndTime != null) + { + _builder.AppendFormat("AND A.BeginTime<=CAST('{0}' as datetime)", p_entity.EndTime.Value.ToString()); + } + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + _builder.AppendFormat("AND a.PoBillNum='{0}'", p_entity.PoBillNum); + } + if (!string.IsNullOrEmpty(p_entity.AskBillNum)) + { + _builder.AppendFormat("AND a.AskBillNum='{0}'", p_entity.AskBillNum); + } + _builder.Append(" GROUP BY A.AskBillNum, A.PoBillNum, A.PoLine, A.PartCode, A.AskQty, A.ReduceQty, A.PartDesc1, A.CreateTime, "); + _builder.Append(" A.CreateUser, A.UpdateTime, A.UpdateUser, A.UpdateInfo, A.GUID, A.BeginTime, A.EndTime, A.IsDeleted, "); + _builder.Append(" A.UID, A.ValidityDays, A.Site, A.VendId,a.VendName) AS s1 "); + _builder.Append(" "); + _builder.Append(" left join "); + _builder.Append(" (SELECT ad.PoLine, ad.PartCode, sum(rd.qty) AS ReviceQty, ad.AskBillNum,max(rd.ShipTime) as RecvTime FROM V_TB_ASK_DETAIL ad inner join V_TB_RECEIVE_DETAIL rd on rd.PoBillNum=ad.PoBillNum "); + _builder.Append(" and rd.PoLine= ad.PoLine and rd.PartCode= ad.PartCode and rd.Site=ad.Site and rd.SubSite=ad.SubSite "); + _builder.AppendFormat(" where ad.State>=3 and rd.site='{0}'",p_entity.Site); + _builder.Append(" group by ad.PoLine, ad.PartCode, ad.AskBillNum) as s2"); + _builder.Append(" on s1.AskBillNum=s2.AskBillNum and s1.PartCode=s2.PartCode and s1.PoLine=s2.PoLine"); + return _builder.ToString(); + } + public static string Get_V_SCP_FORECAST_REPORT_SQL(V_FORECAST_REPORT p_entity) + { + StringBuilder _builder = new StringBuilder(); + _builder.Append(" select B.PartCode,B.VendId,B.AskQty,B.Month, ISNULL(c.MonthQty1,0) as MonthQty1 ,ISNULL(c.MonthQty2,0) as MonthQty2 ,ISNULL(c.MonthQty3,0) as MonthQty3 from ( "); + _builder.Append(" (selecT PartCode,VendId ,MONTH(BeginTime) as Month,sum(AskQty) as AskQty from V_TB_ASK_DETAIL A "); + _builder.Append(" where A.IsDeleted=0 group by A.PartCode,A.VendId ,MONTH(A.BeginTime)) B LEFT OUTER JOIN "); + _builder.Append(" TB_FORECAST c on B.PartCode=c.PartCode and B.VendId=c.VendId and b.Month=c.Month and c.IsDeleted=0 and c.State=1 ) where 1=1 "); + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + _builder.AppendFormat(" And B.PartCode='{0}'", p_entity.PartCode); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + _builder.AppendFormat(" And B.VendId='{0}'", p_entity.VendId); + } + if (p_entity.Month!=0) + { + _builder.AppendFormat(" And B.Month='{0}'", p_entity.Month); + } + return _builder.ToString(); + } + /// + /// 按零件编号获取及时率语句(沈阳) + /// + /// + /// + public static string Get_V_SCP_OTD_REPORT_SQL(SCP_OTD_EXPORT p_entity) + { + StringBuilder _builder = new StringBuilder(); + + _builder.Append(" select h.PartCode ,sum (h.Qty) as ArriveQty , SUM(AskQty) as AskQty ,(SUM(AskQty) -sum (h.Qty)) as Qty ,sum(h.NntimelyQty) as NntimelyQty , "); + _builder.Append(" (CASE WHEN sum(Qty)=0 Then 0 ELSE (sum (NntimelyQty)/sum(Qty)) END) as OTD , sum (h.Qty)/sum(AskQty) AS ArriveOTD from ( SELECT p.AskBillNum, p.PartCode, ISNULL(A.Qty,0) as Qty, "); + _builder.Append(" p.AskQty, (CASE WHEN DATEDIFF(day, A.ShipTime, p.EndTime) > 0 THEN A.Qty ELSE 0 END) as NntimelyQty ,a.ShipTime ,p.EndTime FROM dbo.V_TB_ASK_DETAIL AS p LEFT OUTER JOIN "); + _builder.Append(" dbo.V_TB_ARRIVE_DETAIL AS A ON A.Remark = p.AskBillNum AND A.PoLine = p.PoLine AND A.PartCode = p.PartCode LEFT OUTER JOIN dbo.V_TB_ARRIVE AS B ON A.ArrvBillNum = B.ArrvBillNum "); + if (p_entity.BeginTime != null) + { + _builder.AppendFormat(" where p.EndTime>='{0}'", p_entity.BeginTime); + } + if (p_entity.EndTime != null) + { + _builder.AppendFormat(" AND p.EndTime<='{0}' ", p_entity.EndTime); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + _builder.AppendFormat(" AND p.PartCode='{0}'", p_entity.PartCode); + } + _builder.Append(") as h group by h.PartCode"); + return _builder.ToString(); + + } + /// + /// 按供应商编号获取及时率语句(沈阳) + /// + /// + /// + public static string Get_V_SCP_OTD_REPORT_SQL_VendId(SCP_OTD_EXPORT p_entity) + { + StringBuilder _builder = new StringBuilder(); + _builder.Append(" select h.VendId ,sum (h.Qty) as ArriveQty , SUM(AskQty) as AskQty ,(SUM(AskQty) -sum (h.Qty)) as Qty ,sum(h.NntimelyQty) as NntimelyQty , "); + _builder.Append(" (CASE WHEN sum(Qty)=0 Then 0 ELSE (sum (NntimelyQty)/sum(Qty)) END) as OTD , sum (h.Qty)/sum(AskQty) AS ArriveOTD from ( SELECT p.VendId, p.AskBillNum, ISNULL(A.Qty,0) as Qty, "); + _builder.Append(" p.AskQty, (CASE WHEN DATEDIFF(day, A.ShipTime, p.EndTime) > 0 THEN A.Qty ELSE 0 END) as NntimelyQty ,a.ShipTime ,p.EndTime FROM dbo.V_TB_ASK_DETAIL AS p LEFT OUTER JOIN "); + _builder.Append(" dbo.V_TB_ARRIVE_DETAIL AS A ON A.Remark = p.AskBillNum AND A.PoLine = p.PoLine AND A.PartCode = p.PartCode LEFT OUTER JOIN dbo.V_TB_ARRIVE AS B ON A.ArrvBillNum = B.ArrvBillNum "); + if (p_entity.BeginTime != null) + { + _builder.AppendFormat(" where p.EndTime>='{0}'", p_entity.BeginTime); + } + if (p_entity.EndTime != null) + { + _builder.AppendFormat(" AND p.EndTime<='{0}' ", p_entity.EndTime); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + _builder.AppendFormat(" AND p.VendId='{0}'", p_entity.VendId); + } + _builder.Append(") as h group by h.VendId"); + return _builder.ToString(); + + } + public static void Get_V_SCP_FORECAST_REPORT_List(V_FORECAST_REPORT p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + string _sql = Get_V_SCP_FORECAST_REPORT_SQL(p_entity); + + IQueryable q = db.Database.SqlQuery(_sql).AsQueryable(); + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SCP_FORECAST_REPORT_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SCP_FORECAST_REPORT_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SCP_FORECAST_REPORT_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SCP_FORECAST_REPORT_List", e.Message); + throw e; + } + } + /// + /// 获取及时率数据 + /// + /// + /// + public static void Get_V_SCP_OTD_REPORT_List(int flag, SCP_OTD_EXPORT p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + string _sql = ""; + if (flag == 1) + { + _sql = Get_V_SCP_OTD_REPORT_SQL(p_entity); + } + else + { + _sql = Get_V_SCP_OTD_REPORT_SQL_VendId(p_entity); + } + + IQueryable q = db.Database.SqlQuery(_sql).AsQueryable(); + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SCP_OTD_REPORT_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SCP_OTD_REPORT_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SCP_OTD_REPORT_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SCP_OTD_REPORT_List", e.Message); + throw e; + } + } + + + + + + public static void Get_SQE(V_TB_ASN_DETAIL p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _sql = GET_SQE(p_entity); + + IQueryable q = db.Database.SqlQuery(_sql).AsQueryable(); + if(!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId == p_entity.VendId); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_SQE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_SQE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_SQE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_SQE", e.Message); + throw e; + } + } + + + + + + + + + + + + + + public static void Get_V_TIMELY_DELIVERY_List(V_TIMELY_DELIVERY p_entity, Action>> p_action) + { + + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + string _sql = GetV_TIMELY_DELIVERY_SQL(p_entity); + + IQueryable q = db.Database.SqlQuery(_sql).AsQueryable(); + if (p_entity.RecvBeginTime != null) + { + q = q.Where(p => p.RecvTime >= p_entity.RecvBeginTime); + } + if (p_entity.RecvEndTime != null) + { + q = q.Where(p => p.RecvTime <= p_entity.RecvEndTime); + } + if (!string.IsNullOrEmpty(p_entity.PartCode )) + { + var _ls=p_entity.PartCode.Split(new char[] { ',' }); + + q = q.Where(p =>_ls.Contains(p.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.PartDesc1)) + { + + q = q.Where(p => p.PartDesc1.Contains(p.PartDesc1)); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_TIMELY_DELIVERY_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_TIMELY_DELIVERY_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_TIMELY_DELIVERY_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_TIMELY_DELIVERY_List", e.Message); + throw e; + } + } + + + public static void Get_V_TB_RECEIVE_INVOICE_List(V_TB_RECEIVE_INVOICE p_entity, Action>> p_action) + { + + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + string _sql =GET_V_TB_RECEIVE_INVOICE_SQL(p_entity); + + IQueryable q = db.Database.SqlQuery(_sql).AsQueryable(); + + if (!string.IsNullOrEmpty(p_entity.RecvBillNum)) + { + q = q.Where(p => p.RecvBillNum.Contains(p_entity.RecvBillNum)); + } + if (p_entity.PoLine != 0) + { + q = q.Where(p => p.PoLine == p_entity.PoLine); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.Batch)) + { + q = q.Where(p => p.Batch.Contains(p_entity.Batch)); + } + + + + if (p_entity.IsDeleted != false) + { + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + } + if (!string.IsNullOrEmpty(p_entity.AsnBillNum)) + { + q = q.Where(p => p.AsnBillNum==p_entity.AsnBillNum); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site==p_entity.Site); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId==p_entity.VendId); + } + + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum==p_entity.PoBillNum); + } + + if (!string.IsNullOrEmpty(p_entity.AskBillNum)) + { + q = q.Where(p => p.AskBillNum==p_entity.AskBillNum); + } + + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_TB_RECEIVE_INVOICE_LisT", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_TB_RECEIVE_INVOICE_LisT", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_TB_RECEIVE_INVOICE_LisT", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_TB_RECEIVE_INVOICE_LisT", e.Message); + throw e; + } + } + + public static void Get_V_SUPPLIERS_REGUALARLY_List(V_SUPPLIERS_REGUALARLY p_entity,Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + string _sql = GET_V_SUPPLIERS_REGUALARLY_LIST_SQL(p_entity); + IQueryable q = db.Database.SqlQuery(_sql).AsQueryable(); + + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.AsnBillNum)) + { + q = q.Where(p => p.AsnBillNum.Contains(p_entity.AsnBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.PartDesc1)) + { + q = q.Where(p => p.PartDesc1.Contains(p_entity.PartDesc1)); + } + if (p_entity.Qty != 0) + { + q = q.Where(p => p.Qty == p_entity.Qty); + } + if (p_entity.AskQty != null) + { + q = q.Where(p => p.AskQty == p_entity.AskQty); + } + if (!string.IsNullOrEmpty(p_entity.AskBillNum)) + { + q = q.Where(p => p.AskBillNum.Contains(p_entity.AskBillNum)); + } + if (p_entity.PoLine != 0) + { + q = q.Where(p => p.PoLine == p_entity.PoLine); + } + if (!string.IsNullOrEmpty(p_entity.RecvBillNum)) + { + q = q.Where(p => p.RecvBillNum.Contains(p_entity.RecvBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.ProjectId)) + { + q = q.Where(p => p.ProjectId.Contains(p_entity.ProjectId)); + } + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SUPPLIERS_REGUALARLY_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SUPPLIERS_REGUALARLY_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SUPPLIERS_REGUALARLY_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(V_SUPPLIERS_REGUALARLY), "Get_V_SUPPLIERS_REGUALARLY_List", e.Message); + throw e; + } + + } + /// + /// 获取饼状图数据 + /// + /// + /// + public static void Get_V_Pie_Chart_List(V_Pie_Chart p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + string _sql = Get_V_Pie_Chart_List_SQL(p_entity); + IQueryable q = db.Database.SqlQuery(_sql).AsQueryable(); + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId == p_entity.VendId); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } + //if (p_entity.BeginTime != null) + //{ + // q = q.Where(p => Convert.ToDateTime(p.RecTime) >= p_entity.BeginTime); + //} + //if (p_entity.EndTime != null) + //{ + // q = q.Where(p => Convert.ToDateTime(p.RecTime) <= p_entity.EndTime); + //} + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_Pie_Chart_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_Pie_Chart_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_Pie_Chart_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(V_SUPPLIERS_REGUALARLY), "Get_V_Pie_Chart_List", e.Message); + throw e; + } + } + /// + /// 获取曲线图数据 + /// + /// + /// + public static void Get_V_Line_Chart_List(V_Pie_Chart p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + string _sql = Get_V_Line_Chart_List_SQL(p_entity); + IQueryable q = db.Database.SqlQuery(_sql).AsQueryable(); + //if (!string.IsNullOrEmpty(p_entity.VendId)) + //{ + // q = q.Where(p => p.VendId == p_entity.VendId); + //} + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains (p_entity.VendName)); + } + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } + //if (p_entity.BeginTime != null) + //{ + // q = q.Where(p => Convert.ToDateTime(p.RecTime) >= p_entity.BeginTime); + //} + //if (p_entity.EndTime != null) + //{ + // q = q.Where(p => Convert.ToDateTime(p.RecTime) <= p_entity.EndTime); + //} + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SUPPLIERS_REGUALARLY_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SUPPLIERS_REGUALARLY_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SUPPLIERS_REGUALARLY_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(V_SUPPLIERS_REGUALARLY), "Get_V_SUPPLIERS_REGUALARLY_List", e.Message); + throw e; + } + + } + /// + /// 获取柱状图数据 + /// + /// + /// + public static void Get_V_Bar_Chart_List(V_Pie_Chart p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + string _sql = Get_V_bar_Chart_List_SQL(p_entity); + IQueryable q = db.Database.SqlQuery(_sql).AsQueryable(); + //if (!string.IsNullOrEmpty(p_entity.ProjectId)) + //{ + // q = q.Where(p => p.ProjectId == p_entity.ProjectId); + //} + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + //if (p_entity.BeginTime != null) + //{ + // q = q.Where(p => Convert.ToDateTime(p.RecTime) >= p_entity.BeginTime); + //} + //if (p_entity.EndTime != null) + //{ + // q = q.Where(p => Convert.ToDateTime(p.RecTime) <= p_entity.EndTime); + //} + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SUPPLIERS_REGUALARLY_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SUPPLIERS_REGUALARLY_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_SUPPLIERS_REGUALARLY_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(V_SUPPLIERS_REGUALARLY), "Get_V_SUPPLIERS_REGUALARLY_List", e.Message); + throw e; + } + + } + /// + /// 获取饼状图sql + /// + /// + /// + public static string Get_V_Pie_Chart_List_SQL(V_Pie_Chart p_entity) + { + StringBuilder _buffer = new StringBuilder(); + _buffer.Append(" SELECT V_TB_RECEIVE_DETAIL.Site, V_TB_ASN_DETAIL_VIEW.ShipUser, V_TB_ASN_DETAIL_VIEW.ReceiveUser, V_TB_ASN_DETAIL_VIEW.VendId, V_TB_ASN_DETAIL_VIEW.VendName, CONVERT(varchar(100),"); + _buffer.Append(" V_TB_ASN_DETAIL_VIEW.ShipTime, 23) AS ShipTime, CONVERT(varchar(100), V_TB_RECEIVE_DETAIL.ShipTime, 23) AS RecTime, V_TB_ASN_DETAIL_VIEW.Qty, (CASE WHEN DATEDIFF(day, V_TB_ASN_DETAIL_View.ShipTime, "); + _buffer.Append(" V_TB_RECEIVE_DETAIL.ShipTime) >= TA_VEND_PART.TransportationTime THEN 0 ELSE 1 END) AS Flag FROM V_TB_ASN_DETAIL_VIEW INNER JOIN "); + _buffer.Append(" V_TB_RECEIVE_DETAIL ON V_TB_ASN_DETAIL_VIEW.PartCode = V_TB_RECEIVE_DETAIL.PartCode AND V_TB_ASN_DETAIL_VIEW.PoLine = V_TB_RECEIVE_DETAIL.PoLine AND "); + _buffer.Append(" V_TB_ASN_DETAIL_VIEW.AsnBillNum = V_TB_RECEIVE_DETAIL.AsnBillNum INNER JOIN TA_VEND_PART ON V_TB_ASN_DETAIL_VIEW.VendId = TA_VEND_PART.VendId AND "); + _buffer.AppendFormat(" V_TB_ASN_DETAIL_VIEW.PartCode = TA_VEND_PART.PartCode AND V_TB_ASN_DETAIL_VIEW.Site = TA_VEND_PART.Site WHERE (V_TB_ASN_DETAIL_VIEW.IsDeleted = 0) and (V_TB_RECEIVE_DETAIL.ShipTime>='{0}') and (V_TB_RECEIVE_DETAIL.ShipTime<='{1}') ", p_entity.BeginTime, p_entity.EndTime); + return _buffer.ToString(); + } + /// + /// 获取曲线图sql + /// + /// + /// + public static string Get_V_Line_Chart_List_SQL(V_Pie_Chart p_entity) + { + StringBuilder _buffer = new StringBuilder(); + _buffer.Append(" select temp.Site,temp.VendId,temp.VendName ,RecTime ,temp.flag , sum(temp.Qty) as Qty from (select V_TB_RECEIVE_DETAIL.Site, V_TB_ASN_DETAIL_View.ShipUser,V_TB_ASN_DETAIL_View.ReceiveUser, V_TB_ASN_DETAIL_View.VendId ,"); + _buffer.Append(" V_TB_ASN_DETAIL_View.VendName,CONVERT(varchar(100), V_TB_ASN_DETAIL_View.ShipTime, 23) as ShipTime,CONVERT(varchar(100), V_TB_RECEIVE_DETAIL.ShipTime, 23) as RecTime, "); + _buffer.Append(" V_TB_ASN_DETAIL_View.Qty,(case when DATEDIFF(day ,V_TB_ASN_DETAIL_View.ShipTime,V_TB_RECEIVE_DETAIL.ShipTime )>=TA_VEND_PART.TransportationTime then 0 else 1 end) as flag"); + _buffer.Append(" from V_TB_ASN_DETAIL_View JOIN [dbo].[V_TB_RECEIVE_DETAIL] on V_TB_ASN_DETAIL_View.PartCode=V_TB_RECEIVE_DETAIL.PartCode and V_TB_ASN_DETAIL_View.PoLine=V_TB_RECEIVE_DETAIL.PoLine and V_TB_ASN_DETAIL_View.AsnBillNum=V_TB_RECEIVE_DETAIL.AsnBillNum "); + _buffer.Append(" JOIN TA_VEND_PART on V_TB_ASN_DETAIL_View.VendId=TA_VEND_PART.VendId and V_TB_ASN_DETAIL_View.PartCode=TA_VEND_PART.PartCode and V_TB_ASN_DETAIL_View.Site=TA_VEND_PART.Site"); + _buffer.AppendFormat(" where V_TB_ASN_DETAIL_View.IsDeleted=0 and V_TB_RECEIVE_DETAIL.ShipTime>='{0}' and V_TB_RECEIVE_DETAIL.ShipTime<='{1}' and V_TB_RECEIVE_DETAIL.VendId='{2}' ) temp group by temp.Site,temp.VendId,temp.VendName ,RecTime ,temp.flag", p_entity.BeginTime, p_entity.EndTime ,p_entity.VendId); + return _buffer.ToString(); + } + /// + /// 获取柱状图sql + /// + /// + /// + public static string Get_V_bar_Chart_List_SQL(V_Pie_Chart p_entity) + { + StringBuilder _buffer = new StringBuilder(); + _buffer.Append("SELECT Site, ProjectId, RecTime, flag, SUM(Qty) AS Qty"); + _buffer.Append(" FROM (SELECT TA_PART.PartCode, TA_PART.ProjectId, V_TB_RECEIVE_DETAIL.Site, V_TB_ASN_DETAIL_VIEW.ShipUser, "); + _buffer.Append(" V_TB_ASN_DETAIL_VIEW.ReceiveUser, V_TB_ASN_DETAIL_VIEW.VendId, "); + _buffer.Append(" V_TB_ASN_DETAIL_VIEW.VendName, CONVERT(varchar(100), V_TB_ASN_DETAIL_VIEW.ShipTime, 23) "); + _buffer.Append(" AS ShipTime, CONVERT(varchar(100), V_TB_RECEIVE_DETAIL.ShipTime, 23) AS RecTime,"); + _buffer.Append(" V_TB_ASN_DETAIL_VIEW.Qty, (CASE WHEN DATEDIFF(day, V_TB_ASN_DETAIL_View.ShipTime, "); + _buffer.Append(" V_TB_RECEIVE_DETAIL.ShipTime) >= TA_VEND_PART.TransportationTime THEN 0 ELSE 1 END) AS flag"); + _buffer.Append(" FROM V_TB_ASN_DETAIL_VIEW INNER JOIN V_TB_RECEIVE_DETAIL ON V_TB_ASN_DETAIL_VIEW.PartCode = V_TB_RECEIVE_DETAIL.PartCode AND "); + _buffer.Append(" V_TB_ASN_DETAIL_VIEW.PoLine = V_TB_RECEIVE_DETAIL.PoLine AND V_TB_ASN_DETAIL_VIEW.AsnBillNum = V_TB_RECEIVE_DETAIL.AsnBillNum INNER JOIN"); + _buffer.Append(" TA_VEND_PART ON V_TB_ASN_DETAIL_VIEW.VendId = TA_VEND_PART.VendId AND V_TB_ASN_DETAIL_VIEW.PartCode = TA_VEND_PART.PartCode AND "); + _buffer.Append(" V_TB_ASN_DETAIL_VIEW.Site = TA_VEND_PART.Site INNER JOIN TA_PART ON TA_PART.PartCode = TA_VEND_PART.PartCode"); + _buffer.AppendFormat(" WHERE (V_TB_ASN_DETAIL_VIEW.IsDeleted = 0) and (V_TB_RECEIVE_DETAIL.ShipTime>='{0}') and (V_TB_RECEIVE_DETAIL.ShipTime<='{1}') and ( TA_PART.ProjectId='{2}') ) AS temp ", p_entity.BeginTime,p_entity.EndTime,p_entity.ProjectId); + _buffer.Append(" GROUP BY Site, ProjectId, RecTime, flag"); + return _buffer.ToString(); + } + } +} diff --git a/北京北汽/SCP/Controller/SCP_STOCK_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_STOCK_CONTROLLER.cs new file mode 100644 index 0000000..e6efb70 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_STOCK_CONTROLLER.cs @@ -0,0 +1,128 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System.Data.Entity.Core; + +namespace CK.SCP.Controller +{ + public class SCP_STOCK_CONTROLLER + { + public static void Get_V_Stock_List(V_Stock p_entity, + Action>> p_action + ) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_Stock; + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.BarCode)) + { + q = q.Where(p => p.BarCode.Contains(p_entity.BarCode)); + } + if (!string.IsNullOrEmpty(p_entity.LocCode)) + { + q = q.Where(p => p.LocCode.Contains(p_entity.LocCode)); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (!string.IsNullOrEmpty(p_entity.Batch)) + { + q = q.Where(p => p.Batch.Contains(p_entity.Batch)); + } + if (p_entity.Qty != 0) + { + q = q.Where(p => p.Qty == p_entity.Qty); + } + if (p_entity.state != 0) + { + q = q.Where(p => p.state == p_entity.state); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.PartDesc1)) + { + q = q.Where(p => p.PartDesc1.Contains(p_entity.PartDesc1)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_STOCK_CONTROLLER), "Get_V_Stock_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_STOCK_CONTROLLER), "Get_V_Stock_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_STOCK_CONTROLLER), "Get_V_Stock_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_STOCK_CONTROLLER), "Get_V_Stock_List", e.Message); + throw e; + } + + } + } +} diff --git a/北京北汽/SCP/Controller/SCP_TA_ADDRESS_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_TA_ADDRESS_CONTROLLER.cs new file mode 100644 index 0000000..54e5925 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_TA_ADDRESS_CONTROLLER.cs @@ -0,0 +1,305 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.AppBoxEntity; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System.Data.Entity.Core; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Controller +{ + public class SCP_TA_ADDRESS_CONTROLLER + { + + + public static ResultObject> Get_TA_ADDRESS_List(TA_ADDRESS p_entity) + { + + ResultObject> _ret = new ResultObject>(); + try + { + using (AppBoxContext db = EntitiesFactory.CreateAppBoxInstance()) + { + IQueryable q = db.TA_ADDRESS; + if (!string.IsNullOrEmpty(p_entity.ADDRESS_NO)) + { + q = q.Where(p => p.ADDRESS_NO.Contains(p_entity.ADDRESS_NO)); + } + if (!string.IsNullOrEmpty(p_entity.REGION)) + { + q = q.Where(p => p.REGION.Contains(p_entity.REGION)); + } + if (!string.IsNullOrEmpty(p_entity.ACCOUNTING_UNIT)) + { + q = q.Where(p => p.ACCOUNTING_UNIT.Contains(p_entity.ACCOUNTING_UNIT)); + } + if (!string.IsNullOrEmpty(p_entity.ADDRESS_DESCRIPTION)) + { + q = q.Where(p => p.ADDRESS_DESCRIPTION.Contains(p_entity.ADDRESS_DESCRIPTION)); + } + if (p_entity.ID != 0) + { + q = q.Where(p => p.ID == p_entity.ID); + } + + + if (!string.IsNullOrEmpty(p_entity.FactoryId)) + { + q = q.Where(p => p.FactoryId.Contains(p_entity.FactoryId)); + } + if (!string.IsNullOrEmpty(p_entity.EXTEND2)) + { + q = q.Where(p => p.EXTEND2.Contains(p_entity.EXTEND2)); + } + if (!string.IsNullOrEmpty(p_entity.EXTEND3)) + { + q = q.Where(p => p.EXTEND3.Contains(p_entity.EXTEND3)); + } + if (!string.IsNullOrEmpty(p_entity.EXTEND4)) + { + q = q.Where(p => p.EXTEND4.Contains(p_entity.EXTEND4)); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.ToList(); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_ADDRESS_CONTROLLER), "Get_TA_ADDRESS_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_ADDRESS_CONTROLLER), "Get_TA_ADDRESS_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_ADDRESS_CONTROLLER), "Get_TA_ADDRESS_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_ADDRESS_CONTROLLER), "Get_TA_ADDRESS_List", e.Message); + throw e; + } + return _ret; + } + + + public static ResultObject Save_TA_ADDRESS(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (AppBoxContext db = EntitiesFactory.CreateAppBoxInstance()) + { + foreach (var itm in p_entitys) + { + db.TA_ADDRESS.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_ADDRESS_CONTROLLER), "Save_TA_ADDRESS", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_ADDRESS_CONTROLLER), "Save_TA_ADDRESS", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_ADDRESS_CONTROLLER), "Save_TA_ADDRESS", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_ADDRESS_CONTROLLER), "Save_TA_ADDRESS", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public static ResultObject Del_TA_ADDRESS(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (AppBoxContext db = EntitiesFactory.CreateAppBoxInstance()) + { + foreach (var itm in p_entitys) + { + db.TA_ADDRESS.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_ADDRESS_CONTROLLER), "Del_TA_ADDRESS", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_ADDRESS_CONTROLLER), "Del_TA_ADDRESS", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_ADDRESS_CONTROLLER), "Del_TA_ADDRESS", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_ADDRESS_CONTROLLER), "Del_TA_ADDRESS", e.Message); throw e; + } + return _ret; + } + + + + + + + + + + + + + + } +} diff --git a/北京北汽/SCP/Controller/SCP_TA_FACTORY_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_TA_FACTORY_CONTROLLER.cs new file mode 100644 index 0000000..3d15d37 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_TA_FACTORY_CONTROLLER.cs @@ -0,0 +1,358 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.AppBoxEntity; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System.Data.Entity.Core; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Controller +{ + public class SCP_TA_FACTORY_CONTROLLER + { + public static ResultObject> Get_TA_FACTORY_List(TA_FACTORY p_entity) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (var db = EntitiesFactory.CreateAppBoxInstance()) + { + IQueryable q = db.TA_FACTORY; + if (p_entity.ID != 0) + { + q = q.Where(p => p.ID == p_entity.ID); + } + if (!string.IsNullOrEmpty(p_entity.FactoryId)) + { + q = q.Where(p => p.FactoryId.Contains(p_entity.FactoryId)); + } + if (!string.IsNullOrEmpty(p_entity.FactoryName)) + { + q = q.Where(p => p.FactoryName.Contains(p_entity.FactoryName)); + } + if (!string.IsNullOrEmpty(p_entity.ErpSite)) + { + q = q.Where(p => p.ErpSite.Contains(p_entity.ErpSite)); + } + if (!string.IsNullOrEmpty(p_entity.ErpDomain)) + { + q = q.Where(p => p.ErpDomain.Contains(p_entity.ErpDomain)); + } + if (!string.IsNullOrEmpty(p_entity.Address)) + { + q = q.Where(p => p.Address.Contains(p_entity.Address)); + } + if (!string.IsNullOrEmpty(p_entity.ZipCode)) + { + q = q.Where(p => p.ZipCode.Contains(p_entity.ZipCode)); + } + if (p_entity.State != 0) + { + q = q.Where(p => p.State == p_entity.State); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.UpdateUser)) + { + q = q.Where(p => p.UpdateUser.Contains(p_entity.UpdateUser)); + } + if (!string.IsNullOrEmpty(p_entity.UpdateInfo)) + { + q = q.Where(p => p.UpdateInfo.Contains(p_entity.UpdateInfo)); + } + q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); + + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.ToList(); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_FACTORY_CONTROLLER), "Get_TA_FACTORY_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_FACTORY_CONTROLLER), "Get_TA_FACTORY_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_FACTORY_CONTROLLER), "Get_TA_FACTORY_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_FACTORY_CONTROLLER), "Get_TA_FACTORY_List", e.Message); + throw e; + } + return _ret; + } + + + public static ResultObject Save_TA_FACTORY(TA_FACTORY p_entity,List p_list) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateAppBoxInstance()) + { + var factorylist=db.TA_FACTORY.Where(p => p.FactoryId == p_entity.FactoryId && p.ErpSite==p_entity.ErpSite).ToList(); + //db.TA_FACTORY.RemoveRange(factorylist); + //p_entity.GUID = Guid.NewGuid(); + db.TA_FACTORY.AddOrUpdate(p=>p.ID,p_entity); + if (db.SaveChanges() != -1) + { + var scpdb = EntitiesFactory.CreateScpInstance(); + { + var _factoryList =scpdb.TA_FACTORY_CONFIG.Where(p => p.FactoryId == p_entity.FactoryId).ToList(); + scpdb.TA_FACTORY_CONFIG.RemoveRange(_factoryList); + scpdb.TA_FACTORY_CONFIG.AddRange(p_list); + scpdb.TB_FACTORY.RemoveRange(scpdb.TB_FACTORY.ToArray()); + var _ls = new List(); + foreach (var itm in db.TA_FACTORY.ToList()) + { + var _tb = new TB_FACTORY(); + _tb.GUID = itm.GUID; + _tb.IsDeleted = itm.IsDeleted; + _tb.State = itm.State; + _tb.UpdateInfo = itm.UpdateInfo; + _tb.Remark = itm.Remark; + _tb.FactoryId = itm.FactoryId; + _tb.FactoryName = itm.FactoryName; + _tb.ErpSite = itm.ErpSite; + _tb.ErpDomain = itm.ErpDomain; + _tb.CreateTime = itm.CreateTime; + _tb.CreateUser = itm.CreateUser; + _tb.ZipCode = itm.ZipCode; + scpdb.TB_FACTORY.Add(_tb); + } + scpdb.SaveChanges(); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_FACTORY_CONTROLLER), "Save_TA_FACTORY", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_FACTORY_CONTROLLER), "Save_TA_FACTORY", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_FACTORY_CONTROLLER), "Save_TA_FACTORY", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_FACTORY_CONTROLLER), "Save_TA_FACTORY", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public static ResultObject Del_TA_FACTORY(TA_FACTORY p_entity) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateAppBoxInstance()) + { + var _entity=db.TA_FACTORY.Where(itm=>itm.ID== p_entity.ID).FirstOrDefault(); + _entity.IsDeleted = true; + db.TA_FACTORY.AddOrUpdate(p=>p.ID,_entity); + if (db.SaveChanges() != -1) + { + var scpdb = EntitiesFactory.CreateScpInstance(); + { + scpdb.TB_FACTORY.RemoveRange(scpdb.TB_FACTORY.ToArray()); + var _ls = new List(); + foreach (var itm in db.TA_FACTORY.ToList()) + { + var _tb = new TB_FACTORY(); + _tb.GUID = itm.GUID; + _tb.IsDeleted = itm.IsDeleted; + _tb.State = itm.State; + _tb.UpdateInfo = itm.UpdateInfo; + _tb.Remark = itm.Remark; + _tb.FactoryId = itm.FactoryId; + _tb.FactoryName = itm.FactoryName; + _tb.ErpDomain = itm.ErpDomain; + _tb.CreateTime = itm.CreateTime; + _tb.CreateUser = itm.CreateUser; + _tb.ZipCode = itm.ZipCode; + scpdb.TB_FACTORY.Add(_tb); + } + scpdb.SaveChanges(); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_FACTORY_CONTROLLER), "Del_TA_FACTORY", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_FACTORY_CONTROLLER), "Del_TA_FACTORY", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_FACTORY_CONTROLLER), "Del_TA_FACTORY", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_FACTORY_CONTROLLER), "Del_TA_FACTORY", e.Message); throw e; + } + return _ret; + } + + + + } + + + + +} + diff --git a/北京北汽/SCP/Controller/SCP_TA_LANGUAGE_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_TA_LANGUAGE_CONTROLLER.cs new file mode 100644 index 0000000..b3c7840 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_TA_LANGUAGE_CONTROLLER.cs @@ -0,0 +1,421 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.AppBoxEntity; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System.Data.Entity.Core; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity.ExcelExportEnttity; + +namespace CK.SCP.Controller +{ + public class SCP_TA_LANGUAGE_CONTROLLER + { + public static ResultObject> Get_TA_LANGUAGE_List(TA_LANGUAGE p_entity) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.TA_LANGUAGE; + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.GUID)) + { + q = q.Where(p => p.GUID.Contains(p_entity.GUID)); + } + if (!string.IsNullOrEmpty(p_entity.CH)) + { + q = q.Where(p => p.CH==p_entity.CH); + } + if (!string.IsNullOrEmpty(p_entity.EN)) + { + q = q.Where(p => p.EN.Contains(p_entity.EN)); + } + if (!string.IsNullOrEmpty(p_entity.RU)) + { + q = q.Where(p => p.RU.Contains(p_entity.RU)); + } + if (!string.IsNullOrEmpty(p_entity.DE)) + { + q = q.Where(p => p.DE.Contains(p_entity.DE)); + } + if (!string.IsNullOrEmpty(p_entity.FR)) + { + q = q.Where(p => p.FR.Contains(p_entity.FR)); + } + if (!string.IsNullOrEmpty(p_entity.EL)) + { + q = q.Where(p => p.EL.Contains(p_entity.EL)); + } + if (!string.IsNullOrEmpty(p_entity.AR)) + { + q = q.Where(p => p.AR.Contains(p_entity.AR)); + } + if (!string.IsNullOrEmpty(p_entity.JP)) + { + q = q.Where(p => p.JP.Contains(p_entity.JP)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q.ToList(); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_LANGUAGE_CONTROLLER), "Get_TA_LANGUAGE_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_LANGUAGE_CONTROLLER), "Get_TA_LANGUAGE_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_LANGUAGE_CONTROLLER), "Get_TA_LANGUAGE_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_LANGUAGE_CONTROLLER), "Get_TA_LANGUAGE_List", e.Message); + throw e; + } + return _ret; + } + + public static ResultObject EXCEL_ADRESS_LIST_CQ(List p_order_list, string site, string p_creator) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + int number = 1; + List lineError = new List(); + List ErrorList = new List(); + var _lst = p_order_list; + + + if (lineError.Count > 0) + { + _ret.State = ReturnStatus.Failed; + _ret.MessageList.AddRange(ErrorList); + _ret.Result = false; + } + else + { + _lst.ForEach(p => + { + + var _Sitelist = db.TB_ADDRESS.Count(t => t.Address == p.收货地址); + if (_Sitelist == 0) + { + TB_ADDRESS Price = new TB_ADDRESS(); + Price.Address = p.收货地址; + Price.NamePone = p.收货人信息; + + db.TB_ADDRESS.AddOrUpdate(Price); + } + else if (_Sitelist == 1) + { + var _PAlist = db.TB_ADDRESS.SingleOrDefault(t => t.Address == p.收货地址); + _PAlist.NamePone = p.收货人信息; + db.TB_ADDRESS.AddOrUpdate(_PAlist); + } + + }); + if (_ret.MessageList.Count == 0) + { + int state = db.SaveChanges(); + if (state != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_VENDER_PART_MOD", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_VENDER_PART_MOD", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_VENDER_PART_MOD", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_VENDER_PART_MOD", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + public static ResultObject Save_TA_LANGUAGE(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var itm in p_entitys) + { + db.TA_LANGUAGE.AddOrUpdate(p => p.GUID, itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_LANGUAGE_CONTROLLER), "Save_TA_LANGUAGE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_LANGUAGE_CONTROLLER), "Save_TA_LANGUAGE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_LANGUAGE_CONTROLLER), "Save_TA_LANGUAGE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_LANGUAGE_CONTROLLER), "Save_TA_LANGUAGE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public static ResultObject Del_TA_LANGUAGE(TA_LANGUAGE p_entity) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + var _entity = db.TA_LANGUAGE.Where(itm => itm.GUID == p_entity.GUID).FirstOrDefault(); + + db.TA_LANGUAGE.Remove(_entity); + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_LANGUAGE_CONTROLLER), "Del_TA_LANGUAGE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_LANGUAGE_CONTROLLER), "Del_TA_LANGUAGE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_LANGUAGE_CONTROLLER), "Del_TA_LANGUAGE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TA_LANGUAGE_CONTROLLER), "Del_TA_LANGUAGE", e.Message); throw e; + } + return _ret; + } + + + + } + + + + +} + diff --git a/北京北汽/SCP/Controller/SCP_TA_PART_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_TA_PART_CONTROLLER.cs new file mode 100644 index 0000000..5be70ba --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_TA_PART_CONTROLLER.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; + +namespace CK.SCP.Controller +{ + public class SCP_TA_PART_CONTROLLER + { + public static List Getlist() + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TA_PART.ToList(); + } + } + public static List GetlistByPartCode(TA_PART model) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TA_PART.Where(p=>p.PartCode==model.PartCode).ToList(); + } + } + public static ResultObject Save_TA_PART(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var itm in p_entitys) + { + var _entity=db.TA_PART.Where(p => p.PartCode == itm.PartCode && p.Site == p.Site).FirstOrDefault(); + if (_entity != null) + { + _entity.Qlevel = itm.Qlevel; + _entity.Ischeck=itm.Ischeck; + _entity.ReceivePort = itm.ReceivePort; + } + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TA_PART), "Save_TA_PART", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + } +} diff --git a/北京北汽/SCP/Controller/SCP_TB_PRICE_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_TB_PRICE_CONTROLLER.cs new file mode 100644 index 0000000..7f457db --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_TB_PRICE_CONTROLLER.cs @@ -0,0 +1,944 @@ +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System; +using System.Collections.Generic; +using System.Data.Entity.Core; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ + public class SCP_TB_PRICE_CONTROLLER + { + + public static List Getlist() + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + return db.TB_PRICE.ToList(); + } + } + + public static void Get_PRICE_List( TB_PRICE p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.TB_PRICE; + + + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.Extend3)) + { + q = q.Where(p => p.Extend3.Contains(p_entity.Extend3)); + } + + if (!string.IsNullOrEmpty(p_entity.Creator)) + { + q = q.Where(p => p.Creator == p_entity.Creator); + } + if (p_entity.StartTime != null) + { + q = q.Where(p => p.StartTime >= p_entity.StartTime); + } + if (p_entity.EndTime != null) + { + q = q.Where(p => p.EndTime <= p_entity.EndTime); + } + if (p_entity.State != 3)//3是查询所有 + { + q = q.Where(p => p.State == p_entity.State); + } + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", e.Message); + throw e; + } + } + + + public static void Get_TB_PRICE_List(bool p_flag, V_TB_PRICE p_entity, Action>> p_action) + { + + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_PRICE; + if (p_flag) + { + q = q.Where(p => p.Amt==0); + } + + + + if (p_entity.UID!=0) + { + q = q.Where(p => p.UID==p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (p_entity.Amt>0) + { + q = q.Where(p => p.Amt==p_entity.Amt); + } + if (p_entity.TemporaryPrice > 0) + { + q = q.Where(p => p.TemporaryPrice == p_entity.TemporaryPrice); + } + if (p_entity.SharingPrice > 0) + { + q = q.Where(p => p.SharingPrice == p_entity.SharingPrice); + } + if (!string.IsNullOrEmpty(p_entity.Extend3)) + { + q = q.Where(p => p.Extend3.Contains(p_entity.Extend3)); + } + if (!string.IsNullOrEmpty(p_entity.Extend2)) + { + q = q.Where(p => p.Extend2.Contains(p_entity.Extend2)); + } + + + if (!string.IsNullOrEmpty(p_entity.Extend3)) + { + q = q.Where(p => p.Extend3.Contains(p_entity.Extend3)); + } + if (!string.IsNullOrEmpty(p_entity.PartName)) + { + q = q.Where(p => p.PartName.Contains(p_entity.PartName)); + } + if (!string.IsNullOrEmpty(p_entity.Creator)) + { + q = q.Where(p => p.Creator== p_entity.Creator); + } + if (p_entity.StartTime != null) + { + q = q.Where(p => p.StartTime >= p_entity.StartTime); + } + if (p_entity.EndTime != null) + { + q = q.Where(p => p.EndTime <= p_entity.EndTime); + } + if (p_entity.State!=3)//3是查询所有 + { + q = q.Where(p => p.State == p_entity.State); + } + + if (!string.IsNullOrEmpty(p_entity.SubSite)) + { + q = q.Where(p => p.SubSite == p_entity.SubSite); + } + + if (p_entity.UIDList != null && p_entity.UIDList.Count > 0) + { + q = q.Where(p => p_entity.UIDList.Contains(p.UID)); + } + if (p_entity.UserInSubSite != null && p_entity.UserInSubSite.Count > 0) + { + q = q.Where(p => p_entity.UserInSubSite.Contains(p.SubSite)); + } + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", e.Message); + throw e; + } + } + + public static void Get_TB_PRICEDC_List( V_TB_PRICE p_entity, Action>> p_action) + { + + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_PRICE; + + if (p_entity.UIDList != null && p_entity.UIDList.Count > 0) + { + q = q.Where(p => p_entity.UIDList.Contains(p.UID)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", e.Message); + throw e; + } + } + + public static void Get_TB_PRICE_TemporaryPrice_CQ_List(bool p_flag, V_TB_PRICE_TemporaryPrice p_entity, Action>> p_action) + { + + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TB_PRICE_TemporaryPrice; + if (p_flag) + { + q = q.Where(p => p.Amt == 0); + } + + + + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (p_entity.Amt > 0) + { + q = q.Where(p => p.Amt == p_entity.Amt); + } + if (p_entity.TemporaryPrice > 0) + { + q = q.Where(p => p.TemporaryPrice == p_entity.TemporaryPrice); + } + if (p_entity.SharingPrice > 0) + { + q = q.Where(p => p.SharingPrice == p_entity.SharingPrice); + } + if (!string.IsNullOrEmpty(p_entity.Extend3)) + { + q = q.Where(p => p.Extend3.Contains(p_entity.Extend3)); + } + if (!string.IsNullOrEmpty(p_entity.Extend2)) + { + q = q.Where(p => p.Extend2.Contains(p_entity.Extend2)); + } + + + if (!string.IsNullOrEmpty(p_entity.Extend3)) + { + q = q.Where(p => p.Extend3.Contains(p_entity.Extend3)); + } + if (!string.IsNullOrEmpty(p_entity.PartName)) + { + q = q.Where(p => p.PartName.Contains(p_entity.PartName)); + } + if (!string.IsNullOrEmpty(p_entity.Creator)) + { + q = q.Where(p => p.Creator == p_entity.Creator); + } + if (p_entity.StartTime != null) + { + q = q.Where(p => p.StartTime >= p_entity.StartTime); + } + if (p_entity.EndTime != null) + { + q = q.Where(p => p.EndTime <= p_entity.EndTime); + } + if (p_entity.State != 3)//3是查询所有 + { + q = q.Where(p => p.State == p_entity.State); + } + + if (!string.IsNullOrEmpty(p_entity.SubSite)) + { + q = q.Where(p => p.SubSite == p_entity.SubSite); + } + + + //if (p_entity.UserInAddress.FirstOrDefault() != null && p_entity.UserInAddress.Count > 0) + //{ + // q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + //} + if (p_entity.UserInSubSite != null && p_entity.UserInSubSite.Count > 0) + { + q = q.Where(p => p_entity.UserInSubSite.Contains(p.SubSite)); + } + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", e.Message); + throw e; + } + } + + public static ResultObject Save_TB_PRICE(List p_entitys,PriceState p_state) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + foreach (var itm in p_entitys) + { + var _entity = db.TB_PRICE.Where(p => p.UID == itm.UID).FirstOrDefault(); + _entity.State = (int)p_state; + _entity.Amt = itm.Amt; + _entity.TemporaryPrice = itm.TemporaryPrice; + _entity.Creator = itm.Creator; + _entity.EndTime = itm.EndTime; + //_entity.UpdateTime = itm.UpdateTime; + //_entity.UpdateUser = itm.UpdateUser; + //_entity.UpdateInfo = itm.UpdateInfo; + db.TB_PRICE.AddOrUpdate(p => p.UID, _entity); + } + + if (p_state == PriceState.FConfirm) + { + + } + + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Save_TB_PRICE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Save_TB_PRICE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Save_TB_PRICE", ex.ToString()); + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + + + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Save_TB_PRICE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public static ResultObject Save_TB_PRICE(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + foreach (var itm in p_entitys) + { + var _entity = db.TB_PRICE.Where(p => p.UID == itm.UID).FirstOrDefault(); + _entity.State = (int)PriceState.New; + _entity.Amt = itm.Amt; + _entity.TemporaryPrice = itm.TemporaryPrice; + _entity.Creator = itm.Creator; + _entity.EndTime = itm.EndTime; + _entity.StartTime = itm.StartTime; + //_entity.UpdateTime = itm.UpdateTime; + //_entity.UpdateUser = itm.UpdateUser; + //_entity.UpdateInfo = itm.UpdateInfo; + db.TB_PRICE.AddOrUpdate(p => p.UID, _entity); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Save_TB_PRICE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Save_TB_PRICE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Save_TB_PRICE", ex.ToString()); + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + + + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Save_TB_PRICE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + public static List Get_TB_VendPrice_List (List p_entitys) + { + foreach(TB_PRICE _item in p_entitys) + { + // if (_item.VendAmt == 0) _item.VendAmt = _item.Amt; + if (_item.State == (int)PriceState.New) + { + _item.Extend1 = "新建"; + } + else if (_item.State == (int)PriceState.PConfirm) + { + _item.Extend1 = "采购确认"; + } + else if (_item.State == (int)PriceState.FConfirm) + { + _item.Extend1 = "财务确认"; + } + } + return p_entitys; + } + + public static ResultObject Save_TB_PRICE_TemporaryPrice(List p_list, string p_user) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + + var _ls = db.TB_PRICE.Where(p => p_list.Contains(p.UID)).ToList(); + _ls.ForEach(p => + { + p.TemporaryPrice=0; + + } + ); + db.TB_PRICE.AddOrUpdate(p => p.UID, _ls.ToArray()); + + + + if (_ret.MessageList.Count == 0) + { + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + + return _ret; + } + public static ResultObject Save_TB_PRICE_STATE(List p_list, string p_user, int State) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + if (State == (int)PriceState.FConfirm) + { + + + var _ls = db.TB_PRICE.Where(p => p_list.Contains(p.UID)).ToList(); + _ls.ForEach(p => + { + p.State = (int)PriceState.FConfirm; + var _first = db.TA_PART.Where(itm => itm.PartCode == p.PartCode).FirstOrDefault(); + if (_first != null) + { + p.Unit = _first.Unit; + } + + + p.IsPost = 1;//传过接口标志 + //p.UpdateUser = p_user; + //p.UpdateTime = DateTime.Now; + //p.UpdateInfo = "信息确认"; + } + ); + db.TB_PRICE.AddOrUpdate(p => p.UID, _ls.ToArray()); + } + if (State == (int)PriceState.PConfirm) + { + var _ls = db.TB_PRICE.Where(p => p_list.Contains(p.UID)).ToList(); + _ls.ForEach(p => + { + p.State = (int)PriceState.PConfirm; + } + ); + db.TB_PRICE.AddOrUpdate(p => p.UID, _ls.ToArray()); + } + if (State == (int)PriceState.Reject) + { + + var _ls = db.TB_PRICE.Where(p => p_list.Contains(p.UID)).ToList(); + _ls.ForEach(p => + { + var _itm = db.TA_MoldSharing.FirstOrDefault(t => t.PartCode == p.PartCode && t.VendId == p.VendId && t.Site == p.Site); + if (_itm != null) + { + if (_itm.Count > 0) + { + _ret.MessageList.Add("供应商为"+p.VendId+"零件号为"+p.PartCode+"以存在分摊数量不能删除"); + } + if (_itm.Count == 0) + { + db.TA_MoldSharing.Remove(_itm); + } + } + p.State = (int)PriceState.Reject; + } + ); + db.TB_PRICE.AddOrUpdate(p => p.UID, _ls.ToArray()); + } + if (_ret.MessageList.Count==0) + { + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.Message = "数据更新失败!"; + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + + return _ret; + } + } +} diff --git a/北京北汽/SCP/Controller/SCP_TB_VENDER_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_TB_VENDER_CONTROLLER.cs new file mode 100644 index 0000000..8d70310 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_TB_VENDER_CONTROLLER.cs @@ -0,0 +1,188 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; +using System.Data.Entity.Migrations; +using CK.SCP.Utils; +using CK.SCP.Models.Enums; +using System.Data.Entity.Core; + +namespace CK.SCP.Controller +{ + public class SCP_TB_VENDER_CONTROLLER + { + public static List GetlistByName(TA_VENDER model) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TA_VENDER.Where(p => p.VendName == model.VendName).ToList(); + } + } + public static List Getlist() + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + return db.TA_VENDER.ToList(); + } + } + public static TB_FACTORY GetFactory(string site) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + return db.TB_FACTORY.Where(p=>p.ErpSite== site).FirstOrDefault(); + } + } + public static List Getlist1(string site) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + return db.TA_VENDER.Where(p=>p.Site== site).ToList(); + } + } + + public static List Getlist(List lsVenderID ) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TA_VENDER.Where(p=> lsVenderID.Contains(p.VendId)).ToList(); + } + } + public static List Getlist(string p_site) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + + return db.TA_VENDER.Where(p => p.Site==p_site ).ToList(); + } + } + public static TA_VENDER GetVender(string p_VenderID,string p_Site) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TA_VENDER.Where(p => p.VendId==p_VenderID && p.Site==p_Site).FirstOrDefault(); + } + } + + public static List GetVendNameList(List p_list, string p_site) + { + List _ls = new List(); + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable query = db.TA_VENDER; + if (p_list.Count > 0) + { + query = query.Where(p => p_list.Contains(p.VendId)); + } + if (!string.IsNullOrEmpty(p_site)) + { + query = query.Where(p => p.Site == p_site); + } + _ls=query.ToList(); + } + return _ls; + + + + + + } + public static ResultObject Save_TA_VENDER(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var itm in p_entitys) + { + var _entity = db.TA_VENDER.Where(p => p.UID == itm.UID).FirstOrDefault(); + _entity.Quota = itm.Quota; + db.TA_VENDER.AddOrUpdate(p => p.UID, _entity); + } + if (_ret.MessageList.Count > 0) + { + _ret.State = ReturnStatus.Failed; + + } + else + { + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_VENDER_CONTROLLER), "Save_TA_VENDER", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_VENDER_CONTROLLER), "Save_TA_VENDER", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_VENDER_CONTROLLER), "Save_TA_VENDER", ex.ToString()); + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + + + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_VENDER_CONTROLLER), "Save_TA_VENDER", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + } +} diff --git a/北京北汽/SCP/Controller/SCP_TES_PURCHASE_PRICE.cs b/北京北汽/SCP/Controller/SCP_TES_PURCHASE_PRICE.cs new file mode 100644 index 0000000..7215ea1 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_TES_PURCHASE_PRICE.cs @@ -0,0 +1,197 @@ +using CK.SCP.Models; +using CK.SCP.Models.ExchangeCenterTables; +using CK.SCP.Utils; +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ + public class SCP_TES_PURCHASE_PRICE + { + public static void Get_TES_PURCHASE_PRICE_List(TES_PURCHASE_PRICE p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + IQueryable q = db.TES_PURCHASE_PRICE; + if (!string.IsNullOrEmpty(p_entity.PriceList)) + { + q = q.Where(p => p.PriceList.Contains(p_entity.PriceList)); + } + if (!string.IsNullOrEmpty(p_entity.Desc)) + { + q = q.Where(p => p.Desc.Contains(p_entity.Desc)); + } + if (!string.IsNullOrEmpty(p_entity.ProductLine)) + { + q = q.Where(p => p.ProductLine.Contains(p_entity.ProductLine)); + } + if (!string.IsNullOrEmpty(p_entity.Currency)) + { + q = q.Where(p => p.Currency.Contains(p_entity.Currency)); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.Um)) + { + q = q.Where(p => p.Um.Contains(p_entity.Um)); + } + if (!string.IsNullOrEmpty(p_entity.AmountType)) + { + q = q.Where(p => p.AmountType.Contains(p_entity.AmountType)); + } + if (p_entity.Amount != 0) + { + q = q.Where(p => p.Amount == p_entity.Amount); + } + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.CreateUser)) + { + q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser)); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.CommandType)) + { + q = q.Where(p => p.CommandType.Contains(p_entity.CommandType)); + } + if (!string.IsNullOrEmpty(p_entity.Domain)) + { + q = q.Where(p => p.Domain.Contains(p_entity.Domain)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + if (!string.IsNullOrEmpty(p_entity.SupplierCode)) + { + q = q.Where(p => p.SupplierCode.Contains(p_entity.SupplierCode)); + } + if (p_entity.VendAmount != 0) + { + q = q.Where(p => p.VendAmount == p_entity.VendAmount); + } + if (p_entity.GUID!= Guid.Empty) + { + q = q.Where(p => p.GUID == p_entity.GUID); + } + if (p_entity.TaskID != Guid.Empty) + { + q = q.Where(p => p.TaskID == p_entity.TaskID); + } + + if (p_entity.Start != DateTime.MinValue) + { + q = q.Where(p => p.Start.Year == p_entity.Start.Year && p.Start.Month == p_entity.Start.Month && p.Start.Day == p_entity.Start.Day); + + } + if (p_entity.ExpireDate != DateTime.MinValue) + { + q = q.Where(p => p.ExpireDate.Year == p_entity.ExpireDate.Year && p.ExpireDate.Month == p_entity.ExpireDate.Month && p.ExpireDate.Day == p_entity.ExpireDate.Day); + } + if (p_entity.CreateTime != DateTime.MinValue) + { + + q = q.Where(p => p.CreateTime.Year == p_entity.CreateTime.Year && p.CreateTime.Day == p_entity.CreateTime.Day && p.CreateTime.Month == p_entity.CreateTime.Month); + } + + _ret.Result = q; + _ret.State = ReturnStatus.Succeed; + p_action(_ret); + + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TES_PURCHASE_PRICE), "Get_TES_PURCHASE_PRICE_List", e.Message); + throw e; + } + } + + + public ResultObject Save_TES_PURCHASE_PRICE(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TES_PURCHASE_PRICE.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TES_PURCHASE_PRICE), "Save_TES_PURCHASE_PRICE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + + + public ResultObject Del_TES_PURCHASE_PRICE(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (var db = EntitiesFactory.CreateExchangeCenterInstance()) + { + foreach (var itm in p_entitys) + { + db.TES_PURCHASE_PRICE.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TES_PURCHASE_PRICE), "Del_TES_PURCHASE_PRICE", e.Message); throw e; + } + return _ret; + } + + } +} diff --git a/北京北汽/SCP/Controller/SCP_TS_BARCODE_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_TS_BARCODE_CONTROLLER.cs new file mode 100644 index 0000000..5ea2ba4 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_TS_BARCODE_CONTROLLER.cs @@ -0,0 +1,325 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity.Migrations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.AppBoxEntity; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System.Data.Entity.Core; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Controller +{ + public class SCP_TS_BARCODE_CONTROLLER + { + public static void Get_TS_BARCODE_List(TS_BARCODE p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.TS_BARCODE; + if (p_entity.UIDList != null && p_entity.UIDList.Count>0) + { + q = q.Where(p => p_entity.UIDList.Contains(p.UID)); + } + if (!string.IsNullOrEmpty(p_entity.BarCode)) + { + q = q.Where(p => p.BarCode.Contains(p_entity.BarCode)); + } + if (!string.IsNullOrEmpty(p_entity.FullBarCode)) + { + q = q.Where(p => p.FullBarCode.Contains(p_entity.FullBarCode)); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.VendPartCode)) + { + q = q.Where(p => p.VendPartCode.Contains(p_entity.VendPartCode)); + } + if (!string.IsNullOrEmpty(p_entity.Batch)) + { + q = q.Where(p => p.Batch.Contains(p_entity.Batch)); + } + if (p_entity.ManageType != 0) + { + q = q.Where(p => p.ManageType == p_entity.ManageType); + } + if (!string.IsNullOrEmpty(p_entity.SerialNum)) + { + q = q.Where(p => p.SerialNum.Contains(p_entity.SerialNum)); + } + if (p_entity.Qty != 0) + { + q = q.Where(p => p.Qty == p_entity.Qty); + } + if (p_entity.BarCodeType != 0) + { + q = q.Where(p => p.BarCodeType == p_entity.BarCodeType); + } + if (!string.IsNullOrEmpty(p_entity.BillNum)) + { + q = q.Where(p => p.BillNum.Contains(p_entity.BillNum)); + } + if (p_entity.PoBillLine != 0) + { + q = q.Where(p => p.PoBillLine == p_entity.PoBillLine); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (!string.IsNullOrEmpty(p_entity.VendBatch)) + { + q = q.Where(p => p.VendBatch.Contains(p_entity.VendBatch)); + } + if (p_entity.PackQty != 0) + { + q = q.Where(p => p.PackQty == p_entity.PackQty); + } + if (!string.IsNullOrEmpty(p_entity.CreateOper)) + { + q = q.Where(p => p.CreateOper.Contains(p_entity.CreateOper)); + } + if (p_entity.State != 0) + { + q = q.Where(p => p.State == p_entity.State); + } + if (!string.IsNullOrEmpty(p_entity.Remark)) + { + q = q.Where(p => p.Remark.Contains(p_entity.Remark)); + } + if (!string.IsNullOrEmpty(p_entity.PoUnit)) + { + q = q.Where(p => p.PoUnit.Contains(p_entity.PoUnit)); + } + if (!string.IsNullOrEmpty(p_entity.LocUnit)) + { + q = q.Where(p => p.LocUnit.Contains(p_entity.LocUnit)); + } + if (!string.IsNullOrEmpty(p_entity.PartName)) + { + q = q.Where(p => p.PartName.Contains(p_entity.PartName)); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TS_BARCODE_CONTROLLER), "Get_TS_BARCODE_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TS_BARCODE_CONTROLLER), "Get_TS_BARCODE_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TS_BARCODE_CONTROLLER), "Get_TS_BARCODE_List", ex.ToString()); + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TS_BARCODE_CONTROLLER), "Get_TS_BARCODE_List", e.Message); + throw e; + } + + } + + + public ResultObject Save_TS_BARCODE(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var itm in p_entitys) + { + db.TS_BARCODE.AddOrUpdate(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TS_BARCODE_CONTROLLER), "Save_TS_BARCODE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TS_BARCODE_CONTROLLER), "Save_TS_BARCODE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TS_BARCODE_CONTROLLER), "Save_TS_BARCODE", ex.ToString()); + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TS_BARCODE_CONTROLLER), "Save_TS_BARCODE", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + throw e; + } + return _ret; + } + + public ResultObject Del_TS_BARCODE(List p_entitys) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + foreach (var itm in p_entitys) + { + db.TS_BARCODE.Remove(itm); + } + if (db.SaveChanges() != -1) + { + _ret.State = ReturnStatus.Succeed; + _ret.Result = true; + } + else + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + } + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TS_BARCODE_CONTROLLER), "Del_TS_BARCODE", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TS_BARCODE_CONTROLLER), "Del_TS_BARCODE", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TS_BARCODE_CONTROLLER), "Del_TS_BARCODE", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.Result = false; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TS_BARCODE_CONTROLLER), "Del_TS_BARCODE", e.Message); throw e; + } + return _ret; + } + + + } +} diff --git a/北京北汽/SCP/Controller/SCP_UNI_CONTOLLER.cs b/北京北汽/SCP/Controller/SCP_UNI_CONTOLLER.cs new file mode 100644 index 0000000..d0f5dc4 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_UNI_CONTOLLER.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Controller +{ + class SCP_UNI_CONTOLLER + { + } +} diff --git a/北京北汽/SCP/Controller/SCP_V_TA_VEND_PART_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_V_TA_VEND_PART_CONTROLLER.cs new file mode 100644 index 0000000..0081856 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_V_TA_VEND_PART_CONTROLLER.cs @@ -0,0 +1,96 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System.Data.Entity.Core; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Controller +{ + public class SCP_V_TA_VEND_PART_CONTROLLER + { + + public static void Get_V_TA_VEND_PART_List(V_TA_VEND_PART p_entity,Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_TA_VEND_PART; + if (p_entity.UID != 0) + { + q = q.Where(p => p.UID == p_entity.UID); + } + if (!string.IsNullOrEmpty(p_entity.VendId)) + { + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (p_entity.VendPackQty != 0) + { + q = q.Where(p => p.VendPackQty == p_entity.VendPackQty); + } + if (!string.IsNullOrEmpty(p_entity.PoUnit)) + { + q = q.Where(p => p.PoUnit.Contains(p_entity.PoUnit)); + } + if (!string.IsNullOrEmpty(p_entity.Site)) + { + q = q.Where(p => p.Site.Contains(p_entity.Site)); + } + + if (p_entity.TransportationTime != null) + { + q = q.Where(p => p.TransportationTime == p_entity.TransportationTime); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + if (!string.IsNullOrEmpty(p_entity.PartDesc1)) + { + q = q.Where(p => p.PartDesc1.Contains(p_entity.PartDesc1)); + } + if (!string.IsNullOrEmpty(p_entity.PartDesc2)) + { + q = q.Where(p => p.PartDesc2.Contains(p_entity.PartDesc2)); + } + if (!string.IsNullOrEmpty(p_entity.ProjectId)) + { + q = q.Where(p => p.ProjectId.Contains(p_entity.ProjectId)); + } + if (!string.IsNullOrEmpty(p_entity.PartDesc)) + { + q = q.Where(p => p.PartDesc.Contains(p_entity.PartDesc)); + } + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + + p_action(_ret); + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(V_TA_VEND_PART), "Get_V_TA_VEND_PART_List", e.Message); + throw e; + } + + + } + + } +} diff --git a/北京北汽/SCP/Controller/SCP_WMS_CONTROLLER.cs b/北京北汽/SCP/Controller/SCP_WMS_CONTROLLER.cs new file mode 100644 index 0000000..63651e2 --- /dev/null +++ b/北京北汽/SCP/Controller/SCP_WMS_CONTROLLER.cs @@ -0,0 +1,184 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.Entity.Migrations; +using System.Data.Entity.Validation; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; +using System.Data.Entity.Core; +using ChangKeTec.Wms.Models.Wms; + +namespace CK.SCP.Controller +{ + public class SCP_WMS_CONTROLLER + { + public static void Get_VIEW_PRODUCT_DETAIL(VIEW_PRODUCT_DETAIL p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (WmsEntities db = EntitiesFactory.CreateWmsInstance()) + { + IQueryable q = db.VIEW_PRODUCT_DETAIL; + + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } + if (p_entity.BeginTime != null && !p_entity.BeginTime.ToString().Contains("0001/1/1")) + { + q = q.Where(p => p.LogTime >= p_entity.BeginTime); + } + if (p_entity.EndTime != null && !p_entity.EndTime.ToString().Contains("0001/1/1")) + { + q = q.Where(p => p.LogTime <= p_entity.EndTime); + } + + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_V_TB_ASN_DETAIL_List", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_V_TB_ASN_DETAIL_List", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_V_TB_ASN_DETAIL_List", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_V_TB_ASN_DETAIL_List", e.Message); + throw e; + } + + } + public static void Get_VIEW_STOCK_DETAIL(VIEW_STOCK_VEND p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (WmsEntities db = EntitiesFactory.CreateWmsInstance()) + { + IQueryable q = db.VIEW_STOCK_VEND; + + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_WMS_CONTROLLER), "Get_VIEW_STOCK_DETAIL", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_WMS_CONTROLLER), "Get_VIEW_STOCK_DETAIL", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_WMS_CONTROLLER), "Get_VIEW_STOCK_DETAIL", ex.ToString()); + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_WMS_CONTROLLER), "Get_VIEW_STOCK_DETAIL", e.Message); + throw e; + } + + } + + } + +} diff --git a/北京北汽/SCP/Controller/UniApiController.cs b/北京北汽/SCP/Controller/UniApiController.cs new file mode 100644 index 0000000..c9c7085 --- /dev/null +++ b/北京北汽/SCP/Controller/UniApiController.cs @@ -0,0 +1,289 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using CK.SCP.Models; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Models.UniApiEntity; + +namespace CK.SCP.Controller +{ + public static class UniApiController + { + + public static void RemoveList(ScpEntities db, List uniApiList) + { + db.TS_UNI_API.RemoveRange(uniApiList); + } + public static void AddHisList(ScpEntities db, List uniApiHisList) + { + + db.TS_UNI_API_HIS.AddRange(uniApiHisList); + } + + public static void AddApiData(ScpEntities wdb, TS_UNI_API apiData) + { + wdb.TS_UNI_API.Add(apiData); + } + + + public static void AddApiDataList(ScpEntities wdb, List apiDataList) + { + wdb.TS_UNI_API.AddRange(apiDataList); + } + + + public static WmsTableName GetTableName(UniApiType uniApiType) + { + WmsTableName tableName; + switch (uniApiType) + { + case UniApiType.PO: + tableName = WmsTableName.TS_UNI_API;//中间表的名字 + break; + case UniApiType.Receive: + tableName = WmsTableName.TS_UNI_API; + break; + case UniApiType.BarCode: + tableName = WmsTableName.TS_UNI_API; + break; + case UniApiType.Invoice: + tableName = WmsTableName.TS_UNI_API; + break; + default: + throw new ArgumentOutOfRangeException(nameof(uniApiType), uniApiType, null); + } + return tableName; + } + + //创建采购订单 + public static TS_UNI_API CreateBy(TB_PO bill, TB_PO_DETAIL detail, UniApiType uniApiType) + { + var tableName = GetTableName(uniApiType); + var apiData = new TS_UNI_API + { + InterfaceType = uniApiType.ToString(), + TableName = tableName.ToString(), + BillNum = bill.PoBillNum, + PartCode = detail.PartCode, + Batch = "", + Qty = detail.PlanQty, + PoUnit = detail.PoUnit, + LocUnit = detail.LocUnit, + State = detail.State, + CreateOper = bill.CreateUser, + CreateTime = bill.CreateTime, + PutTime = ScpCache.GetServerTime(), + VendId = bill.VendId, + BillType = (int)BillType.PuchaseOrder, + SubBillType = 0, + ValidDate = (DateTime)detail.EndTime, + ErpBillNum = bill.ErpBillNum, + ErpLineNum = int.Parse(detail.PoBillNum), + VendBatch = "", + SourceBillNum = "", + Price = detail.Price, + PackQty = detail.PackQty, + Currency = detail.Currency, + Attn = "",//TODO + Buyer = bill.Buyer, + BuyerPhone = bill.BuyerPhone, + ModType = bill.ModType.ToString(), + Receiver = "",//TODO + UmConv = (decimal)detail.UnConv, + + + Extend1 = Utils.JsonHelper.GetJson(bill), + Extend2 = Utils.JsonHelper.GetJson(detail) + }; + return apiData; + } + + private static ScpEntities db = EntitiesFactory.CreateScpInstance(); + public static TS_UNI_API CreateBy(TB_PO bill, List detail, UniApiType uniApiType) + { + var tableName = GetTableName(uniApiType); + TS_UNI_API asp = new TS_UNI_API(); + foreach (var item in detail) + { + asp.InterfaceType = uniApiType.ToString(); + asp.TableName = tableName.ToString(); + + asp.BillNum = bill.PoBillNum; + asp.Batch = string.Empty; + asp.CreateOper = bill.CreateUser; + asp.CreateTime = bill.CreateTime; + asp.PutTime = ScpCache.GetServerTime(); + asp.VendId = bill.VendId; + asp.BillType = (int)BillType.PO; + asp.SubBillType = 0; + asp.VendBatch = string.Empty; + asp.SourceBillNum = string.Empty; + asp.Attn = "";//TODO + asp.Buyer = bill.Buyer; + asp.BuyerPhone = bill.BuyerPhone; + asp.ModType = bill.ModType.ToString(); + asp.Receiver = "";//TODO + asp.PartCode = item.PartCode; + + asp.Qty = item.PlanQty; + asp.PoUnit = item.PoUnit; + asp.LocUnit = item.LocUnit; + asp.State = item.State; + + asp.ValidDate = (DateTime)item.EndTime; + asp.ErpBillNum = bill.ErpBillNum;//暂时跟billnum 一样 后期可能会改 预留 + asp.ErpLineNum = item.PoLine; + + asp.Price = item.Price; + asp.PackQty = item.PackQty; + asp.Currency = item.Currency; + + asp.UmConv = (decimal)item.UnConv; + + db.TS_UNI_API.Add(asp); + db.SaveChanges(); + } + + return asp; + } + + //创建发货单 + public static TS_UNI_API CreateBy(V_TB_ASN bill, V_TB_ASN_DETAIL detail, UniApiType uniApiType) + { + var tableName = GetTableName(uniApiType); + var apiData = new TS_UNI_API(); + + apiData.InterfaceType = uniApiType.ToString(); + apiData.TableName = tableName.ToString(); + apiData.BillNum = bill.AsnBillNum; + apiData.PartCode = detail.PartCode; + apiData.Batch = detail.Batch; + apiData.Qty = detail.Qty; + apiData.PoUnit = detail.PoUnit; + apiData.LocUnit = detail.LocUnit; + apiData.State = (int)detail.State; + apiData.CreateOper = bill.CreateUser; + apiData.CreateTime = bill.CreateTime; + apiData.PutTime = ScpCache.GetServerTime(); + apiData.VendId = bill.VendId; + apiData.BillType = (int)BillType.PuchaseOrder; + apiData.SubBillType = 0; + apiData.ValidDate = (DateTime)detail.ProduceDate; + apiData.ErpBillNum = bill.PoBillNum; + apiData.ErpLineNum = detail.PoLine; + + if (bill.Site == "BJCIAI") + { + apiData.VendBatch = detail.Batch; + } + else + { + apiData.VendBatch = detail.VendBatch; + } + + + apiData.Price = detail.Price; + apiData.PackQty = detail.PackQty; + apiData.Currency = detail.Currency; + apiData.UmConv = (decimal) detail.UnConv; + apiData.Buyer = bill.Buyer; + apiData.BuyerPhone = bill.BuyerPhone; + apiData.Domain = bill.Site; + apiData.Site = bill.SubSite; + + apiData.Extend1 = Utils.JsonHelper.GetJson(bill); + apiData.Extend2 = Utils.JsonHelper.GetJson(detail); + + return apiData; + } + + + + + + //创建条码 + public static TS_UNI_API CreateBy(TB_ASN bill, TS_BARCODE detail, UniApiType uniApiType) + { + var tableName = GetTableName(uniApiType); + var apiData = new TS_UNI_API(); + + apiData.Barcode = detail.BarCode; + apiData.InterfaceType = uniApiType.ToString(); + apiData.TableName = tableName.ToString(); + apiData.BillNum = bill.AsnBillNum; + apiData.PartCode = detail.PartCode; + apiData.Batch = detail.Batch; + apiData.Qty = detail.Qty; + apiData.PoUnit = detail.PoUnit; + apiData.LocUnit = detail.LocUnit; + apiData.State = detail.State; + apiData.CreateOper = bill.CreateUser; + apiData.CreateTime = bill.CreateTime; + apiData.PutTime = ScpCache.GetServerTime(); + apiData.VendId = bill.VendId; + apiData.BillType = (int)BillType.PuchaseOrder; + apiData.SubBillType = 0; + apiData.ValidDate = detail.ProduceDate; + apiData.ErpBillNum = bill.PoBillNum; + apiData.ErpLineNum = detail.PoBillLine; + apiData.VendBatch = detail.VendBatch; + apiData.SourceBillNum = bill.AsnBillNum; + apiData.Domain = bill.Site; + apiData.Site = bill.SubSite; + //detail.FullBarCode; + apiData.PackQty = detail.PackQty; + apiData.Extend1 = Utils.JsonHelper.GetJson(bill); + apiData.Extend2 = Utils.JsonHelper.GetJson(detail); + return apiData; + } + + //创建发票 + public static TS_UNI_API CreateBy(V_TB_INVOICE bill, V_TB_INVOICE_DETAIL detail, UniApiType uniApiType) + { + var tableName = GetTableName(uniApiType); + var apiData = new TS_UNI_API + { + InterfaceType = uniApiType.ToString(), + TableName = tableName.ToString(), + BillNum = bill.InvcBillNum, + PartCode = detail.PartCode, + Batch = "", + Qty = detail.Qty, + PoUnit = detail.PoUnit, + LocUnit = detail.PoUnit, + State = (int)detail.State, + CreateOper = bill.CreateUser, + CreateTime = (DateTime)bill.CreateTime, + PutTime = ScpCache.GetServerTime(), + VendId = bill.VendId, + BillType = (int)BillType.PuchaseOrder, + SubBillType = 0, + ValidDate = DateTime.Now,//暂时添上 + ErpBillNum = detail.PoBillNum, + ErpLineNum = detail.PoLineNum, + VendBatch = detail.ProjectId, + SourceBillNum = detail.AsnBillNum, + Price = detail.Price, + PackQty = (decimal)detail.PackQty, + Currency = detail.Currency, + Invoice = bill.InvoiceNum, + Receiver = detail.ErpRecvBillNum, + Tax = (decimal)bill.Tax, + TaxAmt = (decimal)(detail.Price * bill.Tax), + Domain = bill.Site, + Site = bill.Site, + Extend1 = Utils.JsonHelper.GetJson(bill), + Extend2 =Utils.JsonHelper.GetJson(detail) + + + }; + return apiData; + } + + public static List GetNewInterfaceList(ScpEntities wdb) + { + return wdb.TS_UNI_API.Where(p => p.State == (int)BillState.New).OrderBy(p => p.UID).ToList(); + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Controller/VEND_USERController.cs b/北京北汽/SCP/Controller/VEND_USERController.cs new file mode 100644 index 0000000..09ddcec --- /dev/null +++ b/北京北汽/SCP/Controller/VEND_USERController.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models; +using CK.SCP.Models.ScpEntity; + +namespace CK.SCP.Controller +{ + public class VEND_USERController + { + public static TA_VEND_USER GetVendUserModel(int id) + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + return db.TA_VEND_USER.SingleOrDefault(p => p.UID == id); + } + } + } +} + + + + + + + + + + + + + diff --git a/北京北汽/SCP/Controller/app.config b/北京北汽/SCP/Controller/app.config new file mode 100644 index 0000000..72f696a --- /dev/null +++ b/北京北汽/SCP/Controller/app.config @@ -0,0 +1,39 @@ + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + http://10.10.10.21/u9/Services/YY.U9.Cust.MPT.MPTSV.ICommonAPISV.svc + + + + \ No newline at end of file diff --git a/北京北汽/SCP/Controller/packages.config b/北京北汽/SCP/Controller/packages.config new file mode 100644 index 0000000..33e13d6 --- /dev/null +++ b/北京北汽/SCP/Controller/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/北京北汽/SCP/DLL/CK.SCP.Common.dll b/北京北汽/SCP/DLL/CK.SCP.Common.dll new file mode 100644 index 0000000..0f8d325 Binary files /dev/null and b/北京北汽/SCP/DLL/CK.SCP.Common.dll differ diff --git a/北京北汽/SCP/DLL/CK.SCP.Controller.dll b/北京北汽/SCP/DLL/CK.SCP.Controller.dll new file mode 100644 index 0000000..1f5759c Binary files /dev/null and b/北京北汽/SCP/DLL/CK.SCP.Controller.dll differ diff --git a/北京北汽/SCP/DLL/CK.SCP.Controller.dll.config b/北京北汽/SCP/DLL/CK.SCP.Controller.dll.config new file mode 100644 index 0000000..23349b1 --- /dev/null +++ b/北京北汽/SCP/DLL/CK.SCP.Controller.dll.config @@ -0,0 +1,25 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/北京北汽/SCP/DLL/CK.SCP.Models.dll b/北京北汽/SCP/DLL/CK.SCP.Models.dll new file mode 100644 index 0000000..88ce17c Binary files /dev/null and b/北京北汽/SCP/DLL/CK.SCP.Models.dll differ diff --git a/北京北汽/SCP/DLL/CK.SCP.Models.dll.config b/北京北汽/SCP/DLL/CK.SCP.Models.dll.config new file mode 100644 index 0000000..d696498 --- /dev/null +++ b/北京北汽/SCP/DLL/CK.SCP.Models.dll.config @@ -0,0 +1,20 @@ + + + + +
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/北京北汽/SCP/DLL/CK.SCP.Utils.dll b/北京北汽/SCP/DLL/CK.SCP.Utils.dll new file mode 100644 index 0000000..3163ea7 Binary files /dev/null and b/北京北汽/SCP/DLL/CK.SCP.Utils.dll differ diff --git a/北京北汽/SCP/DLL/ChangKeTec.Utils.dll b/北京北汽/SCP/DLL/ChangKeTec.Utils.dll new file mode 100644 index 0000000..1ba9fe3 Binary files /dev/null and b/北京北汽/SCP/DLL/ChangKeTec.Utils.dll differ diff --git a/北京北汽/SCP/DLL/DevComponents.DotNetBar.Layout.dll b/北京北汽/SCP/DLL/DevComponents.DotNetBar.Layout.dll new file mode 100644 index 0000000..e3de30c Binary files /dev/null and b/北京北汽/SCP/DLL/DevComponents.DotNetBar.Layout.dll differ diff --git a/北京北汽/SCP/DLL/DevComponents.DotNetBar2.dll b/北京北汽/SCP/DLL/DevComponents.DotNetBar2.dll new file mode 100644 index 0000000..21fd493 Binary files /dev/null and b/北京北汽/SCP/DLL/DevComponents.DotNetBar2.dll differ diff --git a/北京北汽/SCP/DLL/DevComponents.DotNetBar2.xml b/北京北汽/SCP/DLL/DevComponents.DotNetBar2.xml new file mode 100644 index 0000000..8e18aee --- /dev/null +++ b/北京北汽/SCP/DLL/DevComponents.DotNetBar2.xml @@ -0,0 +1,81528 @@ + + + + DevComponents.DotNetBar2 + + + + + Represents advanced multi-column Tree control. + + + + + Specifies the notification interface that node uses to communicate status changes to it's parent tree. + + + + Called when Node.Expanded property has changed. + Node which Expanded property has changed. + + + Called before node is collapsed + Context information. + + + Called before node is expanded + Context information. + + + Called after node is collapsed. + Context information. + + + Called after node is expanded + Context information + + + + Required designer variable. + + + + + Raises Render event. + + Provides event arguments. + + + Creates new instance of the class. + + + + Clean up any resources being used. + + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Gets the current renderer used by the control. + + Reference to the TreeRenderer used by the control. + + + + Creates the Graphics object for the control. + + The Graphics object for the control. + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Invalidates node bounds on canvas. + + Reference node. + + + + Invalidates node bounds on canvas. + + Reference node. + + + + Finds the node based on the Node.Name property. + + Name of the node to find. + Reference to a node with given name or null if node cannot be found. + + + + Finds the node based on the Node.DataKey property. + + Data key to look for. + Reference to a node with given key or null if node cannot be found. + + + + Finds the node based on the Node.BindingIndex property. + + Index to look for. + Reference to a node with given key or null if node cannot be found. + + + + Finds the first node that starts with the specified text. Node.Text property is searched. + + Partial text to look for + Reference to a node or null if no node is found. + + + + Finds the first node where each Node.Cell[0:n].Text value starts with the + respective value found in the comma delimited 'text' string. + + Comma delimited partial text to look for + Reference to a node or null if no node is found. + + + + Finds the first node that starts with the specified text. Node.Text property is searched. + + Partial text to look for + Controls whether case insensitive search is performed + Reference to a node or null if no node is found. + + + + Finds the first node where each Node.Cell[0:n].Text value starts with the + respective value found in the comma delimited 'text' string. + + Comma delimited partial text to look for + Controls whether case insensitive search is performed + Reference to a node or null if no node is found. + + + + Finds the first node that starts with the specified text. Node.Text property is searched. + + Partial text to look for + Reference node to start searching from + Controls whether case insensitive search is performed + Reference to a node or null if no node is found. + + + + Finds the first node where each Node.Cell[0:n].Text value starts with the + respective value found in the comma delimited 'text' string. + + Comma delimited partial text to look for + Reference node to start searching from + Controls whether case insensitive search is performed + Reference to a node or null if no node is found. + + + + Indicates whether SelectionBoxFillColor should be serialized. Used by windows forms designer design-time support. + + + + + Resets SelectionBoxFillColor to it's default value. Used by windows forms designer design-time support. + + + + + Indicates whether ExpandBorderColor should be serialized. Used by windows forms designer design-time support. + + + + + Resets ExpandBorderColor to it's default value. Used by windows forms designer design-time support. + + + + + Indicates whether ExpandBackColor should be serialized. Used by windows forms designer design-time support. + + + + + Resets ExpandBackColor to it's default value. Used by windows forms designer design-time support. + + + + + Indicates whether ExpandBackColor2 should be serialized. Used by windows forms designer design-time support. + + + + + Resets ExpandBackColor2 to it's default value. Used by windows forms designer design-time support. + + + + + Indicates whether ExpandLineColor should be serialized. Used by windows forms designer design-time support. + + + + + Resets ExpandLineColor to it's default value. Used by windows forms designer design-time support. + + + + + Indicates whether CommandBackColor should be serialized. Used by windows forms designer design-time support. + + + + + Resets CommandBackColor to it's default value. Used by windows forms designer design-time support. + + + + + Indicates whether CommandBackColor2 should be serialized. Used by windows forms designer design-time support. + + + + + Resets CommandBackColor2 to it's default value. Used by windows forms designer design-time support. + + + + + Indicates whether CommandForeColor should be serialized. Used by windows forms designer design-time support. + + + + + Resets CommandForeColor to it's default value. Used by windows forms designer design-time support. + + + + + Indicates whether CommandMouseOverBackColor should be serialized. Used by windows forms designer design-time support. + + + + + Resets CommandMouseOverBackColor to it's default value. Used by windows forms designer design-time support. + + + + + Indicates whether CommandMouseOverBackColor2 should be serialized. Used by windows forms designer design-time support. + + + + + Resets CommandMouseOverBackColor2 to it's default value. Used by windows forms designer design-time support. + + + + + Indicates whether CommandMouseOverForeColor should be serialized. Used by windows forms designer design-time support. + + + + + Resets CommandMouseOverForeColor to it's default value. Used by windows forms designer design-time support. + + + + + Returns the zero based flat index of the node. Flat index is the index of the node as if tree structure + has been flattened into the list. + + Reference to the node to return index for. + Zero based node index or -1 if index cannot be determined. + + + + Returns node based on the flat index. Flat index is the index of the node as if tree structure + has been flattened into the list. + + Index to return node for. + Reference to a node or null if node at specified index cannot be found. + + + + Returns color scheme part color if set otherwise returns color passed in. + + Color. + Color scheme part. + Color. + + + + Collapses all nodes in a tree. + + + + + Expands all the tree nodes. + + + + + Paints control to canvas. This method might be used for print output. + + Graphics object to paint control to. + Indicates whether to paint control background. + + + + Paints control to canvas. This method might be used for print output. + + Graphics object to paint control to. + Indicates whether to paint control background. + Indicates clipping rectangle. Nodes outside of clipping rectangle will not be painted. You can pass Rectangle.Empty and all nodes will be painted. + + + + Processes the keyboard character and executes the search through the nodes. + + Character to process. + + + + + Raises ColumnResized event. + + ColumnHeader that was resized. + Event arguments + + + + Raises ColumnMoved event. + + ColumnHeader that was moved. + Provides event arguments. + + + + Raises ColumnResizing event. + + Column being resized + Event arguments + + + + Deselect specified node. Use this method when multiple node selection is enabled to deselect single node or all nodes. + + Reference to node to select or null to deselect all selected nodes. + Action that is selecting the node. + + + + Raises SelectionChanged event. + + Event arguments + + + + Raises CellSelected event. + + Event arguments. + + + + Raises CellUnselected event. + + Event arguments. + + + + Selected specified node. + + Node to select. + Action that is selecting the node. + + + + Invalidates the size for all top-level nodes and their sub-nodes. + + + + + Invalidates the size for a node and its sub-nodes. + + Node to invalidate size for. + + + + Ensures that selected node is visible i.e. that all parents of the selected node are expanded. If not selects the first parent node not expanded. + + + + + Starts editing specified cell, places the cell into the edit mode. + + Cell to start editing. + Action that is a cause for the edit. + + + + Starts editing specified cell, places the cell into the edit mode. + + Cell to start editing. + Action that is a cause for the edit. + Specifies the text to be edited instead of the text of the cell. Passing the NULL value will edit the text of the cell. + + + + Called just before cell editor is released for editing. + + Reference to the cell being edited. + Reference to the editor control. + + + + Raises the ProvideCustomCellEditor event. + + Event arguments. + + + + Ends cell editing. + + Specifies which action is cause for end of the editing. + Returns true if edits were applied to the cell or false otherwise. + + + + Ends cell editing. + + Specifies which action is cause for end of the editing. + Returns true if edits were applied to the cell or false otherwise. + + + + Raises the AfterCellEditComplete event. + + Provides information about event. + + + + Cancels the cell editing if it is in progress. + + Specifies which action is cause for canceling of editing. + + + + Raises BeforeNodeInsert event + + Node that is about to be inserted + Source of the event + + + + Raises AfterNodeInsert event + + Node that is inserted + Source of the event + + + + Raises BeforeNodeRemove event + + Node that is about to be removed + Source of the event + + + + Raises AfterNodeRemove event + + Node that is removed + Source of the event + + + + Called after node has been removed + + Node that is removed + Source of the event + + + + Invokes BeforeNodeDrop event. If overriden base implementation must be called in order for event to fire. + + Provides information about event + + + + Invokes AfterNodeDrop event. If overridden base implementation must be called in order for event to fire. + + Provides information about event + + + + Invokes NodeMouseDown event. If overridden base implementation must be called in order for event to fire. + + Provides information about event + + + + Invokes NodeMouseUp event. If overridden base implementation must be called in order for event to fire. + + Provides information about event + + + + Invokes NodeMouseMove event. If overridden base implementation must be called in order for event to fire. + + Provides information about event + + + + Invokes NodeClick event. If overridden base implementation must be called in order for event to fire. + + Provides information about event + + + + Invokes NodeDoubleClick event. If overridden base implementation must be called in order for event to fire. + + Provides information about event + + + + Invokes NodeMouseEnter event. If overriden base implementation must be called in order for event to fire. + + Provides information about event + + + + Invokes NodeMouseLeave event. If overriden base implementation must be called in order for event to fire. + + Provides information about event + + + + Invokes NodeMouseHover event. If overriden base implementation must be called in order for event to fire. + + Provides information about event + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Save nodes to XmlDocument. New Node AdvTree is created and nodes are serialized into it. + + Reference to an instance of XmlDocument object + + + + Saves nodes to a file. + + File name to save nodes to. + + + + Saves nodes to specified stream. + + Stream to save nodes to. + + + + Saves nodes to specified writer. + + Writer to save nodes to. + + + + Saves nodes to specified writer. + + Writer to save nodes to. + + + + Load nodes from file. + + File to load nodes from + + + + Load nodes from stream. + + Stream to load from + + + + Load nodes from reader. + + Reader to load from. + + + + Load nodes from reader. + + Reader to load from. + + + + Load nodes from an XmlDocument object. + + Document to load Nodes from. + + + + Forces the control to invalidate its client area and immediately redraw itself + and any child controls. Note however that this method will node do anything if refresh + is suspended as result of call to BeginUpdate method without corresponding EndUpdate + call or if SuspendPaint property is set to true. + + + + + Disables any redrawing of the tree control. To maintain performance while items + are added one at a time to the control, call the BeginUpdate method. The BeginUpdate + method prevents the control from painting until the + EndUpdate method is called. + + + + + Enables the redrawing of the tree view. To maintain performance while items are + added one at a time to the control, call the BeginUpdate + method. The BeginUpdate method prevents the control from painting until the EndUpdate + method is called. + + + Call to EndUpdate will enable the layout and painting in tree control. If there + are any pending layouts the EndUpdate will call + RecalcLayout method to perform the layout and it will + repaint the control. + + + + + Enables the redrawing of the tree view. To maintain performance while items are + added one at a time to the control, call the BeginUpdate + method. The BeginUpdate method prevents the control from painting until the EndUpdate + method is called. + + Gets or sets whether layout and refresh of control is performed if there are no other update blocks pending. + + + + Retrieves the tree node that is at the specified location. + + The Node at the specified point, in tree view coordinates. + + You can pass the MouseEventArgs.X and MouseEventArgs.Y coordinates of the + MouseDown event as the x and y parameters. + + The Point to evaluate and retrieve the node from. + + + + Retrieves the tree node that is at the specified location. + + The TreeNode at the specified location, in tree view coordinates. + + You can pass the MouseEventArgs.X and MouseEventArgs.Y coordinates of the + MouseDown event as the x and y parameters. + + The X position to evaluate and retrieve the node from. + The Y position to evaluate and retrieve the node from. + + + + Retrieves the tree node that is at the specified location. + + The TreeNode at the specified location, in tree view coordinates. + + You can pass the MouseEventArgs.X and MouseEventArgs.Y coordinates of the + MouseDown event as the x and y parameters. + + The X position to evaluate and retrieve the node from. + The Y position to evaluate and retrieve the node from. + Whether to enumerated displayed nodes only. + + + + Retrieves the tree node that is at the specified vertical location. + + The TreeNode at the specified location, in tree view coordinates. + + You can pass the MouseEventArgs.Y coordinates of the + MouseDown event as the y parameter. + + The Y position to evaluate and retrieve the node from. + + + + Retrieves the node cell that is at the specified location. + + The Point to evaluate and retrieve the cell from. + The Cell at the specified point, in tree view coordinates. + + + + Retrieves the node cell that is at the specified location. + + The X position to evaluate and retrieve the cell from. + The Y position to evaluate and retrieve the cell from. + The Cell at the specified point, in tree view coordinates. + + + + Retrieves the node cell that is at the specified location. + + The X position to evaluate and retrieve the cell from. + The Y position to evaluate and retrieve the cell from. + Whether to enumerated displayed nodes only. + The Cell at the specified point, in tree view coordinates. + + + Applies any layout changes to the tree control. + + Layout will not be performed if BeginUpdate is called. Any calls to the + RecalcLayout will return without executing requested layout operation. + + + + + Recalculates layout for the tree control. Not affected by BeginUpdate call. + + + + + Returns translation matrix for current Zoom. Translation matrix is used to translate internal node coordinates to screen + coordinates when Zoom is not set to 1. + + Returns new instance of Matrix object. + + + + Returns layout based rectangle from screen rectangle. Layout based rectangle will be different + from screen rectangle when Zoom is not set to 1. This method will translate the screen rectangle enlarged by Zoom + to layout rectangle which does not have Zoom applied. + + Screen rectangle + Layout rectangle + + + + Returns mouse position which is translated if control Zoom is not equal 1 + + Mouse event arguments + Returns translated position + + + + Returns mouse position which is translated if control Zoom is not equal 1 + + Mouse position + Returns translated position + + + + Returns mouse position which is translated if control Zoom is not equal 1 + + X coordinate + Y coordinate + + + + + Returns rectangle translated to screen rectangle if Zoom is not equal 1. + + Rectangle to translate + Screen Rectangle + + + + Returns size translated to screen dimension if Zoom is not equal 1. + + Size to translate + Screen Size + + + + Raises ColumnHeaderMouseUp event. + + Reference to ColumnHeader + Event arguments + + + + Raises ColumnHeaderMouseDown event. + + Reference to ColumnHeader + Event arguments + + + + Calls OnBeforeCheck method which fired + OnBeforeCheck event. + + Event arguments. + + + Raises the BeforeCheck event. + + A AdvTreeCellBeforeCheckEventArgs that contains the event + data. + + + + + Calls OnAfterCheck method which fired + AfterCheck event. + + Event arguments. + + + Raises the AfterCheck event. + + A AdvTreeEventArgs that contains the event + data. + + + + + Invokes CommandButtonClick event. + + Context node. + Event arguments. + + + + Invokes DeserializeNode event. + + Provides more information about the event + + + + Invokes SerializeNode event. + + Provides more information about the event + + + + Invokes the MarkupLinkClick evcent. + + Sender of the event, usually instance Cell object. + Event arguments + + + + Raises the NodeDragFeedback event. + + Provides event arguments. + + + + Processes drag over event. + + Drag event arguments. + + + + Raises the NodeDragStart event. + + Reference to node being dragged. + Event parameters + + + + Raises BeforeNodeDragStart event. + + Provides event arguments. + + + + Returns the display root node. + + Instance of node or null if there is no display root node. + + + + Returns reference to the node involved in drag-drop operation if any. + + Reference to node object or null if there is no drag node. + + + + + This member supports the .NET Framework infrastructure and is not intended to be + used directly from your code. + + + + + This member supports the .NET Framework infrastructure and is not intended to be + used directly from your code. + + + + + Raises FormattingEnabledChanged event. + + Event arguments. + + + + Raises FormatStringChanged event. + + Event arguments. + + + + Raises FormatInfoChanged event. + + Event arguments. + + + + Raises the DataSourceChanged event. + + An EventArgs that contains the event data. + + + + Raises the DisplayMemberChanged event. + + An EventArgs that contains the event data. + + + + When overridden in a derived class, resynchronizes the item data with the contents of the data source. + + + + + Disposes all nodes in Nodes collection and clears it. + + + + + When overridden in a derived class, sets the specified array of objects in a collection in the derived class. + + An array of items. + + + + Raises the DataColumnCreated event. + + Provides event arguments. + + + + Raises the DataNodeCreated event. + + Provides event arguments. + + + + Creates a new node for the data item. + + Item to create node for. + New instance of the node. + + + + Raises the DataNodeCreated event. + + Provides event arguments. + + + + When overridden in a derived class, sets the object with the specified index in the derived class. + + The array index of the object. + The object. + + + + Called when ParentFieldName property has changed. + + + + + Called when GroupingMembers property has changed. + + + + + Raises the Format event. + + Event parameters + + + + Clears internal property descriptors cache when data-binding is used. In most cases it is not needed that you call this method. Do so only if instructed by DevComponents support. + + + + + Raises the SelectedIndexChanged event. + + Event arguments. + + + + Raises the ValueMemberChanged event. + + Event arguments. + + + + Raises the SelectedValueChanged event. + + Event arguments. + + + + Called when TouchEnabled property has changed. + + Old property value + New property value + + + + Occurs just before cell editor is released for editing. It allows you to customize any properties on edit control. + + + + + Occurs when mouse button is pressed over the column header. + + + + + Occurs when mouse button is released over the column header. + + + + + Occurs after the cell check box is checked. + + + + + Occurs before the cell check box is checked and provides opportunity to cancel the event. + + + + + Occurs after the tree node is collapsed. + + + + + Occurs before the tree node is collapsed. + + + + + Occurs after the tree node is expanded. + + + + + Occurs before the tree node is expanded. + + + + + Occurs when command button on node is clicked. + + + + + Occurs before cell is edited. The order of the cell editing events is as follows: + BeforeCellEdit, CellEditEnding, AfterCellEdit, AfterCellEditComplete. + + + + + Occurs just before the cell editing is ended. The text box for editing is still visible and you can cancel + the exit out of editing mode at this point. The order of the cell editing events is as follows: + BeforeCellEdit, CellEditEnding, AfterCellEdit, AfterCellEditComplete. + + + + + Occurs after cell editing has ended and before the new text entered by the user is assigned to the cell. You can abort the edits in this event. + The order of the cell editing events is as follows: + BeforeCellEdit, CellEditEnding, AfterCellEdit, AfterCellEditComplete. + + + + + Occurs after cell editing has been completed. This event cannot be canceled. + + + + + Occurs after node selection has changed. + + + + + Occurs before Node has been selected by user or through the SelectedNode property. Event can be cancelled. + + + + + Occurs after node has been selected by user or through the SelectedNode property. + + + + + Occurs after node has been deselected by user or through the SelectedNode or SelectedNodes properties. + + + + + Occurs before node has been removed from its parent. + + + + + Occurs after node has been removed from its parent. + + + + + Occurs before node is inserted or added as child node to parent node. + + + + + Occurs after node is inserted or added as child node. + + + + + Occurs when node drag & drop operation is initiated. + + + + + Occurs before internal node drag & drop support is initiated and allows you to cancel the drag & drop. + + + + + Occurs before Drag-Drop of a node is completed and gives you information about new parent of the node that is being dragged + as well as opportunity to cancel the operation. + + + + + Occurs while node is being dragged. You can handle this event to disable the drop at specific nodes or to even change the + drop location for the node by modifying event arguments. + + + + + Occurs after Drag-Drop of a node is completed. This operation cannot be cancelled. + + + + + Occurs when the mouse pointer is over the node and a mouse button is pressed. + + + + + Occurs when the mouse pointer is over the node and a mouse button is released. + + + + + Occurs when the mouse pointer is moved over the node. + + + + + Occurs when the mouse enters the node. + + + + + Occurs when the mouse leaves the node. + + + + + Occurs when the mouse hovers over the node. + + + + + Occurs when the node is clicked with left mouse button. If you need to know more information like if another mouse button is clicked etc. use + NodeMouseDown event. + + + + + Occurs when the node is double-clicked. + + + + + Occurs after an node has been serialized to XmlElement and provides you with opportunity to add any custom data + to serialized XML. This allows you to serialize any data associated with the node and load it back up in DeserializeNode event. + + + To serialize custom data to XML definition control creates handle this event and use CustomXmlElement + property on SerializeNodeEventArgs to add new nodes or set attributes with custom data you want saved. + + + + + Occurs after an node has been de-serialized (loaded) from XmlElement and provides you with opportunity to load any custom data + you have serialized during SerializeItem event. + + + To de-serialize custom data from XML definition handle this event and use CustomXmlElement + property on SerializeItemEventArgs to retrieve any data you saved in SerializeNode event. + + + + + Occurs when hyperlink in text-markup is clicked. + + + + + Occurs when cell with custom editor type is about to be edited by user. Handle this event to provide + custom editors. + + + + + Occurs when the DataSource changes. + + + + + Occurs when the DisplayMembers property changes. + + + + + Occurs when the control is bound to a data value that need to be converted. + + + + + Occurs when FormattingEnabled property changes. + + + + + Occurs when FormatString property changes. + + + + + Occurs when FormatInfo property has changed. + + + + + Occurs when a Node for an data-bound object item has been created and provides you with opportunity to modify the node. + + + + + Occurs when a group Node is created as result of GroupingMembers property setting and provides you with opportunity to modify the node. + + + + + Occurs when value of ValueMember property has changed. + + + + + Occurs when value of SelectedValue property has changed. + + + + + Occurs when value of SelectedIndex property has changed. + + + + + Occurs when ColumnHeader is automatically created by control as result of data binding and provides you with opportunity to modify it. + + + + + Occurs after column has been resized by end-user. + + + + + Occurs while column is being resized by end-user. + + + + + Occurs after cell has been selected. + + + + + Occurs after cell has been unselected. + + + + + Occurs after users has moved the column. + + + + + Occurs while tree control is being rendered. + + + + + Indicates whether nodes are disposed when control is disposed. + + + + + Indicates whether sorting of node collection sorts child nodes as well. Default value is false. + + + + + Gets or sets whether tooltips are shown when mouse is over the cell when Tooltip property is set. + + + + + Gets the column header control which renderes the columns. + + + + + Gets or sets the scroll-bar visual style. + + + + + Gets or sets the proposed size of the tile in Tile view. The size of the tile might be larger than specified if Style assigned to node, cells adds padding, margins etc. or if Node.Image or font is greater than width or height specified here. + + + + + Gets or sets a value indicating whether the selected tree node remains highlighted even when the tree control has lost the focus. + + + + + Gets whether keyboard focus is within the control. + + + + + Gets or sets whether cell editing is completed when control loses input focus. Default value is true. + + + + + Gets or sets the reference to DotNetBar ContextMenuBar component which is used to provide context menu for nodes. This property + is automatically maintained by AdvTree. + + + + + Gets or sets zoom factor for the control. Default value is 1. To zoom display of the nodes for 20% set zoom factor to 1.2 + To zoom view 2 times set zoom factor to 2. Value must be greater than 0. Zoom is supported only when non-column tree setup is used. + Please note that Zoom functionality is designed only for very special use cases and only for + plain tree control setup which does not use editing, alternating row colors, drag & drop or any other + advanced functionality. + + + + + Gets the size of the tree. + + + + + Gets or sets custom node renderer. You can set this property to your custom renderer. When set the RenderMode should be set to Custom to enable + your custom renderer. To choose one of the system renderer use RenderMode property. Default value is null. + + + + + Gets or sets the render mode used to render all nodes. Default value is eNodeRenderMode.Default which indicates that system default renderer is used. + Note that if you specify custom renderer you need to set AdvTree.NodeRenderer property to your custom renderer. + + + + + Gets the style for the background of the control. + + + + + Gets or sets internal layout cell horizontal spacing. This property is for advanced internal use and you should not set it. + + + + + Gets or sets whether automatic drag and drop is enabled. Default value is true. + + + + + Gets or sets whether anti-alias smoothing is used while painting the tree. + + + + + Gets or sets the delimiter string that the tree node path uses. + + + + + Gets or sets whether user can resize the columns. Default value is true. + + + + + Gets or sets whether user can reorder the columns. Default value is false. + + + + + Gets the collection of column headers that appear in the tree. + + + By default there are no column headers defined. In that case tree control + functions as regular tree control where text has unrestricted width. + If you want to restrict the horizontal width of the text but not display + column header you can create one column and set its width to the width desired and + set its Visible property to false. + + + + + Gets or sets whether column headers are visible if they are defined through Columns collection. Default value is true. + + + + + Gets the collection of all style elements created for the tree. + + + + + Gets or sets default style for the node cell. + + + + + Gets or sets default style for the node cell when mouse is pressed. + + + + + Gets or sets default style for the node cell when mouse is over the cell. + + + + + Gets or sets default style for the node cell when cell is selected. + + + + + Gets or sets default style for the node cell when cell is disabled. + + + + + Gets or sets default style for the node when node is expanded. + + + + + Gets or sets default style for all nodes where style is not specified + explicity. + + + Name of the style assigned or null value indicating that no style is used. + Default value is null. + + + + + Gets or sets style for the node when node is selected. Note that this style is applied to the default node style. + + + Reference to the style assigned or null value indicating that no style is used. + Default value is null. + + + + + Gets or sets style for the node when mouse is over node. Note that this style is applied to the default node style. + + + Reference to the style assigned or null value indicating that no style is used. + Default value is null. + + + + + Gets the collection of tree nodes that are assigned to the tree view control. + + + A NodeCollection that represents the tree nodes + assigned to the tree control. + + + The Nodes property holds a collection of Node objects, each of which has a + Nodes property that can contain its own NodeCollection. + + + + + Gets or sets the vertical spacing between nodes in pixels. Default value is 3. + + + + + Gets or sets the horizontal spacing between nodes in pixels when control is in Tile layout. Default value is 4. + + + + + Gets or sets whether horizontal grid lines between each row are displayed. Default value is false. + + + + + Gets or sets whether column can be resized when mouse is over the column grid line and outside of the column header. + GridColumnLines must be set to true to make column lines visible. + + + + + Gets or sets whether grid lines are displayed when columns are defined. Default value is true. + + + + + Gets or sets the grid lines color. + + + + + Gets or sets the alternate row color applied to every other row. Default value is Color.Empty. + + + + + Gets or sets the background style for the child nodes columns. Background style defines the appearance of the column header background. + + + Reference to the style assigned to the column header. + + + + + Gets or sets the background style for the columns. Background style defines the appearance of the column header background. + + + Reference to the style assigned to the column header. + + ColumnStyleNormal Property + ColumnStyleMouseDown Property + ColumnStyleMouseOver Property + + + + Gets or sets the default style class assigned to the column headers. + + + Reference to the style assigned to the column header. + + + When style is not set on ColumnHeader objects then style setting from this property is used instead. + + ColumnStyleMouseDown Property + ColumnStyleMouseOver Property + + + + Gets or sets default style class assigned to the column which is applied when mouse + button is pressed over the header. + + + Name of the style assigned to the column. + + + When style is not set on ColumnHeader objects then style setting from this property is used instead. + + ColumnStyleNormal Property + ColumnStyleMouseOver Property + + + + Gets or sets default style class assigned to the column which is applied when mouse is + over the column. + + + Name of the style assigned to the column. + + + When style is not set on ColumnHeader objects then style setting from this property is used instead. + + ColumnStyleNormal Property + ColumnStyleMouseDown Property + + + + Gets collection that holds definition of column headers associated with nodes. + + + + + Gets or sets the tree node that is currently selected in the tree control. + + + If no Node is currently selected, the + SelectedNode property is a null reference (Nothing in Visual + Basic). + + + + + Gets or sets the collection of currently selected nodes in tree control. + + + + + Gets or sets whether multi-node selection is enabled. Default value is false. When + multi-selection is enabled use SelectedNodes property to retrive collection of selected nodes. + Use MultiSelectRule property to change the multi-node selection rule. + + + + + Gets or sets the rule that governs the multiple node selection. Default value indicates that only nodes + belonging to same parent can be multi-selected. + + + + + Returns reference to node layout object. + + + + + Returns reference to node display object. + + + + + Gets whether layout is suspended for tree control. Layout is suspended after + call to BeginUpdate method and it is resumed after the + call to EndUpdate method. + + + + + Gets whether control has layout operation pending on next paint or update. + + + + + Gets or sets whether paint operations are suspended for the control. You should use this method + if you need the RecalcLayout operations to proceed but you want to stop painting of the control. + + + + + Gets or sets the ImageList that contains the Image objects used by the tree nodes. + + + + + Gets or sets the image-list index value of the default image that is displayed by the tree nodes. + + + + + Gets or sets the custom image that is displayed instead default check box representation when check box in cell is checked. + + + + + Gets or sets the custom image that is displayed instead default check box representation when check box in cell is unchecked. + + + + + Gets or sets the custom image that is displayed instead default check box representation when check box in cell is in indeterminate state. + + + + + Gets or sets the NodeConnector object that describes the type of the connector used for + displaying connection between nested nodes. RootConnector property specifies the connector + between root node and it's imidate nested nodes. This property specifies connector for all other nested levels. + Default value is null. + + + You can use + Node.ParentConnector + property to specify per node connectors. + + + + + Gets or sets the NodeConnector object that describes the type of the connector used for + displaying connection between linked nodes. Connector specified here is used to display the connection + between nodes that are on the path to the selected node. When set you can use it to visually indicate the path to the currently selected node. + Default value is null. + + + + + Gets or sets the layout of the cells inside the node. Default value is Horizontal layout which + means that cell are positioned horizontally next to each other. + + + You can specify cell layout on each node by using + Node.CellLayout + property. + + + + + Gets or sets the layout of the cells inside the node. Default value is Horizontal layout which + means that cell are positioned horizontally next to each other. + + + You can specify cell layout on each node by using + Node.CellLayout + property. + + + + + Gets or sets the color scheme style. Color scheme provides predefined colors based on popular visual styles. + We recommend that you use "SchemePart" color settings since they maintain consistant look that is + based on target system color scheme setting. + + + + + Gets the reference to the color scheme object. + + + + + Gets or sets whether the content of the control is centered within the bounds of control. Default value is true. + + + + + Gets or sets whether per cell selection mode is enabled. In cell selection mode the selection box is drawn over selected cell only + instead of all cells in the node. + Default value is false. + + + + + Gets or sets whether selection appearance changes depending on whether control has input focus. Default value is true. Setting this value to false causes selection box to be rendered as if control has focus all the time. + + + + + Gets or sets the node selection box style. + + SelectionBox Property + SelectionBoxSize Property + SelectionBoxFillColor Property + SelectionBoxBorderColor Property + + + + Gets or sets the value that indicates whether selection box is drawn around the + selected node. Default value is true. Another way to provide the visual indication that + node is selected is by using selected state style properties like + NodeStyleSelected + and + CellStyleSelected. + + CellStyleSelected Property + NodeStyleSelected Property + + + + Gets or sets the size/thickness in pixel of the selection box drawn around selected + node. + + + + + Gets or sets whether node is selected when mouse is pressed anywhere within node vertical bounds. Default value is true. + + + When set to false the node is selected only when mouse is pressed over the node content. + + + + + Gets or sets the total node expand area width in pixels. The expand button with ExpandButtonSize is fitted into this area. Default value is 24. + + + + + Gets or sets the size of the expand button that is used to expand/collapse node. Default value is 8,8. + + + + + Gets or sets expand button border color. Note that setting ExpandBorderColorSchemePart property will override the value that you set here. + + + + + Gets or sets expand button color scheme border color. Setting + this property overrides the setting of the corresponding ExpandBorderColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through ExpandBorderColor property. + + + + + Gets or sets expand button back color. Note that setting ExpandBackColorSchemePart property will override the value that you set here. + + + + + Gets or sets expand button color scheme back color. Setting + this property overrides the setting of the corresponding ExpandBackColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through ExpandBackColor property. + + + + + Gets or sets expand button target gradientback color. Note that setting ExpandBackColor2SchemePart property will override the value that you set here. + + + + + Gets or sets expand button color scheme target gradient back color. Setting + this property overrides the setting of the corresponding ExpandBackColor2 property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through ExpandBackColor2 property. + + + + + Gets or sets expand button line color. Note that setting ExpandLineColorSchemePart property will override the value that you set here. + + + + + Gets or sets expand button color scheme line color. Setting + this property overrides the setting of the corresponding ExpandLineColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through ExpandLineColor property. + + + + + Gets or sets the expand button background gradient angle. + + + + + Gets or sets the expand button image which is used to indicate that node will be expanded. To use images as expand buttons you also need to set ExpandButtonType=eExpandButtonType.Image. + + + + + Gets or sets the expand button image which is used to indicate that node will be collapsed. To use images as expand buttons you also need to set ExpandButtonType=eExpandButtonType.Image. + + + + + Gets or sets the type of the expand button used to expand/collapse nodes. + + + + + Gets or sets the display root node. Setting this property allows you to use any + Node as root display node. Default value is Null which means that first node from + AdvTree.Nodes collection is used as display root node. + + + + + Gets or sets the width of the command button. Default value is 10 pixels. + + + + + Gets or sets command button back color. Note that setting CommandBackColorSchemePart property will override the value that you set here. + + + + + Gets or sets command button color scheme back color. Setting + this property overrides the setting of the corresponding CommandBackColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through CommandBackColor property. + + + + + Gets or sets command button target gradient back color. Note that setting CommandBackColor2SchemePart property will override the value that you set here. + + + + + Gets or sets command button color scheme target gradient back color. Setting + this property overrides the setting of the corresponding CommandBackColor2 property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through CommandBackColor2 property. + + + + + Gets or sets command button foreground color. Note that setting CommandForeColorSchemePart property will override the value that you set here. + + + + + Gets or sets command button color scheme foreground color. Setting + this property overrides the setting of the corresponding CommandForeColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through CommandForeColor property. + + + + + Gets or sets the command button background gradient angle. + + + + + Gets or sets command button mouse over back color. Note that setting CommandMouseOverBackColorSchemePart property will override the value that you set here. + + + + + Gets or sets command button color scheme mouse over back color. Setting + this property overrides the setting of the corresponding CommandMouseOverBackColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through CommandMouseOverBackColor property. + + + + + Gets or sets command button mouse over target gradient back color. Note that setting CommandMouseOverBackColor2SchemePart property will override the value that you set here. + + + + + Gets or sets command button mouse over color scheme target gradient back color. Setting + this property overrides the setting of the corresponding CommandMouseOverBackColor2 property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through CommandMouseOverBackColor2 property. + + + + + Gets or sets command button mouse over foreground color. Note that setting CommandMouseOverForeColorSchemePart property will override the value that you set here. + + + + + Gets or sets command button mouse over color scheme foreground color. Setting + this property overrides the setting of the corresponding CommandMouseOverForeColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through CommandMouseOverForeColor property. + + + + + Gets or sets the command button mouse over background gradient angle. + + + + + Gets or sets a value indicating whether the label text of the node cells can be edited. Default value is false. + + + + + Returns whether cell editing is in progress. + + + + + Gets or sets whether keyboard incremental search through Node.Text property is enabled. Default value is true. + + + + + Gets or sets the keyboard search buffer expiration timeout. Default value is 1000 which indicates that + key pressed within 1 second will add to the search buffer and control will be searched for node text + that begins with resulting string. Setting this value to 0 will disable the search buffer. + + + + + Indicates whether search buffer is auto-cleared regardless of the expiration timeout if node is not found using current buffer content. + + + + + Gets or sets whether double-clicking the node will toggle its expanded state. Default value is true. + + + + + Gets or sets whether node is highlighted when mouse enters the node. Default value is false. + + + There are two ways to enable the node hot-tracking. You can set the HotTracking property to true in which case the + mouse tracking is enabled using system colors specified in TreeColorTable. You can also define the NodeStyleMouseOver + style which gets applied to the node when mouse is over the node. + + + + + Gets whether tree is in process of moving the column in response to user finishing the column move action. + + + + + Gets or sets how control positions the items. Default value is standard TreeView layout. + + + + + Gets or sets the color of the group divider line when in tile view. + + + + + Returns the reference to the node mouse is currently over or null (Nothing) if mouse is not over any node in tree. + + + + + Specifies the mouse cursor displayed when mouse is over the cell. Default value + is null which means that default control cursor is used. + + + To specify cursor for each individual cell use + Cell.Cursor property. + + + + + Gets reference to array of Cell objects that have HostedControl property set. + + + + + Gets or sets whether hosted controls are clipped so they don't overlap the control borders. Default value is true. + + + + + Gets or sets whether control border needs to be updated by calling UpdateControlBorderPanel() + + + + + Gets the reference to internal vertical scroll-bar control if one is created or null if no scrollbar is visible. + + + + + Gets or sets whether Vertical Scroll-bar is shown if needed because content of the control exceeds available height. Default value is true. + + + + + Gets or sets whether Horizontal Scroll-bar is shown if needed because content of the control exceeds available width. Default value is true. + + + + + Gets the reference to internal horizontal scroll-bar control if one is created or null if no scrollbar is visible. + + + + + Gets or sets a value indicating whether the tree control enables the user to scroll to any nodes placed outside of its visible boundaries. + This property is managed internally by AdvTree control and should not be modified. + + + + + Gets or sets the minimum size of the auto-scroll. Returns a Size that represents the minimum height and width of the scrolling area in pixels. + This property is managed internally by AdvTree control and should not be modified. + + + + + Gets or sets the location of the auto-scroll position. + + + + + Gets the list of all checked nodes in tree including child nodes. + + + + + Gets or sets the offset in pixels from node's X position that is used during drag & drop operation to indicate that + dragged node is dropped as child node of the parent's node. + + + + + Gets or sets whether drag & drop internal implementation allows the copying of the node being dragged when CTRL key is pressed. + + + + + Gets or sets whether control accepts the dragged nodes from other AdvTree controls. Default value is true. + + + + + Gets or sets the distance to indent each of the child tree node levels. Default value is 16. + + + + + Indicates whether drop marker is displayed during drag-drop operation. + + + + + Gets or sets whether drag and drop operation is in progress. This member supports + the AdvTree infrastructure and is not intended to be used directly from your + code. + + + + + Gets or sets whether number of nodes being dragged is displayed on drag node preview. Default value is true. + + + + + Gets or sets whether multiple nodes drag & drop is enabled. Default value is true. + + + + + Indicates whether AutoScrollPosition is reset to 0,0 when all nodes are cleared from the tree. Default value is true. + + + + + Gets or sets the comma separated list of property or column names to display on popup tree control. + + + + + Gets or sets the data source for the ComboTree. Expected is an object that implements the IList or IListSource interfaces, + such as a DataSet or an Array. The default is null. + + + + + Gets or sets a value indicating whether formatting is applied to the DisplayMembers property of the control. + + + + + Gets or sets the format-specifier characters that indicate how a value is to be displayed. + + + + + Gets or sets the IFormatProvider that provides custom formatting behavior. + + + + + Gets or sets comma separated field or property names that holds the value that is used to identify node and parent node. Format expected is: FieldNodeId,ParentNodeFieldId. For example if your table represents departments, you have DepartmentId field which uniquely identifies a department and ParentDepartmentId field which identifies parent of the department if any you would set this property to DepartmentId,ParentDepartmentId. + Note that you can only use ParentFieldNames or GroupingMembers property but not both. If both are set ParentFieldName take precedence. + + + + + Gets or sets comma separated list of field or property names that are used for grouping when data-binding is used. Note that you can only use ParentFieldName or GroupingMembers property but not both. If both are set ParentFieldName take precedence. + + + + + Gets or sets style for automatically created group nodes when data-binding is used and GroupingMembers property is set. + + + Name of the style assigned or null value indicating that no style is used. + Default value is null. + + + + + Gets or sets the index specifying the currently selected item. + + + + + Gets or sets the property to use as the actual value for the items in the control. Applies to data-binding scenarios. SelectedValue property will return the value of selected node as indicated by this property. + + + + + Gets or sets the value of the member property specified by the ValueMember property. + + + + + Indicates whether control changes the CurrencyManager.DataPosition when selected node is changed during data binding. + Default value is true. + + + + + Indicates whether touch support for scrolling is enabled. + + + + + Static class that holds AdvTree settings that are not commonly used. + + + + + Gets or sets whether tree control is scrolled horizontally so selected node is brought into the view. Default value is false. + You can set this property to false to disable the horizontal scrolling of tree control when selected node has changed. + + + + + Gets or sets whether AdvTree node comparer that provides column sorting uses standard text comparer instead of default + hybrid alpha-numeric comparer. Default value is false. + + + + + Defines an interface for cell edit control that allows custom controls to be used as cell editors. AdvTree control + expects that editing control inherits from System.Windows.Forms.Control. + + + + + Called when edit operation is started. The AdvTree control will first set CurrentValue, then call BeginEdit and will call EditComplete once + editing is completed. + + + + + Called when edit operation is completed. + + + + + Gets or sets current edit value. + + + + + AdvTree control subscribes to this event to be notified when edit operation is completed. For example when Enter key is + pressed the edit control might raise this event to indicate the completion of editing operation. + + + + + AdvTree control subscribes to this event to be notified that user has cancelled the editing. For example when Escape key is + pressed the edit control might raise this event to indicate that editing has been cancelled. + + + + + Gets or sets whether cell requests the word-wrap based on the current cell style. If your editor does not support + word-wrap functionality this can be ignored. + + + + + Defines delegate for PrepareCellEditor event. + + + + + + + Event arguments for PrepareCellEditor event. + + + + + Gets reference to the cell being edited. + + + + + Gets reference to the cell editor control. + + + + + Initializes a new instance of the PrepareCellEditorEventArgs class. + + + + + + + Defines delegate for PrepareCellEditor event. + + + + + + + Event arguments for AdvTree.Render event. + + + + + Indicates the rendering operation being performed. + + + + + Indicates graphics canvas to render on. + + + + + Initializes a new instance of the AdvTreeRenderEventArgs class. + + Specifies rendering type + Specifies graphics canvas to render on + + + + Specifies the rendering type being performed on AdvTree control Render event. + + + + + Control background is being painted. + + + + Represents a cell assigned to the Node. + + The Cell with Index 0 (zero) always exists for a Node and it is a cell that + you can interact with through the properties on a node, which are forwarding to the + Cell(0), or you can go directly to the Cell(0). + When Node has multiple columns defined each column corresponds to Cell in + Node's Cells collection. The first Column has Index 0, second Column Index 1 and so + forth. + Note that there is always at least one Cell in a Node even if multiple + columns are not used. + + + + + Initializes new instance of Cell class. + + + + + Initializes new instance of Cell class. + + Cell text. + + + + Initializes new instance of Cell class. + + Cell text. + + + + Initializes new instance of Cell class. + + Cell text. + + + + Releases the resources used by the Component. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Occurs after Tooltip text has changed. + + + + + Called when tooltip is shown and hidden. + + true if tooltip is being shown otherwise false. + + + + Shows tooltip for this item. + + + + + Destroys tooltip window. + + + + + Sets the bounds of the cell. + + New cell bounds. + + + + Sets the bounds of the image inside of the cell. + + New cell bounds. + + + + Sets the bounds of the check box inside of the cell. + + New cell bounds. + + + + Sets whether cells is visible or not. This is set by node layout manager and it is based on column visibility. + + True if visible otherwise false. + + + + Sets the parent of the cell. + + Parent node. + + + + Occurs after text has changed. + + + + + Sets the Images to the new CellImages object. + + CellImages object. + + + + Returns whether Images property should be serialized. Used internally for windows forms designer support. + + + + + Sets the Checked or CheckState properties. + + New value for checked state. + Action source. + + + + Sets the Checked or CheckState properties. + + New value for checked state. + Action source. + + + + Sets the mouse over flag. + + true if mouse is over the cell otherwise false. + + + + Sets the mouse down flag. + + true if left mouse button is pressed while over the cell otherwise false. + + + + Returns effective editor type used for cell editing. + + Editor type. + + + Makes a copy of a Cell. + + + + Ensures that the cell is visible, expanding nodes and scrolling the control as necessary. + + + + + Occurs when any image property for the cell has changed. + + + + + Invokes AfterCheck event on AdvTree + control. + + + + + Invokes BeforeCheck event on AdvTree + control. + + + + + Called just before cell layout is to be performed. + + + + + Occurs when text markup link is clicked. + + + + + Gets/Sets informational text (tooltip) for the cell. + + + + + Gets whether tooltip is visible or not. + + + + + Occurs when item's tooltip visibility has changed. + + + + + Gets or sets whether tooltips are shown when mouse is over the cell when Tooltip property is set. + + + + + Gets or sets whether cell content is editable when cell editing is enabled on tree control. Default value is true. + + + + + Gets whether cell can be edited. Cell can be edited if both Editable property is set to true and ColumnHeader.Editable property is set to true. + + + + + Gets or sets the item hosted inside of the cell. Only items that do not generate + popups are supported. Note that cell can only host either HostedItem or HostedControl but not both. + + + + + Gets or sets the control hosted inside of the cell. Note that cell can only host either HostedItem or HostedControl but not both. + + + When control is hosted inside of the cell, cell size is determined by the + size of the control hosted inside of it. The cell will not display its text but it will display any image assigned + or check box when control is hosted inside of it. The Style settings like Margin + and Padding will still apply. + + + + + Gets or sets whether hosted control size change event is ignored. + + + + + Gets or sets the hosted control size. Property is used to correctly scale control when AdvTree.Zoom is used to zoom view. + + + + + Returns name of the cell that can be used to identify it from the code. + + + + + Gets the relative bounds of the cell. + + + + + Gets the bounds of the cell. + + + + + Gets or sets the available content bounds for the text. Text will fitted into these bounds + but it's true location can be obtained only after it is displayed. + + + + + Gets the bounds of the text inside of cell. + + + + + Gets the relative bounds of the image inside of cell. + + + + + Gets the bounds of the image inside of cell. + + + + + Gets the bounds of the image inside of cell. + + + + + Gets the bounds of the check box inside of cell. + + + + + Gets a value indicating whether the cell is in an editable state. true if the cell is in editable state; otherwise, false. + + + + + Gets a value indicating whether the cell is in the selected state. true if the cell is in the selected state; otherwise, false. + + + + + Gets a value indicating whether the cell is visible. Cell is considered to be visible when it's parent column is visible. + + + + + Gets the parent node of the current cell. + + + + + Gets or sets the object that contains data about the cell. Any Object derived type can be assigned to this property. If this property is being set through the Windows Forms designer, only text can be assigned. + + + + + Gets or sets the object that contains data about the cell. Any Object derived type can be assigned to this property. If this property is being set through the Windows Forms designer, only text can be assigned. + + + + + Gets or sets the format that is applied to the value of Text property for display purposes. See "Formatting Overview" in MSDN + for description on available format strings. For example you can specify "C" to format text as currency, or "D" to format text as decimal number etc. + + + + + + Gets the formatted display text. + + + + + Gets or sets the text displayed in the cell. + + + + + Gets the parent tree control that the cell belongs to. + + + + + Gets or sets the style class assigned to the cell. Null value indicates that + default style is used as specified on cell's parent. + + + Reference to the style assigned to the cell or null (VB Nothing) indicating that default + style setting from tree control is applied. Default value is null. + + + When property is set to null (VB Nothing) the style setting from parent tree + controls is used. CellStyleNormal on AdvTree control is a root style for a cell. + + StyleDisabled Property + StyleMouseDown Property + StyleMouseOver Property + StyleSelected Property + + + + Gets or sets the style name used by cell. This member is provided for internal use only. To set or get the style use StyleNormal property instead. + + + + + Gets or sets the style class that is to when cell is selected. Null value indicates that + default style is used as specified on cell's parent. + + + Reference to the style assigned to the cell or null value indicating that default + style setting from tree control is applied. Default is null value. + + + When property is set to null value the style setting from parent tree + controls is used. CellStyleSelected on AdvTree control is a root style for a cell. + + StyleNormal Property + StyleDisabled Property + StyleMouseDown Property + StyleMouseOver Property + + + + Gets or sets the selected style name used by cell. This member is provided for internal use only. To set or get the style use StyleSelected property instead. + + + + + Gets or sets the disabled style class assigned to the cell. Null value indicates + that default style is used as specified on cell's parent. + + + Reference to the style assigned to the cell or null value indicating that default + style setting from tree control is applied. Default value is null. + + + When property is set to null value the style setting from parent tree + controls is used. CellStyleDisabled on AdvTree control is a root style for a + cell. + + StyleNormal Property + StyleMouseDown Property + StyleMouseOver Property + StyleSelected Property + + + + Gets or sets the disabled style name used by cell. This member is provided for internal use only. To set or get the style use StyleDisabled property instead. + + + + + Gets or sets the style class assigned to the cell which is applied when mouse + button is pressed while mouse is over the cell. Null value indicates that default + style is used as specified on cell's parent. + + + Reference to the style assigned to the cell or null value indicating that default + style setting from tree control is applied. Default value is null. + + + When property is set to null value style setting from parent tree + controls is used. CellStyleMouseDown on AdvTree control is a root style for a + cell. + + StyleNormal Property + StyleDisabled Property + StyleMouseOver Property + StyleSelected Property + + + + Gets or sets the mouse down style name used by cell. This member is provided for internal use only. To set or get the style use StyleMouseDown property instead. + + + + + Gets or sets the style class assigned to the cell which is applied when mouse is + over the cell. Null value indicates that default style is used as specified on cell's + parent. + + + Reference to the style assigned to the cell or null value indicating that default + style setting from tree control is applied. Default value is null. + + + When property is set to null value the style setting from parent tree + controls is used. CellStyleMouseOver on AdvTree control is a root style for a + cell. + + StyleNormal Property + StyleDisabled Property + StyleMouseDown Property + StyleSelected Property + + + + Gets or sets the mouse over style name used by cell. This member is provided for internal use only. To set or get the style use StyleMouseOver property instead. + + + + + Gets or sets whether cell is enabled or not. + + + + + Gets the reference to images associated with this cell. + + + + + Gets or sets the image alignment in relation to the text displayed by cell. + + + + + Gets or sets the checkbox alignment in relation to the text displayed by cell. + + + + + Gets or sets whether check box is visible inside the cell. + + + + + Gets or set a value indicating whether the check box is in the checked state. + + + + + Gets or sets a value indicating whether the CheckBox will allow three check states rather than two. If the ThreeState property is set to true + CheckState property should be used instead of Checked property to set the extended state of the control. + + + + + Specifies the state of a control, such as a check box, that can be checked, unchecked, or set to an indeterminate state. + + + + + Gets or sets the appearance style of the item. Default value is CheckBox. Item can also assume the style of radio-button. + + + + + Gets whether mouse is over the cell. + + + + + Gets whether left mouse button is pressed while over the cell. + + + + + Gets or sets the layout of the cell parts like check box, image and text. Layout can be horizontal (default) + where parts of the cell are positioned next to each other horizontally, or vertical where + parts of the cell are positioned on top of each other vertically. + Alignment of the each part is controlled by alignment properties. + + ImageAlignment Property + CheckBoxAlignment Property + + + + Specifies the mouse cursor displayed when mouse is over the cell. + + + + + Gets or sets whether cell wrapped the text during the layout. + + + + + Gets or sets the editor type used to edit the cell. Setting this property to value other than Default + overrides the cell editor type specified on column cell belongs to. + + + + + Gets or sets whether cell can be selected by user by clicking it with the mouse or using keyboard. Default value is true. + + + + + Gets whether cell can be selected. Cell must be Visible, Enabled and Selectable in order for it to be selected. + + + + + Returns ColumnHeader cell is under if one is defined and cell is already parented to the tree. Otherwise it returns null/nothing. + + + + + Gets reference to parsed markup body element if text was markup otherwise returns null. + + + + + Gets or sets whether cell supports and renders text markup. Default value is true. + + + + + Gets whether item supports text markup. Default is false. + + + + + A strongly-typed collection of objects. + + + + Creates new instance of the class. + + + + Adds new object to the collection. + + Object to add. + Index of newly added object. + + + + Gets the cell based on the column name. Node must be able to reach AdvTree control for this method to work. + + Column name. + Cell object or null. + + + + Inserts new object into the collection. + + Position of the object. + Object to insert. + + + + Returns index of the object inside of the collection. + + Reference to the object. + Index of the object. + + + + Returns whether collection contains specified object. + + Object to look for. + true if object is part of the collection, otherwise false. + + + + Removes specified object from the collection. + + + + + + Copies collection into the specified array. + + Array to copy collection to. + Starting index. + + + + Copies contained items to the Cell array. + + Array to copy to. + + + + Sets the node collection belongs to. + + Cell that is parent of this collection. + + + + Returns reference to the object in collection based on it's index. + + + + + Returns reference to the object in collection based on it's name. Returns null/nothing if cell with given name is not found. + + + + + Gets or sets the node this collection is associated with. + + + + + Represents event arguments for cell editing events. + + + + + Indicates the action that caused the event. + + + + + Indicates the cell that is affected. + + + + + Indicates new text that will be assigned to the cell if one is appropriate for given event. + + + + + Indicates whether the current action is cancelled. For BeforeCellEdit event setting this + property to true will cancel the editing. For AfterCellEdit event setting this property to + true will cancel any changes made to the text and edits will not be accepted. For CellEditEnding + event setting this property to true will keep the cell in edit mode. + + + + + Indicates whether editing operation was canceled by the end user, usually by pressing ESCAPE key. + + + + + Initializes new instance of CellEditEventArgs class. + + Reference to Cell this event is raised for. + Indicates the action that caused the event. + Indicates new text of the cell if it applies to given event. + + + + Initializes new instance of CellEditEventArgs class. + + Reference to Cell this event is raised for. + Indicates the action that caused the event. + Indicates new text of the cell if it applies to given event. + + + + Initializes new instance of CellEditEventArgs class. + + Reference to Cell this event is raised for. + Indicates the action that caused the event. + Indicates new text of the cell if it applies to given event. + Indicates whether action is canceled by the end user. + + + + Initializes new instance of CellEditEventArgs class. + + Reference to Cell this event is raised for. + Indicates the action that caused the event. + Indicates new text of the cell if it applies to given event. + Indicates whether action is canceled by the end user. + + + + Gets reference to the cell editor control. + + + + + Represents class that holds images for a cell. + + + If you plan to use alpha-blended images we recommend using PNG-24 format which + supports alpha-blending. As of this writing .NET Framework 1.0 and 1.1 do not support + alpha-blending when used through Image class. + + + + + Initializes new instance of CellImages class. + + Reference to parent cell. + + + + Resets Image property to it's default value (null, VB nothing). + + + + + Resets ImageMouseOver to it's default value (null, VB nothing). + + + + + Resets ImageDisabled to it's default value (null, VB nothing). + + + + + Resets ImageExpanded to it's default value (null, VB nothing). + + + + Makes a copy of a CellImages object. + + + + Changes the image and invokes largest image size calculation if the + image size truly changed. + + + + + + + Returns image from image list based on the image index. + + Index of the image to return. + Image object from image list. + + + + Returns image from image list based on the image key. + + Key of the image to return. + Image object from image list. + + + + Gets or sets default cell image. Setting this property to valid image will + override any setting of ImageIndex property. + + + The image set through this property will be serialized with the cell. If you + plan to use ImageList then use ImageIndex + property. + + If you plan to use alpha-blended images we recommend using PNG-24 format + which supports alpha-blending. As of this writing .NET Framework 1.0 and 1.1 + do not support alpha-blending when used through Image class. + + + Image object or null (Nothing) if no image is assigned. + + + + Gets or sets the image that is displayed when mouse is over the cell. Setting + this property to valid image will override any setting of ImageMouseOverIndex + property. + + + If you plan to use alpha-blended images we recommend using PNG-24 format which + supports alpha-blending. As of this writting .NET Framework 1.0 and 1.1 do not support + alpha-blending when used through Image class. + + + + + Gets or sets the image that is displayed when cell is disabled. If not assigned + disabled image is created from default cell image. Setting this property to valid image + will override any setting of ImageDisabledIndex property. + + + If you plan to use alpha-blended images we recommend using PNG-24 format which + supports alpha-blending. As of this writing .NET Framework 1.0 and 1.1 do not support + alpha-blending when used through Image class. + + + + + Gets or sets image that is displayed when Node that this cell belongs to is + expanded. Setting this property to valid image will override any setting of + ImageExpandedIndex property. + + + If you plan to use alpha-blended images we recommend using PNG-24 format which + supports alpha-blending. As of this writing .NET Framework 1.0 and 1.1 do not support + alpha-blending when used through Image class. + + + + + Gets or sets the Index of default cell image from ImageList specified on AdvTree + control. + + + If you plan to use alpha-blended images we recommend using PNG-24 format which + supports alpha-blending. As of this writing .NET Framework 1.0 and 1.1 do not support + alpha-blending when used through Image class. + + + + + Gets or sets the key of the default cell image from ImageList specified on AdvTree control. + + + + + Property Editor support for ImageIndex selection + + + + + If you plan to use alpha-blended images we recommend using PNG-24 format which + supports alpha-blending. As of this writing .NET Framework 1.0 and 1.1 do not support + alpha-blending when used through Image class. + + + Gets or sets the Index of cell image when mouse is over the cell from ImageList + specified on AdvTree control. + + + + + If you plan to use alpha-blended images we recommend using PNG-24 format which + supports alpha-blending. As of this writing .NET Framework 1.0 and 1.1 do not support + alpha-blending when used through Image class. + + + Gets or sets the key of cell image when mouse is over the cell from ImageList + specified on AdvTree control. + + + + + If you plan to use alpha-blended images we recommend using PNG-24 format which + supports alpha-blending. As of this writing .NET Framework 1.0 and 1.1 do not support + alpha-blending when used through Image class. + + + Gets or sets the Index of disabled cell image from ImageList specified on AdvTree + control. + + + + + If you plan to use alpha-blended images we recommend using PNG-24 format which + supports alpha-blending. As of this writing .NET Framework 1.0 and 1.1 do not support + alpha-blending when used through Image class. + + + Gets or sets the key of disabled cell image from ImageList specified on AdvTree + control. + + + + + If you plan to use alpha-blended images we recommend using PNG-24 format which + supports alpha-blending. As of this writing .NET Framework 1.0 and 1.1 do not support + alpha-blending when used through Image class. + + + Gets or sets the Index of cell image from ImageList specified on AdvTree control + that is used when Node associated with this cell is expanded + + + + + If you plan to use alpha-blended images we recommend using PNG-24 format which + supports alpha-blending. As of this writing .NET Framework 1.0 and 1.1 do not support + alpha-blending when used through Image class. + + + Gets or sets the key of cell image from ImageList specified on AdvTree control + that is used when Node associated with this cell is expanded + + + + + Gets or sets the parent node of the cell. + + + + + Gets whether CellImages object should be serialized or not. If object has all + default values then this property will return false. + + + + + Returns largest image size in this set of images. + + + + + Indicates whether assigned images are automatically disposed when the cell and node are disposed. Default value is false. + + + + Represents the node or tree ColumnHeader. + + + + Creates new instance of the object. + + + + + Creates new instance of the object and initializes it with text. + + Text to initialize object with. + + + + Makes a copy of ColumnHeader object. + + Returns new instance of column header object. + + + + Sets the column bounds. + + + + + Resets Image property to it's default value (null, VB nothing). + + + + + Called when DataFieldName property has changed. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when SortingEnabled property has changed. + + Old property value + New property value + + + + Called when SortDirection property has changed. + + Old property value + New property value + + + + Invalidates the appearance of column header. + + + + + Occurs after Tooltip text has changed. + + + + + Called when tooltip is shown and hidden. + + true if tooltip is being shown otherwise false. + + + + Shows tooltip for this item. + + + + + Destroys tooltip window. + + + + + Automatically sets the column width (Width.Absolute) property based on the content of the column. + This will perform the one-time auto sizing of the column. To make column auto-size all the time + set Width.AutoSize=true. + + + + + Raises MouseMove event. + + Provides event arguments. + + + + Raises MouseEnter event. + + Provides event arguments. + + + + Raises MouseLeave event. + + Provides event arguments. + + + + Raises MouseHover event. + + Provides event arguments. + + + + Sort first level nodes that belong directly to this column. Calling this method repeatedly will + alternate between A-Z and Z-A sorting. + + + + + Sort first level nodes that belong directly to this column. + + true to use reverse Z-A sorting, false to sort from A-Z + + + + Called when SortComparer property has changed. + + Old property value + New property value + + + + Called when SortComparerReverse property has changed. + + Old property value + New property value + + + + Occurs when header size has changed due to the user resizing the column. + + + + + Occurs when mouse button is pressed over the column header. + + + + + Occurs when mouse button is released over the column header. + + + + + Occurs when header is double clicked. + + + + + Occurs when header is clicked. + + + + + Gets or sets whether cells content in this column is editable when cell editing is enabled on tree control. Default value is true. + + + + + Gets or sets the maximum number of characters the user can type or paste when editing cells in this column. + + + + + Returns name of the column header that can be used to identify it from the code. + + + + + Returns rectangle that this column occupies. If the layout has not been performed on the column the return value will be Rectangle.Empty. + + + + + Gets the reference to the object that represents width of the column as either + absolute or relative value. + + + Set Width using Absolute or Relative properties of ColumnWidth object. + + Absolute Property (DevComponents.AdvTree.ColumnWidth) + Relative Property (DevComponents.AdvTree.ColumnWidth) + + + + Gets or sets the minimum column width in pixels that is enforced when user is resizing the columns using mouse. + Default value is 0 which indicates that there is no minimum size constraint. + + + + + Gets or sets whether column is stretched to fill any empty space horizontally in tree when all columns consume less width than available. + Only one column in tree may have this property set to true and only last column with this property set will be stretched. + You should always set the Width for the column since Width will be used when columns consume more space in tree horizontally than available. + Applies to top-level columns only. + + + + + Gets or sets the style class assigned to the column. Empty value indicates that + default style is used as specified on cell's parent's control. + + + Name of the style assigned to the cell or an empty string indicating that default + style setting from tree control is applied. Default is empty string. + + + When property is set to an empty string the style setting from parent tree + controls is used. ColumnStyleNormal on AdvTree control is a root style for a cell. + + StyleMouseDown Property + StyleMouseOver Property + + + + Gets or sets the style class assigned to the column which is applied when mouse + button is pressed over the header. Empty value indicates that default + style is used as specified on column's parent. + + + Name of the style assigned to the column or an empty string indicating that default + style setting from tree control is applied. Default is empty string. + + + When property is set to an empty string the style setting from parent tree + controls is used. ColumnStyleMouseDown on AdvTree control is a root style for a + cell. + + StyleNormal Property + StyleMouseOver Property + + + + Gets or sets the style class assigned to the column which is applied when mouse is + over the column. Empty value indicates that default style is used as specified on column's + parent control. + + + Name of the style assigned to the column or an empty string indicating that default + style setting from tree control is applied. Default is empty string. + + + When property is set to an empty string the style setting from parent tree + controls is used. ColumnStyleMouseOver on AdvTree control is a root style for a + cell. + + StyleNormal Property + StyleMouseDown Property + + + + Gets or sets the name of the column in the ColumnHeaderCollection. + + + + + Gets or sets the column caption. + + + + + Gets or sets whether column is visible. Hiding the header column will also hide corresponding data column. + + + + + + Gets or sets Image alignment inside of column. Default value is Left. + + + + + Gets or sets the data-field or property name that is used as source of data for this column when data-binding is used. + + + + + Gets or sets additional custom data associated with the column. + + + + + Gets or sets the color of the cells background for this column. + + + + + Gets or sets display index of the column. -1 indicates default value and is modified to actual display index when the column is added to a ColumnHeaderCollection. + + + A lower display index means a column will appear first (to the left) of columns with a higher display index. + Allowable values are from 0 to num columns - 1. (-1 is legal only as the default value and is modified to something else + when the column is added to a AdvTree's column collection). AdvTree enforces that no two columns have the same display index; + changing the display index of a column will cause the index of other columns to adjust as well. + + + + + Gets or sets whether user can sort by this column by clicking it. + + + + + Gets or sets the sort direction. Sort direction can be changed by clicking the column header if SortingEnabled=true. + + + + + Gets/Sets informational text (tooltip) for the cell. + + + + + Gets whether tooltip is visible or not. + + + + + Occurs when item's tooltip visibility has changed. + + + + + Gets or sets whether tooltips are shown when mouse is over the cell when Tooltip property is set. + + + + + Returns reference to AdvTree control this column belongs to. + + + + + Gets or sets whether column is automatically sized to the content when user double-clicks the column + on the column resize line. Column resizing must be enabled in order for this property to function. + Default value is true which indicates that column will be auto-sized to content when user double-clicks the + column resize marker. + + + + + Gets or sets whether column size has changed and it's layout needs to be recalculated. + + + + + Gets whether mouse left button is pressed on the column. + + + + + Gets whether mouse is over the column. + + + + + Occurs when mouse is moving over the column header. + + + + + Occurs when mouse enters column header. + + + + + Occurs when mouse leaves the column header. + + + + + Occurs when mouse hovers over the column. + + + + + Gets or sets the editor type used to edit the cell. Setting this property to value other than Default + overrides the cell editor type specified on column cell belongs to. + + + + + Gets or sets ascending (A-Z) column comparer used to sort nodes when this column is clicked. Your comparer will be passed to NodeCollection.Sort method and should know how to sort by appropriate column. + + + + + Gets or sets descending (Z-A) column comparer used to sort nodes when this column is clicked. Your comparer will be passed to NodeCollection.Sort method and should know how to sort by appropriate column. + + + + + Gets or sets whether to cancel internal sorting performed by AdvTree. + + + + + Gets or sets the column header being sorted. + + + + + Gets or sets the IComparer used for sorting. + + + + + Defines column related event arguments. + + + + + Gets reference to the column. + + + + + Initializes a new instance of the ColumnEventArgs class. + + + + + + Defines delegate for ColumnMoved event. + + + + + Defines column moved event arguments. + + + + + Gets the column display index before the column was moved. + + + + + Gets the column display index before the column was moved. + + + + + Initializes a new instance of the ColumnMovedEventArgs class. + + Column affected + Old display index + New display index + + + + Represents collection for ColumnHeader objects. + + + + + Default constructor. + + + + + Sets the node collection belongs to. + + ColumnHeader that is parent of this collection. + + + + Adds new object to the collection. + + Object to add. + Index of newly added object. + + + + Inserts new object into the collection. + + Position of the object. + Object to insert. + + + + Returns index of the object inside of the collection. + + Reference to the object. + Index of the object. + + + + Returns index of the object inside of the collection. + + Name of column to return index for. + Index of the column or -1 if column not found. + + + + Returns index of the object inside of the collection based on column DataFieldName. + + DataFieldName of column to return index for. + Index of the column or -1 if column not found. + + + + Returns index of the object inside of the collection based on column DataFieldName. + + DataFieldName of column to return index for. + Index of the column or -1 if column not found. + + + + Returns whether collection contains specified object. + + Object to look for. + true if object is part of the collection, otherwise false. + + + + Removes specified object from the collection. + + + + + + Called when SortDirection property on column header is set to value other than None. + + Ref to column header + + + + Copies collection into the specified array. + + Array to copy collection to. + Starting index. + + + + Copies contained items to the ColumnHeader array. + + Array to copy to. + + + + Gets the display index for specified column. + + Column that is part f ColumnHeaderCollection + Display index or -1 column is not part of this collection. + + + + Returns the column that is displayed at specified display index.. + + 0 based display index. + ColumnHeader + + + + Invalidates the display indexes and causes them to be re-evaluated on next layout. + + + + + Gets or sets the node this collection is associated with. + + + + + Returns reference to the object in collection based on it's index. + + + + + Returns reference to the object in collection based on it's name. + + + + + Occurs before the cells are sorted. + + + + + Gets whether a column that is part of this collection has SortDirection set. + + + + + A map of display index (key) to index in the column collection (value). Used to quickly find a column from its display index. + + + + + Gets reference to last visible column or null if there is no last visible column. + + + + + Gets reference to first visible column or null if there is no first visible column. + + + + + Gets the column header rendering bounds. + + + + + Initializes a new instance of the IndexToDisplayIndex class. + + + + + + + Initializes a new instance of the ColumnHeaderControl class. + + + + + Returns mouse position which is translated if control Zoom is not equal 1 + + X coordinate + Y coordinate + + + + + Gets or sets the column move marker that marks insertion point for column that is dragged. Marker is drawn before the column specified by this index. + + + + + Gets or sets the column header collection to be rendered. + + + + + Represents the width of the Column. Supports absolute width in Pixels and + relative width as percentage of the width of parent control. + + + + + Creates new instance of the object. + + + + + Gets or sets relative width expressed as percentage between 1-100. 0 indicates that + absolute width will be used. + + + Relative width is expressed as percentage between 1-100 of the parent controls + width. 0 indicates that absolute width will be used. Absolute width always takes + priority over relative width. For example value of 30 assigned to this property + indicates that width of the column will be 30% of the total client width of the + control. + + + + Gets or sets the absolute width of the column in pixels. + + Absolute width always takes precedence over the relative width of the + column. + + + + + Gets or sets whether column width is automatically set based on the column's content. Default value is false. + When set absolute and relative size values are ignored. + + + + + Gets or sets whether column auto-width is set to minimum of the column header text width. Applies to AutoSize=true only. + + + + + Gets the auto-size calculated width of the column after tree layout is performed and column has AutoSize=true. + + + + + Provides event arguments for command button events. + + + + + Default constructor. + + Action type. + Context node. + + + + Indicates the action type that caused the event. + + + + + Indicates the node action is peformed on. + + + + + Represents collection of connector points for a node. + + + + + Default constructor. + + + + + Sets the node collection belongs to. + + Node that is parent of this collection. + + + + Adds new object to the collection. + + Object to add. + Index of newly added object. + + + + Adds range of objects to the array. + + Array to add. + + + + Copies objects of the collection to the array. + + + + + + Inserts new object into the collection. + + Position of the object. + Object to insert. + + + + Returns index of the object inside of the collection. + + Reference to the object. + Index of the object. + + + + Returns whether collection contains specified object. + + Object to look for. + true if object is part of the collection, otherwise false. + + + + Removes specified object from the collection. + + + + + + Copies collection into the specified array. + + Array to copy collection to. + Starting index. + + + + Copies contained items to the ColumnHeader array. + + Array to copy to. + + + + Gets or sets the node this collection is associated with. + + + + + Returns reference to the object in collection based on it's index. + + + + + Control for input of the integer value. + + + + + Represents an control that allows numeric input. + + + + + Closes all popups managed by the owner control. + + + + + Defines interface that should be implemented by controls that support per control renderers. + + + + + Gets the renderer control will be rendered with. This can be either custom renderer set on the control or the + Rendering.GlobalManager specified renderer. + + + + + + Gets or sets the redering mode used by control. Default value is eRenderMode.Global which means that static GlobalManager.Renderer is used. If set to Custom then Renderer property must + also be set to the custom renderer that will be used. + + + + + Gets or sets the custom renderer used by the items on this control. RenderMode property must also be set to eRenderMode.Custom in order renderer + specified here to be used. + + + + + Defines interface for internal accessibility support for DotNetBar control. + + + + + Gets or sets the item default accesibility action will be performed on. + + + + + Provides support for custom localization. + + + + + Notifies the accessibility client applications of the specified AccessibleEvents for the specified child control. + + The AccessibleEvents object to notify the accessibility client applications of. + The child Control to notify of the accessible event. + + + + Forces the button to perform internal layout. + + + + + Creates the Graphics object for the control. + + The Graphics object for the control. + + + + Returns the renderer control will be rendered with. + + The current renderer. + + + + Sets up timer that watches when active window changes. + + + + + Called after change of active window has been detected. SetupActiveWindowTimer must be called to enable detection. + + + + + Releases and disposes the active window watcher timer. + + + + + Generates a Click event for the control. + + + + + Returns the collection of items with the specified name. This member is not implemented and should not be used. + + Item name to look for. + + + + + Returns the collection of items with the specified name and type. This member is not implemented and should not be used. + + Item name to look for. + Item type to look for. + + + + + Returns the collection of items with the specified name and type. This member is not implemented and should not be used. + + Item name to look for. + Item type to look for. + Indicates whether GlobalName property is used for searching. + + + + + Returns the first item that matches specified name. This member is not implemented and should not be used. + + Item name to look for. + + + + + Invokes the DotNetBar Customize dialog. + + + + + Occurs when popup of type container is loading. + + + + + Occurs when popup of type container is unloading. + + + + + Occurs when popup item is about to open. + + + + + Occurs when popup item is closing. + + + + + Occurs just before popup window is shown. + + + + + Occurs when Control is looking for translated text for one of the internal text that are + displayed on menus, toolbars and customize forms. You need to set Handled=true if you want + your custom text to be used instead of the built-in system value. + + + + + Gets/Sets the visual style for the button. + + + + + Gets or sets the rendering mode used by control. Default value is eRenderMode.Global which means that static GlobalManager.Renderer is used. If set to Custom then Renderer property must + also be set to the custom renderer that will be used. + + + + + Gets or sets the custom renderer used by the items on this control. RenderMode property must also be set to eRenderMode.Custom in order renderer + specified here to be used. + + + + + Gets or sets whether anti-alias smoothing is used while painting. Default value is false. + + + + + Gets or sets button Color Scheme. ColorScheme does not apply to Office2007 styled buttons. + + + + + Specifies whether button is drawn using Windows Themes when running on OS that supports themes like Windows XP. + + + + + Gets whether Windows Themes should be used to draw the button. + + + + + Gets or sets whether hooks are used for internal DotNetBar system functionality. Using hooks is recommended only if DotNetBar is used in hybrid environments like Visual Studio designers or IE. + + + + + Gets or sets the form button is attached to. + + + + + Indicates whether Reset buttons is shown that allows end-user to reset the toolbar state. + + + + + ImageList for images used on Items. Images specified here will always be used on menu-items and are by default used on all Bars. + + + + + ImageList for medium-sized images used on Items. + + + + + ImageList for large-sized images used on Items. + + + + + Indicates whether Tooltips are shown on Bars and menus. + + + + + Indicates whether item shortcut is displayed in Tooltips. + + + + + Gets or sets whether gray-scale algorithm is used to create automatic gray-scale images. Default is true. + + + + + Creates new instance of the class. + + + + + Resets the input position so the new input overwrites current value. + + + + + Called when InputHorizontalAlignment property value has changed. + + Old value. + New Value. + + + + Indicates whether property should be serialized by Windows Forms designer. + + + + + Resets the property to default value. + + + + + Resets style to default value. Used by windows forms designer. + + + + + Selects next input field if possible. + + true if next input field was selected otherwise false. + + + + Selects previous input field if possible. + + true if previous input field was selected otherwise false. + + + + ISupportInitialize.BeginInit implementation. While initialization is in progress ValueChanged events will not be fired. + + + + + ISupportInitialize.EndInit implementation. + + + + + Occurs when ButtonCustom control is clicked. + + + + + Occurs when ButtonCustom2 control is clicked. + + + + + Gets or sets whether control system buttons are rendered. Default value is true. + + + + + Gets or sets whether during painting OnPaintBackground on base control is called when BackColor=Transparent. + + + + + Gets whether watermark text should be rendered. + + + + + Gets or sets whether mouse wheel affects the input control. Default value is true. + + + + + Gets whether keyboard focus is within the control. + + + + + Gets the reference to internal visual item used as the root visual for the control. Using this property is in all cases not necessary except for some + very advanced usage scenarios. + + + + + Gets or sets the input field alignment inside the control + + + + + Gets or sets the watermark font. + + + + + Gets or sets the watermark text color. + + + + + Gets or sets whether watermark text is displayed if set for the input items. Default value is true. + + + + + Gets or sets the watermark text displayed on the input control when control is empty. + + + + + Gets or sets the watermark text alignment. Default value is left. + + + + + Gets or sets whether FocusHighlightColor is used as background color to highlight text box when it has input focus. Default value is false. + + + + + Gets or sets the color used as background color to highlight text box when it has input focus and focus highlight is enabled. + + + + + Gets the object that describes the settings for the custom button that can execute an custom action of your choosing when clicked. + + + + + Gets the object that describes the settings for the custom button that can execute an custom action of your choosing when clicked. + + + + + Specifies the background style of the control. + + + + + Gets the preferred height of the control. + + + + + Gets or sets the keys used to navigate between the input fields provided by this control. + + + + + Gets or sets the control background color when control is disabled. Default value is an empty color which indicates that background is not changed when control is disabled. + + + + + Gets or sets the control text color when control is disabled. Default value is an empty color which indicates that background is not changed when control is disabled. + + + + + Gets the system colors used by the control. + + + + + Defines an interface for the object that knows how to invoke a command. + + + + + Gets or sets the command that will be executed when the command source is invoked. + + + + + Gets or sets user defined data value that can be passed to the command when it is executed. + + + + + Initializes a new instance of the NumericInputBase class. + + + + + Raises the LockUpdateChanged event. + + Provides event data./ + + + + Gets or sets a value indicating whether a spin button control (up-down control) is used to adjust the current value. The default is false. + + When the ShowUpDown property is set to true, a spin button control is shown to adjust value of currently focused input item. + The value can be adjusted by using the up and down buttons to change the value. + + + + + + Decreases value of the control. + + + + + Increases the value of the control. + + + + + Shows drop-down popup. Note that popup will be shown only if there is a DropDownControl assigned or DropDownItems collection has at least one item. + + + + + Closes the drop-down popup if it is open. + + + + + Raises the ButtonClearClick event. + + + + + + Raises the ButtonDropDownClick event. + + + + + + Raises the ValueChanged event. + + Provides event arguments. + + + + Raises the ValueChanged event. + + Provides event arguments. + + + + Called when Command property value changes. + + + + + + + + + + + Occurs when the Value or IsEmpty property changes. + + This event is not raised when the entered date is earlier than MinDateTime or later than MaxDateTime. + + + + + + Occurs when the Value or IsEmpty property changes. This event occurs at the same time and has same function as ValueChanged event. It is provided for binding support. + + + + + Occurs when Clear button is clicked and allows you to cancel the default action performed by the button. + + + + + Occurs when Drop-Down button that shows calendar is clicked and allows you to cancel showing of the popup. + + + + + Occurs when ShowCheckBox property is set to true and user changes the lock status of the control by clicking the check-box. + + + + + Gets or sets whether input part of the control is read-only. When set to true the input part of the control becomes read-only and does not allow the typing. However, drop-down and up/down buttons part if visible still allows user to possibly change the value of the control through the method you can provide on drop-down or through up/down buttons. Use this property to allow change of the value through drop-down or up/down buttons only. + + + + + Gets or sets a value indicating whether a check box is displayed to the left of the input value. + Set to true if a check box is displayed to the left of the input value; otherwise, false. The default is false. + + When the ShowCheckBox property is set to true, a check box is displayed to the left of the input in the control. When the check box is selected, the value can be updated. When the check box is cleared, the value is unable to be changed. + You can handle the LockUpdateChanged event to be notified when this check box is checked and unchecked. Use LockUpdateChecked property + to get or sets whether check box is checked. + + + + + + Gets or sets whether check box shown using ShowCheckBox property which locks/unlocks the control update is checked. + + + + + Gets the object that describes the settings for the button that shows drop-down when clicked. + + + + + Gets the object that describes the settings for the button that clears the content of the control when clicked. + + + + + Gets the object that describes the settings for the button that switches the control into the free-text entry mode when clicked. + + + + + Gets the object that describes the settings for the button that displays popup calculator. + + + + + Gets or sets the Numeric String Format that is used to format the numeric value entered for display purpose. Read more about + available formats in MSDN under "Standard Numeric Format Strings" and "Custom Numeric Format Strings" topics. + + The format specified here indicates the format for display purpose only, not for the input purpose. + For example to display the number in system Currency format set the DisplayFormat to 'C'. + + + + + + Gets or sets whether empty null/nothing state of the control is allowed. Default value is true which means that IsEmpty property + may return true if input value is resets or ValueObject set to null/nothing. + + + + + Gets or sets whether control is empty i.e. it does not hold a valid value. + + + + + Specifies the behavior of ValueChanged event triggering. + + + + + Gets or sets the input field alignment inside the control + + + + + Gets or sets the reference of the control that will be displayed on popup that is shown when drop-down button is clicked. + + + + + Gets the collection of BaseItem derived items displayed on popup menu. + + + + + Gets or sets whether auto-overwrite functionality for input is enabled. When in auto-overwrite mode input field will erase existing entry + and start new one if typing is continued after InputComplete method is called. + + + + + Gets or sets the command assigned to the item. Default value is null. + Note that if this property is set to null Enabled property will be set to false automatically to disable the item. + + + + + Gets or sets user defined data value that can be passed to the command when it is executed. + + + + + Gets or sets the keyboard key that will toggle FreeTextEntryMode. Default value is Keys.None. + + + + + Occurs if Free-Text entry value is not natively recognized by the control and provides you with opportunity to convert that value to the + value control expects. + + + + + Occurs when Free-Text button is clicked and allows you to cancel its default action. + + + + + Gets or sets whether free text entries are attempted to be auto-resolved to dates like Today to today's date or Now to date and time now etc. Default value is true. + + + + + Gets or sets whether free-text entry is automatically turned off when control loses input focus. Default value is false. + + + + + Gets or sets whether control input is in free-text input mode. Default value is false. + + + + + Decreases value of the control. + + + + + Increases the value of the control. + + + + + Copies the current value in the control to the Clipboard. + + + + + Pastes the current Clipboard content if possible as the value into the control. + + + + + Moves the current control value to the Clipboard. + + + + + Raises the ParseValue event. + + Provides event arguments. + + + + Occurs when ValueObject property is set and it allows you to provide custom parsing for the values. + + + + + Gets or sets whether mouse wheel increases or decreases the input value when used. + + + + + Gets or sets the value displayed in the control. + + + + + Gets or sets the value of the control as an object. This property allows you to bind to the database fields and supports + null values. Expected value is int type or null. + + + + + Gets or sets the maximum value that can be entered. + + + + + Gets or sets the minimum value that can be entered. + + + + + Gets or sets the value to increment or decrement the value of the control when the up or down buttons are clicked. + + + + + Control for input of the integer value. + + + + + Copies the current value in the control to the Clipboard. + + + + + Pastes the current Clipboard content if possible as the value into the control. + + + + + Moves the current control value to the Clipboard. + + + + + Raises the ParseValue event. + + Provides event arguments. + + + + Decreases value of the control. + + + + + Increases the value of the control. + + + + + Occurs when ValueObject property is set and it allows you to provide custom parsing for the values. + + + + + Gets or sets whether mouse wheel increases or decreases the input value when used. + + + + + Gets or sets the value displayed in the control. + + + + + Gets or sets the value of the control as an object. This property allows you to bind to the database fields and supports + null values. Expected value is int type or null. + + + + + Gets or sets the maximum value that can be entered. + + + + + Gets or sets the minimum value that can be entered. + + + + + Gets or sets the value to increment or decrement the value of the control when the up or down buttons are clicked. + + + + + Initializes a new instance of the DateTimeInput class. + + + + + Copies the current value in the control to the Clipboard. + + + + + Pastes the current Clipboard content if possible as the value into the control. + + + + + Moves the current control value to the Clipboard. + + + + + Gets or sets the default date-time values that are used by the control. + + + + + Gets or sets a value indicating whether a spin button control (up-down control) is used to adjust the date/time value. The default is false. + + When the ShowUpDown property is set to true, a spin button control is shown to adjust value of currently focused input item. + The date and time can be adjusted by selecting each element individually and using the up and down buttons to change the value. + + + + + + Gets whether Value property should be serialized by Windows Forms designer. + + true if value serialized otherwise false. + + + + Resets Value property to default value. Used by Windows Forms designer. + + + + + Raises the ParseValue event. + + Provides event arguments. + + + + Gets whether Value property should be serialized by Windows Forms designer. + + true if value serialized otherwise false. + + + + Reset the MinDate property to its default value. + + + + + Gets whether Value property should be serialized by Windows Forms designer. + + true if value serialized otherwise false. + + + + Reset the MaxDate property to its default value. + + + + + Gets the Culture used by the date time input and month calendar controls + + reference to CultureInfo + + + + Raises the LockUpdateChanged event. + + Provides event data./ + + + + Raises the ValueChanged event. + + Provides event arguments. + + + + Raises the ButtonClearClick event. + + + + + + Raises the ButtonDropDownClick event. + + + + + + Called when DateTimeSelectorVisibility property has changed. + + Old property value + New property value + + + + Called when TimeFormat property has changed. + + Old property value + New property value + + + + Called when TimeSelectorType property has changed. + + Old property value + New property value + + + + Called when Command property value changes. + + + + + + + + + + + Occurs when the Value or IsEmpty property changes. + + This event is not raised when the entered date is earlier than MinDateTime or later than MaxDateTime. + + + + + + Occurs when the Value or IsEmpty property changes. This event occurs at the same time and has same function as ValueChanged event. It is provided for binding support. + + + + + Occurs when the Format property value has changed. + + + + + Occurs when Clear button is clicked and allows you to cancel the default action performed by the button. + + + + + Occurs when Drop-Down button that shows calendar is clicked and allows you to cancel showing of the popup. + + + + + Occurs when ValueObject property is set and it allows you to provide custom parsing for the values. + + + + + Occurs when ShowCheckBox property is set to true and user changes the lock status of the control by clicking the check-box. + + + + + Gets whether popup calendar is open. + + + + + Gets or sets whether selected date on popup calendar can be changed using keyboard arrow keys. + + + + + Gets or sets a value indicating whether a check box is displayed to the left of the selected date. + Set to true if a check box is displayed to the left of the selected date; otherwise, false. The default is false. + + When the ShowCheckBox property is set to true, a check box is displayed to the left of the date in the control. When the check box is selected, the date/time value can be updated. When the check box is cleared, the date/time value is unable to be changed. + You can handle the LockUpdateChanged event to be notified when this check box is checked and unchecked. Use LockUpdateChecked property + to get or sets whether check box is checked. + + + + + + Gets or sets the date time value of the control. You can use IsEmpty property to check whether control holds an empty value. + Setting this property to System.DateTime(0) will also make the control Empty if AllowEmptyState=true. + + + + + Gets or sets the date/time value of the control as an object. This property allows you to bind to the database fields and supports + null values. Expected value is DateTime object or null to indicate no date selected. + + + + + Gets or sets the values of the nested DateTimeGroup items. + + When nested date-time groups are used note that some of the features of the control are disabled, notably minimum and maximum values + for nested date-times. + + + + + + Gets or sets whether empty null/nothing state of the control is allowed. Default value is true which means that IsEmpty property + may return true if input value is resets or ValueObject set to null/nothing. + + + + + Gets or sets whether control is empty i.e. it does not hold a valid DateTime value. + + + + + Gets or sets the minimum date and time that can be selected in the control. + + + + + Gets or sets the maximum date and time that can be selected in the control. + + + + + Gets or sets the format date/time is displayed in. To specify custom format set this value to Custom and specify custom format using CustomFormat property. + + + + + Gets or sets the custom date/time format string. + + + + To display string literals that contain date and time separators or format strings listed below, + you must use escape characters in the substring. For example, to display the date as "June 15 at 12:00 PM", + set the CustomFormat property to "MMMM dd 'at' t:mm tt". If the "at" substring is not enclosed by escape characters, + the result is "June 15 aP 12:00PM" because the "t" character is read as the one-letter A.M./P.M. format string (see the format string table below). + + + To display single quote in custom format use two single quotes characters like so '' after each other and they will be displayed as single quote. + + The following list shows all the valid format strings and their descriptions: + + + Format String + Description + + + d + The one- or two-digit day. + + + dd + The two-digit day. Single-digit day values are preceded by a 0. + + + ddd + The three-character day-of-week abbreviation. + + + dddd + The full day-of-week name. + + + jjj + The three-digit day-of-year day. Single and two-digit values are preceded by 0. + + + j + The three-digit day-of-year day. + + + h + The one- or two-digit hour in 12-hour format. + + + hh + The two-digit hour in 12-hour format. Single digit values are preceded by a 0. + + + H + The one- or two-digit hour in 24-hour format. + + + HH + The two-digit hour in 24-hour format. Single digit values are preceded by a 0. + + + m + The one- or two-digit minute. + + + mm + The two-digit minute. Single digit values are preceded by a 0. + + + M + The one- or two-digit month number. + + + MM + The two-digit month number. Single digit values are preceded by a 0. + + + MMM + The three-character month abbreviation. + + + MMMM + The full month name. + + + s + The one- or two-digit seconds. + + + ss + The two-digit seconds. Single digit values are preceded by a 0. + + + t + The one-letter A.M./P.M. abbreviation (A.M. is displayed as "A"). + + + tt + The two-letter A.M./P.M. abbreviation (A.M. is displayed as "AM"). + + + y + The one-digit year (2001 is displayed as "1"). + + + yy + The last two digits of the year (2001 is displayed as "01"). + + + yyyy + The full year (2001 is displayed as "2001"). + + + { + Starts the nested date-time group inside of the control. Note that nested groups must always be closed. + Nested date-time groups can be used to represent range of input date/time values in the control + To access nested values use Values property. For example to have control represent the input from two time values you could set + CustomFormat to 'from' {HH:mm} 'to' {HH:mm} which will create two nested date/time groups that represent the time value. Entered + time values can be accessed through Values property which return an array of all input values. + + + } + Ends the nested date-time input group. + + + + + + + Gets or sets the CultureInfo for the culture used by the DateTime Input controls and Month Calendar controls. + Default value is null which indicates that controls will use CurrentUICulture. + + + + + Gets or sets whether auto-overwrite functionality for input is enabled. When in auto-overwrite mode input field will erase existing entry + and start new one if typing is continued after InputComplete method is called. + + + + + Gets or sets whether check box shown using ShowCheckBox property which locks/unlocks the control update is checked. + + + + + Gets the object that describes the settings for the button that shows drop-down calendar when clicked. + + + + + Gets the object that describes the settings for the button that clears the content of the control when clicked. + + + + + Gets the object that describes the settings for the button that switches the control into the free-text entry mode when clicked. + + + + + Gets or sets whether input part of the control is read-only. When set to true the input part of the control becomes + read-only and does not allow the typing. However, drop-down part if visible still allows user to change the value of the control + Use this property to allow change of the value through drop-down picker only. + + + + + Gets or sets whether empty input values (year, month or day) are set to defaults while user is entering data. Default value is true. + + + + + Gets the reference to the internal MonthCalendarItem control which is used to display calendar when drop-down is open. + + + + + Gets or sets whether first day in month is automatically selected on popup date picker when month or year is changed. + + + + + Gets or sets whether input focus is automatically advanced to next input field when input is complete in current one. + + + + + List of characters that when pressed would select next input field. For example if you are + allowing time input you could set this property to : so when user presses the : character, + the input is forwarded to the next input field. + + + + + Gets or sets the date-time selectors visibility on popup. Default value is Auto which will select selector visibility based on Format property setting. + + + + + Returns reference to internal time selector item which is used on drop-down to select time when control is used in time entry mode. + + + + + Gets or sets the popup time selector time format used to present time by the selector i.e. 12H or 24H format. + + + + + Indicates the type of popup time selector used. + + + + + Gets or sets the command assigned to the item. Default value is null. + Note that if this property is set to null Enabled property will be set to false automatically to disable the item. + + + + + Gets or sets user defined data value that can be passed to the command when it is executed. + + + + + Occurs if Free-Text entry value is not natively recognized by the control and provides you with opportunity to convert that value to the + value control expects. + + + + + Occurs when Free-Text button is clicked and allows you to cancel its default action. + + + + + Gets or sets whether free text entries are attempted to be auto-resolved to dates like Today to today's date or Now to date and time now etc. Default value is true. + + + + + Gets or sets whether free-text entry is automatically turned off when control loses input focus. Default value is false. + + + + + Gets or sets whether control input is in free-text input mode. Default value is false. + + + + + Initializes a new instance of the DateTimeCellEditor class. + + + + + Represents cell display class. + + + + + Represents information necessary to paint the cell on canvas. + + + + + Initializes the tree color tables. + + + + + Provides data for RenderColumnHeader event. + + + + + Gets the column header that is rendered. + + + + + Target Graphics canvas. + + + + + Gets the bounds of the column header. + + + + + Gets the effective style for the column. + + + + + Gets the AdvTree control header is rendered for. + + + + + Gets or sets the color of the column sort indicator. + + + + + Initializes a new instance of the ColumnHeaderRendererEventArgs class. + + + + + Initializes a new instance of the ColumnHeaderRendererEventArgs class. + + + + + + + + + Represents helper class for node connector display. + + + + + From node reference. + + + + + From node style reference. + + + + + To node reference. + + + + + To node style reference. + + + + + Graphics object used for drawing. + + + + + Node offset since some node coordinates are relative. + + + + + Indicates whether from node is a root node. + + + + + Reference to node connector object that describes connector type. + + + + + Gets or sets whether connector is link connector. + + + + + Reference to the collection of the connector path points. Default value is null indicating there are no path points. + + + + + Provides data for the NodeRenderer.RenderDragDropMarker event. + + + + + Gets or sets reference to Graphics object, canvas node is rendered on. + + + + + Gets or sets the selection bounds. + + + + + Initializes a new instance of the DragDropMarkerRendererEventArgs class. + + + + + Initializes a new instance of the DragDropMarkerRendererEventArgs class. + + + + + + + Represents the line connector display class. + + + + + Base class for drawing node connectors. + + + + + Creates new instance of the object. + + + + + Draws connector line between two nodes. + + Connector context information. + + + + Returns new instance of pen object for node connector line. Caller is responsible for + disposing of this object. + + Node connector display info. + New instance of Pen object. + + + + Draws connector line between two nodes. + + Connector context information. + + + + Provides information for cell rendering methods and events. + + + + + Summary description for NodeRendererEventArgs. + + + + + Gets or sets reference to Graphics object, canvas node is rendered on. + + + + + Gets or sets the reference to Node object being rendered. + + + + + Gets or sets the absolute node bounds. + + + + + Gets or sets the reference to element style for rendered node or cell. Style provided here is the style + for current node or cell state. + + + + + Gets or sets color that is passed to renderer. May be Color.Empty. + + + + + Creates new instance of the class. + + + + + Gets or sets the cell being rendered. + + + + + Gets or sets absolute cell bounds. + + + + + Gets or sets the internal cell offset. + + + + + Gets or sets the color scheme. + + + + + Creates new instance of the class. + + + + + Creates new instance of the class and initializes it with default values. + + Reference to graphics object. + Reference to context node. + Reference to node bounds + Reference to cell style + Reference to cell + Reference to cell bounds + + + + Represents custom connector path info. + + + + + Summary description for NodeDisplay. + + + + Creates new instance of the class + Object to initialize class with. + + + + Paints the layout on canvas. + + + + + Sets locked offset to specific value. Point.Empty means there is no locked offset set. + + New locked offset. + + + + + + + + + + Gets or sets the offset of the tree content relative to the size of the container control. + + + + Gets or sets whether offset is locked, i.e. cannot be changed. + + + + Returns the default offset for the tree content relative to the size of the container. + + + + + Gets or sets the reference to the tree control managed by display class. + + + + + Base class for node expand button display. + + + + Creates new instance of the class + + + Draws expand button. + Context parameters for drawing expand button. + + + + Represents class that paints elliptical expand button. + + + + Draws ellipse type expand button. + Expand context drawing information. + + + + Represents expand button display using predefined images. + + + + + Draws image type expand button. + + Expand context information + + + + Represents event arguments for RenderExpandPart event. + + + + + Gets or sets reference to Graphics object, canvas node is rendered on. + + + + + Gets or sets the reference to Node object being rendered. + + + + Expand part bounds + + + Expand part border color + + + Expand part line color + + + Expand part background color + + + Expand part target gradient background color + + + Gradient angle + + + Expand part image when node is expanded + + + Expand part image when node is collapsed + + + Internal support for expand button types + + + Gets whether mouse is over expand part + + + + Creates new instance of the class and initializes it with default values. + + Reference to graphics object. + + + + Represents class that paints rectangular expand button. + + + + + Draw rectangular type expand button. + + Expand button context information. + + + + Draw triangular type expand button. + + Expand button context information. + + + + Represent class that paints selection around node. + + + + + Represents default system node and cell renderer. + + + + + Represents abstract renderer class for node objects. + + + + + Draws node background. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderNodeBackground method so events can occur. + + Information provided for rendering. + + + + Raises RenderNodeBackground event. + + Event arguments. + + + + Draws node expand part. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderNodeExpandPart method so events can occur. + + Information provided for rendering. + + + + Raises RenderNodeExpandPart event. + + + + + + Draws cell background. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderCellBackground method so events can occur. + + Information provided for rendering. + + + + Raises RenderCellBackground event. + + Event arguments + + + + Draws cell check box. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderCellCheckBox method so events can occur. + + Information provided for rendering. + + + + Raises RenderCellCheckBox event. + + Event arguments + + + + Draws cell image. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderCellImage method so events can occur. + + Information provided for rendering. + + + + Raises RenderCellImage event. + + Event arguments + + + + Draws cell text. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderCellText method so events can occur. + + Information provided for rendering. + + + + Raises RenderCellImage event. + + Event arguments + + + + Draws selection for SelectedNode. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderSelection method so events can occur. + + Information provided for rendering. + + + + Raises RenderSelection event. + + Event data. + + + + Draws hot-tracking marker for mouse over node. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderHotTracking method so events can occur. + + Information provided for rendering. + + + + Raises RenderHotTracking event. + + Event data. + + + + Draws connector between nodes. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderConnector method so events can occur. + + Information provided for rendering. + + + + Raises RenderConnector event. + + Event data. + + + + Draws the tree background. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderTreeBackground method so events can occur. + + Information provided for rendering. + + + + Raises RenderTreeBackground event. + + Event data. + + + + Draws the drag & drop marker that indicates the insertion point for the node. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderDragDropMarker method so events can occur. + + Information provided for rendering. + + + + Raises RenderDragDropMarker event. + + Event data. + + + + Draws the column header. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderColumnHeader method so events can occur. + + Information provided for rendering. + + + + Raises RenderDragDropMarker event. + + Event data. + + + + Draws node group line when in tile view. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderTileGroupLine method so events can occur. + + Information provided for rendering. + + + + Raises RenderNodeBackground event. + + Event arguments. + + + + Occurs when node background is being drawn. + + + + + Occurs when node expand part is being drawn. + + + + + Occurs when cell background is being drawn. + + + + + Occurs when cell check-box is being drawn. + + + + + Occurs when cell image is being drawn. + + + + + Occurs when cell text is being drawn. + + + + + Occurs when node selection marker is rendered. + + + + + Occurs when node hot-tracking marker is rendered. + + + + + Occurs when node connector is being drawn. + + + + + Occurs when tree background is rendered. + + + + + + Renders the Column Header. + + + + + Occurs when node group line is being rendered while control is in tile view. + + + + + Gets or sets the color table used by the renderer. + + + + + Gets or sets the color table used by the renderer. + + + + + Returns ElementStyleDisplayInfo class that provides information for ElementStyle rendering. + + Reference to style. + Reference to graphics object. + Style bounds + New instance of ElementStyleDisplayInfo + + + + Draws node background. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderNodeBackground method so events can occur. + + Information provided for rendering. + + + + Draws node expand part. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderNodeExpandPart method so events can occur. + + Information provided for rendering. + + + + Draws cell background. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderCellBackground method so events can occur. + + Information provided for rendering. + + + + Draws cell check box. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderCellCheckBox method so events can occur. + + Information provided for rendering. + + + + Draws cell image. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderCellImage method so events can occur. + + Information provided for rendering. + + + + Draws cell text. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderCellText method so events can occur. + + Information provided for rendering. + + + + Draws selection for SelectedNode. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderSelection method so events can occur. + + Information provided for rendering. + + + + Draws hot-tracking marker for mouse over node. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderHotTracking method so events can occur. + + Information provided for rendering. + + + + Draws connector between nodes. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderConnector method so events can occur. + + Information provided for rendering. + + + + Draws the tree background. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderTreeBackground method so events can occur. + + Information provided for rendering. + + + + Draws the drag & drop marker that indicates the insertion point for the node. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderDragDropMarker method so events can occur. + + Information provided for rendering. + + + + Draws the column header. If you need to provide custom rendering this is the method that you should override in your custom renderer. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderColumnHeader method so events can occur. + + Information provided for rendering. + + + + Draws node group line when in tile view. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderTileGroupLine method so events can occur. + + Information provided for rendering. + + + + Summary description for NodeTreeDisplay. + + + + Creates new instance of the class + Object to initialize class with. + + + + Paints the tree on canvas. + + + + + Defines the color table for tree selection. + + + + + Gets or sets the outer border for the selection. + + + + + Gets or sets the outer border corner radius. + + + + + Gets or sets the inner border for the selection. + + + + + Gets or sets the selection fill. + + + + + Gets or sets the selection text color. + + + + + Data form RenderSelection event. + + + + + Gets or sets reference to Graphics object, canvas node is rendered on. + + + + + Gets or sets the reference to selected Node object. + + + + + Gets or sets the selection bounds. + + + + + Gets or sets the node selection box style. + + + + + Gets or sets whether tree control is active, focused. + + + + + Provides data for tree background rendering events. + + + + + Gets or sets reference to Graphics object, canvas tree background is rendered on. + + + + + Gets or sets the reference to AdvTree control. + + + + + Creates new instance of the class and initializes it with default values. + + Reference to graphics object. + + + + Defines the Tree color table. + + + + + Gets or sets the color table used for the node selection display. + + + + + Gets or sets the color for node drag & drop marker. + + + + + Gets or sets the color of tree expand button type of rectangle. + + + + + Gets or sets the color of tree expand button type of Ellipse. + + + + + Gets or sets the color of tree expand button type of Triangle. + + + + + Gets or sets the color for tree grid lines. + + + + + Gets or sets the color of the column sort indicator which is rendered on columns when sorted. + + + + + Defines the color table for node expand button. + + + + + Gets or sets the border for the expand button which expands the node. + + + + + Gets or sets the expand button fill for button that expands the node. + + + + + Gets or sets the expand button foreground for button that expands the node. + + + + + Gets or sets the border for the expand button which expands the node. + + + + + Gets or sets the expand button fill for button that expands the node. + + + + + Gets or sets the expand button foreground for button that expands the node. + + + + + Gets or sets the border for the expand button which collapses the node. + + + + + Gets or sets the expand button fill for button that collapses the node. + + + + + Gets or sets the expand button foreground for button that expands the node. + + + + + Gets or sets the border for the expand button which collapses the node. + + + + + Gets or sets the expand button fill for button that collapses the node. + + + + + Gets or sets the expand button foreground for button that expands the node. + + + + + Defines the color table for tree selection. + + + + + Gets or sets the color table for FullRowSelect selection type. + + + + + Gets or sets the color table for FullRowSelect selection type when tree control is inactive. + + + + + Gets or sets the color table for HighlightCells selection type. + + + + + Gets or sets the color table for HighlightCells selection type when tree control is inactive. + + + + + Gets or sets the color table for NodeMarker selection type. + + + + + Gets or sets the color table for NodeMarker selection type when tree control is inactive. + + + + + Gets or sets the color table used for node hot-tracking. + + + + + Creates the pen for the border. + + Returns pen or null if pen cannot be created. + + + + Gets or sets the border width. Default value is 0. + + + + + Represents Collection for the ColorStop objects. + + + + Creates new instance of the class. + + + + Adds new object to the collection. + + Object to add. + Index of newly added object. + + + + Adds array of new objects to the collection. + + Array of object to add. + + + + Inserts new object into the collection. + + Position of the object. + Object to insert. + + + + Returns index of the object inside of the collection. + + Reference to the object. + Index of the object. + + + + Returns whether collection contains specified object. + + Object to look for. + true if object is part of the collection, otherwise false. + + + + Removes specified object from the collection. + + + + + + Copies collection into the specified array. + + Array to copy collection to. + Starting index. + + + + Copies contained items to the ColorStop array. + + Array to copy to. + + + + Creates ColorBlend object based on the members of the collection. ColorBlend object will be valid only if all members of the collection + represents relative/percentage based color blends. + + + + + + Adds the ColorStop objects from the collection. + + Collection to copy objects from + + + + Initializes the collection with the two color blend. + + Collection to initialize. + Start color. + End color. + + + + Returns reference to the object in collection based on it's index. + + + + + Defines single color blend point for the multicolor gradient fills. + + + + + Creates new instance of the class. When defining multicolor gradient blends and using the percentage positions the positions created + must start with 0f and end with 1f. + + + + + Creates new instance of the class and initialize it with default values. + + + + + Gets or sets Color to use in multicolor gradient blend at specified position. + + + + + Gets or sets the color position in multicolor gradient blend. Values less or equal to 1 are used as percentage specifing percentages of distance along the gradient line. + Values greater than 1 are used as absolute pixel values of distance along the gradient line. + + + + + Represents BackgroundColorBlend object converter. + + + + + Creates the brush for fill. + + Bounds for the brush + Returns brush or null if brush cannot be created for given bounds or colors are not set. It is responsibility of caller to Dispose the brush. + + + + Creates a pen based on fill parameters. + + Width of the pen to create + new instance of pen or null if pen cannot be created. + + + + Initializes a new instance of the GradientFill class. + + + + + Initializes a new instance of the GradientFill class. + + + + + + + Initializes a new instance of the GradientFill class. + + + + + + + + Initializes a new instance of the GradientFill class. + + + + + + Initializes a new instance of the GradientFill class. + + + + + + Creates the brush for fill. + + Bounds for the brush + Returns brush or null if brush cannot be created for given bounds or colors are not set. It is responsibility of caller to Dispose the brush. + + + + Gets whether property should be serialized. + + true if property should be serialized + + + + Sets the property to its default value. + + + + + Gets whether property should be serialized. + + true if property should be serialized + + + + Sets the property to its default value. + + + + + Creates a pen based on fill parameters. + + Width of the pen to create + new instance of pen or null if pen cannot be created. + + + + Gets or sets the starting gradient fill color. + + + + + Gets or sets the end gradient fill color. + + + + + Gets the collection that defines the multicolor gradient background. + + + Setting this property creates a multicolor gradient with one color at each position along the gradient line. Setting this property nullifies all previous color, position, and falloff settings for this gradient fill. + + + + + Gets or sets the gradient fill angle. Default value is 90. + + + + + Defines a visual shape. + + + + + Renders shape on canvas. + + Target graphics to render shape on. + Shape bounds. + + + + Gets or sets the single piece of content inside of the shape. + + + + + Gets or sets whether to clip the Content of this shape. Default value is false. + + + + + Renders rectangle on canvas. + + Target graphics to render shape on. + Shape bounds. + + + + Gets whether property should be serialized. + + + + + Resets the property to its default value. + + + + + Gets or sets shape border. + + + + + Gets or sets the shape fill. + + + + + Gets or sets the CornerRadius. + + + + + Initializes a new instance of the SolidBorder class. + + + + + + + Initializes a new instance of the SolidBorder class. + + + + + + Initializes a new instance of the SolidBorder class. + + + + + Creates the pen for the border. + + Returns pen or null if pen cannot be created. + + + + Gets whether property should be serialized. + + true if property should be serialized + + + + Sets the property to its default value. + + + + + Gets or sets the fill color. + + + + + Initializes a new instance of the SolidFill class. + + + + + + Initializes a new instance of the SolidFill class. + + + + + Creates the brush for fill. + + Bounds for the brush + Returns brush or null if brush cannot be created for given bounds or colors are not set. It is responsibility of caller to Dispose the brush. + + + + Gets whether property should be serialized. + + true if property should be serialized + + + + Sets the property to its default value. + + + + + Gets or sets the fill color. + + + + + Specifies layout of the items in AdvTree control. + + + + + Standard TreeView layout. + + + + + ListView style tile layout. + + + + Specifies the way background image is displayed on background. + + + Image is stretched to fill the background + + + Image is centered inside the background + + + Image is tiled inside the background + + + + Image is drawn in top left corner of container space. + + + + + Image is drawn in top right corner of container space. + + + + + Image is drawn in bottom left corner of container space. + + + + + Image is drawn in bottom right corner of container space. + + + + Indicates alignment of a part of the cell like image or check box in relation to the text. + + + + Part is aligned to the left center of the text assuming left-to-right + orientation. + + + + + Part is aligned to the right center of the text assuming left-to-right + orientation. + + + + + Part is aligned to the top left of the text assuming left-to-right + orientation. + + + + Part is aligned above the text and centered. + + + + Part is aligned to the top right of the text assuming left-to-right + orientation. + + + + + Part is aligned to the bottom left of the text assuming left-to-right + orientation. + + + + Part is aligned below the text and centered. + + + + Part is aligned to the bottom right of the text assuming left-to-right + orientation. + + + + + Part has default alignment that depends on the parent control view. + + + + + Specifies how to trim characters from a text that does not completely fit into a element's shape. + + + + + Specifies that the text is trimmed to the nearest character. + + + + + Specifies that the text is trimmed to the nearest character, and an ellipsis is inserted at the end of a trimmed line. + + + + + The center is removed from trimmed lines and replaced by an ellipsis. The algorithm keeps as much of the last slash-delimited segment of the line as possible. + + + + + Specifies that text is trimmed to the nearest word, and an ellipsis is inserted at the end of a trimmed line. + + + + + Specifies no trimming. + + + + + Specifies that text is trimmed to the nearest word. + + + + + Indicates absolute vertical alignment of the content. + + + + + Content is aligned to the top + + + + + Content is aligned in the middle + + + + + Content is aligned at the bottom + + + + + Indicates absolute horizontal alignment + + + + + Content is left aligned + + + + + Content is centered + + + + + Content is right aligned + + + + + Indicates prefered node layout position on Map tree layout when node is the child node of the top-level root node. + + + + + Node is positioned based on default algorithm. + + + + + Sub-root node and all nodes after it are positioned to the left of the root. + + + + + Sub-root node and all nodes before it are positioned to the right of the root. + + + + + Specifies the column header visibility for the node. + + + + + Column header is automatically shown/hidden based on the node's position in the tree. When + Node is first child node i.e. with index=0 the header will be shown, otherwise header will + be hidden. + + + + + Column header is always displayed regardless of node's position. + + + + + Column header is always hidden regardless of node's position. + + + + + Indicates the part of the node. + + + + + Bounds of complete node content except expand button. This also includes the child node bounds if node is expanded. + + + + + Bounds of the expand button which collapses/expands the node. + + + + + Hit test bounds of the expand button which collapses/expands the node used by mouse routines to trigger node expansion/collapse. + + + + + Bounds of all child nodes of give node. + + + + + Bounds for cells inside a node. + + + + + Complete node bounds including expand button. + + + + + Bounds of the command button. + + + + + Bounds of child node columns if node has columns defined. + + + + + Indicates the part of the cell. + + + + + Bounds of check box or Rectangle.Empty if there is no check-box. + + + + + Bounds of image inside the cell or Rectangle.Empty if there is no image. + + + + + Text bounds inside of cell. + + + + + Cell bounds + + + + + Indicates part of the node mouse is placed over. + + + + + Mouse is not over any node part. + + + + + Mouse is placed over the node. + + + + + Mouse is placed over node expand button. + + + + + Mouse is placed over the cell. + + + + + Mouse is placed over the command button. + + + + + Indicates the visibility of node expand part which allows user to expand/collaps node. + + + + + Default setting which indicates that when node has child nodes expand part is visible otherwise it is hidden. + + + + + Expand part is always visible regardless of whether child nodes are present or not. + + + + + Expand part is always hidden regardless of whether child nodes are present or not. + + + + + Specifies the action that raised a AdvTreeEventArgs event + + + + + The event was caused by a keystroke. + + + + + The event was caused by a mouse operation. + + + + + The event was caused by the Node collapsing. + + + + + The event was caused by the Node expanding. + + + + + The event is caused programmatically from user code. + + + + + Specifies node connector type. Node connector is the type of the line/connection that is drawn to connect child node to it's parent node. + + + + + Straight line connector type. + + + + + Specifies the layout type used to position the cells within the nodes. + + + + + Specifies that default setting is to be used for cell layout. Default is Horizontal. When set to default on the Node, setting from Tree control is used. + + + + Horizontal layout positions the cells horizontally next to each other. + + + + Vertical layout positions cell vertically on top of each other. + + + + + Specifies the layout type used to position the parts of the cell like image, checkbox and text. + + + + + Specifies that default setting is to be used for cell parts layout. Default is Horizontal. When set to default on the Cell, setting from Tree control is used. + + + + Horizontal layout positions the parts of the cell horizontally next to each other. + + + + Vertical layout positions parts of the cell vertically on top of each other. + + + + + Specifies the color scheme loaded by ColorScheme object. + + + + + Indicates Office 2003 like color scheme. + + + + + Indicates VS.NET 2005 like color scheme. + + + + + Indicates Office 2007 like color scheme. + + + + + Specifies the currently selected system color scheme if running on Windows XP. + + + + + Color scheme cannot be determined. + + + + + Blue color scheme. + + + + + Olive green color scheme. + + + + + Silver color scheme. + + + + + Specifies the flow of diagram layout related to the root node. + + + + + Nodes are positioned from left to right with root node being the left-most node. + + + + + Nodes are positioned from right to left with root node being the right-most + node. + + + + + Nodes are positioned from top to bottom with root node being the top node. + + + + + Nodes are positioned from bottom to top with root node being bottom node. + + + + + Specifies the flow of the map layout. + + + + + Nodes are arranged around the root node. + + + + + Nodes are arranged from below the root node. + + + + + Nodes are arranged above the root node. + + + + + Nodes are arranged to the right of the root node. + + + + + Nodes are arranged to the left of the root node. + + + + + Specifies the type of the expand button. + + + + + Indicates elliptical expand button. + + + + + Indicates rectangular expand button. + + + + + Indicates that images are used for expand button. + + + + + Indicates the Windows Vista style expand button. + + + + + Specifies the visual style for the tree control. + + + + + Indicates default visual style. + + + + + Specifies the layout type for the nodes. + + + + + Nodes are arranged around root node in map format. + + + + + Nodes are arranged from left-to-right in diagram format. + + + + + Specifies renderer type used to render nodes. + + + + + Specifies default renderer which allows most customization through AdvTree + properties. Default renderer integrates with the Style architecture to provide + customization on renderer behavior. + + + + + Specifies that custom renderer is used. When set you must also set NodeRenderer + to renderer you want to use. + + + + + Specifies the node selection style. + + + + + Node selector highlights the complete node row when node is selected. + + + + + Node selector draws the rectangle that highlights the node content. Appearance similar to system tree view in Windows Vista. + + + + + Node selector draws hollow selection rectangle around the node. + + + + + Specifies the rule for multi-node selection. + + + + + Allows multiple selection of nodes with same parent node only. + + + + + Allows multiple selection of any node. + + + + + Gets or sets the image alignment inside of column header. + + + + + Image is left aligned. + + + + + Image is right aligned. + + + + + Specifies the editor type used when cell is edited. + + + + + Indicates default, text based editor. + + + + + Indicates that Integer numeric editor will be used for editing the value of the cell or column. + + + + + Indicates that Double numeric editor will be used for editing the value of the cell or column. + + + + + Indicates that Currency numeric editor will be used for editing the value of the cell or column. + + + + + Indicates that date editor will be used for editing the value of the cell or column. + + + + + Indicates that time editor will be used for editing the value of the cell or column. + + + + + Indicates that date and time editor will be used for editing the value of the cell or column. + + + + + Indicates that cell will use custom editor that you provide by handling AdvTree.ProvideCustomCellEditor event. + + + + + Specifies the sort direction for the column header. + + + + + No sort is specified. + + + + + Ascending sorting is in effect, i.e. A-Z + + + + + Descending sorting is in effect, i.e. Z-A + + + + + Defines the delegate for AdvTree cell based action events. + + + + + Defines the delegate for AdvTree cell based action events. + + + + + Defines the delegate for AdvTree node based action events that can be cancelled. + + + + + Defines the delegate for AdvTree node based action events. + + + + + Defines delegate for Command button events. + + + + + Defines delegate for label editing events. + + + + + Defines the delegate for AdvTree node based action events. + + + + + Defines the delegate for BeforeNodeDrop and AfterNodeDrop events + + + + + Defines the delegate for NodeDragFeedback event. + + + + + Defines the delegate for mouse based node events + + + + + Defines delegate for node rendering events. + + + + + Defines delegate for cell rendering events. + + + + + Defines delegate for RenderExpandPart event. + + + + + Defines delegate for RenderExpandPart event. + + + + + Defines delegate for RenderConnector event. + + + + + Defines delegate for TreeBackgroundRenderer events. + + + + + Defines delegate for RenderDragDropMarker event. + + + + + Defines delegate for RenderColumnHeader event. + + + + + Provides data for the ProvideCustomCellEditor event. + + + + + Gets or sets the cell editor. You must set this property in your event handler to the custom + editor to be used for cell editing. + + + + + Gets the cell editor will be used for. + + + + + Initializes a new instance of the CustomCellEditorEventArgs class. + + + + + + Defines delegate for ProvideCustomCellEditor event. + + + + + Provides more information about MarkupLinkClick event. + + + + + Gets the value of href attribute from the markup link that was clicked. + + + + + Gets the value of name attribute from the markup link that was clicked. + + + + + Creates new instance of the object. + + Value of name attribute. + Value of href attribute. + + + + Defines delegate for MarkupLinkClick event. + + + + + Represents arguments for SerializeNode event which allows you to add custom serialization data to definitions saved by control. + + + + + Gets reference to the node being serialized or de-serialized. + + + + + Gets reference to instance of XmlElement that item is serialized to or is being de-serialized from. You should not change any data directly on this element. + + + + + Gets the reference to XmlElement that you can serialize to or de-serialize any custom data from. You can add child elements or set the attributes on + this XmlElement when handling SerializeItem event. When handling DeserializeItem event you can load your data from this element. + + + + + Defines delegate for SerializeItem event. + + + + + Represents the table header. + + + + + Default constructor. + + + + + Gets the reference to the collection that contains the columns associated with header. + + + + + Gets or sets the name associated with this header definition. + + + + + Represents collection for HeaderDefinition objects. + + + + + Sets the node collection belongs to. + + HeaderDefinition that is parent of this collection. + + + + Adds new object to the collection. + + Object to add. + Index of newly added object. + + + + Inserts new object into the collection. + + Position of the object. + Object to insert. + + + + Returns index of the object inside of the collection. + + Reference to the object. + Index of the object. + + + + Returns whether collection contains specified object. + + Object to look for. + true if object is part of the collection, otherwise false. + + + + Removes specified object from the collection. + + + + + + Copies collection into the specified array. + + Array to copy collection to. + Starting index. + + + + Copies contained items to the HeaderDefinition array. + + Array to copy to. + + + + Gets or sets the node this collection is associated with. + + + + + Returns reference to the object in collection based on it's index. + + + + + Provides WinApi functions to rest of the application. + + + + + Resets Hoover timer for specified control. + + + + + Provides AdvTree Keyboard handling. + + + + + Represents class for Node's cell layout. + + + + + Offset cell bounds, check box bounds, image bounds and text bounds by specified offset. + + Cell to offset. + Horizontal offset in pixels. + Vertical offset in pixels. + + + + Returns spacing between check box and image if both are displayed + + + + + Returns spacing between image or checkbox and text + + + + + Returns vertical spacing between cells in a node + + + + + Spacing between different parts of the cell, like image, option button, text and expand button area + + + + + Initializes a new instance of the CellTileLayout class. + + + + + Class that is used to layout column header. + + + + + Gets or sets the vertical spacing between nodes in pixels. + + + + + Gets or sets the horizontal spacing between nodes in pixels. + + + + + Returns horizontal spacing between cells in a node + + + + + Returns width of the expand button area. Default is 24 pixels. + + + + + Gets or sets the size of the expand part that is expanding/collapsing the node. Default value is 8,8. + + + + + Gets or sets width of command button area. Default is 8 pixels. + + + + + Summary description for NodeLayout. + + + + + Performs layout of the nodes inside of the tree control. + + + + + Performs layout for single unassigned node. Node does not have to be part of the tree control. + + Node to perform layout on. + + + + Resizes all styles and prepares them for layout. + + + + + Returns default top-level columns for tree control. + + Returns array list of ColumnInfo objects. + + + + Returns column information for a given node. + + Node to return column information for + Returns array list of ColumnInfo objects or null if there are no columns defined. + + + + Returns column header collection for the given column template name. + + Name of the column template. + Column header collection or null if template name cannot be found. + + + + Sets the position and size of the node command button. + + Node layout context information + + + + Determines the rectangle of the +/- part of the tree node that is used to expand node. + + Node layout context information + + + + Returns the size of the node expand part. + + Size of the expand part, default 8,8. + + + + Provides the layout for single node. + + Layout information. + + + + Returns true if given node has expand part. + + Layout context information. + + + + + Returns whether given node has command part. + + Layout context information. + True if command part should be drawn otherwise false. + + + + Returns class responsible for cell layout. + + Cell layout class. + + + + Offsets node location and location of it's child nodes bounds. + + Node to offset. + Horizontal offset. + Vertical offset. + + + + Gets or sets layout settings. + + + + + Gets or sets the child node indent in pixels. + + + + + Returns true if root node should have expanded part + + + + + Returns true if expand part space should be accounted for even if they expand part is not visible or need to be displayed. Default value is false. + + + + + Initializes a new instance of the NodeColumnInfo structure. + + + + + + + Gets or sets the list of column info object for the columns. + + + + + Gets or sets whether columns have auto-size column. + + + + + Used to pass node contextual information used for layout of the node. + + + + + Performs ListView Tile style layout. + + + + + Returns default top-level columns for tree control. + + Returns array list of ColumnInfo objects. + + + + Gets whether the expand part of the node +/- is aligned to the left of the node in left-to-right layout. + + Node to get expand part alignment for + true if node expand part is aligned to the left in left-to-right layout. + + + + Returns column information for a given node. + + Node to return column information for + Returns array list of ColumnInfo objects or null if there are no columns defined. + + + + Returns true if given node has expand part. + + Layout context information. + + + + + Returns class responsible for cell layout. + + Cell layout class. + + + + Returns true if expand part space should be accounted for even if they expand part is not visible or need to be displayed. Default value is false. + + + + + Gets or sets whether parent/child node relationship is displayed as groups. + + + + + Performs classic TreeView layout. + + + + + Gets whether the expand part of the node +/- is aligned to the left of the node in left-to-right layout. + + Node to get expand part alignment for + true if node expand part is aligned to the left in left-to-right layout. + + + + Returns true if expand part space should be accounted for even if they expand part is not visible or need to be displayed. Default value is false. + + + + + Represents the Node in Tree control. + + + + Default Constructor. + + + + Creates node and initializes its text. + + + + + Creates node and initializes its text and Style property. + + + + + Sets the bounds of the node. + + New location and size of the node. + + + + Sets the content bounds of the node. Content bound is bound for the the cells inside the node + and it excludes the expand rectangle. Bounds also include the node style padding and + reflect node margin. + + New location and size of the node. + + + + Sets cell bounds. + + New cells bounds. + + + + Sets node parent. + + Parent node object. + + + + Called when Parent of the node has changed. + + + + + Sets the bounds of the expand part. + + New part bounds. + + + + Sets the Checked or CheckState properties. + + New value for checked state. + Action source. + + + + Sets the Checked or CheckState properties. + + New value for checked state. + Action source. + + + + Sets whether node is in edit mode or not. + + True indicating that node is in edit mode false otherwise. + + + + Sets selected cell and provides information on the action that caused the selection change. + + New selected cell. + Action source. + + + + Resets image to its default value. Windows Forms designer support. + + + + + Resets image to its default value. Windows Forms designer support. + + + + + Resets ImageMouseOver to its default value. Windows Forms designer support. + + + + + Resets ImageExpanded to its default value. Windows Forms designer support. + + + + + Called after node has been deselected. + + Provides information on how selection was performed + + + + Called after node has been selected. + + Provides information on how selection was performed + + + + Returns cell within a node which contains specified coordinates. + + + + Cell which contains specified coordinates or null/nothing if no cell contains coordinates. + + + + Invalidates the layout for this node and causes the layout to be performed on next layout request. + + + + + Invalidates the layout for this node and causes the layout to be performed on next layout request. + + Indicates whether to invalidate layout for all child nodes as well. + + + + Invalidates node and causes a paint message to be sent to the tree. + + + + Initiates the editing of node text. + + This method by default edits text stored in Node.Text. Call to this method is + same as calling the overload method BeginData(0) with zero as parameter. Use BeginData + overload method to begin editing the specific column for multi-column nodes. + + + + Initiates the editing of node text. + + The initial text to be entered into the edit TextBox. Specify null to use existing text. + + + + Initiates text editing of certain Node column. + + Zero based index of a column to begin editing for. Column 0 always corresponds to + Node.Text property. + + + + Initiates text editing of certain Node column. + + Zero based index of a column to begin editing for. Column 0 always corresponds to + Node.Text property. + + + The initial text to be entered into the edit TextBox. Specify null to edit existing text. + + + + + Creates new instance of the node for the Copy() and DeepCopy() methods. Allows you to returns your own node type copy if you inherit from node to add custom properties. + + New instance of a node. + + + Makes a "shallow" copy of a Node. + + Shallow copy of a Node is a exact copy of Node but without copy + of all child nodes in Nodes collection. + + + + + Copies this node properties to a node. + + Node top copy properties to. + + + Makes a "deep" copy of a node. + + Deep copy of Node is a exact copy of Node including exact copies of all child nodes + in this node's Nodes collection. + + + + + Collapses the tree node. + + + + + Collapses the tree node. + + Action that caused the event + + + + Collapses all the child tree nodes. + + + + + Ends the editing of the node text or column. + + true if the editing of the tree node label text was canceled without being saved; otherwise, false. + + + + Ensures that the node is visible, expanding nodes and scrolling the control as necessary. + + + + + Ensures that the node is visible, expanding nodes and scrolling the control as necessary. + + Indicates the position within a tree visible area node is scrolled to + + + + Expands the node. + + + The Expand method expands the current Node down to the next level of nodes. + The state of a Node is persisted. For example, if the next level of child nodes was not collapsed previously, when the Expand method is called, the child nodes appear in their previously expanded state. + + + + + Expands the node. + + + The Expand method expands the current Node down to the next level of nodes. + The state of a Node is persisted. For example, if the next level of child nodes was not collapsed previously, when the Expand method is called, the child nodes appear in their previously expanded state. + + Action that caused the event. + + + + Expands all the child tree nodes. + + + + + Expands all the child tree nodes. + + + + + Removes the current node from the control. + + + When the Remove method is called, the node and any child nodes assigned to the Node are removed from the Tree. The removed child nodes are removed from the Tree, but are still attached to this node. + + + + + Removes the current node from the control and provides information about source of action + + + When the Remove method is called, the node and any child nodes assigned to the Node are removed from the Tree. The removed child nodes are removed from the Tree, but are still attached to this node. + + + + + Toggles the node to either the expanded or collapsed state. + + + + + Toggles the node to either the expanded or collapsed state. + + Action that caused the event. + + + Returns string representation of the Node. + + + + Called after new cell has been added to Cells collection. + + Reference to the new cell added. + + + + Called after cell has been removed from Cells collection. + + Reference to the removed cell. + + + + Occurs when property on the node has changed that influences the size of the node. + + + + + Occurs when any image property for the cell has changed. + + + + + Occurs when size of the child nodes has changed. + + + + + Called before Expanded state of the node has changed. + + New Expand State + Action Source + + + + Called when visual part of the node has changed due to the changes of its properties or properties of the cells contained by node. + + + + + Called after new node has been added to Nodes collection. + + Reference to the new node. + + + + Called after node has been removed from Nodes collection. + + Reference to the node that is removed. + + + + Creates new cells based on the columns defined on either parent node or the columns in tree control. Node + must be parented so it can get reference to a parent tree control. + + + + + Raises the Click event on node and parent tree if available. + + + + + Provides implementation for IComparable interface. This is used for sorting and it compares the Text property on nodes. + + + + + + + Occurs when the mouse pointer is over the node and a mouse button is pressed. + + + + + Occurs when the mouse pointer is over the node and a mouse button is released. + + + + + Occurs when the mouse pointer is moved over the node. + + + + + Occurs when the mouse enters the node. + + + + + Occurs when the mouse leaves the node. + + + + + Occurs when the mouse hovers over the node. + + + + + Occurs when the node is clicked with left mouse button. If you need to know more information like if another mouse button is clicked etc. use + NodeMouseDown event. + + + + + Occurs when the node is double-clicked. + + + + + Occurs when hyperlink in text-markup is clicked. + + + + + Gets whether node has child nodes. + + + + + Gets or sets the context menu assigned to this node. Standard Context Menus, VS.NET 2005 Context Menus and DotNetBar Suite context menus are supported. + Default value is null (Nothing) which indicates that no context menu is assigned. + + + + + Gets whether any of the cells inside the node has HostedControl property set. + + + + + Gets or sets custom node renderer. You can set this property to your custom renderer. When set the RenderMode should be set to custom to enable + your custom renderer. To choose one of the system renderer use RenderMode property. Default value is null. + + + + + Gets or sets the render mode used to render the node. Default value is eNodeRenderMode.Default which indicates that system default renderer is used. + Note that if you specify custom renderer you need to set either AdvTree.NodeRenderer or Node.NodeRenderer property. + + + + + Gets or sets whether node is expanded. Expanded node shows it's child nodes. + + + + + Returns name of the node that can be used to identify it from the code. + + + + + Gets or sets whether node can be dragged and dropped. Default value is true. + + + + + Gets or sets visibility of the expand button. Default value is Auto meaning that + expand button is displayed only if node has at least one child node. + + + You can use this property for example to dynamically load the child nodes when user + tries to expand the node. You could for example handle BeforeExpand event to load child + nodes into the node. + + + + + Gets or sets whether any operation on the node has been performed that would affect node's size. Size changed flag + internally indicates that node's size needs to be recalculated because it has changed + due to the changes in data. + + + + + Gets the relative bounds of the tree node including the expand part of the node. + + + + + Gets the absolute bounds of the tree node including the expand part of the node. + + + + + Gets the node content bounds. + + + + + Gets the bounds for all the cells inside the node. The bounds do not include the expand part. + + + + + Gets the bounds for all the cells inside the node. The bounds do not include the expand part. + + + + + Gets or sets the bounds of child nodes. + + + + + Gets the expand part rectangle. Expand part is used to expand/collapse node. + + + + + Gets the expand part rectangle. Expand part is used to expand/collapse node. + + + + + Indicates vertical alignment within the node bounds of expand part of the node, if one is visible. + + + + + Gets or sets the Command part bounds if command part is visible. + + + + + Gets or sets a value indicating whether the tree node is in a checked state. + + + + + Gets or sets the checkbox alignment in relation to the text displayed by first default cell. + + + + + Gets or sets whether check box is visible inside the cell. + + + + + Gets or sets the appearance style of the item. Default value is CheckBox. Item can also assume the style of radio-button. + + + + + Gets or sets a value indicating whether the CheckBox will allow three check states rather than two. If the ThreeState property is set to true + CheckState property should be used instead of Checked property to set the extended state of the control. + + + + + Specifies the state of a control, such as a check box, that can be checked, unchecked, or set to an indeterminate state. + + + + + Gets or sets whether first cell content is editable when cell editing is enabled on tree control. Default value is true. + + + + + Gets the path from the root tree node to the current tree node. The path consists of the labels of all the tree nodes that must be navigated to get to this tree node, starting at the root tree node. The node labels are separated by the delimiter character specified in the PathSeparator property of the Tree control that contains this node. + + + + + Gets the zero based index of position of the tree node in the tree node collection. -1 is returned if node is not parented. If node is root node + the index of node in AdvTree.Nodes collection is returned. + + + + + Gets a value indicating whether the tree node is in an editable state. true if the tree node is in editable state; otherwise, false. + + + + + Gets whether left mouse button is pressed on any cell contained by this node. + + + + + Gets whether mouse cursor is over on any cell contained by this node. + + + + + Gets a value indicating whether the tree node is in the selected state. true if the tree node is in the selected state; otherwise, false. + + + + + Gets or sets whether node can be selected by user by clicking it with the mouse or using keyboard. Default value is true. + + + + + Gets whether node can be selected. Node must be Visible, Enabled and Selectable in order for it to be selected. + + + + + Gets or sets a cell that is in selected state otherwise it returns null. + + + + + Gets a value indicating whether the tree node is visible. Node is considered to be visible when it's Visible property is set to true and path to the node is available i.e. all parent nodes are expanded. + + + + + Returns whether node is displayed on the screen and visible to the user. When node is outside of the viewable area this property will return false. It will also return false if node is not visible. + + + + + Gets the last child tree node. The LastNode is the last child Node in the NodeCollection stored in the Nodes property of the current tree node. If the Node has no child tree node, the LastNode property returns a null reference (Nothing in Visual Basic). + + + + + Gets the next sibling tree node. The NextNode is the next sibling Node in the NodeCollection stored in the Nodes property of the tree node's parent Node. If there is no next tree node, the NextNode property returns a null reference (Nothing in Visual Basic). + + + + + Gets the next visible tree node. The NextVisibleNode can be a child, sibling, or a tree node from another branch. If there is no next tree node, the NextVisibleNode property returns a null reference (Nothing in Visual Basic). + + + + + Gets the zero-based depth of the tree node in the tree control. The root node is considered the first level of nesting and returns 0. + + + + + Gets the collection of Node objects assigned to the current tree node. The Nodes property can hold a collection of other Node objects. Each of the tree node in the collection has a Nodes property that can contain its own NodeCollection. Nesting of tree nodes can make it difficult to navigate a tree structure. The FullPath property makes it easier to determine your location in a tree. + + + + + Gets whether there is at least one child node that has its Visible property set to true. + + + + + Gets the parent tree node of the current tree node. If the tree node is at the root level, the Parent property returns a null reference (Nothing in Visual Basic). + + + + + Gets the previous sibling tree node. The PrevNode is the previous sibling Node in the NodeCollection stored in the Nodes property of the tree node's parent Node. If there is no previous tree node, the PrevNode property returns a null reference (Nothing in Visual Basic). + + + + + Gets the previous visible tree node. The PrevVisibleNode can be a child, sibling, or a tree node from another branch. If there is no previous tree node, the PrevVisibleNode property returns a null reference (Nothing in Visual Basic). + + + + + Gets or sets the object that contains data about the tree node. Any Object derived type can be assigned to this property. If this property is being set through the Windows Forms designer, only text can be assigned. + + + + + Gets or sets the object that contains data about the tree node. Any Object derived type can be assigned to this property. If this property is being set through the Windows Forms designer, only text can be assigned. + + + + + Gets or sets the Binding index in CurrencyManager list if node is bound. You should not change this value directly since + it is used internally by the control for data binding scenarios. + + + + + Gets or sets the object that contains additional data about the tree node. Any Object derived type can be assigned to this property. If this property is being set through the Windows Forms designer, only text can be assigned. + This property has same function as Tag property and provides you with additional separate storage of data. + + + + + Gets or sets the object that contains additional data about the tree node. Any Object derived type can be assigned to this property. If this property is being set through the Windows Forms designer, only text can be assigned. + This property has same function as Tag property and provides you with additional separate storage of data. + + + + + Gets or sets the format that is applied to the value of Text property for display purposes (applies to first cell in a node, i.e. Cells[0]). See "Formatting Overview" in MSDN + for description on available format strings. For example you can specify "C" to format text as currency, or "D" to format text as decimal number etc. + + + + + + Gets or sets the text displayed in the tree node. + + + + + Gets or sets the control hosted inside of the first node cell. + + + When control is hosted inside of the cell, cell size is determined by the + size of the control hosted inside of it. The cell will not display its text but it will display any image assigned + or check box when control is hosted inside of it. The Style settings like Margin + and Padding will still apply. + + + + + Gets or sets the item hosted inside of the first cell. Only items that do not generate + popups are supported. Note that cell can only host either HostedItem or HostedControl but not both. + + + + + Gets the parent tree control that the tree node is assigned to. + + + + + Gets or sets the layout of the cells inside the node. Default value is Horizontal layout which + means that cell are positioned horizontally next to each other. + + + + + Gets or sets the cell alignment when CellLayout=Vertical. Default value is center which means that cells are center aligned. + + + + + Gets or sets the layout of the cell parts like check box, image and text. Layout can be horizontal (default) + where parts of the cell are positioned next to each other horizontally, or vertical where + parts of the cell are positioned on top of each other vertically. + Alignment of the each part is controlled by alignment properties. This property affects only the first cell inside of the node. + Use Cell.Layout property to change the part layout on each cell contained by node. + + + + + Gets/Sets informational text (tooltip) for the cell. + + + + + Gets the collection of all Cells assigned to this node. There should be always at least one cell in a node which is default cell. Default + collection contains a single cell. + + + + + Gets or sets whether column header for child nodes if defined is visible. Default value is true. + + + + + Gets whether node has child nodes columns defined. + + + + + Get collection of child node columns. + + + + Gets or sets the style of the cells when node is expanded. + + Reference to the style assigned to the node/cell or null value indicating that + default style setting from tree control is applied. Default value is null. + + + When node is expanded the style specified here will be used on all cells + associated with this node instead of the + Cell.StyleNormal. That way you can give + different appearance to your node's cells when node is expanded. + When property is set to null value the style setting from parent tree + controls is used. NodeStyleExpanded on + AdvTree control is a root style for a cell. + + + + + Gets or sets the expanded style name used by node. This member is provided for internal use only. To set or get the style use StyleExpanded property instead. + + + + + Gets or sets the style used when Node is selected. Default value is NULL (VB + Nothing) + + + + + Gets or sets the selected style name used by node. This member is provided for internal use only. To set or get the style use StyleSelected property instead. + + + + + Gets or sets the style used when mouse is over the Node. Default value is NULL + (VB Nothing) + + + + + Gets or sets the mouse over style name used by node. This member is provided for internal use only. To set or get the style use StyleMouseOver property instead. + + + + + Gets or sets the node style. + + + Reference to the style assigned to the node or null value indicating that default + style setting from tree control is applied. Default value is null. + + + Style specified by this property will be used as default style for the node. + Each cell within the node can also specify it's own style. Since node contains the + cells using this style property can you for example create a border around all cell + contained by the node. + When this property is set to null value (default value) NodeStyle + property on AdvTree control is used. + + + + + Gets or sets the style name used by node. This member is provided for internal use only. To set or get the style use Style property instead. + + + + + Gets or sets the part of the node mouse is over. + + + + + Gets or sets the node horizontal offset from the position determined by the layout manager. + + + + + Gets or sets the image alignment in relation to the text displayed by cell. This property affects only first default cell inside the node. + Property with same name is available on each cell and you can use it to affect each cell individually. + + + + + Gets or sets whether node is enabled. Default value is true. Setting this value to false will set Enabled=false on all child cells. + + + + + Gets or sets the image displayed when the tree node is disabled. If image is not specified control will create + gray-scale disabled image automatically. + + + Image specified will be used as image when node is disabled. + + + + + Gets or sets the image-list index value of the disabled image. + + + + + Gets or sets the image displayed when the tree node is in the unselected state. + + + Image specified will be used as a default image for any other node state where + different image is not specified. + + + + + Gets or sets the image-list key value of the default image that is displayed by the tree nodes. + + + + + Gets or sets the image-list index value of the default image that is displayed by the tree nodes. + + + + + Gets or sets the image displayed when mouse is over the tree node. + + + + + Gets or sets the image-list index value of the image that is displayed by the tree nodes when mouse is over the node. + + + + + Gets or sets the image-list key value of the image that is displayed by the tree nodes when mouse is over the node. + + + + + Gets or sets the image displayed when node is expanded. + + + + + Gets or sets the image-list index value of the image that is displayed by the tree nodes when node is expanded. + + + + + Gets or sets the image-list key value of the image that is displayed by the tree nodes when node is expanded. + + + + + Property Editor support for ImageIndex selection + + + + + Gets or sets the NodeConnector object that describes the type of the connector used for + displaying connection between current node and its parent node. + Default value is null which means that settings from AdvTree control are used. + + RootConnector Property (DevComponents.AdvTree.AdvTree) + NodesConnector Property (DevComponents.AdvTree.AdvTree) + + + + Gets or sets whether node is visible. + + + + + Gets or sets whether command button is visible. Default value is false. + Command button can be used to display for example popup menu with commands for node, + or to display the list of linked nodes. + + + + + Gets or sets internal value that indicates that node is on "path" of the selected node. + + + + + + Gets or sets whether node selection is visible in UI when node is selected. Default value is true. You can + set this value to false to temporary disable the display of selection for a node. + + + + + Gets or sets the additional indent for the child nodes that is added to the AdvTree.Indent value when performing child node layout. Default value i 0. + + + + + Gets or sets whether Left/Right navigation through the cells when SingleCellSelection on tree is set is enabled. Default value is true. + + + + + Gets or sets whether style background that is applied to the node is drawn across the width of the tree control instead of only + behind the node content. Default value is false. + + + + + Gets or sets the child column header height. + + + + + Gets the AccessibleObject assigned to the item. + + + + + Gets or sets the default action description of the control for use by accessibility client applications. + + + + + Gets or sets the description of the control used by accessibility client applications. + + + + + Gets or sets the name of the control used by accessibility client applications. + + + + + Gets or sets the accessible role of the item. + + + + + Gets or sets a value indicating whether the node is visible to accessibility applications. + + + + + Represents collection for Node objects. + + + + + Sets the node collection belongs to. + + Node that is parent of this collection. + + + + Adds new object to the collection. + + Object to add. + Index of newly added object. + + + + Adds new object to the collection and provides information about the source of the command + + Node to add + Source action + + + + + Adds an array of objects to the collection. + + Array of Node objects. + + + + Inserts new object into the collection. + + Position of the object. + Object to insert. + + + + Inserts new object into the collection. + + Position of the object. + Object to insert. + Action that is causing the event + + + + Returns index of the object inside of the collection. + + Reference to the object. + Index of the object. + + + + Returns whether collection contains specified object. + + Object to look for. + true if object is part of the collection, otherwise false. + + + + Removes specified object from the collection. + + + + + + Removes specified object from the collection and provides information about source of the command + + Node to remove + Source action + + + + Copies collection into the specified array. + + Array to copy collection to. + Starting index. + + + + Copies contained items to the Node array. + + Array to copy to. + + + + Sorts the elements in the entire collection using the IComparable implementation of each element. + + + + + Sorts the elements in the entire collection using the specified comparer. + + The IComparer implementation to use when comparing elements.-or- null to use the IComparable implementation of each element. + + + + Sorts the elements in a range of elements in collection using the specified comparer. + + + + + + + + Finds the tree nodes with specified key, optionally searching sub-nodes. + + The name of the tree node to search for. + true to search child nodes of tree nodes; otherwise, false. + An array of Node objects whose Name property matches the specified key. + + + + Gets or sets the node this collection is associated with. + + + + + Returns reference to the object in collection based on it's index. + + + + + Creates new instance of NodeComparer class. You can use NodeComparer to sort the nodes by specific column/cell by calling + NodeCollection.Sort method and pass new instance of NodeComparer class. + + + + + Creates new instance of NodeComparer class. You can use NodeComparer to sort the nodes by specific column/cell by calling + NodeCollection.Sort method and pass new instance of NodeComparer class. + + Column/Cell index to use for sorting. + + + + Gets or sets the Column/Cell index that is used for sorting. + + + + + Reverse sort nodes. + + + + + Creates new instance of NodeComparer class. You can use NodeComparer to sort the nodes by specific column/cell by calling + NodeCollection.Sort method and pass new instance of NodeComparer class. + + Column/Cell index to use for sorting. + + + + Sort by flat node index. + + + + + Creates new instance of NodeComparer class. You can use NodeComparer to sort the nodes by specific column/cell by calling + NodeCollection.Sort method and pass new instance of NodeComparer class. + + + + + Represents node connector. Node connector is the line that is drawn to indicate connection between child and parent node. + + + + + Default Constructor. + + + + + Creates new instance of the object with specified parameters. + + Connector line width. + Connector type. + + + + Returns true if editor should serialize LineColor property. + + + + + Occurs when appearance of the connector has changed as result of changed settings on the connector. + + + + + Gets or sets the connector line width. + + + + + Gets or sets the color of the connector line. + + + + + Gets or sets the type of the connector. + + + See eNodeConnectorType enum for list of + available connectors. + + eNodeConnectorType Enumeration + + + + Gets or sets the DashStyle for the connector line. Default value is DashStyle.Dot. + + + + + Represents node operations. + + + + + Returns full path to the given node. + + Node to return path to. + Full path to the node. + + + + Gets the last child tree node. The LastNode is the last child Node in the NodeCollection stored in the Nodes property of the current tree node. If the Node has no child tree node, the LastNode property returns a null reference (Nothing in Visual Basic). + + Reference node. + Last node if found or null if there is no last node. + + + + Returns last rendered node on screen. + + Tree control. + Last rendered node or null + + + + Returns first rendered node on screen. + + Tree control. + Last rendered node or null + + + + Gets first visible node. + + Reference to tree. + Last visible node found or null + + + + Gets last visible node in tree control. + + Reference to tree. + Last visible node found or null + + + + Gets last visible top-level node in tree control. + + Reference to tree. + Last visible node found or null + + + + Gets the next sibling tree node. The NextNode is the next sibling Node in the NodeCollection stored in the Nodes property of the tree node's parent Node. If there is no next tree node, the NextNode property returns a null reference (Nothing in Visual Basic). + + Reference node. + Node object or null if node cannot be found. + + + + Returns next visible sibling tree node. + + Reference node + Node object or null if next visible node cannot be found + + + + Gets the next visible tree node. The NextVisibleNode can be a child, sibling, or a tree node from another branch. If there is no next tree node, the NextVisibleNode property returns a null reference (Nothing in Visual Basic). + + Reference node. + Node object or null if node cannot be found. + + + + Gets the next visible tree node. The NextVisibleNode can be a child, sibling, or a tree node from another branch. If there is no next tree node, the NextVisibleNode property returns a null reference (Nothing in Visual Basic). + + Reference node. + Node object or null if node cannot be found. + + + + Gets a value indicating whether the tree node is visible. Node is considered to be visible when it's Visible property is set to true and path to the node is available i.e. all parent nodes are expanded. + + + + + + + Returns whether node is displayed on the screen and visible to the user. When node is outside of the viewable area this property will return false. It will also return false if node is not visible. + + + + + + + Gets the zero based index of position of the tree node in the tree node collection. -1 is returned if node is not added to the nodes collection. + + Reference node. + Zero based index or -1 if node is not in collection. + + + + Gets the previous sibling tree node. The PrevNode is the previous sibling Node in the NodeCollection stored in the Nodes property of the tree node's parent Node. If there is no previous tree node, the PrevNode property returns a null reference (Nothing in Visual Basic). + + Reference node. + Node object or null if node cannot be found. + + + + Gets the previous visible tree node. The PrevVisibleNode can be a child, sibling, or a tree node from another branch. If there is no previous tree node, the PrevVisibleNode property returns a null reference (Nothing in Visual Basic). + + Reference node. + Node object or null if node cannot be found. + + + + Gets the previous tree node. The Previous Node can be a child, sibling, or a tree node from another branch. If there is no previous tree node, the PrevNode property returns a null reference (Nothing in Visual Basic). + + Reference node. + Node object or null if node cannot be found. + + + + Returns true if node passed is considered root node for display purposes. + + Reference to the tree control. + Node to test. + true if node is root node for display purposes otherwise false. + + + + Ensures that the cell is visible, expanding nodes and scrolling the control as necessary. + + Cell to be made visible. + + + + Ensures that the node is visible, expanding nodes and scrolling the control as necessary. + + Node to be made visible. + + + + Ensures that the node is visible, expanding nodes and scrolling the control as necessary. + + Node to be made visible. + + + + Returns number of visible child nodes for given node. + + Reference node. + Number of visible child nodes. + + + + Returns true if node has at least single visible child node. + + Reference node. + True if at least single child node is visible otherwise false. + + + + Retrieves the tree node that is at the specified location. + + The Node at the specified point, in tree view coordinates. + + You can pass the MouseEventArgs.X and MouseEventArgs.Y coordinates of the + MouseDown event as the x and y parameters. + + The Point to evaluate and retrieve the node from. + Tree control to find node at. + + + + Retrieves the tree node that is at the specified location. + + The TreeNode at the specified location, in tree view coordinates. + + You can pass the MouseEventArgs.X and MouseEventArgs.Y coordinates of the + MouseDown event as the x and y parameters. + + The X position to evaluate and retrieve the node from. + The Y position to evaluate and retrieve the node from. + Tree control to find node at. + + + + Retrieves the tree node that is at the specified location. + + The TreeNode at the specified location, in tree view coordinates. + + You can pass the MouseEventArgs.X and MouseEventArgs.Y coordinates of the + MouseDown event as the x and y parameters. + + Tree control to find node at. + The X position to evaluate and retrieve the node from. + The Y position to evaluate and retrieve the node from. + Enumerates rendered nodes only. + + + + Retrieves the tree node that is at the specified location. + + The TreeNode at the specified location, in tree view coordinates. + + You can pass the MouseEventArgs.X and MouseEventArgs.Y coordinates of the + MouseDown event as the x and y parameters. + + Tree control to find node at. + The X position to evaluate and retrieve the node from. + The Y position to evaluate and retrieve the node from. + Enumerates rendered nodes only. + + + + Retrieves the tree node that is at the specified vertical location. + + The TreeNode at the specified location, in tree view coordinates. + + You can pass the MouseEventArgs.X and MouseEventArgs.Y coordinates of the + MouseDown event as the x and y parameters. + + The Y position to evaluate and retrieve the node from. + Tree control to find node at. + + + + Retrieves the tree node that is at the specified vertical location. + + The TreeNode at the specified location, in tree view coordinates. + + You can pass the MouseEventArgs.X and MouseEventArgs.Y coordinates of the + MouseDown event as the x and y parameters. + + The Y position to evaluate and retrieve the node from. + Tree control to find node at. + Enumerates rendered nodes only. + + + + Retrieves the tree node that is at the specified vertical location. + + The TreeNode at the specified location, in tree view coordinates. + + You can pass the MouseEventArgs.X and MouseEventArgs.Y coordinates of the + MouseDown event as the x and y parameters. + + The Y position to evaluate and retrieve the node from. + Tree control to find node at. + Enumerates rendered nodes only. + + + + Gets the count of visible child nodes (Visible=true) for given node. + + Reference to Node object. + Number of visible nodes. + + + + Gets the first visible child node or returns null if node cannot be found. + + Reference to Node object. + First visible node or null if node cannot be found. + + + + Gets the last visible child node or returns null if node cannot be found. + + Reference to Node object. + Last visible node or null if node cannot be found. + + + + Gets whether any node from array is child node of parent on any level. + + Reference to parent node. + Reference to child nodes. + + + + + Gets whether node is child node of parent on any level. + + Reference to parent node. + Reference to child node. + + + + + Returns true if child node is child of any parent node at any level. + + Parent nodes array + Child node + true if child otherwise false + + + + Finds the node based on the Node.Name property. + + Reference to a tree control. + Reference to a node with given name or null if node cannot be found. + + + + Finds the node based on the Node.DataKey property. + + Reference to a tree control. + Reference to a node with given key or null if node cannot be found. + + + + Finds the node based on the Node.BindingIndex property. + + Reference to a tree control. + Index to look for + + + + Returns next visible cell in node. + + Reference to a node + The index at which to start search. + Reference to cell or null if there are no visible cells + + + + Returns previous visible cell in node. + + Reference to a node + The index at which to start search. + Reference to cell or null if there are no visible cells + + + + Returns the zero based flat index of the node. Flat index is the index of the node as if tree structure + has been flattened into the list. + + Reference to parent tree control. + Reference to the node to return index for. + Zero based node index or -1 if index cannot be determined. + + + + Returns node based on the flat index. Flat index is the index of the node as if tree structure + has been flattened into the list. + + Parent tree control. + Index to return node for. + Reference to a node or null if node at specified index cannot be found. + + + + Finds the first node that starts with the specified text. Node.Text property is searched. + + Parent tree control. + Partial text to look for + Reference node to start searching from + Gets or sets whether search ignores the letter case + Reference to a node or null if no node is found. + + + + Returned as information about the node or its column header at given coordinates. + + + + + Defines options for EnsureVisible method which brings node into the view. + + + + + Scrolls the tree so node is displayed at the bottom of the tree, if possible. + + + + + Scrolls the tree so node is displayed in the middle of the tree, if possible. + + + + + Scrolls the tree so node is displayed at the top of the tree, if possible. + + + + + Class that provides predefined styles for the nodes. Styles are defined as static memeber of the class + + + + + Returns Apple element style + + + + + Returns Blue element style + + + + + Returns BlueLight element style + + + + + Returns BlueNight element style + + + + + Returns BlueMist element style + + + + + Returns Cyan element style + + + + + Returns Green element style + + + + + Returns Lemon element style + + + + + Returns Magenta element style + + + + + Returns Orange element style + + + + + Returns OrangeLight element style + + + + + Returns Purple element style + + + + + Returns PurpleMist element style + + + + + Returns Red element style + + + + + Returns Silver element style + + + + + Returns SilverMist element style + + + + + Returns Tan element style + + + + + Returns Teal element style + + + + + Returns Yellow element style + + + + + Returns Gray element style + + + + + Indicates predefined element style. + + + + + Represents the selected nodes collection. + + + + + Initializes a new instance of the SelectedNodesCollection class. + + + + + Adds new object to the collection and provides information about the source of the command + + Node to add + Source action + + + + + Adds an array of objects to the collection. + + Array of Node objects. + + + + Represents the text box for editing cell's text. + + + + + Gets or sets whether the editing is in word-wrap mode. + + + + + Gets or sets whether control prevents Beep sound when Enter key is pressed. + + + + + Summary description for TreeAreaInfo. + + + + + Reference to parent node in which child bounds the coordinates are. Can be null if no parent node contains given coordinates. + + + + + Node which contains specified coordinates. Can be null if no node contains coordinates. + + + + + Previous reference node for given coordinates. If coordinates fall between two nodes this will indicate previous node or null. + + + + + Next reference node for given coordinates. If coordinates fall between two nodes this will indicate next node or null. + + + + + Gets or sets the parent node drag node will be added to. When null the drag node is being added as top-level node. + + + + + Gets or sets the insert index of drag node into the parent's node Nodes collection. + + + + + Initializes a new instance of the NodeDragInfo class. + + + + + Initializes a new instance of the NodeDragInfo class. + + + + + + + Provides data for AdvTree Cell events that can be canceled. + + + + + Provides data for AdvTree Cell events. + + + + + Default constructor for event data. + + Type of the action event is raised for. + Cell that event is raised for. + + + + Indicates the type of the action performed on a cell. + + + + + Indicates the cell that action is performed on. + + + + + Default constructor for event data. + + Type of the action event is raised for. + Cell that event is raised for. + + + + Indicates that event action should be canceled. + + + + + Provides data for AdvTree.BeforeCheck event. + + + + + Initializes a new instance of the AdvTreeCellBeforeCheckEventArgs class. + + + + + + Represents event arguments for BeforeNodeDrop and AfterNodeDrop events + + + + + Provides data for AdvTree Node events that can be cancelled. + + + + + Provides data for AdvTree Node events that can be cancelled. + + + + + Provides data for AdvTree Node events. + + + + + Default constructor. + + Default action + Default node. + + + + Indicates the type of the action performed on a node. + + + + + Indicates the node that action is performed on. + + + + + Default constructor. + + Default action + Default node. + + + + Indicates that event action should be canceled. + + + + + Default constructor. + + Default action + Default node. + + + + Indicates the array of nodes that action is performed on. + + + + + Returns reference to the old parent node. + + + + + Reference to the new parent node if event is not cancelled. + + + + + Gets or sets whether drag node is being copied instead of moved. + + + + + Gets or sets the new insert position inside of NewParentNode.Nodes collection for the node being dragged. If InsertPosition is -1 + the ParentNode refers to the current mouse over node and drag & drop node will be added as child node to it. + + + + + Defines the data for NodeDragFeedback event. + + + + + Gets or sets whether this drop location is accepted. Default value is true. You can set this to false to disable drop at this location. + + + + + Gets or sets the parent node for the node that is being dragged. This can be null/nothing value to indicate a root top-level node that + is in AdvTree.Nodes collection. + + + + + Gets or sets the new insert position inside of ParentNode.Nodes collection for the node being dragged. If InsertPosition is -1 + the ParentNode refers to the current mouse over node and drag & drop node will be added as child node to it. + + + + + Initializes a new instance of the TreeDragFeedbackEventArgs class. + + + + + + + Initializes a new instance of the TreeDragFeedbackEventArgs class. + + + + + + + Initializes a new instance of the TreeDragFeedbackEventArgs class. + + + + + Gets reference to the node being dragged. + + + + + Gets or sets the drop effect for the drag-drop operation. + + + + + Initializes a new instance of the TreeDragFeedbackEventArgs class. + + + + + + + Initializes a new instance of the TreeDragFeedbackEventArgs class. + + + + + + + Gets reference to the node being dragged. + + + + + Represents event arguments for NodeCollection based events, like BeforeNodeInsert, AfterNodeInsert etc. + + + + + Creates new instance of the class. + + Source action + Affected node + Parent of the node if any + + + + Indicates parent node of the affected node. For example if event handled is BeforeNodeInsert parent of the Node is has + not been set yet so this property provides information on the node that will become parent. If this property returns null + then node is being added or removed from the main AdvTree.Nodes collection. + + + + + Represents event arguments for node mouse based events. + + + + + Gets node affected by mouse action. + + + + + Gets which mouse button was pressed. + + + + + Gets the number of times the mouse button was pressed and released. + + + + + Gets a signed count of the number of detents the mouse wheel has rotated. A detent is one notch of the mouse wheel. + + + + + Gets the x-coordinate of the mouse. + + + + + Gets the y-coordinate of the mouse. + + + + + Provides means for AdvTree serialization. + + + + + Saves Nodes to specified file. + + AdvTree to save + Target file name + + + + Saves Nodes to stream. + + AdvTree to save + Stream to save nodes to. + + + + Saves Nodes to TextWriter + + AdvTree to save + TextWriter to write nodes to. + + + + Saves nodes to XmlWriter. + + AdvTree to save + XmlWriter to write nodes to + + + + + Saves AdvTree to an existing XmlDocument. New node AdvTree is created in document and Nodes are serialized into it. + + AdvTree to serialize + XmlDocument instance. + + + + Serializes AdvTree object to XmlElement object. + + Instance of AdvTree to serialize. + XmlElement to serialize to. + + + + Serializes Node and all child nodes to XmlElement object. + + Node to serialize. + Provides serialization context. + + + + Load AdvTree Nodes from file. + + Reference to AdvTree to populate + File name. + + + + Load AdvTree Nodes from stream. + + Reference to AdvTree to populate + Reference to stream + + + + Load AdvTree Nodes from reader. + + Reference to AdvTree to populate + Reference to reader. + + + + Load AdvTree Nodes from reader. + + Reference to AdvTree to populate + Reference to reader. + + + + Load AdvTree from XmlDocument that was created by Save method. + + Tree Control to load + XmlDocument to load control from + + + + Load nodes from XmlElement. + + Reference to AdvTree to be populated. + XmlElement that tree was serialized to. + + + + Load single node and it's child nodes if any. + + New instance of node that is populated with loaded data. + Provides deserialization context. + + + + Provides context information for serialization. + + + + + Gets or sets reference to context parent XmlElement when serializing or actual Node element when deserializing. + + + + + Gets or sets whether SerializeNode event handler has been defined and whether event should be fired. + + + + + Gets or sets whether DeserializeNode event handler has been defined and whether event should be fired. + + + + + Provides access to serializer. + + + + + Represents class for static tree utilities. + + + + + Initializes control with default settings for connectors and nodes. + + Control to initialize. + + + + Initializes control with default settings for connectors and nodes. + + Control to initialize. + Factory to use to create new instances of objects. + + + + Creates new style and adds it to styles collection + + Tree to assign style to + Style factory + + + + + + + + Returns reference to a node that is hosting given control. + + Reference to the AdvTree control instance + Control instance to look for + Reference to a node hosting control or null if node could not be found + + + + Represents internal component factory with design-time support. + + + + + Creates new instance of the class. + + Reference to DesignerHost to use for creation of new components. + + + + Creates new instance of the class. + + + + + Creates component and returns reference to the new instance. + + Type that identifies component to create. + New instance of the component. + + + + Represents class that holds padding information for user interface elements. + + + + + Gets or sets padding on left side. Default value is 0 + + + + + Gets or sets padding on right side. Default value is 0 + + + + + Gets or sets padding on top side. Default value is 0 + + + + + Gets or sets padding on bottom side. Default value is 0 + + + + + Creates new instance of the class and initializes it. + + Left padding + Right padding + Top padding + Bottom padding + + + + Gets amount of horizontal padding (Left+Right) + + + + + Gets amount of vertical padding (Top+Bottom) + + + + + Gets whether Padding is empty. + + + + + Analog clock control. + + + + + Resets the property to default value. + + + + + Raises ValueChanging event. + + Provides event arguments. + + + + Raises ValueChanged event. + + Provides event arguments. + + + + Resets the property to default value. + + + + + Initializes a new instance of the ClockControl class + + + + + Releases all resources used by the class. + + + + + Renders the clock's center cap. + + Graphics object used for rendering. + Bounding rectangle. + + + + Renders the clock's glass overlay. + + Graphics object used for rendering. + Bounding rectangle. + + + + Renders the clock's hands. + + Graphics object used for rendering. + Bounding rectangle. + True if this is the rending pass after the cap has been rendered. + + + + Renders the clock's numeric hour indicators. + + Graphics object used for rendering. + Bounding rectangle. + + + + Renders the clock's tick hour/minute indicators. + + Graphics object used for rendering. + Bounding rectangle. + + + + Called when TimeZone property has changed. + + Old property value + New property value + + + + Default minimum size. Defaults to 100, 100. + + + + + Gets or sets whether anti-aliasing is used when rendering the control. Default value is true. + + + + + Gets or sets the state for automatic mode. When true the clock will auto redraw once a second and display the current date/time. Default value is false. + + + + + Gets or sets clock style for this control. + + + + + Gets or sets the clock style data elements for this control. + + + + + Gets or sets a the indicator style the clock control. Default value is Ticks. + + + + + Gets or sets whether the time can be changed by moving the clock hands. Default value is false. + + + + + Gets or sets a value indicating whether to display the glass overlay on the clock control. Default value is true. + + + + + Gets or sets a value indicating whether to display the second hand on the clock control. Default value is true. + + + + + Occurs while user is dragging the mouse in order to change time. + + + + + Occurs when Value i.e. time clock is displaying has changed. + + + + + Gets or sets the current date/time value for this control. + + + + + Gets or sets the time-zone string identifier that is used to display the time when AutomaticMode=true and clock is displaying current time. + + + + + Enumeration containing the available hour/minute indicators. + + + + + Control will use ticks for hour/minute indicators. + + + + + Control will use numbers for hour indicators. + + + + + Enumeration containing the available mouse edit states. + + + + + Control is not currently in an edit state. + + + + + Control is currently in an hour edit state. + + + + + Control is currently in an minute edit state. + + + + + Control is currently in an second edit state. + + + + + Provides event arguments for TimeValueChanging event. + + + + + Gets the current time represented by the control. + + + + + Initializes a new instance of the TimeValueChangingEventArgs class. + + + + + + Defines delegate for TimeValueChanging event. + + Source of event. + Event arguments + + + + Data storage class for clock hand visual style. + + + + + Resets the property to default value. + + + + + Initializes a new instance of the ClockHand class. + + + + + Initializes a new instance of the ClockHand class. + + The hand style for this item. + The length of this clock hand as a percentage value ranging from 0.0 to 1.0, with 1.0 being half the width/height of the bounding rectangle + The width of this clock hand as a percentage value ranging from 0.0 to 1.0, with 1.0 being half the width/height of the bounding rectangle. + + + + Indicates whether the specified point is contained within the bounds of this hand. + + The bounding rectangle of the parent clock control. + The clockwise angle for this clock hand in degrees from the 12 o'clock position. + A Point that represents the point to test. + + + + + Generates a scaled and rotated graphics path based on the given style, rectangle and angle. + + The bounding rectangle of the parent clock control. + The clockwise angle for this clock hand in degrees from the 12 o'clock position. + + + + + Raises the PropertyChanged event. + + Event arguments + + + + Gets or sets a value indicating whether the hand is drawn over the cap. + + + + + Gets or sets the hand color data for this hand. + + + + + Gets or sets the hand style for this clock hand. Default value is Style1. + + + + + Gets or sets the length of this clock hand as a percentage value ranging from 0.0 to 1.0, with 1.0 being half the width/height of the bounding rectangle. Default value is 1.0. + + + + + Gets or sets the width of this clock hand as a percentage value ranging from 0.0 to 1.0, with 1.0 being half the width/height of the bounding rectangle. Default value is 0.1. + + + + + Occurs when property value has changed. + + + + + Enumeration containing the available hand styles. + + + + + Style 1. + + + + + Style 2. + + + + + Style 3. + + + + + Style 4. + + + + + Data storage class for clock visual styles. + + + + + Resets the property to default value. + + + + + Resets the property to default value. + + + + + Resets the property to default value. + + + + + Resets the property to default value. + + + + + Resets the property to default value. + + + + + Resets the property to default value. + + + + + Resets the property to default value. + + + + + Resets the property to default value. + + + + + Resets the property to default value. + + + + + Initializes a new instance of the ClockStyle class. + + + + + Initializes a new instance of the ClockStyle class. + + Predefined style from the PredefinedStyles enum. + + + + Initializes a new instance of the ClockStyle class. + + Predefined style from the PredefinedStyles enum. + + + + Releases all resources used by the class. + + + + + Loads a predefined style + + The predefined style to load. + + + + Raises the PropertyChanged event. + + Event arguments + + + + Gets or sets the PredefinedStyles value for this style. + + + + + Gets or sets the clock shape value for this style. + + + + + Gets or sets the bezel color data for this style. + + + + + Gets or sets the width of clock bezel as a percentage value ranging from 0.0 to 1.0. + + + + + Gets or sets the face color data for this style. + + + + + Gets or sets the face background image for this style. + + + + + Gets or sets the hour hand style for this style. + + + + + Gets or sets the minute hand style for this style. + + + + + Gets or sets the second hand style for this style. + + + + + Gets or sets the center cap color data for this style. + + + + + Gets or sets the center cap diameter as a percentage value ranging from 0.0 to 1.0. + + + + + Gets or sets the face number color for this style. + + + + + Gets or sets the center cap color data for this style. + + + + + Gets or sets the large tick color data for this style. + + + + + Gets or sets the large tick length as a percentage value ranging from 0.0 to 1.0. + + + + + Gets or sets the large tick width as a percentage value ranging from 0.0 to 1.0. + + + + + Gets or sets the small tick color data for this style. + + + + + Gets or sets the small tick length as a percentage value ranging from 0.0 to 1.0. + + + + + Gets or sets the small tick width as a percentage value ranging from 0.0 to 1.0. + + + + + Gets or sets the overlay glass angle, in degrees for this style. + + + + + Occurs when property value has changed. + + + + + Gets the parent of the style. + + + + + Enumeration containing the predefined clock styles. + + + + + Style 1. Default style, + + + + + Style 2. + + + + + No predefined style. + + + + + Enumeration containing the predefined clock shapes. + + + + + Round clock shape. + + + + + Data storage and utility class for defining gradient colors. + + + + + Creates new instance of the object. + + + + + Creates new instance of the object. + + The first color for this entry. + The second color for this entry. + + + + Creates new instance of the object. + + The first color for this entry. + The second color for this entry. + The border color for this entry. + The border width for this entry. + + + + Creates new instance of the object. + + The first color for this entry. + The second color for this entry. + The border color for this entry. + The border width for this entry. + The gradient angle. + + + + Creates new instance of the object. + + The first color for this entry. + The second color for this entry. + The border color for this entry. + The border width for this entry. + The focus for the SigmaBellShape. + The scale for the SigmaBellShape. + + + + Loads data into the class, called by constructors. + + The first color for this entry. + The second color for this entry. + The border color for this entry. + The border width for this entry. + The focus for the SigmaBellShape. + The scale for the SigmaBellShape. + + + + Creates Pen object using the BorderColor and BorderWidth properties. + + + + + Creates a brush of the type specified by BrushType. + + The graphics path used to construct the brush. + + + + Creates a brush of the type specified by BrushType. + + The graphics path used to construct the brush. + The angle used for the gradients, allowing an override of BrushAngle + + + + Creates a brush of the type specified by BrushType. + + The graphics path used to construct the brush. + The center point of the gradient as a percentage value typically ranging from 0.0 to 1.0. + + + + Creates a brush of the type specified by BrushType. + + The graphics path used to construct the brush. + The center point of the gradient as a percentage value typically ranging from 0.0 to 1.0. + The angle used for the gradients, allowing an override of BrushAngle + + + + Creates SolidBrushObject using Color1. + + + + + Creates a LinearGradientBrush object. + + The graphics path used to construct the brush. + The gradient angle. + + + + Creates a PathGradientBrush object. + + The graphics path used to construct the brush. + The center point of the gradient. + + + + Creates a LinearGradientBrush object. + + The graphics path used to construct the brush. + The gradient angle. + + + + Creates a LinearGradientBrush object. + + The graphics path used to construct the brush. + The gradient angle. + The focus for the SigmaBellShape. + + + + Creates a LinearGradientBrush object. + + The graphics path used to construct the brush. + The gradient angle. + The focus for the SigmaBellShape. + The scale for the SigmaBellShape. + + + + Raises the PropertyChanged event. + + Event arguments + + + + Gets or sets the border color for this item. Default value is white. + + + + + Gets or sets the border width for this item. Default value is 0. + + + + + Gets or sets the brush angle for this item. Only applies to Linear and Reflected brush types. Default value is 0. + + + + + Gets or sets the brush SigmaBellShape focus for this item. Only applies to Reflected brush types. Default value is 0.5. + + + + + Gets or sets the brush SigmaBellShape scale for this item. Only applies to Reflected brush types. Default value is 0.5. + + + + + Gets or sets the brush type for this item. Default value is Solid. + + + + + Gets or sets the first color for this item. Default value is white. + + + + + Gets or sets the second color for this item. Default value is white. + + + + + Occurs when property value has changed. + + + + + Enumeration containing predefined brush types for the ColorData class. + + + + + Solid brush. + + + + + Linear gradient brush. + + + + + Centered path gradient brush. + + + + + Reflected linear gradient brush. + + + + + Math helper class + + + + + Converts radians to degrees. + + Value to be converted in radians. + Converted value in degrees. + + + + Converts degrees to radians. + + Value to be converted in degrees. + Converted value in radians. + + + + Raises AnimationCompleted event. + + Provides event arguments. + + + + Initializes a new instance of the Animation class. + + Target object for animation + Target property name for animation + + + + Initializes a new instance of the Animation class. + + Target object for animation + Target property name for animation + + + + Initializes a new instance of the Animation class. + + Target object for animation + Target property name for animation + + + + Stops animation if one is currently running. + + + + + Sets the method which is called each time value on target object property is set. This method may execute the visual updates on animation client. + + Method to call + + + + Occurs after animation has completed. + + + + + Gets or sets whether animation is auto-disposed once its completed. Default value is false. + + + + + Gets whether animation run is complete. + + + + + Gets the animation duration in milliseconds. + + + + + Gets the animation easing function. + + + + + Gets or sets the number of fixed steps animation will perform from star to finish instead of using the easing function in time. + Stepped animation executes specified number of steps always with Duration specifying delays between each step. + + + + + Initializes a new instance of the AnimationRequest class. + + Target object for animation. + Target property name for animation. + From value. + To value. + + + + Initializes a new instance of the AnimationRequest class. + + Target object for animation. + Target property name for animation. + From value. + To value. + + + + Target object for animation. + + + + + Animation from value. + + + + + Animation to value. + + + + + Specifies the animation easing function + + + + + Initializes a new instance of the Animation class. + + Target object for animation + Target property name for animation + + + + Initializes a new instance of the Animation class. + + Target object for animation + Target property name for animation + + + + Initializes a new instance of the Animation class. + + Target object for animation + Target property name for animation + + + + Initializes a new instance of the Animation class. + + Target object for animation + Target property name for animation + + + + Initializes a new instance of the Animation class. + + Target object for animation + Target property name for animation + + + + Initializes a new instance of the Animation class. + + Target object for animation + Target property name for animation + + + + Initializes a new instance of the Animation class. + + Target object for animation + Target property name for animation + + + + Initializes a new instance of the Animation class. + + Target object for animation + Target property name for animation + + + + Initializes a new instance of the Animation class. + + Target object for animation + Target property name for animation + + + + Initializes a new instance of the Animation class. + + Target object for animation + Target property name for animation + + + + Initializes a new instance of the Animation class. + + Target object for animation + Target property name for animation + + + + Initializes a new instance of the Animation class. + + Target object for animation + Target property name for animation + + + + Runs all animations from Animations list. + + + + + Returns whether Storyline is disposed. + + + + + Gets the list of animations to run using this storyline. + + + + + Gets or sets number of times storyline is repeated. Default value is 0 which indicates that storyline is run only once meaning not repeated. + + + + + Gets or sets whether storyline is auto-disposed when finished. + + + + + Clean up any resources being used. + + + + + Returns the reference to DockContainerItem tab if any under specified coordinates. + + X - client mouse coordinate + Y - client mouse coordinate + Reference to DockContainerItem whose tab is at specified coordinates or null if there is no tab at given coordinates + + + + Sets bars position on the auto-hide panel. + + Bar for which position should be changed. + New indexed position of the bar. + + + + Gets or sets whether anti-alias smoothing is used while painting. Default value is false. + + + + + Gets or sets the timeout in milliseconds for auto hide/show action. + When timeout has elapsed and mouse has left the bar the bar will be automatically hidden. + If mouse is hovering over the collapsed bar and timeout has elapsed the bar will be displayed. + + + + + Gets or sets whether bars on auto-hide panel are displayed when mouse hovers over the tab. + + + + + Gets or sets whether bars that have focus are collapsed automatically or not. + + + + + Gets or sets the style of auto-hide panel. + + + + + Gets or sets the ColorScheme object used by this panel. Default value is null which means that ColorScheme is + automatically created as specified by Style property. Note that if your DotNetBarManager has UseGlobalColorScheme set to true + ColorScheme from DotNetBarManager will be used. + + + + + Creates new instance of the class. + + + + + Creates new instance of the class. + + + + + Indicates the Balloon tip position. + + + + + Tip is on the top. + + + + + Tip is on the left side. + + + + + Tip is on the right side. + + + + + Tip is on the bottom. + + + + + Indicates the style of the balloon. + + + + + Indicates type of Alert animation performed when alert is displayed. + + + + + No animation take place when alert is displayed. + + + + + Alert is animated from bottom to top. (Default) + + + + + Alert is animated from top to bottom. + + + + + Alert is animated from left to right. + + + + + Alert is animated from right to left. + + + + + Delegate for custom paint event handler. + + + + + Summary description for Balloon. + + + + + Clean up any resources being used. + + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Auto resize balloon to the content. Balloon width is calculated so image and caption text can fit in single line. + + + + + Recalculates layout of the balloon. + + + + + Displays balloon using control to automatically calculate balloon location. Method is usually used display balloon that is showing information for the certain control. + + Control used for balloon positioning. + + + + Displays balloon using control to automatically calculate balloon location. Method is usually used display balloon that is showing information for the certain control. + + Control used for balloon positioning. + Indicates whether balloon receives input focus. + + + + Displays balloon using rectangle to automatically calculate balloon location. Method is usually used display balloon that is showing information for the certain screen region. + + Rectangle in screen coordinates used for balloon positioning. + Indicates whether balloon receives input focus. + + + + Displays balloon using item to automatically calculate balloon location. Method is usually used display balloon that is showing information for the certain item. + + Item used for balloon positioning. + Indicates whether balloon receives input focus. + + + + Display balloon. + + Indicates whether balloon receives input focus. + + + + Displays balloon. + + + + + Called when balloon is hidden. + + + + + Hides balloon. + + + + + Occurs when background is redrawn. + + + + + Occurs when caption image is redrawn. + + + + + Occurs when caption text is redrawn. + + + + + Occurs when text is redrawn. + + + + + Occurs when close button is clicked. + + + + + Occurs when TipPosition property has changed. + + + + + Gets or sets whether anti-alias smoothing is used while painting. Default value is false. + + + + + Gets or sets the minimum balloon width when auto sizing balloon. Default value is 180. + + + + + Occurs when text markup link is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + Gets or sets the target gradient background color. + + + + + Gets or sets gradient fill angle. + + + + + Specifies the transparency of background image. + + + + + Specifies background image position when container is larger than image. + + + + + Gets or sets the border color.. + + + + + Specifies balloon style. + + + + + Gets or sets whether the Close button is displayed. + + + + + Gets or sets the animation type used to display Alert type balloon. + + + + + Gets or sets the total time in milliseconds alert animation takes. + Default value is 200. + + + + + Gets or sets whether balloon will close automatically when user click the close button. + + + + + Gets or sets time period in seconds after balloon closes automatically. + + + + + Gets or sets the custom image for Close Button. + + + + + Gets or sets the custom image for Close Button when mouse is over the button. + + + + + Gets or sets the custom image for Close Button when button is pressed. + + + + + Gets or sets the Caption image. + + + + + Gets or sets the Caption icon. Icon is used to provide support for alpha-blended images in caption. + + + + + Gets or sets the Caption font. + + + + + Gets or sets text displayed in caption. + + + + + Gets or sets color of caption text. + + + + + Gets or set position of the balloon tip. + + + + + Gets or sets tip distance from the edge of the balloon. + + + + + Returns length of the tip. + + + + + Gets/Sets whether Balloon is visible. + + + + + Represents a balloon style pop-up window that displays a brief description of a control's purpose when the mouse hovers over the control or when controls receives input focus. + + + + + Initializes a new instance of the BalloonTip class. + + + + + Clean up any resources being used. + + + + + Retrieves the Balloon Caption text associated with the specified control. + + + + + Associates Balloon Caption text with the specified control. + + The Control to associate the Balloon Caption text with. + The Balloon Caption text to display on the Balloon. + + + + Retrieves the Balloon text associated with the specified control. + + + + + Associates Balloon text with the specified control. + + The Control to associate the Balloon text with. + The Balloon text to display on the Balloon. + + + + Removes all Balloon texts currently associated with the BalloonTip control. + + + + + Removes specific Balloon texts currently associated with the BalloonTip control. + + Control that has Balloon texts associated. + + + + Shows Balloon for specific control. Control must have Balloon already assigned to it. + + Control that has Balloon already assigned. + + + + Closes Balloon control if visible. + + + + + Occurs before balloon is displayed. + + + + + Occurs before balloon is closed and allows to cancel the action. + + + + + Gets or sets whether anti-alias smoothing is used while painting. Default value is false. + + + + + Gets or sets a value indicating whether the BalloonTip is currently active. + true if the BalloonTip is currently active; otherwise, false. The default is true. + + + + + Returns reference to the control that triggered balloon. + + + + + Gets or sets the minimum balloon width when auto sizing balloon. Default value is 180. + + + + + Gets or sets a value indicating whether Balloon receives input focus when displayed. + Default value is false. + + + + + Gets or sets the time (in milliseconds) that passes before the BalloonTip appears. + + + + + Gets or sets a value indicating whether a Balloon window is displayed even when its parent form is not active. Default value is false. + + + + + Gets or sets the internal Balloon control that is used to display Balloon. + This property will have valid value only during time Balloon is actually + displayed on the screen. Value will also be valid during BalloonDisplaying event. + You can use this property to further customize Balloon control before it is + displayed to the user. You can also set it to your own instance of the Balloon + control (or the control that is inheriting it) for ultimate customization options. + Note that new instance of Balloon control is created each time Balloon needs to be displayed. + Once Balloon is closed control is disposed. + + + + + Specifies balloon style. + + + + + Gets or sets the animation type used to display Alert type balloon. + + + + + Gets or sets the total time in milliseconds alert animation takes. + Default value is 200. + + + + + Gets or sets whether balloon will close automatically when user click the close button. + + + + + Gets or sets time period in seconds after balloon closes automatically. + + + + + Gets or sets whether Balloon is shown after control receives input focus. Default value is false. When set to true Balloon will not be displayed on mouse hover. + + + + + Gets or sets whether the Balloon Close button is displayed. + + + + + Gets or sets default balloon width. Usually the width of the balloon is calculated based on the width of the caption text. If caption text is not set then this value will be used as default width of the balloon. + + + + + Gets or sets the Balloon Caption image. + + + + + Gets or sets the Balloon Caption icon. Icon is used to provide support for alpha-blended images in caption. + + + + + Represents bar control. + + + + + Interface used for docking support. + + + + + Returns Minimum docked size of the control. + + + + + Returns Preferrred size of the docked control. + + + + + Sets the dock line for the control. Used internaly by dock manager. + + New Dock line. + + + + Indicated whether control can be docked on top dock site. + + + + + Indicated whether control can be docked on bottom dock site. + + + + + Indicated whether control can be docked on left dock site. + + + + + Indicated whether control can be docked on right dock site. + + + + + Indicates whether control can be docked as document i.e. middle (fill) dock site. + + + + + Indicates whether control can be docked as tab to another bar. + + + + + Indicated whether control can be stretched to fill dock site. + + + + + Holds the left position (dock offset) of the control. + + + + + Specifies the dock line for the control. + + + + + Specifies current dock orientation. + + + + + Gets whether control is docked. + + + + + Returns the dock site of the control. + + + + + Gets or sets the control dock side. + + + + + Gets or sets whether bar is locked to prevent docking below it. + + + + + Interface implemented by target Bar interested in access to designer. + + + + + Gets or sets the BarBaseControlDesigner instance. + + + + + Desribes interface that provides custom serialization support for items. + + + + + Invokes SerializeItem event. + + Provides data for the event. + + + + Invokes DeserializeItem event. + + Provides data for the event. + + + + Occurs after an item has been serialized to XmlElement and provides you with opportunity to add any custom data + to serialized XML. This allows you to serialize any data with the item and load it back up in DeserializeItem event. + + + To serialize custom data to XML definition control creates handle this event and use CustomXmlElement + property on SerializeItemEventArgs to add new nodes or set attributes with custom data you want saved. + + + + + Occurs after an item has been de-serialized (load) from XmlElement and provides you with opportunity to load any custom data + you have serialized during SerializeItem event. + + + To de-serialize custom data from XML definition handle this event and use CustomXmlElement + property on SerializeItemEventArgs to retrive any data you saved in SerializeItem event. + + + + + Gets whether any handlers have been defined for SerializeItem event. If no handles have been defined to optimize performance SerializeItem event will not be attempted to fire. + + + + + Gets whether any handlers have been defined for DeserializeItem event. If no handles have been defined to optimize performance DeserializeItem event will not be attempted to fire. + + + + + Raises BarStateChanged event. + + Provides event arguments. + + + + Initializes a new instance of the Bar class. + + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Initializes a new instance of the Control class. + + Bar Caption + + + + Releases the focus from the bar and selects the control that had focus before bar was selected. If control that had focus could not be determined focus will stay on the bar. + This method is used by internal DotNetBar implementation and you should not use it. + + + + + Creates the Graphics object for the control. + + The Graphics object for the control. + + + + Returns the renderer control will be rendered with. + + The current renderer. + + + + Raises the PreRender event. + + Provides the event arguments + + + + Raises the PostRender event. + + Provides the event arguments + + + + Drawns bar grab handle if one specified. + + Context information. + + + + Paints bar side bar. + + Reference to graphics object. + + + + Recalculates the layout of the Bar, resizes the Bar if necessary and repaints it. + + + + + Recalculates the layout of the Bar and repaints it. This will not change the size of the Bar it will only force the recalculation of the size for each contained item and it will repaint the bar. To ensure that Bar is resized if necessary as well call RecalcLayout method. + + + + + Raises ItemLayoutUpdated event. + + Provides event arguments. + + + + Method is called by DotNetBarManager when bar is being moved and Escape key is pressed. + + + + + Called when IsMaximized property has changed. + + Old property value + New property value + + + + Closes the DockContainerItem with event source set to Code. + + DockContainerItem to close. + + + + Closes the DockContainerItem. + + DockContainerItem to close. + Source of the event. + + + + Raises the ItemClick event. + + Item that was clicked. + Event arguments. + + + + Suspends normal layout logic. + + + + + Resumes normal layout logic. + + + + + Resumes normal layout logic. Optionally forces an immediate layout of pending layout requests. + + + + + Invokes SerializeItem event. + + Provides data for the event. + + + + Invokes DeserializeItem event. + + Provides data for the event. + + + + Saves the Bar definition to file. + + Definition file name. + + + + Loads the Bar definition from file. + + Definition file name. + + + + Saves the Bar layout to file. + + Definition file name. + + + + Loads the Bar definition from file. + + Definition file name. + + + + Sets the client size of the bar excluding caption. This method is useful when setting the size of the bars with layout type DockContainer. + + Width of bar in pixels. + Height of bar in pixels. + + + + Sets the client size of the bar excluding caption. This method is useful when setting the size of the bars with layout type DockContainer. + + New bar size + + + + Returns true if Font property should be serialized by Windows Forms designer. + + + + + Designer method to reset the property to its default value. + + + + + Resets the ColorScheme property to its default value. + + + + + Called when CanMaximizeFloating property has changed. + + Old property value + New property value + + + + Makes the Bar display by setting the visible property to true. + + + + + Hides the Bar. + + + + + Returns whether Size property should be serialized. + + + + + Returns the first child item with specified name regardless of it's hierarchy. + + Item name. + + + + + Returns the collection of items with the specified name. + + Item name to look for. + + + + + Returns the collection of items with the specified name and type. + + Item name to look for. + Item type to look for. + + + + + Returns the collection of items with the specified name and type. This member is not implemented and should not be used. + + Item name to look for. + Item type to look for. + Indicates whether GlobalName property is used for searching. + + + + + Returns AutoHidePanel that bar is on if in auto-hide state otherwise returns null. + + AutoHidePanel object or null if bar is not in auto-hide state. + + + + Raises BeforeAutoHideDisplayed event. + + + + + + Raises BeforeAutoHideHidden event. + + + + + + Destroys tooltip window. + + + + + Shows tooltip for this item. + + + + + Re-docks the floating bar to its previous docking position. + + + + + Invokes CaptionButtonClick event. + + + + + Displays or hides the automatic caption button popup menu. + + + + + Called when DockTabStripHeight property has changed. + + Old property value + New property value + + + + Returns the Minimum Size for specified orientation. + + Orientation to return minimum size for. + + + + + Returns the preferred size of the Bar when docked. + + Orientation to return preferred size for. + + + + + Sets the dock line but it does not forces the Bar to change position. The position will be changed on next layout request or when dock site needs to recalculate the layout of the bat. Used internally only. + + + + + ISupportInitialize.BeginInit implementation. + + + + + ISupportInitialize.EndInit implementation. + + + + + Returns Minimum docked size of the control. + + + + + Returns Preferrred size of the docked control. + + + + + Sets the dock line for the control. Used internaly by dock manager. + + New Dock line. + + + + Occurs after bar state has changed, like selected dock tab has changed, bar has closed, bar has been docked or undocked etc. + + + + + Occurs when Item is clicked. + + + + + Occurs after Bar is docked. + + + + + Occurs after Bar is undocked. + + + + + Occurs after Bar definition is loaded. + + + + + Occurs when current Dock tab has changed. + + + + + Occurs when bar visibility has changed as a result of user action. + + + + + Occurs when bar auto hide state has changed. + + + + + Occurs when Bar is about to be closed as a result of user clicking the Close button on the bar. + + + + + Occurs when Bar in auto-hide state is about to be displayed. + + + + + Occurs when popup item is closing. Event is fired only when Bar is used independently of DotNetBarManager. + + + + + Occurs when popup of type container is loading. Event is fired only when Bar is used independently of DotNetBarManager. + + + + + Occurs when popup of type container is unloading. Event is fired only when Bar is used independently of DotNetBarManager. + + + + + Occurs when popup item is about to open. Event is fired only when Bar is used independently of DotNetBarManager. + + + + + Occurs just before popup window is shown. Event is fired only when Bar is used independently of DotNetBarManager. + + + + + Occurs before dock tab is displayed. + + + + + Occurs when caption button is clicked. Caption button is button displayed on bars with grab handle style task pane. + + + + + Occurs on dockable bars when end-user attempts to close the individual DockContainerItem objects using system buttons on dock tab. + Event can be canceled by setting the Cancel property of event arguments to true. This even will occur only after user presses the + X button on tab that is displaying the dockable windows/documents. + + + + + Occurs on dockable bars after DockContainerItem is closed by end-user. This action cannot be cancelled. + + + + + Occurs after an item has been serialized to XmlElement and provides you with opportunity to add any custom data + to serialized XML. This allows you to serialize any data with the item and load it back up in DeserializeItem event. + + + To serialize custom data to XML definition control creates handle this event and use CustomXmlElement + property on SerializeItemEventArgs to add new nodes or set attributes with custom data you want saved. + + + + + Occurs after an item has been de-serialized (load) from XmlElement and provides you with opportunity to load any custom data + you have serialized during SerializeItem event. + + + To de-serialize custom data from XML definition handle this event and use CustomXmlElement + property on SerializeItemEventArgs to retrive any data you saved in SerializeItem event. + + + + + Occurs after the TabStrip style which used on dockable windows has changed. This event gives you opportunity to + change the style of the tab strip by accessing Bar.DockTabControl.Style property. + + + + + Occurs before the bar control is rendered. This event is fired once for each part of the bar control being rendered. Check the Part property of the event arguments to identify the part being rendered. + You can cancel internal rendering by setting Cancel property. + + + + + Occurs after the bar control is rendered and allows you to render on top of the default rendering provided by the control. + + + + + Occurs when DotNetBar is looking for translated text for one of the internal text that are + displayed on menus, toolbars and customize forms. You need to set Handled=true if you want + your custom text to be used instead of the built-in system value. + + + + + Gets/Sets the owner of the Bar object. + + + + + Gets or sets the item default accessibility action will be performed on. + + + + + Returns the reference to the control that last had input focus. This property should be used to + determine which control had input focus before bar gained the focus. Use it to apply + the menu command to active control. + + + + + Indicates the array of colors that when set are used to draw the border of the item. + + + + + Gets or sets the redering mode used by control. Default value is eRenderMode.Global which means that static GlobalManager.Renderer is used. If set to Custom then Renderer property must + also be set to the custom renderer that will be used. + + + + + Gets or sets the custom renderer used by the items on this control. RenderMode property must also be set to eRenderMode.Custom in order renderer + specified here to be used. + + + + + Gets whether caption of floating bar will be drawn using themes. + + + + + Gets/Sets the parent item of the Bar. The parents item sub-items are displayed on the bar. + + + + + Occurs after internal item layout has been updated and items have valid bounds assigned. + + + + + Gets or sets docked bar caption height. Default value is 0 which means system predefined height is used. + + + + + Gets or sets whether bar when changed over to floating state is hidden instead of shown. This property is used + internally to optimize loading of hidden floating bars. You should not use this property in your code. It is for internal DotNetBar + infrastructure use only. + + + + + Returns true if bar is being moved/dragged by user. + + + + + Gets or sets whether floating dockable window is maximized. + + + + + Specifies the bar behavior when its title is double-clicked + + + + + Returns whether popup bar should display shadow. + + + + + Returns whether popup bar shadow should be alpha-blended. + + + + + Gets/Sets the popup animation that will be applied when popup is shown. + + + + + Gets whether any handlers have been defined for SerializeItem event. If no handles have been defined to optimize performance SerializeItem event will not be attempted to fire. + + + + + Gets whether any handlers have been defined for DeserializeItem event. If no handles have been defined to optimize performance DeserializeItem event will not be attempted to fire. + + + + + Gets/Sets Bar definition as XML string. + + + + + Gets or sets whether layout changes are saved for this bar when DotNetBarManager.SaveLayout method is used to save layout for all bars. Default value is true which means that layout changes are saved. + + + + + Gets/Sets Bar layout as XML string. + + + + + Specifies background image position when container is larger than image. + + + + + Specifies the transparency of background image. + + + + + Sets/Gets the side bar image structure. + + + + + Gets/Sets the caption of the Bar. This text is displayed in title of the Bar when Bar is floating. + + + + + Specifies whether Bar is drawn using Themes when running on OS that supports themes like Windows XP. + + + + + Returns current Bar state. + + + + + Returns the collection of sub-items hosted on the Bar. + + + + + Returns the reference to the container that containing the sub-items. + + + + + Gets/Sets whether the items that could not be displayed on the non-wrap Bar are displayed on popup menu or popup Bar. + + + + + Gets/Sets the spacing in pixels between the sub-items. + + + + + Gets/Sets the padding in pixels. This represents the spacing between the top edge of the bar and the top of the item. + + + + + Gets/Sets the padding in pixels. This represents the spacing between the bottom edge of the bar and the bottom of the item. + + + + + Gets/Sets the padding in pixels. This represents the spacing between the left edge of the bar and the left side of the first item. + + + + + Gets/Sets the padding in pixels. This represents the spacing between the right edge of the bar and the right side of the last item. + + + + + Sets/Gets whether bar is menu bar. Menu bar will show system icons + for Maximized forms in MDI Applications. Only one bar can be a Menu bar in an application. + + + + + Gets or sets the visual type of the bar. The type specified here is used to determine the appearance of the bar. + + + + + Gets or sets Bar Color Scheme. + + + + + Gets or sets Caption (Title bar) background color. + + + + + Gets or sets Caption (Title bar) text color. + + + + + Gets or sets whether toolbars with appropriate style appear with rounded corners. Default value is true. + + + + + Gets/Sets the visual style of the Bar. + + + + + Gets/Sets whether the items will be wrapped into next line when Bar is full. Applies to both docked and floating Bar states. + + + + + Gets/Sets whether the items will be wrapped into next line when Bar is full. Applies only to Bars that are docked. + + + + + Gets/Sets whether the items will be wrapped into next line when Bar is full. Applies only to Bars that are floating. + + + + + Gets/Sets the grab handle style of the docked Bars. + + + + + Gets the grab handle client rectangle. + + + + + Returns CanClose based on the selected dock-container item. + + + + + Gets/Sets whether the Bar can be hidden by end-user. Applies to Document docked bars only. + + + + + Indicates whether Maximize button is visible on floating dock windows. + + + + + Gets/Sets border style when Bar is docked. + + + + + Gets/Sets whether floating bar is hidden when application loses focus. + + + + + Gets/Sets whether tab navigation buttons are shown for tabbed dockable bars. + + + + + Gets or sets the border line color when docked border is a single line. + + + + + Gets/Sets whether Bar is visible or not. + + + + + Returns number of items that have Visible property set to true. + + + + + Gets or sets whether bar is valid drop target for end-user bar customization. Default value is true. + When bar is used as dock container then you can use this property to prevent docking of other bars as dock tabs. + + + + + Gets or sets whether items on the Bar can be customized. + + + + + Specifies whether Bar was created by user using Customize dialog. + + + + + Gets/Sets the Bar name used to identify Bar from code. + + + + + Gets/Sets the Image size for all sub-items on the Bar. + + + + + Gets or sets the layout type. + + + + + Gets or sets whether all buttons are automatically resized to the largest button in collection. + + + + + Gets or sets rounded corner size for styles that use rounded corners. + + + + + Gets or sets whether anti-alias smoothing is used while painting. Default value is false. + + + + + Gets or sets whether mouse over fade effect is enabled for buttons. Default value is false. Note that Fade effect + will work only when Office2007 style is used. For other styles this property has no effect and fade animation is not used regardless + this property setting. + + + + + Gets whether fade effect should be in use. + + + + + Gets or sets the Bar back color. + + + + + Gets or sets the Bar customize menu (Applies to the bars with LayoutType set to DockWindow only). + + + + + Indicates the auto-hide side of the parent form where bar is positioned. + + + + + Gets or sets whether tab text is always visible while bar is in auto-hide state. Default value is false which indicates that only text for the active dock tab is visible. + + + + + Indicates whether Bar is in auto-hide state. Applies to non-document dockable bars only. + + + + + Gets or sets the visibility of the bar when bar is in auto-hide state. + + + + + Indicates whether Bar can be auto hidden. + + + + + Gets or sets the global parent control used as part of Global Items feature when bar is used as context menu bar. This property is used internally by + DotNetBar and should not be set directly. + + + + + Gets or sets how long it takes to play the auto-hide animation, in milliseconds. Maximum value is 2000, 0 disables animation. + + + + + Occurs before the bar in auto-hide state is displayed on popup and allows you to cancel display by setting Cancel=true on event arguments. + + + + + Occurs before the bar in auto-hide state is hidden and allows you to cancel display by setting Cancel=true on event arguments. + + + + + Gets whether tooltip is visible or not. + + + + + Indicates whether dock tabs are visible when bar is acting as dock-container and it needs to display tabs to represents multiple DockContainerItem objects hosted by the bar. Default value is true. + + + + + Gets or sets height of the docked bar tab strip which displays docked tabs. + + + + + Returns the reference to internal TabStrip control used to display contained DockContainerItems. + + + + + Gets or sets the selected DockContainerItem if bar represents dockable window. + + + + + Gets or sets the tab (DockContainerItem) index for Bars with LayoutType set to eLayoutType.DockContainer. Index corresponds to the index of the DockContainerItem in Bar.Items collection. + + + + + Indicates Bar background image. + + + + + Gets or sets whether caption button menu for bars with grab handle task pane is automatically created. + Caption menu when automatically created will display the list of all items from Items collection + and it will maintain only one item from the list as visible item. + To create custom caption menu that is displayed when user clicks the caption button handle CaptionButtonClick event. + + + + + Gets or sets whether caption (text) of the bars with dock container layout is automatically set to the + selected dock container item text. + + + + + Specifies whether Bar can be undocked. Does not apply to stand alone bars. + + + + + Specifes whether end-user can tear-off (deattach) the tabs on dockable window. + + + + + Specifes whether end-user can reorder the tabs on dockable window. + + + + + Gets or sets whether bar or DockContainerItem that is torn-off this bar can be docked + as tab to another bar. Default value is true which indicates that bar can be docked as tab to another bar. + + + + + Gets or sets whether dock bar can be moved by dragging its caption using the mouse. + + + + + Specifies whether Bar can be docked on Top dock site or not. Does not apply to stand alone bars. + + + + + Specifies whether Bar can be docked on Bottom dock site or not. Does not apply to stand alone bars. + + + + + Specifes whether Bar can be docked on Left dock site or not. Does not apply to stand alone bars. + + + + + Specifes whether Bar can be docked on Right dock site or not. Does not apply to stand alone bars. + + + + + Specifies whether Bar can be docked as document. Default value is false. See DotNetBarManager.EnableDocumentDocking for more details. + + + + + Specifies whether Bar will stretch to always fill the space in dock site. Applies to the dockable bars only. + + + + + Gets or sets whether gray-scale algorithm is used to create automatic gray-scale images. Default is true. + + + + + Gets/Sets the distance from the far left/top side of the docking site or suggests the order of the docked bar. Upon serialization this property + will contain actual left/top position of the bar. You can use it to re-order the bars docked on the same line. Property value is relative to the other + bars docked on the same line when it is used to change the order. For example setting DockOffset value to 10 will place the bar just after the last bar on the + same line that has DockOffset value less than 10. If there is no bar with DockOffset value less than 10 the bar will be placed in first position. + + + + + Gets/Sets the dock line. + + + + + Gets or sets the dock tab alignment. + + + + + Gets or sets whether selected dock tab is closed when Bar caption close button is pressed. Default value is false which indicates that whole bar will be hidden when bars close button is pressed. + + + + + Gets or sets whether close button is displayed on each dock tab that allows closing of the tab. Default value is false. + + + + + Gets or sets whether tab that shows all dock containers on the bar is visible all the time. By default + tab is hidden when there is only one item displayed. + + + + + Gets or sets whether bar is locked to prevent docking below it. Applies to undockable bars only. + + + + + Gets/Sets the orientation of the Bar. + + + + + Returns whether Bar is docked or not. + + + + + Returns the Bars dock site. + + + + + Gets/Sets the dock side for the Bar. + + + + + Gets or sets the inital floating location. This location will be used when DockSide is set to None. + + + + + Indicates whether Tooltips are shown on Bars and menus. + + + + + Gets or sets whether control is selected in designer. + + + + + Gets or sets whether accelerator letters for menu or toolbar commands are underlined regardless of + current Windows settings. Accelerator keys allow easy access to menu commands by using + Alt + choosen key (letter). Default value is false which indicates that system setting is used + to determine whether accelerator letters are underlined. Setting this property to true + will always display accelerator letter underlined. + + + + + ImageList for images used on Items. Images specified here will always be used on menu-items and are by default used on all Bars. + + + + + ImageList for medium-sized images used on Items. + + + + + ImageList for large-sized images used on Items. + + + + + Gets or sets whether hooks are used for internal DotNetBar system functionality. Using hooks is recommended only if DotNetBar is used in hybrid environments like Visual Studio designers or IE. + + + + + Indicates whether mnemonic keys, accelerator keys, which are set through item Text property used ampersand character are processed by control. + + + + + Specifes whether Bar can be docked on Top dock site or not. Does not apply to stand alone bars. + + + + + Specifes whether Bar can be docked on Bottom dock site or not. Does not apply to stand alone bars. + + + + + Specifes whether Bar can be docked on Left dock site or not. Does not apply to stand alone bars. + + + + + Specifes whether Bar can be docked on Right dock site or not. Does not apply to stand alone bars. + + + + + Specifes whether Bar can be docked as document. Default value is false. See DotNetBarManager.EnableDocumentDocking for more details. + + + + + Indicated whether control can be stretched to fill dock site. + + + + + Holds the left position (dock offset) of the control. + + + + + Specifies the dock line for the control. + + + + + Specifies current dock orientation. + + + + + Gets whether control is docked. + + + + + Returns the dock site of the control. + + + + + Gets or sets the control dock side. + + + + + Gets or sets whether bar is locked to prevent docking below it. + + + + + Defines delegate for the PreRender and PostRender Bar control events. + + + + + Represents event arguments for PreRender and PostRender Bar control event. + + + + + Gets the reference to the Bar being rendered. + + + + + Gets or sets the rectangle of the part being rendered. Certain parts of bar like the title buttons allow you to set this property to the custom size of your button. + Default value is the system size of the part being rendered. + + + + + Gets the Bar part being rendered. + + + + + When used in PreRender event allows you to cancel the default rendering by setting this property to true. + + + + + Gets the reference to the Graphics object to render the tab on. + + + + + Creates new instance of the class and initializes it with default values. + + + + + Defines the part of the Bar control for custom rendering. + + + + + Indicates the Bar background and border. + + + + + Indicates the Bar caption. + + + + + Indicates the Bar close button displayed inside of caption. + + + + + Indicates the Bar customize button displayed inside of caption. + + + + + Indicates the Bar caption text. + + + + + Indicates the Bar grab handle. + + + + + Indicates the Bar resize handle. + + + + + Indicates the Bar auto-hide button displayed inside of caption. + + + + + Indicates the Bar caption task pane. + + + + + Indicates the Bar maximize button displayed inside of caption. + + + + + Indicates the complete bar area. This part is used for the PostRender event. + + + + + Defines delegate for BarStateChanged event. + + + + + + + Provides event arguments for ActiveDockContainerChanged event. + + + + + Gets the Bar that is changed. + + + + + Gets the type of the change that affected the bar. + + + + + Provides any optional context information about the state change. + + + + + Initializes a new instance of the BarStateChangedEventArgs class. + + + + + + + Initializes a new instance of the BarStateChangedEventArgs class. + + + + + + + + Defines bar state changes for BarStateChanged event. + + + + + Indicates that Bar selected dock tab is about to change. + + + + + Indicates that Bar selected dock tab has changed. + + + + + Indicates that bar docking has changed and bar was docked. + + + + + Indicates that bar has been undocked from dock site. + + + + + Indicates that bar dock tab has closed. + + + + + Indicates that bar in auto-hide state has been folded, i.e. returned to collapsed state. + + + + + Indicates that bar in auto-hide state has been open, shown. + + + + + Indicates that bar AutoHide property has changed meaning that bar has been either placed in auto-hide mode or taken out of auto-hide mode. + + + + + Indicates that tab has been moved within a bar tab-strip by end user. + + + + + Specifies the behavior of bar when its title is double clicked. + + + + + Double clicking bar title does not do anything. + + + + + Double clicking bar title when bar is docked will float the bar if CanUndock=true + + + + + Double clicking floating bar title will re-dock it if any of CanDock*** properties is true. + + + + + Double clicking will toggle bar state between float and dock state if all CanDock*** and CanUndock properties allow it. + + + + + Represents base control for bars. + + + + + Notifies the accessibility client applications of the specified AccessibleEvents for the specified child control. + + The AccessibleEvents object to notify the accessibility client applications of. + The child Control to notify of the accessible event. + + + + Returns the collection of items with the specified name. + + Item name to look for. + + + + + Returns the collection of items with the specified name and type. + + Item name to look for. + Item type to look for. + + + + + Returns the collection of items with the specified name and type. + + Item name to look for. + Item type to look for. + + + + + Returns the first item that matches specified name. + + Item name to look for. + + + + + Invokes the DotNetBar Customize dialog. + + + + + Invokes ItemDoubleClick event. + + Reference to item double-clicked + Event arguments + + + + Clean up any resources being used. + + + + + Applies design-time defaults to control. + + + + + Creates the Graphics object for the control. + + The Graphics object for the control. + + + + Returns the renderer control will be rendered with. + + The current renderer. + + + + Called after control has painted its content and allows painting on top of the controls content. + + Paint arguments. + + + + Raises ItemLayoutUpdated event. + + Provides event arguments. + + + + Applies any layout changes and repaint the control. + + + + + Occurs when Checked property of an button has changed. + + + + + Occurs when Item is clicked. + + + + + Occurs when Item is clicked. + + + + + Occurs when popup of type container is loading. + + + + + Occurs when popup of type container is unloading. + + + + + Occurs when popup item is about to open. + + + + + Occurs when popup item is closing. + + + + + Occurs just before popup window is shown. + + + + + Occurs when Item Expanded property has changed. + + + + + Occurs when mouse button is pressed. + + + + + Occurs when mouse button is released. + + + + + Occurs when mouse enters the item. + + + + + Occurs when mouse leaves the item. + + + + + Occurs when mouse moves over the item. + + + + + Occurs when mouse remains still inside an item for an amount of time. + + + + + Occurs when item loses input focus. + + + + + Occurs when item receives input focus. + + + + + Occurs when user changes the item position, removes the item, adds new item or creates new bar. + + + + + Occurs after an Item is removed from SubItemsCollection. + + + + + Occurs after an Item has been added to the SubItemsCollection. + + + + + Occurs when ControlContainerControl is created and contained control is needed. + + + + + Occurs when Text property of an Item has changed. + + + + + Use this event if you want to serialize the hosted control state directly into the DotNetBar definition file. + + + + + Use this event if you want to deserialize the hosted control state directly from the DotNetBar definition file. + + + + + Occurs after DotNetBar definition is loaded. + + + + + Occurs when DotNetBar is looking for translated text for one of the internal text that are + displayed on menus, toolbars and customize forms. You need to set Handled=true if you want + your custom text to be used instead of the built-in system value. + + + + + Occurs before an item in option group is checked and provides opportunity to cancel that. + + + + + Occurs before tooltip for an item is shown. Sender could be the BaseItem or derived class for which tooltip is being displayed or it could be a ToolTip object itself it tooltip is not displayed for any item in particular. + + + + + Occurs after main application form is activated. + + + + + Occurs after main application form is deacticated. + + + + + Occurs on application wide mouse down event. + + + + + Gets or sets the form SideBar is attached to. + + + + + Indicates whether Reset buttons is shown that allows end-user to reset the toolbar state. + + + + + ImageList for images used on Items. Images specified here will always be used on menu-items and are by default used on all Bars. + + + + + ImageList for medium-sized images used on Items. + + + + + ImageList for large-sized images used on Items. + + + + + Indicates whether Tooltips are shown on Bars and menus. + + + + + Indicates whether item shortcut is displayed in Tooltips. + + + + + Gets or sets the item default accessibility action will be performed on. + + + + + Specifies the background style of the Explorer Bar. + + + + + Indicates whether shortucts handled by items are dispatched to the next handler or control. + + + + + Gets or sets Bar Color Scheme. + + + + + Gets or sets whether gray-scale algorithm is used to create automatic gray-scale images. Default is true. + + + + + Specifies whether SideBar is drawn using Themes when running on OS that supports themes like Windows XP. + + + + + Gets or sets whether anti-alias smoothing is used while painting. Default value is false. + + + + + Gets or sets the redering mode used by control. Default value is eRenderMode.Global which means that static GlobalManager.Renderer is used. If set to Custom then Renderer property must + also be set to the custom renderer that will be used. + + + + + Gets or sets the custom renderer used by the items on this control. RenderMode property must also be set to eRenderMode.Custom in order renderer + specified here to be used. + + + + + Occurs after internal item layout has been updated and items have valid bounds assigned. + + + + + Represents the method that will handle the ItemRemoved event. + + + + + Represents class for Accessibility support. + + + + + Creates new instance of the object and initializes it with owner control. + + Reference to owner control. + + + + Returns number of child objects. + + Total number of child objects. + + + + Returns reference to child object given the index. + + 0 based index of child object. + Reference to child object. + + + + Gets accessible role. + + + + + Gets parent accessibility object. + + + + + Returns bounds of the control. + + + + + Returns current accessible state. + + + + + Summary description for BarFunctions. + + + + + Tries to invoke the RecalcLayout method on the control and return true if such method was invoked. + + Reference to the control + Indicates whether to invalidate control if no recalc layout method is found + return true if method is invoked. + + + + Creates copy of a bar to be used as new dock bar. This function is used to create new bar for tabs that are torn off the existing dock bars. + + Original base bar to base the new bar on. + New instance of a bar. Note that bar is not added to the DotNetBarManager.Bars collection and DockSide is not set. + + + + Returns if passed control is ready for painting. + + Control to test. + true if handle is valid otherwise false + + + + XML element is expected to be something like Image data Base64 encoded + + Image data + + + + + Collection of Bar objects. + + + + + Releases the resources used by the Component. + + + + + Adds an Bar to the end of Bars collection. + + The Bar to be added to the end of the Bars collection. + + + + Removes specified bar from collection. + + Bar to remove + + + + Determines whether an Bar is in the collection. + + The Bar to locate in the collection. + true if item is found in the collection; otherwise, false. + + + + Determines whether bar with given name is in collection. + + Name of the bar + True if bar is part of this collection, otherwise false. + + + + Returns the zero-based index of the Bar in the collection. + + Bar to locate. + + + + + Gets the Bar at the specified index. + + + + + Gets the Bar with the specified name. + + + + + Holds the XML element and attribute names for bar serialization. + + + + + Represents class with static functions that provide commonly used utility functions when working with + Bar objects and items hosted by Bar object. + + + + + Sets Bar visible property and remembers the auto-hide state. + + Bar to set visibility for. + true if visible otherwise false + + + + Sets the visible property of DockContainerItem and hides the bar if the given item is the last visible item on the bar. + It will also automatically display the bar if bar is not visible. + + DockContainerItem to set visibility for. + Indicates the visibility of the item + + + + Creates new instance of the bar and sets its properties so bar can be used as Document bar. + + Returns new instance of the bar. + + + + Sets the properties on a bar so it can be used as Document bar. + + Bar to set properties of. + + + + Changes the MDI Client border edge to remove 3D border or to add it. + + Reference to MDI Client object. + Indicates whether to remove border. + + + + Changes the MDI Client border edge to remove 3D border or to add it. + + Reference to MDI parent form. + Indicates whether to remove border. + + + + Disposes image reference and sets it to null. + + Reference to image to dispose. + + + + Disposes image reference and sets it to null. + + Reference to image to dispose. + + + + Invokes the method asynchronously using the WinForms Timer. + + Method to invoke. + + + + Invokes the method asynchronously using the WinForms Timer. + + Method to invoke. + Time in milliseconds after which method is invoked. + + + + Gets or sets whether Fade Animation is enabled on system level for DotNetBar items which use this. Default value is true. + + + + + Gets or sets whether StringFormat internally used by all DotNetBar controls to render text is GenericDefault. Default value is false + which indicates that GenericTypographic is used. + + + + + Gets or sets the anti-alias text rendering hint that will be used to render text on controls that have AntiAlias property set to true. + + + + + Gets or sets whether .NET Framework TextRenderer class is used for text rendering instead of Graphics.DrawString. + Default value is false. + Using TextRenderer will disable the Fade and Animation effects on controls because of issues in TextRenderer when drawing text on transparent + surfaces. + + + + + Gets or sets whether items always generate the Focus accessibility event when mouse enters the item. Default value is false which indicates + that focus event will be raised only when item is on menu bar. + + + + + Gets or sets whether Application Message Filter that is registered by popup controls + is automatically unregistered when last control is disposed. Default value is false and + in most cases should not be changed. + + + + + Get or sets the text-markup padding for text measurement when running on Japanese version of Windows. + + + + + Gets or sets whether Image and Icon resources assigned to items and controls are automatically disposed when + control or item is disposed. Default value is false. + + + + + Defines the base class for items that are used by DotNetBar. + + + + + Represents a content block interface. + + + + + Gets or sets the bounds of the content block. + + + + + Gets or sets whether content block is visible. + + + + + Gets or sets the block margins. + + + + + Creates new instance of BaseItem. + + + + + Creates new instance of BaseItem and assigns item name. + + Item name. + + + + Creates new instance of BaseItem and assigns item name and item text. + + Item Name + Item Text + + + + Serializes the item and all sub-items into the XmlElement. + + XmlElement to serialize the item to. + + + + Deserialize the Item from the XmlElement. + + Source XmlElement. + + + + Indicates whether SubItems collection is serialized. Default value is true. + + + + + Called on each item when ScaleControl method of parent control is called and gives opportunity to item to adjust its displayed based on current scaling. + + Scale factor. + + + + Called when item container has changed. If you override this method you must call the base implementation to allow default processing to occur. + + Previous container of the item. + + + + Called when item parent has changed. + + + + + Returns whether item is enabled including the parent control item is on. + + + + + + Returns whether item is enabled including the parent control item is on. + + + + + + Called when size of the item is changed externally. + + + + + Called when Visibility of the items has changed. + + New Visible state. + + + + Called when item Display state has changed. + + + + + Called when item owner has changed. + + + + + Raises SubItemsChanged event. + + + + + + Occurs after an item has been added to the container. This procedure is called on both item being added and the parent of the item. To distinguish between those two states check the item parameter. + + When occurring on the parent this will hold the reference to the item that has been added. When occurring on the item being added this will be null (Nothing). + + + + Occurs after an item has been removed. + + Item being removed. + + + + Occurs just before Click event is fired. + + + + + Occurs after SubItems Collection has been cleared. + + + + + Occurs before an item is removed. + + Item being removed. + + + + Occurs when IsOnCustomizeMenu property has changed. + + + + + Occurs when IsOnCustomizeDialogChanged property has changed. + + + + + Occurs when item enter or exists the design mode. + + + + + Occurs when tooltip is about to be shown or hidden. + + Specifies whether tooltip is shown or hidden. + + + + Occurs after item has received the input focus. + + Item that received the focus. + + + + Occurs after item has lost the input focus. + + Item that lost the input focus. + + + + Indicates whether the item enabled property has changed. + + + + + Called after TopInternal property has changed + + + + + Called after LeftInternal property has changed + + + + + Occurs when the mouse pointer enters the item. This is used by internal implementation only. + + + + + Occurs when the mouse pointer hovers the item. This is used by internal implementation only. + + + + + Occurs when the mouse pointer leaves the item. This is used by internal implementation only. + + + + + Occurs when the mouse pointer is over the item and a mouse button is pressed. This is used by internal implementation only. + + + + + Occurs when the mouse pointer is over the item and a mouse button is released. This is used by internal implementation only. + + + + + Occurs when a key is pressed down while the item has focus. This is used by internal implementation only. + + + + + Processes the MouseLeave for the current mouse over item. + + + + + Occurs when the mouse pointer is moved over the item. This is used by internal implementation only. + + + + + Occurs when the item is clicked. This is used by internal implementation only. + + + + + Raises the click event and provide the information about the source of the event. + + + + + + Raises the Click event with default source as Code. + + + + + Occurs when the item is double clicked. This is used by internal implementation only. + + + + + Invokes DoubleClick event. + + + + + Occurs when the item receives focus. If overridden base implementation must be called so default processing can occur. + + + + + Occurs when the item has lost the focus. If overridden base implementation must be called so default processing can occur. + + + + + Sets the input focus to the item. If overridden base implementation must be called so default processing can occur. + + + + + Releases the input focus. If overridden base implementation must be called so default processing can occur. + + + + + Occurs when item container has lost the input focus. If overridden base implementation must be called so default processing can occur. + + + + + Occurs when item container receives the input focus. If overridden base implementation must be called so default processing can occur. + + + + + Indicates that item size has changed. It must be called by child item to let the parent know that its size + has been changed. + + + + + Return Sub Item at specified location + + + + + Gets the current expanded subitem. + + + + + + Gets the item that has input focus. + + Item that has focus or Null (Nothing) if none of the subitems have focus. + + + + Gets the owner of the item. + + DotNetBarManager that owns the item. + + + + Recalculate the size of the item. If overridden base implementation must be called so default processing can occur. + + + + + Must be overridden by class that is inheriting to provide the painting for the item. + + + + + Must be overridden by class that is inheriting to provide the method to + return copy of an item. + + + + + Internal Copy implementation. + + Item to copy to. + + + + Returns copy of the item. + + Copy of the item. + + + + Forces the repaint the item. + + + + + Occurs when Expanded state changes. If overridden base implementation must be called so default processing can occur. + + + + + Raises ExpandChange event. + + Event arguments + + + + Occurs when sub item expanded state has changed. + + Sub item affected. + + + + Releases all resurces used in this control. After calling Dispose() + object is not in valid state and cannot be recovered to the valid state. + Recreation of the object is required. + + + + + Occurs after item visual style has changed. + + + + + Occurs after text has changed. + + + + + Returns if passed control is valid. + + Control to test. + + + + + Resets Hoover timer. + + + + + Returns true if any subitem is contained on the control with a given handle. + + Container handle to test. + + + + + Occurs after Tooltip text has changed. + + + + + Sets orientation of the item but it does not cause the recalculate layout flag setting on the parent item. + + New orientation value. + + + + Destroys tooltip window. + + + + + Called when HotSubItem has changed. + + New value. + Old value. + + + + Shows tooltip for this item. + + + + + Returns the shortcut string that is displayed on tooltip. + + + + + + Returns the point in screen coordinates. + + Client point + Point in screen coordinates if there is a parent Control otherwise clientPoint + + + + Collapses all sub items by setting their Expanded property to false. + + Item to collapse. + + + + Collapses all sub items by setting their Expanded property to false. Enumerates all child items as well. + + Item to collapse. + + + + Collapses whole tree for the item starting with its parent. + + Item to collapse. + + + + Returns whether item is hosted on popup menu or bar. + + Item to get information for. + + + + + Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. + + Hash code. + + + + Called when DragStartPoint property has changed. + + Old property value + New property value + + + + Called when Command property value changes. + + + + + Occurs when text markup link is clicked. + + + + + Updates data bindings for item and its sub-items in response to binding context change on parent control. + + + + + Executes the specified delegate, on the thread that owns the control's underlying window handle, with the specified list of arguments. + This property calls directly the ContainerControl.Invoke and is provided as shortcut convenience property only. + + A delegate to a method that takes parameters of the same number and type that are contained in the args parameter. + An array of objects to pass as arguments to the specified method. This parameter can be null reference (Nothing in Visual Basic) if the method takes no arguments. + An Object that contains the return value from the delegate being invoked, or nullNothingnullptra null reference (Nothing in Visual Basic) if the delegate has no return value. + + + + Executes the specified delegate, on the thread that owns the control's underlying window handle, with the specified list of arguments. + This property calls directly the ContainerControl.Invoke and is provided as shortcut convenience property only. + + A delegate to a method that takes parameters of the same number and type that are contained in the args parameter. + An Object that contains the return value from the delegate being invoked, or nullNothingnullptra null reference (Nothing in Visual Basic) if the delegate has no return value. + + + + Executes the specified delegate, on the thread that owns the control's underlying window handle, with the specified list of arguments. + This property calls directly the ContainerControl.BeginInvoke and is provided as shortcut convenience property only. + + A delegate to a method that takes parameters of the same number and type that are contained in the args parameter. + An Object that contains the return value from the delegate being invoked, or nullNothingnullptra null reference (Nothing in Visual Basic) if the delegate has no return value. + + + + Occurs when Item is clicked. + + + + + Occurs when Item is double-clicked. + + + + + Occurs when Item Expanded property has changed. + + + + + Occurs when item loses input focus. + + + + + Occurs when item receives input focus. + + + + + Occurs when mouse button is pressed. + + + + + Occurs when mouse button is released. + + + + + Occurs when mouse enters the item. + + + + + Occurs when mouse leaves the item. + + + + + Occurs when mouse moves over the item. + + + + + Occurs when mouse remains still inside an item for an amount of time. + + + + + Occurs when copy of the item is made. + + + + + Occurs when Text property of an Item has changed. + + + + + Occurs when Visible property of an Item has changed. + + + + + Occurs when Enabled property of an Item has changed. + + + + + Occurs when item's tooltip visibility has changed. + + + + + Occurs when content of SubItems collection has changed. + + + + + Gets or sets whether item is rendered. + + + + + Gets or sets whether item is selectable at design-time. Default value is true. + + + + + Control Container (System.Windows.Forms.Control or its descendant) + + + + + Returns the Parent of the item. + + + + + Gets or sets a value indicating whether the item is enabled. + + + + + Gets or sets whether item separator is shown before this item. + + + + + Gets or sets Left position of this item + + + + + Gets or sets Top position of this item + + + + + Gets or sets Width of this item + + + + + Gets whether item is in right-to-left layout mode. + + + + + Gets or sets Height of this item + + + + + Gets or sets a value indicating whether the item is visible. + + + + + Gets or sets a value indicating whether the item is expanded or not. For Popup items this would indicate whether the item is popped up or not. + + + + + Indicates whether the item will auto-collapse (fold) when clicked. + When item is on popup menu and this property is set to false, menu will not + close when item is clicked. + + + + + Gets or sets whether item will auto expand when mouse is over the item or not. + + + + + Gets the rectangle that represents the display area of the item. + + + + + Gets or sets the size of the item. + + + + + IBlock member implementation + + + + + Specifies whether this item is visual container or not. For example + Tool Menu is not container since it drops-down its items and they are + not "visualy" contained. Also, the pop-up menus, drop-down Bars etc. are not containers. + + + + + Returns true if this item is currently displayed. This property should not be set directly since it is managed by system and container of the item. + + + + + Gets the mouse down coordinates. + + + + + Gets whether item is on context menu created using ContextMenuBar + + + + + Gets whether RaiseClick method will generate a click event give current item state. + + + + + Indicates whether RaiseClick method collapses parent popups before raising click event. Default value is true. + + + + + Gets whether item has input focus. + + + + + Indicates that item is recalculating its size. + + + + + Suspends all layout for the item including painting. Use this property carefully and only to improve performace. + + + + + Indicates whether item is performing layout pass. + + + + + Gets whether layout pass is in progress in the parent chain. + + + + + Gets whether item has been disposed through Dispose method call. + + + + + Returns the collection of sub items. + + + + + Returns count of sub items in SubItems collection that have Visible property set to true. + + + + + Unique ID that indentifies the item. + + + + + Allows the user to associate custom user data with the item. + + + + + Applies new visual style to this the item and all of its sub-items. + + + + + Gets the effective item style. + + + + + Gets or sets whether item will display sub items. + + + + + Gets or sets item alignment inside the container. + + + + + Gets or sets item description. This description is displayed in + Customize dialog to describe the item function in an application. + + + + + Gets or sets whether the item expands automatically to fill out the remaining space inside the container. Applies to Items on stretchable, no-wrap Bars only. + + + + + Gets/Sets informational text (tooltip) for the item. + + + + + Returns category for this item. If item cannot be customzied using the + customize dialog category is empty string. + + + + + Returns name of the item that can be used to identify item from the code. + + + + + Gets or sets the global name of the item that is used to synchronize the Global properties for the item across all instances with same + global name. Note that only instances that belong to the same control are synchronized. GlobalItem must be set to true to perform the synchronization. + You can find more information and list of + properties that are synchronized in help file. + + + + + Gets whether global properties should synchronized. + + + + + Gets orientation within container that is supported by this item. If item does not support certain orientation the container automatically hides it when container switches into that orientation. + + + + + Gets or sets whether item is global or not. + This flag is used to propagate property changes to all items with the same name. + Setting for example Visible property on the item that has GlobalItem set to true will + set visible property to the same value on all items with the same name. + + + + + Gets or sets orientation inside the container. Do not change the value of this property. It is managed by system only. + + + + + Gets whether tooltip for the item is displayed. + + + + + Gets whether tooltip is visible or not. + + + + + Gets or sets the name of the bar this item originated on. This is used to remember the + originating bar when user is moving the items from bar to bar. + + + + + Gets or sets item's original position (index) if item position has changed due to the user customization. + + + + + Gets or sets flag that indicates whether item was customize by the end-user. + + + + + Gets reference to the tooltip control if tooltip is displayed for this item. + + + + + Gets or sets the Key Tips access key or keys for the item when on Ribbon Control or Ribbon Bar. Use KeyTips property + when you want to assign the one or more letters to be used to access an item. For example assigning the FN to KeyTips property + will require the user to press F then N keys to select an item. Pressing the F letter will show only keytips for the items that start with letter F. + + + + + Gets or sets the text associated with this item. + + + + + Gets or sets whether item can be customized by end user. + + + + + Returns whether item is hosted on Customize menu. + + + + + Returns whether item is hosted on Customize Dialog. + + + + + Returns whether item is hosted on menu or not. + + + + + Returns whether item is hosted on menu bar or not. + + + + + Returns whether item is hosted on bar or not. + + + + + Returns whether item is in design mode or not. + + + + + Get or sets whether item has been changed in a way that it needs its size recalculated. This is internal + property and it should not be used by your code. + + + + + Returns whether item is System item. + + + + + Indicates whether access key processing set using ampersand key in Text is enabled. When enabled, and access key is pressed, item will raise Click event. + + + + + Return Access key for the item. + + + + + Gets or sets the collection of shortcut keys associated with the item. + + + + + Returns text representation of shortcut for this item. + + + + + Gets or sets whether Click event will be auto repeated when mouse button is kept pressed over the item. + + + + + Gets or sets the auto-repeat interval for the click event when mouse button is kept pressed over the item. + + + + + Gets or sets the design-marker orientation for the item. + + + + + + Specifes the mouse cursor displayed when mouse is over the item. + + + + + Indicates whether item will be Serialized. + + + + + Specifies whether item is drawn using Themes when running on OS that supports themes like Windows XP. + + + + + Gets the AccessibleObject assigned to the item. + + + + + Gets or sets the default action description of the control for use by accessibility client applications. + + + + + Gets or sets the description of the control used by accessibility client applications. + + + + + Gets or sets the name of the control used by accessibility client applications. + + + + + Gets or sets the accessible role of the item. + + + + + Gets or sets a value indicating whether the item is visible to accessibility applications. + + + + + Gets the item state inside of the parent container. + + + + + Gets or sets item margin only used by certain items in certain containers. Provided only for internal DotNetBar use. + + + + + Gets or sets the command assigned to the item. Default value is null. + Note that for ButtonItem instances if this property is set to null and command was assigned previously, Enabled property will be set to false automatically to disable the item. + + + + + Gets or sets user defined data value that can be passed to the command when it is executed. + + + + + Gets reference to parsed markup body element if text was markup otherwise returns null. + + + + + Gets plain text without text-markup if text-markup is used in Text. + + + + + Gets whether item supports text markup. Default is false. + + + + + Gets a value indicating whether the caller must call an invoke method when making method calls to the item because the caller is on a different thread than the one the item was created on. + This property calls directly the ContainerControl.InvokeRequired and is provided as shortcut convinience property only. + + + + + Defines item parent container states. + + + + + State is not set. + + + + + Item in on the NavigationPane in normal size. + + + + + Represents the controller which allows single BaseItem to be hosted on the control. + + + + + Initializes a new instance of the BaseItemController class. + + + + + + + Returns the renderer control will be rendered with. + + The current renderer. + + + + Defines class which described single binding. + + + + + Raises Format event. + + Provides event arguments. + + + + Initializes a new instance of the BindingDef class. + + + + + Initializes a new instance of the BindingDef class. + + + + + + + Updates specified item PropertyName with the data from data object property specified by DataMember. + + Item to set PropertyName on. + Data to retrieve DataMember value from. + + + + Updates specified item PropertyName with the data from data object property specified by DataMember. + + CurrencyManager to use + Item to set PropertyName on. + Data to retrieve DataMember value from. + + + + Called when PropertyName property has changed. + + Old property value + New property value + + + + Called when DataMember property has changed. + + Old property value + New property value + + + + Called when FormattingEnabled property has changed. + + Old property value + New property value + + + + Called when FormatString property has changed. + + Old property value + New property value + + + + Called when FormatInfo property has changed. + + Old property value + New property value + + + + Called when NullValue property has changed. + + Old property value + New property value + + + + Raises the PropertyChanged event. + + Provides event arguments. + + + + Gets or sets the property name binding is attached to. + + + + + Gets the reference to BindingMemberInfo created based on DataMember. + + + + + Gets or sets the data member name which holds data that PropertyName is populated with. + + + + + Gets or sets whether type conversion and formatting is applied to the property data. + + + + + Gets or sets format specifier characters that indicate how a value is to be displayed. + For more information, see Formatting Overview: http://msdn.microsoft.com/en-us/library/26etazsy%28v=vs.71%29.aspx + + + + + Gets or sets the IFormatProvider that provides custom formatting behavior. + + + + + Gets or sets the Object to be set as the target property when the data source contains a DBNull value. + The data source must contain DBNull for the NullValue property to be correctly applied. + If the data source type is a type such as a string or integer the value of the NullValue property will be ignored. + Also, the NullValue property is ignored if it is set to null. + + + + + Occurs when property on BindingDef object has changed. + + + + + Represents the method that will handle converting for bindings. + + + + + + + Gets the reference to the item being converted. + + + + + Get the reference to the name of the field or property on the item that needs conversion. + + + + + Represents BindingDefConverer converter. + + + + + Creates new instance of the class. + + + + + Checks whether conversion can be made to specified type. + + Context Information. + Destination type. + + + + + Converts object to specified type. + + Context information. + Culture information. + Object to convert. + Destination type. + Object converted to destination type. + + + + Represents the toolbar control with the magnifying (bubbling) buttons. + + + + + Creates new instance of the control. + + + + + Indicates whether property should be serialized. Used by the Windows Forms design-time support. + + + + + Resets the property to default value. Used by the Windows Forms design-time support. + + + + + Indicates whether property should be serialized. Used by the Windows Forms design-time support. + + + + + Resets the property to default value. Used by the Windows Forms design-time support. + + + + + Returns whether property should be serialized by Windows Forms designer. + + True if property is different than default value otherwise false. + + + + Returns whether property should be serialized by Windows Forms designer. + + True if property is different than default value otherwise false. + + + + Recalculates the layout of the control. This method should be called after all changes to the tabs, buttons are completed so + layout of the control recalculated. + + + + + Raises ItemLayoutUpdated event. + + Provides event arguments. + + + + Returns reference to the button at specified location + + x - coordinate + y - coordinate + Reference to the button or null if no button could be found at given coordinates. + + + + Returns reference to the button at specified location + + Location coordinates + Reference to the button or null if no button could be found at given coordinates. + + + + Returns tab at specific location. + + Coordinates to get the tab from. + Reference to the tab object or null if tab cannot be found at specified location + + + + Returns tab at specific location. + + x - coordinate + y - coordinate + Reference to the tab object or null if tab cannot be found at specified location + + + + Invokes BubbleStart event. + + + + + Invokes BubbleEnd event. + + + + + Invokes ButtonClick event on the control. + + Reference to the button that was clicked. + + + + Called after overlay window became inactive. + + + + + Stops the bubble animation effect is one is applied currently. + + + + + Internal processing of MouseMove event. + + Move move event arguments. + + + + Internal processing for MouseLeave event. + + Event arguments + + + + Called after all buttons have been removed. + + Tab from which all buttons were removed. + + + + Called after specified button has been removed. + + Tab from which button was removed. + Button that was removed. + + + + Called after new button is added to the Buttons collection. + + Tab to which button was added. + Reference to the button added. + + + + Called when Visible property of Button has changed. + + Button affected. + + + + Returns the button background rectangle for display purposes. Applies setting for the ButtonBackgroundStretch property. + + Background rectangle. + + + + Called after tab has been removed from the collection. + + Tab that was removed. + + + + Called after tab has been added to the collection. + + Newly added tab. + + + + Called after all tabs are removed from the collection. + + + + + Called after text of a tab has changed. + + Tab which text has changed. + + + + Called after Visible property of the tab has changed. + + Tab affected. + + + + Sets the tab mouse is placed over. + + Tab that mouse is currently over or null if mouse is not over any tab. + + + + Occurs when active tab is about to change. + + + + + Occurs when any of the buttons is clicked. Sender object should be casted to BubbleButton to get the button that was actually clicked. + + + + + Occurs when mouse first enters the control and bubble effect is employed to provide feedback. + + + + + Occurs when mouse leaves the control and bubble effect is ended. + + + + + Gets or sets the bubble button tooltip text color. Default value is White color. + + + + + Gets or sets the bubble button tooltip text outline color. Default value is Black color. + + + + + Gets or sets the spacing in pixels between buttons. Default value is 0. + + + + + Gets or sets whether background for the buttons is stretched to consume complete width of the control. Default value is true. + + + + + Gets the style for the background of the control. + + + + + Gets the style for the background of the buttons. + + + + + Gets the bounds of the buttons back area. + + + + + Gets the bounds of the tabs area. + + + + + Gets or sets the duration of animation that is performed when mouse enters a button for the first time or when mouse has left the control. + + + + + Gets or sets whether bubble animation is enabled. Default value is true. + + + + + Gets or sets whether anti-alias smoothing is used while painting. + + + + + Gets or sets ImageList for images used on buttons. These images will be used as images for the buttons that are not magnified. + Use ImagesLarge to specify the magnified images for the coresponding images based on the index in this list. + + + + + Gets or sets ImageList for large-sized images used on buttons when button is magnified. + + + + + Gets or sets whether tooltips are displayed for the buttons. + + + + + Gets or sets size of the images when button is enlarged, default value is 48 by 48 pixels. Note that you should provide the + images in the same size for the buttons through the image properties on the buttons or through ImagesLarge property. + If the large images are not provided the regular button image will be automatically enlarged. + + + + + Gets or sets the normal image size for the buttons, default value is 24 by 24 pixels. This should be set to the default image size that you will use on the + buttons. If the images specified for the buttons are not of the same size as the size specified here then they will + be automatically resized. Normal size must always be smaller than the size specified by ImageSizeLarge property. + + + + + Gets or sets the font that is used to display tooltips. + + + + + Gets or sets the selected tab. + + + + + Gets the reference to the colors that are used when tab is selected. + + + + + Gets the reference to the colors that are used when mouse is over the tab. + + + + + Gets the collection of all tabs. + + + + + Gets or sets the button alignment. + + + + + Gets or sets whether tabs are visible. Default value is true. + + + + + Occurs after internal item layout has been updated and items have valid bounds assigned. + + + + + Delegate for tab change events. + + + + + Represents the event arguments tab changing events. + + + + + Cancels the operation. + + + + + Specifies the event source. + + + + + Specifies newly selected tab. + + + + + Specifies currently selected tab. + + + + + Default Constructor. + + + + + Represents overlay class to support bubble effects on BubbleBar control. + + + + + Called just before window is shown. + + + + + Called after window is closed. + + + + + Summary description for BubbleBarGroup. + + + + + Represents interface for simple text only tab. + + + + + Returns the font used for tab text. + + Reference to font object. + + + + Gets or sets the text displayed on the tab. + + + + + Gets or sets whether tab is visible. + + + + + Gets the display bounds of the tab. + + + + + Gets or sets the background color of the tab when inactive. + + + + + Gets or sets the target gradient background color of the tab when inactive. + + + + + Gets or sets the gradient angle. + + + + + Gets or sets the light border color when tab is inactive. + + + + + Gets or sets the dark border color when tab is inactive. + + + + + Gets or sets the border color when tab is inactive. + + + + + Gets or sets the text color when tab is inactive. + + + + + Gets or sets name of the tab item that can be used to identify item from the code. + + + + + Gets or sets the predefined tab color. + + + + + Returns true if tab is selected tab. + + + + + Returns true if mouse is over the tab. + + + + + Gets the tab alignment. + + + + + Default constructor. + + + + + Default constructor. + + Container object. + + + + Returns the font for the tab text. + + Reference to the font object. + + + + Sets the parent of the tab. + + Reference to the tab parent object or null. + + + + Called after new button is added to the Buttons collection. + + Reference to the added button. + + + + Called after specified button has been removed. + + Button that was removed. + + + + Called after all buttons have been removed. + + + + + Gets the collection of the buttons associated with the tab. + + + + + Gets or sets the text displayed on the tab. + + + + + Gets or sets whether tab is visible. + + + + + Gets the display bounds of the tab. + + + + + Gets or sets the object that contains data about the tab. Any Object derived type can be assigned to this property. If this property is being set through the Windows Forms designer, only text can be assigned. + + + + + Gets or sets the object that contains data about the tab. Any Object derived type can be assigned to this property. If this property is being set through the Windows Forms designer, only text can be assigned. + + + + + Gets or sets the background color of the tab when inactive. + + + + + Gets or sets the target gradient background color of the tab when inactive. + + + + + Gets or sets the gradient angle. + + + + + Gets or sets the light border color when tab is inactive. + + + + + Gets or sets the dark border color when tab is inactive. + + + + + Gets or sets the border color when tab is inactive. + + + + + Gets or sets the text color when tab is inactive. + + + + + Gets or sets name of the tab item that can be used to identify item from the code. + + + + + Gets or sets the predefined tab color. + + + + + Returns true if tab is selected tab. + + + + + Returns true if mouse is over the tab. + + + + + Gets the tab alignment. + + + + + Returns reference to parent object or null if tab does not have parent. + + + + + Gets or sets whether tab has design-time focus. + + + + + Gets or sets the bounds of the content block. + + + + + Gets or sets item margin only used by certain items in certain containers. Provided only for internal DotNetBar use. + + + + + Represents collection for BubbleBarTab objects. + + + + + Adds new object to the collection. + + Object to add. + Index of newly added object. + + + + Inserts new object into the collection. + + Position of the object. + Object to insert. + + + + Returns index of the object inside of the collection. + + Reference to the object. + Index of the object. + + + + Returns whether collection contains specified object. + + Object to look for. + true if object is part of the collection, otherwise false. + + + + Removes specified object from the collection. + + + + + + Copies collection into the specified array. + + Array to copy collection to. + Starting index. + + + + Copies contained items to the IBlock array. + + Array to copy to. + + + + Copies contained items to the ISimpleTab array. + + Array to copy to. + + + + Returns next visible tab from the reference tab. + + Reference tab. + Next visible tab or null if next visible tab cannot be determined. + + + + Returns previous visible tab from the reference tab. + + Reference tab. + Previous visible tab or null if Previous visible tab cannot be determined. + + + + Returns reference to the object in collection based on it's index. + + + + + Represents a button used on BubbleBar control. + + + + + Creates new instance of button object. + + + + + Sets the display rectangle of the button. + + New display rectangle of the button. + + + + Sets the magnified display rectangle of the button. + + New magnified display rectangle. + + + + Sets whether mouse is over the button. + + True if mouse is over the button otherwise false. + + + + Raises the MouseEnter event. + + + + + Raises the MouseLeave event. + + + + + Sets whether left mouse button is pressed over this button. + + True if left mouse button is pressed otherwise false. + + + + Sets the parent collection button belongs to. + + Parent collection of the item. + + + + Returns the reference to the BubbleBar that contains this button. + + + + + + Invokes button's Click event. + + Indicates source of the event. + + + + Raises click event. + + Default event arguments. + + + + Occurs when user clicks the button. + + + + + Occurs when mouse enters the button. + + + + + Occurs when mouse leaves the button. + + + + + Gets or sets the shortcut key to expand/collapse splitter. + + + + + Gets or sets the tooltip for the button. + + + + + Gets or sets the default image used on the button. Note that for improved appearance of the buttons when enlarged + you should set the ImageIndexLarge to the large version of the image specified here. The image size should be the same size + that is specified by the image size properties on BubbleBar object. + + + + + Gets reference to the internal cached image loaded from the ImageIndex. + + + + + Gets reference to the internal cached image loaded from the ImageIndex. + + + + + Specifies the Button image. + + + + + Specifies enlarged the Button image. + + + + + Gets or sets the image index of the enlarged image for the button. Note that if large image is not specified the + default image will be enlarged which might not result in perfect image appearance. + + + + + Property for Property Editor support for ImageIndex selection. + + + + + Gets or sets a value indicating whether button is enabled. + + + + + Gets the display rectangle occupied by the button. + + + + + Gets or sets the magnified display rectangle of the button. + + + + + Gets whether mouse is over the button. + + + + + Gets whether left mouse button is pressed on the button. + + + + + Returns name of the button that can be used to identify it from the code. + + + + + Gets or sets a value indicating whether button is visible. + + + + + Gets or sets the object that contains data about the tab. Any Object derived type can be assigned to this property. If this property is being set through the Windows Forms designer, only text can be assigned. + + + + + Gets or sets the object that contains data about the tab. Any Object derived type can be assigned to this property. If this property is being set through the Windows Forms designer, only text can be assigned. + + + + + Returns the reference to parent tab. + + + + + Gets or sets whether button has design-time focus. + + + + + Gets or sets the mouse cursor that is displayed when mouse is over the button. + + + + + Gets or sets the bounds of the content block. + + + + + Gets or sets item margin only used by certain items in certain containers. Provided only for internal DotNetBar use. + + + + + Represents event arguments for Click event. + + + + + Gets the action that caused the event, event source. + + + + + Represents typed collection of BubbleButton objects. + + + + + Copies contained items to the IBlock array. + + Array to copy to. + + + + Creates new instance of the collection. + + Parent of the collection. + + + + Adds new item to the collection but it does not raise internal events. + + New item to add. + Index of newly added item. + + + + Adds new item to the collection at specified location but it does not raise internal events. + + New item to add. + Position to add item to. + + + + Clears the collection but it does not raise internal events. + + + + + Performs additional custom processes before setting a value in the CollectionBase instance. + + The zero-based index at which oldValue can be found. + The value to replace with newValue. + The new value of the element at index. + + + + Performs additional custom processes after setting a value in the CollectionBase instance. + + The zero-based index at which oldValue can be found. + The value to replace with newValue. + The new value of the element at index. + + + + Performs additional custom processes before inserting a new element into the CollectionBase instance. + + The zero-based index at which to insert value. + The new value of the element at index. + + + + Performs additional custom processes after inserting a new element into the CollectionBase instance. + + The zero-based index at which to insert value. + The new value of the element at index. + + + + Performs additional custom processes when removing an element from the CollectionBase instance. + + The zero-based index at which value can be found. + The value of the element to remove from index. + + + + Performs additional custom processes after removing an element from the CollectionBase instance. + + The zero-based index at which value can be found. + The value of the element to remove from index. + + + + Removes an item without raising internal events. + + Item to remove. + + + + Performs additional custom processes when clearing the contents of the CollectionBase instance. + + + + + Copies the collection to the ArrayList object. + + Target ArrayList. + + + + Adds new item to the collection. + + New item to add. + Index of newly added item. + + + + Adds new item to the collection at specified location. + + New item to add. + Position to insert item at. Position of -1 will append the item to the end of the collection. + Index of the newly added item. + + + + Inserts new item at the specified position. + + Position to insert item at. + Item to insert. + + + + Returns index of an item. + + Item to return index for. + Item at the specified position. + + + + Returns index of an item with given the item's name. + + Name of the item. + Index of the Item with the specified name or -1 if item is not found. + + + + Returns true if given item is contained by this collection. + + Item to test. + True if item is part of this collection otherwise false. + + + + Returns true if item with given name is part of this collection. + + Item name. + True if item is part of this collection otherwise false. + + + + Removes an item from the collection. + + Item to remove. + + + + Removes an item from collection at specified index. + + Index of the item to remove. + + + + Removes item from the collection with specified name. + + Name of the item to remove. + + + + Adds array of the items to the collection. + + Array of items to add. + + + + Copy the collection to the array. + + Array to copy collection to. + The zero-based relative index in array at which copying begins. + + + + Gets the parent of the collection. + + + + + Accesses items inside of the collection based on the index. + + + + + Accesses items inside of the collection based on the name. + + + + + Represents class for displaying BubbleButton objects on canvas. + + + + + Paints button on given canvas. + + Painting information. + + + + Represents class that holds information for BubbleButton painting. + + + + + Graphics object. + + + + + Button to paint. + + + + + Reference to BubbleBar control. + + + + + Gets or sets whether magnified version of the button is painted. + + + + + Gets or sets the button alignment inside of the bar. + + + + + Represents class for default layout of the BubbleButton objects. + + + + + Represents block layout manager responsible for sizing the content blocks. + + + + + Resizes the content block and sets it's Bounds property to reflect new size. + + Content block to resize. + Content size available for the block in the given line. + + + + Performs layout finalization + + + + + + + + + Gets or sets the graphics object used by layout manager. + + + + + Creates new instance of the class. + + + + + Resizes the content block and sets it's Bounds property to reflect new size. + + Content block to resize. + + + + Represents class that provides mangification for the BubbleMar control + + + + + Represents the serial content layout manager that arranges content blocks in series next to each other. + + + + + Represents interface for block layout. + + + + + Performs layout of the content block. + + Container bounds to layout content blocks in. + Content blocks to layout. + Block layout manager that resizes the content blocks. + The bounds of the content blocks within the container bounds. + + + + Creates new instance of the class. + + + + + Performs layout of the content block. + + Container bounds to layout content blocks in. + Content blocks to layout. + Block layout manager that resizes the content blocks. + The bounds of the content blocks within the container bounds. + + + + Occurs when X, Y position of next block is calcualted. + + + + + Occurs before new block is layed out. + + + + + Indicates whether space to the left of center and right aligned blocks is blocked out by stretching the block so it consumes that space. + + + + + Gets or sets the spacing in pixels between content blocks. Default value is 0. + + + + + Gets or sets whether content blocks are forced to fit the container bounds if they + occupy more space than it is available by container. Default value is false. + + + + + Gets or sets whether content blocks are resized to fit the container bound if they + occupy less space than it is available by container. Default value is false. + + + + + Gets or sets whether content blocks are resized (Width) to fit container bounds if they + occupy less space than the actual container width. Applies to the Vertical orientation only. Default value is false. + + + + + Gets or sets whether content blocks are resized (Height) to fit container bounds if they + occupy less space than the actual container height. Applies to the Horizontal orientation only. Default value is false. + + + + + Gets or sets the content orientation. Default value is Horizontal. + + + + + Gets or sets the content vertical alignment. Default value is Middle. + + + + + Gets or sets the block line vertical alignment. Default value is Middle. + + + + + Gets or sets the content horizontal alignment. Default value is Left. + + + + + Gets or sets whether all content blocks are resized so they have same height which is height of the tallest content block. Default value is false. + + + + + Gets or sets whether oversized blocks are resized based on the percentage reduction instead of based on equal pixel distribution. Default value is false. + + + + + Gets or sets whether content is wrapped into new line if it exceeds the width of the container. + + + + + Gets or sets whether layout is right-to-left. + + + + + Gets or sets whether all items are equaly sized based on the size of the largest item in the list. + + + + + Performs layout of the content block. + + Container bounds to layout content blocks in. + Content blocks to layout. + Block layout manager that resizes the content blocks. + The bounds of the content blocks within the container bounds. + + + + Gets or sets the bubble size for the mouse over item. + + + + + Gets or sets magnification factor for the item that is at the position MouseOverIndex-1 + + + + + Gets or sets magnification factor for the item that is at the position MouseOverIndex-2 + + + + + Gets or sets magnification factor for the item that is at the position MouseOverIndex+1 + + + + + Gets or sets magnification factor for the item that is at the position MouseOverIndex+2 + + + + + Gets or sets the index of the item mouse is over. + + + + + Gets or sets new X coordinate of the mouse over item when in horizontal layout or Y + coordinate when in vertical layout. + + + + + Summary description for ButtonItem. + + + + + PopupItem Class can pop-up it's subitems on either the popup Bar + or menu. + + + + + Adds neccessary functions to base item so it supports images properly. + If your item implements images you should derive from this class instead of BaseItem + + + + + Create new instance of ImageItem. + + + + + Create new instance of ImageItem and assigns the item name. + + Item name. + + + + Create new instance of ImageItem and assigns the item name and text. + + Item name. + Item text. + + + + Must be called by any sub item that implements the image when image has changed + + + + + Called after image on an item has changed. + + + + + Refreshes internal image size structure. + + + + + Occurs after an item has been removed. + + Item being removed. + + + + Refreshes internal image size structure. + + + + + When parent items does recalc size for its sub-items it should query + image size and store biggest image size into this property. + + + + + Provides design-time support for DotNetBar items. + + + + + Creates new instance of PopupItem. + + + + + Creates new instance of PopupItem and assigns the name to it. + + Item name + + + + Creates new instance of PopupItem and assigns the name and text to it. + + Item name. + Item text. + + + + Copies the PopupItem specific properties to new instance of the item. + + New ButtonItem instance. + + + + Occurs when the mouse pointer is moved over the item. This is used by internal implementation only. + + + + + Occurs when the mouse pointer is over the item and a mouse button is released. This is used by internal implementation only. + + + + + Displays the sub-items on popup menu. + + Popup location. + + + + Invokes PopupOpen event. + + + + + + Displays the sub-items on popup menu. + + Horizontal coordinate in pixels of the upper left corner of a popup. + Vertical coordinate in pixels of the upper left corner of a popup. + + + + Displays the sub-items on popup menu. + + Horizontal coordinate in pixels of the upper left corner of a popup. + Vertical coordinate in pixels of the upper left corner of a popup. + Indicates whether screen position of the menu is verified so the menu always appears on the screen. + + + + Raises PopupShowing event. + + Event arguments. + + + + Displays the sub-items on popup toolbar. + + Popup location. + + + + Displays the sub-items on popup toolbar. + + Horizontal coordinate in pixels of the upper left corner of a popup. + Vertical coordinate in pixels of the upper left corner of a popup. + + + + Displays popup container. + + Popup location. + + + + Creates the popup container control which is a parent/holder control for the controls you want to display on the popup. + This method can be used if you do not wish to handle the PopupContainerLoad to add controls to the popup container. + After calling this method you can access PopupContainerControl property to add your controls to be displayed on the popup. + + Indicates whether PopupContainerLoad events are fired. + + + + Displays popup container. + + Horizontal coordinate in pixels of the upper left corner of a popup. + Vertical coordinate in pixels of the upper left corner of a popup. + + + + Displays the sub-items on popup specified by PopupType. + + Popup location. + + + + Displays the sub-items on popup specified by PopupType. + + Horizontal coordinate in pixels of the upper left corner of a popup. + Vertical coordinate in pixels of the upper left corner of a popup. + + + + Raises PopupClose event. + + Event arguments. + + + + Queries whether popup can be closed. + + Source of closing request. + true if popup can be closed otherwise false. + + + + Closes the currently open popup. + + + + + Raises PopupFinalized event. + + Event arguments. + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Sets the SourceControl for popup menu or toolbar. + + Control that popup menu or toolbar was invoked for. + + + + Occurs when popup container is loading. Use this event to assign control to the popup container. If you want to use same control + that you added to the popup container after popup is closed you must handle the PopupContainerUnload event and remove the control + from the popup container so it is not disposed with the container. + + + + + Occurs when popup container is unloading. Use this event to save any state associated with the control that was contained by the container or + to remove the control from the container so it is not disposed with container. + + + + + Occurs when popup item is about to open. + + + + + Occurs while popup item is closing. + + + + + Occurs while popup item is closing. + + + + + Occurs after popup item has been closed. + + + + + Occurs just before popup window is shown. + + + + + Gets the size of the popup before it is displayed. + + + + + Gets or sets whether popup on-screen position is verified and popup location adjusted so it does not cross boundaries of the screen. + + + + + Indicates whether sub-items are shown on popup Bar or popup menu. + + + + + Indicates the font that will be used on the popup window. + + + + + Indicates side bar for pop-up window. + + + + + Gets or sets the location of popup in relation to it's parent. + + + + + Gets or sets the popup offset. + + + + + Gets or sets the popup location. + + + + + Indicates when menu items are displayed when MenuVisiblity is set to VisibleIfRecentlyUsed and RecentlyUsed is true. + + + + + Indicates Animation type for Popups. + + + + + Specifies the inital width for the Bar that hosts pop-up items. Applies to PopupType.Toolbar only. + + + + + Gets the control that is displaying the context menu. + + + + + Gets the reference to the internal host PopupContainerControl control. + + + + + Provides support for personalized menu items. + + + + + Creates new instance of ButtonItem. + + + + + Creates new instance of ButtonItem and assigns the name to it. + + Item name. + + + + Creates new instance of ButtonItem and assigns the name and text to it. + + Item name. + item text. + + + + Returns copy of the item. + + + + + Copies the ButtonItem specific properties to new instance of the item. + + New ButtonItem instance. + + + + Copies the ButtonItem specific properties to new instance of the item. + + New ButtonItem instance. + + + + Overloaded. Serializes the item and all sub-items into the XmlElement. + + XmlElement to serialize the item to. + + + + Overloaded. Deserializes the Item from the XmlElement. + + Source XmlElement. + + + + Called when NotificationMarkText property has changed. + + Old property value + New property value + + + + Called when NotificationMarkPosition property has changed. + + Old property value + New property value + + + + Called when NotificationMarkSize property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when NotificationMarkOffset property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when Symbol property has changed. + + Old property value + New property value + + + + Called when SymbolSet property value changes. + + Indciates old value + Indicates new value + + + + Called when SymbolSize property has changed. + + Old property value + New property value + + + + Called when button image has changed. + + + + + Called when container of the item has changed. + + Previous item container. + + + + Overriden. Draws the item. + + Item paint arguments. + + + + Resets ImageFixedSize property to its default value. + + + + + Gets whether ImageFixedSize property should be serialized. + + + + + Gets whether FixedSize property should be serialized. + + + + + Resets the property to default value. + + + + + Overridden. Recalculates the size of the item. + + + + + Overloaded. Called when size of the item is changed externally. + + + + + Starts the button pulse effect which alternates slowly between the mouse over and the default state. The pulse effect + continues indefinitely until it is stopped by call to StopPulse method. + + + + + Starts the button pulse effect which alternates slowly between the mouse over and the default state. Pulse effect + will alternate between the pulse state for the number of times specified by the pulseBeatCount parameter. + + Specifies the number of times button alternates between pulse states. 0 indicates indefinite pulse + + + + Stops the button Pulse effect. + + + + + Indicates whether the item enabled property has changed. + + + + + Provides internal implementation for ButtonItem mouse down events. + + Mouse event arguments. + + + + Occurs when the item is double clicked. This is used by internal implementation only. + + + + + Returns the Font object to be used for drawing the item text. + + Font object. + + + + Called after Checked property has changed. + + + + + Called when Visibility of the items has changed. + + New Visible state. + + + + Sets Checked property without firing any events or performing any built-in logic. + + + + + Fires CheckedChanged event. + + + + + Fires OptionGroupChanging event. + + + + + Occurs just before Click event is fired. + + + + + Returns the shortcut string that is displayed on tooltip. + + + + + + Gets or sets the current font for the button. + + + + + Creates new ButtonItem with text set to corresponding item from string array and adds it to SubItems collection. + + + + + + Creates new ButtonItem with text set to corresponding item from string array and adds it to SubItems collection. + + Click event handler assigned to each item + + + + Occurs when Checked property has changed. + + + + + Occurs before an item in option group is checked and provides opportunity to cancel that. + + + + + Indicates whether images assigned to the button are disposed when button is disposed. Default value is false. + + + + + Specifies maximum of 2 character text displayed inside of the notification mark on top of the button. + + + + + Indicates the position of the notification marker within the bounds of the button. + + + + + Specifies diameter of notification mark. When set to 0 system default value is used. + + + + + Gets or sets background color of the notification mark. + + + + + Specifies the offset for the notification mark relative to its position. + + + + + Gets/Sets the image position inside the button. + + + + + Gets or sets the custom color name. Name specified here must be represented by the corresponding object with the same name that is part + of the Office2007ColorTable.RibbonTabItemColors collection. See documentation for Office2007ColorTable.RibbonTabItemColors for more information. + If color table with specified name cannot be found default color will be used. Valid settings for this property override any + setting to the Color property. + Applies to items with Office 2007 style only. + + + + + Gets or sets the predefined color of the button. Color specified applies to buttons with Office 2007 style only. It does not have + any effect on other styles. Default value is eButtonColor.Default + + + + + Gets/Sets the button style which controls the appearance of the button elements. Changing the property can display image only, text only or image and text on the button at all times. + + + + + Indicates whether the item will auto-expand when clicked. + When item is on top level bar and not on menu and contains sub-items, sub-items will be shown only if user + click the expand part of the button. Setting this property to true will expand the button and show sub-items when user + clicks anywhere inside of the button. Default value is false which indicates that button is expanded only + if its expand part is clicked. + + + + + Gets or sets the color of the Symbol. + + + + + Gets the realized symbol string. + + + + + Indicates the symbol displayed on face of the button instead of the image. Setting the symbol overrides the image setting. + + + + + Gets or sets the symbol set used to represent the Symbol. + + + + + Indicates the size of the symbol in points. + + + + + Specifies the Button icon. Icons support multiple image sizes and alpha blending. + + + + + Specifies the Button image which is used when button background is black or very dark. Image is used when button text is white. This is provided for Metro style applications. + + + + + Specifies the Button image. + + + + + Specifies the small Button image used by Ribbon control when small image variant is needed because of the automatic button resizing or + because the button is on the Quick Access Toolbar. + + + + + Gets or sets the image size that is used by the button when multiple ImageList controls are used as source for button image. + By default ImageList assigned to Images property of parent control is used. Using this property you can selection ImagesMedium or + ImagesLarge ImageList to be used as source for image for this button. + + + + + Gets or sets whether button uses the ImageSmall as source of the image displayed on the button if ImageSmall is set to valid image. Default value is false. + + + + + Specifies the index of the image for the button if ImageList is used. + + + + + Specifies the image for the button when mouse is over the item. + + + + + Specifies the index of the image for the button when mouse is over the item when ImageList is used. + + + + + Specifies the image for the button when mouse left button is pressed. + + + + + Specifies the index of the image for the button when mouse left button is pressed and ImageList is used. + + + + + Specifies the image for the button when items Enabled property is set to false. + + + + + Specifies the index of the image for the button when items Enabled property is set to false and ImageList is used. + + + + + Sets fixed size of the image. Image will be scaled and painted it size specified. + + + + + Gets or sets the fixed size of the button. Both width and height must be set to value greater than 0 in order for button to use fixed size. + Setting both width and height to 0 (default value) indicates that button will be sized based on content. + + + + + Gets whether fade effect is enabled. + + + + + Gets whether Pulse function is enabled. + + + + + Gets whether the button is currently pulsing, alternating slowly between the mouse over and default state. + + + + + Gets or sets whether pulse effect started with StartPulse method stops automatically when mouse moves over the button. Default value is true. + + + + + Gets or sets the pulse speed. The value must be greater than 0 and less than 128. Higher values indicate faster pulse. Default value is 12. + + + + + Gets or sets whether button auto-expands on mouse hover when button is used as menu-item and displayed on menu. Default value is true. + + + + + Indicates whether button should popup when clicked automatically. + + + + + Gets or sets whether Checked property is automatically inverted, button checked/unchecked, when button is clicked. Default value is false. + + + + + Gets or set a value indicating whether the button is in the checked state. + + + + + Gets or set the alternative shortcut text. + + + + + Returns shortcut text if any that needs to be displayed. + + + + + Gets or sets the image bounds. + + + + + Gets or sets sub items bounds. + + + + + Gets or sets text bounds. + + + + + Gets or set the Group item belongs to. The groups allows a user to choose from mutually exclusive options within the group. The choice is reflected by Checked property. + + + + + Gets or sets the text color of the button. + + + + + Gets or sets the text color of the button when mouse is over the item. + + + + + Gets or sets whether the font used to draw the item text is underlined when mouse is over the item. + + + + + Gets or sets whether the font used to draw the item text is bold when mouse is over the item. + + + + + Gets or sets whether the font used to draw the item text is bold. + + + + + Gets or sets whether the font used to draw the item text is italic. + + + + + Gets or sets whether the font used to draw the item text is underlined. + + + + + Gets or sets the width of the expand part of the button item. + + + + + Returns the collection of sub items. + + + + + Gets or sets whether button appears as split button. Split button appearance divides button into two parts. Image which raises the click event + when clicked and text and expand sign which shows button sub items on popup menu when clicked. Button must have both text and image visible (ButtonStyle property) in order to appear as a full split button. + Use AutoExpandOnClick=true if you want to make complete surface of the button display popup when clicked. + + + + + Gets or sets the text associated with this item. + + + + + Gets or sets the amount of padding added horizontally to the button images when not on menus. Default value is 10 pixels. + + + + + Gets or sets the amount of padding added vertically to the button images when not on menus. Default value is 6 pixels. + + + + + Gets or sets an shape descriptor for the button which describes the shape of the button. Default value is null + which indicates that system default shape is used. + + + + + Indicates item's visibility when on pop-up menu. + + + + + Indicates whether item was recently used. + + + + + Indicates whether mouse is over the item. + + + + + Indicates whether mouse is over the expand part of the button. + + + + + Indicates whether mouse is pressed. + + + + + Indicates the way item is painting the picture when mouse is over it. Setting the value to Color will render the image in gray-scale when mouse is not over the item. + + + + + Gets or sets whether the button text is automatically wrapped over multiple lines when button is used on RibbonBar control. Default value is true. + + + + + Gets or sets whether image animation is enabled + + + + + Gets whether item supports text markup. Default is false. + + + + + Gets or sets whether text-markup support is enabled for items Text property. Default value is true. + Set this property to false to display HTML or other markup in the item instead of it being parsed as text-markup. + + + + + Occurs when text markup link is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + Represents accessible interface for ButtonItem object. + + + + + Represents accessible interface for ButtonItem object. + + + + + Delegate for OptionGroupChanging event. + + + + + Represents event arguments for OptionGroupChanging event. + + + + + Set to true to cancel the checking on NewChecked button. + + + + + Button that will become checked if operation is not canceled. + + + + + Button that is currently checked and which will be unchecked if operation is not canceled. + + + + + Default constructor. + + + + + Stores all information for side bar images that are used by Bar or Popup menu. + + + + + Gets or sets the side bar image. + + + + + Gets or sets the side bar back color. + + + + + Gets or sets the gradient staring color. + + + + + Gets or sets the gradient ending color. + + + + + Gets or sets the gradient angle. + + + + + Gets or sets the gradient staring color. + + + + + Gets or sets whether image is stretched so it fills the side bar or not if image is smaller than current side bar size. + + + + + Summary description for ButtonItemLayout. + + + + + Arranges the button inner parts when button size has changed externally. + + Button to arrange inner parts for. + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Creates new accessibility instance. + + Reference to AccessibleObject. + + + + Starts the button pulse effect which alternates slowly between the mouse over and the default state. The pulse effect + continues indefinitely until it is stopped by call to StopPulse method. + + + + + Starts the button pulse effect which alternates slowly between the mouse over and the default state. Pulse effect + will alternate between the pulse state for the number of times specified by the pulseBeatCount parameter. + + Specifies the number of times button alternates between pulse states. 0 indicates indefinite pulse + + + + Stops the button Pulse effect. + + + + + Gets whether ImageFixedSize property should be serialized. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Notifies a control that it is the default button so that its appearance and behavior is adjusted accordingly. + + true if the control should behave as a default button; otherwise false. + + + + Generates a Click event for the control. + + + + + Displays the sub-items on popup specified by PopupType. + + Popup location. + + + + Displays the sub-items on popup specified by PopupType. + + Horizontal coordinate in pixels of the upper left corner of a popup. + Vertical coordinate in pixels of the upper left corner of a popup. + + + + Called when Command property value changes. + + + + + Occurs when Checked property has changed. + + + + + Gets or sets whether text-markup support is enabled for controls Text property. Default value is true. + Set this property to false to display HTML or other markup in the control instead of it being parsed as text-markup. + + + + + Gets whether the button is currently pulsing, alternating slowly between the mouse over and default state. + + + + + Gets or sets whether pulse effect started with StartPulse method stops automatically when mouse moves over the button. Default value is true. + + + + + Gets or sets the pulse speed. The value must be greater than 0 and less than 128. Higher values indicate faster pulse. Default value is 12. + + + + + Sets fixed size of the image. Image will be scaled and painted it size specified. + + + + + Gets or sets the text alignment. Applies only when button text is not composed using text markup. Default value is center. + + + + + Gets or sets whether during painting OnPaintBackground on base control is called when BackColor=Transparent. + + + + + Gets or sets whether button is focused when pressed using left mouse button. Default value is true. + + + + + Gets whether command is executed when button is clicked. + + + + + Gets or sets the color of the Symbol. + + + + + Indicates the symbol displayed on face of the button instead of the image. Setting the symbol overrides the image setting. + + + + + Gets or sets the symbol set used to represent the Symbol. + + + + + Indicates the size of the symbol in points. + + + + + Specifies the Button image which is used when button background is black or very dark. Image is used when button text is white. This is provided for Metro style applications. + + + + + Specifies the Button image. + + + + + Specifies the image for the button when mouse is over the item. + + + + + Specifies the image for the button when items Enabled property is set to false. + + + + + Specifies the image for the button when mouse left button is pressed. + + + + + Gets or sets the location of popup in relation to it's parent. + + + + + Returns the collection of sub items. + + + + + Gets or sets whether button appears as split button. Split button appearance divides button into two parts. Image which raises the click event + when clicked and text and expand sign which shows button sub items on popup menu when clicked. Button must have both text and image visible (ButtonStyle property) in order to appear as a full split button. + + + + + Gets or sets whether button displays the expand part that indicates that button has popup. + + + + + Gets/Sets the image position inside the button. + + + + + Gets or sets whether mouse over fade effect is enabled. Default value is true. + + + + + Indicates the way button is rendering the mouse over state. Setting the value to Color will render the image in gray-scale when mouse is not over the item. + + + + + Gets or sets the width of the expand part of the button item. + + + + + Gets or sets the text associated with this button. + + + + + Gets/Sets informational text (tooltip) for the button. + + + + + Gets or sets whether mnemonic character assigned to button is processed only if Alt key is pressed. Default value is false which indicate that Alt key is not required. + + + + + + Indicates whether the button will auto-expand when clicked. + When button contains sub-items, sub-items will be shown only if user + click the expand part of the button. Setting this property to true will expand the button and show sub-items when user + clicks anywhere inside of the button. Default value is false which indicates that button is expanded only + if its expand part is clicked. + + + + + Gets or sets whether Checked property is automatically inverted, button checked/unchecked, when button is clicked. Default value is false. + + + + + Gets or set a value indicating whether the button is in the checked state. + + + + + Gets or sets an shape descriptor for the button which describes the shape of the button. Default value is null + which indicates that system default shape is used. + + + + + Gets or sets whether control displays focus cues when focused. + + + + + Gets or sets the custom color name. Name specified here must be represented by the corresponding object with the same name that is part + of the Office2007ColorTable.ButtonItemColors collection. See documentation for Office2007ColorTable.ButtonItemColors for more information. + If color table with specified name cannot be found default color will be used. Valid settings for this property override any + setting to the Color property. + Applies to items with Office 2007 style only. + + + + + Gets or sets the predefined color of the button. Color specified applies to buttons with Office 2007 style only. It does not have + any effect on other styles. Default value is eButtonColor.Default + + + + + Gets or sets a value indicating whether the control is automatically resized to display its entire contents. You can set MaximumSize.Width property to set the maximum width used by the control. + + + + + Gets or sets the mode by which the Button automatically resizes itself. + + + + + Gets or sets the amount of spacing between button image if specified and text. + + + + + Gets or sets the text color. + + + + + Gets or sets the value returned to the parent form when the button is clicked. + + + + + Gets or sets a value indicating whether the button is expanded (displays drop-down) or not. + + + + + Gets or sets the collection of shortcut keys associated with the button. When shortcut key is pressed button Click event is raised. + + + + + Gets or sets the command assigned to the item. Default value is null. + Note that if this property is set to null Enabled property will be set to false automatically to disable the item. + + + + + Gets or sets user defined data value that can be passed to the command when it is executed. + + + + + Represents class for Accessibility support. + + + + + Creates new instance of the object and initializes it with owner control. + + Reference to owner control. + + + + Returns number of child objects. + + Total number of child objects. + + + + Returns reference to child object given the index. + + 0 based index of child object. + Reference to child object. + + + + Returns current accessible state. + + + + + Summary description for ThemedButtonItemPainter. + + + + + Represents the Check-box item. Use a CheckBox to give the user an option, such as true/false or yes/no. + + + + + Creates new instance of CheckBoxItem. + + + + + Creates new instance of CheckBoxItem and assigns the name to it. + + Item name. + + + + Creates new instance of CheckBoxItem and assigns the name and text to it. + + Item name. + item text. + + + + Returns copy of the item. + + + + + Copies the CheckBoxItem specific properties to new instance of the item. + + New CheckBoxItem instance. + + + + Copies the CheckBoxItem specific properties to new instance of the item. + + New CheckBoxItem instance. + + + + Raises the click event and provide the information about the source of the event. + + + + + + Sets the Checked property of the item, raises appropriate events and provides the information about the source of the change. + + New value for Checked property + Source of the change. + + + + Called when Command property value changes. + + + + + Sets the Checked property of the item, raises appropriate events and provides the information about the source of the change. + + New value for Checked property + Source of the change. + + + + Raises CheckState changed event. + + Event arguments. + + + + Raises CheckedBindableChanged changed event. + + Event arguments. + + + + Called after Checked property has changed. + + + + + Raises the CheckedChanging event. + + + + + Raises the CheckedChanged event. + + + + + Occurs before Checked property is changed and allows you to cancel the change. + + + + + Occurs after Checked property is changed. Action cannot be cancelled. + + + + + Occurs when CheckState property has changed. + + + + + Occurs when CheckedBindable property has changed. + + + + + Gets or set whether the Checked values and the item appearance are automatically changed when the Check-Box is clicked. Default value is true. + + + + + Gets or sets the size of the check or radio sign. Default value is 13x13. Minimum value is 6x6. + + + + + Gets or sets the text associated with this item. + + + + + Gets whether item supports text markup. Default is false. + + + + + Gets or sets whether text-markup support is enabled for items Text property. Default value is true. + Set this property to false to display HTML or other markup in the item instead of it being parsed as text-markup. + + + + + Gets or sets whether text assigned to the check box is visible. Default value is true. + + + + + Gets or sets the text color. Default value is Color.Empty which indicates that default color is used. + + + + + Gets or sets the appearance style of the item. Default value is CheckBox. Item can also assume the style of radio-button. + + + + + Gets or sets the check box position relative to the text. Default value is Left. + + + + + Gets whether mouse is over the item. + + + + + Gets whether left mouse button is pressed on the item. + + + + + Gets or set a value indicating whether the button is in the checked state. + + + + + Gets or set a value indicating whether the button is in the checked state. + + + + + Gets or sets a value indicating whether the CheckBox will allow three check states rather than two. If the ThreeState property is set to true + CheckState property should be used instead of Checked property to set the extended state of the control. + + + + + Specifies the state of a control, such as a check box, that can be checked, unchecked, or set to an indeterminate state. + + + + + Gets or sets the custom image that is displayed instead default check box representation when check box is checked. + + + + + Gets or sets the custom image that is displayed instead default check box representation when check box is unchecked. + + + + + Gets or sets the custom image that is displayed instead default check box representation when check box is in indeterminate state. + + + + + Delegate for OptionGroupChanging event. + + + + + Represents event arguments for OptionGroupChanging event. + + + + + Set to true to cancel the checking on NewChecked button. + + + + + Check-box that will become checked if operation is not cancelled. + + + + + Check-box that is currently checked and which will be unchecked if operation is not cancelled. This property will have only valid values for eCheckBoxStyle.RadioButton style CheckBoxItems. + + + + + Indicates the action that has caused the event. + + + + + Default constructor. + + + + + Represents painter for CheckBoxItem. + + + + + Paints CheckBoxItem. + + Provides arguments for the operation. + + + + Gets or sets color table used by renderer. + + + + + Represents circular progress indicator. + + + + + Creates new instance of circular progress indicator. + + + + + Creates new instance of circular progress indicator and assigns the name to it. + + Item name. + + + + Creates new instance of circular progress indicator and assigns the name and text to it. + + Item name. + item text. + + + + Returns copy of the item. + + + + + Copies the ProgressBarItem specific properties to new instance of the item. + + New ProgressBarItem instance. + + + + Copies the ProgressBarItem specific properties to new instance of the item. + + New ProgressBarItem instance. + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Raises ValueChanged event. + + Provides event arguments. + + + + Called when property on CircularProgressBar changes. + + Property Change Arguments + + + + Starts the progress bar loop for endless type progress bar. Progress bar will continue to run until Stop() method is called. + + + + + Stops the progress bar loop for endless type progress bar. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when ProgressTextFormat property has changed. + + Old property value + New property value + + + + Gets or sets the circular progress bar type. + + + + + Gets or sets the maximum value of the progress bar. + + + + + Gets or sets the minimum value of the progress bar. + + + + + Gets or sets the color of the progress percentage text. + + + + + Gets or sets whether text that displays the progress bar completion percentage text is visible. Default value is false. + + + + + Gets or sets the text displayed on top of the circular progress bar. + + + + + Gets or sets the current value of the progress bar. + + + + + Occurs when Value property has changed. + + + + + Gets or sets whether endless type progress bar is running. + + + + + Gets or sets the color of the color of progress indicator. + + + + + Gets or sets circular progress indicator diameter in pixels. + + + + + Gets or sets the text position in relation to the circular progress indicator. + + + + + Gets or sets whether text/label displayed next to the item is visible. + + + + + Gets or sets the suggested text-width. If you want to make sure that text you set wraps over multiple lines you can set suggested text-width so word break is performed. + + + + + Gets or sets text padding. + + + + + Gets or sets the color of the text label. + + + + + Gets or sets the color of the pie progress bar dark border. + + + + + Gets or sets the color of the pie progress bar light border. + + + + + Gets or sets the color of the spoke progress bar dark border. + + + + + Gets or sets the color of the spoke progress bar light border. + + + + + Gets or sets format string for progress value. + + + + + Gets or sets the animation speed for endless running progress. Lower number means faster running. + + + + + Defines available circular progress bar types. + + + + + Line spokes progress bar. + + + + + Dot type/FireFox progress bar. + + + + + Donut type progress bar. + + + + + Spoke type progress bar. + + + + + Pie type progress bar. + + + + + Summary description for ColorFunctions. + + + + + Provides popup color picker. + + + + + Required designer variable. + + + + + Clean up any resources being used. + + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Gets or sets the reference to the IWindowsFormsEditorService interface used for Windows Forms design time support. + + + + + Gets or sets the ColorScheme object for Scheme colors. + + + + + Gets or sets currently selected color. + + + + + Gets the selected color color scheme name if color scheme color is selected otherwise it returns an empty string. + + + + + Returns true if color selection was cancelled. + + + + + Represents the color comb control that allows color choice from pre-defined color comb palette. + + + + + Raises SelectedColorChanged event. + + Provides event arguments. + + + + Required designer variable. + + + + + Creates new instance of the control. + + + + + Clean up any resources being used. + + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Raises MouseOverColorChanged event. + + Provides event arguments. + + + + Occurs when SelectedColor has changed. + + + + + Gets or sets whether anti-alias smoothing is used while painting. Default value is true. + + + + + Gets the color mouse is currently over. If mouse is not over any color in comb Color.Empty is returned. + + + + + Gets or sets the selected color. When setting the color note that color must be already present in the color comb otherwise the selected color will be reset to Color.Empty. + + + + + Occurs when MouseOverColor property has changed. + + + + + Represents the color selection control. + + + + + Raises SelectedColorChanged event. + + Provides event arguments. + + + + Required designer variable. + + + + + Clean up any resources being used. + + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Occurs when SelectedColor has changed. + + + + + Gets or sets the selected color. + + + + + Represents color item used for color picker control. Color item can only be used as part of the color picker DotNetBar feature. + + + + + Overloaded. Serializes the item and all sub-items into the XmlElement. + + XmlElement to serialize the item to. + + + + + Gets or sets the color represented by this item. Default value is Color.Black. + + + + + Gets or sets the size of the item when displayed. Default value is 13x13 pixels. + + + + + Gets or sets border drawn around the item. Default value is eColorItemBorder.All which indicates that border is drawn + on all four sides. + + + + + Gets whether mouse is over the item. + + + + + Represents the color picker drop down button. + + + + + Creates new instance of ButtonItem. + + + + + Creates new instance of ButtonItem and assigns the name to it. + + Item name. + + + + Creates new instance of ButtonItem and assigns the name and text to it. + + Item name. + item text. + + + + Returns copy of the item. + + + + + Copies the ButtonItem specific properties to new instance of the item. + + New ButtonItem instance. + + + + Raises the ColorPreview event. + + Provides the data for the event. + + + + Invokes the ColorPreview event. + + Provides data for the event. + + + + Indicates whether SubItems collection is serialized. ColorPickerDropDown does not serialize the sub items. + + + + + Gets whether property should be serialized. + + + + + Resets the property to its default value. + + + + + Raises RemovingToken event. + + Provides event arguments. + + + + Displays the Colors dialog that allows user to choose the color or create a custom color. If new color is chosen the + SelectedColorChanged event is raised. + + + + + Raises the BeforeColorDialog event. + + + + + + Update the selected color image if the SelectedColorImageRectangle has been set and button is using Image property to display the image. + + + + + Gets collection of ColorItem[] arrays that represent themed colors. Each ColorItem[] array is used to represent single line of theme colors. + + Collection of ColorItem[] arrays. + + + + Returns an array that represents the standard colors. Usually instances of ColorItem are included. + + ArrayList containing objects that describe standard colors. + + + + Invokes SelectedColorChanged event. + + + + + Occurs when color is chosen from drop-down color picker or from Custom Colors dialog box. Selected color can be accessed through SelectedColor property. + + + + + Occurs when mouse is moving over the colors presented by the color picker. You can use it to preview the color before it is selected. + + + + + Occurs before color picker dialog is shown. Data property of the event arguments will hold the reference to the Form about to be shown. + + + + + Gets or sets the last selected color from either the drop-down or Custom Color dialog box. Default value is + Color.Empty. You can use SelectedColorChanged event to be notified when this property changes. + + + + + Gets or sets whether theme colors are displayed on drop-down. Default value is true. + + + + + Gets or sets whether standard colors are displayed on drop-down. Default value is true. + + + + + Gets or sets more colors menu item is visible which allows user to open Custom Colors dialog box. Default value is true. + + + + + Gets or sets the rectangle in Image coordinates where selected color will be painted. Setting this property will + have an effect only if Image property is used to set the image. Default value is an empty rectangle which indicates + that selected color will not be painted on the image. + + + + + Gets whether internal representation of color items on popup has been initialized. + + + + + "Occurs after popup colors have been added to the SubItems collection. This event can be used to effectively add custom items to the popup. + + + + + Gets or sets the Owner Window that will be used as owner for the colors modal dialog when displayed. + + + + + Gets or sets the array of ColorItem objects that will be used as theme colors instead of built-in color palette. + See: http://www.devcomponents.com/kb2/?p=79 for instructions. + + + + + Gets or sets the array of ColorItem objects that will be used as standard colors instead of built-in color palette. + See: http://www.devcomponents.com/kb2/?p=79 for instructions. + + + + + Indicates whether button should popup when clicked automatically. + + + + + Represents custom color blend selection control. + + + + + Raises SelectedColorChanged event. + + Provides event arguments. + + + + Occurs when SelectedColor has changed. + + + + + Gets or sets the color selected by the control. Color that is assigned must be visible on the face of the control otherwise the SelectedColor will be set to Color.Empty + + + + + Represents the form in Office style with custom borders and caption. + + + + + Represents the form class that should be used instead of standard Form when form caption is provided by Ribbon control + and custom form look and feel in style of Office 2007 is required. This form does not have standard form caption. + + + + + Required designer variable. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Called when EnableCustomStyle property has changed. + + + + + Gets whether custom form styling is enabled. + + true if custom styling is enabled otherwise false. + + + + Gets the array of LinearGradientColorTable objects that describe the border colors. The colors with index 0 is used as the outer most + border. + + Array of LinearGradientColorTable + + + + Returns form custom region. + + New instance of the custom region. + + + + Gets the form path for the given input bounds. + + Represent the form bounds. + + + + + Paints the non-client area of the form. + + + + + Called when WM_NCACTIVATE message is received. + + Reference to message data. + Return true to call base form implementation otherwise return false. + + + + Invalidates non client area of the form. + + Indicates whether complete form is invalidated. + + + + Redraws the non-client area of the form. + + + + + Called when BackgroundImageUnderCaption property has changed. + + Old property value + New property value + + + + Called when RenderFormIcon property has changed. + + Old property value + New property value + + + + Called when RenderFormText property has changed. + + Old property value + New property value + + + + Gets or sets whether Windows Vista Glass support is enabled when form is running on Windows Vista with Glass support. + Default value is true. + + + + + Gets or sets the RibbonControl that is hosted by this form. This property is for internal use only. + + + + + Gets whether Vista glass effect extension over the ribbon control caption is enabled. + + + + + Gets or sets the form's window state. + + + + + Gets or sets whether custom style for the form is enabled. Default value is true. + + + + + Gets or sets top left rounded corner size. Default value is 6. + + + + + Gets or sets top right rounded corner size. Default value is 6. + + + + + + Gets or sets bottom left rounded corner size. Default value is 6. + + + + + Gets or sets bottom right rounded corner size. Default value is 6. + + + + + Gets whether client border is painted in OnPaint method. + + + + + Gets whether ribbon control caption is painted + + + + + Gets or sets whether 3D MDI border is removed. Default value is true. + + + + + Gets whether form uses custom region + + + + + Gets whether Windows Glass effect is rendered on the form when supported by Operating System and enabled using EnableGlass. + + + + + Returns whether form is sizable given form state (maximized, minimized, normal) and FormBorderStyle setting. + + + + + Gets or sets whether non-client area of the form rendering is enabled. + + + + + Indicates whether form BackgroundImage is pulled up and rendered under form caption as well. + + + + + Indicates whether form icon is drawn. This is different from ShowIcon property which when set to false also removes the form icon from task-bar. Setting this property to false will keep form icon in task-bar but will hide on the form. + + + + + Indicates whether form Text is rendered in form caption. + + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Raises TitleTextMarkupLinkClick event. + + Provides event arguments. + + + + Gets whether custom form styling is enabled. + + true if custom styling is enabled otherwise false. + + + + Invalidates non client area of the form. + + Indicates whether complete form is invalidated. + + + + Called when WM_NCACTIVATE message is received. + + Reference to message data. + Return true to call base form implementation otherwise return false. + + + + Gets the form path for the give input bounds. + + Represents the form bounds. + + + + + Updates the form title bar text. Usually calling this method is not necessary but under certain conditions when form is used as MDI parent form + calling it to update combined text is necessary. + + + + + Called when CloseEnabled property value has changed. + + + + + Paints the non-client area of the form. + + + + + Returns the renderer control will be rendered with. + + The current renderer. + + + + + Occurs when text-markup link in TitleText is clicked. + + + + + Gets or sets the font for the form caption text when CaptionVisible=true. Default value is NULL which means that system font is used. + + + + + Gets whether Vista glass effect extension over the ribbon control caption is enabled. + + + + + Gets or sets the icon for the form. + + + + + Gets or sets a value indicating whether the form enables auto scrolling. + + + + + Gets or sets the Office 2007 Renderer global Color Table. Setting this property will affect all controls in application that are using Office 2007 global renderer. + + + + + Gets whether client border is painted in OnPaint method. + + + + + Gets whether ribbon control caption is painted + + + + + Gets or sets whether anti-alias smoothing is used while painting form caption. Default value is true. + + + + + Gets or sets the redering mode used by control. Default value is eRenderMode.Global which means that static GlobalManager.Renderer is used. If set to Custom then Renderer property must + also be set to the custom renderer that will be used. + + + + + Gets or sets the custom renderer used by the items on this control. RenderMode property must also be set to eRenderMode.Custom in order renderer + specified here to be used. + + + + + Gets or sets the tooltip for the form system icon. + + + + + Clean up any resources being used. + + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Initializes a new instance of the MetroForm class. + + + + + Gets the array of LinearGradientColorTable objects that describe the border colors. The colors with index 0 is used as the outer most + border. + + Array of LinearGradientColorTable + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Gets the form path for the given input bounds. + + Represent the form bounds. + + + + + Called when HelpButtonText property has changed. + + Old property value + New property value + + + + Called when SettingsButtonText property has changed. + + Old property value + New property value + + + + Raises SettingsButtonClick event. + + Provides event arguments. + + + + Raises HelpButtonClick event. + + Provides event arguments. + + + + Gets or sets custom border colors for the form. When set it overrides settings from global Metro color table. + + + + + This property is not applicable for MetroForm. + + + + + + + Gets or sets the HELP button text. + + + + + Gets or sets the SETTINGS button text. + + + + + Occurs when SETTINGS button, if displayed, is clicked. + + + + + Occurs when HELP button, if displayed, is clicked. + + + + + Clean up any resources being used. + + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Represents the Color scheme used by items on the Bar. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + VS.NET 2005 Blue Color Scheme + + + + + Converts hex string to Color type. + + Hexadecimal color representation. + Reference to Color object. + + + + Converts hex string to Color type. + + Color representation as 32-bit RGB value. + Reference to Color object. + + + + Converts hex string to Color type. + + Color representation as 32-bit RGB value. + Reference to Color object. + + + + Specifies Dock Site BackColor. + + + + + Specifies Dock Site BackColor2. + + + + + Specifies the gradient angle. + + + + + Specifies the menu bar background color. + + + + + Specifies the target menu bar gradient background color. + + + + + Specifies the gradient angle. + + + + + Specifies the background color for the bar when floating or when docked. + + + + + Specifies the target gradient background color for the bar when floating or when docked. + + + + + Specifies the gradient angle. + + + + + Specifies the background color for the bar Caption. + + + + + Specifies the target gradient background color for the bar Caption. + + + + + Specifies the gradient angle. + + + + + Specifies the color for text of the Caption. + + + + + Specifies the Bar Caption inactive (lost focus) background color. + + + + + Specifies the target background gradient Bar Caption inactive (lost focus) color. + + + + + Specifies the gradient angle. + + + + + Specifies the Bar inactive (lost focus) text color. + + + + + Specifies the background color for popup bars. + + + + + Specifies the border color for popup bars. + + + + + Specifies the border color for docked bars. + + + + + Specifies the color of the grab handle stripes. + + + + + Specifies the border color for floating bars. + + + + + Specifies the item background color. + + + + + Specifies the target item background gradient color. + + + + + Specifies the gradient angle. + + + + + Specifies the item text color. + + + + + Specifies the background color for the item that is disabled. + + + + + Specifies the text color for the item that is disabled. + + + + + Specifies the background color when mouse is over the item. + + + + + Specifies the target gradient background color when mouse is over the item. + + + + + Specifies the gradient angle. + + + + + Specifies the text color when mouse is over the item. + + + + + Specifies the border color when mouse is over the item. + + + + + Specifies the background color when item is pressed. + + + + + Specifies the target gradient background color when item is pressed. + + + + + Specifies the gradient angle. + + + + + Specifies the text color when item is pressed. + + + + + Specifies the border color when item is pressed. + + + + + Specifies the color for the item group separator. + + + + + Specifies the color for the item group separator shade. + + + + + Specifies the background color for the shadow of expanded item. + + + + + Specifies the background color for the expanded item. + + + + + Specifies the target gradient background color for the expanded item. + + + + + Specifies the gradient angle. + + + + + Specifies the text color for the expanded item. + + + + + Specifies the border color for the expanded item. + + + + + Specifies the background color for the checked item. + + + + + Specifies the target gradient background color for the checked item. + + + + + Specifies the gradient angle. + + + + + Specifies the border color for the checked item. + + + + + Specifies the text color for the checked item. + + + + + Specifies the customize item background color. Applies to Office2003 style only. + + + + + Specifies the customize item target gradient background color. Applies to Office2003 style only. + + + + + Specifies the customize item background color gradient angle. Applies to Office2003 style only. + + + + + Specifies the customize item text color. Applies to Office2003 style only. + + + + + Specifies the color of the menu border. + + + + + Specifies the background color of the menu. + + + + + Specifies the target gradient background color of the menu. + + + + + Specifies the angle of the gradient fill for the menu background. + + + + + Specifies the background color of the menu part (left side) that is showing the images. + + + + + Specifies the target gradient background color of the menu part (left side) that is showing the images. + + + + + Specifies the angle of the gradient fill for the menu part (left side) that is showing the images. + + + + + Specifies the background color for the items that were not recently used. + + + + + Specifies the side bar color for the items that were not recently used. + + + + + Specifies the target gradient side bar color for the items that were not recently used. + + + + + Specifies the angle of the gradient fill for the menu part (left side) that is showing the images. + + + + + Specifies the border color for focused design-time item. + + + + + Gets or sets predefined color scheme. By default DotNetBar will automatically change and generate color scheme depending on system colors. + + + + + Specifies the background color of the panel. + + + + + Specifies the target background gradient color of the panel. + + + + + Specifies the angle of the gradient fill for the panel background. + + + + + Specifies border color of the panel. + + + + + Specifies color of the text on the panel. + + + + + Specifies the background color of the explorer bar. + + + + + Specifies the target gradient background color of the explorer bar. + + + + + Specifies the angle of the gradient fill for the explorer bar background. + + + + + Specifies the foreground color of MDI System Item buttons. + + + + + Specifies the background color of the Splitter. + + + + + Specifies the target background gradient color of the Splitter. + + + + + Specifies the angle of the gradient fill for the Splitter background. + + + + + Specifies border color of the Splitter. + + + + + Specifies color of the text on the Splitter. + + + + + Indicates auto-hide panel background image if any. + + + + + Gets or sets the color of the auto-hide panel background. + + + + + Gets or sets the color of the auto-hide panel background. + + + + + Gets or sets the color of the auto-hide tab. + + + + + Gets or sets the color of the auto-hide tab. + + + + + Gets or sets the auto-hide tab background gradient angle. + + + + + Gets or sets the color of the auto-hide tab text. + + + + + Gets or sets the color of the auto-hide tab border. + + + + + Gets or sets the color of the auto-hide tab. + + + + + Gets or sets the color of the auto-hide tab. + + + + + Gets or sets the color of the auto-hide tab text. + + + + + Gets or sets the color of the tab border. + + + + + Specifies the type of predefined color scheme in ColorScheme object. + + + + + Default value. DotNetBar will automatically change and generate color scheme depending on system colors. + + + + + Blue Office 2003 Color Scheme. This setting specifies that this color scheme will be used regardless of system color setting on user machine. + + + + + Olive Green Office 2003 Color Scheme. This setting specifies that this color scheme will be used regardless of system color setting on user machine. + + + + + Silver Office 2003 Color Scheme. This setting specifies that this color scheme will be used regardless of system color setting on user machine. + + + + + Always use system colors to auto-generate color scheme. + + + + + Specifies a color scheme member. + + + + + Summary description for ColorSchemeEditor. + + + + + Required designer variable. + + + + + Clean up any resources being used. + + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Summary description for ColorSchemeVSEditor. + + + + + Represents Color type editor with support for color schemes. + + + + + Edits the value of the specified object using the editor style indicated by GetEditStyle. + + An ITypeDescriptorContext that can be used to gain additional context information. + An IServiceProvider that this editor can use to obtain services. + The object to edit. + The new value of the object. + + + + Gets the editor style used by the EditValue method. + + An ITypeDescriptorContext that can be used to gain additional context information. + A UITypeEditorEditStyle value that indicates the style of editor used by EditValue. If the UITypeEditor does not support this method, then GetEditStyle will return None. + + + + + Provides command related utility methods that register and unregister commands. + + + + + Connects the Command Source to the Command. + + Command source to connect to the command. + Reference to the command. + + + + Disconnects command source from the command. + + Reference to command source. + Reference to the command. + + + + Unregister command from all subscribers. Called when command is disposed. + + Command to unregister. + + + + Gets an array of Command Sources that are connected with the command. + + Reference to command + An array of command sources. + + + + Gets or sets whether commands use Reflection to find the property names when applying value to the unknown types. Default value is true. + Setting this value to false will increase performance if Unknown types are used but it will at same time disable the + command setting value for these types. + + + + + Gets or sets whether layout on the items of type BaseItem is automatically updated when command text or other property changes which requires layout updated. Default value is true. + + + + + Represents the bound data navigator in current DotNetBar style. + + + + + Creates new instance of BindingNavigatorEx + + + + + Creates new instance of BindingNavigatorEx + + + + + Creates new instance of BindingNavigatorEx + + + + + Creates new instance of BindingNavigatorEx + + + + + Adds default items that make up the binding navigation control. + + + + + Gets or sets the reference to Add New record button. + + + + + Gets or sets the binding source for the navigator. + + + + + Gets or sets the label which represents the items count. + + + + + Indicates the format string for the label which displays the number of items bound. + + + + + Gets or sets the item which deletes current record. + + + + + Gets or sets the item which moves to first record. + + + + + Gets or sets the item which moves to last record. + + + + + Gets or sets the item which moves to next record. + + + + + Gets or sets the item which moves to previous record. + + + + + Gets or sets the text-box which shows current position. + + + + + Represents the class for the BaseItem non-popup based control host. + + + + + Creates new instance of the object. + + + + + Returns the color scheme used by control. Color scheme for Office2007 style will be retrieved from the current renderer instead of + local color scheme referenced by ColorScheme property. + + An instance of ColorScheme object. + + + + Paints the control focus cues. + + Paint event information. + + + + Creates the Graphics object for the control. + + The Graphics object for the control. + + + + Returns the renderer control will be rendered with. + + The current renderer. + + + + Resets style to default value. Used by windows forms designer. + + + + + Called when visual property of the control has changed so the control can be updated. + + + + + Forces the button to perform internal layout. + + + + + Recalculates the size of the internal item. + + + + + Indicates to control that all further update operations should not result in layout and refresh of control content. + Use this method to optimize the addition of new items to the control. This method supports nested calls meaning + that multiple calls are allowed but they must be ended with appropriate number of EndUpdate calls. + IsUpdateSuspended property returns whether update is suspended. + + + + + Indicates that update operation is complete and that control should perform layout and refresh to show changes. See BeginUpdate + for more details. + + + + + Indicates that update operation is complete and that control should perform layout and refresh to show changes. See BeginUpdate + for more details. + + + + + Gets or sets the instance of BaseItem object hosted by this control. + + + + + Gets or sets whether during painting OnPaintBackground on base control is called when BackColor=Transparent. + + + + + Gets or sets whether control displays focus cues when focused. + + + + + Gets or sets the redering mode used by control. Default value is eRenderMode.Global which means that static GlobalManager.Renderer is used. If set to Custom then Renderer property must + also be set to the custom renderer that will be used. + + + + + Gets or sets the custom renderer used by the items on this control. RenderMode property must also be set to eRenderMode.Custom in order renderer + specified here to be used. + + + + + Specifies the background style of the control. + + + + + Gets or sets Bar Color Scheme. + + + + + Gets or sets whether anti-alias smoothing is used while painting. Default value is false. + + + + + Gets/Sets the visual style for the control. + + + + + Gets whether control layout is suspended becouse of the call to BeginUpdate method. + + + + + Initializes a new instance of the CircularProgress class. + + + + + Raises ValueChanged event. + + Provides event arguments. + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Occurs when Value property has changed. + + + + + Gets or sets the circular progress bar type. + + + + + Gets or sets the maximum value of the progress bar. + + + + + Gets or sets the minimum value of the progress bar. + + + + + Gets or sets the color of the progress percentage text. + + + + + Gets or sets whether text that displays the progress bar completion percentage text is visible. Default value is false. + + + + + Gets or sets the text displayed on top of the circular progress bar. + + + + + Gets or sets the current value of the progress bar. + + + + + Gets or sets whether endless type progress bar is running. + + + + + Gets or sets the color of the color of progress indicator. + + + + + Gets or sets the color of the pie progress bar dark border. + + + + + Gets or sets the color of the pie progress bar light border. + + + + + Gets or sets the color of the spoke progress bar dark border. + + + + + Gets or sets the color of the spoke progress bar light border. + + + + + Gets or sets format string for progress value. + + + + + Gets or sets the animation speed for endless running progress. Lower number means faster running. + + + + + Initializes a new instance of the CollapsibleSplitContainer class. + + + + + Raises BeforeNearCollapseButtonClick event. + + Provides event arguments. + + + + Raises NearCollapseButtonClick event. + + Provides event arguments. + + + + Raises BeforeFarCollapseButtonClick event. + + Provides event arguments. + + + + Raises FarCollapseButtonClick event. + + Provides event arguments. + + + + Called when ButtonPosition property has changed. + + Old property value + New property value + + + + Called when CollapseMode property has changed. + + Old property value + New property value + + + + + Occurs after near collapse button is clicked. + + + + + Occurs before far collapse button is clicked and allows you to cancel its action. + + + + + Occurs after far collapse button is clicked. + + + + + Indicates position of buttons inside container. + + + + + Specifies how panels are collapsed when collapse buttons are pressed. + + + + + Defines available positions for buttons inside CollapsibleSplitterContainer. + + + + + Buttons are positioned on left or top side depending on orientation. + + + + + Buttons are positioned in center of container. + + + + + Buttons are positioned on right or bottom side depending on orientation. + + + + + Defines collapse mode for the CollapsibleSplitContainer control. + + + + + When buttons are pressed the splitter is positioned at the PanelMinSize. + + + + + When buttons are pressed associated panel is collapsed through Panel1Collapsed or Panel2Collapsed properties. + + + + + Represents the color picker button control. + + + + + Creates new instance of the object. + + + + + Displays the Colors dialog that allows user to choose the color or create a custom color. If new color is chosen the + SelectedColorChanged event is raised. + + + + + Raises the ColorPreview event. + + Provides event data. + + + + Raises the SelectedColorChanged event. + + Provides event data. + + + + Indicates whether SubItems collection is serialized. ColorPickerDropDown does not serialize the sub items. + + + + + Gets whether property should be serialized. + + + + + Resets the property to its default value. + + + + + Invokes the ColorPreview event. + + Provides data for the event. + + + + Update the selected color image if the SelectedColorImageRectangle has been set and button is using Image property to display the image. + + + + + Occurs when color is chosen from drop-down color picker or from Custom Colors dialog box. Selected color can be accessed through SelectedColor property. + + + + + Occurs when mouse is moving over the colors presented by the color picker. You can use it to preview the color before it is selected. + + + + + Gets or sets the array of ColorItem objects that will be used as standard colors instead of built-in color palette. + See: http://www.devcomponents.com/kb2/?p=79 for instructions. + + + + + Gets or sets the array of ColorItem objects that will be used as theme colors instead of built-in color palette. + See: http://www.devcomponents.com/kb2/?p=79 for instructions. + + + + + Gets whether command is executed when button is clicked. + + + + + Gets or sets the Owner Window that will be used as owner for the colors modal dialog when displayed. + + + + + Gets or sets more colors menu item is visible which allows user to open Custom Colors dialog box. Default value is true. + + + + + Gets or sets the last selected color from either the drop-down or Custom Color dialog box. Default value is + Color.Empty. You can use SelectedColorChanged event to be notified when this property changes. + + + + + Gets or sets whether theme colors are displayed on drop-down. Default value is true. + + + + + Gets or sets whether standard colors are displayed on drop-down. Default value is true. + + + + + Gets or sets the rectangle in Image coordinates where selected color will be painted. Setting this property will + have an effect only if Image property is used to set the image. Default value is an empty rectangle which indicates + that selected color will not be painted on the image. + + + + + Represents enhanced Windows combo box control. + + + + + Creates new instance of ComboBoxEx. + + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Indicates whether property should be serialized by Windows Forms designer. + + + + + Resets the property to default value. + + + + + Clean up any resources being used. + + + + + Loads all fonts available on system into the combo box. + + + + + Releases the focus from combo box. The control that last had focus will receive focus back when this method is called. + + + + + Called when DropDownColumns property has changed. + + Old property value + New property value + + + + Called when DropDownColumnsHeaders property has changed. + + Old property value + New property value + + + + Raises BeforeMultiColumnPopupOpen event. + + Provides event arguments. + + + + Raises the DataColumnCreated event. + + Provides event arguments. + + + + Raises SelectionChanging event. + + Provides event arguments. + + + + Called when MultiColumnControlFont property has changed. + + Old property value + New property value + + + + Called when Command property value changes. + + + + + Occurs when drop down portion of combo box is shown or hidden. + + + + + Gets or sets whether control displays focus cues when focused. + + + + + Gets or sets whether control is stand-alone control. Stand-alone flag affects the appearance of the control in Office 2007 style. + + + + + Gets or sets whether watermark text is displayed when control is empty. Default value is true. + + + + + Gets or sets the watermark (tip) text displayed inside of the control when Text is not set and control does not have input focus. This property supports text-markup. + Note that WatermarkText is not compatible with the auto-complete feature of .NET Framework 2.0. + + + + + Gets or sets the watermark hiding behaviour. Default value indicates that watermark is hidden when control receives input focus. + + + + + Gets or sets the watermark font. + + + + + Gets or sets the watermark text color. + + + + + Gets or sets the combo box background color. Note that in Office 2007 style back color of the control is automatically managed. + + + + + Gets or sets whether the BackColor value you set is used instead of the style back color automatically provided by the control. Default + value is false which indicates that BackColor property is automatically managed. Set this property to true and then set BackColor property + to make control use your custom back color. + + + + + Gets or sets value indicating whether system combo box appearance is used. Default value is false. + + + + + Gets or sets value indicating whether the combo box is draw using the Windows XP Theme manager when running on Windows XP or theme aware OS. + + + + + Disables internal drawing support for the List-box portion of Combo-box. Default value is false which means that internal drawing code is used. If + you plan to provide your own drawing for combo box items you must set this property to True. + + + + + Gets or sets whether combo box generates the audible alert when Enter key is pressed. + + + + + The ImageList control used by Combo box to draw images. + + + + + Determines the visual style applied to the combo box when shown. Default style is Office 2007. + + + + + Gets or sets whether ComboBoxEx thumb button that displays drop-down is rendered. Default value is true. + + + + + Gets or sets whether ComboBoxEx border is rendered. Default value is true. + + + + + Indicates whether ItemHeight property is set automatically based on the current font when DrawMode=OwnerDrawFixed + + + + + Gets or sets the custom color table used to render combo-box items + + + + + Gets or sets the text color for the text in combo-box when control Enabled property is set to false. + Setting this property is effective only for DropDownList ComboBox style. + + + + + Gets or sets the control background color when control is disabled. Default value is an empty color which indicates that system background color is used when control is disabled. + + + + + Gets the window handle that the drop down list is bound to. + + + + + Gets or sets whether FocusHighlightColor is used as background color to highlight text box when it has input focus. Default value is false. + + + + + Gets or sets the color used as background color to highlight text box when it has input focus and focus highlight is enabled. + + + + + Gets or sets comma separated list of field names that are displayed on drop down. When set it activates ComboBoxEx multi-column drop-down mode. + DataSource must be set in order for drop-down to display data. + + + + + Indicates custom column names with each column separated by new line, i.e. \r\n escape sequence. + + + + + Occurs before the multi-column popup is opened and it allows canceling of popup by setting CancelEventArgs.Cancel=true. + + + + + Occurs when ColumnHeader is automatically created by control as result of data binding for multi-column drop-down and provides you with opportunity to modify it. + + + + + Occurs before selection on multi-column drop-down has changed and allows canceling of the change. Applies to multi-column drop-down only. + + + + + Gets or sets whether selection change on multi-column drop-down closes the popup. Default value is true. Applies to multi-column drop-down only. + + + + + Indicates whether multi-column popup size is preserved between popup displays if popup is resized by end-user. Applies to multi-column drop-down only. + + + + + Indicates whether multi-column popup can be resized by end user. Applies to multi-column drop-down only. + + + + + Indicates whether multi-column popup close button is visible. + + + + + Gets or sets whether multi-column popup window is open. Applies to multi-column drop-down only. + + + + + Gets the reference to the control which is used to display multi-column data on popup. Control is created just before the popup is opened. + + + + + Indicates the font used by the multi-column control on the popup. + + + + + Gets or sets the command assigned to the item. Default value is null. + Note that if this property is set to null Enabled property will be set to false automatically to disable the item. + + + + + Gets or sets user defined data value that can be passed to the command when it is executed. + + + + + Represents the method that will handle the DropDownChange event. + + + + + Summary description for ComboBoxItem. + + + + + Creates new instance of ComboBoxItem. + + + + + Creates new instance of ComboBoxItem and assigns item name. + + Item Name. + + + + Creates new instance of ComboBoxItem and assigns item name and item text. + + Item Name + Item Text. + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Returns whether property should be serialized. + + + + + Overridden. Releases the input focus. + + + + + Raises the ComboBoxTextChanged event. + + Provides event arguments. + + + + Indicates whether property should be serialized by Windows Forms designer. + + + + + Resets the property to default value. + + + + + Occurs when underlining control ComboBox.Text property has changed. + + + + + Occurs when selected item on combo box has changed. + + + + + Gets or sets the accessible role of the item. + + + + + Gets or sets whether combo box generates the audible alert when Enter key is pressed. + + + + + Gets or sets the text color of the combo box label. + + + + + IBlock member implementation + + + + + Gets or sets the width of the of the drop-down portion of a combo box. + + + + + Gets or sets the height of the of the drop-down portion of a combo box. + + + + + Indicates the Width of the combo box part of the item. + + + + + Indicates whether control automatically releases its input focus when selection is made using keyboard. + + + + + Returns the reference to the inner combo box control. + + + + + Indicates whether item caption is always shown. + + + + + Gets an object representing the collection of the items contained in inner ComboBoxEx. + + + + + Gets or sets a value specifying the style of the combo box. + + + + + Gets or sets the starting index of text selected in the combo box. + + + + + Gets or sets the number of characters selected in the editable portion of the combo box. + + + + + Gets or sets the text that is selected in the editable portion of a combo box. + + + + + Gets or sets currently selected item in the combo box. + + + + + Gets or sets the index specifying the currently selected item. + + + + + Gets or sets the value indicating whether the item automatically loads all the fonts available into the combo box. + + + + + Gets or sets the height of an item in the combo box. + + + + + Indicates item's visibility when on pop-up menu. + + + + + Gets or sets the value that indicates whether the item was recently used. + + + + + Overridden. Gets or sets the text associated with this item. + + + + + Gets or sets the text associated with this item. + + + + + Gets or sets the item caption text displayed next to the combo box. + + + + + Gets or sets a string that specifies the property of the data source whose contents you want to display. When ComboBoxItem is used in DropDown mode + and objects like ComboItem are added to ComboBoxItems.Items collection DisplayMembers should be set to the name of the property you would + like to use as text representation in editable portion of ComboBox. For example in case of ComboItem objects property should be set to Text. + + + + + Specifies whether combo box is drawn using themes when running on OS that supports themes like Windows XP + + + + + Gets or sets the watermark font. + + + + + Gets or sets the watermark text color. + + + + + Gets or sets whether watermark text is displayed when control is empty. Default value is true. + + + + + Gets or sets the watermark (tip) text displayed inside of the control when Text is not set and control does not have input focus. This property supports text-markup. + Note that WatermarkText is not compatible with the auto-complete feature of .NET Framework 2.0. + + + + + Gets or sets the watermark hiding behaviour. Default value indicates that watermark is hidden when control receives input focus. + + + + + Gets or sets whether control is stand-alone control. Stand-alone flag affects the appearance of the control in Office 2007 style. + + + + + Summary description for ComboItem. + + + + + Creates new instance of ComboItem. + + + + + Initializes a new instance of the ComboItem class. + + + + + + Initializes a new instance of the ComboItem class. + + + + + + + Initializes a new instance of the ComboItem class. + + + + + + + + Initializes a new instance of the ComboItem class. + + + + + + + Overridden. Returns a human-readable string representation of this object. + + A string that represents this object. + + + + Gets or sets the text associated with this item. + + + + + Gets or sets the index value of the image assigned to the item. + + + + + Gets or sets the text alignment.. + + + + + Gets or sets the line alignment for the item. + + + + + Gets or sets the value that encapsulates text layout information (such as alignment, orientation, tab stops, and clipping) and display manipulations. + + + + + Gets or sets the image horizontal image position. + + + + + Gets or sets the font name used to draw the item text. + + + + + Gets or sets the text color. + + + + + Gets or sets the background color of the item. + + + + + Specifies style information applied to text. + + + + + Gets the em-size of this Font object in design units. + + + + + Gets or sets the image assigned to this item. + + + + + Gets or sets an object that contains data to associate with the item. + + + + + Serves as integration of regular Image class and Icon class + + + + + Specifies orientation of content. + + + + + Indicates Horizontal orientation of the content. + + + + + Indicates Vertical orientation of the content. + + + + + Specifies content horizontal alignment. + + + + + Content is left aligned.UI + + + + + Content is right aligned. + + + + + Content is centered. + + + + + Specifies content vertical alignment. + + + + + Content is top aligned. + + + + + Content is bottom aligned. + + + + + Content is in the middle. + + + + + Represents a extended content block interface for advanced layout information. + + + + + Returns whether element is an container so it receives full available size of parent control for layout. + + + + + Represents event arguments for SerialContentLayoutManager.NextPosition event. + + + + + Gets or sets the block that is layed out. + + + + + Gets or sets the current block position. + + + + + Gets or sets the calculated next block position. + + + + + Cancels default position calculation. + + + + + Represents event arguments for the SerialContentLayoutManager layout events. + + + + + Gets or sets the reference block object. + + + + + Gets or sets the position block will assume. + + + + + Cancel the layout of the block, applies only to BeforeXXX layout event. + + + + + Gets or sets the visibility index of the block. + + + + + Creates new instance of the class and initializes it with default values. + + + + + Delegate for SerialContentLayoutManager.NextPosition event. + + + + + Delegate for the SerialContentLayoutManager layout events. + + + + + Summary description for ContextExMenuTypeEditor. + + + + + Gets the editor style used by the EditValue method. + + An ITypeDescriptorContext that can be used to gain additional context information. + A UITypeEditorEditStyle value that indicates the style of editor used by EditValue. If the UITypeEditor does not support this method, then GetEditStyle will return None + + + + Represents the context menu bar that provides the context menus for the System.Windows.Forms.Control inherited controls on the form. + + + + + Returns the instance of the BaseItem that is assigned as context menu to the control. + + Control to return context menu for. + Instance of the BaseItem used as context menu for the control. + + + + Assigns the context menu to a control. + + Control to assign the context menu to. + Instance of PopupItem derived class usually ButtonItem to act as context menu for a control. The SubItems collection of the item specified here actually defines the visible context menu items. + + + + Gets/Sets whether Bar is visible or not. + + + + + Summary description for Popups. + + + + + Summary description for ControlContainerItem. + + + + + Creates new instance of ControlContainerItem and assigns item name. + + + + + Creates new instance of ControlContainerItem and assigns item name. + + Item name. + + + + Creates new instance of ControlContainerItem and assigns item name and item text. + + Item name. + Item text. + + + + Overridden. Returns the copy of the ControlContainerItem. + + Copy of the ControlContainerItem. + + + + Overridden. Draws the item. + + Target Graphics object. + + + + Overridden. Recalculates the size of the item. + + + + + Called when size of the item is changed externally. + + + + + Returns the Font object to be used for drawing the item text. + + Font object. + + + + Occurs when container control needs to be assigned to the item. + + + + + Indicates item's visiblity when on pop-up menu. + + + + + Indicates whether item was recently used. + + + + + Gets/Sets informational text (tooltip) for the item. + + + + + Gets or sets the reference to the control that is managed by the item. + + + + + IBlock member implementation + + + + + Specifies whether contained control can be automatically resized to fill the item container. + + + + + Represents the Check Box control with extended styles. + + + + + Invokes the CheckedChanged event. + + + + + Invokes CheckedChanging event. + + + + + Called when Command property value changes. + + + + + Occurs before Checked property is changed and allows you to cancel the change. + + + + + Occurs after Checked property is changed with extended information. + + + + + Occurs after Checked property is changed. This event is provided for the Windows Forms data binding support. You can use CheckedChangedEx to get extended information about the changed. + + + + + Occurs after Checked property is changed. This event is provided for the Windows Forms data binding support. You can use CheckedChangedEx to get extended information about the changed. + + + + + Gets or sets the size of the check or radio sign. Default value is 13x13. Minimum value is 6x6. + + + + + Gets or sets whether text-markup support is enabled for controls Text property. Default value is true. + Set this property to false to display HTML or other markup in the control instead of it being parsed as text-markup. + + + + + Gets or sets the appearance style of the item. Default value is CheckBox. Item can also assume the style of radio-button. + + + + + Gets or sets the check box position relative to the text. Default value is Left. + + + + + Gets or set a value indicating whether the button is in the checked state. + + + + + Gets or sets whether text assigned to the check box is visible. Default value is true. + + + + + Gets or sets the text color. Default value is Color.Empty which indicates that default color is used. + + + + + Gets or sets the text associated with the control. + + + + + Gets or sets a value indicating whether the control is automatically resized to display its entire contents. You can set MaximumSize.Width property to set the maximum width used by the control. + + + + + Gets or sets a value indicating whether the CheckBox will allow three check states rather than two. If the ThreeState property is set to true + CheckState property should be used instead of Checked property to set the extended state of the control. + + + + + Specifies the state of a control, such as a check box, that can be checked, unchecked, or set to an indeterminate state. + + + + + Gets the underlying CheckBoxItem + + + + + Gets or sets whether mnemonic character assigned to control is processed only if Alt key is pressed. Default value is false which indicate that Alt key is not required. + + + + + Gets or set whether the Checked values and the item appearance are automatically changed when the Check-Box is clicked. Default value is true. + + + + + Gets or sets the object that represents the Checked state of control. + + + + + Gets or sets whether empty string is consider as null value during CheckValue value comparison. Default value is true. + + + + + Gets or sets the value that represents the Indeterminate state of check box when CheckValue property is set to that value. Default value is null. + + + + + Gets or sets the value that represents the Checked state of check box when CheckValue property is set to that value. Default value is null. + + + + + Gets or sets the value that represents the Unchecked state of check box when CheckValue property is set to that value. Default value is null. + + + + + Gets or sets the custom image that is displayed instead default check box representation when check box is checked. + + + + + Gets or sets the custom image that is displayed instead default check box representation when check box is unchecked. + + + + + Gets or sets the custom image that is displayed instead default check box representation when check box is in indeterminate state. + + + + + Gets or sets the command assigned to the item. Default value is null. + Note that if this property is set to null Enabled property will be set to false automatically to disable the item. + + + + + Gets or sets user defined data value that can be passed to the command when it is executed. + + + + + Delegate for OptionGroupChanging event. + + + + + Represents event arguments for OptionGroupChanging event. + + + + + Set to true to cancel the checking on NewChecked button. + + + + + Check-box that will become checked if operation is not cancelled. + + + + + Check-box that is currently checked and which will be unchecked if operation is not cancelled. This property will have only valid values for eCheckBoxStyle.RadioButton style CheckBoxItems. + + + + + Indicates the action that has caused the event. + + + + + Default constructor. + + + + + Represents the combo box like control which shows the AdvTree control on popup. Tree control + can be configured to display multiple columns as well. + + + + + Initializes a new instance of the TextBoxDropDown class. + + + + + Raises FormattingEnabledChanged event. + + Event arguments. + + + + Raises FormatStringChanged event. + + Event arguments. + + + + Raises FormatInfoChanged event. + + Event arguments. + + + + Raises the DataSourceChanged event. + + An EventArgs that contains the event data. + + + + Raises the DisplayMemberChanged event. + + An EventArgs that contains the event data. + + + + When overridden in a derived class, resynchronizes the item data with the contents of the data source. + + + + + When overridden in a derived class, sets the specified array of objects in a collection in the derived class. + + An array of items. + + + + Raises the DataColumnCreated event. + + Provides event arguments. + + + + Raises the DataNodeCreated event. + + Provides event arguments. + + + + Creates a new node for the data item. + + Item to create node for. + New instance of the node. + + + + Raises the DataNodeCreated event. + + Provides event arguments. + + + + When overridden in a derived class, sets the object with the specified index in the derived class. + + The array index of the object. + The object. + + + + Called when ParentFieldName property has changed. + + + + + Called when GroupingMembers property has changed. + + + + + Raises the Format event. + + Event parameters + + + + Raises the SelectedIndexChanged event. + + Event arguments. + + + + Raises the ValueMemberChanged event. + + Event arguments. + + + + Raises the SelectedValueChanged event. + + Event arguments. + + + + Indicates whether property should be serialized by Windows Forms designer. + + + + + Resets the property to default value. + + + + + Resets style to default value. Used by windows forms designer. + + + + + Renders the selected node inside the combo box. + + Graphics reference. + Render bounds. + + + + Updates popup tree size based on its content. + + + + + Shows drop-down popup. Note that popup will be shown only if there is a DropDownControl assigned or DropDownItems collection has at least one item. + + + + + Closes the drop-down popup if it is open. + + + + + Called when PopupLocation property has changed. + + Old property value + New property value + + + + Raises the ButtonClearClick event. + + + + + + Raises the ButtonDropDownClick event. + + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when Command property value changes. + + + + + Occurs when Clear button is clicked and allows you to cancel the default action performed by the button. + + + + + Occurs when Drop-Down button that shows popup is clicked and allows you to cancel showing of the popup. + + + + + Occurs when ButtonCustom control is clicked. + + + + + Occurs when ButtonCustom2 control is clicked. + + + + + Occurs when the text alignment in text box has changed. + + + + + Occurs before Node has been selected by user or through the SelectedNode property. Event can be canceled. + + + + + Occurs after node has been selected by user or through the SelectedNode property. + + + + + Occurs when the DataSource changes. + + + + + Occurs when the DisplayMembers property changes. + + + + + Occurs when the control is bound to a data value that need to be converted. + + + + + Occurs when FormattingEnabled property changes. + + + + + Occurs when FormatString property changes. + + + + + Occurs when FormatInfo property has changed. + + + + + Occurs when a Node for an data-bound object item has been created and provides you with opportunity to modify the node. + + + + + Occurs when a group Node is created as result of GroupingMembers property setting and provides you with opportunity to modify the node. + + + + + Occurs when value of ValueMember property has changed. + + + + + Occurs when value of SelectedValue property has changed. + + + + + Occurs when value of SelectedIndex property has changed. + + + + + Occurs when ColumnHeader is automatically created by control as result of data binding and provides you with opportunity to modify it. + + + + + Gets or sets the tree node that is currently selected in the tree control. + + + If no Node is currently selected, the + SelectedNode property is a null reference (Nothing in Visual + Basic). + + + + + Gets or sets whether selection change on popup tree closes the popup. Default value is true. + + + + + Gets or sets the field name that holds the text that will be displayed in the control for selected item. When not set all items set in DisplayMembers will be displayed in control. + + + + + Gets or sets the field name that holds the text that will be displayed in the control for selected item. When not set all items set in DisplayMembers will be displayed in control. + + + + + Gets or sets the comma separated list of property or column names to display on popup tree control. + + + + + Gets or sets the data source for the ComboTree. Expected is an object that implements the IList or IListSource interfaces, + such as a DataSet or an Array. The default is null. + + + + + Gets or sets a value indicating whether formatting is applied to the DisplayMembers property of the control. + + + + + Gets or sets the format-specifier characters that indicate how a value is to be displayed. + + + + + Gets or sets the IFormatProvider that provides custom formatting behavior. + + + + + Gets or sets comma separated field or property names that holds the value that is used to identify node and parent node. Format expected is: FieldNodeId,ParentNodeFieldId. For example if your table represents departments, you have DepartmentId field which uniquely identifies a department and ParentDepartmentId field which identifies parent of the department if any you would set this property to DepartmentId,ParentDepartmentId. + Note that you can only use ParentFieldNames or GroupingMembers property but not both. If both are set ParentFieldName take precedence. + + + + + Gets or sets comma separated list of field or property names that are used for grouping when data-binding is used. + + + + + Gets or sets style for automatically created group nodes when data-binding is used and GroupingMembers property is set. + + + Name of the style assigned or null value indicating that no style is used. + Default value is null. + + + + + Gets or sets the index specifying the currently selected item. + + + + + Gets or sets the property to use as the actual value for the items in the control. Applies to data-binding scenarios. SelectedValue property will return the value of selected node as indicated by this property. + + + + + Gets or sets the value of the member property specified by the ValueMember property. + + + + + Gets or sets the watermark font. + + + + + Gets or sets the watermark text color. + + + + + Gets or sets whether watermark text is displayed if set for the input items. Default value is true. + + + + + Gets or sets the watermark text displayed on the input control when control is empty. + + + + + Gets or sets the watermark text alignment. Default value is left. + + + + + Gets or sets whether FocusHighlightColor is used as background color to highlight text box when it has input focus. Default value is false. + + + + + Gets or sets the color used as background color to highlight text box when it has input focus and focus highlight is enabled. + + + + + Specifies the background style of the control. + + + + + Gets the object that describes the settings for the button that shows drop-down when clicked. + + + + + Gets the object that describes the settings for the button that clears the content of the control when clicked. + + + + + Gets the object that describes the settings for the custom button that can execute an custom action of your choosing when clicked. + + + + + Gets the object that describes the settings for the custom button that can execute an custom action of your choosing when clicked. + + + + + Indicates whether Enter key when pressed while control has input focus toggles the popup. Default value is true. + + + + + Gets or sets whether keyboard incremental search is enabled. Default value is true. + + + + + Gets or sets whether during keyboard search selected node can be set to nothing/null if there is no match found. + Default value is true. + + + + + Gets or sets the keyboard search buffer expiration timeout. Default value is 1000 which indicates that + key pressed within 1 second will add to the search buffer and control will be searched for node text + that begins with resulting string. Setting this value to 0 will disable the search buffer. + + + + + Indicates the custom popup location for the ComboTree popup + + + + + Gets or sets the reference of the control that will be displayed on popup that is shown when drop-down button is clicked. + + + + + Gets the collection of BaseItem derived items displayed on popup menu. + + + + + Gets the reference to internal AdvTree control that is displayed on popup Use it to get access to the AdvTree events and properties. + + + + + Gets or sets the height in pixels of the drop-down portion of the ComboTreeBox control. + + + + + Gets or sets the width in pixels of the drop-down portion of the ComboTreeBox control. + + + + + Gets or sets a value indicating whether the combo box is displaying its drop-down portion. + + + + + Gets the collection of tree nodes that are assigned to the popup tree view control. + + + A NodeCollection that represents the tree nodes + assigned to the tree control. + + + The Nodes property holds a collection of Node objects, each of which has a + Nodes property that can contain its own NodeCollection. + + + + + Gets the collection of column headers that appear in the popup tree. + + + By default there are no column headers defined. In that case tree control + functions as regular tree control where text has unrestricted width. + If you want to restrict the horizontal width of the text but not display + column header you can create one column and set its width to the width desired and + set its Visible property to false. + + + + + Gets or sets whether column headers are visible if they are defined through Columns collection. Default value is true. + + + + + Gets or sets whether grid lines are displayed when columns are defined. Default value is true. + + + + + Gets or sets the grid lines color. + + + + + Gets or sets whether horizontal grid lines between each row are displayed. Default value is false. + + + + + Gets or sets whether node is highlighted when mouse enters the node. Default value is false. + + + There are two ways to enable the node hot-tracking. You can set the HotTracking property to true in which case the + mouse tracking is enabled using system colors specified in TreeColorTable. You can also define the NodeStyleMouseOver + style which gets applied to the node when mouse is over the node. + + + + + Gets or sets the node selection box style for popup tree control. + + SelectionBox Property + SelectionBoxSize Property + SelectionBoxFillColor Property + SelectionBoxBorderColor Property + + + + Gets or sets the ImageList that contains the Image objects used by the tree nodes. + + + + + Gets or sets the image-list index value of the default image that is displayed by the tree nodes. + + + + + Gets or sets the control background color when control is disabled. Default value is an empty color which indicates that system background color is used when control is disabled. + + + + + Gets or sets the command assigned to the item. Default value is null. + Note that if this property is set to null Enabled property will be set to false automatically to disable the item. + + + + + Gets or sets user defined data value that can be passed to the command when it is executed. + + + + + Represents the method that will handle converting for ComboTree control. + + + + + + + Gets the reference to the item being converted. + + + + + Get the reference to the name of the field or property on the item that needs conversion. + + + + + Defines delegate for data node based events. + + + + + Defines event arguments for data node based events. + + + + + Gets or sets the node that is created for data item. + + + + + Gets the data-item node is being created for. + + + + + Initializes a new instance of the DataNodeEventArgs class. + + + + + + + Defines delegate for data column based events. + + + + + Defines event arguments for data column based events. + + + + + Gets or sets the column header that is created for data. + + + + + Initializes a new instance of the DataColumnEventArgs class. + + + + + + Initializes a new instance of the ControlWithBackgroundStyle class. + + + + + Resets style to default value. Used by windows forms designer. + + + + + Gets or sets whether anti-alias smoothing is used while painting. Default value is true. + + + + + Specifies the background style of the control. + + + + + Represents the DataGridView control with enhanced Office 2007 style. + + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Indicates whether control will delay call to OnResize base DataGridView method when control is running on MDI Child which was introduced as workaround to an issue in control. + + + + + Gets or sets the scroll-bar visual style. + + + + + Gets or sets whether selected column header is highlighted. Default value is true. + + + + + Gets or sets whether select all sign displayed in top-left corner of the grid is visible. Default value is true. + + + + + Gets or sets whether enhanced selection for the cells is painted in Office 2007 style. Default value is true. + + + + + Indicates whether BackgroundColor property set on DataGridView is obeyed instead of using system color scheme color. + + + + + GetContentBounds + + + + + + + + + Cell painting + + + + + + + + + + + + + + + + Paints the Button background + + + + + + + + Paints the button background and content + + + + + + + + + + + OnMouseEnter + + + + + + Establishes the given rowIndex as the + ActiveRowIndex. + + + + + + Processes MouseLeave events + + + + + + Processes MouseMove events + + + + + + Processes MouseDown events + + + + + + Processes MouseUp events + + + + + + Determines if the given part is set + + + + + + + + Gets the background bounds for the given cell + + + + + + + + Gets the button bounds for the given cell + + + + + + + + GetValue + + + + + + + Initiates the refresh of the cell button + + + + + + + Gets the Type of the editing control associated with the cell + + + + + FormattedValueType + + + + + Gets whether the Column cells will fully paint + their cell background and content + + + + + Constructor + + + + + Gets whether ImageFixedSize property should be serialized. + + + + + Hooks or unhooks our system events + + + + + + Processes Button expand changes + + + + + + + ButtonItem_Click + + + + + + + Gets the cell paint bitmap + + + + + + + Invokes BeforeCellPaint user events + + Row index + Column index + + + + Clones the ButtonX Column + + + + + + Dispose + + + + + + Gets or sets the active row index + + + + + Gets the Control Button + + + + + Gets or sets the Current row index + + + + + Gets or sets a expanded button + was just closed + + + + + Gets or sets the cell callback state + + + + + Gets or sets whether Checked property is automatically inverted, button checked/unchecked, when button is clicked. Default value is false. + + + + + Indicates whether the button will auto-expand when clicked. + When button contains sub-items, sub-items will be shown only if user + click the expand part of the button. Setting this property to true will expand the button and show sub-items when user + clicks anywhere inside of the button. Default value is false which indicates that button is expanded only + if its expand part is clicked. + + + + + Gets or set a value indicating whether the button is in the checked state. + + + + + Gets or sets button Color Scheme. ColorScheme does not apply to Office2007 styled buttons. + + + + + Gets or sets the predefined color of the button. Color specified applies to buttons with Office 2007 style only. It does not have + any effect on other styles. Default value is eButtonColor.BlueWithBackground + + + + + Gets or sets the custom color name. Name specified here must be represented by the corresponding object with the same name that is part + of the Office2007ColorTable.ButtonItemColors collection. See documentation for Office2007ColorTable.ButtonItemColors for more information. + If color table with specified name cannot be found default color will be used. Valid settings for this property override any + setting to the Color property. Applies to items with Office 2007 style only. + + + + + Specifies the image for the button when items Enabled property is set to false. + + + + + Gets or sets whether text-markup support is enabled for items Text property. Default value is true. + Set this property to false to display HTML or other markup in the item instead of it being parsed as text-markup. + + + + + Gets or sets whether the control can respond to user interaction + + + + + Indicates the way button is rendering the mouse over state. Setting the value to + Color will render the image in gray-scale when mouse is not over the item. + + + + + Specifies the image for the button when mouse is over the item. + + + + + Specifies the Button image. + + + + + Sets fixed size of the image. Image will be scaled and painted it size specified. + + + + + Gets/Sets the image position inside the button. + + + + + Gets or sets the amount of spacing between button image if specified and text. + + + + + Gets or sets the location of popup in relation to it's parent. + + + + + Specifies the image for the button when mouse left button is pressed. + + + + + Gets or sets an shape descriptor for the button + which describes the shape of the button. Default value is null + which indicates that system default shape is used. + + + + + Gets or sets whether button displays the expand part that indicates that button has popup. + + + + + Gets or sets whether button appears as split button. Split button appearance + divides button into two parts. Image which raises the click event when clicked + and text and expand sign which shows button sub items on popup menu when clicked. + Button must have both text and image visible (ButtonStyle property) in order to + appear as a full split button. + + + + + Gets/Sets the visual style for the button. + + + + + Returns the collection of sub items. + + + + + Gets or sets the width of the expand part of the button item. + + + + + Gets or sets the default Text to display on the Button + + + + + Gets or sets the text alignment. Applies only when button text is not composed using text markup. Default value is center. + + + + + Gets the Cell paint setting for the ButtonX control + + + + + BeforeCellPaintEventArgs + + + + + RowIndex of cell being painted + + + + + ColumnIndex of cell being painted + + + + + GetAdjustedEditingControlBounds + + + + + + + + GetPreferredSize + + + + + + + + + + Cell painting + + + + + + + + + + + + + + + + Paints the Button background + + + + + + + + Paints the button background and content + + + + + + + + + + + OnMouseEnter + + + + + + Processes MouseLeave events + + + + + + Processes MouseMove events + + + + + + Processes MouseDown events + + + + + + Processes MouseUp events + + + + + + Determines if the given part is set + + + + + + + + Gets the background bounds for the given cell + + + + + + + + Gets the Content bounds for the given cell + + + + + + + Initiates the refresh of the cell + + + + + + + Gets the Type of the editing control associated with the cell + + + + + FormattedValueType + + + + + Constructor + + + + + HookEvents + + + + + + CheckBoxItem_Click + + + + + + + CheckBoxItem_DoubleClick + + + + + + + Gets the cell paint bitmap + + + + + + + Invokes BeforeCellPaint user events + + Row index + Column index + + + + Clones the ButtonX Column + + + + + + Dispose + + + + + + Gets or sets the active row index + + + + + Gets the Control Button + + + + + Gets or sets the Current row index + + + + + Gets or sets the MouseDown row index + + + + + Gets or sets the cell callback state + + + + + Gets or sets the custom image that is displayed instead default check box representation when check box is checked. + + + + + Gets or sets the custom image that is displayed instead default check box representation when check box is unchecked. + + + + + Gets or sets the custom image that is displayed instead default check box representation when check box is in indeterminate state. + + + + + Gets or sets the check box position relative to the text. + Default value is Left. + + + + + Gets or set a value indicating whether the button is in the checked state. + + + + + Specifies the state of the control, that can be + checked, unchecked, or set to an indeterminate state. + + + + + CheckValue + + + + + Gets or sets the value that represents the Checked state value of the check + box when CheckValue property is set to that value. Default value is null. + + + + + Gets or sets the value that represents the Indeterminate state of the check + box when CheckValue property is set to that value. Default value is null. + + + + + Gets or sets the value that represents the Unchecked state value of check + box when CheckValue property is set to that value. Default value is 'N'. + + + + + Gets or sets whether empty string is consider as null value + during CheckValue value comparison. Default value is true. + + + + + Gets or sets whether the control can respond to user interaction + + + + + Gets or sets whether text-markup support is enabled for controls + Text property. Default value is true. Set this property to false to + display HTML or other markup in the control instead of it being parsed as text-markup. + + + + + Gets or sets the default Text to display + + + + + Gets or sets the text color. Default value is + Color.Empty which indicates that default color is used. + + + + + Gets or sets whether text assigned to the check box is visible. + Default value is true. + + + + + Gets or sets a value indicating whether the CheckBox will allow + three check states rather than two. If the ThreeState property is + set to true CheckState property should be used instead of Checked + property to set the extended state of the control. + + + + + Gets the Cell paint setting for the ButtonX control + + + + + InitializeEditingControl + + + + + + + + DetachEditingControl + + + + + Click + + + + + + + DrawItem + + + + + + + DropDownChange + + + + + + + MeasureItem + + + + + + + PositionEditingControl + + + + + + + + + + + + + + GetAdjustedEditingControlBounds + + + + + + + + GetPreferredSize + + + + + + + + + + ParseFormattedValue + + + + + + + + + + Cell painting + + + + + + + + + + + + + + + + Paints the cell background + + + + + + + + Paints the cell content + + + + + + + + + + + + DrawControl + + + + + + + + + + + DrawText + + + + + + + + + MustRenderVisibleControl + + + + + + + OnMouseEnter + + + + + + Gets the background bounds for the given cell + + + + + + + + Gets the button bounds for the given cell + + + + + + + Determines if the given part is set + + + + + + + + Gets the Type of the editing control associated with the cell + + + + + Constructor + + + + + Indicates whether property should be serialized by Windows Forms designer. + + + + + Resets the property to default value. + + + + + HookEvents + + + + + + ComboBoxEx_DataSourceChanged + + + + + + + DoComboBoxEx_Click + + + + + + + DoComboBoxEx_DrawItem + + + + + + + DoComboBoxEx_DropDownChange + + + + + + + DoComboBoxEx_MeasureItem + + + + + + + Gets the cell paint bitmap + + + + + + + Invokes BeforeCellPaint user events + + Row index + Column index + + + + Clones the ButtonX Column + + + + + + Dispose + + + + + + Occurs right before a ComboBox Cell is painted + + + + + Occurs when the ComboBox is clicked + + + + + Occurs when a visual aspect of an owner-drawn ComboBox changes + + + + + Occurs when drop down portion of the ComboBox is shown or hidden. + + + + + Occurs each time an owner-drawn ComboBox item needs + to be drawn and when the sizes of the list items are determined + + + + + Gets the underlying ComboBoxEx control + + + + + Gets or sets the ComboBox CurrencyManager + + + + + Gets or sets a custom System.Collections.Specialized.StringCollection + to use when the AutoCompleteSource property is set to CustomSource. + + + + + Gets or sets an option that controls how automatic completion works for the ComboBox. + + + + + Gets or sets a value specifying the source of complete strings used for automatic completion. + + + + + Gets or sets the data source that populates the selections for the combo box + + + + + Gets or sets a string that specifies the property or column + from which to retrieve strings for display in the combo box. + + + + + Gets or sets whether the control + will be displayed for the current cell only. + + + + + Gets or sets a value indicating whether user code or + operating system code will handle drawing of elements in the list. + + + + + Gets or sets a value specifying the style of the combo box. + + + + + Gets or sets the height in pixels of the drop-down portion of the ComboBox. + + + + + Gets or sets the width of the drop-down lists of the combo box. + + + + + Gets or sets whether the control can respond to user interaction + + + + + Gets or sets the flat style appearance of the column's cells. + + + + + Gets or sets whether control displays focus cues when focused. + + + + + Gets or sets the format-specifier + characters that indicate how a value is to be displayed. + + + + + Gets or sets a value indicating whether formatting is applied to the DisplayMember property. + + + + + Gets or sets the ImageList control used by Combo box to draw images. + + + + + Gets or sets the Input Method Editor (IME) mode of the control. + + + + + Gets or sets a value indicating whether + the control should resize to avoid showing partial items. + + + + + Gets or sets whether control is stand-alone control. + Stand-alone flag affects the appearance of the control in Office 2007 style. + + + + + Gets or sets the height of an item in the combo box. + + + + + Gets the collection of objects used as selections in the combo box. + + + + + Gets or sets the maximum number of items + in the drop-down list of the cells in the column. + + + + + Gets or sets the number of characters a user can type into the ComboBox. + + + + + Gets or sets a value indicating whether control's + elements are aligned to support locales using right-to-left fonts. + + + + + Gets or sets whether the items in the combo box are sorted. + + + + + Determines the visual style applied to + the combo box when shown. Default style is Office 2007. + + + + + Gets or sets the text associated with this control. + + + + + Gets or sets a string that specifies the property or column + from which to get values that correspond to the selections in the drop-down list. + + + + + Gets or sets the watermark hiding behaviour. Default value + indicates that watermark is hidden when control receives input focus. + + + + + Gets or sets the watermark text color. + + + + + Gets or sets whether watermark text is + displayed when control is empty. Default value is true. + + + + + Gets or sets the watermark font. + + + + + Gets or sets the watermark (tip) text displayed inside of the control when Text + is not set and control does not have input focus. This property supports text-markup. + Note that WatermarkText is not compatible with the auto-complete feature of .NET Framework 2.0. + + + + + Gets the Cell paint setting for the control + + + + + DropDownChangeEventArgs + + + + + ColumnIndex + + + + + Expanded state + + + + + RowIndex + + + + + Handles OnTextChanged events + + + + + + OnSelectedIndexChanged + + + + + + NotifyDataGridViewOfValueChange + + + + + ApplyCellStyleToEditingControl + + + + + + Gets EditingControlFormattedValue + + + + + + + Gets whether the given key wants to be processed + by the Control + + + + + + + + PrepareEditingControlForEdit + + + + + + Gets or sets the DataGridView + + + + + Gets or sets the Control Formatted Value + + + + + Gets or sets the Control RoeIndex + + + + + Gets or sets the Control ValueChanged state + + + + + Gets the Panel Cursor + + + + + Gets whether to RepositionEditingControlOnValueChange + + + + + InitializeEditingControl + + + + + + + + DetachEditingControl + + + + + ButtonClearClick + + + + + + + ButtonCustomClick + + + + + + + ButtonCustom2Click + + + + + + + ButtonDropDownClick + + + + + + + ButtonFreeTextClick + + + + + + + ConvertFreeTextEntry + + + + + + + PositionEditingControl + + + + + + + + + + + + + + GetAdjustedEditingControlBounds + + + + + + + + GetPreferredSize + + + + + + + + + + Cell painting + + + + + + + + + + + + + + + + Paints the cell background + + + + + + + + Paints the cell content + + + + + + + + + + + DrawControl + + + + + + + + DrawText + + + + + + + + Gets the background bounds for the given cell + + + + + + + + Gets the button bounds for the given cell + + + + + + + GetValue + + + + + + + GetHorizontalAlignment + + + + + + + Determines if the given part is set + + + + + + + + Gets the Type of the editing control associated with the cell + + + + + FormattedValueType + + + + + Constructor + + + + + Resets style to default value. Used by windows forms designer. + + + + + Gets whether Value property should be serialized by Windows Forms designer. + + true if value serialized otherwise false. + + + + Gets whether Value property should be serialized by Windows Forms designer. + + true if value serialized otherwise false. + + + + DoButtonClearClick + + + + + + + DoButtonCustomClick + + + + + + + DoButtonCustom2Click + + + + + + + DoButtonDropDownClick + + + + + + + DoButtonFreeTextClick + + + + + + + DoConvertFreeTextEntry + + + + + + + Gets the cell paint bitmap + + + + + + + Invokes BeforeCellPaint user events + + Row index + Column index + + + + Clones the ButtonX Column + + + + + + Occurs right before a DateTimeInput Cell is painted + + + + + Occurs when Clear button is clicked and allows you + to cancel the default action performed by the button + + + + + Occurs when ButtonCustom control is clicked + + + + + Occurs when ButtonCustom2 control is clicked + + + + + Occurs when Drop-Down button that shows calendar + is clicked and allows you to cancel showing of the popup + + + + + Occurs when Free-Text button is clicked + and allows you to cancel its default action + + + + + Occurs if Free-Text entry value is not natively recognized by + the control and provides you with opportunity to convert that + value to the value the control expects + + + + + Gets the underlying DateTimeInput control + + + + + Gets or sets whether empty null/nothing state of the control is + allowed. Default value is true which means that IsEmpty property may + return true if input value is resets or ValueObject set to null/nothing. + + + + + Gets or sets whether input focus is automatically advanced + to next input field when input is complete in current one. + + + + + Gets or sets whether first day in month is automatically + selected on popup date picker when month or year is changed. + + + + + Gets or sets whether auto-overwrite functionality for input is enabled. + When in auto-overwrite mode input field will erase existing entry + and start new one if typing is continued after InputComplete method is called. + + + + + Specifies the background style of the control. + + + + + Gets the object that describes the settings for the button + that clears the content of the control when clicked. + + + + + Gets the object that describes the settings for the custom button + that can execute an custom action of your choosing when clicked. + + + + + Gets the object that describes the settings for the custom button that can execute an custom action of your choosing when clicked. + + + + + Gets the object that describes the settings for the button + that shows drop-down when clicked. + + + + + Gets the object that describes the settings for the button + that switches the control into the free-text entry mode when clicked. + + + + + Gets or sets the custom date/time format string. + + + + + Gets or sets whether the control + will be displayed for the current cell only. + + + + + Gets or sets whether empty input values (year, month or day) are + set to defaults while user is entering data. Default value is true. + + + + + Gets or sets whether the control can respond to user interaction + + + + + Gets or sets the format date/time is displayed in. To specify + custom format set this value to Custom and specify custom format + using CustomFormat property. + + + + + Gets or sets the input field alignment inside the control + + + + + Gets or sets whether input part of the control is read-only. When set + to true the input part of the control becomes read-only and does not allow + the typing. However, drop-down part if visible still allows user to change + the value of the control. Use this property to allow change of the value + through drop-down picker only. + + + + + Gets or sets whether check box shown using ShowCheckBox + property which locks/unlocks the control update is checked. + + + + + Gets or sets the maximum date and time that can be selected in the control. + + + + + Gets or sets the minimum date and time that can be selected in the control. + + + + + Gets the reference to the internal MonthCalendarItem control which is used to display calendar when drop-down is open. + + + + + List of characters that when pressed would select next input field. For example if you are + allowing time input you could set this property to : so when user presses the : character, + the input is forwarded to the next input field. + + + + + Gets or sets a value indicating whether a check box is + displayed to the left of the input value. Set to true if a check box + is displayed to the left of the input value; otherwise, false. The default is false. + + When the ShowCheckBox property is set to true, a check box is displayed + to the left of the input in the control. When the check box is selected, the value + can be updated. When the check box is cleared, the value is unable to be changed. + You can handle the LockUpdateChanged event to be notified when this check box is checked + and unchecked. Use LockUpdateChecked property to get or sets whether check box is checked. + + + + + + Gets or sets a value indicating whether a spin button control + (up-down control) is used to adjust the current value. The default is false. + + When the ShowUpDown property is set to true, a spin button control + is shown to adjust value of currently focused input item. The value can + be adjusted by using the up and down buttons to change the value. + + + + + + Gets the Cell paint setting for the control + + + + + Handles OnValueChanged events + + + + + + ApplyCellStyleToEditingControl + + + + + + Gets EditingControlFormattedValue + + + + + + + Gets whether the given key wants to be processed + by the Control + + + + + + + + PrepareEditingControlForEdit + + + + + + Gets or sets the Edit state + + + + + Gets or sets the DataGridView + + + + + Gets or sets the Control Formatted Value + + + + + Gets or sets the Control RoeIndex + + + + + Gets or sets the Control ValueChanged state + + + + + Gets the Panel Cursor + + + + + Gets whether to RepositionEditingControlOnValueChange + + + + + InitializeEditingControl + + + + + + + + DetachEditingControl + + + + + ButtonClearClick + + + + + + + ButtonCustomClick + + + + + + + ButtonCustom2Click + + + + + + + ButtonDropDownClick + + + + + + + ButtonFreeTextClick + + + + + + + ConvertFreeTextEntry + + + + + + + PositionEditingControl + + + + + + + + + + + + + + GetAdjustedEditingControlBounds + + + + + + + + GetPreferredSize + + + + + + + + + + Cell painting + + + + + + + + + + + + + + + + Paints the cell background + + + + + + + + Paints the cell content + + + + + + + + + + + DrawControl + + + + + + + + DrawText + + + + + + + + Gets the background bounds for the given cell + + + + + + + + Gets the button bounds for the given cell + + + + + + + GetValue + + + + + + + GetHorizontalAlignment + + + + + + + Determines if the given part is set + + + + + + + + Gets the Type of the editing control associated with the cell + + + + + FormattedValueType + + + + + Constructor + + + + + Resets style to default value. Used by windows forms designer. + + + + + DoButtonClearClick + + + + + + + DoButtonCustomClick + + + + + + + DoButtonCustom2Click + + + + + + + DoButtonDropDownClick + + + + + + + DoButtonFreeTextClick + + + + + + + DoConvertFreeTextEntry + + + + + + + Gets the cell paint bitmap + + + + + + + Invokes BeforeCellPaint user events + + Row index + Column index + + + + Clones the ButtonX Column + + + + + + Occurs right before a DoubleInput Cell is painted + + + + + Occurs when Clear button is clicked and allows you + to cancel the default action performed by the button + + + + + Occurs when ButtonCustom control is clicked + + + + + Occurs when ButtonCustom2 control is clicked + + + + + Occurs when Drop-Down button that shows calendar + is clicked and allows you to cancel showing of the popup + + + + + Occurs when Free-Text button is clicked + and allows you to cancel its default action + + + + + Occurs if Free-Text entry value is not natively recognized by + the control and provides you with opportunity to convert that + value to the value the control expects + + + + + DoubleInput + + + + + Specifies the background style of the control. + + + + + Gets the object that describes the settings for the button + that clears the content of the control when clicked. + + + + + Gets the object that describes the settings for the custom button + that can execute an custom action of your choosing when clicked. + + + + + Gets the object that describes the settings for the custom button that can execute an custom action of your choosing when clicked. + + + + + Gets the object that describes the settings for the button + that shows drop-down when clicked. + + + + + Gets the object that describes the settings for the button + that switches the control into the free-text entry mode when clicked. + + + + + Gets or sets the Numeric String Format that is used to format + the numeric value entered for display purpose. Read more about + available formats in MSDN under "Standard Numeric Format Strings" + and "Custom Numeric Format Strings" topics. + + The format specified here indicates the format for display purpose + only, not for the input purpose. For example to display the number + in system Currency format set the DisplayFormat to 'C'. + + + + + + Gets or sets whether the control + will be displayed for the current cell only. + + + + + Gets or sets whether the control can respond to user interaction + + + + + Gets or sets the value to increment or decrement the value of the + control when the up or down buttons are clicked. + + + + + Gets or sets the input field alignment inside the control + + + + + Gets or sets whether check box shown using ShowCheckBox + property which locks/unlocks the control update is checked. + + + + + Gets or sets the maximum value that can be entered. + + + + + Gets or sets the minimum value that can be entered. + + + + + Gets or sets a value indicating whether a check box is + displayed to the left of the input value. Set to true if a check box + is displayed to the left of the input value; otherwise, false. The default is false. + + When the ShowCheckBox property is set to true, a check box is displayed + to the left of the input in the control. When the check box is selected, the value + can be updated. When the check box is cleared, the value is unable to be changed. + You can handle the LockUpdateChanged event to be notified when this check box is checked + and unchecked. Use LockUpdateChecked property to get or sets whether check box is checked. + + + + + + Gets or sets a value indicating whether a spin button control + (up-down control) is used to adjust the current value. The default is false. + + When the ShowUpDown property is set to true, a spin button control + is shown to adjust value of currently focused input item. The value can + be adjusted by using the up and down buttons to change the value. + + + + + + Gets the Cell paint setting for the control + + + + + Handles OnValueChanged events + + + + + + ApplyCellStyleToEditingControl + + + + + + Gets EditingControlFormattedValue + + + + + + + Gets whether the given key wants to be processed + by the Control + + + + + + + + PrepareEditingControlForEdit + + + + + + Gets or sets the Edit state + + + + + Gets or sets the DataGridView + + + + + Gets or sets the Control Formatted Value + + + + + Gets or sets the Control RoeIndex + + + + + Gets or sets the Control ValueChanged state + + + + + Gets the Panel Cursor + + + + + Gets whether to RepositionEditingControlOnValueChange + + + + + InitializeEditingControl + + + + + + + + DetachEditingControl + + + + + ButtonClearClick + + + + + + + ButtonCustomClick + + + + + + + ButtonCustom2Click + + + + + + + ButtonDropDownClick + + + + + + + ButtonFreeTextClick + + + + + + + ConvertFreeTextEntry + + + + + + + PositionEditingControl + + + + + + + + + + + + + + GetAdjustedEditingControlBounds + + + + + + + + GetPreferredSize + + + + + + + + + + Cell painting + + + + + + + + + + + + + + + + Paints the cell background + + + + + + + + Paints the cell content + + + + + + + + + + + DrawControl + + + + + + + + DrawText + + + + + + + + Gets the background bounds for the given cell + + + + + + + + Gets the button bounds for the given cell + + + + + + + GetValue + + + + + + + GetHorizontalAlignment + + + + + + + Determines if the given part is set + + + + + + + + Gets the Type of the editing control associated with the cell + + + + + FormattedValueType + + + + + Constructor + + + + + Resets style to default value. Used by windows forms designer. + + + + + DoButtonClearClick + + + + + + + DoButtonCustomClick + + + + + + + DoButtonCustom2Click + + + + + + + DoButtonDropDownClick + + + + + + + DoButtonFreeTextClick + + + + + + + DoConvertFreeTextEntry + + + + + + + Gets the cell paint bitmap + + + + + + + Invokes BeforeCellPaint user events + + Row index + Column index + + + + Clones the ButtonX Column + + + + + + Occurs right before a DateTimeInput Cell is painted + + + + + Occurs when Clear button is clicked and allows you + to cancel the default action performed by the button + + + + + Occurs when ButtonCustom control is clicked + + + + + Occurs when ButtonCustom2 control is clicked + + + + + Occurs when Drop-Down button that shows calendar + is clicked and allows you to cancel showing of the popup + + + + + Occurs when Free-Text button is clicked + and allows you to cancel its default action + + + + + Occurs if Free-Text entry value is not natively recognized by + the control and provides you with opportunity to convert that + value to the value the control expects + + + + + IntegerInput + + + + + Specifies the background style of the control. + + + + + Gets the object that describes the settings for the button + that clears the content of the control when clicked. + + + + + Gets the object that describes the settings for the custom button + that can execute an custom action of your choosing when clicked. + + + + + Gets the object that describes the settings for the custom button that can execute an custom action of your choosing when clicked. + + + + + Gets the object that describes the settings for the button + that shows drop-down when clicked. + + + + + Gets the object that describes the settings for the button + that switches the control into the free-text entry mode when clicked. + + + + + Gets or sets the Numeric String Format that is used to format + the numeric value entered for display purpose. Read more about + available formats in MSDN under "Standard Numeric Format Strings" + and "Custom Numeric Format Strings" topics. + + The format specified here indicates the format for display purpose + only, not for the input purpose. For example to display the number + in system Currency format set the DisplayFormat to 'C'. + + + + + + Gets or sets whether the control + will be displayed for the current cell only. + + + + + Gets or sets whether the control can respond to user interaction + + + + + Gets or sets the value to increment or decrement the value of the + control when the up or down buttons are clicked. + + + + + Gets or sets the input field alignment inside the control + + + + + Gets or sets whether check box shown using ShowCheckBox + property which locks/unlocks the control update is checked. + + + + + Gets or sets the maximum value that can be entered. + + + + + Gets or sets the minimum value that can be entered. + + + + + Gets or sets a value indicating whether a check box is + displayed to the left of the input value. Set to true if a check box + is displayed to the left of the input value; otherwise, false. The default is false. + + When the ShowCheckBox property is set to true, a check box is displayed + to the left of the input in the control. When the check box is selected, the value + can be updated. When the check box is cleared, the value is unable to be changed. + You can handle the LockUpdateChanged event to be notified when this check box is checked + and unchecked. Use LockUpdateChecked property to get or sets whether check box is checked. + + + + + + Gets or sets a value indicating whether a spin button control + (up-down control) is used to adjust the current value. The default is false. + + When the ShowUpDown property is set to true, a spin button control + is shown to adjust value of currently focused input item. The value can + be adjusted by using the up and down buttons to change the value. + + + + + + Gets the Cell paint setting for the control + + + + + Handles OnValueChanged events + + + + + + ApplyCellStyleToEditingControl + + + + + + Gets EditingControlFormattedValue + + + + + + + Gets whether the given key wants to be processed + by the Control + + + + + + + + PrepareEditingControlForEdit + + + + + + Gets or sets the Edit state + + + + + Gets or sets the DataGridView + + + + + Gets or sets the Control Formatted Value + + + + + Gets or sets the Control RoeIndex + + + + + Gets or sets the Control ValueChanged state + + + + + Gets the Panel Cursor + + + + + Gets whether to RepositionEditingControlOnValueChange + + + + + InitializeEditingControl + + + + + + + + DetachEditingControl + + + + + ButtonClearClick + + + + + + + ButtonCustomClick + + + + + + + ButtonCustom2Click + + + + + + + ButtonDropDownClick + + + + + + + PositionEditingControl + + + + + + + + + + + + + + GetAdjustedEditingControlBounds + + + + + + + + GetPreferredSize + + + + + + + + + + Cell painting + + + + + + + + + + + + + + + + Paints the cell background + + + + + + + + Paints the cell content + + + + + + + + + + + DrawControl + + + + + + + + DrawText + + + + + + + + Gets the background bounds for the given cell + + + + + + + + Gets the button bounds for the given cell + + + + + + + GetValue + + + + + + + GetHorizontalAlignment + + + + + + + Determines if the given part is set + + + + + + + + Gets the Type of the editing control associated with the cell + + + + + Constructor + + + + + Resets style to default value. Used by windows forms designer. + + + + + Indicates whether property should be serialized by Windows Forms designer. + + + + + Resets the property to default value. + + + + + DoButtonClearClick + + + + + + + DoButtonCustomClick + + + + + + + DoButtonCustom2Click + + + + + + + DoButtonDropDownClick + + + + + + + Gets the cell paint bitmap + + + + + + + Invokes BeforeCellPaint user events + + Row index + Column index + + + + Clones the ButtonX Column + + + + + + Occurs right before a IpAddressInput Cell is painted + + + + + Occurs when Clear button is clicked and allows you + to cancel the default action performed by the button + + + + + Occurs when ButtonCustom control is clicked + + + + + Occurs when ButtonCustom2 control is clicked + + + + + Occurs when Drop-Down button that shows calendar + is clicked and allows you to cancel showing of the popup + + + + + Gets the underlying IpAddressInput control + + + + + Gets or sets whether empty null/nothing state of the control + is allowed. Default value is true which means that Text property + may return null if there is no input value. + + + + + Gets or sets whether free-text entry is automatically + turned off when control loses input focus. Default value is false. + + + + + Gets or sets whether auto-overwrite functionality for input + is enabled. When in auto-overwrite mode input field will erase existing entry + and start new one if typing is continued after InputComplete method is called. + + + + + Gets or sets whether free text entries are attempted to be + auto-resolved to IP address as host/domain names. Default value is true. + + + + + Gets or sets the Background color. + + + + + Specifies the background style of the control. + + + + + Gets the object that describes the settings for the button + that clears the content of the control when clicked. + + + + + Gets the object that describes the settings for the custom button + that can execute an custom action of your choosing when clicked. + + + + + Gets the object that describes the settings for the custom button that can execute an custom action of your choosing when clicked. + + + + + Gets the object that describes the settings for the button + that shows drop-down when clicked. + + + + + Gets or sets whether the control + will be displayed for the current cell only. + + + + + Gets or sets the reference of the control that will be + displayed on popup that is shown when the drop-down button is clicked. + + + + + Returns the collection of DropDownItems. + + + + + Gets or sets whether the control can respond to user interaction + + + + + Gets or sets the color used as background color to highlight + the text box when it has input focus and FocusHighlight is enabled. + + + + + Gets or sets whether FocusHighlightColor is used as + background color to highlight the text box when it has + input focus. Default value is false. + + + + + Gets or sets the foreground color. + + + + + Gets or sets whether control input is in + free-text input mode. Default value is false. + + + + + Gets or sets the Input Method Editor (IME) mode of the control. + + + + + Gets or sets whether input part of the control is read-only. When + set to true the input part of the control becomes read-only and does + not allow the typing. However, drop-down part if visible still allows + user to possibly change the value of the control through the method you + can provide on drop-down. Use this property to allow change of the value + through drop-down button only. + + + + + Gets or sets whether check box shown using ShowCheckBox + property which locks/unlocks the control update is checked. + + + + + Gets or sets a value indicating whether control's + elements are aligned to support locales using right-to-left fonts. + + + + + List of characters that when pressed would select next input field. For example if you are + allowing time input you could set this property to : so when user presses the : character, + the input is forwarded to the next input field. + + + + + Gets or sets a value indicating whether a check box is displayed to + the left of the input value. Set to true if a check box is displayed + to the left of the input value; otherwise, false. The default is false. + + + + + Gets or sets the text as it is currently displayed to the user. + + + + + Gets or sets the watermark text color. + + + + + Gets or sets whether watermark text is + displayed when control is empty. Default value is true. + + + + + Gets or sets the watermark font. + + + + + Gets or sets the watermark (tip) text displayed inside of + the control when Text is not set and control does not have + input focus. This property supports text-markup. + + + + + Gets the Cell paint setting for the control + + + + + Control for input of the integer value. + + + + + Initializes a new instance of the IpAddressInput class. + + + + + Copies the current value in the control to the Clipboard. + + + + + Pastes the current Clipboard content if possible as the value into the control. + + + + + Moves the current control value to the Clipboard. + + + + + Shows drop-down popup. Note that popup will be shown only if there is a DropDownControl assigned or DropDownItems collection has at least one item. + + + + + Closes the drop-down popup if it is open. + + + + + Raises the ButtonClearClick event. + + + + + + Raises the ButtonDropDownClick event. + + + + + + Raises the LockUpdateChanged event. + + Provides event data./ + + + + Raises ValueChanged event. + + Provides event arguments. + + + + + + + + + + Called when Command property value changes. + + + + + Occurs when Clear button is clicked and allows you to cancel the default action performed by the button. + + + + + Occurs when Drop-Down button that shows calendar is clicked and allows you to cancel showing of the popup. + + + + + Occurs when ShowCheckBox property is set to true and user changes the lock status of the control by clicking the check-box. + + + + + Occurs when Value property has changed. + + + + + Gets the object that describes the settings for the button that shows drop-down when clicked. + + + + + Gets the object that describes the settings for the button that clears the content of the control when clicked. + + + + + Gets the object that describes the settings for the button that switches the control into the free-text entry mode when clicked. + + + + + Gets or sets whether auto-overwrite functionality for input is enabled. When in auto-overwrite mode input field will erase existing entry + and start new one if typing is continued after InputComplete method is called. + + + + + Gets or sets whether empty null/nothing state of the control is allowed. Default value is true which means that Text property + may return null if there is no input value. + + + + + Gets or sets the reference of the control that will be displayed on popup that is shown when drop-down button is clicked. + + + + + Gets the collection of BaseItem derived items displayed on popup menu. + + + + + Gets or sets whether input part of the control is read-only. When set to true the input part of the control becomes + read-only and does not allow the typing. However, drop-down part if visible still allows user to possibly change the value of the control + through the method you can provide on drop-down. + Use this property to allow change of the value through drop-down button only. + + + + + Gets or sets a value indicating whether a check box is displayed to the left of the input value. + Set to true if a check box is displayed to the left of the input value; otherwise, false. The default is false. + + When the ShowCheckBox property is set to true, a check box is displayed to the left of the input in the control. When the check box is selected, the value can be updated. When the check box is cleared, the value is unable to be changed. + You can handle the LockUpdateChanged event to be notified when this check box is checked and unchecked. Use LockUpdateChecked property + to get or sets whether check box is checked. + + + + + + Gets or sets whether check box shown using ShowCheckBox property which locks/unlocks the control update is checked. + + + + + List of characters that when pressed would select next input field. For example if you are + allowing time input you could set this property to : so when user presses the : character, + the input is forwarded to the next input field. + + + + + Gets or sets the IP Address value represented by the control. + + + + + Occurs if Free-Text entry value is not natively recognized by the control and provides you with opportunity to convert that value to the + value control expects. + + + + + Occurs when Free-Text button is clicked and allows you to cancel its default action. + + + + + Gets or sets whether free text entries are attempted to be auto-resolved to IP address as host/domain names. Default value is true. + + + + + Gets or sets whether free-text entry is automatically turned off when control loses input focus. Default value is false. + + + + + Gets or sets whether control input is in free-text input mode. Default value is false. + + + + + Gets or sets the command assigned to the item. Default value is null. + Note that if this property is set to null Enabled property will be set to false automatically to disable the item. + + + + + Gets or sets user defined data value that can be passed to the command when it is executed. + + + + + Handles OnTextChanged events + + + + + + ApplyCellStyleToEditingControl + + + + + + Gets EditingControlFormattedValue + + + + + + + Gets whether the given key wants to be processed + by the Control + + + + + + + + PrepareEditingControlForEdit + + + + + + Gets or sets the Edit state + + + + + Gets or sets the DataGridView + + + + + Gets or sets the Control Formatted Value + + + + + Gets or sets the Control RoeIndex + + + + + Gets or sets the Control ValueChanged state + + + + + Gets the Panel Cursor + + + + + Gets whether to RepositionEditingControlOnValueChange + + + + + GetAdjustedEditingControlBounds + + + + + + + + + GetPreferredSize + + + + + + + + + + Cell painting + + + + + + + + + + + + + + + + Paints the Label background + + + + + + + + Paints the Label background and content + + + + + + + + + + + OnMouseEnter + + + + + + Processes MouseLeave events + + + + + + Processes MouseMove events + + + + + + Processes MouseDown events + + + + + + Processes MouseUp events + + + + + + CellAlignPoint + + + + + + + Determines if the given part is set + + + + + + + + Gets the background bounds for the given cell + + + + + + + + GetValue + + + + + + + GetHorizontalAlignment + + + + + + + Initiates the refresh of the cell label + + + + + + + Gets the Type of the editing control associated with the cell + + + + + FormattedValueType + + + + + Constructor + + + + + Gets whether property should be serialized. + + + + + Resets the SingleLineColor property to its default value. + + + + + Hooks or unhooks our system events + + + + + + LabelItem_Click + + + + + + + Gets the cell paint bitmap + + + + + + + Invokes BeforeCellPaint user events + + Row index + Column index + + + + Clones the LabelX Column + + + + + + Dispose + + + + + + Button FlatStyle + + + + + Button UseColumnTextForButtonValue + + + + + InCallBack + + + + + Gets the Control LabelX + + + + + Gets or sets whether text-markup support is enabled for items Text property. Default value is true. + Set this property to false to display HTML or other markup in the item instead of it being parsed as text-markup. + + + + + Gets or sets whether control displays focus cues when focused. + + + + + Gets or sets the border sides that are displayed. + Default value specifies border on all 4 sides. + + + + + Gets or sets the type of the border drawn around the label. + + + + + Specifies label image. + + + + + Gets/Sets the image position inside the label. + + + + + Gets or sets the bottom padding in pixels. + + + + + Gets or sets the left padding in pixels. + + + + + Gets or sets the top padding in pixels. + + + + + Gets or sets the right padding in pixels. + + + + + Gets or sets the border line color when border is single line. + + + + + Gets or sets the text associated with this item. + + + + + Gets or sets the horizontal text alignment. + + + + + Gets or sets the vertical text alignment. + + + + + + Gets or sets a value that determines whether text is displayed in multiple lines or one long line. + + + + + Gets the Cell paint setting for the ButtonX control + + + + + InitializeEditingControl + + + + + + + + DetachEditingControl + + + + + ButtonClearClick + + + + + + + ButtonCustomClick + + + + + + + ButtonCustom2Click + + + + + + + ButtonDropDownClick + + + + + + + KeyDown routine forwards all DataGridView sent keys to + the underlying focusable control + + + + + + + PositionEditingControl + + + + + + + + + + + + + + GetAdjustedEditingControlBounds + + + + + + + + GetPreferredSize + + + + + + + + + + Cell painting + + + + + + + + + + + + + + + + Paints the cell background + + + + + + + + Paints the cell content + + + + + + + + + + + + DrawControl + + + + + + + + + + + DrawText + + + + + + + + + MustRenderVisibleControl + + + + + + Gets the background bounds for the given cell + + + + + + + + Gets the button bounds for the given cell + + + + + + + GetValue + + + + + + + GetTextAlignment + + + + + + + Determines if the given part is set + + + + + + + + Gets the Type of the editing control associated with the cell + + + + + Constructor + + + + + Resets style to default value. Used by windows forms designer. + + + + + Indicates whether property should be serialized by Windows Forms designer. + + + + + Resets the property to default value. + + + + + DoButtonClearClick + + + + + + + DoButtonCustomClick + + + + + + + DoButtonCustom2Click + + + + + + + DoButtonDropDownClick + + + + + + + Gets the cell paint bitmap + + + + + + + Invokes BeforeCellPaint user events + + Row index + Column index + + + + Clones the ButtonX Column + + + + + + Dispose + + + + + + Occurs right before a MaskedTextBoxAdv Cell is painted + + + + + Occurs when Clear button is clicked and allows you + to cancel the default action performed by the button + + + + + Occurs when ButtonCustom control is clicked + + + + + Occurs when ButtonCustom2 control is clicked + + + + + Occurs when Drop-Down button is clicked and allows you to cancel showing of the popup + + + + + Gets the underlying MaskedTextBoxAdv control + + + + + Gets or sets a value indicating whether PromptChar can be entered as valid data. + + + + + Gets or sets a value indicating whether characters outside of the ASCII character set will be accepted. + + + + + Gets or sets the Background color. + + + + + Specifies the background style of the control. + + + + + Gets or sets a value indicating whether the masked text box + control raises the system beep for each user key stroke that it rejects. + + + + + Gets the object that describes the settings for the button + that clears the content of the control when clicked. + + + + + Gets the object that describes the settings for the custom button + that can execute an custom action of your choosing when clicked. + + + + + Gets the object that describes the settings for the custom button that can execute an custom action of your choosing when clicked. + + + + + Gets the object that describes the settings for the button + that shows drop-down when clicked. + + + + + Gets or sets the culture information associated with the masked text box. + + + + + Gets or sets a value that determines whether + literals and prompt characters are copied to the clipboard + + + + + Gets or sets whether the control + will be displayed for the current cell only. + + + + + Gets or sets the reference of the control that will be + displayed on popup that is shown when the drop-down button is clicked. + + + + + Gets or sets whether the control can respond to user interaction + + + + + Gets or sets the color used as background color to highlight + the text box when it has input focus and FocusHighlight is enabled. + + + + + Gets or sets whether FocusHighlightColor is used as + background color to highlight the text box when it has + input focus. Default value is false. + + + + + Gets or sets the foreground color. + + + + + Gets or sets a value indicating whether the prompt characters + in the input mask are hidden when the masked text box loses focus. + + + + + Gets or sets the Input Method Editor (IME) mode of the control. + + + + + Gets or sets the text insertion mode of the masked text box control. + + + + + Gets or sets the input mask to use at run time. + + + + + Gets or sets the character to be displayed in substitute for user input. + + + + + Gets or sets the character used to represent the absence of user input. + + + + + Gets or sets a value indicating whether the parsing of + user input should stop after the first invalid character is reached. + + + + + Gets or sets a value that determines how an input + character that matches the prompt character should be handled. + + + + + Gets or sets a value that determines how + a space input character should be handled. + + + + + Gets or sets a value indicating whether control's + elements are aligned to support locales using right-to-left fonts. + + + + + Gets or sets a value indicating + whether the user is allowed to reenter literal values. + + + + + Gets or sets the text as it is currently displayed to the user. + + + + + Gets or sets how text is aligned in a masked text box control. + + + + + Gets or sets a value that determines whether literals + and prompt characters are included in the formatted string. + + + + + Gets or sets a value indicating whether + the operating system-supplied password character should be used. + + + + + Gets or sets the data type used to verify the data input by the user. + + + + + Gets or sets the watermark hiding behaviour. Default value + indicates that watermark is hidden when control receives input focus. + + + + + Gets or sets the watermark text color. + + + + + Gets or sets whether watermark text is + displayed when control is empty. Default value is true. + + + + + Gets or sets the watermark font. + + + + + Gets or sets the watermark (tip) text displayed inside of + the control when Text is not set and control does not have + input focus. This property supports text-markup. + + + + + Gets the Cell paint setting for the control + + + + + Initializes a new instance of the MaskedTextBoxAdv class. + + + + + Initializes a new instance of the MaskedTextBoxAdv class using the specified input mask. + + A custom mask language provider, derived from the MaskedTextProvider class. + + + + Initializes a new instance of the MaskedTextBoxAdv class using the specified input mask. + + Initializes a new instance of the MaskedTextBox class using the specified input mask. + + + + Raises TypeValidationCompleted event. + + + + + Raises the TextAlignChanged event. + + + + + Raises MaskInputRejected event. + + + + + + Raises the MaskChanged event. + + + + + Raises IsOverwriteModeChanged event. + + + + + Resets style to default value. Used by windows forms designer. + + + + + Shows drop-down popup. Note that popup will be shown only if there is a DropDownControl assigned or DropDownItems collection has at least one item. + + + + + Closes the drop-down popup if it is open. + + + + + Raises the ButtonClearClick event. + + + + + + Raises the ButtonDropDownClick event. + + + + + + Indicates whether property should be serialized by Windows Forms designer. + + + + + Resets the property to default value. + + + + + Gets whether property should be serialized by Windows Forms designer. + + + + + Converts the user input string to an instance of the validating type. + + If successful, an Object of the type specified by the ValidatingType property; otherwise, null to indicate conversion failure. + + + + Returns a string that represents the current masked text box. This method overrides ToString. + + A String that contains information about the current MaskedTextBox. The string includes the type, a simplified view of the input string, and the formatted input string. + + + + Called when Command property value changes. + + + + + Occurs when Clear button is clicked and allows you to cancel the default action performed by the button. + + + + + Occurs when Drop-Down button that shows popup is clicked and allows you to cancel showing of the popup. + + + + + Occurs when ButtonCustom control is clicked. + + + + + Occurs when ButtonCustom2 control is clicked. + + + + + Occurs after the insert mode has changed + + + + + Occurs after the input mask is changed. + + + + + Occurs when the user's input or assigned character does not match the corresponding format element of the input mask. + + + + + Occurs when the text alignment is changed. + + + + + Occurs when MaskedTextBox has finished parsing the current value using the ValidatingType property. + + + + + Specifies back color when Enabled=false + + + + + Gets or sets whether FocusHighlightColor is used as background color to highlight text box when it has input focus. Default value is false. + + + + + Gets or sets the color used as background color to highlight text box when it has input focus and focus highlight is enabled. + + + + + Specifies the background style of the control. + + + + + Gets the object that describes the settings for the button that shows drop-down when clicked. + + + + + Gets the object that describes the settings for the button that clears the content of the control when clicked. + + + + + Gets the object that describes the settings for the custom button that can execute an custom action of your choosing when clicked. + + + + + Gets the object that describes the settings for the custom button that can execute an custom action of your choosing when clicked. + + + + + Gets or sets the reference of the control that will be displayed on popup that is shown when drop-down button is clicked. + + + + + Gets the collection of BaseItem derived items displayed on popup menu. + + + + + Gets the reference to internal MaskedTextBox control. + + + + + Gets or sets whether watermark text is displayed when control is empty. Default value is true. + + + + + Gets or sets the watermark (tip) text displayed inside of the control when Text is not set and control does not have input focus. This property supports text-markup. + + + + + Gets or sets the watermark font. + + + + + Gets or sets the watermark text color. + + + + + Gets or sets the watermark hiding behaviour. Default value indicates that watermark is hidden when control receives input focus. + + + + + Gets or sets a value indicating whether PromptChar can be entered as valid data by the user. Default value is true. + + + + + Gets or sets a value indicating whether the MaskedTextBox control accepts characters outside of the ASCII character set. + true if only ASCII is accepted; false if the MaskedTextBox control can accept any arbitrary Unicode character. The default is false. + + + + + Gets or sets a value indicating whether the masked text box control raises the system beep for each user key stroke that it rejects. + + + + + Gets or sets the culture information associated with the masked text box. + + + + + Gets or sets a value that determines whether literals and prompt characters are copied to the clipboard. + + + + + Gets or sets the IFormatProvider to use when performing type validation. + + + + + Gets or sets a value indicating whether the prompt characters in the input mask are hidden when the masked text box loses focus. + + + + + Gets or sets the text insertion mode of the masked text box control. + + + + + Gets or sets the input mask to use at run time. The default value is the empty string which allows any input + + + + + Gets a value indicating whether all required inputs have been entered into the input mask. Returns true if all required input has been entered into the mask; otherwise, false. + + + + + Gets a clone of the mask provider associated with this instance of the masked text box control. Returns masking language provider of type MaskedTextProvider. + + + + + Gets a value indicating whether all required and optional inputs have been entered into the input mask. Returns true if all required and optional inputs have been entered; otherwise, false. + + + + + Gets or sets the character to be displayed in substitute for user input. + + + + + Gets or sets the character used to represent the absence of user input in MaskedTextBox. Returns character used to prompt the user for input. The default is an underscore (_). + + + + + Gets or sets whether text in control is read only. Default value is false. + + + + + Gets or sets a value indicating whether the parsing of user input should stop after the first invalid character is reached. Returns true if processing of the input string should be terminated at the first parsing error; otherwise, false if processing should ignore all errors. The default is false. + + + + + Gets or sets a value that determines how an input character that matches the prompt character should be handled. Returns true if the prompt character entered as input causes the current editable position in the mask to be reset; otherwise, false to indicate that the prompt character is to be processed as a normal input character. The default is true. + + + + + Gets or sets a value that determines how a space input character should be handled. Returns true if the space input character causes the current editable position in the mask to be reset; otherwise, false to indicate that it is to be processed as a normal input character. The default is true. + + + + + Gets or sets a value indicating the currently selected text in the control. + + + + + Gets or sets the number of characters selected in the text box. + + + + + Gets or sets the starting point of text selected in the text box. + + + + + Gets or sets a value indicating whether the defined shortcuts are enabled. + + + + + Gets or sets the text as it is currently displayed to the user. + + + + + Gets or sets how text is aligned in a masked text box control. + + + + + Gets the length of the displayed text. + + + + + Gets or sets a value that determines whether literals and prompt characters are included in the formatted string. + + + + + Gets or sets a value indicating whether the operating system-supplied password character should be used. + + + + + Gets or sets the data type used to verify the data input by the user. Returns Type representing the data type used in validation. The default is null. + + + + + Gets the preferred height for a masked text box. + + + + + Gets or sets the command assigned to the item. Default value is null. + Note that if this property is set to null Enabled property will be set to false automatically to disable the item. + + + + + Gets or sets user defined data value that can be passed to the command when it is executed. + + + + + Handles OnTextChanged events + + + + + + ApplyCellStyleToEditingControl + + + + + + Gets EditingControlFormattedValue + + + + + + + Gets whether the given key wants to be processed + by the Control + + + + + + + + PrepareEditingControlForEdit + + + + + + Gets or sets the DataGridView + + + + + Gets or sets the Control Formatted Value + + + + + Gets or sets the Control RoeIndex + + + + + Gets or sets the Control ValueChanged state + + + + + Gets the Panel Cursor + + + + + Gets whether to RepositionEditingControlOnValueChange + + + + + Cell painting + + + + + + + + + + + + + + + + Paints the Button background + + + + + + + + Paints the button background and content + + + + + + + + + + + OnMouseEnter + + + + + + Processes MouseLeave events + + + + + + Processes MouseMove events + + + + + + Processes MouseDown events + + + + + + Processes MouseUp events + + + + + + Determines if the given part is set + + + + + + + + Gets the background bounds for the given cell + + + + + + + + Gets the content bounds for the given cell + + + + + + + + GetValue + + + + + + + + Gets the Type of the editing control associated with the cell + + + + + FormattedValueType + + + + + Constructor + + + + + Gets whether ChunkColor property should be serialized. + + + + + Resets the ChunkColor property to its default value. + + + + + Gets whether ChunkColor property should be serialized. + + + + + Resets the ChunkColor property to its default value. + + + + + Hooks or unhooks our system events + + + + + + ProgressBarItem_Click + + + + + + + Gets the cell paint bitmap + + + + + + + Invokes BeforeCellPaint user events + + Row index + Column index + + + + Clones the ButtonX Column + + + + + + Dispose + + + + + + Button FlatStyle + + + + + Button UseColumnTextForButtonValue + + + + + InCallBack + + + + + Gets the Control ProgressBarX + + + + + Gets or sets the color of the progress chunk. + + + + + Gets or sets the target gradient color of the progress chunk. + + + + + Gets or sets the gradient angle of the progress chunk. + + + + + Gets or sets the predefined color state table for progress bar. Color + specified applies to items with Office 2007 style only. It does not have + any effect on other styles. You can use ColorTable to indicate the state + of the operation that Progress Bar is tracking. Default value is eProgressBarItemColor.Normal. + + + + + Gets or sets the maximum value of the range of the control. + + + + + Gets or sets the minimum value of the range of the control. + + + + + Gets/Sets the visual style for the control. + + + + + Gets or sets the default Text to display on the Progress Bar + + + + + Gets or sets whether the text inside the progress bar is displayed. + + + + + Gets or sets the current position of the progress bar. + + + + + Gets the Cell paint setting for the ButtonX control + + + + + GetAdjustedEditingControlBounds + + + + + + + + GetPreferredSize + + + + + + + + + + Cell painting + + + + + + + + + + + + + + + + Paints the Slider background + + + + + + + + Paints the Slider content + + + + + + + + + + + OnMouseEnter + + + + + + Process MouseEnter state + + + + + + + Processes MouseLeave events + + + + + + Processes MouseMove events + + + + + + Processes MouseDown events + + + + + + Processes MouseUp events + + + + + + CellAlignPoint + + + + + + + + GetSliderValue + + + + + + + Determines if the given part is set + + + + + + + + Gets the background bounds for the given cell + + + + + + + + Gets the content bounds for the given cell + + + + + + + Initiates the refresh of the cell slider + + + + + + + Gets the Type of the editing control associated with the cell + + + + + Gets the type of the underlying data + (i.e., the type of the cell's Value property) + + + + + Constructor + + + + + Returns whether property should be serialized. Used by Windows Forms designer. + + + + + Resets the property to default value. Used by Windows Forms designer. + + + + + Hooks or unhooks our system events + + + + + + SliderItem_Click + + + + + + + SliderItem_ValueChanged + + + + + + + Gets the cell paint bitmap + + + + + + + Invokes BeforeCellPaint user events + + Row index + Column index + + + + Clones the ButtonX Column + + + + + + Dispose + + + + + + Occurs right before a Slider Cell is painted + + + + + Gets or sets the active row index + + + + + Gets or sets the DataBindingComplete state + + + + + Gets the Control Slider + + + + + Gets or sets whether the control can respond to user interaction + + + + + Gets or sets whether text-markup support is enabled for items Text property. Default value is true. + Set this property to false to display HTML or other markup in the item instead of it being parsed as text-markup. + + + + + Gets or sets the text label position in relationship to the slider. Default value is Left. + + + + + Gets or sets whether the text label next to the slider is displayed. + + + + + Gets or sets the width of the label part of the item in pixels. Value must be greater than 0. Default value is 38. + + + + + Gets or sets the maximum value of the range of the control. + + + + + Gets or sets the minimum value of the range of the control. + + + + + Gets or sets the amount by which a call to the PerformStep method increases the current position of the slider. Value must be greater than 0. + + + + + Gets or sets the text associated with this item. + + + + + Gets or sets the color of the label text. + + + + + Gets or sets whether vertical line track marker is displayed on the slide line. Default value is true. + + + + + Gets or sets the current position of the slider. + + + + + Gets the Cell paint setting for the ButtonX control + + + + + InitializeEditingControl + + + + + + + + DetachEditingControl + + + + + ButtonClearClick + + + + + + + ButtonCustomClick + + + + + + + ButtonCustom2Click + + + + + + + ButtonDropDownClick + + + + + + + KeyDown routine forwards all DataGridView sent keys to + the underlying focusable control + + + + + + + PositionEditingControl + + + + + + + + + + + + + + GetAdjustedEditingControlBounds + + + + + + + + Cell painting + + + + + + + + + + + + + + + + Paints the cell background + + + + + + + + Paints the cell content + + + + + + + + + + + + DrawControl + + + + + + + + + + DrawText + + + + + + + + + Gets the background bounds for the given cell + + + + + + + + Gets the button bounds for the given cell + + + + + + + GetValue + + + + + + + GetTextAlignment + + + + + + + Determines if the given part is set + + + + + + + + Gets the Type of the editing control associated with the cell + + + + + Constructor + + + + + Resets style to default value. Used by windows forms designer. + + + + + Indicates whether property should be serialized by Windows Forms designer. + + + + + Resets the property to default value. + + + + + Appends text to the current text of a text box. + + The text to append to the current contents of the text box. + + + + Clears all text from the text box control. + + + + + Clears information about the most recent operation from the undo buffer of the text box. + + + + + Copies the current selection in the text box to the Clipboard. + + + + + Moves the current selection in the text box to the Clipboard. + + + + + Specifies that the value of the SelectionLength + property is zero so that no characters are selected in the control. + + + + + Retrieves the character that is closest to the specified location within the control. + + The location from which to seek the nearest character. + The character at the specified location. + + + + Retrieves the index of the character nearest to the specified location. + + The location to search. + The zero-based character index at the specified location. + + + + Retrieves the index of the first character of a given line. + + The line for which to get the index of its first character. + The zero-based character index in the specified line. + + + + Retrieves the index of the first character of the current line. + + The zero-based character index in the current line. + + + + Retrieves the line number from the specified character position within the text of the control. + + The character index position to search. + The zero-based line number in which the character index is located. + + + + Retrieves the location within the control at the specified character index. + + The index of the character for which to retrieve the location. + The location of the specified character. + + + + Replaces the current selection in the text box with the contents of the Clipboard. + + + + + Selects a range of text in the text box. + + The position of the first character in the current text selection within the text box. + The number of characters to select. + + + + Selects all text in the text box. + + + + + Undoes the last edit operation in the text box. + + + + + Replaces the specified selection in the TextBox with the contents of the Clipboard. + + The text to replace. + + + + DoButtonClearClick + + + + + + + DoButtonCustomClick + + + + + + + DoButtonCustom2Click + + + + + + + DoButtonDropDownClick + + + + + + + Gets the cell paint bitmap + + + + + + + Invokes BeforeCellPaint user events + + Row index + Column index + + + + Clones the ButtonX Column + + + + + + Dispose + + + + + + Occurs right before a TextBoxDropDown Cell is painted + + + + + Occurs when Clear button is clicked and allows you + to cancel the default action performed by the button + + + + + Occurs when ButtonCustom control is clicked + + + + + Occurs when ButtonCustom2 control is clicked + + + + + Occurs when Drop-Down button is clicked and allows you to cancel showing of the popup + + + + + Gets the underlying TextBoxDropDown control + + + + + Gets or sets a custom StringCollection to use when + the AutoCompleteSource property is set to CustomSource. + A StringCollection to use with AutoCompleteSource. + + + + + Gets or sets an option that controls + how automatic completion works for the TextBox. + One of the values of AutoCompleteMode. The values are Append, + None, Suggest, and SuggestAppend. The default is None. + + + + + Gets or sets a value specifying the source of complete strings used for automatic completion. + One of the values of AutoCompleteSource. The options are AllSystemSources, AllUrl, FileSystem, HistoryList, RecentlyUsedList, CustomSource, and None. The default is None. + + + + + Gets or sets the Background color. + + + + + Specifies the background style of the control. + + + + + Gets the object that describes the settings for the button + that clears the content of the control when clicked. + + + + + Gets the object that describes the settings for the custom button + that can execute an custom action of your choosing when clicked. + + + + + Gets the object that describes the settings for the custom button that can execute an custom action of your choosing when clicked. + + + + + Gets the object that describes the settings for the button + that shows drop-down when clicked. + + + + + Gets or sets whether the TextBox control + modifies the case of characters as they are typed. + One of the CharacterCasing enumeration values that specifies + whether the TextBox control modifies the case of characters. + The default is CharacterCasing.Normal. + + + + + Gets or sets whether the control + will be displayed for the current cell only. + + + + + Gets or sets the reference of the control that will be + displayed on popup that is shown when the drop-down button is clicked. + + + + + Gets or sets whether the control can respond to user interaction + + + + + Gets or sets the color used as background color to highlight + the text box when it has input focus and FocusHighlight is enabled. + + + + + Gets or sets whether FocusHighlightColor is used as + background color to highlight the text box when it has + input focus. Default value is false. + + + + + Gets or sets the foreground color. + + + + + Gets or sets a value indicating whether the selected text in + the text box control remains highlighted when the control loses focus. + true if the selected text does not appear highlighted when the + text box control loses focus; false, if the selected text remains + highlighted when the text box control loses focus. The default is true. + + + + + Gets or sets the Input Method Editor (IME) mode of the control. + + + + + Gets or sets the maximum number of characters the user can type or paste into the text box control. + The number of characters that can be entered into the control. The default is 32767. + + + + + Gets or sets the character to be displayed in substitute for user input. + + + + + Gets or sets a value indicating whether control's + elements are aligned to support locales using right-to-left fonts. + + + + + Gets or sets a value indicating the currently selected text in the control. + A string that represents the currently selected text in the text box. + + + + + Gets or sets the number of characters selected in the text box. + The number of characters selected in the text box. + + + + + Gets or sets the starting point of text selected in the text box. + The starting position of text selected in the text box. + + + + + Gets or sets the text as it is currently displayed to the user. + + + + + Gets or sets how text is aligned in a masked text box control. + + + + + Gets the length of text in the control. + Returns number of characters contained in the text of the control. + + + + + Gets or sets a value indicating whether + the operating system-supplied password character should be used. + + + + + Gets or sets the watermark hiding behaviour. Default value + indicates that watermark is hidden when control receives input focus. + + + + + Gets or sets the watermark text color. + + + + + Gets or sets whether watermark text is + displayed when control is empty. Default value is true. + + + + + Gets or sets the watermark font. + + + + + Gets or sets the watermark (tip) text displayed inside of + the control when Text is not set and control does not have + input focus. This property supports text-markup. + + + + + Gets the Cell paint setting for the control + + + + + Represents single line text box control with the drop down button to display custom control on popup and additional custom buttons. + + + + + Raises BeforeMultiColumnPopupOpen event. + + Provides event arguments. + + + + Initializes a new instance of the TextBoxDropDown class. + + + + + Raises the TextAlignChanged event. + + + + + Resets style to default value. Used by windows forms designer. + + + + + Shows drop-down popup. Note that popup will be shown only if there is a DropDownControl assigned or DropDownItems collection has at least one item. + + + + + Closes the drop-down popup if it is open. + + + + + Raises the ButtonClearClick event. + + + + + + Raises the ButtonDropDownClick event. + + + + + + Called when DropDownControl property has changed. + + + + + Indicates whether property should be serialized by Windows Forms designer. + + + + + Resets the property to default value. + + + + + Called when Command property value changes. + + + + + Returns a string that represents the current text in text box. This method overrides ToString. + + A String that contains information about the current TextBox. The string includes the type, a simplified view of the input string, and the formatted input string. + + + + Appends text to the current text of a text box. + + The text to append to the current contents of the text box. + + + + Clears all text from the text box control. + + + + + Clears information about the most recent operation from the undo buffer of the text box. + + + + + Copies the current selection in the text box to the Clipboard. + + + + + Moves the current selection in the text box to the Clipboard. + + + + + Specifies that the value of the SelectionLength property is zero so that no characters are selected in the control. + + + + + Retrieves the character that is closest to the specified location within the control. + + The location from which to seek the nearest character. + The character at the specified location. + + + + Retrieves the index of the character nearest to the specified location. + + The location to search. + The zero-based character index at the specified location. + + + + Retrieves the index of the first character of a given line. + + The line for which to get the index of its first character. + The zero-based character index in the specified line. + + + + Retrieves the index of the first character of the current line. + + The zero-based character index in the current line. + + + + Retrieves the line number from the specified character position within the text of the control. + + The character index position to search. + The zero-based line number in which the character index is located. + + + + Retrieves the location within the control at the specified character index. + + The index of the character for which to retrieve the location. + The location of the specified character. + + + + Replaces the current selection in the text box with the contents of the Clipboard. + + + + + Selects a range of text in the text box. + + The position of the first character in the current text selection within the text box. + The number of characters to select. + + + + Selects all text in the text box. + + + + + Undoes the last edit operation in the text box. + + + + + Replaces the specified selection in the TextBox with the contents of the Clipboard. + + The text to replace. + + + + Occurs when Clear button is clicked and allows you to cancel the default action performed by the button. + + + + + Occurs when Drop-Down button that shows popup is clicked and allows you to cancel showing of the popup. + + + + + Occurs when ButtonCustom control is clicked. + + + + + Occurs when ButtonCustom2 control is clicked. + + + + + Occurs when the text alignment is changed. + + + + + Occurs when the value of the Modified property has changed. + + + + + Occurs before the popup is opened and it allows canceling of popup by setting CancelEventArgs.Cancel=true. + + + + + Indicates whether all text is auto-selected when control gets input focus. Default value is false. + + + + + Gets or sets whether FocusHighlightColor is used as background color to highlight text box when it has input focus. Default value is false. + + + + + Gets or sets the color used as background color to highlight text box when it has input focus and focus highlight is enabled. + + + + + Specifies the background style of the control. + + + + + Gets the object that describes the settings for the button that shows drop-down when clicked. + + + + + Gets the object that describes the settings for the button that clears the content of the control when clicked. + + + + + Gets the object that describes the settings for the custom button that can execute an custom action of your choosing when clicked. + + + + + Gets the object that describes the settings for the custom button that can execute an custom action of your choosing when clicked. + + + + + Gets or sets a value indicating whether the drop-down is open. + + + + + Indicates whether DropDownControl is automatically focused when popup is open. + + + + + Gets or sets the reference of the control that will be displayed on popup that is shown when drop-down button is clicked. + + + + + Gets the collection of BaseItem derived items displayed on popup menu. + + + + + Gets the reference to internal TextBox control. Use it to get access to the text box events and properties. + + + + + Gets or sets whether watermark text is displayed when control is empty. Default value is true. + + + + + Gets or sets the watermark (tip) text displayed inside of the control when Text is not set and control does not have input focus. This property supports text-markup. + + + + + Gets or sets the watermark font. + + + + + Gets or sets the watermark text color. + + + + + Gets or sets the watermark hiding behaviour. Default value indicates that watermark is hidden when control receives input focus. + + + + + Gets or sets the watermark image displayed inside of the control when Text is not set and control does not have input focus. + + + + + Gets or sets the watermark image alignment. + + + + + Gets or sets the command assigned to the item. Default value is null. + Note that if this property is set to null Enabled property will be set to false automatically to disable the item. + + + + + Gets or sets user defined data value that can be passed to the command when it is executed. + + + + + Gets or sets the text as it is currently displayed to the user. + + + + + Gets the preferred height for a text box. + + + + + Gets or sets a custom StringCollection to use when the AutoCompleteSource property is set to CustomSource. + A StringCollection to use with AutoCompleteSource. + + + + + Gets or sets an option that controls how automatic completion works for the TextBox. + One of the values of AutoCompleteMode. The values are Append, None, Suggest, and SuggestAppend. The default is None. + + + + + Gets or sets a value specifying the source of complete strings used for automatic completion. + One of the values of AutoCompleteSource. The options are AllSystemSources, AllUrl, FileSystem, HistoryList, RecentlyUsedList, CustomSource, and None. The default is None. + + + + + Gets or sets whether the TextBox control modifies the case of characters as they are typed. + One of the CharacterCasing enumeration values that specifies whether the TextBox control modifies the case of characters. The default is CharacterCasing.Normal. + + + + + Gets or sets the character used to mask characters of a password in a single-line TextBox control. + The character used to mask characters entered in a single-line TextBox control. Set the value of this property to 0 (character value) if you do not want the control to mask characters as they are typed. Equals 0 (character value) by default. + + + + + Gets or sets how text is aligned in a TextBox control. + One of the HorizontalAlignment enumeration values that specifies how text is aligned in the control. The default is HorizontalAlignment.Left. + + + + + Gets or sets a value indicating whether the text in the TextBox control should appear as the default password character. + true if the text in the TextBox control should appear as the default password character; otherwise, false. + + + + + Gets or sets a value indicating whether the selected text in the text box control remains highlighted when the control loses focus. + true if the selected text does not appear highlighted when the text box control loses focus; false, if the selected text remains highlighted when the text box control loses focus. The default is true. + + + + + Gets or sets the maximum number of characters the user can type or paste into the text box control. + The number of characters that can be entered into the control. The default is 32767. + + + + + Gets or sets a value that indicates that the text box control has been modified by the user since the control was created or its contents were last set. + true if the control's contents have been modified; otherwise, false. The default is false. + + + + + Gets or sets a value indicating whether text in the text box is read-only. + true if the text box is read-only; otherwise, false. The default is false. + + + + + Gets or sets a value indicating the currently selected text in the control. + A string that represents the currently selected text in the text box. + + + + + Gets or sets the number of characters selected in the text box. + The number of characters selected in the text box. + + + + + Gets or sets the starting point of text selected in the text box. + The starting position of text selected in the text box. + + + + + Gets the length of text in the control.Returns number of characters contained in the text of the control. + + + + + Handles OnTextChanged events + + + + + + ApplyCellStyleToEditingControl + + + + + + Gets EditingControlFormattedValue + + + + + + + Gets whether the given key wants to be processed + by the Control + + + + + + + + PrepareEditingControlForEdit + + + + + + Gets or sets the DataGridView + + + + + Gets or sets the Control Formatted Value + + + + + Gets or sets the Control RoeIndex + + + + + Gets or sets the Control ValueChanged state + + + + + Gets the Panel Cursor + + + + + Gets whether to RepositionEditingControlOnValueChange + + + + + Displays the desktop alerts with optional image or symbol. Text on alerts supports text-markup. + + + + + Shows desktop alert. + + Text to show on the alert. Text supports text-markup. + + + + Shows desktop alert. + + Text to show on the alert. Text supports text-markup. + Specifies reference control which is used to find target screen alert is displayed on. + + + + Shows desktop alert. + + Text to show on the alert. Text supports text-markup. + Text-markup link click event handler. + + + + Shows desktop alert. + + Text to show on the alert. Text supports text-markup. + Specifies alert color. + + + + Shows desktop alert. + + Text to show on the alert. Text supports text-markup. + Specifies alert color. + Specifies reference control which is used to find target screen alert is displayed on. + + + + Shows desktop alert at specific screen position. + + Text to show on the alert. Text supports text-markup. + Alert position on the screen. + + + + Shows desktop alert at specific screen position. + + Text to show on the alert. Text supports text-markup. + Alert position on the screen. + Specifies reference control which is used to find target screen alert is displayed on. + + + + Shows desktop alert at specific screen position. + + Text to show on the alert. Text supports text-markup. + Image to display on alert. + + + + Shows desktop alert. + + Text to show on the alert. Text supports text-markup. + Alert color. + Alert position on the screen. + + + + Shows desktop alert. + + Text to show on the alert. Text supports text-markup. + Alert color + Alert position on the screen + Text-markup link click event handler. + Specifies reference control which is used to find target screen alert is displayed on. + + + + Shows desktop alert. + + Text to show on the alert. Text supports text-markup. + Alert color + Alert position on the screen + Text-markup link click event handler. + + + + Shows desktop alert. + + Text to show on the alert. Text supports text-markup. + Alert ID used to recognize alert if clicked and specified Action is called + Action method to call if alert is clicked. + + + + Shows desktop alert. + + Text to show on the alert. Text supports text-markup. + Alert color + Alert ID used to recognize alert if clicked and specified Action is called + Action method to call if alert is clicked. + + + + Shows desktop alert. + + Text to show on the alert. Text supports text-markup. + Symbol to show on the alert, see http://www.devcomponents.com/kb2/?p=1347 + Symbol set to use + Symbol color or Color.Empty to use default text color + Alert color + Alert position on the screen + Duration of alert in the seconds. + Alert ID used to recognize alert if clicked and specified Action is called + Action method to call if alert is clicked. + + + + Shows desktop alert. + + Text to show on the alert. Text supports text-markup. + Symbol to show on the alert, see http://www.devcomponents.com/kb2/?p=1347 + Symbol set to use + Symbol color or Color.Empty to use default text color + Alert position on the screen + Alert color + Duration of alert in the seconds. + Alert ID used to recognize alert if clicked and specified Action is called + Action method to call if alert is clicked. + Text-markup link click event handler. + + + + Shows desktop alert. + + Text to show on the alert. Text supports text-markup. + Symbol to show on the alert, see http://www.devcomponents.com/kb2/?p=1347 + Symbol set to use + Symbol color or Color.Empty to use default text color + Alert position on the screen + Alert color + Duration of alert in the seconds. + Alert ID used to recognize alert if clicked and specified Action is called + Action method to call if alert is clicked. + Text-markup link click event handler. + Specifies reference control which is used to find target screen alert is displayed on. + + + + Shows desktop alert. + + Text to show on the alert. Text supports text-markup. + Image to display on the alert + Alert screen position + Alert color + Duration of alert in seconds + Alert ID used to recognize alert if clicked and specified Action is called + Action method to call if alert is clicked. + + + + Shows desktop alert. + + Text to show on the alert. Text supports text-markup. + Image to display on the alert + Alert screen position + Alert color + Duration of alert in seconds + Alert ID used to recognize alert if clicked and specified Action is called + Action method to call if alert is clicked. + Text-markup link click event handler. + + + + Shows desktop alert. + + Text to show on the alert. Text supports text-markup. + Image to display on the alert + Alert screen position + Alert color + Duration of alert in seconds + Alert ID used to recognize alert if clicked and specified Action is called + Action method to call if alert is clicked. + Text-markup link click event handler. + Specifies reference control which is used to find target screen alert is displayed on. + + + + Raises BeforeAlertDisplayed event. + + Provides event arguments. + + + + Raises RemovingToken event. + + Provides event arguments. + + + + Indicates maximum alert size. + + + + + Specifies default alert screen position. + + + + + Specifies default alert color. + + + + + Gets or sets the total time in milliseconds alert animation takes. + Default value is 200. + + + + + Gets or sets time period in seconds after alert closes automatically. + + + + + Gets or sets whether text-markup can be used in alert text, default value is true. + + + + + Indicates whether alert plays exclamation sound when shown. + + + + + Occurs before alert is displayed and allows access to the alert Window through sender. + + + + + Occurs after alert as been closed. + + + + + Defines delegate for AlertClosed event. + + Sender. + Event arguments + + + + Defines event arguments for AlertClosed event. + + + + + Specifies alert closure source. + + + + + Defines predefined desktop alert colors. + + + + + Sets alert size based on its content, it respects MinimumSize and MaximumSize property settings. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when Symbol property has changed. + + Old property value + New property value + + + + Called when SymbolSet property value changes. + + Indciates old value + Indicates new value + + + + Called when SymbolSize property has changed. + + Old property value + New property value + + + + Called when TextMarkupEnabled property has changed. + + Old property value + New property value + + + + Occurs when text markup link is clicked. + + + + + Raises MarkupLinkClick event. + + Provides event arguments. + + + + Display balloon. + + Indicates whether alert receives input focus upon showing. + + + + Displays balloon. + + + + + Called when alert needs to be hidden. + + + + + Hides balloon. + + + + + Gets or sets the color of the Symbol. + + + + + Gets the realized symbol string. + + + + + Indicates the symbol displayed on face of the button instead of the image. Setting the symbol overrides the image setting. + + + + + Gets or sets the symbol set used to represent the Symbol. + + + + + Indicates the size of the symbol in points. + + + + + Indicates image displayed on alert. + + + + + Indicates optional Alert Id. + + + + + Indicates the method that will be invoked if user clicks the alert. + + + + + Gets or sets whether text-markup can be used in Text property. + + + + + Occurs when text markup link is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + Gets reference to parsed markup body element if text was markup otherwise returns null. + + + + + Gets or sets the default alert size. + + + + + Gets or sets the total time in milliseconds alert animation takes. + Default value is 200. + + + + + Gets or sets whether balloon will close automatically when user click the close button. + + + + + Gets or sets time period in seconds after alert closes automatically. + + + + + Specifies the reference control which is used to find which screen the alert is displayed on. If not specified alert is displayed on primary screen. + + + + + Indicates spacing between alerts on the screen + + + + + Indicates the request screen position for the alert + + + + + Indicates spacing in pixels between image and text + + + + + Indicates whether alert plays exclamation sound when shown. + + + + + Indicates whether close button on alert is visible + + + + + Defines the alert positions. + + + + + Top-left screen position. + + + + + Top-right screen position. + + + + + Bottom-right screen position. + + + + + Bottom left screen position. + + + + + Defines closure sources for the alert. + + + + + Alert is closed becouse of timeout + + + + + Alert is closed becouse user clicked close button. + + + + + Alert is closed becouse user clicked on the alert. + + + + + Component to display flyout popup. + + + + + Required designer variable. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Called when Content property has changed. + + Old property value + New property value + + + + Called when PointerSide property has changed. + + Old property value + New property value + + + + Called when TargetControl property has changed. + + Old property value + New property value + + + + Called when DeepControlIntegration property has changed. + + Old property value + New property value + + + + Called when DisplayMode property has changed. + + Old property value + New property value + + + + Called when CloseMode property has changed. + + Old property value + New property value + + + + Raises PrepareContent event. + + Provides event arguments. + + + + Shows flyout with the Content. + + + + + Returns the flyout size based on Content size. + + Proposed flyout size. + + + + Shows flyout at specified location and with specified size. Size can be empty (0,0) and flyout will be automatically sized based on the content. + + + + + + Raises FlyoutShowing event. + + Provides event arguments. + + + + Raises FlyoutShown event. + + Provides event arguments. + + + + Raises QueryShowFlyout event. + + Provides event arguments. + + + + Shows flyout at specified location and with specified size. Size can be empty (0,0) and flyout will be automatically sized based on the content. + + Screen bounds to display flyout at. + Side of the flyout which will have pointer triangle + Pointer position either x or y depending on which side pointer is displayed on. + Target item for the flyout. + + + + Raises FlyoutClosing event. + + Provides event arguments. + + + + Raises FlyoutClosed event. + + Provides event arguments. + + + + Closes the flyout form if it was open. + + + + + Called when ActivateOnShow property has changed. + + Old property value + New property value + + + + Called when TopMost property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when DropShadow property has changed. + + Old property value + New property value + + + + Called when Parent property has changed. + + Old property value + New property value + + + + Indicates a control, usually panel with other controls inside of it, that is displayed on the flyout popup. + + + + + Indicates the side of the flyout triangle pointer is displayed on. + + + + + Indicates the target control for the flyout display and positioning. + + + + + Indicates whether Flyout integrates on item level with DotNetBar controls it recognizes like SuperTabControl, AdvTree etc. + + + + + Specifies when the flyout is displayed. + + + + + Indicates when Flyout is automatically closed. + + + + + Occurs before the flyout is shown for specific target and allows you to prepare Content for it. Sender of event will be the targeted control or item. + + + + + Occurs after flyout has been shown. + + + + + Provides opportunity to cancel showing of the flyout before any objects are created and allocated. This is preferred event to cancel flyout showing. + + + + + Occurs before flyout is closed and allows you to cancel the closing. + + + + + Occurs after flyout is closed. + + + + + Indicates whether flyout is active/focused when its shown, default value is false. + + + + + Indicates whether flyout is made top-most window when shown + + + + + Gets or sets the background flyout color. Default value is Color.Empty which indicates that current color scheme will be used. + + + + + Gets or sets the flyout border color. Default value of Color.Empty indicates that color scheme will be used. + + + + + Indicates whether flyout displays drop shadow. + + + + + Gets or sets the parent control for the Flyout. Parent is used to find the parent form so flyout can be closed when form is de-activated. + + + + + Defines delegate for the FlyoutShowing event. + + + + + + + Gets the reference to the flyout form. + + + + + Gets the reference to the flyout target usually TargetControl. + + + + + Allows you to cancel showing of the flyout by setting this value to true. + + + + + Initializes a new instance of the FlyoutShowingEventArgs class. + + + + + + + Defines the modes for Flyout display. + + + + + Flyout is displayed manually using flyout.Show() method. + + + + + Flyout is displayed when mouse is over TargetControl. + + + + + Flyout is displayed when mouse is hovering over TargetControl. + + + + + Flyout is displayed when left mouse button is clicked on TargetControl. + + + + + Defines Flyout closing condition. + + + + + Flyout is closed manually using flyout.Close() method. + + + + + Flyout is closed when user clicks outside of flyout bounds. + + + + + Flyout is closed when TargetControl is hidden. + + + + + Flyout is closed when TargetControl loses focus. + + + + + Flyout is closed when parent forms deactivates. + + + + + Defines colors for the Flyout control. + + + + + Specifies Flyout background color. + + + + + Specifies Flyout border color. + + + + + Called when PointerOffset property has changed. + + Old property value + New property value + + + + Called when PointerSide property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Required designer variable. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Indicates whether flyout displays a drop shadow. + + + + + Gets or sets whether form is made active/focused when shown. + + + + + Gets or sets the pointer offset from the top-left corner + + + + + Gets or sets the side pointer triangle is displayed on. + + + + + Gets or sets the flyout border color. Default value of Color.Empty indicates that color scheme will be used. + + + + + Defines the side of triangle pointer displayed on flyout popup. + + + + + Represents graphical panel control with support for different visual styles and gradients. + + + + + Default constructor. + + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Applies any region related settings from style to control. + + + + + Applies color scheme colors to the style objects. + + + + + Creates the Graphics object for the control. + + The Graphics object for the control. + + + + Returns the current style of the control. + + Instance of ElementStyle object. + + + + Returns the current mouse down style of the control. + + Instance of ElementStyle object. + + + + Returns the current mouse over style of the control. + + Instance of ElementStyle object. + + + + Paints panel using Windows themes. + + Paint event arguments + + + + Prepares paint surface for paint operation. Called as first thing in Paint event. + + + + + + Paints panel given current style. + + Paint event arguments + + + + Paints insides of the control. + + Paint event arguments. + + + + Indicates whether CanvasColor should be serialized. Used by windows forms designer design-time support. + + + + + Resets CanvasColor to it's default value. Used by windows forms designer design-time support. + + + + + Resets the style to it's default value. + + + + + Resets the internal mouse tracking properties that track whether mouse is over the panel and whether is mouse pressed while over the panel. + + + + + Resets the style to it's default value. + + + + + Resets the style to it's default value. + + + + + Called after either ColorScheme or ColorSchemeStyle has changed. If you override make sure that you call base implementation so default + processing can occur. + + + + + Applies predefined Panel color scheme to the control. + + + + + Applies predefined Panel color scheme to the control. + + + + + Applies predefined Button color scheme to the control. + + + + + Applies predefined Label color scheme to the control. + + + + + Applies predefined lable style to the ElementStyle object. + + Reference to ElementStyle object. + + + + Notifies a control that it is the default button so that its appearance and behavior is adjusted accordingly. + + true if the control should behave as a default button; otherwise false. + + + + Generates a Click event for the control. + + + + + Occurs when text markup link is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + Gets or sets Bar Color Scheme. + + + + + Gets or sets whether focus rectangle is displayed when control has focus. + + + + + Gets or sets the canvas color for the panel. Canvas color will be visible on areas of the control that do not get covered + by the style and it will also be used as a base color for style to be painted on. + + + + + Gets or sets the panel style. + + + + + Gets or sets the panel style when mouse hovers over the panel. + + + + + Gets or sets the panel style when mouse button is pressed on the panel. + + + + + Gets or sets whether anti-alias smoothing is used while painting. + + + + + Gets or sets color scheme style. + + + + + Gets or sets whether text rectangle painted on panel is considering docked controls inside the panel. + + + + + Gets or sets the text rectangle. This property is set by internal implementation and it should not be set by outside code. + + + + + Gets or sets whether painting of the control is suspended. + + + + + Gets or sets the value returned to the parent form when the button is clicked. + + + + + Specifies whether item is drawn using Themes when running on OS that supports themes like Windows XP. + + + + + Calls base WndProc implementation + + Describes Windows Message + + + + Gets the ItemPaintArgs which provide information for rendering. + + Reference to Canvas + Returns the new ItemPaintArgs instance + + + + Paints the background of the control + + PaintEventArgs arguments + + + + Converts the client point into the screen point. + + Client point + Client point converted into screen coordinates. + + + + Adjusts the client rectangle for the control. + + Reference to new client rectangle. + + + + Adjusts the border rectangle before the non-client border is rendered. + + Border rectangle + + + + Occurs after non-client area is rendered and provides opportunity to render on top of it. + + Reference to Graphics object. + + + + Gets the reference to the BorderStyle used by the control if any. + + + + + Returns the Windows handle associated with the control. + + + + + Returns width of the control. + + + + + Returns the height of the control. + + + + + Returns whether handled for the control has been created. + + + + + Returns background color of the control. + + + + + Returns background color of the control when Enabled=false. + + + + + Returns whether control is enabled. + + + + + Invalidates non-client area of the control. + + + + + Paints insides of the control. + + Paint event arguments. + + + + Returns the size of the panel calculated based on the text assigned. + + Calculated size of the panel or Size.Empty if panel size cannot be calculated. + + + + Applies color scheme to the panel. + + + + + Applies default group panel style to the control. + + + + + Returns the renderer control will be rendered with. + + The current renderer. + + + + Gets or sets the panel color scheme. + + + + + Gets or sets the image that appears in title with text. + + + + + Gets or sets the position of the title image. Default value is left. + + + + + Gets or sets the scrollbar skining type when control is using Office 2007 style. + + + + + Specifies whether item is drawn using Themes when running on OS that supports themes like Windows XP. + + + + + Gets or sets whether box around the title of the group is drawn. Default value is true. + + + + + Gets or sets whether text rectangle painted on panel is considering docked controls inside the panel. + + + + + Gets or sets whether panel automatically provides shadows for child controls. Default value is false. + + + + + Specifies back color when Enabled=false + + + + + Defines predefined color schemes for panel control. + + + + + Returns the color scheme used by control. Color scheme for Office2007 style will be retrived from the current renderer instead of + local color scheme referenced by ColorScheme property. + + An instance of ColorScheme object. + + + + Returns the renderer control will be rendered with. + + The current renderer. + + + + Gets or sets the redering mode used by control. Default value is eRenderMode.Global which means that static GlobalManager.Renderer is used. If set to Custom then Renderer property must + also be set to the custom renderer that will be used. + + + + + Gets or sets the custom renderer used by the items on this control. RenderMode property must also be set to eRenderMode.Custom in order renderer + specified here to be used. + + + + + Gets or sets whether custom styling (Office 2007 style) is enabled. Default value is true. + + + + + Recalculates the size of the internal item. + + + + + Gets whether property should be serialized. + + + + + Resets the SingleLineColor property to its default value. + + + + + Invokes the MarkupLinkClick event. + + Provides additional data about event. + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when Command property value changes. + + + + + Occurs when text markup link is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + Specifies spacing between label image and text. + + + + + Gets or sets whether text-markup support is enabled for controls Text property. Default value is true. + Set this property to false to display HTML or other markup in the control instead of it being parsed as text-markup. + + + + + Gets or sets whether control displays focus cues when focused. + + + + + Gets or sets the border sides that are displayed. Default value specifies border on all 4 sides. + + + + + Gets or sets the type of the border drawn around the label. + + + + + Specifies label image. + + + + + Gets/Sets the image position inside the label. + + + + + Gets or sets the border line color when border is single line. + + + + + Gets or sets the text associated with this item. + + + + + Gets or sets the horizontal text alignment. + + + + + Gets or sets the text vertical alignment. + + + + + Gets or sets a value that determines whether text is displayed in multiple lines or one long line. + + + + + Gets or sets the left padding in pixels. + + + + + Gets or sets the right padding in pixels. + + + + + Gets or sets the top padding in pixels. + + + + + Gets or sets the bottom padding in pixels. + + + + + + Gets or sets a value indicating whether the control is automatically resized to display its entire contents. You can set MaximumSize.Width property to set the maximum width used by the control. + + + + + Gets or sets text-orientation. Default is horizontal. + + + + + Gets or sets how vertical text is rotated when TextOrientation = Vertical. + + + + + Gets the underlying LabelItem + + + + + Indicates the symbol displayed on label instead of the image. Setting the symbol overrides the image setting. + + + + + Gets or sets the symbol set used to represent the Symbol. + + + + + Indicates the size of the symbol in points. + + + + + Gets or sets the color of the symbol. + + + + + Indicates whether label text is rendered using bold font unless the Font property is specifically set to different font. + + + + + Gets or sets the command assigned to the item. Default value is null. + Note that if this property is set to null Enabled property will be set to false automatically to disable the item. + + + + + Gets or sets user defined data value that can be passed to the command when it is executed. + + + + + A single horizontal or vertical line control. + + + + + Initializes a new instance of the Line class. + + + + + Called when StartLineCap property has changed. + + Old property value + New property value + + + + Called when StartLineCapSize property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when EndLineCap property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Specifies the line alignment within control bounds. + + + + + Specifies distance from the start of a line to the beginning of a dash pattern. + + + + + Specifies the line dash style. + + + + + Gets or sets the line thickness in pixels. + + + + + Gets or sets whether vertical line is drawn. Default value is false which means horizontal line is drawn. + + + + + Gets or sets a value indicating whether the control is automatically resized to display its entire contents. You can set MaximumSize.Width property to set the maximum width used by the control. + + + + + Indicates the start of the line cap. + + + + + Indicates the size of the start cap. + + + + + Indicates the start of the line cap. + + + + + Indicates end line cap size. + + + + + Defined line end types. + + + + + Provides data for CheckStateConvert event. + + + + + Initializes a new instance of the CheckStateConvertEventArgs class. + + + + + + Represents generic base control for items container control. + + + + + Represents base control for bars. + + + + + Provides interface for controls that support ribbon customization. + + + + + Called when item contained by the container is right-clicked. + + Instance of the item that was right-clicked. + + + + Creates new accessibility instance. + + Reference to AccessibleObject. + + + + Notifies the accessibility client applications of the specified AccessibleEvents for the specified child control. + + The AccessibleEvents object to notify the accessibility client applications of. + The child Control to notify of the accessible event. + + + + Returns the collection of items with the specified name. + + Item name to look for. + + + + + Returns the collection of items with the specified name and type. + + Item name to look for. + Item type to look for. + + + + + Returns the collection of items with the specified name and type. + + Item name to look for. + Item type to look for. + Indicates whether GlobalName property is used for searching. + + + + + Returns the first item that matches specified name. + + Item name to look for. + + + + + Invokes the DotNetBar Customize dialog. + + + + + Raises BeforeItemDrag event. + + Provides event arguments. + + + + + Called when DragInProgress property value has changed. + + + + + Releases the focus from the bar and selects the control that had focus before bar was selected. If control that had focus could not be determined focus will stay on the bar. + This method is used by internal DotNetBar implementation and you should not use it. + + + + + Invokes ItemDoubleClick event. + + Reference to item double-clicked + Event arguments + + + + Invokes the ItemClick event. + + Reference to the item that was clicked. + + + + Returns the item at specified coordinates or null if no item can be found. + + X - coordinate to test. + Y - coordinate to test. + + + + + Returns the item at specified coordinates or null if no item can be found. + + X - coordinate to test. + Y - coordinate to test. + + + + + Sets the height of the control to the automatically calcualted height based on content. + + + + + Returns automatically calculated height of the control given current content. + + Height in pixels. + + + + Returns automatically calculated width of the control given current content. + + Width in pixels. + + + + Clean up any resources being used. + + + + + Resets style to default value. Used by windows forms designer. + + + + + Applies design-time defaults to control. + + + + + Creates the Graphics object for the control. + + The Graphics object for the control. + + + + Returns the color scheme used by control. Color scheme for Office2007 style will be retrived from the current renderer instead of + local color scheme referenced by ColorScheme property. + + An instance of ColorScheme object. + + + + Returns the renderer control will be rendered with. + + The current renderer. + + + + Indicates to control that all further update operations should not result in layout and refresh of control content. + Use this method to optimize the addition of new items to the control. This method supports nested calls meaning + that multiple calls are allowed but they must be ended with appropriate number of EndUpdate calls. + IsUpdateSuspended property returns whether update is suspended. + + + + + Indicates that update operation is complete and that control should perform layout and refresh to show changes. See BeginUpdate + for more details. + + + + + Indicates that update operation is complete and that control should perform layout and refresh to show changes. See BeginUpdate + for more details. + + + + + Raises ItemLayoutUpdated event. + + Provides event arguments. + + + + Invalidates the control layout and forces the control to recalculates the layout for the items it contains on next layout operation invoked using RecalcLayout method. + + + Call to this method is usually followed by the call to + RecalcLayout method to perform the control layout. + + + + + Applies any layout changes and repaint the control. + + + + + Sets up timer that watches when active window changes. + + + + + Called after change of active window has been detected. SetupActiveWindowTimer must be called to enable detection. + + + + + Releases and disposes the active window watcher timer. + + + + + Called when item on popup container is right-clicked. + + Instance of the item that is right-clicked. + + + + Called when item on popup container is right-clicked. + + Instance of the item that is right-clicked. + + + + Occurs when Checked property of an button has changed. + + + + + Occurs when Item is clicked. + + + + + Occurs when Item is clicked. + + + + + Occurs when popup of type container is loading. + + + + + Occurs when popup of type container is unloading. + + + + + Occurs when popup item is about to open. + + + + + Occurs when popup item is closing. + + + + + Occurs just before popup window is shown. + + + + + Occurs when Item Expanded property has changed. + + + + + Occurs when mouse button is pressed. + + + + + Occurs when mouse button is released. + + + + + Occurs when mouse enters the item. + + + + + Occurs when mouse leaves the item. + + + + + Occurs when mouse moves over the item. + + + + + Occurs when mouse remains still inside an item for an amount of time. + + + + + Occurs when item loses input focus. + + + + + Occurs when item receives input focus. + + + + + Occurs when user changes the item position, removes the item, adds new item or creates new bar. + + + + + Occurs after an Item is removed from SubItemsCollection. + + + + + Occurs after an Item has been added to the SubItemsCollection. + + + + + Occurs when ControlContainerControl is created and contained control is needed. + + + + + Occurs when Text property of an Item has changed. + + + + + Use this event if you want to serialize the hosted control state directly into the DotNetBar definition file. + + + + + Use this event if you want to deserialize the hosted control state directly from the DotNetBar definition file. + + + + + Occurs after DotNetBar definition is loaded. + + + + + Occurs when DotNetBar is looking for translated text for one of the internal text that are + displayed on menus, toolbars and customize forms. You need to set Handled=true if you want + your custom text to be used instead of the built-in system value. + + + + + Occurs before an item in option group is checked and provides opportunity to cancel that. + + + + + Occurs before tooltip for an item is shown. Sender could be the BaseItem or derived class for which tooltip is being displayed or it could be a ToolTip object itself it tooltip is not displayed for any item in particular. + + + + + Gets or sets the form SideBar is attached to. + + + + + Gets or sets whether accelerator letters on buttons are underlined. Default value is false which indicates that system setting is used + to determine whether accelerator letters are underlined. Setting this property to true + will always display accelerator letter underlined. + + + + + Indicates whether Reset buttons is shown that allows end-user to reset the toolbar state. + + + + + Occurs before an item drag & drop operation is started and allows cancellation. + + + + + + + Gets item that is being dragged. + + + + + ImageList for images used on Items. Images specified here will always be used on menu-items and are by default used on all Bars. + + + + + ImageList for medium-sized images used on Items. + + + + + ImageList for large-sized images used on Items. + + + + + Indicates whether Tooltips are shown on Bars and menus. + + + + + Indicates whether item shortcut is displayed in Tooltips. + + + + + Gets or sets whether hooks are used for internal DotNetBar system functionality. Using hooks is recommended only if DotNetBar is used in hybrid environments like Visual Studio designers or IE. + + + + + Gets whether control is in menu mode. + + + + + Returns the reference to the control that last had input focus. This property should be used to + determine which control had input focus before bar gained the focus. Use it to apply + the menu command to active control. + + + + + Returns whether control has any popups registered. + + + + + Gets or sets whether internal WM_GESTURENOTIFY handler is enabled. Default value is false. + + + + + Gets the collection of allowed containers for the drag & drop operations. Empty collection indicates that all targets are allowed. + + + + + Gets or sets whether ProcessDialogKey method calls base ContainerControl implementation. + By default base implementation is called but under certain conditions you might want to set + this property to true to receive KeyDown events for Arrow keys. + + + + + Gets or sets whether shortuct processing for the items hosted by this control is enabled. Default value is true. + + + + + Gets or sets the item default accessibility action will be performed on. + + + + + Gets or sets whether control height is set automatically based on the content. Default value is false. + + + + + Specifies the background style of the control. + + + + + Indicates whether shortucts handled by items are dispatched to the next handler or control. + + + + + Gets or sets Bar Color Scheme. + + + + + Gets or sets whether anti-alias smoothing is used while painting. Default value is true. + + + + + Gets or sets whether gray-scale algorithm is used to create automatic gray-scale images. Default is true. + + + + + Specifies whether SideBar is drawn using Themes when running on OS that supports themes like Windows XP. + + + + + Gets or sets whether Key Tips (accelerator keys) for items are displayed on top of them. + + + + + Gets or sets the font that is used to display Key Tips (accelerator keys) when they are displayed. Default value is null which means + that control Font is used for Key Tips display. + + + + + Gets or sets the redering mode used by control. Default value is eRenderMode.Global which means that static GlobalManager.Renderer is used. If set to Custom then Renderer property must + also be set to the custom renderer that will be used. + + + + + Gets or sets the custom renderer used by the items on this control. RenderMode property must also be set to eRenderMode.Custom in order renderer + specified here to be used. + + + + + Gets or sets whether mouse over fade effect is enabled. Default value is true. + + + + + Gets whether control layout is suspended becouse of the call to BeginUpdate method. + + + + + Occurs after internal item layout has been updated and items have valid bounds assigned. + + + + + Gets/Sets the Image size for all sub-items on the Bar. + + + + + Gets or sets whether external ButtonItem object is accepted in drag and drop operation. UseNativeDragDrop must be set to true in order for this property to be effective. + + + + + Gets or sets whether native .NET Drag and Drop is used by control to perform drag and drop operations. AllowDrop must be set to true to allow drop of the items on control. + + + + + Gets or sets whether control supports drag & drop. Default value is false. + + + + + Represents the method that will handle the ItemRemoved event. + + + + + Defines notification interface for scrollable item controls. + + + + + Indicates that item has been selected via keyboard. + + Reference to item being selected + + + + Gets or sets whether selection is allowed. + + + + + Gets or sets the selected item index. + + + + + Gets or sets the BindingContext. + + + + + Invalidates non-client area of the control. This method should be used + when you need to invalidate non-client area of the control. + + + + + Scrolls the control so that item is displayed within the visible bounds of the control. AutoScroll must be set to true for this method to work. + + Item to ensure visibility for. Item must belong to this control. + + + + Indicates that item has been selected via keyboard. + + Reference to item being selected + + + + Called when an item should be selected as result of the keyboard action. + + Item that is being selected. + + + + Raises the DataSourceChanged event. + + An EventArgs that contains the event data. + + + + When overridden in a derived class, resynchronizes the item data with the contents of the data source. + + + + + Raises the DataNodeCreated event. + + Provides event arguments. + + + + Raises the SelectedIndexChanged event. + + Event arguments. + + + + Called when TouchEnabled property has changed. + + Old property value + New property value + + + + Indicates whether container responds to keyboard presses and changes the active/mouse over item. + + + + + Gets or sets the scroll-bar visual style. + + + + + Gets/Sets the visual style for items and color scheme. + + + + + Gets or sets spacing in pixels between items. Default value is 1. + + + + + Indicates whether control can be scrolled when client area is dragged using mouse. Default value is true. + + + + + Gets the reference to internal vertical scroll-bar control if one is created or null if no scrollbar is visible. + + + + + Gets the reference to internal horizontal scroll-bar control if one is created or null if no scrollbar is visible. + + + + + Gets or sets a value indicating whether the control enables the user to scroll to items placed outside of its visible boundaries. + + + + + Gets or sets the minimum size of the auto-scroll. Returns a Size that represents the minimum height and width of the scrolling area in pixels. + This property is managed internally by control and should not be modified. + + + + + Gets or sets the location of the auto-scroll position. + + + + + Gets or sets whether all painting in control is suspended. + + + + + Gets or sets the index specifying the currently selected item. + + + + + Returns collection of items on a bar for binding support. + + + + + Gets or sets the item template that is repeated for each data-row when using data binding. + + + + + Gets the collection of the binding applied to ItemTemplate visual when using data-binding. + + + + + Gets or sets whether external ButtonItem object is accepted in drag and drop operation. UseNativeDragDrop must be set to true in order for this property to be effective. + + + + + Gets or sets whether native .NET Drag and Drop is used by control to perform drag and drop operations. AllowDrop must be set to true to allow drop of the items on control. + + + + + Gets or sets whether automatic drag & drop support is enabled. Default value is false. + + + + + Gets or sets the data source for the ComboTree. Expected is an object that implements the IList or IListSource interfaces, + such as a DataSet or an Array. The default is null. + + + + + Occurs when the DataSource changes. + + + + + Occurs when a item for an data-bound object item has been created and provides you with opportunity to modify the created item. + + + + + Occurs when value of SelectedIndex property has changed. + + + + + Indicates whether touch support for scrolling is enabled. + + + + + Initializes a new instance of the ListBoxAdv class. + + + + + Called when CheckBoxesVisible property has changed. + + Old property value + New property value + + + + Called when ItemHeight property has changed. + + Old property value + New property value + + + + Called when SelectionMode property has changed. + + Old property value + New property value + + + + Selects or clears the selection for the specified item in a ListBoxAdv. Use this property to set the selection of items in a multiple-selection ListBoxAdv. To select an item in a single-selection ListBox, use the SelectedIndex property. + + The zero-based index of the item in a ListBox to select or clear the selection for. You can pass -1 to clear the selection. + true to select the specified item; otherwise, false. + + + + Selects or clears the selection for the specified item in a ListBoxAdv. Use this property to set the selection of items in a multiple-selection ListBoxAdv. To select an item in a single-selection ListBox, use the SelectedIndex property. + + The zero-based index of the item in a ListBox to select or clear the selection for. You can pass -1 to clear the selection. + true to select the specified item; otherwise, false. + Indicates the source of the change. + + + + Selects next visible list box item. + + + + + Selects previous visible list box item. + + + + + Gets ListBoxItem which represents an object value from Items collection when Items collection contains non ListBoxItem objects. + + Value to get ListBoxItem for. + + + + + Called when DisplayMember property has changed. + + Old property value + New property value + + + + Called when CheckStateMember property has changed. + + Old property value + New property value + + + + Raises CheckStateConvert event. + + Provides event arguments. + + + + Called when ValueMember property has changed. + + Old property value + New property value + + + + Clears internal property descriptors cache when data-binding is used. In most cases it is not needed that you call this method. Do so only if instructed by DevComponents support. + + + + + Finds the first item in the ListBox that starts with the specified string. The search starts at a specific starting index. + + The text to search for. + The zero-based index of the first item found; returns ListBox.NoMatches if no match is found. + + + + Finds the first item in the ListBox that starts with the specified string. The search starts at a specific starting index. + + The text to search for. + The zero-based index of the item before the first item to be searched. Set to negative one (-1) to search from the beginning of the control. + The zero-based index of the first item found; returns ListBox.NoMatches if no match is found. + + + + Finds the first item in the ListBox that exactly matches the specified string. The search starts at a specific starting index. + + The text to search for. + The zero-based index of the first item found; returns ListBox.NoMatches if no match is found. + + + + Finds the first item in the ListBox that exactly matches the specified string. The search starts at a specific starting index. + + The text to search for. + The zero-based index of the item before the first item to be searched. Set to negative one (-1) to search from the beginning of the control. + The zero-based index of the first item found; returns ListBox.NoMatches if no match is found. + + + + Raises ItemCheck event. + + Provides event arguments. + + + + Sets the check state of the item at the specified index. + + The index of the item to set the state for. + One of the CheckState values. + + + + Gets the list of items displayed in list box. + + + + + Gets the collection of view items which are created to represent each data item in Items collection. + + + + + Indicates whether check-boxes are visible inside list box items. + + + + + Indicates fixed item height. Maybe set to 0 to indicate that each item should be sized based on its content. + + + + + Specifies the selection mode used by the control. + + + + + Gets or sets the zero-based index of the currently selected item in a ListBoxAdv. Negative one (-1) is returned if no item is selected. + + + + + Gets a collection that contains the zero-based indexes of all currently selected items in the ListBoxAdv. Do not modify items in this collection. To select or deselect list items while in multi-selection mode use SetSelected method. + + + + + Gets a collection containing the currently selected items in the ListBoxAdv. Do not modify items in this collection. To select or deselect list items while in multi-selection mode use SetSelected method. + + + + + Gets or sets the selected item. + + + + + Indicates property name which will provide the value to display for this list box when data-binding is used and DataSource is set. + + + + + Indicates property name which will provide the value for CheckState of the list box item when data-binding is used and DataSource is set. + + + + + Occurs when using data-binding with CheckStateMember specified and it allows you to convert a property value to CheckState. + + + + + Returns the enumerator with selected values if any + + + + + Gets or sets the value of the member property specified by the ValueMember property. If ValueMember specifies property that cannot be found on selected object this property returns null. + + + + + Indicates property name which will return the value for the selected item when SelectedValue property is accessed. + + + + + Occurs when CheckState of an ListBoxItem changes and it allows you to cancel the change. + + + + + Gets collection of checked items in the list. Modifying this collection does not have any effect on actual checked items. Use SetItemCheckState to set checked state of an item or access ListBoxItem directly and set its CheckState property. + + + + + + Defines selection modes for list control. + + + + + Items cannot be selected. + + + + + Only one item at the time can be selected. + + + + + Multiple items can be selected. A mouse click or pressing the SPACEBAR selects or deselects an item in the list. + + + + + Multiple items can be selected. Pressing SHIFT and clicking the mouse or pressing SHIFT and one of the arrow keys (UP ARROW, DOWN ARROW, LEFT ARROW, and RIGHT ARROW) extends the selection from the previously selected item to the current item. Pressing CTRL and clicking the mouse selects or deselects an item in the list. + + + + + Indicates that CheckState change of the item should be canceled. + + + + + Specifies the ListBoxItem that was changing. + + + + + When data-bound provides the object which was used to generate an ListBoxItem. + + + + + Initializes a new instance of the ListBoxAdvItemCheckEventArgs class. + + + + + + + Represents the ListBoxAdv item for internal use. Not for public usage. + + + + + Returns copy of the item. + + + + + Copies the ListBoxItem specific properties to new instance of the item. + + New ListBoxItem instance. + + + + Copies the ListBoxItem specific properties to new instance of the item. + + New item instance. + + + + Called when CheckState property has changed. + + Old property value + New property value + + + + Called when IsSelected property has changed. + + Old property value + New property value + + + + Sets selected state of the item including the source of the action that caused the change. + + + + + + + Called when HotTracking property has changed. + + Old property value + New property value + + + + Called when Image property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when Symbol property has changed. + + Old property value + New property value + + + + Called when SymbolSet property value changes. + + Indciates old value + Indicates new value + + + + Called when SymbolSize property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether mouse is over the item. + + + + + Gets the mouse state of the check box part of item if visible. + + + + + Indicates check-box state if visible. + + + + + Gets or sets whether item is selected. + + + + + Indicates whether item changes its background colors when mouse is over the item. + + + + + Specifies image displayed on the item. + + + + + Gets or sets the color of the Symbol. + + + + + Gets the realized symbol string. + + + + + Indicates the symbol displayed on face of the button instead of the image. Setting the symbol overrides the image setting. + + + + + Gets or sets the symbol set used to represent the Symbol. + + + + + Indicates the size of the symbol in points. + + + + + Indicates the array of colors that when set are used to draw the background of the item. + + + + + Gets or sets the color of the text. + + + + + Gets or sets the text associated with this item. + + + + + Gets or sets the text alignment. Default value is left. + + + + + Gets whether item supports text markup. Default is false. + + + + + Gets or sets whether text-markup support is enabled for items Text property. Default value is true. + Set this property to false to display HTML or other markup in the item instead of it being parsed as text-markup. + + + + + Paints ListBoxItem. + + Provides arguments for the operation. + + + + Provides data for the Slider item rendering events. + + + + + Gets or sets the reference to the item being rendered. + + + + + Gets or sets the reference to graphics object. + + + + + Creates new instance of the object and initializes it with default values. + + Reference to the ListBoxItem being rendered. + Reference to the graphics object. + + + + Defines color table for ListBoxItem. + + + + + Specifies default state color table. + + + + + Specifies mouse over state color table. + + + + + Specifies selected state color table. + + + + + Defines single state color table for ListBoxItem. + + + + + Initializes a new instance of the OfficeListBoxItemStateColorTable class. + + + + + Initializes a new instance of the OfficeListBoxItemStateColorTable class. + + + + + + + + + Initializes a new instance of the OfficeListBoxItemStateColorTable class. + + + + + + Indicates item text color. + + + + + Gets or sets the background colors for the item. + + + + + Gets or sets the back colors gradient angle if there is more than one color in BackColors array. + + + + + Gets or sets the gradient colors positions if there is more than one color in BackColors array. + + + + + Paints StepItem. + + Provides arguments for the operation. + + + + Represents the extended ListView control with the Office 2007 Style. + + + + + Called when ColumnHeaderFont property has changed. + + Old property value + New property value + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Resets internal Column Header handler. This method should be called after you change the View property + at run-time. If your control is always in single view there is no need to call this method. This method + will work only when controls handle has already been created. + + + + + Resets the internal color table reference. This method is usually called automatically by + + + + + Gets whether property should be serialized by VS.NET designer. + + + + + Resets property to its default value. + + + + + Returns the renderer control will be rendered with. + + The current renderer. + + + + Returns the color scheme used by control. Color scheme for Office2007 style will be retrived from the current renderer instead of + local color scheme referenced by ColorScheme property. + + An instance of ColorScheme object. + + + + Gets or sets the column header font. Default value is null which means controls Font property is used. + + + + + Gets or sets the item foreground color when control or item is disabled. By default SystemColors.Dark is used. + + + + + Gets or sets whether control displays focus cues when focused. + + + + + Gets or sets the redering mode used by control. Default value is eRenderMode.Global which means that static GlobalManager.Renderer is used. If set to Custom then Renderer property must + also be set to the custom renderer that will be used. + + + + + Gets or sets the custom renderer used by the items on this control. RenderMode property must also be set to eRenderMode.Custom in order renderer + specified here to be used. + + + + + Specifies the control border style. Default value has Class property set so the system style for the control is used. + + + + + Specifies back color when Enabled=false + + + + + Summary description for MessageHandler. + + + + + Calculates the size of non-client area of the control. + + + + + Paints the non-client area of the control. + + + + + Draws the non-client area buffered. + + + + + Represents the PageNavigator control + + + + + Constructor + + + + + Hooks or unhooks our control events + + true to hook, false to unhook + + + + Handles NavigatePreviousPage events + + + + + + + Raises the NavigatePreviousPage event + + + + + Handles NavigateToday events + + + + + + + Raises the NavigateToday event + + + + + Handles NavigateNextPage events + + + + + + + Raises the NavigateNextPage event + + + + + Forces the button to perform internal layout. + + + + + Dispose + + + + + + Occurs when NavigateNextPage button is clicked + + + + + Occurs when NavigateToday button is clicked + + + + + Occurs when NavigatePreviousPage button is clicked + + + + + DefaultSize + + + + + Gets or sets the layout orientation. Default value is horizontal. + + + + + Gets or sets the tooltip for the PreviousPage button of the control + + + + + Gets or sets the tooltip for the Today button + + + + + Gets or sets the tooltip for the NextPage button + + + + + Gets/Sets the visual style for the control. + + + + + PageNavigator buttons + + + + + Previous page + + + + + Today + + + + + Next page + + + + + Represents the PageNavigate item + + + + + Creates new instance of PageNavigateItem + + + + + Creates new instance of PageNavigateItem and assigns the name to it + + Item name + + + + Handles size recalc + + + + + Handles external size changes + + + + + Lays out our control based upon its + vertical / horizontal orientation + + + + + Handles control rendering + + + + + + Draws the PreviousPage button + + Graphics + Office2007ScrollBarColorTable + + + + Gets the PreviousPage bitmap + + + + + + + + Creates the PreviousPage bitmap + + + + + + + + Draws the Today button + + Graphics + Office2007ScrollBarColorTable + + + + Gets the Today Bitmap + + + + + + + + Creates the Today Bitmap + + + + + + + + Draws the NextPage button + + + + + + + Gets the NextPage Bitmap + + + + + + + + Creates the NextPage Bitmap + + + + + + + + Centers the given rect + + + + + + + Processes InternalMouseMove events + + + + + + Returns the HitText area for the given point + + + + + + + Processes Mouse Leave events + + + + + Processes Mouse Down events + + + + + + Processes Mouse Up events + + + + + + Raises the NavigatePreviousPage event + + + + + Raises the NavigateToday event + + + + + Raises the NavigateNextPage event + + + + + Handles timer click events + + + + + + + Enables our click timer + + + + + Disposes of the click timer + + + + + OnTooltipChanged + + + + + Updates the control tooltip + + + + + Returns copy of the item + + + + + Copies the PageNavigatorItem specific properties to + new instance of the item + + New PageNavigatorItem instance + + + + Dispose + + + + + Releases the given bitmap + + Bitmap to release + + + + Occurs when NavigateNextPage button is clicked + + + + + Occurs when NavigateToday button is clicked + + + + + Occurs when NavigatePreviousPage button is clicked + + + + + Gets or sets the MouseOverPart + + + + + Gets or sets the MouseDownPart + + + + + Gets or sets the control orientation. Default value is Horizontal + + + + + Gets or sets whether Click event will be auto repeated + when mouse button is kept pressed over the item + + + + + Gets or sets the auto-repeat interval for the click event + when mouse button is kept pressed over the item + + + + + Gets or sets the tooltip for the PreviousPage button of the control + + + + + Gets or sets the tooltip for the Today button + + + + + Gets or sets the tooltip for the NextPage button + + + + + Defines the PageNavigator item parts + + + + + Indicates no part + + + + + Indicates the PreviousPage button of the control + + + + + Indicates the TodayPage button of the control + + + + + Indicates the NextPage button of the control + + + + + Initializes a new instance of the PageSlider class. + + + + + Raises SelectedPageChanged event. + + Provides event arguments. + + + + Called when IndicatorVisible property has changed. + + Old property value + New property value + + + + Returns array of all pages in control. + + Array of pages. + + + + Removes and disposes all pages within the control. + + + + + Called when SelectedPage property has changed. + + Old property value + New property value + + + + Called when AnimationTime property has changed. + + Old property value + New property value + + + + Called when SelectedPagePadding property has changed. + + Old property value + New property value + + + + Called when PageSpacing property has changed. + + Old property value + New property value + + + + Called when NextPageVisibleMargin property has changed. + + Old property value + New property value + + + + Called when Orientation property has changed. + + Old property value + New property value + + + + Called when ScrollBarVisibility property has changed. + + Old property value + New property value + + + + Called when TouchEnabled property has changed. + + Old property value + New property value + + + + Occurs when selected page has changed. + + + + + Gets or sets whether current page indicator is visible. Default value is true. + + + + + Indicates selected page. + + + + + Indicates the animation time in milliseconds for operations that perform visual animation of transition. Set to zero to disable animation. + + + + + Gets or sets zero based selected page index. If there is no page selected returns -1. + + + + + Gets the total number of pages displayed by the control. + + + + + Gets or sets the single page padding. + + + + + Gets or sets the spacing in pixels between pages. + + + + + Gets or sets the page layout orientation. Default is horizontal. + + + + + Indicates whether page can be dragged using mouse to change currently selected page + + + + + Indicates whether selected page can be changed by using mouse drag on PageSlider client area which is not covered by pages. + + + + + Indicates scrollbar visibility. + + + + + Gets or sets the time in milliseconds that scrollbar is kept visible when there is no activity in control and mouse is over the control. + + + + + Indicates whether native touch support in control is enabled if available on target system. + + + + + Specifies scrollbar visibility. + + + + + Scrollbars are not visible. + + + + + Scrollbars are visible only if mouse is inside of the control. + + + + + Scrollbars are always visible. + + + + + Specifies level of touch enabled on the control. + + + + + Touch is enabled control wide. + + + + + Touch is disabled control wide. + + + + + Touch is enabled but only for the direct control client content. If touch input occurs on any child control it is not processed. + + + + + Called when PageNumber property has changed. + + Old property value + New property value + + + + Gets or sets page number. Page number determines the order in which pages are displayed inside of the PageSlider control. + + + + + Represents control which visually indicates current step in a sequence. + + + + + Initializes a new instance of the StepIndicator class. + + + + + Called when StepCount property has changed. + + Old property value + New property value + + + + Called when CurrentStep property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when Orientation property has changed. + + Old property value + New property value + + + + Gets or sets the total number of steps that control will track. Default value is 10. + + + + + Gets or sets the current step in sequence. Current step should be less or equal than StepCount. + + + + + Gets or sets the background color of the control. + + + + + Gets or sets the color of the current step indicator. + + + + + Indicates the control orientation. + + + + + Processes the resizing messages. + + The message. + true, if the WndProc method from the base class shouldn't be invoked. + + + + Gets whether popup has been resized by end-user. + + + + + Type of resize mode, grips are automatically drawn at bottom-left and bottom-right corners. + + + + + Gets or sets whether Close button is visible in fotter. Resize handle must also be visible in order for close button to render. + + + + + Gets resize grip bounds. + + + + + Initializes a new instance of the ResizeGripColors structure. + + + + + + + + Specifies the popup resize modes + + + + + Raises Closed event. + + Provides event arguments. + + + + Raises Closing event. + + Provides event arguments. + + + + Show control on popup at specified location. + + + + + Shows control on popup at specified location with specified popup resize edges. + + + + + Shows control on popup at specified location and size with specified popup resize edges. + + + + + Hides popup if visible. + + + + + Occurs after popup is closed. + + + + + Occurs before popup is closed and allows canceling. + + + + + Gets whether popup is visible. + + + + + Gets the control displayed on popup. + + + + + Gets or sets the popup padding. + + + + + Gets or sets popup margin. + + + + + Represents the stand-alone progress bar control. + + + + + Advances the current position of the progress bar by the amount of the Step property. + + + + + Advances the current position of the progress bar by the specified amount. + + The amount by which to increment the progress bar's current position. + + + + Gets whether ChunkColor property should be serialized. + + + + + Resets the ChunkColor property to its default value. + + + + + Gets whether ChunkColor property should be serialized. + + + + + Resets the ChunkColor property to its default value. + + + + + Gets or sets the maximum value of the range of the control. + + + + + Gets or sets the minimum value of the range of the control. + + + + + Gets or sets the current position of the progress bar. + + + + + Gets or sets the amount by which a call to the PerformStep method increases the current position of the progress bar. + + + + + Gets or sets the color of the progress chunk. + + + + + Gets or sets the target gradient color of the progress chunk. + + + + + Gets or sets the gradient angle of the progress chunk. + + + + + Gets or sets whether the text inside the progress bar is displayed. + + + + + Gets or sets the type of progress bar used to indicate progress. The Standard style displays the progress based on Minimum, Maximum and current Value. + The Marquee type is automatically moving progress bar that is used to indicate an ongoing operation for which the actual duration cannot be estimated. + + + + + Gets or sets the marquee animation speed in milliseconds. + + + + + Gets or sets the predefined color state table for progress bar. Color specified applies to items with Office 2007 style only. It does not have + any effect on other styles. You can use ColorTable to indicate the state of the operation that Progress Bar is tracking. Default value is eProgressBarItemColor.Normal. + + + + + Gets the underlying ProgressBarItem + + + + + Defines color table for the StepItem. + + + + + Gets or sets the default state StepItem colors. + + + + + Gets or sets the mouse over state StepItem colors. + + + + + Gets or sets the StepItem colors when mouse is pressed over the item. + + + + + Gets or sets the StepItem colors when Value property is greater than Minimum property value, i.e. item is reporting progress. + Note that only Background color is used when progress indicator is drawn. + + + + + Paints StepItem. + + Provides arguments for the operation. + + + + Paints StepItem. + + Provides arguments for the operation. + + + + Represents the color table for StepItem single state. + + + + + Initializes a new instance of the OfficeStepItemStateColorTable class. + + + + + Initializes a new instance of the OfficeStepItemStateColorTable class. + + + + + + + + Initializes a new instance of the OfficeStepItemStateColorTable class. + + + + + + + + + + Gets or sets the background colors for the step item. + + + + + Gets or sets the back colors gradient angle if there is more than one color in BackColors array. + + + + + Gets or sets the gradient colors positions if there is more than one color in BackColors array. + + + + + Gets or sets the text color for the step item. + + + + + Gets or sets the border colors of the step item. + + + + + Represents the progress steps control. + + + + + Initializes a new instance of the ProgressSteps class. + + + + + Returns collection of items on a bar. + + + + + Gets/Sets the visual style for items and color scheme. + + + + + Gets or sets a value indicating whether the control is automatically resized to display its entire contents. You can set MaximumSize.Width property to set the maximum width used by the control. + + + + + Gets or sets the arrow pointer width for the StepItem objects hosted within this container. + + + + + Represents a step item which is used to show single step in multi-step progress control. + + + + + Creates new instance of StepItem. + + + + + Creates new instance of StepItem and assigns the name to it. + + Item name. + + + + Creates new instance of StepItem and assigns the name and text to it. + + Item name. + item text. + + + + Returns copy of the item. + + + + + Copies the StepItem specific properties to new instance of the item. + + New StepItem instance. + + + + Copies the StepItem specific properties to new instance of the item. + + New StepItem instance. + + + + Returns the Font object to be used for drawing the item text. + + Font object. + + + + Called when Minimum property has changed. + + Old property value + New property value + + + + Called when Maximum property has changed. + + Old property value + New property value + + + + Called when Value property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when Symbol property has changed. + + Old property value + New property value + + + + Called when SymbolSet property value changes. + + Indciates old value + Indicates new value + + + + Called when SymbolSize property has changed. + + Old property value + New property value + + + + Called when Image property has changed. + + Old property value + New property value + + + + Called when MinimumSize property has changed. + + Old property value + New property value + + + + Called when HotTracking property has changed. + + Old property value + New property value + + + + Called when ImageTextSpacing property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets the render path of the item. + + + + + Gets or sets the minimum value of the range of the control. + + + + + Gets or sets the color of the Symbol. + + + + + Gets the realized symbol string. + + + + + Indicates the symbol displayed on face of the button instead of the image. Setting the symbol overrides the image setting. + + + + + Gets or sets the symbol set used to represent the Symbol. + + + + + Indicates the size of the symbol in points. + + + + + Indicates the image that is displayed next to the item text label. + + + + + Gets or sets whether this is first item in StepControl. + + + + + Gets or sets whether this is laste item in StepControl. + + + + + Indicates minimum size of the item + + + + + Specifies whether item changes its appearance when mouse is moved over the item + + + + + Gets whether mouse is over the item. + + + + + Gets whether left mouse button is pressed on the item. + + + + + Indicates the spacing between image and text. + + + + + Gets or sets padding around content of the item. + + + + + Indicates the array of colors that when set are used to draw the current progress, i.e. Value>Minimum + + + + + Indicates the array of colors that when set are used to draw the background of the item. + + + + + Gets or sets the text alignment. Default value is left. + + + + + Gets or sets the text associated with this item. + + + + + Gets or sets the color of the text. + + + + + Gets whether item supports text markup. Default is false. + + + + + Gets or sets whether text-markup support is enabled for items Text property. Default value is true. + Set this property to false to display HTML or other markup in the item instead of it being parsed as text-markup. + + + + + Container for the StepItem objects. + + + + + Initializes a new instance of the StepContainer class. + + + + + Returns copy of the item. + + + + + Copies the StepContainer specific properties to new instance of the item. + + New StepContainer instance. + + + + Copies the StepContainer specific properties to new instance of the item. + + New StepContainer instance. + + + + Called when PointerSize property has changed. + + Old property value + New property value + + + + Gets or sets the arrow pointer width for the StepItem objects hosted within this container. + + + + + Provides data for the Slider item rendering events. + + + + + Gets or sets the reference to the item being rendered. + + + + + Gets or sets the reference to graphics object. + + + + + Creates new instance of the object and initializes it with default values. + + Reference to the Slider item being rendered. + Reference to the graphics object. + + + + Returns read-only list of opened forms. + + + + + Gets or sets current MultiFormAppContext context. If you are using MultiFormAppContext to start your app then you should also + set that instance of MultiFormAppContext to this property so internally TabFormControl can register any new deattached forms + and prevent application from closing if startup form is closed first. + + + + + Gets or sets whether tab renders its state. Used internally by DotNetBar. Do not set. + + + + + Gets the actual tab path. + + + + + Indicates the array of colors that when set are used to draw the background of the item. + + + + + Summary description for Office2003ButtonItemPainter. + + + + + Summary description for ButtonItemPainter. + + + + + Paints state of the button, either hot, pressed or checked + + + + + + + + Paints state of the button, either hot, pressed or checked + + + + + + + + Gets or sets color table used by renderer. + + + + + Gets or sets the color table for form in active state. + + + + + Gets or sets the color table for from in inactive state. + + + + + Gets or sets the border thickness. + + + + + Gets or sets the background color of the form. + + + + + Gets or sets the text color of the form. + + + + + Gets or sets the text formatting for caption text. + + + + + Represents Range Slider Control. + + + + + Raises ValueChanging event. + + Provides event arguments. + + + + Raises ValueChanged event. + + Provides event arguments. + + + + Raises GetRangeTooltipText event. + + Provides event arguments. + + + + Forces the button to perform internal layout. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Occurs before Value has changed and allow the cancellation of the change. + + + + + Occurs after Value property has changed + + + + + Occurs when control is about to display the range tooltip and it allows you to customize tooltip + + + + + Gets the RangeSliderItem. + + + + + Indicates whether clicking the area outside of the range change buttons moves the range change button to the clicked location if possible thus allowing range change. + + + + + Gets or sets the maximum value of the range of the control. + + + + + Gets or sets the minimum value of the range of the control. + + + + + Indicates image to be used as maximum range slider button instead of built-in button. Image is scaled to size set by RangeButtonSize. + + + + + Indicates image to be used as minimum range slider button instead of built-in button. Image is scaled to size set by RangeButtonSize. + + + + + Specifies minimum absolute range that user can select. Absolute range is defined as Abs(Value.Max-Value.Min) Applies to user performed selection through mouse only. + + + + + Gets current part that is pressed using mouse left button. + + + + + Gets mouse over part. + + + + + Gets bounds of maximum range sliding button. + + + + + Gets bounds of minimum range sliding button. + + + + + Indicates the size of the range change buttons. + + + + + Specifies the height of the range line + + + + + Gets or sets the string that is used to format the range value to be displayed while user moves the range buttons. Value set here is used in string.Format(RangeTooltipFormat, Value.Min, Value.Max). + + + + + Gets or sets the color of the range value. + + + + + Specifies whether range tooltip is shown while user is changing the range + + + + + Gets or sets the slider orientation. Default value is horizontal. + + + + + Gets tick marks bounds. + + + + + Gets tick marks bounds for second marker is visible. + + + + + Specifies the ticks position inside of Range Slider. + + + + + Indicates tick display period + + + + + Indicates whether tick lines are shown + + + + + Gets or sets the range displayed by the control. + + + + + Represents the Rating control. + + + + + Initializes a new instance of the Rating class. + + + + + Raises the ParseRating event. + + Provides event arguments. + + + + Raises the ParseAverageRatingValue event. + + Provides event arguments. + + + + Raises the AverageRatingChanged event. + + Event data. + + + + Raises the RatingChanged event. + + Event data. + + + + Raises RatingChanging event. + + Event data + + + + Called when Command property value changes. + + + + + Occurs when Rating property has changed. + + + + + Occurs when RatingValue property has changed. + + + + + Occurs when Rating property is about to be changed and provides opportunity to cancel the change. + + + + + Occurs when AverageRating property has changed. + + + + + Occurs when AverageRatingValue property has changed. + + + + + Occurs when text markup link is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + Occurs when RatingValue property is set and it allows you to provide custom parsing for the values. + + + + + Occurs when AverageRatingValue property is set and it allows you to provide custom parsing for the values. + + + + + Indicates number of stars used for the rating. Minium value is 2 stars. + + + + + Gets or sets the rating value represented by the control. Default value is 0 which indicates + that there is no rating set. Maximum value is 5. + + + + + Gets or sets the average rating shown by control. Control will display average rating (if set) when no explicit + Rating value is set through Rating property. Minimum value is 0 and Maximum value is 5. + + + + + Gets or sets the AverageRating property. This property is provided for Data-Binding with NULL value support. + + + + + Gets the reference to custom rating images. + + + + + Gets or sets whether text assigned to the check box is visible. Default value is true. + + + + + Gets or sets whether text-markup support is enabled for items Text property. Default value is true. + Set this property to false to display HTML or other markup in the item instead of it being parsed as text-markup. + + + + + Gets or sets whether rating can be edited. Default value is true. + + + + + Gets or sets the orientation of rating control. + + + + + Gets or sets the Rating property value. This property is provided for Data-Binding with NULL value support. + + + + + Gets or sets the text color. Default value is Color.Empty which indicates that default color is used. + + + + + Gets or sets the spacing between optional text and the rating. + + + + + Gets or sets a value indicating whether the control is automatically resized to display its entire contents. You can set MaximumSize.Width property to set the maximum width used by the control. + + + + + Gets or sets the command assigned to the item. Default value is null. + Note that if this property is set to null Enabled property will be set to false automatically to disable the item. + + + + + Gets or sets user defined data value that can be passed to the command when it is executed. + + + + + Represents an image control with built-in reflection. + + + + + Initializes a new instance of the ReflectionImage class. + + + + + Gets or sets the image displayed on the control. + + + + + Gets or sets whether reflection effect is enabled. Default value is true. + + + + + Represents an single line of text label control with text-markup support and built-in reflection. + + + + + Occurs when text markup link is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + Gets or sets whether reflection effect is enabled. Default value is true. + + + + + Represents control which handles scroll-bars. + + + + + Initializes a new instance of the ScrollbarControl class. + + + + + Called when ScrollOverrideControl property has changed. + + Old property value + New property value + + + + Gets or sets the scroll-bar visual style. + + + + + Initializes a new instance of the RichTextBoxEx class. + + + + + Raises AcceptsTabChanged event. + + Provides event arguments. + + + + Raises HideSelectionChanged event. + + Provides event arguments. + + + + Raises ModifiedChanged event. + + Provides event arguments. + + + + Raises MultilineChanged event. + + Provides event arguments. + + + + Raises ReadOnlyChanged event. + + Provides event arguments. + + + + Raises LinkClicked event. + + Provides event arguments. + + + + Raises Protected event. + + Provides event arguments. + + + + Raises SelectionChanged event. + + Provides event arguments. + + + + Raises HScroll event. + + Provides event arguments. + + + + Raises HScroll event. + + Provides event arguments. + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Appends text to the current text of a text box + + + + + Determines whether you can paste information from the Clipboard in the specified data format. + + + + + + + Clears all text from the text box control. + + + + + Clears information about the most recent operation from the undo buffer of the text box. + + + + + Copies the current selection in the text box to the Clipboard. + + + + + Moves the current selection in the text box to the Clipboard. + + + + + Specifies that the value of the SelectionLength property is zero so that no characters are selected in the control. + + + + + Searches the text in a RichTextBox control for a string. + + + + + + + Searches the text of a RichTextBox control for the first instance of a character from a list of characters. + + + + + + + Searches the text in a RichTextBox control for a string with specific options applied to the search. + + + + + + + + Searches the text of a RichTextBox control, at a specific starting point, for the first instance of a character from a list of characters. + + + + + + + + Searches the text in a RichTextBox control for a string at a specific location within the control and with specific options applied to the search. + + + + + + + + + Searches a range of text in a RichTextBox control for the first instance of a character from a list of characters. + + + + + + + + + Searches the text in a RichTextBox control for a string within a range of text within the control and with specific options applied to the search. + + + + + + + + + + Retrieves the character that is closest to the specified location within the control. + + + + + + + Retrieves the index of the character nearest to the specified location + + + + + + + Retrieves the index of the first character of a given line. (Inherited from TextBoxBase.) + + + + + + + Retrieves the index of the first character of the current line. (Inherited from TextBoxBase.) + + + + + + Retrieves the line number from the specified character position within the text of the RichTextBox control. + + + + + + + Retrieves the location within the control at the specified character index. + + + + + + + Loads a rich text format (RTF) or standard ASCII text file into the RichTextBox control. + + + + + + Loads the contents of an existing data stream into the RichTextBox control. + + + + + + + Loads a specific type of file into the RichTextBox control. + + + + + + + Replaces the current selection in the text box with the contents of the Clipboard. + + + + + Pastes the contents of the Clipboard in the specified Clipboard format. + + + + + + Reapplies the last operation that was undone in the control. + + + + + Saves the contents of the RichTextBox to a rich text format (RTF) file. + + + + + + Saves the contents of a RichTextBox control to an open data stream. + + + + + + + Saves the contents of the RichTextBox to a specific type of file. + + + + + + + Scrolls the contents of the control to the current caret position. + + + + + Activates the control. (Inherited from Control.) + + + + + Selects a range of text in the text box. + + + + + + + Selects all text in the text box. + + + + + Undoes the last edit operation in the text box. + + + + + Gets the reference to internal RichTextBox control. + + + + + Occurs when the value of the AcceptsTab property changes + + + + + Occurs when the value of the HideSelection property changes. + + + + + Occurs when the value of the Modified property changes. + + + + + Occurs when the value of the Multiline property changes. + + + + + Occurs when the value of the ReadOnly property changes. + + + + + Occurs when a hyperlink in the text is clicked. + + + + + Occurs when the user takes an action that would change a protected range of text. + + + + + Occurs when the current selection has changed. + + + + + Occurs when the horizontal scroll bar is clicked. + + + + + Occurs when the vertical scroll bar is clicked. + + + + + Gets or sets whether anti-alias smoothing is used while painting. Default value is true. + + + + + Gets or sets the back color of the RichTextBox. + + + + + Gets or sets whether tab characters are accepted as input + + + + + Gets or sets whether automatic word selection is enabled. + + + + + Gets or sets indent for bullets in the control. + + + + + Gets or sets whether URLs are automatically formatted as links. + + + + + Gets or sets whether drag/drop of text, pictures and other data is enabled. + + + + + Gets or sets whether selection should be hidden when the edit control loses focus. + + + + + Gets or sets lines of text in a multi-line edit, as an array of String values. + + + + + Gets or sets maximum number of characters that can be entered into the edit control. + + + + + Gets or sets whether the text in the control can span more than one line. + + + + + Gets or sets whether the text in the edit control can be changed or not. + + + + + Gets or sets right margin dimensions. + + + + + Gets or sets the text of the RichTextBox control, including all rich text format (RTF) codes. + + + + + Gets or sets for multi-line edit control, which scroll bars will be shown. + + + + + Gets or sets whether shortcuts defined for the control are enabled. + + + + + Gets or sets whether selection margin is visible. + + + + + Gets or sets whether lines are automatically word-wrapped. + + + + + Gets or sets current zoom factor for the control content. + + + + + Should be fired when non-client size of the control changes, i.e. when WM_NCCALCSIZE message is received. + + + + + Should be fired when scroll-bar value on child control changes. + + + + + Should be fired when control receives WM_MOVE message. + + + + + Gets whether control is in design mode. + + + + + Raises NonClientSizeChanged event. + + Provides event arguments. + + + + Raises ScrollBarValueChanged event. + + Provides event arguments. + + + + Raises NonClientSizeChanged event. + + Provides event arguments. + + + + Defines arguments for IScrollBarOverrideSupport.ScrollBarValueChanged event. + + + + + Initializes a new instance of the ScrollValueChangedEventArgs class. + + + + + + Defines information for IScrollBarOverrideSupport.ScrollBarValueChanged event. + + + + + Defines delegate for IScrollBarOverrideSupport.ScrollBarValueChanged event. + + Sender. + Event arguments + + + + Gets or sets the scroll-bar visual style. + + + + + Paints ListBoxItem. + + Provides arguments for the operation. + + + + Paints ListBoxItem. + + Provides arguments for the operation. + + + + Represents SideNav control to create "hamburger" menus. + + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Updates the control colors from the global color table. + + + + + Maximizes control width so it fills up space to the right of the control. + + Source of the event. + + + + Restores the control to previous size if it was maximized before. + + Source of event. + + + + Opens the control, i.e. expands it, selects specified item and shows its associated panel. + + Item to select. + Source of the event. + + + + Closes the control, i.e. unselects any selected item, hide its associated panel and folds the control. + + Source of the event. + + + + Raises IsMenuExpandedChanged event. + + Provides event arguments. + + + + Expands or collapses the control items menu. + + + + + + Called when AnimationTime property has changed. + + Old property value + New property value + + + + Raises BeforeMaximize event. + + Provides event arguments. + + + + Raises BeforeRestore event. + + Provides event arguments. + + + + Raises BeforeOpen event. + + Provides event arguments. + + + + Raises BeforeClose event. + + Provides event arguments. + + + + Raises SelectedItemChanged event. + + Provides event arguments. + + + + Indicates whether splitter that is located on right hand side of open control is visible and enabled. + + + + + Indicates whether button which folds/closes the control is visible. + + + + + + Returns collection of items on a bar. + + + + + Gets or sets whether control is closed, i.e. whether selected item panel is shown or not. When closed + any selected item is unselected and selected panel hidden. + + + + + Indicates whether side menu is expanded, i.e. shows both image and text. When menu is collapsed only image is shown. + + + + + Occurs when IsMenuExpanded property has changed its value. + + + + + Indicates the animation time in milliseconds for operations that perform visual animation of transition. Set to zero to disable animation. + + + + + Occurs before the control is maximized and allows you to cancel that. + + + + + Occurs before the control is restored and allows you to cancel that. + + + + + Occurs before the control is opened and allows you to cancel that. + + + + + Occurs before the control is closed and allows you to cancel that. + + + + + Gets currently selected item. Only items with Panel assigned can be selected. + + + + + Occurs when SelectedItem changes. + + + + + Gets reference to internal SideNavStrip control. + + + + + Defines delegate for the CancelSource events. + + + + + + + Event arguments for CancelSourceEventHandler + + + + + Gets the source of the event. + + + + + Gets any optional data that is associated with the event. + + + + + Creates new instance of the object. + + Source of event + + + + Creates new instance of the object. + + Source of event + Optional data associated with the event. + + + + Initializes a new instance of the MetroTabItem class. + + + + + Selects the tab. + + + + + Called after Checked property has changed. + + + + + Occurs just before Click event is fired. + + + + + Called when Visibility of the items has changed. + + New Visible state. + + + + Occurs after item visual style has changed. + + + + + Gets or sets cached image rendering bounds. + + + + + Gets or sets cached text rendering bounds. + + + + + Gets or sets the panel assigned to this tab item. + + + + + Gets or set the Group item belongs to. The groups allows a user to choose from mutually exclusive options within the group. The choice is reflected by Checked property. + + + + + Returns the collection of sub items. + + + + + Indicates the array of colors that when set are used to draw the background of the item. + + + + + Indicates the array of colors that when set are used to draw the border of the item. + + + + + Gets or sets the additional padding added around the tab item in pixels. Default value is 0. + + + + + Indicates an optional title for the associated panel. If not set item text is used. + + + + + Gets or sets whether this item acts as the SideNav control system menu which collapses and expands the SideNav items. + + + + + Indicates whether the item will auto-collapse (fold) when clicked. + When item is on popup menu and this property is set to false, menu will not + close when item is clicked. + + + + + Indicates whether the item will auto-expand when clicked. + When item is on top level bar and not on menu and contains sub-items, sub-items will be shown only if user + click the expand part of the button. Setting this propert to true will expand the button and show sub-items when user + clicks anywhere inside of the button. Default value is false which indicates that button is expanded only + if its expand part is clicked. + + + + + Gets or sets whether item can be customized by end user. + + + + + Gets or set a value indicating whether the button is in the checked state. + + + + + Gets or sets whether Click event will be auto repeated when mouse button is kept pressed over the item. + + + + + Gets or sets the auto-repeat interval for the click event when mouse button is kept pressed over the item. + + + + + Gets or sets a value indicating whether the item is enabled. + + + + + Indicates item's visiblity when on pop-up menu. + + + + + Indicates when menu items are displayed when MenuVisiblity is set to VisibleIfRecentlyUsed and RecentlyUsed is true. + + + + + Indicates Animation type for Popups. + + + + + Indicates the font that will be used on the popup window. + + + + + Indicates whether sub-items are shown on popup Bar or popup menu. + + + + + Specifies the inital width for the Bar that hosts pop-up items. Applies to PopupType.Toolbar only. + + + + + Gets or sets whether item will display sub items. + + + + + Gets or sets whether the item expands automatically to fill out the remaining space inside the container. Applies to Items on stretchable, no-wrap Bars only. + + + + + Gets or sets the width of the expand part of the button item. + + + + + Gets or set the alternative shortcut text. + + + + + Gets or sets whether item separator is shown before this item. + + + + + Returns category for this item. If item cannot be customzied using the + customize dialog category is empty string. + + + + + Gets or sets the text color of the button when mouse is over the item. + + + + + Indicates the way item is painting the picture when mouse is over it. Setting the value to Color will render the image in gray-scale when mouse is not over the item. + + + + + Gets/Sets the button style which controls the appearance of the button elements. Changing the property can display image only, text only or image and text on the button at all times. + + + + + Provides data for the SideNavItem rendering events. + + + + + Gets or sets the reference to the item being rendered. + + + + + Gets or sets the reference to graphics object. + + + + + Indicates whether to cancel system rendering of the item. + + + + + Creates new instance of the object and initializes it with default values. + + Reference to the ListBoxItem being rendered. + Reference to the graphics object. + + + + Defines color table for SideNav control. + + + + + Gets or sets the color table for SideNavItem + + + + + Gets or sets the background color of SideNav title bar. + + + + + Gets or sets the border color of the title of SideNav control. + + + + + Gets or sets the color of the strip which hosts the items. + + + + + Gets or sets the border color of the SideNav control. + + + + + Gets or sets the back color of panels that are attached to SideNavItem and displayed when SideNavItem is selected. + + + + + Defines color table for SideNavItem + + + + + Gets or sets the color table for Default state. + + + + + Gets or sets the color table for MouseOver state. + + + + + Gets or sets the color table for Pressed state. + + + + + Gets or sets the color table for Selected state. + + + + + Defines state color table for SideNavItem + + + + + Indicates item text color. + + + + + Gets or sets the background colors for the item. + + + + + Gets or sets the back colors gradient angle if there is more than one color in BackColors array. + + + + + Gets or sets the gradient colors positions if there is more than one color in BackColors array. + + + + + Gets or sets the border colors for the item. + + + + + Indicates the corner radius. + + + + + Represents a panel which hosts controls for the SideNavItem. + + + + + Raises NonClientSizeChanged event. + + Provides event arguments. + + + + Raises ScrollBarValueChanged event. + + Provides event arguments. + + + + Raises NonClientSizeChanged event. + + Provides event arguments. + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Returns collection of items on a bar. + + + + + Gets currently selected item. + + + + + Represents the panel which can slide out and into the view. + + + + + Raises IsOpenChanged event. + + Provides event arguments. + + + + Called when SlideSide property has changed. + + Old property value + New property value + + + + Called when IsOpen property has changed. + + Old property value + New property value + + + + Slides panel into the view. + + + + + Waits for current slide animation to finish and then returns control. + + + + + Slides panel out of the view. + + + + + Called when AnimationTime property has changed. + + Old property value + New property value + + + + Called when SlideOutButtonVisible property has changed. + + Old property value + New property value + + + + Called when SlideOutButtonSize property has changed. + + Old property value + New property value + + + + Returns whether property should be serialized. + + + + + Resets property to default value. + + + + + Called when SlideOutActiveButtonSize property has changed. + + Old property value + New property value + + + + Returns whether property should be serialized. + + + + + Resets property to default value. + + + + + Called when SlideOutButtonStyle property has changed. + + Old property value + New property value + + + + Called when CenterContent property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when Symbol property has changed. + + Old property value + New property value + + + + Called when SymbolSet property value changes. + + Indciates old value + Indicates new value + + + + Called when SymbolSize property has changed. + + Old property value + New property value + + + + Occurs when IsOpen property value has changed, i.e. slide-panel is shown or hidden. + + + + + Gets or sets side panel slides into. + + + + + Gets or sets whether panel is open. When this property is changed panel will slide in or out of the view. + + + + + Gets or sets whether panel uses modal animation, meaning when IsOpen property is set the call is not returned until animation is complete. + + + + + Gets or sets the open panel bounds. When control IsOpen=false and panel is collapsed its original bounds are stored in OpenBounds property and restored once panel is open. + + + + + Gets or sets the animation duration time in milliseconds. Setting this property to 0 will disable slide animation. + + + + + Gets or sets whether slide out button is shown when panel is out of the view and which allows panel to be shown. + + + + + Gets or sets the slide-out buttton size in default state. + + + + + Gets or sets active (mouse over) slide out button size. + + + + + Gets or sets slide-out button style. + + + + + Gets or sets whether panel centers the Controls inside of it. Default value is false. + + + + + Gets or sets the color of the Symbol displayed on slideout button. + + + + + Gets the realized symbol string. + + + + + Indicates the symbol displayed on face of the slideout button. + + + + + Gets or sets the symbol set used to represent the Symbol. + + + + + Indicates the size of the symbol in points. + + + + + Defines the side SlidePanel slides into. + + + + + Represents the slider button that is used by SlidePanel when collapsed to slide it back into the view. + + + + + Initializes a new instance of the SliderButton class. + + + + + + Called when AutoTopMostEnabled property has changed. + + Old property value + New property value + + + + Called when SliderSize property has changed. + + Old property value + New property value + + + + Called when ActiveSliderSize property has changed. + + Old property value + New property value + + + + Called when IsActive property has changed. + + Old property value + New property value + + + + Called when IsMouseDown property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when Symbol property has changed. + + Old property value + New property value + + + + Called when SymbolSet property value changes. + + Indciates old value + Indicates new value + + + + Called when SymbolSize property has changed. + + Old property value + New property value + + + + Gets or sets whether slider button automatically checks whether its top-most control on the form, i.e. visible at all times on top of other controls + + + + + Gets or sets the slider size in default state. Notice that size specified here applies to Left and Right SlidePanel positions. For Top and Bottom positions the Width and Height are interchaged. + + + + + Gets or sets the slider size in active state. Notice that size specified here applies to Left and Right SlidePanel positions. For Top and Bottom positions the Width and Height are interchaged. + + + + + Gets or sets whether slider button is in active state. + + + + + Gets or sets the style associated with the control. + + + + + Gets or sets the color of the Symbol. + + + + + Gets the realized symbol string. + + + + + Indicates the symbol displayed on face of the button instead of the image. Setting the symbol overrides the image setting. + + + + + Gets or sets the symbol set used to represent the Symbol. + + + + + Indicates the size of the symbol in points. + + + + + Represents the Slider control. + + + + + Raises the IncreaseButtonClick event. + + Provides event arguments + + + + Raises the DecreaseButtonClick event. + + Provides event arguments + + + + Raises the ValueChanged event. + + Provides event arguments + + + + Raises the ValueChanging event. + + + + + Advances the current position of the slider by the amount of the Step property. + + + + + Returns whether property should be serialized. Used by Windows Forms designer. + + + + + Resets the property to default value. Used by Windows Forms designer. + + + + + Forces the button to perform internal layout. + + + + + Called when Command property value changes. + + + + + Occurs after Value property has changed. + + + + + Occurs before Value property has changed. + + + + + Occurs when Increase button is clicked using mouse. + + + + + Occurs when Decrease button is clicked using mouse. + + + + + Gets or sets whether text-markup support is enabled for controls Text property. Default value is true. + Set this property to false to display HTML or other markup in the control instead of it being parsed as text-markup. + + + + + Gets or sets the text label position in relationship to the slider. Default value is Left. + + + + + Gets or sets whether the text label next to the slider is displayed. + + + + + Gets or sets the width of the label part of the item in pixels. Value must be greater than 0. Default value is 38. + + + + + Gets or sets the maximum value of the range of the control. + + + + + Gets or sets the minimum value of the range of the control. + + + + + Gets or sets the current position of the slider. + + + + + Gets or sets the amount by which a call to the PerformStep method increases the current position of the slider. Value must be greater than 0. + + + + + Gets or sets the color of the label text. + + + + + Gets or sets whether vertical line track marker is displayed on the slide line. Default value is true. + + + + + Gets or sets the tooltip for the Increase button of the slider. + + + + + Gets or sets the tooltip for the Decrease button of the slider. + + + + + Gets or sets the slider orientation. Default value is horizontal. + + + + + Gets the SliderItem. + + + + + Gets or sets the custom color table for the item. Color table here will override all system color table settings. + + + + + Gets or sets the command assigned to the item. Default value is null. + Note that if this property is set to null Enabled property will be set to false automatically to disable the item. + + + + + Gets or sets user defined data value that can be passed to the command when it is executed. + + + + + Represents the control which displays symbol from symbols library. + + + + + Initializes a new instance of the SymbolBox class. + + + + + Returns the color scheme used by control. Color scheme for Office2007 style will be retrieved from the current renderer instead of + local color scheme referenced by ColorScheme property. + + An instance of ColorScheme object. + + + + Resets style to default value. Used by windows forms designer. + + + + + Called when Symbol property has changed. + + Old property value + New property value + + + + Called when SymbolSet property value changes. + + Indciates old value + Indicates new value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when SymbolSize property has changed. + + Old property value + New property value + + + + Specifies the background style of the control. + + + + + Gets the realized symbol string. + + + + + Indicates the symbol displayed on face of the button instead of the image. Setting the symbol overrides the image setting. + + + + + Gets or sets the symbol set used to represent the Symbol. + + + + + Gets or sets the color of the Symbol. + + + + + Indicates the size of the symbol in points. + + + + + Gets or sets the name of the color table. + + + + + Gets or sets the default tab colors. + + + + + Gets or sets the disabled tab colors. + + + + + Gets or sets the selected tab colors. + + + + + Gets or sets the colors when mouse is over the tab but tab is not selected. + + + + + Gets or sets colors for the tab close button. + + + + + Defines the color table for RibbonTabItem states. + + + + + Indicates item text color. + + + + + Gets or sets the background colors for the item. + + + + + Gets or sets the back colors gradient angle if there is more than one color in BackColors array. + + + + + Gets or sets the gradient colors positions if there is more than one color in BackColors array. + + + + + Gets or sets the item border colors. + + + + + Creates a copy of the state color table. + + + + + Defines color table for TabFormItem close button displayed on tabs. + + + + + Colors for the button in default state. + + + + + Colors for button in mouse over state. + + + + + Colors for button when pressed with mouse state. + + + + + Defines state color table for TabFormItem close button displayed on tabs. + + + + + Gets or sets the background colors for the item. + + + + + Gets or sets the back colors gradient angle if there is more than one color in BackColors array. + + + + + Gets or sets the gradient colors positions if there is more than one color in BackColors array. + + + + + Indicates item sign color. + + + + + Indicates item border color. + + + + + Gets or sets color table used by renderer. + + + + + Gets or sets Graphics object group is rendered on. + + + + + Gets or sets the reference to TabParentForm being rendered. + + + + + Indicates whether to cancel system rendering of the item. + + + + + Raises PrepareModalPanelBounds event. + + Provides event arguments. + + + + Initializes a new instance of the MetroForm class. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Shows the panel control in the center of the form and covers all non system controls making the panel effectively modal. + + Control to show. + + + + Shows the panel control in the center of the form by sliding it in from specified side and covers all non system controls making the panel effectively modal. + + Panel to show. + Side to slide panel into the view from. + + + + Shows the panel control in the center of the form by sliding it in from specified side and covers all non system controls making the panel effectively modal. + + Panel to show. + Side to slide panel into the view from. + Slide animation speed in milliseconds. + + + + Hides the panel control that was previously shown using ShowModalPanel method. + + Control to hide. + + + + Hides the panel control that was previously shown using ShowModalPanel method by sliding it out of the view to the specified side. + + Control to hide. + Side to slide control into. + + + + Gets effective Border Thickness for the form. + + Thickness + + + + Called when BorderThickness property has changed. + + Old property value + New property value + + + + Called when BorderColor property has changed. + + Old property value + New property value + + + + Called when WM_NCHITTEST message is received. + + Reference to message data. + Return true to call base form implementation otherwise return false. + + + + Called when WM_DWMCOMPOSITIONCHANGED message is received. + + Reference to message data. + Return true to call base form implementation otherwise return false. + + + + Called when WM_NCACTIVATE message is received. + + Reference to message data. + Return true to call base form implementation otherwise return false. + + + + Called when WM_NCCALCSIZE message is received. + + Message structure. + true to call base WndProc otherwise false. + + + + Occurs before modal panel is shown and allows change of modal panel bounds. + + + + + Gets or sets whether MetroShell is pre-rendered when form is shown to make first rendering smoother. Default value is true. + + + + + Gets whether at least one modal panel is displayed. + + + + + Indicates whether modal panel when displayed shows MetroStatusBar. + + + + + Returns whether Windows Glass effects are enabled. + + + + + Gets or sets the TabFormControl that is hosted by this form. This property is for internal use only. + + + + + Gets or sets whether form can be resized. + + + + + Gets or sets the form border thickness. Default value is empty thickness which indicates that thickness is taken from color table. + + + + + Gets or sets the form border colors. + + + + + Gets whether form is active. + + + + + Indicates the number of pixels subtracted from form's height or width (depending on taskbar position) when form is maximized and taskbar is in auto-hide state. Default value is 4. + + + + + This property is not to be used with MetroForm. + + + + + Gets or sets the size of the border on the edges of the form that when mouse is over allow for form resizing. + + + + + Indicates whether Close button in top-right corner of the form is visible. + + + + + This property cannot be used on MetroAppForm + + + + + This property cannot be used on MetroAppForm + + + + + This property cannot be used on MetroAppForm + + + + + This property cannot be used on MetroAppForm + + + + + Gets or sets text for form system menu Restore item. + + + + + Gets or sets text for form system menu Move item. + + + + + Gets or sets text for form system menu Size item. + + + + + Gets or sets text for form system menu Minimize item. + + + + + Gets or sets text for form system menu Maximize item. + + + + + Gets or sets text for form system menu Close item. + + + + + Represents Tabbed Forms control for creating tabbed user interface as replacement for MDI child forms. + + + + + Raises RemovingToken event. + + Provides event arguments. + + + + Raises BeforeTabFormItemDetach event. + + Provides event arguments. + + + + Raises TabFormItemDetach event. + + Provides event arguments. + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Performs the setup of the TabFormPanel with the current style of the TabFormControl Control. + + Panel to apply style changes to. + + + + Creates new Tab at specified position, creates new associated panel and adds them to the control. + + Specifies the text displayed on the tab. + Specifies the name of the tab + Specifies the position of the new tab inside of Items collection. + New instance of the TabFormItem that was created. + + + + Creates new Tab and associated panel and adds them to the control. + + Specifies the text displayed on the tab. + Specifies the name of the tab + New instance of the TabFormItem that was created. + + + + Recalculates layout of the control and applies any changes made to the size or position of the items contained. + + + + + Occurs when text markup link is clicked. + + + + + Raises CreateNewTab event. + + Provides event arguments. + + + + Occurs + + + + + Occurs when DotNetBar is looking for translated text for one of the internal text that are + displayed on menus, toolbars and customize forms. You need to set Handled=true if you want + your custom text to be used instead of the built-in system value. + + + + + Occurs when Item on control is clicked. + + + + + Occurs after selected tab has changed. You can use + TabFormControl.SelectedTab + property to get reference to newly selected tab. + + + + + Occurs when text markup link from TitleText markup is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + Occurs before TabFormItem is detached and gives you opportunity to cancel the action or provide your own new TabParentForm and TabFormControl. + + + + + Occurs after TabFormItem has been detached and is added to the new form and tab control. + + + + + Gets or sets whether anti-alias smoothing is used while painting. Default value is false. + + + + + Returns current number of tabs visible and hidden on the tab strip. + + + + + Indicates whether Form.Icon is shown in top-left corner. + + + + + + Gets or sets the Context menu bar associated with the this control which is used as part of Global Items feature. The context menu + bar assigned here will be used to search for the items with the same Name or GlobalName property so global properties can be propagated when changed. + You should assign this property to enable the Global Items feature to reach your ContextMenuBar. + + + + + Gets or sets whether custom caption and quick access toolbar provided by the control is visible. Default value is false. + This property should be set to true when control is used on MetroAppForm. + + + + + Gets or sets the font for the form caption text when CaptionVisible=true. Default value is NULL which means that system font is used. + + + + + Gets or sets the explicit height of the caption provided by control. Caption height when set is composed of the TabGroupHeight and + the value specified here. Default value is 0 which means that system default caption size is used. + + + + + Specifies the background style of the control. + + + + + Gets or sets the currently selected TabFormItem. TabFormItems are selected using the Checked property. Only a single + TabFormItem can be selected (Checked) at any given time. + + + + + Indicates whether new tab item which allows creation of new tab when clicked is visible. When visible you need to handle CreateNewTab event and create your new tab in event handler. + + + + + Occurs when new tab item is clicked by end user and allows you to create and add new tab to the control. + + + + + Returns reference to internal tab-strip control. + + + + + Returns collection of items on a bar. + + + + + Gets collection of items displayed in control captions, if it is visible (CaptionVisible=true). + + + + + Gets or sets the custom color table for the control. When set this color table overrides all system color settings for control. + + + + + Gets or sets whether mouse wheel scrolls through the tabs. Default value is true. + + + + + ImageList for images used on Items. Images specified here will always be used on menu-items and are by default used on all Bars. + + + + + ImageList for medium-sized images used on Items. + + + + + ImageList for large-sized images used on Items. + + + + + Gets or sets a value indicating whether the user can give the focus to this control using the TAB key. Default value is false. + + + + + Gets or sets the side tab-strip is docked to. + + + + + Gets or sets the font tab items are displayed with. + + + + + Gets or sets whether this TabFormControl was auto-created as result of end-user tearing off the tab. + + + + + Specifies dock side for tab form strip control. + + + + + Defines delegate for the PaintTabFormItem event. + + + + + Defines delegate for the PaintTabFormItem event. + + + + + Gets reference to the tab being painted. + + + + + Gets reference to the graphic canvas for painting. + + + + + Gets or sets whether default painting for the item is performed, default value is true. Set to false to disable internal painting. + + + + + Represents a tab in Tabbed Form user interface. + + + + + Initializes a new instance of the TabFormItem class. + + + + + Returns true if custom painting is performed and internal painting should be bypassed. + + + + + + + Selects the tab. + + + + + Called after Checked property has changed. + + + + + Occurs just before Click event is fired. + + + + + Called when Visibility of the items has changed. + + New Visible state. + + + + Occurs after item visual style has changed. + + + + + Gets color table key for the default tab color table. + + + + + Gets color table key for the green tab color table. + + + + + Gets color table key for the magenta tab color table. + + + + + Gets color table key for the orange tab color table. + + + + + Gets color table key for the red tab color table. + + + + + Gets color table key for the blue tab color table. + + + + + Gets color table key for the yellow tab color table. + + + + + Gets color table key for the purple tab color table. + + + + + Gets color table key for the cyan tab color table. + + + + + Gets color table key for the blue mist tab color table. + + + + + Gets color table key for the purple mist tab color table. + + + + + Gets color table key for the tan tab color table. + + + + + Gets color table key for the lemon lime tab color table. + + + + + Gets color table key for the apple tab color table. + + + + + Gets color table key for the teal tab color table. + + + + + Gets color table key for the red chalk tab color table. + + + + + Gets color table key for the silver tab color table. + + + + + Gets or sets the close button bounds. + + + + + Gets or sets cached image rendering bounds. + + + + + Gets or sets cached text rendering bounds. + + + + + Gets or sets the additional padding added around the tab item in pixels. Default value is 0. + + + + + Indicates whether close button is visible on the tabs which when clicked closes the tab. Default value is true. + + + + + Gets or sets whether size of the tab has been reduced below the default calculated size. + + + + + Gets or sets the predefined color of the tab. Default value is eTabFormItemColor.Default + + + + + Gets or sets the panel assigned to this tab item. + + + + + Gets or set the Group item belongs to. The groups allows a user to choose from mutually exclusive options within the group. The choice is reflected by Checked property. + + + + + Returns the collection of sub items. + + + + + Indicates whether the item will auto-collapse (fold) when clicked. + When item is on popup menu and this property is set to false, menu will not + close when item is clicked. + + + + + Indicates whether the item will auto-expand when clicked. + When item is on top level bar and not on menu and contains sub-items, sub-items will be shown only if user + click the expand part of the button. Setting this propert to true will expand the button and show sub-items when user + clicks anywhere inside of the button. Default value is false which indicates that button is expanded only + if its expand part is clicked. + + + + + Gets or sets whether item can be customized by end user. + + + + + Gets or set a value indicating whether tab is selected. + + + + + Gets or sets whether Click event will be auto repeated when mouse button is kept pressed over the item. + + + + + Gets or sets the auto-repeat interval for the click event when mouse button is kept pressed over the item. + + + + + Gets or sets a value indicating whether the item is enabled. + + + + + Indicates item's visiblity when on pop-up menu. + + + + + Indicates when menu items are displayed when MenuVisiblity is set to VisibleIfRecentlyUsed and RecentlyUsed is true. + + + + + Indicates Animation type for Popups. + + + + + Indicates the font that will be used on the popup window. + + + + + Indicates whether sub-items are shown on popup Bar or popup menu. + + + + + Specifies the inital width for the Bar that hosts pop-up items. Applies to PopupType.Toolbar only. + + + + + Gets or sets whether item will display sub items. + + + + + Gets or sets whether the item expands automatically to fill out the remaining space inside the container. Applies to Items on stretchable, no-wrap Bars only. + + + + + Gets or sets the width of the expand part of the button item. + + + + + Gets or set the alternative shortcut text. + + + + + Gets or sets whether item separator is shown before this item. + + + + + Returns category for this item. If item cannot be customzied using the + customize dialog category is empty string. + + + + + Gets or sets the text color of the button when mouse is over the item. + + + + + Indicates the way item is painting the picture when mouse is over it. Setting the value to Color will render the image in gray-scale when mouse is not over the item. + + + + + Gets/Sets the button style which controls the appearance of the button elements. Changing the property can display image only, text only or image and text on the button at all times. + + + + + Indicates the array of colors that when set are used to draw the background of the item. + + + + + Gets or sets the custom color table for the tab. When set this color table overrides all color settings for a tab. + + + + + Specifies predefined color assigned to Tab Form Item. + + + + + Gets the TabFormItem this panel is associated with + + + + + Defines state color table for TabParentForm. + + + + + Gets or sets the colors for the top part of the background. + + + + + Gets or sets the back colors gradient angle if there is more than one color in BackColors array. + + + + + Gets or sets the gradient colors positions if there is more than one color in BackColors array. + + + + + Gets or sets the color of caption text. + + + + + Gets or sets the border colors. + + + + + Defines the internal container item for the ribbon strip control. + + + + + Creates new instance of the class and initializes it with the parent RibbonStrip control. + + Reference to parent RibbonStrip control + + + + Occurs after an item has been added to the container. This procedure is called on both item being added and the parent of the item. To distinguish between those two states check the item parameter. + + When occurring on the parent this will hold the reference to the item that has been added. When occurring on the item being added this will be null (Nothing). + + + + Paints this base container + + + + + Returns copy of GenericItemContainer item + + + + + Raises CreateNewTab event. + + Provides event arguments. + + + + Return Sub Item at specified location + + + + + Gets the list of the items displayed in form caption if its visible. + + + + + Gets or sets the scroll button width. + + + + + Indicates the scroll in pixels each time scroll button is pressed. + + + + + Gets reference to internal ribbon strip container that contains tabs and/or other items. + + + + + Gets reference to internal caption container item that contains the quick toolbar, start button and system caption item. + + + + + Indicates whether new tab item which allows creation of new tab when clicked is visible. When visible you need to handle CreateNewTab event and create your new tab in event handler. + + + + + Occurs when new tab item is clicked by end user and allows you to create and add new tab to the control. + + + + + Gets or sets a value indicating whether the item is expanded or not. For Popup items this would indicate whether the item is popped up or not. + + + + + When parent items does recalc size for its sub-items it should query + image size and store biggest image size into this property. + + + + + + Represents simple item container which orders items horizontally and support all ItemAlignment settings. + + + + + Initializes a new instance of the SimpleItemContainer class. + + + + + Returns copy of the item. + + + + + Copies the item specific properties to new instance of the item. + + New instance. + + + + Copies the item specific properties to new instance of the item. + + New instance. + + + + Sets whether container is used as system container internally by DotNetBar. + + true or false to indicate whether container is system container or not. + + + + Called when ItemSpacing property has changed. + + Old property value + New property value + + + + Gets or sets the minimum size of the container. Either Width or Height can be set or both. Default value is 0,0 which means + that size is automatically calculated. + + + + + Returns whether instance of the item container is used as system container internally by DotNetBar. + + + + + Indicates the spacing between items. + + + + + Indicates additional spacing between item when its BeginGroup property is set. + + + + + Specifies the layout orientation + + + + + Indicates whether all items are resized to be of the size equal to largest item in the container + + + + + Indicates left side padding within container. + + + + + Indicates right side padding within container. + + + + + Gets overlap spacing for specific item types specified by OverlapType in the container. + + + + + Gets the type of the item that will overlap. + + + + + Return Sub Item at specified location + + + + + Occurs after an item has been added to the container. This procedure is called on both item being added and the parent of the item. To distinguish between those two states check the item parameter. + + When occurring on the parent this will hold the reference to the item that has been added. When occurring on the item being added this will be null (Nothing). + + + + Occurs after an item has been removed. + + Item being removed. + + + + Gets or sets a value indicating whether the item is expanded or not. For Popup items this would indicate whether the item is popped up or not. + + + + + Represents tabbed UI strip control. + + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Occurs when text markup link is clicked. + + + + + Returns the color scheme used by control. Color scheme for Office2007 style will be retrived from the current renderer instead of + local color scheme referenced by ColorScheme property. + + An instance of ColorScheme object. + + + + Returns effective caption height. + + Caption height. + + + + Returns automatically calculated height of the control given current content. + + Height in pixels. + + + + Returns the collection of items with the specified name. + + Item name to look for. + + + + + Returns the collection of items with the specified name and type. + + Item name to look for. + Item type to look for. + + + + + Returns the collection of items with the specified name and type. + + Item name to look for. + Item type to look for. + Indicates whether GlobalName property is used for searching. + + + + + Returns the first item that matches specified name. + + Item name to look for. + + + + + Called when item on popup container is right-clicked. + + Instance of the item that is right-clicked. + + + + Starts moving of the parent form action which happens when user attempts to drag the form caption. + + + + + Returns true if point is inside the caption area. + + Client point coordinates. + True if point is inside of caption area otherwise false. + + + + Closes specified tab. + + Tab to close + Source of the event + + + + Raises RemovingToken event. + + Provides event arguments. + + + + Raises RemovingToken event. + + Provides event arguments. + + + + Raises BeforeTabFormItemDetach event. + + Provides event arguments. + + + + Raises TabFormItemDetach event. + + Provides event arguments. + + + + Occurs when text markup link from TitleText markup is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + + Gets reference to parsed markup body element if text was markup otherwise returns null. + + + + + Gets or sets whether control can be customized and items added by end-user using context menu to the quick access toolbar. + Caption of the control must be visible for customization to be enabled. Default value is true. + + + + + Gets or sets the explicit height of the caption provided by control. Caption height when set is composed of the TabGroupHeight and + the value specified here. Default value is 0 which means that system default caption size is used. + + + + + Gets or sets whether custom caption line provided by the control is visible. Default value is false. + This property should be set to true when control is used on Office2007RibbonForm. + + + + + Gets or sets the font for the form caption text when CaptionVisible=true. Default value is NULL which means that system font is used. + + + + + Gets/Sets the visual style of the control. + + + + + Returns collection of items on a bar. + + + + + Returns currently selected TabFormItem. TabFormItems are selected using the Checked property. Only a single + TabFormItem can be Checked at any given time. + + + + + Indicates whether Form.Icon is shown in top-left corner. + + + + + Gets the reference to the internal container item for the items displayed in control caption. + + + + + Gets the reference to the internal container for the ribbon tabs and other items. + + + + + Indiciates the appearance of the tab form items rendered on the strip + + + + + Indicates whether end-user tab reordering is enabled, default value is true. + + + + + Indicates whether user can detach the tabs into the new forms using drag and drop. Default value is true. + + + + + Occurs before tab is closed and it allows canceling of the event. + + + + + Occurs after tab is closed. + + + + + Returns current number of tabs visile and hiden on the tab strip. + + + + + Indicates whether new tab item which allows creation of new tab when clicked is visible. When visible you need to handle CreateNewTab event and create your new tab in event handler. + + + + + Occurs before TabFormItem is detached and gives you opportunity to cancel the action or provide your own new TabParentForm and TabFormControl. + + + + + Occurs after TabFormItem has been detached and is added to the new form and tab control. + + + + + Defines delegate for the TabFormCloseTab event. + + + + + Defines delegate for the TabFormCloseTab event. + + + + + Allows to cancel the closing of the tab. + + + + + Reference to tab being closed. + + + + + Source of the event. + + + + + Defines delegate for the TabFormItemDetach event. + + + + + Defines delegate for the TabFormItemDetach event. + + + + + Gets or sets the reference to the form which will host newly detached TabFormItem and its panel, an instance of TabParentForm. You can provide your own instance of TabParentForm and TabControl to use instead of controls creating them. You must provide both TabParentForm and TabControl. Provide these in BeforeTabFormItemDetach event. + + + + + Gets or sets the reference to TabFormControl which will receive TabFormItem being dragged. If you provide your own TabParentForm and TabControl you must provide both. Provide these in BeforeTabFormItemDetach event. + + + + + Gets reference to the TabFormItem being detached. + + + + + Enables canceling of TabFormItem detachment from its parent. + + + + + Gets or sets Graphics object group is rendered on. + + + + + Gets or sets the reference to SwitchButtonItem being rendered. + + + + + Gets or sets the ItemPaintArgs reference. + + + + + Indicates whether to cancel system rendering of the item. + + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Raises CommandKeyDown event. + + Provides event arguments. + + + + Invalidates non-client area of the text box as response to the border changes. + + + + + Calculates and sets the text-box height based on font and style. This method is used internally and should not be used. + + + + + Returns the renderer control will be rendered with. + + The current renderer. + + + + Indicates whether property should be serialized by Windows Forms designer. + + + + + Resets the property to default value. + + + + + Invokes ButtonCustomClick event. + + + + + Invokes ButtonCustomClick2 event. + + + + + Returns the color scheme used by control. Color scheme for Office2007 style will be retrived from the current renderer instead of + local color scheme referenced by ColorScheme property. + + An instance of ColorScheme object. + + + + Occurs when ButtonCustom control is clicked. + + + + + Occurs when ButtonCustom2 control is clicked. + + + + + Indicates whether internal override for IsInputKey returns true for the Enter key. + + + + + Indicates whether all text is auto-selected when control gets input focus. Default value is false. + + + + + Gets or sets whether control prevents Beep sound when Enter key is pressed. + + + + + Gets or sets whether FocusHighlightColor is used as background color to highlight text box when it has input focus. Default value is false. + + + + + Gets or sets the color used as background color to highlight text box when it has input focus and focus highlight is enabled. + + + + + Occurs during preprocessing to handle command keys. Command keys are keys that always take precedence over regular input keys. Examples of command keys include accelerators and menu shortcuts. Set Handled=true to indicate that you handled the key and that it should not be passed for further processing. + + + + + Gets or sets the scrollbar skinning type when control is using Office 2007 style. + + + + + Specifies the control border style. Default value has Class property set so the system style for the control is used. + + + + + Gets or sets the rendering mode used by control. Default value is eRenderMode.Global which means that static GlobalManager.Renderer is used. If set to Custom then Renderer property must + also be set to the custom renderer that will be used. + + + + + Gets or sets the custom renderer used by the items on this control. RenderMode property must also be set to eRenderMode.Custom in order renderer + specified here to be used. + + + + + Gets or sets whether watermark text is displayed when control is empty. Default value is true. + + + + + Gets or sets the watermark image displayed inside of the control when Text is not set and control does not have input focus. + + + + + Gets or sets the watermark image alignment. + + + + + Gets or sets the watermark (tip) text displayed inside of the control when Text is not set and control does not have input focus. This property supports text-markup. + + + + + Gets or sets the watermark font. + + + + + Gets or sets the watermark text color. + + + + + Gets or sets the watermark hiding behaviour. Default value indicates that watermark is hidden when control receives input focus. + + + + + Gets the object that describes the settings for the custom button that can execute an custom action of your choosing when clicked. + + + + + Gets the object that describes the settings for the custom button that can execute an custom action of your choosing when clicked. + + + + + Specifies back color when Enabled=false + + + + + Represents the Vertical Office 2007 Style Scroll Bar control. + + + + + Gets or sets whether custom styling (Office 2007 style) is enabled. Default value is true. + + + + + Class represents single token in TokenEditor control. + + + + + Initializes a new instance of the EditToken class. + + Indicates token value. + + + + Initializes a new instance of the EditToken class. + + Indicates token value + Indicates token text + + + + Initializes a new instance of the EditToken class. + + Indicates token value + Indicates token text + Indicates token image + + + + Called when Value property has changed. + + Old property value + New property value + + + + Called when Text property has changed. + + Old property value + New property value + + + + Called when Image property has changed. + + Old property value + New property value + + + + Called when Symbol property has changed. + + Old property value + New property value + + + + Called when SymbolSet property value changes. + + Indciates old value + Indicates new value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when Tooltip property has changed. + + Old property value + New property value + + + + Called when MouseOverPart property has changed. + + Old property value + New property value + + + + Indicates the token value, for example an email token has email address as token Value and full name as token Text. + + + + + Indicates the token text, for example an email token has email address as token Value and full name as token Text. + + + + + Gets or sets custom data associated with the object. + + + + + Gets the display bounds of the token, if displayed, inside of TokenEditor control. + + + + + Indicates the image that is displayed next to the token + + + + + Gets the realized symbol string. + + + + + Indicates the symbol displayed on face of the token instead of the image. Setting the symbol overrides the image setting. + + + + + Gets or sets the symbol set used to represent the Symbol. + + + + + Gets or sets the color of the Symbol. + + + + + Indicates tooltip that is displayed when mouse is over the token and token is selected. + + + + + Gets the part of the token mouse is over. Valid only when token is selected. + + + + + Gets the bounds of the remove button if displayed. Valid only when token is selected. + + + + + Gets the bounds of the image if displayed. Valid only when token is selected. + + + + + Indicates whether token is selected. + + + + + Indicates whether token is focused while selected. + + + + + Defines the token parts. + + + + + Identifies no token part. + + + + + Identifies the token body/text. + + + + + Identifies the remove token button. + + + + + Identifies the token image. + + + + + Initializes a new instance of the TokenEditor class. + + + + + Returns the color scheme used by control. Color scheme for Office2007 style will be retrieved from the current renderer instead of + local color scheme referenced by ColorScheme property. + + An instance of ColorScheme object. + + + + Resets style to default value. Used by windows forms designer. + + + + + Raises SelectedTokensChanged event. + + Provides event arguments. + + + + Called when RemoveTokenButtonVisible property has changed. + + Old property value + New property value + + + + Returns the token from SelectedTokens at specified position or null/nothing if no token is at given location. + + Location in client coordinates to test. + EditToken instance or null/nothing + + + + Raises TokenMouseEnter event. + + Provides event arguments. + + + + Raises TokenMouseLeave event. + + Provides event arguments. + + + + Raises TokenMouseClick event. + + Provides event arguments. + + + + Raises TokenMouseClick event. + + Provides event arguments. + + + + Raises TokenMouseHover event. + + Provides event arguments. + + + + Raises RemovingToken event. + + Provides event arguments. + + + + Called when ReadOnly property has changed. + + Old property value + New property value + + + + Called when DropDownHeight property has changed. + + Old property value + New property value + + + + Called when DropDownWidth property has changed. + + Old property value + New property value + + + + Raises AutoCompletePopupOpened event. + + Provides event arguments. + + + + Raises BeforeAutoCompletePopupOpen event. + + Provides event arguments. + + + + Raises BeforePopupOpen event. + + Provides event arguments. + + + + Raises ValidateToken event. + + Provides event arguments. + + + + Indicates whether property should be serialized by Windows Forms designer. + + + + + Resets the property to default value. + + + + + Called when TextSeparator property has changed. + + Old property value + New property value + + + + Called when DropDownButtonVisible property has changed. + + Old property value + New property value + + + + Called when CheckBoxesVisible property has changed. + + Old property value + New property value + + + + Shows tooltip for this item. + + + + + Destroys tooltip window. + + + + + Gets or sets the location of the auto-scroll position. + + + + + Specifies the background style of the control. + + + + + Gets the collection of the selected tokens. + + + + + Occurs when SelectedTokens collection changes. + + + + + Gets the collection of the tokens available for selection. + + + + + Indicates whether remove token button is displayed on individual tokens so they can be removed from the selection. + + + + + Occurs when mouse enters one of the SelectedTokens token. + + + + + Occurs when mouse leaves one of the SelectedTokens token. + + + + + Occurs when mouse clicks one of the SelectedTokens token. + + + + + Occurs when mouse double clicks one of the SelectedTokens token. + + + + + Occurs when mouse hovers one of the SelectedTokens token. + + + + + Occurs before token is removed from the SelectedTokens by end user. + + + + + Indicates whether tokens can be added or removed by end user. Default value is false. + + + + + Indicates the height of the auto-complete drop-down. + + + + + Indicates the width of the auto-complete drop-down. + + + + + Indicates whether when token text is entered into the text-box pressing the Enter key attempts to validate the token and converts the text to token. + + + + + Occurs before token auto-complete popup is displayed and allows cancelation of popup display. + + + + + Occurs after auto-complete popup is open. + + + + + Occurs before the auto-complete popup is displayed and allows you to adjust popup location. + + + + + Indicates how tokens are filtered based on the entered text + + + + + Indicates whether auto-complete popup size is preserved between popup displays if popup is resized by end-user. + + + + + Indicates whether auto-complete popup can be resized by end user. + + + + + Indicates whether multi-column popup close button is visible. + + + + + Gets or sets whether auto-complete popup window is open. + + + + + Gets the list of separators which are used to divide entered text into the tokens. + + + + + Occurs when an token is selected from the auto-complete list or when text entry by end user is parsed into token to validate it. + + + + + Indicates whether control automatically increases its height as more tokens are selected. MaxHeightLines property controls the maximum number of lines control will grow to before showing scroll-bar. + + + + + Indicates maximum number of lines control will grow to when AutoSizeHeight=true. Set to 0 to indicates unlimited growth. + Default value is 5. + + + + + Gets reference to internal text-box control that is used to input the token text. + + + + + Indicates whether any text entered into the token editor is validated and converted to token when control loses focus. + + + + + Gets or sets whether watermark text is displayed when control is empty. Default value is true. + + + + + Gets or sets the watermark image displayed inside of the control when Text is not set and control does not have input focus. + + + + + Gets or sets the watermark image alignment. + + + + + Gets or sets the watermark (tip) text displayed inside of the control when Text is not set and control does not have input focus. This property supports text-markup. + + + + + Gets or sets the watermark font. + + + + + Gets or sets the watermark text color. + + + + + Gets or sets the watermark hiding behaviour. Default value indicates that watermark is hidden when control receives input focus. + + + + + Indicates the character separator that is used to separate tokens when controls Text property is updated or parsed. + + + + + Indicates whether drop-down button which shows available token popup is displayed + + + + + Indicates whether check-boxes are displayed on popup token selection list and used for token selection. + + + + + Occurs when item's tooltip visibility has changed. + + + + + Gets or sets whether tooltips are shown when mouse is over the selected token when Tooltip property is set. + + + + + Delegate for the ValidateTokenEvent event. + + + + + Arguments for the ValidateTokenEvent event. + + + + + Indicates whether validated token is valid. Default value is true. When you set this property to false the token being validated will be discared. + + + + + Indicates the Token that will be accepted by the control if IsValid=true. + + + + + Indicates whether token is newly created. When false it means that token was taken from Tokens collection. + + + + + Initializes a new instance of the ValidateTokenEventArgs class. + + + + + + Delegate for RemovingToken event. + + + + + Defines event arguments for RemovingToken event. + + + + + Indicates the Token that will be removed. + + + + + Set to true to cancel removal of the token. + + + + + Indicates the source of the event. + + + + + Initializes a new instance of the RemovingTokenEventArgs class. + + + + + + Specifies the filter behavior on token editor popup list. + + + + + Token text is searched for the match. + + + + + Token value is searched for the match. + + + + + Both token text and value are searched for the match. + + + + + Delegate for TokenEditor.BeforePopupOpen event. + + + + + Defines event arguments for BeforePopupOpen event. + + + + + Gets or sets the screen location of the popup in relation to the TokenEditor control. + + + + + Gets the suggested popup size. + + + + + Initializes a new instance of the TokenEditorPopupEventArgs class. + + + + + + Represents the color table for TokenEditor control tokens. + + + + + Initializes a new instance of the TokenEditorColorTable class. + + + + + Initializes a new instance of the TokenEditorColorTable class. + + + + + Initializes a new instance of the TokenEditorColorTable class. + + + + + Gets or sets token default state colors. + + + + + Gets or sets token mouse over state colors. + + + + + Gets or sets token focused state colors. + + + + + Represents the state color table for token in TokenEditor control. + + + + + Initializes a new instance of the TokenColorTable class. + + + + + Initializes a new instance of the TokenColorTable class. + + + + + + + Initializes a new instance of the TokenColorTable class. + + + + + + + Gets or sets token text color. + + + + + Gets or sets the background color table. + + + + + Represents Toolbox control to create. + + + + + Disables any redrawing of the tree control. To maintain performance while items + are added one at a time to the control, call the BeginUpdate method. The BeginUpdate + method prevents the control from painting until the + EndUpdate method is called. + + + + + Enables the redrawing of the tree view. To maintain performance while items are + added one at a time to the control, call the BeginUpdate + method. The BeginUpdate method prevents the control from painting until the EndUpdate + method is called. + + + Call to EndUpdate will enable the layout and painting in tree control. If there + are any pending layouts the EndUpdate will call + RecalcLayout method to perform the layout and it will + repaint the control. + + + + + Enables the redrawing of the tree view. To maintain performance while items are + added one at a time to the control, call the BeginUpdate + method. The BeginUpdate method prevents the control from painting until the EndUpdate + method is called. + + Gets or sets whether layout and refresh of control is performed if there are no other update blocks pending. + + + + Returns collection of toolbox control groups, collection of ToolboxGroup items. + + + + + Raises ExpandedChanged event. + + Provides event arguments. + + + + Raises RemovingToken event. + + Provides source of the event. + Provides event arguments. + + + + Selects or deselects an item. + + Item to select or deselect. + Selection state. + + + + Raises RemovingToken event. + + Provides event arguments. + + + + Filters control toolbox items based on specified text. To clear last search and show all items pass string.empty or null/nothing as search text. + + Text to search for + + + + Resets style to default value. Used by windows forms designer. + + + + + Raises BeforeItemDrag event. + + Item being dragged. + Provides event arguments. + + + + Gets the Bar control used as menu bar. + + + + + Indicates the search-box watermark text. + + + + + Returns reference to internal search text-box. + + + + + Indicates the title label text. + + + + + Gets the Bar control used as title bar. + + + + + Gets whether layout is suspended for tree control. Layout is suspended after + call to BeginUpdate method and it is resumed after the + call to EndUpdate method. + + + + + Returns reference to internal item panel used to display the toolbox items and groups. + + + + + Gets the list of items displayed in list box. + + + + + Indicates whether single group only is expanded at a time. When new group is expanded currently expanded group is collapsed. + + + + + Occurs after Expanded property value has changed + + + + + Gets or sets whether control is expanded and shows items in full size with image and text. When collapsed + control will show only images for toolbox items and will hide other UI elements to minimize its size. + + + + + Indicates the collapsed toolbox separator color, the line drawn between the toolbox and menu/expand buttons above. + + + + + Gets or sets the expanded width of the control. This property value is valid after control has been collapsed. + + + + + Occurs after toolbox group is expanded + + + + + Indicates toolbox item selection mode. + + + + + Occurs after selected item has changed. + + + + + Gets a collection containing the currently selected items in the ToolboxControl. Do not modify items in this collection. To select or deselect list items while in multi-selection mode use SetSelected method. + + + + + Gets or sets selected item in toolbox control. + + + + + Indicates whether title bar of the control is visible, default value is true. + + + + + Indicates whether menu bar of the control is visible, default value is true. + + + + + Gets or set whether search text-box which allows searching for the toolbox items is visible. Default value is true. + + + + + Indicates whether search text when entered is split into separate words and items returned that match any of the words entered. + + + + + Gets whether control is performing search operation. + + + + + Specifies the background style of the control. + + + + + + Indicates whether item drag and drop is enabled. Default value is true. + + + + + + Defines selection modes for toolbox control items. + + + + + No item selection is allowed. + + + + + Only single item can be selected. + + + + + Multiple items can be selected. + + + + + Represents a group in ToolboxControl + + + + + Represents item container that arranges items horizontally or vertically. + + + + + Creates new instance of the ItemContainer object. + + + + + Must be overridden by class that is inheriting to provide the painting for the item. + + + + + Returns empty container default design-time size. + + Size of an empty container. + + + + Gets whether FixedSize property should be serialized. + + + + + Resets the property to default value. + + + + + Called when FixedSize property has changed. + + Old property value + New property value + + + + Recalculates the size of the container. Assumes that DisplayRectangle.Location is set to the upper left location of this container. + + + + + Occurs when the mouse pointer is over the item and a mouse button is pressed. This is used by internal implementation only. + + + + + Return Sub Item at specified location + + + + + Called after TopInternal property has changed + + + + + Called after LeftInternal property has changed + + + + + Returns copy of the item. + + + + + Copies the ButtonItem specific properties to new instance of the item. + + New ButtonItem instance. + + + + Occurs when sub item expanded state has changed. + + Sub item affected. + + + + Called when item Display state has changed. + + + + + Sets whether container is used as system container internally by DotNetBar. + + true or false to indicate whether container is system container or not. + + + + Called when TitleVisible property has changed. + + Old property value + New property value + + + + Called when TitleText property has changed. + + Old property value + New property value + + + + Called when TitlePosition property has changed. + + Old property value + New property value + + + + Selects first visible item contained by the container by sending mouse over message. + + + + + Sets the new hot-sub item for the container. This method is designed for internal use by the DotNetBar and should not be used. + + Reference to an instance of BaseItem or null. + + + + Gets or sets the minimum size of the container. Either Width or Height can be set or both. Default value is 0,0 which means + that size is automatically calculated. + + + + + Specifies the container background style. Default value is an empty style which means that container does not display any background. + BeginGroup property set to true will override this style on some styles. + + + + + Gets or sets the item alignment when container is in horizontal layout. Default value is Left. + + + + + Gets or sets the item vertical alignment. Default value is Top. + + + + + Gets or sets whether items in horizontal layout are wrapped into the new line when they cannot fit allotted container size. Default value is false. + + + + + Gets whether container supports expanding of its content. Provided for system use. + + + + + Gets or sets spacing in pixels between items. Default value is 0. + + + + + Gets whether mouse is over the title if title is visible. + + + + + Gets the title rectangle if title is visible. + + + + + Gets or sets the suggested fixed size of the container. Width or Height or Both may be set to suggest fixed size for the container. + + + + + Indicates whether title if sets always fills up the total width of the container. Defaul value is false. + + + + + Gets or sets orientation inside the container. Do not change the value of this property. It is managed by system only. + + + + + Gets or sets orientation inside the container. + + + + + Gets or sets whether items contained by container are resized to fit the container bounds. When container is in horizontal + layout mode then all items will have the same height. When container is in vertical layout mode then all items + will have the same width. Default value is true. + + + + + IBlock member implementation + + + + + Gets or sets a value indicating whether the item is expanded or not. For Popup items this would indicate whether the item is popped up or not. + + + + + Returns whether instance of the item container is used as system container internally by DotNetBar. + + + + + Gets or sets the accessible role of the item. + + + + + Indicates whether block elements inside of container when aligned center or right will reserve the space to the left. Default value is true. + + + + + Gets or sets whether all items are equally sized based on the size of the largest item in the list. + + + + + Specifies the title background style. + + + + + Specifies the title mouse over background style. + + + + + Indicates whether TitleText is visible if set. Default value is true. + + + + + Gets or sets the title text for the container. + + + + + Gets or sets position of title text. + + + + + Gets or sets the Key Tips access key or keys for the item when on Ribbon Control or Ribbon Bar. Use KeyTips property + when you want to assign the one or more letters to be used to access an item. For example assigning the FN to KeyTips property + will require the user to press F then N keys to select an item. Pressing the F letter will show only keytips for the items that start with letter F. + + + + + Indicates whether the item will auto-collapse (fold) when clicked. + When item is on popup menu and this property is set to false, menu will not + close when item is clicked. + + + + + Gets or sets whether item can be customized by end user. + + + + + Returns category for this item. If item cannot be customzied using the + customize dialog category is empty string. + + + + + Gets or sets whether Click event will be auto repeated when mouse button is kept pressed over the item. + + + + + Gets or sets the auto-repeat interval for the click event when mouse button is kept pressed over the item. + + + + + Specifes the mouse cursor displayed when mouse is over the item. + + + + + Gets or sets item description. This description is displayed in + Customize dialog to describe the item function in an application. + + + + + Gets or sets a value indicating whether the item is enabled. + + + + + Gets or sets whether item is global or not. + This flag is used to propagate property changes to all items with the same name. + Setting for example Visible property on the item that has GlobalItem set to true will + set visible property to the same value on all items with the same name. + + + + + Gets or sets item alignment inside the container. + + + + + Gets or sets the collection of shortcut keys associated with the item. + + + + + Gets or sets whether item will display sub items. + + + + + Gets or sets whether the item expands automatically to fill out the remaining space inside the container. Applies to Items on stretchable, no-wrap Bars only. + + + + + Specifies whether item is drawn using Themes when running on OS that supports themes like Windows XP. + + + + + Gets/Sets informational text (tooltip) for the item. + + + + + Indicates whether container responds to keyboard presses and changes the active/mouse over item. + + + + + Creates new instance of the ItemContainer object. + + + + + Creates new instance of the ItemContainer object. + + + + + Returns copy of the item. + + + + + Copies the ButtonItem specific properties to new instance of the item. + + New ButtonItem instance. + + + + Copies the ButtonItem specific properties to new instance of the item. + + New ButtonItem instance. + + + + Occurs when Expanded state changes. If overridden base implementation must be called so default processing can occur. + + + + + Returns reference to the parent ToolboxControl. + + + + + + Specifies the title background style when toolbox group is expanded. + + + + + Indicates whether items in vertical layout orientation with MultiLine=false are stretched to fill group width. Default value is true. + + + + + Gets or sets a value indicating whether the item is expanded or not. For Popup items this would indicate whether the item is popped up or not. + + + + + Gets or sets whether items in horizontal layout are wrapped into the new line when they cannot fit allotted container size. Default value is false. + + + + + Gets or sets whether items contained by container are resized to fit the container bounds. When container is in horizontal + layout mode then all items will have the same height. When container is in vertical layout mode then all items + will have the same width. Default value is true. + + + + + Gets or sets whether all items are equally sized based on the size of the largest item in the list. + + + + + Returns copy of the item. + + + + + Copies the ButtonItem specific properties to new instance of the item. + + New ButtonItem instance. + + + + Returns reference to parent ToolboxControl, if group is parented to it. + + reference to ToolboxControl or null + + + + Represents non-intrusive Warning Box control with Options and Close button. + + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Raises the CloseClick event. + + Event arguments. + + + + Raises the OptionsClick event. + + Event arguments. + + + + Updates control color scheme based on currently selected Office 2007 Color Table. Usually it is not necessary to + call this method manually. You need to call it to update the colors on control if you customize the Office2007ColorTable.WarningBox values. + + + + + Invokes the MarkupLinkClick event. + + Provides additional data about event. + + + + Called when AntiAlias property has changed. + + Old property value + New property value + + + + Required designer variable. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Occurs when Close button is clicked. + + + + + Occurs when Options button is clicked. + + + + + Occurs when warning text markup link is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + Gets or sets the text displayed on close button tooltip. + + + + + Gets or sets the text displayed on warning control label. Supports text-markup. + + + + + Gets or sets whether text is wrapped on multiple lines if it cannot fit the space allocated to the control. + + + + + Gets or sets the image displayed next to the warning label text. Default value is null. + + + + + Gets or sets the text for the Options buttons. + + + + + Gets or sets whether Options button is visible. Default value is true. + + + + + Gets or sets whether Close button is visible. Default value is true. + + + + + Gets or sets the timeout in seconds after which the control automatically closes itself. Default value is 0 which indicates that auto-close + is disabled. + + + + + Gets or sets the control's color scheme. + + + + + Gets or sets whether anti-alias smoothing is used while painting. Default value is true. + + + + + Defines available WarningBox control color schemes. + + + + + Represents compact tree bread-crumb control. + + + + + Initializes a new instance of the CrumbBar class. + + + + + Finds CrumbBarItem with specified name. + + Name of item to look for + Item or null if no item was found. + + + + Sets the currently selected item in the control. + + Reference to selected item. + Source of the event. + + + + Shows the selected item popup menu if it has menu items. + + true if popup was shown otherwise false + + + + Gets whether an item is in selected path to the currently selected item as either one of the parents of selected item + or selected item itself. + + Item to test. + true if item is in selected path otherwise false. + + + + Returns the renderer control will be rendered with. + + The current renderer. + + + + Raises the SelectedItemChanging event. + + Provides event arguments. + + + + Raises the SelectedItemChanged event. + + Provides event arguments. + + + + Returns full path to the given node. + + Node to return path to. + Full path to the node. + + + + Occurs before SelectedItem has changed and provides opportunity to cancel the change. Set Cancel property on event arguments to true to cancel the change. + + + + + Occurs after SelectedItem has changed. The change of the selected item at this point cannot be canceled. For that use SelectedItemChanging event. + + + + + Gets or sets currently selected item. + + + + + Gets collection of items assigned to the control. + + + + + Gets or sets the visual style of the control. Default value is Windows Vista style. + + + + + Gets the color table used by the Vista style renderer. + + + + + Gets or sets a value indicating whether the control is automatically resized to display its entire contents. You can set MaximumSize.Width property to set the maximum width used by the control. + + + + + Gets or sets the delimiter string that the tree node path uses. + + + + + Defines delegate for CrumbBar selection events. + + + + + Provides data for CrumbBar selection events. + + + + + Gets or sets newly selected item. + + + + + Initializes a new instance of the CrumbBarSelectionEventArgs class. + + + + + + Represents an item for CrumbBar control. + + + + + Gets whether item is selected item in CrumbBar control. + + + + + Returns the collection of sub items. + + + + + Gets the path from the root tree node to the current tree node. The path consists of the labels of all the tree nodes that must be navigated to get to this tree node, starting at the root tree node. The node labels are separated by the delimiter character specified in the PathSeparator property of the Tree control that contains this node. + + + + + Represents collection of CrumbBarItem buttons. + + + + + Initializes a new instance of the CrumbBarItemsCollection class. + + + + + + Sets the node collection belongs to. + + CrumbBarItem that is parent of this collection. + + + + Adds new object to the collection. + + Object to add. + Index of newly added object. + + + + Inserts new object into the collection. + + Position of the object. + Object to insert. + + + + Returns index of the object inside of the collection. + + Reference to the object. + Index of the object. + + + + Returns whether collection contains specified object. + + Object to look for. + true if object is part of the collection, otherwise false. + + + + Removes specified object from the collection. + + + + + + Copies collection into the specified array. + + Array to copy collection to. + Starting index. + + + + Copies contained items to the CrumbBarItem array. + + Array to copy to. + + + + Gets or sets the node this collection is associated with. + + + + + Returns reference to the object in collection based on it's index. + + + + + Returns reference to the object in collection based on it's name. + + + + + Represents a view of CrumbBarItem displayed inside of CrumbBar control. + + + + + Initializes a new instance of the CrumbBarItemView class. + + + + + Returns copy of ExplorerBarContainerItem item + + + + + Gets the item attached to the view. + + + + + Gets or sets a value indicating whether the item is expanded or not. For Popup items this would indicate whether the item is popped up or not. + + + + + Gets or sets color table used by renderer. + + + + + Creates new instance of BaseItem. + + + + + Creates new instance of BaseItem and assigns item name. + + Item name. + + + + Creates new instance of BaseItem and assigns item name and item text. + + Item Name + Item Text + + + + Returns copy of ExplorerBarContainerItem item + + + + + Represents internal CrumbBar view container. + + + + + Initializes a new instance of the CrumbBarViewContainer class. + + + + + Recalculates the size of the item + + + + + Paints this base container + + + + + Returns copy of ExplorerBarContainerItem item + + + + + Occurs when sub item expanded state has changed. + + Sub item affected. + + + + Gets or sets a value indicating whether the item is expanded or not. For Popup items this would indicate whether the item is popped up or not. + + + + + Represents collection for Node objects. + + + + Creates new instance of the object. + + + + Adds new object to the collection. + + Object to add. + Index of newly added object. + + + + Inserts new object into the collection. + + Position of the object. + Object to insert. + + + + Returns index of the object inside of the collection. + + Reference to the object. + Index of the object. + + + + Returns whether collection contains specified object. + + Object to look for. + true if object is part of the collection, otherwise false. + + + + Removes specified object from the collection. + + + + + + Copies collection into the specified array. + + Array to copy collection to. + Starting index. + + + + Copies contained items to the Node array. + + Array to copy to. + + + + Returns reference to the object in collection based on it's index. + + + + + Returns reference to the object in collection based on it's name. + + + + + Provides High DPI support for DotNetBar controls. + + + + + Indicates whether static scale factor is set when child controls get ScaleControl call. When set to false + this is done only from parent OfficeForm or RibbonForm. + + + + + Gets or sets whether scale factor when set is normalized so both Width and Height values are the same. Default value is false. + If using ScaleMode=font the scale factor might not be same for Width and Height so this allows opportunity to keep existing size ratios on the DotNetBar sized controls. + When set to true the scale factor Height will always be set to scale factor Width. + + + + + Indicates whether controls will automatically scale current images based on the current DPI. Depending on scaling this may result in pixalted images. + Best policy is to provide separate images for each DPI level Windows runs on and if you do that you need to set this property to false to disable + automatic size scaling for the images. Default value is true which causes the images to be upscaled. + + + + + Initializes a new instance of the DualButton class. + + + + + Called when ButtonSize property has changed. + + Old property value + New property value + + + + Called when Text2 property has changed. + + Old property value + New property value + + + + Called when MouseOverPart property has changed. + + Old property value + New property value + + + + Called when LeftMouseButtonDownPart property has changed. + + Old property value + New property value + + + + Called when Command property value changes. + + + + + Called when IsSelected property has changed. + + Old property value + New property value + + + + Called when Font property has changed. + + Old property value + New property value + + + + Gets or sets the second button part text. + + + + + Gets or sets the command assigned to the item. Default value is null. + Note that for ButtonItem instances if this property is set to null and command was assigned previously, Enabled property will be set to false automatically to disable the item. + + + + + Gets or sets user defined data value that can be passed to the command when it is executed. + + + + + Gets or sets the selected part of button. + + + + + Gets or sets the text font. + + + + + Standalone Calculator control. + + + + + Raises CalculatorDisplayChanged event. + + Provides event arguments. + + + + Invalidates control auto-size and resizes the control if AutoSize is set to true. + + + + + Called when FocusButtonsOnMouseDown property has changed. + + Old property value + New property value + + + + Called when DisplayVisible property has changed. + + Old property value + New property value + + + + Required designer variable. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Occurs when a calc button has been clicked + + + + + Occurs when the calculator value has changed + + + + + Indicates whether calculator displays only Integer values. + + + + + Gets or sets whether memory keys are visible. Default value is true. + + + + + Gets or sets visibility of the decimal calculator key. + + + + + Gets or sets a value indicating whether the control is automatically resized to display its entire contents. You can set MaximumSize.Width property to set the maximum width used by the control. + + + + + Gets or sets whether calculator display is visible. Default value is true. + + + + + ButtonClickEventArgs + + + + + ButtonClickEventArgs + + + + + Gets the calc button that was clicked + + + + + ValueChangedEventArgs + + + + + ValueChangedEventArgs + + + + + + + Gets the input string value + + + + + Gets or sets calculator value + + + + + Represents a control that enables the user to select time using visual time display. + + + + + Raises SelectedTimeChanged event. + + Provides event arguments. + + + + Raises OkClick event. + + Provides event arguments. + + + + Initializes a new instance of the MonthCalendarAdv class. + + + + + Returns whether property should be serialized. + + + + + Resets property to default value. + + + + + Invalidates control auto-size and resizes the control if AutoSize is set to true. + + + + + Occurs after SelectedTime changes. + + + + + Occurs when OK button is clicked. + + + + + Gets or sets the text displayed on OK button. + + + + + Gets or sets whether Ok button is visible. + + + + + Gets or sets the selected date time. + + + + + Gets or sets selected time. Returns TimeSpan.Zero if there is no time selected. + + + + + Gets or sets the time format used to present time by the selector. + + + + + Gets or sets the format for the 12 Hour Time Display. + + + + + Gets or sets the format for the 24 Hour Time Display. + + + + + Gets or sets a value indicating whether the control is automatically resized to display its entire contents. You can set MaximumSize.Width property to set the maximum width used by the control. + + + + + Indicates the type of the selector used to select time. + + + + + Gets or sets the text displayed on Clear button only when MonthCalendarStyle is used. + + + + + Gets or sets the text displayed on Hour label. + + + + + Gets or sets the text displayed on Minute label. + + + + + Represents the Time selector item. + + + + + Initializes a new instance of the TimeSelectionItem class. + + + + + Raises SelectedTimeChanged event. + + Provides event arguments. + + + + Raises OkClick event. + + Provides event arguments. + + + + Returns whether property should be serialized. + + + + + Resets property to default value. + + + + + Called when SelectedTime property has changed. + + Old property value + New property value + + + + Called when TimeFormat24H property has changed. + + Old property value + New property value + + + + Called when TimeFormat12H property has changed. + + Old property value + New property value + + + + Called when SelectedDateTime property has changed. + + Old property value + New property value + + + + Called when OkText property has changed. + + Old property value + New property value + + + + Called when ClearText property has changed. + + Old property value + New property value + + + + Called when TimeFormat property has changed. + + Old property value + New property value + + + + Called when OkButtonVisible property has changed. + + Old property value + New property value + + + + Called when ClearButtonVisible property has changed. + + Old property value + New property value + + + + Called when SelectorType property has changed. + + Old property value + New property value + + + + Called when HourText property has changed. + + Old property value + New property value + + + + Called when MinuteText property has changed. + + Old property value + New property value + + + + Occurs after SelectedTime changes. + + + + + Occurs when OK button is clicked. + + + + + Gets or sets selected time. Returns TimeSpan.Zero if there is no time selected. + + + + + Gets or sets the format for the 24 Hour Time Display. + + + + + Gets or sets the format for the 12 Hour Time Display. + + + + + Gets or sets the selected date time. + + + + + Gets or sets the text displayed on OK button. + + + + + Gets or sets the text displayed on Clear button only when MonthCalendarStyle is used. + + + + + Gets or sets the time format used to present time by the selector. + + + + + Gets or sets whether Ok button is visible. + + + + + Gets or sets whether Ok button is visible. + + + + + Indicates the type of the selector used to select time. + + + + + Gets or sets the text displayed on Hour label. + + + + + Gets or sets the text displayed on Minute label. + + + + + Defines time selector format. + + + + + Selector uses system format. + + + + + Selector uses 24-hour time format. + + + + + Selector uses 12-hour time format. + + + + + Defines the TimeSelector styles. + + + + + Time selector uses style similar to MonthCalendarStyle. + + + + + Time selector uses the touch style. + + + + + Represents the group of the input items with automatic and manual item focus change. + + + + + Raises the RenderInvalid event. + + + + + Raises the ArrangeInvalid event. + + + + + Raises the ResetMouseHover event. + + + + + Occurs when item arrange becomes invalid. + + + + + Occurs when item appearance becomes invalid and items needs to be repainted. + + + + + Occurs when item needs to signal to parent control that MouseHover needs to be reset usually in response to tooltip hiding. + + + + + Occurs when item is clicked. + + + + + Occurs when item is clicked using mouse. + + + + + Occurs when mouse button is pressed over the item. + + + + + Occurs when mouse button is pressed over the item. + + + + + Occurs when mouse hovers over the item. + + + + + Gets or sets whether item is Enabled. + + + + + Gets or sets whether visual is rendered. Default value is true. + + + + + Gets the parent of the item. + + + + + Gets the relative location of the element inside of its parent item. + + + + + Gets or sets the item horizontal alignment inside of the parent group. Default value is left. + + + + + Occurs when child item input is complete. Method should be used to forward the input focus onto the different field if desired. + + + + + Occurs when input stack on the child control has changed. + + Control on which input has changed + + + + Occurs when input stack on the child control has changed. + + Control on which input has changed + + + + Gets or sets the horizontal spacing in pixels between the items. + + + + + Gets or sets whether visual is root visual directly parented to the control. + + + + + Gets or sets group vertical alignment. Default value is middle. + + + + + Gets or sets input group horizontal alignment. Default value is left. + + + + + Resets the input position so the new input overwrites current value. + + + + + Updates the IsEmpty property value based on the contained input controls. + + + + + Gets or sets whether Tab key is used to navigate between the fields. Default value is true. + + + + + Gets or sets whether Enter key is used to navigate between input fields. Default value is true. + + + + + Gets or sets whether Arrow keys are used to navigate between input fields. Default value is true. + + + + + Gets or sets whether input focus is automatically advanced to next input field when input is complete in current one. + + + + + Gets or sets whether input items are read-only. + + + + + Gets or sets whether input group is empty i.e. it does not hold any value. + + + + + Gets or sets whether auto-overwrite functionality for input is enabled. When in auto-overwrite mode input field will erase existing entry + and start new one if typing is continued after InputComplete method is called. + + + + + Gets or sets whether current input is the user input. + + + + + List of characters that when pressed would select next input field. + + + + + Initializes a new instance of the IPAddressGroup class. + + + + + Describes the Elliptical Shape. + + + + + Returns the shape that fits given bounds. + + Bounds to fit shape in. + GraphicsPath representing shape or null if shape cannot be created. + + + + Returns the inner shape based on the specified border size. + + Bounds to fit shape in. + GraphicsPath representing shape or null if shape cannot be created. + + + + Returns whether shape can be drawn given the bounds. + + Bounds to test. + true if shape can be drawn inside of bounds otherwise false. + + + + Represents EllipticalShapeDescriptor object converter. + + + + + Initializes FormatHelper class. + + + + + Defines an interface that represents the Command associated with an BaseItem instance. + + + + + Executes the command without specifying the source of the command. + + + + + Executes the command and specifies the source of the command. + + + + + Called when CommandSource is registered for the command. + + CommandSource registered. + + + + Called when CommandSource is unregistered for the command. + + CommandSource unregistered. + + + + Sets an property value on the subscribers through the reflection. If subscriber does not have + specified property with value type its value is not set. + + Property name to set. + Property value. + + + + Executes the code associated with the command. + + + + + Provides the opportunity to cancel the execution of the command. This event occurs before the Executed event. + + + + + Gets or sets the text associated with the items that are using command. + + + + + Gets or sets the value of Checked property if item associated with the command support it. + + + + + Gets or sets the value of Visible property if item associated with the command support it. + + + + + Gets or sets the value of Image property if item associated with the command support it. + + + + + Gets or sets the value of small image (ImageSmall) property if item associated with the command support it. + + + + + Gets or sets the value of Enabled property for items associated with the command. + + + + + Defines an command that is associated with an instance of BaseItem + + + + + Initializes a new instance of the Command class with the specified container. + + An IContainer that represents the container for the command. + + + + Initializes a new instance of the Command class with the specified container. + + An IContainer that represents the container for the command. + + + + Initializes a new instance of the Command class with the specified execute event handler. + + + + + Initializes a new instance of the Command class. + + + + + Executes the command. + + + + + Executes the command. + + + + + Raises the Execute event. + + Provides event data. + + + + Raises the PreviewExecuted event. + + Provides event data. + + + + Called when Text property is set. + + + + + Sets the Text property on all subscribers to the command Text. + + + + + Sets an property value on the subscribers through the reflection. If subscriber does not have + specified property with value type its value is not set. + + Property name to set. + Property value. + + + + Gets whether property is set and whether it will be applied to items associated with the command. + + + + + + Resets the property to its default value and disables its propagation to items that are associated with command. + + + + + Gets whether property is set and whether it will be applied to items associated with the command. + + + + + + Resets the property to its default value and disables its propagation to items that are associated with command. + + + + + Gets whether property is set and whether it will be applied to items associated with the command. + + + + + + Resets the property to its default value and disables its propagation to items that are associated with command. + + + + + Gets whether property is set and whether it will be applied to items associated with the command. + + + + + + Resets the property to its default value and disables its propagation to items that are associated with command. + + + + + Gets whether property is set and whether it will be applied to items associated with the command. + + + + + + Resets the property to its default value and disables its propagation to items that are associated with command. + + + + + Gets whether property is set and whether it will be applied to items associated with the command. + + + + + + Resets the property to its default value and disables its propagation to items that are associated with command. + + + + + Called when CommandSource is registered for the command. + + CommandSource registered. + + + + Called when CommandSource is unregistered for the command. + + CommandSource unregistered. + + + + Executes the code associated with the command when an instance of BaseItem is clicked. + + + + + Occurs before the Executed event and allows you to cancel the firing of Executed event. + + + + + Gets or sets the Text that is assigned to all command sources that are using this command and have Text property. + + + + + Gets or sets the value for the Checked property that is assigned to the command subscribers using this command and have Checked property. + + + + + Gets whether the command is in process of syncing its state to all subscribers. + + + + + Gets or sets the value for the Visible property that is assigned to the command subscribers using this command and have Visible property. + + + + + Gets or sets the image that is assigned to the command subscribers using this command and have Image property. + + + + + Gets or sets the small image that is assigned to the command subscribers using this command and have ImageSmall property. + + + + + Gets or sets the value for Enabled property assigned to the command subscribers using this command and have Enabled property. + + + + + Returns name of the node that can be used to identify it from the code. + + + + + Defines an container where you can arrange child elements added to SubItems collection either horizontally or vertically, relative to each other using SetDock and GetDock methods. + + + + + Initializes a new instance of the ItemDockContainer class. + + + + + Returns copy of the item. + + + + + Copies the ButtonItem specific properties to new instance of the item. + + New ButtonItem instance. + + + + Copies the ButtonItem specific properties to new instance of the item. + + New ButtonItem instance. + + + + Recalculates the size of the container. Assumes that DisplayRectangle.Location is set to the upper left location of this container. + + + + + Called after TopInternal property has changed + + + + + Called after LeftInternal property has changed + + + + + Must be overridden by class that is inheriting to provide the painting for the item. + + + + + Retrieves the docking for specified item. + + + + + Sets the docking within container for specified item. + + Item to set docking for. + Docking value. + + + + Returns empty container default design-time size. + + Size of an empty container. + + + + Occurs when the mouse pointer is over the item and a mouse button is pressed. This is used by internal implementation only. + + + + + Return Sub Item at specified location + + + + + Gets or sets a value that indicates whether the last child element within a ItemDockContainer stretches to fill the remaining available space. + + + + + IBlock member implementation + + + + + Provides binding support for ItemPanel control. + + + + + Initializes a new instance of the ItemVisualGenerator class. + + + + + + Called when Bindings property has changed. + + Old property value + New property value + + + + Called when VisualTemplate property has changed. + + Old property value + New property value + + + + When overridden in a derived class, sets the specified array of objects in a collection in the derived class. + + An array of items. + + + + Creates a new item from template for the data. + + Data to create item for. + New instance of the BaseItem. + + + + When overridden in a derived class, sets the object with the specified index in the derived class. + + The array index of the object. + The object. + + + + When overridden in a derived class, resynchronizes the item data with the contents of the data source. + + + + + Gets or sets the data source for the ComboTree. Expected is an object that implements the IList or IListSource interfaces, + such as a DataSet or an Array. The default is null. + + + + + Gets or sets the visual template that is generated for each data item. + + + + + + Defines delegate for data visual creation based events. + + + + + Defines event arguments for data visual creation based events. + + + + + Gets or sets the visual that is created for data item. + + + + + Gets the data-item node is being created for. + + + + + Initializes a new instance of the DataNodeEventArgs class. + + + + + + + Defines BorderColors structure used to define border colors. + + + + + Creates new instance of the object. + + Uniform BorderColors + + + + Creates new instance of the object. + + Left BorderColors + Top BorderColors + Right BorderColors + Bottom BorderColors + + + + Gets whether object equals to this instance. + + object to test. + returns whether objects are Equals + + + + Gets whether object equals to this instance. + + object to test. + returns whether objects are Equals + + + + Returns hash code for object. + + Hash code + + + + Returns string representation of object. + + string representing BorderColors + + + + Gets string representation of object. + + Culture info. + string representing BorderColors + + + + Returns whether all values are empty. + + + + + Returns whether all values are the same. + + + + + Gets or sets the left BorderColors. + + + + + Gets or sets the top BorderColors. + + + + + Gets or sets the Right BorderColors. + + + + + Gets or sets the Bottom BorderColors. + + + + + Provides BorderColors TypeConverter. + + + + + Gets or sets the background color. + + + + + Gets or sets the canvas light shade color. This property is not directly used but it is provided for reference. + + + + + Gets or sets the canvas lighter shade color. This property is not directly used but it is provided for reference. + + + + + Gets or sets the foreground color. + + + + + Gets or sets the base metro color. + + + + + Gets or sets background color of edit controls. + + + + + Gets or sets the color table for MetroAppForm. + + + + + Gets or sets the color table for MetroForm. + + + + + Gets or sets the color table for MetroTab. + + + + + Gets or sets color table for MetroStatusBar. + + + + + Gets or sets color table for MetroToolbar. + + + + + Gets or sets the color table used by MetroTile items. + + + + + Gets or sets the metro-part colors that define the metro UI color scheme. These colors are provided for you reference and reuse in your app. + + + + + Represents class that defines parameters for Metro style color scheme. + + + + + Initializes a new instance of the MetroStyleParameters class. + + Canvas color. + Base color. + + + + Initializes a new instance of the MetroColorGeneratorParameters structure. + + Canvas color. + Base color. + User friendly theme name. + + + + Returns array of all predefined Metro color themes. + + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets or sets the color of the Metro canvas. + + + + + Gets or sets the base color for the Metro style. + + + + + Gets or sets the user friendly theme name. + + + + + Initializes the Metro UI color table based on colors specified. + + + + + Defines base set of Metro UI color scheme. + + + + + Gets or sets the base canvas color, like form background. + + + + + Gets or sets the chrome base color, used for window border, selection marking etc. + + + + + Gets or sets the text color for text displayed over the BaseColor. + + + + + Gets or sets the text color displayed over the canvas color. + + + + + Gets or sets the lighter text color used for example for inactive non selected tab text etc. + + + + + Gets or sets the text color used for disabled text. + + + + + Gets or sets the text light color. + + + + + Gets or sets the color that lighter than canvas color unless canvas is white in which case this will be white as well. + + + + + Gets or sets the color that is in dark shade off of the canvas color. + + + + + Gets or sets the color that is in darker shade off of the canvas color. + + + + + Gets or sets the color that is in light shade off of the canvas color. + + + + + Gets or sets the color that is in lighter shade off of the canvas color. + + + + + Gets or sets the light base color shade. + + + + + Gets or sets the just a tad lighter base color. + + + + + Gets or sets the text color for light base color. + + + + + Gets or sets the lighter base color shade. + + + + + Gets or sets the lightest base color shade. + + + + + Gets or sets the dark base color shade. + + + + + Gets or sets the darker base color shade. + + + + + Gets or sets the base color analogous color 1 + + + + + Gets or sets the Analogous color light variant. + + + + + Gets or sets the text color for Analogous color light variant. + + + + + Gets or sets the Analogous color dark variant. + + + + + Gets or sets the Analogous color darker variant. + + + + + Gets or sets the Analogous color text color. + + + + + Gets or sets the off base color button gradient start. + + + + + Gets or sets the off base color button gradient start. + + + + + Gets or sets background color of edit controls. + + + + + Represents the MetroAppForm color table. + + + + + Gets or sets the border thickness. + + + + + Gets or sets the border thickness for form when it is running on Windows without Glass effect enabled. + + + + + Gets or sets the border colors. + + + + + Gets or sets the inactive form border colors. + + + + + Represents the MetroForm color table. + + + + + Gets or sets the border thickness. + + + + + Gets or sets the border thickness for form when it is running on Windows without Glass effect enabled. + + + + + Gets or sets the border colors. + + + + + Gets or sets the inactive form border colors. + + + + + Gets or sets the color array for the top-border lines. + + + + + Gets or sets the color array for the bottom-border lines. + + + + + Gets or sets status bar background style. + + + + + Gets or sets the resize handle marker light color. + + + + + Gets or sets the resize handle marker color. + + + + + Gets or sets the color table for MetroTabStrip. + + + + + Gets or sets tab panel background style. + + + + + Gets or sets the color table for MetroTabItem. + + + + + Gets or sets the color of the active form caption text displayed on metro strip. + + + + + Gets or sets the color of the inactive form caption text displayed on metro strip. + + + + + Gets or sets the text formatting for caption text. + + + + + Represents MetroTabItem color table. + + + + + Gets or sets the default state tab colors. + + + + + Gets or sets the mouse over state tab colors. + + + + + Gets or sets the selected state tab colors. + + + + + Gets or sets the pressed state tab colors. + + + + + Gets or sets the disabled state tab colors. + + + + + Initializes a new instance of the MetroTabItemStateColorTable class. + + + + + + + Gets or sets the background style. + + + + + Gets or sets tabstrip background style. + + + + + Gets or sets the tile check-mark background overlay color. + + + + + Gets or sets the tile check-mark foreground overlay color. + + + + + Gets or sets toolbar background style. + + + + + Initializes the Visual Studio 2012 color scheme Metro color table based on colors specified. + + + + + Gets or sets color hue. Hue is value from 0-1 which determines the degree on color wheel color is on, i.e. 0.5 = 180 degrees + + + + + Gets or sets the color saturation from 0-1, i.e. 0-100%. + + + + + Gets or sets the amount of white and black in color. + + + + + Initializes a new instance of the HSVColor structure. + + + + + + + + Gets whether values are close. + + First value. + Second value + true if values are close enough + + + + Gets whether value is zero + + value to check + true if value is considered zero + + + + Gets whether value is not an number. + + value to test + true if value is not an number + + + + Represents the Metro application button used on MetroTab control. + + + + + Initializes a new instance of the MetroAppButton class. + + + + + Processes the Escape key when Application Button is hosting the backstage tab and uses it to close the tab if open. + This method is called from ProcessDialogKey method of MetroForm. + + Key data + true if key was used to close backstage tab + + + + Gets or sets a value indicating whether the item is expanded or not. For Popup items this would indicate whether the item is popped up or not. + + + + + Gets or sets whether control set on BackstageTab property is used on application menu popup. + + + + + Gets or sets the backstage tab that is displayed instead of popup menu. + + + + + Raises PrepareModalPanelBounds event. + + Provides event arguments. + + + + Initializes a new instance of the MetroForm class. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Shows the panel control in the center of the form and covers all non system controls making the panel effectively modal. + + Control to show. + + + + Shows the panel control in the center of the form by sliding it in from specified side and covers all non system controls making the panel effectively modal. + + Panel to show. + Side to slide panel into the view from. + + + + Shows the panel control in the center of the form by sliding it in from specified side and covers all non system controls making the panel effectively modal. + + Panel to show. + Side to slide panel into the view from. + Slide animation speed in milliseconds. + + + + Hides the panel control that was previously shown using ShowModalPanel method. + + Control to hide. + + + + Hides the panel control that was previously shown using ShowModalPanel method by sliding it out of the view to the specified side. + + Control to hide. + Side to slide control into. + + + + Gets effective Border Thickness for the form. + + Thickness + + + + Called when BorderThickness property has changed. + + Old property value + New property value + + + + Called when BorderColor property has changed. + + Old property value + New property value + + + + Called when WM_NCHITTEST message is received. + + Reference to message data. + Return true to call base form implementation otherwise return false. + + + + Called when WM_DWMCOMPOSITIONCHANGED message is received. + + Reference to message data. + Return true to call base form implementation otherwise return false. + + + + Called when WM_NCACTIVATE message is received. + + Reference to message data. + Return true to call base form implementation otherwise return false. + + + + Called when WM_NCCALCSIZE message is received. + + Message structure. + true to call base WndProc otherwise false. + + + + Occurs before modal panel is shown and allows change of modal panel bounds. + + + + + Gets or sets whether MetroShell is pre-rendered when form is shown to make first rendering smoother. Default value is true. + + + + + Gets whether at least one modal panel is displayed. + + + + + Indicates whether modal panel when displayed shows MetroStatusBar. + + + + + Returns whether Windows Glass effects are enabled. + + + + + Gets or sets the MetroTab that is hosted by this form. This property is for internal use only. + + + + + Gets or sets whether form can be resized. + + + + + Gets or sets the form border thickness. Default value is empty thickness which indicates that thickness is taken from MetroFormColorTable. + + + + + Gets or sets the form border colors. + + + + + Gets whether form is active. + + + + + Indicates the number of pixels subtracted from form's height or width (depending on taskbar position) when form is maximized and taskbar is in auto-hide state. Default value is 4. + + + + + This property is not to be used with MetroForm. + + + + + Gets or sets the size of the border on the edges of the form that when mouse is over allow for form resizing. + + + + + Indicates whether Close button in top-right corner of the form is visible. + + + + + This property cannot be used on MetroAppForm + + + + + This property cannot be used on MetroAppForm + + + + + This property cannot be used on MetroAppForm + + + + + This property cannot be used on MetroAppForm + + + + + Gets or sets text for form system menu Restore item. + + + + + Gets or sets text for form system menu Move item. + + + + + Gets or sets text for form system menu Size item. + + + + + Gets or sets text for form system menu Minimize item. + + + + + Gets or sets text for form system menu Maximize item. + + + + + Gets or sets text for form system menu Close item. + + + + + Initializes a new instance of the BorderOverlay class. + + + + + Delegate for PrepareModalPanelBounds event. + + + + + + + Provides data for PrepareModalPanelBounds event. + + + + + Gets or sets the bounds modal panel will occupy when shown. + + + + + Initializes a new instance of the ModalPanelBoundsEventArgs class. + + + + + + Required designer variable. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Gets or sets whether divider panel that divides message box buttons and text content is visible. Default value is true. + + + + + Gets or sets whether Text supports and renders text markup. Default value is true. + + + + + Gets or sets the anti-alias setting for text-pane. + + + + + Enumeration of available common system strings. + + + + + Required designer variable. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Loads the items for the customization from MetroTab control. Registered MetroToolbar controls are enumerated and items + are added if they have CanCustomize=true. + + MetroTab control that holds references to known MetroToolbars. + + + + Gets reference to the internal Quick Access Toolbar Customization panel. + + + + + Represents Metro Tab control, usually used as application tab but can be used as standard tab control as well. + + + + + Raises SettingsButtonClick event. + + Provides event arguments. + + + + Raises HelpButtonClick event. + + Provides event arguments. + + + + Gets the name of the QAT Customize Item which is used to display the QAT Customize Dialog box. + + + + + Gets the name of the Add to Quick Access Toolbar context menu item. + + + + + Gets the name of the Remove from Quick Access Toolbar context menu item. + + + + + Gets the name of the QAT placement change context menu item. + + + + + Gets the name of the label displayed on Quick Access Toolbar customize popup menu. + + + + + Gets the string that is used as starting name for the frequently used QAT menu items created when QAT Customize menu is displayed. + + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Performs the setup of the MetroTabPanel with the current style of the MetroShell Control. + + Panel to apply style changes to. + + + + Creates new Rendering Tab at specified position, creates new associated panel and adds them to the control. + + Specifies the text displayed on the tab. + Specifies the name of the tab + Specifies the position of the new tab inside of Items collection. + New instance of the MetroTabItem that was created. + + + + Creates new Rendering Tab and associated panel and adds them to the control. + + Specifies the text displayed on the tab. + Specifies the name of the tab + New instance of the MetroTabItem that was created. + + + + Recalculates layout of the control and applies any changes made to the size or position of the items contained. + + + + + Occurs when text markup link is clicked. + + + + + Called when right-mouse button is pressed over MetroTabStrip + + Reference to MetroTabStrip object. + + + + Displays popup customize context menu for given customization object. + + Object that should be customized, usually an instance of BaseItem. + Indicates whether customize menu is displayed over metro tab strip + + + + Removes an item from the Quick Access Toolbar. + + Reference to the item that is already part of Quick Access Toolbar. + + + + Adds an instance of base type BaseItem to the Quick Access Toolbar. Note that this method creates + new instance of the item or an representation of the item being added and adds that to the Quick Access Toolbar. + + Reference to the item to add, must be an BaseItem type. + + + + Raises the BeforeCustomizeMenuPopup event. + + Event arguments + + + + Raises the BeforeAddItemToQuickAccessToolbar event. + + Event arguments. + + + + Shows the quick access toolbar customize dialog. + + + + + Applies the Quick Access Toolbar customization changes made on QatCustomizePanel to the MetroShell Control Quick Access Toolbar. Note that QatCustomizePanel.DataChanged property indicates whether user made any changes to the data on the panel. + + Reference to the QatCustomizePanel + + + + Raises the AfterQatDialogChangesApplied event. + + + + + Returns the Metro Application Button. + + reference to Application Button or null if button is not found. + + + + Registers the MetroToolbar or any other DotNetBar container that implements IOwner interface so it can participate in Quick Access Toolbar serialization and customization. + + + + + + Registers the MetroToolbar or any other DotNetBar container that implements IOwner interface so it can participate in Quick Access Toolbar serialization and customization. + + + + + + Occurs just before the customize popup menu is displayed and provides the ability to cancel the menu display as well + as to add/remove the menu items from the customize popup menu. + + + + + Occurs before an item is added to the quick access toolbar as result of user action. This event provides ability to + cancel the addition of the item by setting the Cancel=true of event arguments. + + + + + Occurs before an item is removed from the quick access toolbar as result of user action. This event provides ability to + cancel the addition of the item by setting the Cancel=true of event arguments. + + + + + Occurs when DotNetBar is looking for translated text for one of the internal text that are + displayed on menus, toolbars and customize forms. You need to set Handled=true if you want + your custom text to be used instead of the built-in system value. + + + + + Occurs when Item on metro tab strip or quick access toolbar is clicked. + + + + + Occurs before Quick Access Toolbar dialog is displayed. This event provides the opportunity to cancel the showing of + built-in dialog and display custom customization dialog. You can also set the Dialog property of the event arguments to + the custom dialog you want used instead of the DotNetBar system customization dialog. + + + + + Occurs after the Quick Access Toolbar dialog is closed. + + + + + Occurs after any changes done on the Quick Access Toolbar dialog are applied to the actual Quick Access Toolbar. + + + + + Occurs after selected Metro tab has changed. You can use + MetroShell.SelectedTab + property to get reference to newly selected tab. + + + + + Occurs when text markup link from TitleText markup is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + Occurs when SETTINGS button, if displayed, is clicked. + + + + + Occurs when HELP button, if displayed, is clicked. + + + + + Gets the collection of the Quick Access Toolbar Frequently used commands. You should add existing buttons to this collection that + you already have on the MetroToolbar controls or on the application menu. The list will be used to construct the frequently used + menu that is displayed when Customize Quick Access Toolbar menu is displayed and it allows end-user to remove and add these + frequently used commands to the QAT directly from this menu. + Note that items you add here should not be items that are already on Quick Access Toolbar, i.e. in MetroShell.QuickToolbarItems collection. + + + + + Gets or sets whether KeyTips functionality is enabled. Default value is true. + + + + + Gets or sets whether anti-alias smoothing is used while painting. Default value is false. + + + + + Indicates whether Form.Icon is shown in top-left corner. + + + + + + Gets or sets the Context menu bar associated with the this control which is used as part of Global Items feature. The context menu + bar assigned here will be used to search for the items with the same Name or GlobalName property so global properties can be propagated when changed. + You should assign this property to enable the Global Items feature to reach your ContextMenuBar. + + + + + Gets or sets whether custom caption and quick access toolbar provided by the control is visible. Default value is false. + This property should be set to true when control is used on MetroAppForm. + + + + + Gets or sets the font for the form caption text when CaptionVisible=true. Default value is NULL which means that system font is used. + + + + + Gets or sets the explicit height of the caption provided by control. Caption height when set is composed of the TabGroupHeight and + the value specified here. Default value is 0 which means that system default caption size is used. + + + + + Gets or sets the font that is used to display Key Tips (accelerator keys) when they are displayed. Default value is null which means + that control Font is used for Key Tips display. + + + + + Specifies the background style of the control. + + + + + Gets or sets the currently selected MetroTabItem. MetroTabItems are selected using the Checked property. Only a single + MetroTabItem can be selected (Checked) at any given time. + + + + + Returns reference to internal metro tab-strip control. + + + + + Returns collection of items on a bar. + + + + + Returns collection of quick toolbar access and caption items. + + + + + Gets or sets whether mouse wheel scrolls through the Metro tabs. Default value is true. + + + + + ImageList for images used on Items. Images specified here will always be used on menu-items and are by default used on all Bars. + + + + + ImageList for medium-sized images used on Items. + + + + + ImageList for large-sized images used on Items. + + + + + Gets or sets a value indicating whether the user can give the focus to this control using the TAB key. Default value is false. + + + + + Gets or sets whether control can be customized and items added by end-user using context menu to the quick access toolbar. + Caption of the control must be visible for customization to be enabled. Default value is true. + + + + + Gets or sets whether external implementation for metro toolbar and menu item customization will be used for customizing the control. When set to true + it enables the displaying of MetroToolbar and menu item context menus which allow customization. You are responsible for + adding the menu items to context menu to handle all aspects of item customization. See "MetroShell Control Quick Access Toolbar Customization" topic in help file under How To. + Default value is false. + + + + + Gets or sets whether customize dialog is used to customize the quick access toolbar. You can handle the EnterCustomize event + to display your custom dialog instead of built-in dialog for customization. Default value is true. + + + + + Gets or sets the categorization mode for the items on Quick Access Toolbar customize dialog box. Default value categorizes + items by the toolbar they appear on. + + + + + Gets or sets the Quick Access Toolbar layout description. You can use the value obtained from this property to save + the customized Quick Access Toolbar into registry or into any other storage object. You can also set the saved layout description back + to restore user customize layout. + + + + + Gets or sets whether Quick Access Toolbar has been customized by end-user. You can use value of this property to determine + whether Quick Access Toolbar layout that can be accessed using QatLayout property should be saved. + + + + + Gets the reference to the Metro localization object which holds all system text used by the component. + + + + + Gets or sets the side tab-strip is docked to. + + + + + Gets or sets whether SETTINGS button is visible. + + + + + + Gets or sets the SETTINGS button text. + + + + + Gets or sets the HELP button text. + + + + + Gets or sets the font tab items are displayed with. + + + + + Describes the categorization mode used to categorize items on the Customize Metro dialog. + + + + + Items are automatically categorized by the toolbar they appear on. + + + + + Items are categorized by the Category property on each item. Category property should be set on each item. + + + + + Represents Metro-UI Status Bar control. + + + + + Initializes a new instance of the MetroStatusBar class. + + + + + Called when ResizeHandleVisible property has changed. + + Old property value + New property value + + + + Indicates whether items that cannot fit are displayed on popup. + + + + + Returns collection of items on a bar. + + + + + Gets or sets whether resize handle used to resize the parent form is visible. + + + + + Gets or sets spacing between items, default value is 2. + + + + + Defines the internal container item for the ribbon strip control. + + + + + Creates new instance of the class and initializes it with the parent RibbonStrip control. + + Reference to parent RibbonStrip control + + + + Paints this base container + + + + + Returns copy of GenericItemContainer item + + + + + Return Sub Item at specified location + + + + + Called when SettingsButtonText property has changed. + + Old property value + New property value + + + + Called when HelpButtonText property has changed. + + Old property value + New property value + + + + Gets reference to internal ribbon strip container that contains tabs and/or other items. + + + + + Gets reference to internal caption container item that contains the quick toolbar, start button and system caption item. + + + + + Gets or sets a value indicating whether the item is expanded or not. For Popup items this would indicate whether the item is popped up or not. + + + + + When parent items does recalc size for its sub-items it should query + image size and store biggest image size into this property. + + + + + Gets or sets whether Settings button is visible. + + + + + Gets or sets whether Help button is visible. + + + + + Gets or sets the Settings button text. + + + + + Represents Rendering Tab used on Metro Tab Control. + + + + + Initializes a new instance of the MetroTabItem class. + + + + + Selects the tab. + + + + + Called after Checked property has changed. + + + + + Occurs just before Click event is fired. + + + + + Called when Visibility of the items has changed. + + New Visible state. + + + + Occurs after item visual style has changed. + + + + + Gets or sets cached image rendering bounds. + + + + + Gets or sets cached text rendering bounds. + + + + + Gets or sets whether tab renders its state. Used internally by DotNetBar. Do not set. + + + + + Gets or sets the additional padding added around the tab item in pixels. Default value is 0. + + + + + Gets or sets whether size of the tab has been reduced below the default calculated size. + + + + + Gets or sets the predefined color of item. Color specified here applies to items with Office 2007 style only. It does not have + any effect on other styles. Default value is eMetroTabColor.Default + + + + + Gets or sets the panel assigned to this tab item. + + + + + Gets or set the Group item belongs to. The groups allows a user to choose from mutually exclusive options within the group. The choice is reflected by Checked property. + + + + + Returns the collection of sub items. + + + + + Indicates whether the item will auto-collapse (fold) when clicked. + When item is on popup menu and this property is set to false, menu will not + close when item is clicked. + + + + + Indicates whether the item will auto-expand when clicked. + When item is on top level bar and not on menu and contains sub-items, sub-items will be shown only if user + click the expand part of the button. Setting this propert to true will expand the button and show sub-items when user + clicks anywhere inside of the button. Default value is false which indicates that button is expanded only + if its expand part is clicked. + + + + + Gets or sets whether item can be customized by end user. + + + + + Gets or set a value indicating whether the button is in the checked state. + + + + + Gets or sets whether Click event will be auto repeated when mouse button is kept pressed over the item. + + + + + Gets or sets the auto-repeat interval for the click event when mouse button is kept pressed over the item. + + + + + Gets or sets a value indicating whether the item is enabled. + + + + + Indicates item's visiblity when on pop-up menu. + + + + + Indicates when menu items are displayed when MenuVisiblity is set to VisibleIfRecentlyUsed and RecentlyUsed is true. + + + + + Indicates Animation type for Popups. + + + + + Indicates the font that will be used on the popup window. + + + + + Indicates whether sub-items are shown on popup Bar or popup menu. + + + + + Specifies the inital width for the Bar that hosts pop-up items. Applies to PopupType.Toolbar only. + + + + + Gets or sets whether item will display sub items. + + + + + Gets or sets whether the item expands automatically to fill out the remaining space inside the container. Applies to Items on stretchable, no-wrap Bars only. + + + + + Gets or sets the width of the expand part of the button item. + + + + + Gets or set the alternative shortcut text. + + + + + Gets or sets whether item separator is shown before this item. + + + + + Returns category for this item. If item cannot be customzied using the + customize dialog category is empty string. + + + + + Gets or sets the text color of the button when mouse is over the item. + + + + + Indicates the way item is painting the picture when mouse is over it. Setting the value to Color will render the image in gray-scale when mouse is not over the item. + + + + + Gets or sets the text color of the button. + + + + + Gets/Sets the button style which controls the appearance of the button elements. Changing the property can display image only, text only or image and text on the button at all times. + + + + + Specifies predefined color assigned to Metro Tab. + + + + + Represents panel used by MetroTabItem as a container panel for the control. + + + + + Creates new instance of the panel. + + + + + Indicates whether style of the panel is managed by tab control automatically. + Set this to true if you would like to control style of the panel. + + + + + Gets or sets TabItem that this panel is attached to. + + + + + Gets or sets which edge of the parent container a control is docked to. + + + + + Gets or sets the size of the control. + + + + + Gets or sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container. + + + + + Gets or sets a value indicating whether the control is displayed. + + + + + Gets or sets which edges of the control are anchored to the edges of its container. + + + + + Represents Metro-UI TabStrip control. + + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Occurs when text markup link is clicked. + + + + + Returns the color scheme used by control. Color scheme for Office2007 style will be retrived from the current renderer instead of + local color scheme referenced by ColorScheme property. + + An instance of ColorScheme object. + + + + Returns effective caption height. + + Caption height. + + + + Returns automatically calculated height of the control given current content. + + Height in pixels. + + + + Returns the collection of items with the specified name. + + Item name to look for. + + + + + Returns the collection of items with the specified name and type. + + Item name to look for. + Item type to look for. + + + + + Returns the collection of items with the specified name and type. + + Item name to look for. + Item type to look for. + Indicates whether GlobalName property is used for searching. + + + + + Returns the first item that matches specified name. + + Item name to look for. + + + + + Called when ShowKeyTips on RibbonBar contained by this Ribbon is set to true + + + + + Forces the control to exit Ribbon Key-Tips mode. + + + + + Called when item on popup container is right-clicked. + + Instance of the item that is right-clicked. + + + + Starts moving of the parent form action which happens when user attempts to drag the form caption. + + + + + Returns true if point is inside the caption area. + + Client point coordinates. + True if point is inside of caption area otherwise false. + + + + Occurs when text markup link from TitleText markup is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + + Gets reference to parsed markup body element if text was markup otherwise returns null. + + + + + Gets or sets whether KeyTips functionality is enabled. Default value is true. + + + + + Gets or sets whether control can be customized and items added by end-user using context menu to the quick access toolbar. + Caption of the control must be visible for customization to be enabled. Default value is true. + + + + + Gets or sets the explicit height of the caption provided by control. Caption height when set is composed of the TabGroupHeight and + the value specified here. Default value is 0 which means that system default caption size is used. + + + + + Gets or sets whether custom caption line provided by the control is visible. Default value is false. + This property should be set to true when control is used on Office2007RibbonForm. + + + + + Gets or sets the font for the form caption text when CaptionVisible=true. Default value is NULL which means that system font is used. + + + + + Gets/Sets the visual style of the control. + + + + + Returns collection of items on a bar. + + + + + Returns currently selected MetroTabItem. MetroTabItems are selected using the Checked property. Only a single + MetroTabItem can be Checked at any given time. + + + + + Gets whether Ribbon is in key-tips mode including its child controls. + + + + + Indicates whether Form.Icon is shown in top-left corner. + + + + + Returns collection of items on a bar. + + + + + Gets the reference to the internal container item for the items displayed in control caption. + + + + + Gets the reference to the internal container for the ribbon tabs and other items. + + + + + Represents Metro Tile. + + + + + Raises CheckedChanged event. + + Provides event arguments. + + + + Raises OptionGroupChanging event. + + Provides event arguments. + + + + Creates new instance of metro tile. + + + + + Creates new instance of metro tile and assigns the name to it. + + Item name. + + + + Creates new instance of metro tile and assigns the name and text to it. + + Item name. + item text. + + + + Returns copy of the item. + + + + + Copies the MetroTileItem specific properties to new instance of the item. + + New ProgressBarItem instance. + + + + Copies the MetroTileItem specific properties to new instance of the item. + + New MetroTileItem instance. + + + + Called when NotificationMarkText property has changed. + + Old property value + New property value + + + + Called when NotificationMarkPosition property has changed. + + Old property value + New property value + + + + Called when NotificationMarkSize property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when NotificationMarkOffset property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Occurs just before Click event is fired. + + + + + Called when TileSize property has changed. + + Old property value + New property value + + + + Called when SymbolSet property value changes. + + Indciates old value + Indicates new value + + + + Called when IsLeftMouseButtonDown property has changed. + + Old property value + New property value + + + + Called when IsMouseOver property has changed. + + Old property value + New property value + + + + Raises TitleTextMarkupLinkClick event. + + Provides event arguments. + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when Checked property has changed. + + Old property value + New property value + + + + Called when CheckBehavior property has changed. + + Old property value + New property value + + + + Called when CurrentFrame property has changed. + + Old property value + New property value + + + + Called when AutoRotateFramesInterval property has changed. + + Old property value + New property value + + + + Called when DragStartPoint property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Occurs after Checked property has changed. + + + + + Occurs before an item in option group is checked and provides opportunity to cancel that. + + + + + Occurs when text markup link is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + Specifies maximum of 2 character text displayed inside of the notification mark on top of the button. + + + + + Indicates the position of the notification marker within the bounds of the button. + + + + + Specifies diameter of notification mark. When set to 0 system default value is used. + + + + + Gets or sets background color of the notification mark. + + + + + Specifies the offset for the notification mark relative to its position. + + + + + Gets or sets the tile size. + + + + + Gets or sets the predefined tile color for default tile frame. + + + + + Specifies the Tile style default tile frame. + + + + + Indicates the symbol displayed on face of the tile instead of the image. Setting the symbol overrides the image setting. + + + + + Gets or sets the symbol set used to represent the Symbol. + + + + + Indicates the size of the symbol in points. + + + + + Gets or sets the color of the symbol. + + + + + Gets or sets the image displayed on the tile. + + + + + Gets or sets image alignment in relation to text. + + + + + Gets or sets the text associated with this item. + + + + + Gets whether left mouse button is pressed over the tile. + + + + + Gets whether mouse is over the item. + + + + + Gets or sets the tile title text displayed by default in lower left corner. + + + + + Occurs when an hyperlink in title text markup is clicked. + + + + + Gets or sets the title text font. + + + + + Gets or sets the color of the title text. + + + + + Gets or sets title text alignment. + + + + + Gets or sets the top-left location of the image. + + + + + Gets or sets whether tile is checked. + + + + + Gets or sets the automatic check behavior of metro tile. + + + + + Gets or set the Group item belongs to. The groups allows a user to choose from mutually exclusive options within the group. The choice is reflected by Checked property. + + + + + Gets the list of tile frames that are displayed when frame animation is enabled using AnimationEnabled property. + + + + + Gets or sets index of currently displayed frame in Frames collection. + + + + + Gets the index of last selected frame, i.e. before CurrentFrame was set with new value. + + + + + Gets or sets whether Frame animation is enabled when CurrentFrame has changed. Default value is true. + + + + + Gets or sets the frames animation duration in milliseconds. Default value is 800. + + + + + Gets or sets the automatic tile frame rotation interval in milliseconds. When set it will change the CurrentFrame property so each frame from Frames collection is displayed after interval set here. + + + + + Gets or sets tile background color when Enabled=false. + + + + + Gets whether item supports text markup. Default is false. + + + + + Gets or sets whether text-markup support is enabled for items Text property. Default value is true. + Set this property to false to display HTML or other markup in the item instead of it being parsed as text-markup. + + + + + Specifies how MetroTileItem is checked. + + + + + Metro tile item inherits the check behavior from host control. + + + + + Metro tile item cannot be checked. + + + + + Metro tile item is checked using right mouse button. + + + + + Metro tile item is checked using middle mouse button. + + + + + Metro tile item is checked using left mouse button. + + + + + Defines single frame for metro-tile item. + + + + + Initializes a new instance of the MetroTileFrame class. + + + + + Called when TitleText property has changed. + + Old property value + New property value + + + + Raises TitleTextMarkupLinkClick event. + + Provides event arguments. + + + + Called when TitleTextFont property has changed. + + Old property value + New property value + + + + Called when TitleTextColor property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when TitleTextAlignment property has changed. + + Old property value + New property value + + + + Called when Symbol property has changed. + + Old property value + New property value + + + + Called when SymbolSet property value changes. + + Indciates old value + Indicates new value + + + + Called when SymbolSize property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when Image property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when Text property has changed. + + Old property value + New property value + + + + Called when Color property has changed. + + Old property value + New property value + + + + Called when FrameDisplayDuration property has changed. + + Old property value + New property value + + + + Occurs when text markup link is clicked. + + + + + Raises MarkupLinkClick event. + + Provides event arguments. + + + + Called when TextMarkupEnabled property has changed. + + Old property value + New property value + + + + Called when ImageTextAlignment property has changed. + + Old property value + New property value + + + + Raises the PropertyChanged event. + + Provides event arguments. + + + + Gets or sets the tile title text displayed by default in lower left corner. + + + + + Gets reference to parsed markup body element if text was markup otherwise returns null. + + + + + Occurs when an hyperlink in title text markup is clicked. + + + + + Gets or sets the title text font. + + + + + Gets or sets the color of the title text. + + + + + Gets or sets title text alignment. + + + + + Gets the effective style for the tile when TileColor property is set to predefined tile color. + + + + + Specifies the Tile style of the item. + + + + + Gets the realized symbol string. + + + + + Indicates the symbol displayed on face of the tile instead of the image. Setting the symbol overrides the image setting. + + + + + Gets or sets the symbol set used to represent the Symbol. + + + + + Indicates the size of the symbol in points. + + + + + Gets or sets the color of the symbol. + + + + + Gets or sets the image displayed on the tile. + + + + + Gets or sets the top-left location of the image. + + + + + Gets or sets the text associated with this item. + + + + + Gets or sets the predefined tile color. + + + + + Gets or sets the frame display duration in milliseconds during metro-tile frame animation. When not set then each frame will stay visible for duration set on MetroTileItem.AutoRotateFramesInterval. + + + + + Occurs when text markup link is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + Gets reference to parsed markup body element if text was markup otherwise returns null. + + + + + Gets or sets whether text-markup can be used in Text property. + + + + + Gets or sets image alignment in relation to text. + + + + + Occurs when property on BindingDef object has changed. + + + + + Represents panel for Metro Tiles. + + + + + Represents generic item panel container control. + + + + + Returns first checked top-level button item. + + An ButtonItem object or null if no button could be found. + + + + Adds new item to the ItemPanel based on specified ItemTemplate and sets its Text property. + + Text to assign to the item. + reference to newly created item + + + + Gets or sets default layout orientation inside the control. You can have multiple layouts inside of the control by adding + one or more instances of the ItemContainer object and chaning it's LayoutOrientation property. + + + + + Gets or sets whether items contained by container are resized to fit the container bounds. When container is in horizontal + layout mode then all items will have the same height. When container is in vertical layout mode then all items + will have the same width. Default value is true. + + + + + Gets or sets whether ButtonItem buttons when in vertical layout are fit into the available width so any text inside of them + is wrapped if needed. Default value is false. + + + + + Gets or sets the item alignment when container is in horizontal layout. Default value is Left. + + + + + Gets or sets whether items in horizontal layout are wrapped into the new line when they cannot fit allotted container size. Default value is false. + + + + + Returns collection of items on a bar. + + + + + Indicates whether block elements inside of container when aligned center or right will reserve the space to the left. Default value is true. + + + + + Gets or sets the index specifying the currently selected item. + + + + + Gets the list of ButtonItem or CheckBoxItem controls that have their Checked property set to true. + + + + + Gets or sets ButtonItem or CheckBoxItem item that have their Checked property set to true. + + + + + Initializes a new instance of the MetroTilePanel class. + + + + + Gets or sets a value indicating whether the control enables the user to scroll to items placed outside of its visible boundaries. + + + + + Gets or sets spacing in pixels between items. Default value is 1. + + + + + Gets or sets whether items contained by container are resized to fit the container bounds. When container is in horizontal + layout mode then all items will have the same height. When container is in vertical layout mode then all items + will have the same width. Default value is true. + + + + + Raises ExpandedChanging event. + + Provides event arguments. + + + + Raises ExpandedChanged event. + + Provides event arguments. + + + + Initializes a new instance of the MetroStatusBar class. + + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Registers toolbar with MetroTab so it can participate in Quick Access Toolbar operations. + + MetroTab + + + + Unregisters previously registered toolbar from MetroTab and removes it from Quick Access Toolbar operations. + + + + + Returns automatically calculated height of the control given current content. + + Height in pixels. + + + + Called after change of active window has been detected. SetupActiveWindowTimer must be called to enable detection. + + + + + Invokes the ItemClick event. + + Reference to the item that was clicked. + + + + Called when AutoCollapse property has changed. + + Old property value + New property value + + + + Called when AnimationSpeed property has changed. + + Old property value + New property value + + + + Called when ExpandDirection property has changed. + + Old property value + New property value + + + + Occurs before Expanded property has changed, i.e. control expanded or collapsed and allows you to cancel action by setting Cancel=true on event arguments. + + + + + Occurs after Expanded property value has changed, i.e. control was expanded or collapsed. + + + + + Returns collection of items on a bar. + + + + + Gets or sets spacing between items, default value is 0. + + + + + Returns collection of items on a bar. + + + + + Gets or sets whether toolbar is attempted to be automatically registered with parent MetroShell control so it can participate in Quick Access Toolbar operations. Default value is true. + + + + + Gets or sets whether control is expanded or not. When control is expanded both main and extra toolbar items are visible. When collapsed + only main items are visible. Default value is false. + + + + + Gets or sets whether control is automatically collapsed, Expanded property set to False, if control was expanded and any button on the control was clicked or mouse is clicked elsewhere, parent form has lost input focus or some other control gains input focus. + + + + + Gets or sets the animation speed duration in milliseconds. Default value is 150 milliseconds. Set to zero, 0 to disable animation. + + + + + Gets or sets the expand direction for the toolbar. Default value is Auto. + + + + + Gets or sets whether Expand button is visible. Default value is true. + + + + + Gets or sets whether control height is set automatically based on the content. Default value is false. + + + + + Defines expand direction behavior for MetroToolbar. + + + + + Expand direction is automatically determined by the position of the control on the form. + + + + + Control is expanded up so bottom of the control is fixed. + + + + + Control sis expanded down so top of the control is fixed. + + + + + Defines the internal container item for the MetroToolbar control. + + + + + Creates new instance of the class and initializes it with the parent RibbonStrip control. + + Reference to parent MetroToolbar control + + + + Paints this base container + + + + + Returns copy of GenericItemContainer item + + + + + Called when ExpandButtonVisible property has changed. + + Old property value + New property value + + + + Gets or sets whether Expand button is visible. Default value is true. + + + + + Gets reference to container that host items. + + + + + Gets reference to container that hosts extra items. + + + + + Gets or sets a value indicating whether the item is expanded or not. For Popup items this would indicate whether the item is popped up or not. + + + + + When parent items does recalc size for its sub-items it should query + image size and store biggest image size into this property. + + + + + Initializes Office Mobile 2014 color scheme Metro color table based on colors specified. + + + + + Draws the border. + + Graphics canvas. + Bounds for border. + Border thickness. + Border color. + + + + Draws background. + + Graphics canvas. + Background bounds. + Background color + + + + Deflates the rectangle by the border thickness. + + Rectangle. + Border thickness + Rectangle deflated by the border thickness + + + + Represents the painter for the Office 2007 SystemCaptionItem + + + + + Represents the base class for the SystemCaptionItem painter. + + + + + Paints the SystemCaptionItem as icon in left hand corner. + + + + + + Paints the SystemCaptionItem as set of buttons minimize, restore/maximize and close. + + + + + + Paints the background of the button using specified color table colors. + + Graphics object. + Background bounds + Color Table + + + + Gets or sets color table used by renderer. + + + + + Abstract renderer for rendering Metro-UI controls. + + + + + Renders the + + + + + + Gets or sets color table used by renderer. + + + + + Renders the MetroTileItem. + + MetroTileItem to render. + Rendering event arguments. + + + + Renders the MetroForm. + + Form to render. + Rendering event arguments. + + + + Renders the MetroForm. + + Form to render. + Rendering event arguments. + + + + Renders the MetroTabItem. + + Form to render. + Rendering event arguments. + + + + Renders the MetroTabStrip + + TabStrip to render. + Paint args + + + + Renders the MetroStatusBar. + + Status bar to render + Paint args + + + + Renders the MetroStatusBar. + + Status bar to render + Paint args + + + + Defines class for passing rendering information to renderer. + + + + + Gets or sets the control to render. + + + + + Gets or sets the paint event arguments to use to render out control. + + + + + Gets or sets the current color table. + + + + + Gets or sets default font. + + + + + Gets or sets default plain font. + + + + + Gets or sets right-to-left setting. + + + + + Gets or sets the paint information for items. + + + + + Represents the Office 2007 Ribbon Tab Group painter. + + + + + Paints ribbon tab group. + + Context information + + + + Paints SwitchButton. + + Provides arguments for the operation. + + + + Gets or sets color table used by renderer. + + + + + Defines Thickness structure used by borders and margins. + + + + + Creates new instance of the object. + + Uniform Thickness + + + + Creates new instance of the object. + + Left Thickness + Top Thickness + Right Thickness + Bottom Thickness + + + + Gets whether object equals to this instance. + + object to test. + returns whether objects are Equals + + + + Gets whether object equals to this instance. + + object to test. + returns whether objects are Equals + + + + Returns hash code for object. + + Hash code + + + + Returns string representation of object. + + string representing Thickness + + + + Gets string representation of object. + + Culture info. + string representing Thickness + + + + Returns whether object holds valid value. + + Specifies whether negative values are allowed. + Specifies whether NaN values are allowed. + Specifies whether positive infinity values are allowed + Specifies whether negative infinity values are allowed + true if object holds valid value + + + + Returns true if two objects are close. + + Thickness to test. + true if values are close. + + + + Returns true if two objects are close. + + Thickness 1 + Thickness 2 + true if values are close. + + + + Returns whether all values are zero. + + + + + Returns whether all values are the same. + + + + + Gets or sets the left Thickness. + + + + + Gets or sets the top Thickness. + + + + + Gets or sets the Right Thickness. + + + + + Gets or sets the Bottom Thickness. + + + + + Gets the total horizontal thickness i.e. Left+Right. + + + + + Gets the total vertical thickness i.e. Top+Bottom. + + + + + Provides Thickness TypeConverter. + + + + + Represents the base class each micro-chart implements + + + + + Creates the chart image. + + Rendering information. + Image of the chart. + + + + Defines the style for Area micro chart. + + + + + Initializes a new instance of the AreaMicroChartStyle class. + + + + + Raises StyleChanged event. + + Provides event arguments. + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Occurs when style appearance changes. + + + + + Gets or sets the value of the zero line, i.e. where zero line is drawn. Default value is 0. + + + + + Gets or sets the chart area color. + + + + + Gets or sets the color of the high point dot on chart. + + + + + Gets or sets the color of the low point dot on chart. + + + + + Gets or sets the color of the first point dot on chart. + + + + + Gets or sets the color of the last point dot on chart. + + + + + Defines the style for the bar style micro charts. + + + + + Raises StyleChanged event. + + Provides event arguments. + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Occurs when style appearance changes. + + + + + Gets or sets the minimum single bar width. + + + + + Gets or sets the color of positive bar value. + + + + + Gets or sets the color of negative bar value. + + + + + Gets or sets whether average line is drawn. + + + + + Gets or sets the value of the zero line, i.e. pivot point that determines negative and positive values. Default value is 0. + + + + + Gets or sets the color of the lowest value bar on graph. + + + + + Gets or sets the color of the highest value bar on graph. + + + + + Defines the style for 100% bar chart. + + + + + Initializes a new instance of the PieMicroChartStyle class. + + + + + Raises StyleChanged event. + + Provides event arguments. + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Occurs when style appearance changes. + + + + + Gets or sets the minimum single bar width. + + + + + Gets the pre-defined slice colors for the pie chart. + + + + + Gets or sets the color of the slice outline. + + + + + Defines the style for the line micro chart. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Raises StyleChanged event. + + Provides event arguments. + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets or sets the color of the chart line. + + + + + Gets or sets whether average line is drawn. + + + + + Gets or sets the color of the + + + + + Gets or sets whether zero-line is drawn on chart. + + + + + Gets or sets the value of the zero line, i.e. where zero line is drawn. Default value is 0. + + + + + Gets or sets the color of the + + + + + Occurs when style appearance changes. + + + + + Gets or sets the color of the high point dot on chart. + + + + + Gets or sets the color of the low point dot on chart. + + + + + Gets or sets the color of the first point dot on chart. + + + + + Gets or sets the color of the last point dot on chart. + + + + + Gets or sets whether control line is drawn. Default value is false. Control lines can be used to display for example low and high control bounds for the chart. + + + + + Gets or sets the color of the first control line. + + + + + Gets or sets starting value that is used to draw first control line. + + + + + Gets or sets end value that is used to draw first control line. + + + + + Gets or sets whether control line is drawn. Default value is false. Control lines can be used to display for example low and high control bounds for the chart. + + + + + Gets or sets the color of the second control line. + + + + + Gets or sets starting value that is used to draw second control line. + + + + + Gets or sets end value that is used to draw second control line. + + + + + Represents Micro-Chart Control. + + + + + Initializes a new instance of the MicroChart class. + + + + + Forces the button to perform internal layout. + + + + + Raises MouseOverDataPointChanged event. + + Provides event arguments. + + + + Invalidates the chart display and requests the re-paint. + + Indicates whether to animate transition to new chart + + + + Called when Command property value changes. + + + + + Gets or sets whether mouse over tooltip for data point is enabled. Default value is true. + + + + + Gets the index of data point (DataPoints collection) that mouse is over or returns -1 if mouse is not over any data-point. + + + + + Occurs when MouseOverDataPointIndex property changes due to user moving the mouse and pointing it to different data point on chart. + + + + + Gets or sets the tooltips for each data-point assigned through DataPoints property. If not set control will automatically + show tooltip based on the data-point value. + + + + + Gets or sets the chart data points. Note that if you are adding or removing points directly from this collection you must call + Refresh() method on the control to refresh the display. + + + + + Gets or sets the format string for the value when it is displayed as tool-tip for data point. + + + + + Gets or sets whether chart is tracking mouse movement to show data-point and its value on tooltip. Default value is true. + + + + + Gets or sets whether transition animation between same chart with different data-points is enabled. Default value is true. + + + + + Gets or sets whether button like mouse over tracking is enabled for whole control. When enabled control looks like a button when mouse is over it. Default value is false. + + + + + Gets the style used to customize appearance of Line micro-chart. + + + + + Gets the style used to customize appearance of Plot micro-chart. + + + + + Gets the style used to customize appearance of Column micro-chart. + + + + + Gets the style used to customize appearance of Bar micro-chart. + + + + + Gets the style used to customize appearance of Win-Lose micro-chart. + + + + + Gets the style used to customize appearance of Pie micro-chart. + + + + + Gets the style used to customize appearance of Area micro-chart. + + + + + Gets the style used to customize appearance of 100% micro-chart. + + + + + Gets or sets the type of the chart rendered. + + + + + Gets or sets the maximum value for data points. By default maximum data point is calculated based on that data displayed by the chart, but when + two charts need to be scaled the same setting maximum and minimum values for them will ensure that scales are visually the same. + + + + + Gets or sets the minimum value for data points. By default minimum data point is calculated based on that data displayed by the chart, but when + two charts need to be scaled the same setting maximum and minimum values for them will ensure that scales are visually the same. + + + + + Gets whether command is executed when control is clicked. + + + + + Gets or sets the command assigned to the item. Default value is null. + Note that if this property is set to null Enabled property will be set to false automatically to disable the item. + + + + + Gets or sets user defined data value that can be passed to the command when it is executed. + + + + + Initializes a new instance of the TrendInfo structure. + + + + + + + + + Initializes a new instance of the TrendInfo structure. + + + + + Initializes a new instance of the MicroChartRenderInfo structure. + + + + + + + + + Represents the micro-chart item. + + + + + Creates new instance of MicroChartItem. + + + + + Creates new instance of MicroChartItem and assigns the name to it. + + Item name. + + + + Creates new instance of MicroChartItem and assigns the name and text to it. + + Item name. + item text. + + + + Returns copy of the item. + + + + + Copies the MicroChartItem specific properties to new instance of the item. + + New MicroChartItem instance. + + + + Copies the MicroChartItem specific properties to new instance of the item. + + New MicroChartItem instance. + + + + Recalculate the size of the item. If overridden base implementation must be called so default processing can occur. + + + + + Raises MouseOverDataPointChanged event. + + Provides event arguments. + + + + Invalidates the chart display and requests the re-paint. + + Indicates whether to animate transition to new chart + + + + Draws the chart. + + Paint arguments + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when DataMaxValue property has changed. + + Old property value + New property value + + + + Called when DataMinValue property has changed. + + Old property value + New property value + + + + Gets or sets the suggested text-width. If you want to make sure that text you set wraps over multiple lines you can set suggested text-width so word break is performed. + + + + + Gets or sets the format string for the value when it is displayed as tool-tip for data point. + + + + + Gets or sets the chart data points. Note that if you are adding or removing points directly from this collection you must call + Refresh() method on the control to refresh the display. + + + + + Gets or sets the tooltips for each data-point assigned through DataPoints property. If not set control will automatically + show tooltip based on the data-point value. + + + + + Gets or sets whether transition animation between same chart with different data-points is enabled. Default value is true. + + + + + Gets whether fade effect is enabled. + + + + + Gets or sets whether chart is tracking mouse movement to show data-point and its value on tooltip. Default value is true. + + + + + Gets or sets whether button like mouse over tracking is enabled for whole control. When enabled control looks like a button when mouse is over it. Default value is false. + + + + + Gets the index of data point (DataPoints collection) that mouse is over or returns -1 if mouse is not over any data-point. + + + + + Gets or sets whether mouse over tooltip for data point is enabled. Default value is true. + + + + + Occurs when MouseOverDataPointIndex property changes due to user moving the mouse and pointing it to different data point on chart. + + + + + Gets the style used to customize appearance of Line micro-chart. + + + + + Gets the style used to customize appearance of Plot micro-chart. + + + + + Gets the style used to customize appearance of Column micro-chart. + + + + + Gets the style used to customize appearance of Bar micro-chart. + + + + + Gets the style used to customize appearance of Win-Lose micro-chart. + + + + + Gets the style used to customize appearance of Pie micro-chart. + + + + + Gets the style used to customize appearance of Area micro-chart. + + + + + Gets the style used to customize appearance of 100% micro-chart. + + + + + Gets or sets the width of the chart part of the control. + + + + + Gets or sets the height of the chart part of the control. + + + + + Gets or sets the type of the chart rendered. + + + + + Gets whether item supports text markup. Default is false. + + + + + Gets or sets whether text-markup support is enabled for items Text property. Default value is true. + Set this property to false to display HTML or other markup in the item instead of it being parsed as text-markup. + + + + + Gets or sets text-position in relation to the chart. + + + + + Gets or sets the text associated with this item. + + + + + Gets or sets whether caption/label set using Text property is visible. + + + + + Gets or sets text padding. + + + + + Gets or sets switch margin. + + + + + Gets or sets the text color. + + + + + Gets or sets the background image position + + + + + Gets or sets the background image used by the control. + + + + + Gets or sets the maximum value for data points. By default maximum data point is calculated based on that data displayed by the chart, but when + two charts need to be scaled the same setting maximum and minimum values for them will ensure that scales are visually the same. + + + + + Gets or sets the minimum value for data points. By default minimum data point is calculated based on that data displayed by the chart, but when + two charts need to be scaled the same setting maximum and minimum values for them will ensure that scales are visually the same. + + + + + Indicates item's visibility when on pop-up menu. + + + + + Indicates whether item was recently used. + + + + + Represents MicroChart hot-points. + + + + + Start angle for pie slice. + + + + + Sweep angle for pie slice. + + + + + Initializes a new instance of the MicroChartHotPoint structure. + + + + + + + Initializes a new instance of the MicroChartHotPoint structure. + + + + + + + + + Initializes a new instance of the MicroChartHotPoint structure. + + + + + + + + + + Defines available MicroChar types. + + + + + Identifies Plot chart. + + + + + Identifies WinLose chart. + + + + + Identifies Area chart. + + + + + Identifies Line chart. + + + + + Identifies Column chart. + + + + + Identifies Bar chart. + + + + + Identifies Pie chart. + + + + + Identifies 100% bar. + + + + + Defines micro-chart text position in relation to the chart. + + + + + Text is positioned to the left of the chart. + + + + + Text is positioned to the right of the chart. + + + + + Text is positioned on top of the chart. + + + + + Text is positioned on bottom of the chart. + + + + + Defines the style for pie chart. + + + + + Initializes a new instance of the PieMicroChartStyle class. + + + + + Raises StyleChanged event. + + Provides event arguments. + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Occurs when style appearance changes. + + + + + Gets the pre-defined slice colors for the pie chart. + + + + + Gets or sets the color of the slice outline. + + + + + Defines the style for the plot micro chart. + + + + + Raises StyleChanged event. + + Provides event arguments. + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Occurs when style appearance changes. + + + + + Gets or sets the color of the chart line. + + + + + Gets or sets whether average line is drawn. + + + + + Gets or sets the color of the + + + + + Gets or sets whether zero-line is drawn on chart. + + + + + Gets or sets the value of the zero line, i.e. where zero line is drawn. Default value is 0. + + + + + Gets or sets the color of the + + + + + Gets or sets the color of the high point dot on chart. + + + + + Gets or sets the color of the low point dot on chart. + + + + + Gets or sets the color of the first point dot on chart. + + + + + Gets or sets the color of the last point dot on chart. + + + + + Gets or sets whether control line is drawn. Default value is false. Control lines can be used to display for example low and high control bounds for the chart. + + + + + Gets or sets the color of the first control line. + + + + + Gets or sets starting value that is used to draw first control line. + + + + + Gets or sets end value that is used to draw first control line. + + + + + Gets or sets whether control line is drawn. Default value is false. Control lines can be used to display for example low and high control bounds for the chart. + + + + + Gets or sets the color of the second control line. + + + + + Gets or sets starting value that is used to draw second control line. + + + + + Gets or sets end value that is used to draw second control line. + + + + + Class that tracks lists of all controls that host currently open popups. + + + + + Registers IOwnerMenuSupport popup host in response to host displaying its first popup. + + IOwnerMenuSupport host to register + + + + Unregisters IOwnerMenuSupport popup host in response to host closing its last popup. + + IOwnerMenuSupport host to unregister + + + + Closes all currently open popups. + + + + + Closes all currently open popups excluding specified popup host. + + IOwnerMenuSupport host to exclude from closing or null + + + + Represents custom collection with INotifyPropertyChanged and INotifyCollectionChanged interface support. + + + + + + Represents collection changed notification interface. + + + + + Occurs when collection changed. + + + + + Creates new instance of object. + + + + + Creates new instance of object. + + + + + Creates new instance of object. + + List to initialize collection with. + + + + Add item to collection. + + Item to add. + + + + Remove all items from collection. + + + + + Remove all items from collection. + + + + + Checks whether collection contains item. + + Item to look for. + true if item is in collection. + + + + Copy collection to array. + + Array to copy to. + Index to copy from. + + + + Copy collection to array. + + Array to copy to. + + + + Gets enumerator for collection. + + Enumerator. + + + + Returns index of an item. + + Reference to item. + Index of item. + + + + Insert item at specified location. + + Index to insert item in. + Item to insert. + + + + Inserts item. + + Index to insert item at. + Reference to item. + + + + Removes item from collection. + + Item to remove. + true if item was removed. + + + + Remove item at specified location. + + Index of item to remove. + + + + Remove item at specified location. + + Index of item to remove. + + + + Set item on location. + + Index + Item to assign. + + + + Returns items directly without checks. + + List of items. + + + + Occurs when collection is read. + + + + + Occurs when collection property has changed. + + Event arguments. + + + + Blocks the collection reentrancy. + + IDisposable to end re-entrancy + + + + Checks whether call creates reentrancy. + + + + + Called when collection has changed. + + Event arguments. + + + + Occurs when property value has changed. + + + + + Returns number of items in collection. + + + + + Returns item at index. + + Index of item. + Item at index. + + + + Returns the IList interface for items in collection. + + + + + Occurs when collection has changed. + + + + + Defines change actions. + + + + + Items were added. + + + + + Items were removed. + + + + + Items were replaced. + + + + + Items were moved. + + + + + Collection was reset. + + + + + Defines delegate for collection notification events. + + Event sender. + Event arguments. + + + + Defines collection change notification event arguments. + + + + + Create new instance of object. + + Action + + + + Creates new instance of object. + + Specifies action. + List of changed items. + + + + Creates new instance of object. + + Specifies action. + Item that was changed. + + + + Creates new instance of object. + + Action. + New items in collection. + Old items in collection. + + + + Creates new instance of object. + + Action. + List of changed items. + Starting index of change. + + + + Creates new instance of object. + + Action + Changed item + Index of change + + + + Creates new instance of object. + + Action + New item + Old item + + + + Creates new instance of object. + + Action + New items. + Removed items. + Starting index of change. + + + + Creates new instance of object. + + Action + Changed items + New index + Old index + + + + Creates new instance of object. + + Action + Changed item + New index + Old index + + + + Creates new instance of object. + + Action. + New item + Old item + New index + + + + Gets the type of the collection change action. + + + + + Gets list of newly added items. + + + + + Gets new starting index. + + + + + Gets list of removed items. + + + + + Old starting index. + + + + + Represents advanced property grid control. + + + + + Defines an interface that is used by advanced property grid parser to localize property names. + + + + + Gets localized property name. + + Property name to retrieve localized name for. + Localized Property name or null to use default. + + + + Gets localized category name. + + Category to retrieve localized value for. + Localized Category name or null to use default. + + + + Gets localized message for Tooltip body when error setting the property value has occurred. + + Default system message. + Localized message or null to use default. + + + + Gets the style that is applied to property node when it is in read-only state. + + + + + Gets the style that is applied to property node when its value has changed from the default value for the property. + + + + + Gets the property category style. + + + + + Gets the default style for unchanged value edit cell. + + + + + Initializes a new instance of the AdvPropertyGrid class. + + + + + Invokes PropertyValueChanging event. + + Event data. + + + + Invokes PropertyValueChanged event handler. + + Name of the property that has changed. + New property value. + Old property value. + + + + Invokes PropertyValueChanged event. + + Name of property that has changed + + + + Raises ValidatePropertyValue event. + + Provides event arguments. + + + + Raises PropertiesLoaded event. + + Provides event arguments. + + + + Commits any property edits that are currently in progress by applying the current entered value to the property. + Returns true if edit was applied. + + + + + Updates specified property value in property grid. + + Property Name to update value for. + + + + Refreshes the display of all property values in the grid. + + + + + Reloads all properties from selected object. + + + + + Collapses all the categories in the AdvPropertyGrid. + + + + + Expands all the categories in the AdvPropertyGrid. + + + + + Raises the PrepareErrorSuperTooltip event. + + Provides information about event. + + + + Sets the property grid column width. + + Column index + Width of column in pixels + + + + Raises the ConvertPropertyValueToString event. + + Provides event data + + + + Raises the ConvertFromStringToPropertyValue event. + + Provides event data + + + + Raises the ProvidePropertyValueList event. + + Provides event data + + + + Raises the ProvideUITypeEditor event. + + Provides event data + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Find PropertyNode using the property name. + + Property to name + PropertyNode or null if not found + + + + Called when SubPropertiesDefaultSort property has changed. + + Old property value + New property value + + + + Raises the PropertyChanged event. + + Provides event arguments. + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is ending. + + + + + Occurs when property grid needs property names translated for UI. + + + + + Occurs when Super Tooltip that is displayed for the error that occurred when property is being set is being assigned to a property node. + This event allows you to customize the super tooltip displayed. + + + + + Occurs when property value is being converted to text representation for display. You can handle this event + to provide custom conversion for property values. You must set IsConverted=true on event arguments to indicate that you have performed value conversion. + + + + + Occurs when text entered by user is being converted to typed property value to be assigned to the property. You can handle this event + to provide custom conversion for property values. You must set IsConverted=true on event arguments to indicate that you have performed value conversion. + + + + + Occurs when property looks for the list of valid values for the property to show on either drop-down or use + in auto-complete list. For example when property type is enum the internal implementation will convert available enum + values into string list and use on drop-down and in auto-complete list. You can use this event to provide + custom value list in combination with ConvertPropertyValueToString, ConvertFromStringToPropertyValue events. + You must set IsListValid=true on event arguments to indicate that list your provided should be used. + + + + + Occurs when property node needs the UITypeEditor for the property. You can handle this event and provide your own UITypeEditor to be used instead of the one specified on the property. + + + + + Occurs when user changes the value of the property in property grid. + + + + + Occurs before property value entered by the user is set on the property. You can cancel internal assignment by property grid by setting Handled=true on event arguments. + + + + + Occurs when users changes the property value and attempts to commit the changes. This even allows you to validate the value and show error message if value is invalid and cancel its application. + + + + + Occurs after properties have been loaded into the property grid. + + + + + Gets or sets the currently selected objects. + + + + + Gets or sets the currently selected object. + + + + + Gets or sets the browsable attributes associated with the object that the property grid is attached to. + + + + + Gets or sets whether property is highlighted to confirm the value update by user. Default value is true. + + + + + Gets or sets the list of property names that are not loaded into property grid regardless of their Browsable attribute setting. + + + + + Gets or sets the list of category names properties below to that are not loaded into property grid regardless of the property Browsable attribute setting. + + + + + Returns reference to internal SuperTooltip component used by AdvPropertyGrid. + + + + + Defines the appearance of the control. + + + + + Gets or sets the property sorting inside of the grid. + + + + + Gets or sets the help type that is provided by the control. Default help type is SuperTooltip which shows tooltip over each property + that provides property description. + + + + + Gets reference to the help panel that is displayed below property grid and which provides selected property description. + + + + + Gets reference to the expandable splitter that is displayed above the help panel and allows resizing of the panel. + + + + + Gets reference to internal AdvTree control that displays properties. + + + + + Gets or sets the grid lines color. + + + + + Gets the reference to the internal toolbar control displayed above the property grid. + + + + + Gets or sets whether toolbar is visible. Default value is true. + + + + + Gets or sets whether search text box that allows property filtering is visible. Default value is true. + + + + + Gets reference to internal TextBoxItem that represents search text box. + + + + + Gets the reference to the property gird localization object which holds all system text used by the component. + + + + + Gets or sets whether Tab key navigates between property nodes. Default value is true. + + + + + Gets or sets the password character used by the property values that are marked with PropertyPasswordText attribute. + + + + + Gets or sets the sub property default sorting. Default value is Alphabetical. + + + + + Occurs when property defined by AdvPropertyGrid control has changed. + + + + + Gets the style that is applied to property node when it is in read-only state. + + + + + Gets the style that is applied to property node when its value has changed from the default value for the property. + + + + + Gets the style that is applied to property edit cell when its displaying unchanged property value. + + + + + Gets the property category style. + + + + + Defines the sorting for the AdvPropertyGrid properties. + + + + + Specifies help types property grid uses to display help for selected property. + + + + + No help is visible. + + + + + SuperTooltip with property description is displayed when mouse is over the property. + + + + + Panel below property grid is displayed which shows the description for the selected property. + + + + + Defines delegate for Localize AdvPropertyGrid event. + + + + + + + Defines data for Localize AdvPropertyGrid event. + + + + + Gets the property name or category name localization is performed for. Inspect LocalizationType property to get localization type which + determines value specified in this property. + + + + + Gets the localization type being performed. + + + + + Gets or sets the localized value to be used. Set to null or empty string to use default value. + + + + + Initializes a new instance of the AdvPropertyGridLocalizeEventArgs class. + + Key value event is raised for. + Localization Type being performed. + + + + Defines the localization types for AdvPropertyGrid control. + + + + + Property name is localized. + + + + + Category is localized. + + + + + Error super tooltip parts are being localized. + + + + + Defines delegate for Localize AdvPropertyGrid event. + + + + + + + Defines data for PrepareErrorTooltip AdvPropertyGrid event. + + + + + Gets or sets the SuperTooltipInfo that represent tooltip that will be displayed to provide error information. + + + + + Gets the name of the property tooltip is displayed for. + + + + + Gets reference to the exception that was thrown when property was set. + + + + + Gets the value that was set and caused the error. + + + + + Initializes a new instance of the PropertyErrorTooltipEventArgs class. + + SuperTooltipInfo for error tooltip + Property that caused error + Exception that was raised when property was set + Value that caused the error. + + + + Defines delegate for Convert Value events. + + Sender + Event data. + + + + Defines data for Convert Value events that allows custom value conversion for property grid. + + + + + Gets or sets the string property value. + + + + + Gets or sets the typed property value. + + + + + Gets the property name for which conversion is being done. + + + + + Gets the target component that property is on. + + + + + Gets or sets whether converted value is used. You need to set this property to true to indicate that you have performed value conversion. + + + + + Gets the property descriptor that describes property. + + + + + Initializes a new instance of the ConvertValueEventArgs class. + + + + + + + + + Defines delegate for Convert Value events. + + Sender + Event data. + + + + Defines data for Convert Value events that allows custom value conversion for property grid. + + + + + Gets the property name value list is needed for. + + + + + Gets the target component that property is on. + + + + + Gets or sets whether property ValueList provided is valid. You must set this property to true in order for the list to be used. + + + + + Gets or sets the list of valid property values. + + + + + Gets the property descriptor that describes property. + + + + + Initializes a new instance of the PropertyValueListEventArgs class. + + + + + + + Defines delegate for Localize AdvPropertyGrid event. + + Sender of event. + Event data. + + + + Defines data for PrepareErrorTooltip AdvPropertyGrid event. + + + + + Gets the property name UITypeEditor is looked for. + + + + + Gets the property descriptor for property UITypeEditor is looked for. + + + + + Gets or sets the instance of UITypeEditor to be used for the property. You set this property to the UITypeEditor that you want + used for the property while editing. Note that you must set EditorSpecified = true in order for this value to be used. + + + + + Gets or sets whether the value specified in UITypeEditor property is used. You must set this value to true in order for + UITypeEditor property value to be used. + + + + + Initializes a new instance of the ProvideUITypeEditorEventArgs class. + + Property Name + Property Descriptor + + + + Defines delegate for PropertyValueChanging event. + + Event sender. + Event data. + + + + Defines arguments for PropertyValueChanging event. + + + + + Gets the name of the property which value is changing. + + + + + Gets the new value that is being set on property. + + + + + Gets or sets whether value assignment was handled by your code. Set to true to cancel internal AdvPropertyGrid property value assignment. + + + + + Gets the PropertyDescriptor for the property being changed. + + + + + Gets the full property path up to the selected object. + + + + + Initializes a new instance of the PropertyValueChangingEventArgs class. + + + + + + + Initializes a new instance of the PropertyValueChangingEventArgs class. + + + + + + + Defines delegate for ValidatePropertyValue event. + + Sender + ValidatePropertyValue event arguments + + + + Defines event arguments for ValidatePropertyValue event. + + + + + Gets or sets whether validation failed. Set to true to cancel property value assignment. + + + + + Gets the name of the property which value is changing. + + + + + Gets the new value that is being set on property. + + + + + Gets the target object on which property value is set. + + + + + Gets or sets the message that is displayed to user if validation fails, i.e. Cancel=true. + + + + + Initializes a new instance of the ValidatePropertyValueEventArgs class. + + + + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets or sets the color of the node highlight when error has occurred while setting property value. + + + + + Gets or sets the color of the node highlight when property update was successful. + + + + + Gets or sets default style for property node. + + + Default value is null. + + + + + Gets or sets style for property node when in read-only state. + + + Default value is null. + + + + + Gets or sets style for property node when in read-only state. + + + Default value is null. + + + + + Gets or sets style for property node edit cell when displaying unchanged property value. + + + Default value is null. + + + + + Gets or sets style for property node when in read-only state. + + + Default value is null. + + + + + Gets or sets the image that is displayed in property name cell when property value has failed the validation. + + + + + Represents the class that stores text used by property grid control for localization purposes. + + + + + Raises the PropertyChanged event. + + Provides event arguments. + + + + Gets or sets tooltip used by Categorized toolbar button. + + + + + Gets or sets tooltip used by Alphabetical toolbar button. + + + + + Gets or sets the tooltip text used in tooltip when error occurred during property value setting. + + + + + Gets or sets the watermark text displayed in search text-box. + + + + + Occurs when property defined by AdvPropertyGridLocalization class has changed. + + + + + Represents the property category in AdvPropertyGrid. + + + + + Represents check-box style property node in AdvPropertyGrid. + + + + + Represents a property node in AdvPropertyGrid. + + + + + Initializes a new instance of the PropertyNode class. + + + + + + Releases the inline editor used by the node. + + + + + Places the node into the editing mode if possible, raises the exception if node is read-only. + + Action that caused the edit mode. + Indicates whether to focus the editor. + + + + Called after property editor is created. + + + + + Exits the editor mode. + + Action that caused the editor mode exit. + + + + Called when visual part of the node has changed due to the changes of its properties or properties of the cells contained by node. + + + + + Cancel the edit changes and applies the old property value. + + + + + Attempts to apply current edit value to the property. + + + + + Returns the full property path to the root of the selected object. + + Full property path. + + + + Starts fade background color style highlight for the property node. + + Specifies the fade background color. + + + + Applies PropertySettings to this node. + + + + + Gets or sets whether property text box is read only. Default value is false. + + + + + Gets whether node is in editing mode. + + + + + Gets or sets the property settings that are applied to this property node. + + + + + Gets or sets whether property node represents property for multiple objects. + + + + + Gets or sets whether property is password property which value is not displayed as plain text. + + + + + Defines delegate that is called after property editor is created. + + PropertyNode sender. + Reference to editor. + + + + Initializes a new instance of the PropertyNode class. + + + + + + Defines a attribute which applies an date-time editor to a property when used with AdvPropertyGrid control. Applies to DateTime property types only. + + + + + Defines base attribute for custom AdvPropertyGrid in-line property value editors. + + + + + Creates a control that is used as property value in-line editor. Control must implement IPropertyValueEditor interface. + + PropertyDescriptor for the property being edited. + Target object that owns the property. + Control that represents in-line editor. + + + + Gets or sets pre-defined format for date-time input. + + + + + Gets or sets custom format for date-time input. + + + + + Gets or sets whether empty null/nothing state of the control is allowed. Default value is false. + + + + + Gets or sets whether drop-down button that shows calendar is visible. Default value is true. + + + + + Gets or sets the minimum date that control accepts. + + + + + Gets or sets the maximum date that control accepts. + + + + + Initializes a new instance of the PropertyDateTimeEditor class. + + + + + + Initializes a new instance of the PropertyDateTimeEditor class. + + + + + + + Initializes a new instance of the PropertyDateTimeEditor class. + + + + + + + + Initializes a new instance of the PropertyDateTimeEditor class. + + + + + + + + + + + Initializes a new instance of the PropertyDateTimeEditor class. + + + + + + + Initializes a new instance of the PropertyDateTimeEditor class. + + + + + + Initializes a new instance of the PropertyDateTimeEditor class. + + + + + + + Initializes a new instance of the PropertyDateTimeEditor class. + + + + + Defines an interface that is implemented by the control that will be used by AdvPropertyGrid control to edit property value. + + + + + Focus the edit part of the control. + + + + + Gets or sets the font used by the edit part of the control. Font might be used to visually indicate that property value has changed. Implementing this property is optional. + + + + + Gets whether the edit part of the control is focused. + + + + + Gets or sets the value being edited. + + + + + Occurs when EditValue changes. Raising this even will cause the property value to be updated with the EditValue. + + + + + Defines a attribute which applies an double type numeric editor to a property when used with AdvPropertyGrid control. Applies to double property types only. + + + + + Gets or sets whether up/down button is shown. + + + + + Gets or sets the display format for the control when control does not have input focus. + + + + + Gets or sets the minimum value that can be entered. + + + + + Gets or sets the maximum value that can be entered. + + + + + Gets or sets whether empty state i.e. null/nothing value is allowed when editor is used with nullable types. + + + + + Initializes a new instance of the PropertyDoubleEditor class. + + + + + Initializes a new instance of the PropertyDoubleEditor class. + + + + + + Initializes a new instance of the PropertyDoubleEditor class. + + + + + + + Initializes a new instance of the PropertyDoubleEditor class. + + + + + + + + Initializes a new instance of the PropertyDoubleEditor class. + + + + + + + + + Initializes a new instance of the PropertyDoubleEditor class. + + + + + + + Defines a attribute which applies an integer type numeric editor to a property when used with AdvPropertyGrid control. Applies to int property types only. + + + + + Gets or sets whether up/down button is shown. + + + + + Gets or sets the display format for the control when control does not have input focus. + + + + + Gets or sets the minimum value that can be entered. + + + + + Gets or sets the maximum value that can be entered. + + + + + Gets or sets whether empty state i.e. null/nothing value is allowed when editor is used with nullable types. + + + + + Initializes a new instance of the PropertyIntegerEditor class. + + + + + Initializes a new instance of the PropertyIntegerEditor class. + + + + + + Initializes a new instance of the PropertyIntegerEditor class. + + + + + + + Initializes a new instance of the PropertyIntegerEditor class. + + + + + + + + Initializes a new instance of the PropertyIntegerEditor class. + + + + + + + + + Initializes a new instance of the PropertyIntegerEditor class. + + + + + + + Defines multiple choice, option or check-boxes, in-line AdvPropertyGrid property value editor. + + + + + Initializes a new instance of the PropertyMultiChoiceEditor class. + + + + + Initializes a new instance of the PropertyMultiChoiceEditor class. + + + + + + Initializes a new instance of the PropertyMultiChoiceEditor class. + + + + + + + Initializes a new instance of the PropertyMultiChoiceEditor class. + + + + + + + Initializes a new instance of the PropertyMultiChoiceEditor class. + + + + + + + Initializes a new instance of the PropertyMultiChoiceEditor class. + + + + + + Initializes a new instance of the PropertyMultiChoiceEditor class. + + + + + + Initializes a new instance of the PropertyMultiChoiceEditor class. + + + + + + + Initializes a new instance of the PropertyMultiChoiceEditor class. + + + + + + + Initializes a new instance of the PropertyMultiChoiceEditor class. + + + + + + + Initializes a new instance of the PropertyMultiChoiceEditor class. + + + + + + + + Initializes a new instance of the PropertyMultiChoiceItemEditor class. + + + + + + + Represents the option list property node for AdvPropertyGrid. + + + + + Initializes a new instance of the PropertyNode class. + + + + + + Describes the property settings applied to the property on AdvPropertyGrid control. + + + + + Initializes a new instance of the PropertySettings class. + + + + + Initializes a new instance of the PropertySettings class. + + + + + + Initializes a new instance of the PropertySettings class. + + + + + + Raises the ConvertPropertyValueToString event. + + Provides event data + + + + Raises the ConvertFromStringToPropertyValue event. + + Provides event data + + + + Raises the ProvidePropertyValueList event. + + Provides event data + + + + Called when TypeConverter property has changed. + + Old property value + New property value + + + + Raises PropertyChanged event. + + Event data. + + + + Occurs when property value is being converted to text representation for display. You can handle this event + to provide custom conversion for property values. You must set IsConverted=true on event arguments to indicate that you have performed value conversion. + + + + + Occurs when text entered by user is being converted to typed property value to be assigned to the property. You can handle this event + to provide custom conversion for property values. You must set IsConverted=true on event arguments to indicate that you have performed value conversion. + + + + + Occurs when property looks for the list of valid values for the property to show on either drop-down or use + in auto-complete list. For example when property type is enum the internal implementation will convert available enum + values into string list and use on drop-down and in auto-complete list. You can use this event to provide + custom value list in combination with ConvertPropertyValueToString, ConvertFromStringToPropertyValue events. + You must set IsListValid=true on event arguments to indicate that list your provided should be used. + + + + + Gets or sets read-only property style. + + + Default value is null. + + + + + Gets or sets whether property is in read-only state. Default value is false. + + + + + Gets or sets the SuperTooltip that is displayed when property is in read-only state (ReadOnly=true). + + + + + Gets or sets the SuperTooltip that is assigned to the property. + + + + + Gets or sets the image that is displayed next to the property name in the grid. + + + + + Gets or sets the image alignment in relation to the property name inside of the grid cell. + + + + + Gets or sets the custom category node will be placed in instead of category specified by Category attribute. + + + + + Gets or sets the custom property name that is displayed in the grid instead of the real property name. + + + + + Gets or sets the name of the property that is managed by this informational object. If you set PropertyDescriptor than that is the value + that will be used by the control regardless of PropertyName value. + If you set PropertyName but not PropertyDescriptor then all properties with given name + regardless of type will use these settings. + + + + + Gets or sets property descriptor that identifies the property settings apply to. If you set PropertyDescriptor than that is the value + that will be used by the control regardless of PropertyName value. + If you set PropertyName but not PropertyDescriptor then all properties with given name + regardless of type will use these settings. + + + + + Gets or sets default property style. + + + Default value is null. + + + + + Gets or sets the UITypeEditor used to edit the property. + + + + + Gets or sets the custom in-line property value editor. Property value editor is created by inheriting from PropertyValueEditor class. + + + + + Gets or sets whether node is visible in property grid. Default value is true. + + + + + Gets or sets the property node type that is used to edit this property value. Note that content of property grid would need to be + reloaded to apply any changes to this property. + + + + + Gets or sets the property description that overrides description specified on property through DescriptionAttribute. + Default value is null. + + + + + Gets or sets custom TypeConverter assigned to the property which will override any TypeConverter that is returned by the PropertyDescriptor. + + + + + Occurs when property value on the object changes. + + + + + Defines the type of the property node in grid that is assigned to property. + + + + + Specifies default node type for the property. + + + + + Specifies the node type that is constructed as group of option buttons that represent all values for the property. Works best + for smaller set of Enum values. + + + + + Defines exception which is thrown when property value fails the validation in AdvPropertyGrid.ValidatePropertyValue event. + + + + + Initializes a new instance of the InvalidPropertyValueException class. + + + + + Defines Advanced Property Grid Node for Color type. + + + + + Initializes a new instance of the PropertyNode class. + + + + + + Initializes a new instance of the PropertyNodeFactory class. + + + + + + Initializes a new instance of the PropertyParser class. + + + + + + Initializes a new instance of the PropertyParser class. + + + + + + Initializes a new instance of the PropertyParser class. + + + + + + Initializes a new instance of the PropertyParser class. + + + + + + Initializes a new instance of the PropertyGridInfoCollection class. + + + + + + Gets property info object based on property name. + + Property name. + PropertyGridInfo instance or null if it cannot be found. + + + + Gets property info object based on property descriptor. + + Property descriptor. + PropertyGridInfo instance or null if it cannot be found. + + + + Returns property setting based on property descriptor or name if property descriptor is not set on property settings + Property descriptor takes precedence. + + Property descriptor to look for. + Property Name to look for. + Property settings instance or null + + + + Gets the owner of the collection. + + + + + Defines a attribute which applies an slider in-line editor to a property when used with AdvPropertyGrid control. + + + + + Gets or sets the minimum slider value. + + + + + Gets or sets the maximum slider value. + + + + + Gets or sets whether slider text label is visible. + + + + + Gets or sets the slider label width. Default value is 18. + + + + + Gets or sets label text color. + + + + + Initializes a new instance of the PropertySliderEditor class. + + Minimum value for slider. + Maximum value for slider. + + + + Initializes a new instance of the PropertySliderEditor class. + + + + + + + + Initializes a new instance of the PropertySliderEditor class. + + + + + + + + + + Initializes a new instance of the PropertySliderEditor class. + + + + + + + + Initializes a new instance of the PropertySliderEditor class. + + + + + + + + + Creates a control that is used as property value in-line editor. Control must implement IPropertyValueEditor interface. + + PropertyDescriptor for the property being edited. + Target object that owns the property. + Control that represents in-line editor. + + + + Defines Radial Menu control. + + + + + Initializes a new instance of the RadialMenu class. + + + + + Raises BeforeMenuClose event. + + Provides event arguments. + + + + Raises BeforeMenuOpen event. + + Provides event arguments. + + + + Raises MenuOpened event. + + Provides event arguments. + + + + Raises MenuClosed event. + + Provides event arguments. + + + + Gets or sets whether radial menu is open. + + + + + Called when Image property has changed. + + Old property value + New property value + + + + Called when IsOpen property has changed. + + Old property value + New property value + + + + Sets whether radial menu is open and provides the source of the action. + + true to open menu, false to close it. + Source of the action. + + + + Returns the collection of items with the specified name. + + Item name to look for. + + + + + Returns the collection of items with the specified name and type. + + Item name to look for. + Item type to look for. + + + + + Returns the collection of items with the specified name and type. + + Item name to look for. + Item type to look for. + Indicates whether GlobalName property is used for searching. + + + + + Returns the first item that matches specified name. + + Item name to look for. + + + + + Raises ItemAdded event. + + Reference to item. + Provides event arguments. + + + + Raises ItemRemoved event. + + Reference to item. + Provides event arguments. + + + + Raises ItemMouseEnter event. + + Reference to item. + Provides event arguments. + + + + Raises ItemMouseHover event. + + Reference to item. + Provides event arguments. + + + + Raises ItemMouseLeave event. + + Reference to item. + Provides event arguments. + + + + Raises ItemMouseDown event. + + Reference to item. + Provides event arguments. + + + + Raises ItemMouseUp event. + + Reference to item. + Provides event arguments. + + + + Raises ItemMouseMove event. + + Reference to item. + Provides event arguments. + + + + Raises ItemClick event. + + Reference to item. + Provides event arguments. + + + + Raises ItemDoubleClick event. + + Reference to item. + Provides event arguments. + + + + Raises ItemExpandedChanged event. + + Reference to item. + Provides event arguments. + + + + Raises ItemTextChanged event. + + Provides event arguments. + + + + Raises ItemTooltipShowing event. + + Provides event arguments. + + + + Occurs before menu is closed and allows you to cancel closing. + + + + + Occurs before menu has been opened and allows you to cancel opening + + + + + Occurs after menu has been opened. + + + + + Occurs after menu is closed.Occurs after menu is closed. + + + + + Specifies the width of the sub-menu edge around the radial menu. + + + + + Indicates spacing between sub-menu marking edge and the item. + + + + + Gets or sets radial menu diameter. Minimum value is 64. + + + + + Gets reference to colors used by the radial menu. + + + + + Indicates the size of the back symbol that is displayed on center of radial menu + + + + + Specifies the back button symbol. + + + + + Gets or sets the symbol set used to represent the Symbol. + + + + + Indicates diameter of center button of radial menu. + + + + + Specifies the maximum pie part angle an item will occupy. Maximum is 180, minimum is 1 degree. + + + + + Indicates maximum radial angle single item in menu can consume. By default this property is set to zero which indicates that + radial menu is equally divided between visible menu items. + + + + + Indicates the position of top-left corner of radial menu when shown in screen coordinates + + + + + Indicates image displayed in center of the radial menu. + + + + + Indicates symbol displayed in center of the radial menu. When set, it overrides any Image settings. + + + + + Gets or sets the symbol set used to represent the Symbol. + + + + + Indicates the size of the symbol in points. + + + + + Gets or sets whether radial menu is open. + + + + + Returns collection of items on a bar. + + + + + Indicates whether border, a circle is rendered around the selected symbol which represents radial menu. Default value is true. + + + + + Gets or sets whether shortcut processing for the items hosted by this control is enabled. Default value is true. + + + + + Indicates whether radial menu is closed automatically when app is deactivated. Default value is true, if set to false + you are responsible for closing the menu. + + + + + Gets or sets whether hooks are used for internal DotNetBar system functionality. Using hooks is recommended only if DotNetBar is used in hybrid environments like Visual Studio designers or IE. + + + + + Indicates the radial menu type. eRadialMenuType.Segment menu type allows for display of image, text and any sub-menu items. + eRadialMenuType.Circular allows only for display of Symbol or Image and it does not display either text or sub-menu items. + eRadialMenuType.Circular is designed to be used for single level menus only that don't need text. + + + + + Indicates whether control automatically scales the items if the parent Form performs scaling due to AutoScale settings. + + + + + Indicates accessibility help string + + + + + Returns whether control has any popups registered. + + + + + Indicates whether shortcuts handled by items are dispatched to the next handler or control. + + + + + Indicates whether items show tooltips. + + + + + Indicates whether item shortcut is displayed in Tooltips. + + + + + Gets or sets whether accelerator letters on buttons are underlined. Default value is false which indicates that system setting is used + to determine whether accelerator letters are underlined. Setting this property to true + will always display accelerator letter underlined. + + + + + Gets or sets whether gray-scale algorithm is used to create automatic gray-scale images. Default is true. + + + + + Occurs after an item has been added to items collection. + + + + + Occurs after an item has been removed from items collection. + + + + + Occurs when mouse pointer enters boundaries of an item. + + + + + Occurs when mouse pointer hovers over an item. + + + + + Occurs when mouse pointer leaves boundaries of an item. + + + + + Occurs when mouse button is pressed on item. + + + + + Occurs when mouse button is released on item. + + + + + Occurs when mouse moves over an item. + + + + + Occurs when an item is clicked. + + + + + Occurs when an item is double-clicked. + + + + + Occurs when an item Expanded property value has changed. + + + + + Occurs when an item Text property value has changed. + + + + + Occurs when tooltip for an item is about to be displayed. + + + + + Defines colors used by Radial Menu Component. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Raises the PropertyChanged event. + + Event arguments + + + + Gets or sets the color of the Radial Menu button background. + + + + + Gets or sets the color of the radial menu button border. + + + + + Gets or sets the color of the Radial Menu background. + + + + + Gets or sets the color of the Radial Menu border + + + + + Gets or sets the color of border for mouse over state for the radial menu item expand part. + + + + + Gets or sets the color of the radial menu border for parts where items do not have sub-items, i.e. non-active area of the border. + + + + + Gets or sets the color of the expand sign which shows menu item sub-items. + + + + + Gets or sets the color of the radial menu item text. + + + + + Gets or sets the color of the radial menu item mouse over background. + + + + + Gets or sets the color of the radial menu item mouse over foreground. + + + + + Gets or sets the color of the radial menu item foreground when disabled. + + + + + Gets or sets background color of the circular menu item type. Applies only to circular menu types. + + + + + Gets or sets text color of the circular menu item type. Applies only to circular menu types. + + + + + Gets or sets border color of the circular menu item type. Applies only to circular menu types. + + + + + Occurs when property value has changed. + + + + + Initializes a new instance of the RadialMenuContainer class. + + + + + Returns copy of the item. + + + + + Copies the RadialMenuItem specific properties to new instance of the item. + + New ProgressBarItem instance. + + + + Copies the RadialMenuItem specific properties to new instance of the item. + + New RadialMenuItem instance. + + + + Raises Opened event. + + Provides event arguments. + + + + Raises Closed event. + + Provides event arguments. + + + + Called when OpenState property has changed. + + Old property value + New property value + + + + Closes currently open popup. + + + + + Called when MaxItemRadialAngle property has changed. + + Old property value + New property value + + + + Called when Diameter property has changed. + + Old property value + New property value + + + + Called when CenterButtonDiameter property has changed. + + Old property value + New property value + + + + Called when SubMenuEdgeWidth property has changed. + + Old property value + New property value + + + + Called when SubMenuEdgeItemSpacing property has changed. + + Old property value + New property value + + + + Return Sub Item at specified location + + + + + Called when MenuLocation property has changed. + + Old property value + New property value + + + + Called when RadialMenu property has changed. + + Old property value + New property value + + + + Gets the current expanded subitem. + + + + + + Called when BackSymbolSize property has changed. + + Old property value + New property value + + + + Called when BackSymbol property has changed. + + Old property value + New property value + + + + Called when BackButtonSymbolSet property value changes. + + Indciates old value + Indicates new value + + + + Called when MaxItemPieAngle property has changed. + + Old property value + New property value + + + + Called when MenuType property has changed. + + Old property value + New property value + + + + Called when Symbol property has changed. + + Old property value + New property value + + + + Called when SymbolSet property value changes. + + Indciates old value + Indicates new value + + + + Called when SymbolSize property has changed. + + Old property value + New property value + + + + Called when Image property has changed. + + Old property value + New property value + + + + Called when Font property has changed. + + Old property value + New property value + + + + Occurs after radial menu is opened. + + + + + Occurs after radial menu is closed. + + + + + Returns internal popup control for radial menu. + + + + + Indicates maximum radial angle single item in menu can consume. By default this property is set to zero which indicates that + radial menu is equally divided between visible menu items. + + + + + Returns diameter which takes in account current scaling factor. + + + + + Gets or sets radial menu diameter. Minimum value is 64. + + + + + Returns actual center button diameter which takes in account current scale factor. + + + + + Indicates diameter of center button of radial menu. + + + + + Specifies the width of the sub-menu edge around the radial menu. + + + + + Indicates spacing between sub-menu marking edge and the item. + + + + + Indicates the position of top-left corner of radial menu when shown in screen coordinates + + + + + Indicates the size of the back symbol that is displayed on center of radial menu + + + + + Specifies the back button symbol. + + + + + Gets or sets the symbol set used to represent the Symbol. + + + + + Specifies the maximum pie part angle an item will occupy. Maximum is 180, minimum is 1 degree. + + + + + Gets reference to colors used by the radial menu. + + + + + Indicates the radial menu type. eRadialMenuType.Radial menu type allows for display of image, text and any sub-menu items. + eRadialMenuType.Circular allows only for display of Symbol or Image and it does not display either text or sub-menu items. + eRadialMenuType.Circular is designed to be used for single level menus only that don't need text. + + + + + Gets the realized symbol string. + + + + + Indicates the symbol displayed on face of the button instead of the image. Setting the symbol overrides the image setting. + + + + + Gets or sets the symbol set used to represent the Symbol. + + + + + Indicates the size of the symbol in points. + + + + + Gets or sets the image displayed on the item. + + + + + Specifies font for menu items. + + + + + Initializes a new instance of the RadialSubItemInfo class. + + + + + + + + + Initializes a new instance of the RadialMenuPopupProxy class. + + + + + + Defines available radial menu type. + + + + + Defines Radial Menu Item. + + + + + Raises CheckedChanged event. + + Provides event arguments. + + + + Called when DisplayPath property has changed. + + Old property value + New property value + + + + Returns copy of the item. + + + + + Copies the RadialMenuItem specific properties to new instance of the item. + + New ProgressBarItem instance. + + + + Copies the RadialMenuItem specific properties to new instance of the item. + + New RadialMenuItem instance. + + + + Called when Symbol property has changed. + + Old property value + New property value + + + + Called when SymbolSet property value changes. + + Indciates old value + Indicates new value + + + + Called when SymbolSize property has changed. + + Old property value + New property value + + + + Called when Image property has changed. + + Old property value + New property value + + + + Called when DisabledImage property has changed. + + Old property value + New property value + + + + Called when TextVisible property has changed. + + Old property value + New property value + + + + Called when TracksMouse property has changed. + + Old property value + New property value + + + + Called when Checked property has changed. + + Old property value + New property value + + + + Called when TextOffset property has changed. + + Old property value + New property value + + + + Raises BeforeMenuOpened event. + + Provides event arguments. + + + + Raises BeforeMenuClosed event. + + Provides event arguments. + + + + Called when CircularMenuDiameter property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Occurs after Checked property has changed. + + + + + Gets display path of the item. + + + + + Gets the realized symbol string. + + + + + Indicates the symbol displayed on face of the button instead of the image. Setting the symbol overrides the image setting. + + + + + Gets or sets the symbol set used to represent the Symbol. + + + + + Indicates the size of the symbol in points. + + + + + Gets or sets the image displayed on the item. + + + + + Gets or sets the disabled image for the item when Enabled is set to false. + + + + + Indicates whether text on item is visible. + + + + + Gets whether mouse is over the item. + + + + + Indicates whether item changes its appearance when mouse is over it or pressed + + + + + Indicates whether item is in checked state. + + + + + Gets or sets the optional text offset for the item. + + + + + Gets or sets a value indicating whether the item is expanded or not. For Popup items this would indicate whether the item is popped up or not. + + + + + Occurs before radial menu item is expanded and its sub-items displayed. + + + + + Occurs before radial menu item is closed + + + + + Control Container (System.Windows.Forms.Control or its descendant) + + + + + Specifies explicit circular menu type diameter. Applies to circular menu type only. + + + + + Gets or sets background color of the circular menu item type. Applies only to circular menu types. + + + + + Gets or sets text color of the circular menu item type. Applies only to circular menu types. + + + + + Gets or sets border color of the circular menu item type. Applies only to circular menu types. + + + + + Initializes a new instance of the RadialMenuPopup class. + + + + + Called when DisplayItem property has changed. + + Old property value + New property value + + + + Returns the renderer control will be rendered with. + + The current renderer. + + + + Returns the color scheme used by control. Color scheme for Office2007 style will be retrieved from the current renderer instead of + local color scheme referenced by ColorScheme property. + + An instance of ColorScheme object. + + + + Identifies the item displayed by this popup. + + + + + Gets or sets the content image displayed on the window. + + + + + Gets or sets the rendering mode used by control. Default value is eRenderMode.Global which means that static GlobalManager.Renderer is used. If set to Custom then Renderer property must + also be set to the custom renderer that will be used. + + + + + Gets or sets the custom renderer used by the items on this control. RenderMode property must also be set to eRenderMode.Custom in order renderer + specified here to be used. + + + + + Represents rating item control which provides rating functionality. + + + + + Initializes a new instance of the RatingItem class. + + + + + Copies the ButtonItem specific properties to new instance of the item. + + New ButtonItem instance. + + + + Raises the AverageRatingChanged event. + + Event data. + + + + Raises the ParseAverageRatingValue event. + + Provides event arguments. + + + + Sets the Rating value of the control and provides information about source of the rating change. + + New Rating value. + Source of this change. + + + + Raises RatingChanging event. + + Event data + + + + Raises the RatingChanged event. + + Event data. + + + + Raises the ParseRating event. + + Provides event arguments. + + + + Occurs when Rating property has changed. + + + + + Occurs when RatingValue property has changed. + + + + + Occurs when Rating property is about to be changed and provides opportunity to cancel the change. + + + + + Occurs when AverageRating property has changed. + + + + + Occurs when AverageRatingValue property has changed. + + + + + Occurs when text markup link is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + Occurs when RatingValue property is set and it allows you to provide custom parsing for the values. + + + + + Occurs when AverageRatingValue property is set and it allows you to provide custom parsing for the values. + + + + + Gets or sets the average rating shown by control. Control will display average rating (if set) when no explicit + Rating value is set through Rating property. Minimum value is 0 and Maximum value is controlled by NumberOfStars property value. + + + + + Gets or sets the AverageRating property. This property is provided for Data-Binding with NULL value support. + + + + + Gets or sets the rating value represented by the control. Default value is 0 which indicates + that there is no rating set. Maximum value is controlled by NumberOfStars property. + + + + + Gets or sets the Rating property value. This property is provided for Data-Binding with NULL value support. + + + + + Gets or sets whether rating can be edited. Default value is true. + + + + + Specifies the control background style. Default value is an empty style which means that container does not display any background. + + + + + Gets the reference to custom rating images. + + + + + Gets or sets whether text assigned to the check box is visible. Default value is true. + + + + + Gets or sets the text color. Default value is Color.Empty which indicates that default color is used. + + + + + Gets or sets the spacing between optional text and the rating. + + + + + Gets or sets the orientation of rating control. + + + + + Indicates number of stars used for the rating. Minium value is 2 stars. + + + + + Gets whether item supports text markup. Default is false. + + + + + Gets or sets whether text-markup support is enabled for items Text property. Default value is true. + Set this property to false to display HTML or other markup in the item instead of it being parsed as text-markup. + + + + + Initializes a new instance of the RatingImage structure. + + + + + + + Defines the custom rating images for Rating control. + + + + + Initializes a new instance of the RatingImages class. + + + + + Gets or sets the image used for unrated rating part. + + + + + Gets or sets the image used for unrated rating part when mouse is over the control. + + + + + Gets or sets the image used for rated part of the control. + + + + + Gets or sets the image used for Average Rated part of the control. + + + + + Gets or sets the image used for rated part of the control when mouse is over the control. + + + + + Delegate for Rating change events. + + + + + Represents event arguments for Rating change events. + + + + + New Rating value being assigned. + + + + + Previous or current value (if RatingChanging event). + + + + + Indicates the action that has caused the event. + + + + + Initializes a new instance of the RatingChangeEventArgs class. + + + + + + + + Represents color table for CrumbBarItemView. + + + + + Gets or sets the default state color table. + + + + + Gets or sets active mouse over color table. + + + + + Gets or sets inactive part mouse over color table. + + + + + Gets or sets the pressed color table. + + + + + Defines state color table for CrumbBarItemView + + + + + Gets or sets foreground/text color. + + + + + Gets or sets the background color blend collection. + + + + + Gets or sets the border color. + + + + + Gets or sets the border color. + + + + + Represents the color table for Office 2007 Style CalendarView Control. + + + + + Initializes ColorScheme object with the black color scheme. + + ColorScheme object to initialize. + + + + Defines colors for the WarningBox control. + + + + + Gets or sets the background color of WarningBox control. + + + + + Gets or sets the border color of the warning panel. + + + + + Gets or sets the back color of the warning panel. + + + + + Gets or sets the end gradient back color of the warning panel. + + + + + Gets or sets the background color of WarningBox control. + + + + + Gets or sets the border color of the warning panel. + + + + + Gets or sets the back color of the warning panel. + + + + + Gets or sets the end gradient back color of the warning panel. + + + + + Gets or sets the background color of WarningBox control. + + + + + Gets or sets the border color of the warning panel. + + + + + Gets or sets the back color of the warning panel. + + + + + Gets or sets the end gradient back color of the warning panel. + + + + + Gets or sets the background color of WarningBox control. + + + + + Gets or sets the border color of the warning panel. + + + + + Gets or sets the back color of the warning panel. + + + + + Gets or sets the end gradient back color of the warning panel. + + + + + Renders the Range Slider items. + + + + + Gets or sets color table used by renderer. + + + + + Defines the color table for the Range Slider Item in single state. + + + + + Gets or sets the colors for the slider which changes the minimum value of the range. + + + + + Gets or sets the colors for the slider which changes the maximum value of the range. + + + + + Gets or sets the tick line color. + + + + + Gets or sets the color for the line which indicates current range value. + + + + + Gets or sets the background colors of the current range value. + + + + + Gets or sets the color for the line showing control range. + + + + + Gets or sets the background colors for the line showing control range. + + + + + Gets or sets the corner radius for the range rectangle. + + + + + Defines the color table for the Range Slider Item in single state. + + + + + Gets or sets the default state colors. + + + + + Gets or sets the mouse over state colors. + + + + + Gets or sets the mouse pressed colors. + + + + + Gets or sets the disabled colors. + + + + + Initializes a new instance of the Office2010RangeChangePartColorTable class. + + + + + Initializes a new instance of the Office2010RangeChangePartColorTable class. + + + + + + + + Gets or sets the part background colors. + + + + + Gets or sets the part border color + + + + + Gets or sets the part border light color + + + + + Represents color table for Office 2010 style. + + + + + Represents color table for Office 2007 style. + + + + + Defines the provider for the element style classes support. + + + + + Returns the instance of the ElementStyle with given class name or null if there is no class with that name defined. + + Class name. See static members of ElementStyleClassKeys class for the list of available keys. + Instance of ElementStyle for given class name or null if class cannot be found. + + + + Creates new instance of the object. + + + + + Initializes a new instance of the Office2007ColorTable class. + + Specifies the color factory for the color table. + + + + Creates new instance of the object. + + + + + Creates new instance of the object. + + + + + Creates new instance of the color table and initializes it with custom color scheme. + + Predefined color scheme to be used as starting color scheme. + Color to use as basis for new color scheme + + + + Gets or sets the RibbonBar color table. + + + + + Gets or sets the background colors for the ItemContainer with BeginGroup property set to true. + + + + + Gets or sets the background colors for the Bar object. + + + + + Gets or sets the colors for the RibbonControl. + + + + + Gets or sets the colors for the ColorItem which is used by drop-down Color Picker. + + + + + Gets or sets the color table for menus. + + + + + Gets or sets the color table for ComboBoxItem. + + + + + Gets or sets the colors for the Ribbon Bar dialog launcher button. + + + + + Gets or sets the legacy color scheme object that applies to the user interface elements not covered by color table. + + + + + Gets or sets the color table of the system buttons displayed in form caption. + + + + + Gets or sets the color table of the close system button displayed in form caption. Applies to Office 2010 styles and later only. + + + + + Gets or sets the color table for the form caption. + + + + + Gets or sets the bacgkround colors for the quick access toolbar. + + + + + Gets or sets the colors for the tab and tab strip control. + + + + + Gets or sets the colors for the tab strip control used on docking windows. When not set TabControl color scheme is used. + + + + + Gets or sets the KeyTips color table. + + + + + Gets or sets the color table for the CheckBoxItem. + + + + + Gets or sets the scroll bar colors. + + + + + Gets or sets the application style scroll bar colors. + + + + + Gets or sets the color table for the ProgressBarItem. + + + + + Gets or sets the color table for the paused ProgressBarItem. + + + + + Gets or sets the color table for the error state of ProgressBarItem. + + + + + Gets or sets the color table for the galleries. + + + + + Gets or sets the color table for the NavigationPane control. + + + + + Gets or sets the color table for the Slider item. + + + + + Gets or sets the color table for the Range Slider item. + + + + + Gets the SuperTooltip color table. + + + + + Gets the color table for the ListViewEx control. + + + + + Gets the color table for the ListViewEx control. + + + + + Gets the color table used by SideBar control. + + + + + Gets or sets the color table for AdvTree control. + + + + + Gets or sets the CrumBarItem color table. + + + + + Gets the color table used by Schedule control. + + + + + Gets or sets SwitchButton color table. + + + + + Gets or sets the colors for the StepItem used in ProgressSteps control. + + + + + Gets or sets the colors for the ListBoxItem used in ListBoxAdv control. + + + + + Gets or sets the color table for the radial menu. + + + + + Gets or sets color table for TokenEditor control tokens. + + + + + Gets or sets color table for Flyout control. + + + + + Gets or sets the colors for the SideNav control. + + + + + Gets or sets the color tables for the TabFormItem. The key is the string representation of a eTabFormItemColor value. + + + + + Returns the instance of the ElementStyle with given class name or null if there is no class with that name defined. + + Class name. See static members of ElementStyleClassKeys class for the list of available keys. + Instance of ElementStyle for given class name or null if class cannot be found. + + + + Gets the reference to collection of Office2007ButtonItemColorTable objects the describe colors used by a button with Office 2007 style. + The collection by default has elements that are created to + represents the members of eButtonColor enumeration. The name of each color table object is the same as the string + enum representation. You can add custom members to this collection or modify the existing ones. Note that you must specify the + unique name for the new color table elements. Name specified there can be used in ButtonItem.CustomColorName property to specify + custom color table for an ButtonItem. + + + + + Gets the reference to collection of Office2007ButtonItemColorTable objects the describe colors used by a button with Office 2007 style when + button is on RibbonBar control. When collection is empty the values from the ButtonItemColors collections are used instead. + + + + + Gets the reference to collection of Office2007ButtonItemColorTable objects the describe colors used by a button with Office 2007 style when + button is on menu bar. When collection is empty the values from the ButtonItemColors collections are used instead. + + + + + Gets the reference to collection of Office2007ButtonItemColorTable objects the describe colors used by Ribbon Application Menu Button in Office 2010 style. + + + + + Gets the reference to collection of Office2007ButtonItemColorTable objects the describe colors used by buttons that are on Backstage tab-strip. + + + + + Gets the reference to collection of Office2007ButtonItemColorTable objects the describe colors used by buttons that are on NavigationPane control. Currently used for Office 2010 style only. When empty ButtonItemColors is used. + + + + + Gets the reference to collection of Office2007RibbonTabItemColorTable objects the describe colors used by a ribbon tab with Office 2007 style. + The collection by default has elements that are created to + represents the members of eRibbonTabColor enumeration. The name of each color table object is the same as the string + enum representation. You can add custom members to this collection or modify the existing ones. Note that you must specify the + unique name for the new color table elements. Name specified there can be used in RibbonTabItem.CustomColorName property to specify + custom color table for an ButtonItem. + + + + + Gets the reference to collection of Office2007RibbonTabGroupColorTableCollection objects the describe colors used by a ribbon tab groups with Office 2007 style. + The collection by default has elements that are created to + represents the members of eRibbonTabGroupColor enumeration. The name of each color table object is the same as the string + enum representation. You can add custom members to this collection or modify the existing ones. Note that you must specify the + unique name for the new color table elements. + + + + + Returns the color scheme table was initialized with. + + + + + Get the reference to the collection that holds system cached styles. In most cases there is no need for you to modify members of this collection. + + + + + Gets or sets whether images like Start button image, are cloned when painted. This is reduces the performance but is necessary if they can be accessed from multiple threads. + + + + + Gets the reference to collection of contextual color tables that are based on items Control container type and other context properties. + When contextual color table is defined it overrides the default color table. + + + + + Initializes a new instance of the Office2010ColorTable class. + + + + + Gets the color scheme color table is initialized with. + + + + + Defines the color scheme type for the Office2010ColorTable. + + + + + Silver color scheme. + + + + + Blue color scheme. + + + + + Black color scheme. + + + + + Visual Studio 2010 Blue color scheme. + + + + + Specifies colors for StepIndicator control. + + + + + Initializes a new instance of the StepIndicatorColorTable class. + + + + + Initializes a new instance of the StepIndicatorColorTable class. + + + + + + + Gets or sets Background color of the control. + + + + + Gets or sets indicator color. + + + + + Defines the color table for SuperTab states + + + + + Event raised when the SuperTabColorTable is changed + + + + + Gets or sets the Background color + + + + + Gets or sets the colors for the outer border. + + + + + Gets or sets the colors for the inner border. + + + + + Gets or sets the ControlBoxDefault colors + + + + + Gets or sets the ControlBoxMouseOver colors + + + + + Gets or sets the ControlBoxPressed colors + + + + + Gets or sets the colors for the InsertMarker. + + + + + Gets or sets the color for the SelectionMarker. + + + + + Gets whether the ColorTable is empty. + + + + + Defines the colors for the SuperTabControlBox states + + + + + Event raised when the SuperTabControlBoxStateColorTable is changed + + + + + Gets or sets the colors for the background. + + + + + Gets or sets the colors for the border. + + + + + Gets or sets the colors for the drawn image. + + + + + Defines the color table for SuperTabItem states + + + + + Event raised when the SuperTabItemColorTable is changed + + + + + Gets or sets the Default tab color settings + + + + + Gets or sets the Left Aligned tab color settings + + + + + Gets or sets the Bottom Aligned tab color settings + + + + + Gets or sets the Right Aligned tab color settings + + + + + Event raised when the SuperTabColorStates is changed + + + + + Gets or sets the tab colors when the tab is not selected, and the mouse is not over it + + + + + Gets or sets the tab colors when the tab is selected, but the mouse is not over the it + + + + + Gets or sets the tab colors when the tab is not selected, but the mouse is over it + + + + + Gets or sets the tab colors when the tab is selected, and the mouse is over it + + + + + Gets or sets the tab colors when the tab + is disabled, is not selected, and the mouse is not over it + + + + + Defines the colors for the SuperTabItem states + + + + + Event raised when the SuperTabItemStateColorTable is changed + + + + + Gets or sets the background colors. + + + + + Gets or sets the outer border color. + + + + + Gets or sets the inner border color. + + + + + Gets or sets the text color. + + + + + Gets or sets the Close Marker color. + + + + + Gets or sets the Selection Marker color. + + + + + Event raised when the SuperTabLinearGradientColorTable is changed + + + + + Gets or sets the Gradient Colors + + + + + Gets or sets the Gradient Color Positions + + + + + Gets or sets the Gradient angle + + + + + Gets or sets whether the Gradient will adapt to changes in the TabAlignment + + + + + Gets whether color definition is empty + + + + + Defines the colors for the SuperTabPanel + + + + + Event raised when the SuperTabPanelColorTable is changed + + + + + Gets or sets the Default tab panel color settings + + + + + Gets or sets the Left Aligned tab panel color settings + + + + + Gets or sets the Bottom Aligned tab panel color settings + + + + + Gets or sets the Right Aligned tab panel color settings + + + + + Event raised when the SuperTabPanelItemColorTable is changed + + + + + Gets or sets the background colors. + + + + + Gets or sets the colors for the outer border. + + + + + Gets or sets the colors for the inner border. + + + + + GetOffice2010BackstageColorTable + + Office2010BackstageColorTable + + + + GetOffice2010BackstageBlueColorTable + + + + Office2010BackstageBlueColorTable + + + + GetVS2010BackstageBlueColorTable + + + + Office2010BackstageBlueColorTable + + + + GetOffice2010BackstageBlackColorTable + + + + Office2010BackstageBlackColorTable + + + + GetOffice2010BackstageSilverColorTable + + + + Office2010BackstageSilverColorTable + + + + GetOffice2007BackstageVistaGlassColorTable + + + + Office2010BackstageVistaGlassColorTable + + + + GetOffice2010BackstageSilverColorTable + + + + Office2010BackstageSilverColorTable + + + + GetOffice2010BackstageItemColorTable + + Office2010BackstageItemColorTable + + + + GetOffice2010BackstageBlueItemColorTable + + + + Office2010BackstageBlueItemColorTable + + + + GetOffice2010BackstageBlackItemColorTable + + + + Office2010BackstageBlackItemColorTable + + + + GetOffice2010BackstageSilverItemColorTable + + + + Office2010BackstageSilverItemColorTable + + + + GetOffice2007BackstageVistaGlassItemColorTable + + + + Office2010BackstageVistaGlassItemColorTable + + + + GetOffice2010BackstageSilverItemColorTable + + + + + Office2010BackstageSilverItemColorTable + + + + GetOffice2010BackstagePanelColorTable + + Office2010BackstagePanelColorTable + + + + GetOffice2010BackstageBluePanelColorTable + + + + Office2010BackstageBluePanelColorTable + + + + GetOffice2010BackstageBlackPanelColorTable + + + + Office2010BackstageBlackPanelColorTable + + + + GetOffice2010BackstageSilverPanelColorTable + + + + Office2010BackstageSilverPanelColorTable + + + + GetOffice2007BackstageVistaGlassPanelColorTable + + + + Office2010BackstageVistaGlassPanelColorTable + + + + GetOffice2010BackstageSilverPanelColorTable + + + + Office2010BackstageSilverPanelColorTable + + + + Defines color table for the SwitchButton control. + + + + + Gets or set the text/caption color. + + + + + Gets or sets the OFF text color. + + + + + Gets or sets the ON text color. + + + + + Gets or sets the button border color. + + + + + Gets or sets background color of OFF switch part. + + + + + Gets or sets background color of ON switch part. + + + + + Gets or sets the switch border color. + + + + + Gets or sets the switch background color. + + + + + Gets or sets the switch background color when in ON state, i.e. Value=true. When set to Color.Empty SwitchBackColor is always used. + + + + + Gets default disabled color scheme for the switch button. + + + + + Gets or sets default Switch Button color table. + + + + + Gets or sets the disabled Switch Button color table. + + + + + Represents the Windows 7 blue style color initialization class. + + + + + Represents color table for Windows 7 style. + + + + + Initializes a new instance of the Office2010ColorTable class. + + + + + Defines the color scheme type for the Office2010ColorTable. + + + + + Blue color scheme. + + + + + Provides information about the binding for the item. + + + + + Initializes a new instance of the ItemBindingInfo class. + + + + + + + Gets or sets the data row item is bound to. + + + + + Gets or sets the data item index. + + + + + Gets or sets the additional data connected to this binding information. + + + + + Represents the slider item which allows you to select a value from predefined range. + + + + + Creates new instance of SliderItem. + + + + + Creates new instance of SliderItem and assigns the name to it. + + Item name. + + + + Creates new instance of SliderItem and assigns the name and text to it. + + Item name. + item text. + + + + Returns copy of the item. + + + + + Copies the SliderItem specific properties to new instance of the item. + + New SliderItem instance. + + + + Copies the SliderItem specific properties to new instance of the item. + + New SliderItem instance. + + + + Raises ValueChanging event. + + Provides event arguments. + + + + Raises ValueChanged event. + + Provides event arguments. + + + + Raises GetRangeTooltipText event. + + Provides event arguments. + + + + Gets the range part that is under specified client location. + + Location in parent control client coordinates. + Range part at specified location. + + + + Called when Minimum property has changed. + + Old property value + New property value + + + + Called when Maximum property has changed. + + Old property value + New property value + + + + Sets the range value. + + New Range value. + Source of the value change. + + + + Called when Value property has changed. + + Old property value + New property value + + + + Called when TicksVisible property has changed. + + Old property value + New property value + + + + Called when TicksStep property has changed. + + Old property value + New property value + + + + Called when RangeButtonSize property has changed. + + Old property value + New property value + + + + Called when TicksPosition property has changed. + + Old property value + New property value + + + + Called when MinimumAbsoluteRange property has changed. + + Old property value + New property value + + + + Called when RangeTooltipFormat property has changed. + + Old property value + New property value + + + + Called when MinRangeSliderImage property has changed. + + Old property value + New property value + + + + Called when MaxRangeSliderImage property has changed. + + Old property value + New property value + + + + Called when RangeLineHeight property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Occurs before Value has changed and allow the cancellation of the change. + + + + + Occurs after Value property has changed + + + + + Gets mouse over part. + + + + + Gets current part that is pressed using mouse left button. + + + + + Occurs when control is about to display the range tooltip and it allows you to customize tooltip + + + + + Gets or sets the minimum value of the range of the control. + + + + + Gets or sets the maximum value of the range of the control. + + + + + Gets or sets the range displayed by the control. + + + + + Indicates whether tick lines are shown + + + + + Gets tick marks bounds. + + + + + Gets tick marks bounds for second marker is visible. + + + + + Gets bounds of minimum range sliding button. + + + + + Gets bounds of maximum range sliding button. + + + + + Indicates tick display period + + + + + Gets or sets the slider orientation. Default value is horizontal. + + + + + Gets or sets the width of the range slider in pixels. Value must be greater than 0. Default value is 140. + + + + + Gets or sets the Height of the range slider in pixels. Value must be greater than 0. Default value is 24. + + + + + Indicates the size of the range change buttons. + + + + + Specifies the ticks position inside of Range Slider. + + + + + Specifies minimum absolute range that user can select. Absolute range is defined as Abs(Value.Max-Value.Min) Applies to user performed selection through mouse only. + + + + + Gets or sets the string that is used to format the range value to be displayed while user moves the range buttons. Value set here is used in string.Format(RangeTooltipFormat, Value.Min, Value.Max). + + + + + Specifies whether range tooltip is shown while user is changing the range + + + + + Indicates image to be used as minimum range slider button instead of built-in button. Image is scaled to size set by RangeButtonSize. + + + + + Indicates image to be used as maximum range slider button instead of built-in button. Image is scaled to size set by RangeButtonSize. + + + + + Specifies the height of the range line + + + + + Indicates whether clicking the area outside of the range change buttons moves the range change button to the clicked location if possible thus allowing range change. + + + + + Gets or sets the color of the range value. + + + + + Specifies the ticks position inside of Range Slider. + + + + + Ticks are displayed on top of range sliders. + + + + + Ticks are displayed on bottom of range sliders. + + + + + Ticks are displayed on top and bottom of range sliders. + + + + + Defines value for the range slider controls. + + + + + Gets or sets the range minimum value. + + + + + Gets or sets the range maximum value. + + + + + Provides data for the Slider item rendering events. + + + + + Gets or sets the reference to the item being rendered. + + + + + Gets or sets the reference to graphics object. + + + + + Creates new instance of the object and initializes it with default values. + + Reference to the Range Slider item being rendered. + Reference to the graphics object. + + + + Defines delegate for RangeSliderValueChanging event. + + + + + + + Provides information for RangeSliderValueChanging event. + + + + + Represents event arguments that provide information on source of action. + + + + + Gets the source of the event. + + + + + Initializes a new instance of the EventSourceArgs class. + + + + + + New range value. + + + + + Set to true to cancel the value changing. + + + + + Initializes a new instance of the RangeSliderValueChangingEventArgs class. + + + + + + Defines the slider item parts. + + + + + Indicates no part. + + + + + Indicates the minimum range slider button. + + + + + Indicates the maximum range slider button. + + + + + Indicates the track area part of the control. + + + + + Defines delegate for RangeSliderValueChanging event. + + + + + + + Provides information for GetRangeTooltip event. + + + + + Gets or sets the tooltip to display. + + + + + Initializes a new instance of the RangeTooltipEventArgs class. + + + + + + Color definition class + + + + + Constructor - solid def + + RGB value + + + + Constructor - solid def + + Color + + + + Constructor - 2 color def + + Start Color + End Color + + + + Constructor - 2 color def + + Start Color + End Color + Gradient angle + + + + Constructor - Gradient def + + Array of RGB values + Gradient positions + + + + Constructor - Gradient def + + Array of Color values + Gradient positions + + + + Constructor - Gradient def + + Array of RGB values + Gradient positions + Gradient angle + + + + Constructor - Gradient def + + Array of Color values + Gradient positions + Gradient angle + + + + OnColorDefChanged + + + + + Event raised when the SuperTabColorStates is changed + + + + + Gets or sets the Color array + + + + + Gets or sets the Color Positions + + + + + Gets or sets the Gradient Angle + + + + + IsEmpty + + + + + ColorDefConvertor + + + + + Represents the visual separator line that is displayed between items. + + + + + Creates new instance of Separator. + + + + + Creates new instance of Separator and assigns the name to it. + + Item name. + + + + Returns copy of the item. + + + + + Copies the ButtonItem specific properties to new instance of the item. + + New ButtonItem instance. + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets or sets separator padding. + + + + + Gets or sets the size of separator. Size specified is for separator in Vertical orientation. If orientation changes then the size will be internally switched to respect proper orientation. + + + + + Indicates splitter orientation. + + + + + Gets or sets the separator color. + + + + + Gets or sets the separator shade color. + + + + + Defines an item that allows the toolbar customization. + + + + + Creates new instance of CustomizeItem object. + + + + + Returns copy of CustomizeItem item + + + + + Called when item container has changed. If you override this method you must call the base implementation to allow default processing to occur. + + Previous container of the item. + + + + Occurs when tooltip is about to be shown or hidden. + + Specifies whether tooltip is shown or hidden. + + + + Loads the resources (text) used by this item. + + + + + Overriden. Draws the item. + + Target Graphics object. + + + + Sets the custom system tooltip text for the item. + + Tooltip text. + + + + Overriden. Recalculates the size of the item. + + + + + Gets localized tooltip text for this instance of the item. + + Tooltip text. + + + + Called when mouse hovers over the customize item. + + + + + Forces the repaint the item. + + + + + Returns the Font object to be used for drawing the item text. + + Font object. + + + + Overloaded. Serializes the item and all sub-items into the XmlElement. + + XmlElement to serialize the item to. + + + + Overloaded. Deserializes the Item from the XmlElement. + + Source XmlElement. + + + + Gets whether the mouse is over the item. + + + + + Gets or sets a value indicating whether the item is visible. + + + + + Gets or sets whether Customize menu item is visible. + + + + + Indicates whether the item will auto-collapse (fold) when clicked. + When item is on popup menu and this property is set to false, menu will not + close when item is clicked. + + + + + Gets or sets whether item can be customized by end user. + + + + + Gets or sets whether item is global or not. + This flag is used to propagate property changes to all items with the same name. + Setting for example Visible property on the item that has GlobalItem set to true will + set visible property to the same value on all items with the same name. + + + + + Represents base class for the CalendarMonth and MultiMonthCalendar controls. This class is used internally by DotNetBar and is not intended for public use. + + + + + Initializes a new instance of the MultiMonthCalendar class. + + + + + Must be overridden by class that is inheriting to provide the painting for the item. + + + + + Paints background of the item. + + Provides painting arguments + + + + Returns copy of the item. + + + + + Copies the CalendarMonth specific properties to new instance of the item. + + New ButtonItem instance. + + + + Specifies the container background style. Default value is an empty style which means that container does not display any background. + BeginGroup property set to true will override this style on some styles. + + + + + Returns name of the item that can be used to identify item from the code. + + + + + Gets or sets the accessible role of the item. + + + + + + Indicates whether the item will auto-collapse (fold) when clicked. + When item is on popup menu and this property is set to false, menu will not + close when item is clicked. + + + + + Gets or sets whether item can be customized by end user. + + + + + Returns category for this item. If item cannot be customzied using the + customize dialog category is empty string. + + + + + Gets or sets whether Click event will be auto repeated when mouse button is kept pressed over the item. + + + + + Gets or sets the auto-repeat interval for the click event when mouse button is kept pressed over the item. + + + + + Specifies the mouse cursor displayed when mouse is over the item. + + + + + Gets or sets item description. This description is displayed in + Customize dialog to describe the item function in an application. + + + + + Gets or sets whether item is global or not. + This flag is used to propagate property changes to all items with the same name. + Setting for example Visible property on the item that has GlobalItem set to true will + set visible property to the same value on all items with the same name. + + + + + Gets or sets item alignment inside the container. + + + + + Gets or sets the collection of shortcut keys associated with the item. + + + + + Gets or sets whether item will display sub items. + + + + + Gets or sets whether the item expands automatically to fill out the remaining space inside the container. Applies to Items on stretchable, no-wrap Bars only. + + + + + Specifies whether item is drawn using Themes when running on OS that supports themes like Windows XP. + + + + + Gets/Sets informational text (tooltip) for the item. + + + + + Gets or sets the text associated with this item. + + + + + Defines the visual marking applied to dates through month calendar control. + + + + + Initializes a new instance of the DateAppearanceDescription class. + + + + + Initializes a new instance of the DateAppearanceDescription class. + + + + + + Applies all settings from this object to specified object. + + Reference to object. + + + Gets whether property should be serialized. Provided for WinForms designer support. + + + Resets property to its default value. Provided for WinForms designer support. + + + Gets whether property should be serialized. Provided for WinForms designer support. + + + Resets property to its default value. Provided for WinForms designer support. + + + Gets whether property should be serialized. Provided for WinForms designer support. + + + Resets property to its default value. Provided for WinForms designer support. + + + Gets whether property should be serialized. Provided for WinForms designer support. + + + Resets property to its default value. Provided for WinForms designer support. + + + + Gets or sets whether text is drawn using bold font. + + + + + Gets or sets the background color for the marked day. + + + + + Gets or sets the background target gradient color for the marked date. + + + + + Gets or sets the background gradient fill angle. Default value is 90. + + + + + Gets or sets the text color for the marked date. + + + + + Gets whether any of the appearance values have been changed. + + + + + Gets or sets the border color. + + + + + Gets or sets whether day marked is selectable by end user. Default value is true. + + + + + Reverts the input to the last stored value. + + + + + Called when input field is full, i.e. it has an complete entry. If auto-overwrite is enabled the continued typing after input is complete + will erase the existing entry and start new one. + + + + + Resets the input position so the new input overwrites current value. + + + + + Occurs when input on the control has changed. + + + + + Occurs when validation of the input is performed and it allows you to deny the input. + + + + + Occurs when IsEmpty property has changed. + + + + + Gets whether watermark will be drawn in current control state. + + + + + Gets or sets whether control is empty. + + + + + Gets or sets whether auto-overwrite functionality for input is enabled. When in auto-overwrite mode input field will erase existing entry + and start new one if typing is continued after InputComplete method is called. + + + + + Gets or sets the watermark text displayed on the input control when control is empty. + + + + + Gets or sets whether watermark text is displayed if set. Default value is true. + + + + + Gets or sets whether input item is read-only. + + + + + Gets or sets whether control allows empty input state i.e. does not have an text entered. Default value is true. + + + + + Raises SelectedIndexChanged event + + + + + Occurs when SelectedIndex property has changed. + + + + + Gets or sets the text that is selected by the control. + + + + + Gets or sets the currently selected index. -1 is returned if nothing is selected. + + + + + Gets or sets custom AM text used. + + + + + Gets or sets custom PM text used. + + + + + Represents a control that enables the user to select a date using a visual monthly calendar display. + + + + + Initializes a new instance of the MonthCalendarAdv class. + + + + + Returns the DayLabel at given client coordinates or null/nothing if there is no label at give location. + + X - position in client coordinates. + Y - position in client coordinates. + DayLabel at given coordinates or null/nothing. + + + + Returns the DayLabel that represents the date. + + Date to find label for. + DayLabel object or nothing if date cannot be founds. + + + + Returns whether property should be serialized. Provided for Windows Forms designer support. + + + + + Resets property to its default value. Provided for Windows Forms designer support. + + + + + Removes all monthly marked dates. Note that you must call UpdateMarkedDates method to reflect these changes on calendar. + + + + + Removes the date from the MonthlyMarkedDates. Note that you must call UpdateMarkedDates method to reflect these changes on calendar. + + + + + + Returns whether property should be serialized. Provided for Windows Forms designer support. + + + + + Resets property to its default value. Provided for Windows Forms designer support. + + + + + Removes all weekly marked dates. Note that you must call UpdateMarkedDates method to reflect these changes on calendar. + + + + + Removes the day from the WeeklyMarkedDays. Note that you must call UpdateMarkedDates method to reflect these changes on calendar. + + + + + + Returns whether property should be serialized. Provided for Windows Forms designer support. + + + + + Resets property to its default value. Provided for Windows Forms designer support. + + + + + Removes all annually marked dates. Note that you must call UpdateMarkedDates method to reflect these changes on calendar. + + + + + Removes the date from the AnnuallyMarkedDates. Note that you must call UpdateMarkedDates method to reflect these changes on calendar. + + + + + + Returns whether property should be serialized. Provided for Windows Forms designer support. + + + + + Resets property to its default value. Provided for Windows Forms designer support. + + + + + Removes all marked dates set through MarkedDates property. Note that you must call UpdateMarkedDates method to reflect these changes on calendar. + + + + + Removes the date from the MarkedDates collection. Note that you must call UpdateMarkedDates method to reflect these changes on calendar. + + + + + + Repaints the marked dates to reflect the dates set in the lists of marked dates. + Use this method to reflect the changes made to the AnnuallyMarkedDates, MonthlyMarkedDates or MarkedDates properties as well + as change to the marked Colors properties. + + + + + Raises the DateChanged event. + + Provides event data. + + + + Raises the DateSelected event. + + Provides event data. + + + + Raises the MonthChanged event. + + Provides additional event data. + + + + Raises the MonthChanging event. + + Provides additional event data. + + + + Raises the PaintLabel event. + + Provides event data. + + + + Raises the LabelMouseDown event. + + Provides event data. + + + + Raises the LabelMouseUp event. + + Provides event data. + + + + Raises the LabelMouseEnter event. + + Provides event data. + + + + Raises the LabelMouseLeave event. + + Provides event data. + + + + Raises the LabelMouseMove event. + + Provides event data. + + + + Raises the LabelMouseHover event. + + Provides event data. + + + + Gets whether property should be serialized. Provided for designer support. + + + + + + Reset property to default value. Provided for designer support. + + + + + Gets whether property should be serialized. Provided for designer support. + + + + + + Reset property to default value. Provided for designer support. + + + + + Gets whether Value property should be serialized by Windows Forms designer. + + true if value serialized otherwise false. + + + + Reset the MinDate property to its default value. + + + + + Gets whether Value property should be serialized by Windows Forms designer. + + true if value serialized otherwise false. + + + + Reset the MaxDate property to its default value. + + + + + Resets property to its default value. Provided for design-time support. + + + + + Gets whether property should be serialized. Provided for design-time support. + + + + + Sets the number of columns and rows of months to display. + + The number of columns. + The number of rows. + ArgumentOutOfRangeException will be raised if any value is less than zero or one value is grater than zero and other is zero. + + + + Returns whether property should be serialized by Windows Forms designer. + + + + + Sets the selected dates in a month calendar control to the specified date range. + + The beginning date of the selection range. + The end date of the selection range. + startDate is less than the minimum date allowable for a month calendar control.
+ -or-
+ startDate is greater than the maximum allowable date for a month calendar control.
+ -or-
+ endDate is less than the minimum date allowable for a month calendar control.
+ -or- endDate is greater than the maximum allowable date for a month calendar control.
+
+ + If the startDate value is greater than endDate property value, the dates are swapped; the endDate value becomes the starting date, and startDate value becomes the end date. + +
+ + + Invalidates control auto-size and resizes the control if AutoSize is set to true. + + + + + Occurs when month displayed by the item has changed. + + + + + Occurs before the month that is displayed is changed. + + + + + Occurs when child label representing days is rendered and it allows you to override default rendering. + + + + + Occurs when mouse button is pressed over the day/week label inside of the calendar. + + + + + Occurs when mouse button is released over day/week label inside of the calendar. + + + + + Occurs when mouse enters the day/week label inside of the calendar. + + + + + Occurs when mouse leaves the day/week label inside of the calendar. + + + + + Occurs when mouse moves over the day/week label inside of the calendar. + + + + + Occurs when mouse remains still inside an day/week label of the calendar for an amount of time. + + + + + Occurs when SelectedDate property has changed. + + + + + Occurs when the user makes an explicit date selection using the mouse. + + + This event is similar to the DateChanged event, but it occurs at the end of a date selection made using the mouse. + The DateChanged event occurs during any date selection, whether by mouse, keyboard, or code. You should handle this event + when you enable multiple date selection through MultiSelect property and want to be notified after the date selection has been + made. DateChanged event would fire each time selection changes during the selection of multiple dates. + + + + + Gets or sets the array of DateTime objects that determine which monthly days to mark using Colors.MonthlyMarker settings. + Make sure to call UpdateMarkedDates() method to update calendar display with marked dates. + + + + + Gets or sets the array of DayOfWeek members that determine which days of week to mark using Colors.WeeklyMarker settings. + + + + + Gets or sets the array of DateTime objects that determines which annual days are marked using Colors.AnnualMarker settings. + Make sure to call UpdateMarkedDates() method to update calendar display with marked dates. + + + + + Gets or sets the array of DateTime objects that determines which non-recurring dates are marked using Colors.DayMarker settings. + Make sure to call UpdateMarkedDates() method to update calendar display with marked dates. + + + + + Gets or sets the first month displayed by the control. + + + + + Gets number of months displayed on the control. + + + + + Gets the calendar colors used by the control. + + + + + Gets or sets the size of each day item on the calendar. Default value is 24, 15. + + + + + Gets or sets the size of date navigation buttons on the calendar. Default value is 13, 18. If you increase size of the navigation + buttons change DaySize as well so everything fits. + + + + + Gets or sets the minimum date and time that can be selected in the control. + + + + + Gets or sets the maximum date and time that can be selected in the control. + + + + + Specifies the commands container background style. Commands container displays Today and Clear buttons if they are visible. + + + + + Specifies the navigation container background style. Navigation container displays month, year and optional buttons. Default value is an empty style which means that container does not display any background. + BeginGroup property set to true will override this style on some styles. + + + + + Gets or sets the number of columns and rows of months displayed on control. Default value is 0,0 which indicates that + calendar will display as many columns and rows as it is possible to fit into container space available. + + + + + Gets or sets whether weekend days can be selected. Default value is true. + + + + + Gets or sets the rule used to determine first week of the year for week of year display on calendar. Default value is first-day. + + + + + Gets or sets the value that is used by calendar as today's date. + + + + + Gets a value indicating whether the TodayDate property has been explicitly set. + + + + + Gets or sets whether today marker that indicates TodayDate is visible on the calendar. Default value is true. + + + + + Gets or sets whether week of year is visible. Default value is false. + + + + + Gets or sets the array of custom names for days displayed on calendar header. The array must have exactly 7 elements representing day names from 0 to 6. + + + + + Gets or sets the first day of week displayed on the calendar. Default value is Sunday. + + + + + Gets or sets whether control uses the two letter day names. Default value is true. + + + + + Gets or sets the calendar selected date. Note that SelectedDate property should be used only when MultiSelect property is set to false. + When multiple dates can be selected use range selection properties: SelectionStart, SelectionEnd and SelectionRange. + + + + + Gets or sets whether selection of multiple dates up to the MaxSelectionCount is enabled. Default value is false which indicates that only + single day can be selected. + + + + + Gets the reference to the bottom container that parents the Today, and Clear system buttons. + + + + + Gets or sets whether Today button displayed at the bottom of the calendar is visible. Default value is false. + + + + + Gets or sets whether Clear button displayed at the bottom of the calendar is visible. Clear button clears the currently selected date. Default value is false. + + + + + Gets or sets the maximum number of days that can be selected in a month calendar control. + + + + + Gets or sets the start date of the selected range of dates. + + + + + Gets or sets the end date of the selected range of dates. + + + + + Gets or sets the selected range of dates for a month calendar control. + + Setting this property is functionally equivalent to using the SetSelectionRange method. You can set the start and end dates separately by setting either the SelectionStart or SelectionEnd properties. You cannot change the start and end dates by setting the SelectionRange.Start or SelectionRange.End property values of the SelectionRange property. You should use SelectionStart, SelectionEnd, or SetSelectionRange. + If the Start property value of the SelectionRange is greater than its End property value, the dates are swapped; the End property value becomes the starting date, and Start property value becomes the end date. + + + + + Gets or sets whether Year/Century selection is enabled when calendar is displaying single month. + + + + + Indicates whether month selector which is displayed when month label is clicked is using abbreviated month names instead of month number. + + + + + Indicates whether calendar is used in month selection mode which shows only month and year. + + + + + Gets or sets a value indicating whether the control is automatically resized to display its entire contents. You can set MaximumSize.Width property to set the maximum width used by the control. + + + + + Represents the container that presents single calendar month. + + + + + Initializes a new instance of the CalendarMonth class. + + + + + Called when MonthSelectionMode property has changed. + + Old property value + New property value + + + + Must be overridden by class that is inheriting to provide the painting for the item. + + + + + Returns copy of the item. + + + + + Copies the CalendarMonth specific properties to new instance of the item. + + New ButtonItem instance. + + + + Raises the MonthChanged event. + + Provides additional event data. + + + + Raises the MonthChanging event. + + Provides additional event data. + + + + Gets whether property should be serialized. Provided for designer support. + + + + + + Reset property to default value. Provided for designer support. + + + + + Gets whether property should be serialized. Provided for designer support. + + + + + + Reset property to default value. Provided for designer support. + + + + + Raises the PaintLabel event. + + Provides event data. + + + + Raises the DateChanged event. + + Provides event data. + + + + Gets the DayLabel item assigned to the given date. Returns null if there is no label displayed for the date. + + Date to return label for. + DayLabel instance or null if date is not displayed on this calendar. + + + + Occurs when sub item expanded state has changed. + + Sub item affected. + + + + Gets whether Value property should be serialized by Windows Forms designer. + + true if value serialized otherwise false. + + + + Reset the MinDate property to its default value. + + + + + Gets whether Value property should be serialized by Windows Forms designer. + + true if value serialized otherwise false. + + + + Reset the MaxDate property to its default value. + + + + + Called when DayClickAutoClosePopup property has changed. + + Old property value + New property value + + + + Occurs when month displayed by the item has changed. + + + + + Occurs before the month that is displayed is changed. + + + + + Occurs when child label representing days is rendered and it allows you to override default rendering. + + + + + Occurs when mouse button is pressed over the day/week label inside of the calendar. + + + + + Occurs when mouse button is released over day/week label inside of the calendar. + + + + + Occurs when mouse enters the day/week label inside of the calendar. + + + + + Occurs when mouse leaves the day/week label inside of the calendar. + + + + + Occurs when mouse moves over the day/week label inside of the calendar. + + + + + Occurs when mouse remains still inside an day/week label of the calendar for an amount of time. + + + + + Occurs when SelectedDate property has changed. + + + + + Indicates whether calendar is used in month selection mode which shows only month and year. + + + + + Gets or sets whether Year/Century selection is enabled. + + + + + Indicates whether month selector which is displayed when month label is clicked is using abbreviated month names instead of month number. + + + + + Gets or sets the first day of week displayed on the calendar. Default value is Sunday. + + + + + Gets or sets whether trailing days outside of the current displayed month are visible on calendar. + + + + + Gets or sets whether week of year is visible. Default value is false. + + + + + Gets or sets the rule used to determine first week of the year for week of year display on calendar. Default value is first-day. + + + + + Returns the collection of sub items. + + + + + Gets or sets the size of each day item on the calendar. Default value is 24, 15. + + + + + Gets or sets the size of date navigation buttons on the calendar. Default value is 13, 18. If you increase size of the navigation + buttons change DaySize as well so everything fits. + + + + + Gets the calendar colors used by the control. + + + + + Gets or sets whether multiple days can be selected by clicking each day. Default value is false. + + + + + Gets or sets whether selection of dates using mouse is enabled. Default value is true. + + + + + Gets or sets the calendar selected date. + + + + + Gets or sets whether weekend days can be selected. Default value is true. + + + + + Gets or sets a value indicating whether the item is expanded or not. For Popup items this would indicate whether the item is popped up or not. + + + + + Gets or sets default text alignment for the DayLabel items representing calendar days. + + + + + Gets or sets whether control uses the two letter day names. Default value is true. + + + + + Gets or sets the array of custom names for days displayed on calendar header. The array must have exactly 7 elements representing day names from 0 to 6. + + + + + Gets or sets whether header navigation buttons for month and year are visible. Default value is true. + + + + + Specifies the navigation container background style. Navigation container displays month, year and optional buttons. Default value is an empty style which means that container does not display any background. + BeginGroup property set to true will override this style on some styles. + + + + + Gets or sets whether today marker that indicates TodayDate is visible on the calendar. Default value is true. + + + + + Gets or sets the value that is used by calendar as today's date. + + + + + Gets a value indicating whether the TodayDate property has been explicitly set. + + + + + Gets or sets the minimum date and time that can be selected in the control. + + + + + Gets or sets the maximum date and time that can be selected in the control. + + + + + Gets or sets whether clicking the day closes the parent popup if item is on popup. + + + + + Initializes a new instance of the YearSelectoControl class. + + + + + Initializes a new instance of the CenturySelectorControl class. + + + + + Initializes a new instance of the YearSelectorContainer class. + + + + + Raises SelectedYearChanged event. + + Provides event arguments. + + + + Initializes a new instance of the YearSelectorContainer class. + + + + + Raises SelectedYearChanged event. + + Provides event arguments. + + + + Initializes a new instance of the CenturySelectorControl class. + + + + + Initializes a new instance of the YearSelectorContainer class. + + + + + Raises SelectedYearChanged event. + + Provides event arguments. + + + + Defines the MonthCalendar and SingleMonthCalendar colors for customization. + + + + + Resets property to its default value. Provided for Windows Forms designer support. + + + + + Resets property to its default value. Provided for Windows Forms designer support. + + + + + Resets property to its default value. Provided for Windows Forms designer support. + + + + + Resets property to its default value. Provided for Windows Forms designer support. + + + + Gets whether property should be serialized. Provided for WinForms designer support. + + + Resets property to its default value. Provided for WinForms designer support. + + + + Resets property to its default value. Provided for Windows Forms designer support. + + + + + Resets property to its default value. Provided for Windows Forms designer support. + + + + + Resets property to its default value. Provided for Windows Forms designer support. + + + + + Resets property to its default value. Provided for Windows Forms designer support. + + + + + Gets the appearance settings for the todays date. + + + + + Gets the appearance settings for selected days. + + + + + Gets the appearance settings for the trailing days on calendar. + + + + + Gets or sets the appearance settings for the labels that show week of year number. + + + + + Gets or sets the days divider line color. + + + + + Gets the appearance settings for the numeric day of month label. + + + + + Gets the appearance settings for the weekend days on calendar (Saturday and Sunday). + + + + + Gets the appearance settings for the trailing weekend days on calendar (Saturday and Sunday). + + + + + Gets the appearance settings for the labels that display day name in calendar header. + + + + + Gets or sets the marker settings for days specified by MonthCalendarItem.MonthlyMarkedDates property. + + + + + Gets or sets the marker settings for days specified by MonthCalendarItem.AnnuallyMarkedDates property. + + + + + Gets or sets the marker settings for days specified by MonthCalendarItem.MarkedDates property. + + + + + Gets or sets the marker settings for days specified by MonthCalendarItem.WeeklyMarkedDays property. + + + + + Gets the minimum date value of the DateTimePicker control. + + + + + Specifies the maximum date value of the DateTimePicker control. This field is read-only. + + + + + Raises the ValueChanged event. + + + + + Occurs when Value or IsEmpty property has changed. + + + + + Gets or sets the date time. + + + + + Gets or sets the values of the nested DateTimeGroup items. + + + + + Gets or sets the minimum value represented by the group. + + + + + Gets or sets maximum value represented by the group. + + + + + Gets or sets whether input values are set to defaults while user is entering data. Default value is true. + + + + + Defines the date-time selector visibility for DateTimeInput control popup. + + + + + Depending on DateTimeInput.Format property setting either date or time selector is used. + + + + + Only date selector is visible. + + + + + Only time selector is visible on popup. + + + + + Both date and time selectors are visible. + + + + + Gets or sets the amount of padding added to text. + + + + + Gets or sets the text displayed by the label. + + + + + Defines an interface for the DateTime Part interaction. + + + + + Reverts to the last input value control held. + + + + + Gets or sets the date/time part value. + + + + + Gets or sets the minimum value for the date/time part entry. + + + + + Gets or sets the maximum value for the date/time part entry. + + + + + Gets the date time part control represents. + + + + + Gets or sets whether input part is empty. + + + + + Gets or sets the day in numeric format to display. Allowed values are from -1 to 6. -1 represents an empty state. + 0 represents Sunday and 6 Represents Saturday. + + + + + Gets or sets the array of custom names for days. The array must have exactly 7 elements representing day names from 0 to 6. + + + + + Gets or sets whether abbreviated day names are used for display instead of full day names. Default value is false. + + + + + Represents a label for the NumericHourInput control that shows whether time is AM or PM. + + + + + Gets or sets custom AM text used. + + + + + Gets or sets custom PM text used. + + + + + Gets or sets whether abbreviated month names are used for display instead of full month names. Default value is false. + + + + + Occurs when Value property has changed. + + + + + Gets or sets whether mouse wheel increases or decreases the input value when used. + + + + + Gets or sets whether control allows empty input state i.e. does not have an number entered. Default value is true. When control is empty + IsEmpty property returns true and control does not display number. Set to false to always force control to have number displayed. + + + + + Gets or sets the value to increment or decrement the value of the control when the up or down buttons are clicked. + + + + + Gets or sets the Numeric String Format that is used to format the numeric value entered for display purpose. + + + + + Initializes a new instance of the NumericDayInput class. + + + + + Initializes a new instance of the NumericDayOfYearInput class. + + + + + Initializes a new instance of the NumericHourInput class. + + + + + Initializes a new instance of the NumericMinuteInput class. + + + + + Initializes a new instance of the NumericMonthInput class. + + + + + Initializes a new instance of the NumericSecondInput class. + + + + + Initializes a new instance of the NumericYearInput class. + + + + + Gets or sets the year display format. Default value is four digit format. + + + + + Defines data for the ParseValue event that allows you to provide custom parsing for values set to ValueObject property. + + + + + Get the value that was set to the ValueObject property and which should be converted to ParsedValue DateTime. + + + + + Gets or sets whether you have provided ParsedValue. + + + + + Initializes a new instance of the ParseDateTimeValueEventArgs class. + + Indicates the value object. + + + + /// + Gets or sets the parsed value from ValueObject property. + + + + + + Defines delegate for ParseDateTimeValue event. + + + + + + + Initializes a new instance of the DayLabel class. + + + + + Raises the PaintLabel event. + + Provides event data. + + + + Returns copy of the item. + + + + + Copies the DayLabel specific properties to new instance of the item. + + New ButtonItem instance. + + + + Occurs when the mouse pointer enters the item. This is used by internal implementation only. + + + + + Occurs when the mouse pointer leaves the item. This is used by internal implementation only. + + + + + Occurs when the mouse pointer is over the item and a mouse button is pressed. This is used by internal implementation only. + + + + + Occurs when the mouse pointer is over the item and a mouse button is released. This is used by internal implementation only. + + + + Gets whether property should be serialized. Provided for WinForms designer support. + + + Resets property to its default value. Provided for WinForms designer support. + + + + Occurs when label is rendered and it allows you to override default rendering. + + + + + Gets or sets the date represented by this label. DateTime.MinValue indicates that label is either used as textual day representation + or the week number as specified by the IsWeekOfYear property. + + + + + Gets or sets whether this label is used as the label that displays the day name. + + + + + Gets or sets whether this label is used as the week of year label. + + + + + Gets whether the label for date represents the trailing date, i.e. date that is from next or previous month for the month displayed. + + + + + Gets or sets whether mouse is over the item. + + + + + Gets or sets whether left-mouse button is pressed over the item. + + + + + Specifies the item background style. Default value is an empty style which means that container does not display any background. + BeginGroup property set to true will override this style on some styles. + + + + + Gets or sets whether label appears as selected. + + + + + Gets or sets whether label provides visual indicator when mouse is over the label or pressed while over the label. Default value is true. + + + + + Gets or sets whether label is selectable. IsSelected property returns whether label is selected. Default value is true. + + + + + Gets or sets the label text color. Default value is an empty color. + + + + + Gets or sets whether text is drawn using Bold font. Default value is false. + + + + + Gets or sets the text alignment. + + + + + Gets or sets the image alignment. + + + + + Gets or sets the image displayed on the label. + + + + + Gets or sets whether flat Office 2007 style is used to render the item. Default value is false. + + + + + Gets or sets whether date represented by label is marked as todays date. + + + + + Gets or sets whether popup is displayed when mouse is pressed anywhere over the item. Default value is false which indicates + that popup is displayed only if image assigned to the item and mouse is pressed over image. + + + + + Indicates the alignment of the DayLabel part like text or image. + + + + + Provides data for DayLabel painting events. + + + + + Gets the graphics canvas for rendering. + + + + + Gets or sets which parts of the item will be drawn by the system. You can set this to None to completely disable system rendering. + + + + + Initializes a new instance of the DayPaintEventArgs class. + + Reference to Graphics canvas. + Reference to item being rendered. + + + + Renders the background of the item. + + + + + Renders the item text. + + + + + Renders the item text. + + + + + Renders the item text. + + + + + Renders the item text. + + + + + Renders the item text. + + + + + Renders items image. + + + + + Renders items image. + + + + + Defines delegate for DayLabel painting events. + + Source of the event. + Provides event data. + + + + Specifies the parts of DayLabel control. Members of this enum are intended to be used as flags (combined). + + + + + Specifies no part. + + + + + Specifies the label background. + + + + + Specifies the label text. + + + + + Specifies the label image. + + + + + Specifies all parts. + + + + + Indicates the hour format. + + + + + Indicates Ante Meridiem period, before the middle day. + + + + + Indicates Post Meridiem after the middle day". + + + + + Identifies the date time part. + + + + + Specifies the input fields alignment inside of the control. + + + + + Specifies the text alignment. + + + + + Specifies the format of the date time picker. + + + + + Indicates that custom format specified by CustomFormat property is used. + + + + + The DateTimePicker control displays the date/time value in the long date format set by the user's operating system. + + + + + The DateTimePicker control displays the date/time value in the short date format set by the user's operating system. + + + + + The DateTimePicker control displays the date/time value in the time format set by the user's operating system. + + + + + The DateTimePicker control displays the date/time value in the short time format set by the user's operating system. + + + + + Specifies the display format of the year in input control. + + + + + Specifies the visual item alignment inside the parent group. + + + + + Specifies the vertical alignment. + + + + + Describes the system button item type. System buttons are buttons created internally by controls. + + + + + Specifies the auto-change item when VisualUpDownButton control is clicked. + + + + + No item is automatically changed. + + + + + Auto-change focused item in parent group + + + + + Auto change first input item before the Up/Down button in parent group. + + + + + Specifies the keys used for navigation between input fields. + + + + + No key is used for the navigation. + + + + + Tab key is used to advance to the next input field. + + + + + Arrow keys are used to advance to the next input field. + + + + + Enter key is used to advance to the next input field. + + + + + Tab, Arrows and Enter keys are used to advance to the next input field. + + + + + Describes input button settings. + + + + + Initializes a new instance of the InputButtonSettings class. + + + + + Initializes a new instance of the InputButtonSettings class. + + + + + + Called when Symbol property has changed. + + Old property value + New property value + + + + Called when SymbolSet property value changes. + + Indciates old value + Indicates new value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Copies properties to new instance of the item. + + New InputButtonSettings instance + + + + Gets or sets whether button is visible. + + + + + Gets or sets whether button is enabled. + + + + + Gets or sets the display position index of the button. Buttons are ordered from left to right with button with lowest index appearing as left-most button. + + + + + Gets or sets the image displayed on the face of the button. + + + + + Gets or sets the text displayed on the input button face. + + + + + Gets or sets the visual item button references for its action. + + + + + Gets or sets the shortcut key which when pressed triggers button click event or its default function. + + + + + Gets or sets tooltip displayed for the button when mouse hovers over it. + + + + + Indicates the symbol displayed on face of the button instead of the image. Setting the symbol overrides the image setting. + + + + + Gets or sets the symbol set used to represent the Symbol. + + + + + Gets or sets the color of the Symbol. + + + + + Defines the system colors used by the input controls. + + + + + Resets property to its default value. Provided for design-time support. + + + + + Returns whether property should be serialized. Provided for design-time support. + + + + + Resets property to its default value. Provided for design-time support. + + + + + Returns whether property should be serialized. Provided for design-time support. + + + + + Occurs when color has changed. + + + + + Gets or sets the background color of input item part when part has input focus. Default value is Color.Empty which indicates that system Highlight color is used. + + + + + Gets or sets the text color of input item part when part has input focus. Default value is Color.Empty which indicates that system HighlightText color is used. + + + + + Initializes a new instance of the InputValidationEventArgs class. + + Indicates current input. + + + + Defines delegate for input validation event. + + + + + + + Initializes a new instance of the VisualToggleButton class. + + + + + Raises the CheckedChanged event. + + + + + Occurs when Checked property has changed. + + + + + Gets or sets whether item is checked. + + + + + Gets whether left mouse button is pressed over the item. + + + + + Gets whether mouse is over the item. + + + + + Initializes a new instance of the LockUpdateCheckBox class. + + + + + Initializes a new instance of the MonthCalendarItem class. + + + + + Returns copy of the item. + + + + + Copies the CalendarMonth specific properties to new instance of the item. + + New ButtonItem instance. + + + + Copies the CalendarMonth specific properties to new instance of the item. + + New ButtonItem instance. + + + + Returns whether property should be serialized by Windows Forms desginer. + + + + + Sets the selected dates in a month calendar control to the specified date range. + + The beginning date of the selection range. + The end date of the selection range. + startDate is less than the minimum date allowable for a month calendar control.
+ -or-
+ startDate is greater than the maximum allowable date for a month calendar control.
+ -or-
+ endDate is less than the minimum date allowable for a month calendar control.
+ -or- endDate is greater than the maximum allowable date for a month calendar control.
+
+ + If the startDate value is greater than endDate property value, the dates are swapped; the endDate value becomes the starting date, and startDate value becomes the end date. + +
+ + + Applies current date selection to the control. You are usually not required to make calls to this method directly since it is automatically + done by the control when selection changes. This method returns immediately if MultiSelect + property is set to false or SelectionStart or SelectionEnd properties have DateTime.MinValue. + + + + + Returns the DayLabel at given client coordinates or null/nothing if there is no label at give location. + + X - position in client coordinates. + Y - position in client coordinates. + DayLabel at given coordinates or null/nothing. + + + + Returns the DayLabel that represents the date. + + Date to find label for. + DayLabel object or nothing if date cannot be founds. + + + + Returns whether property should be serialized. Provided for Windows Forms designer support. + + + + + Resets property to its default value. Provided for Windows Forms designer support. + + + + + Removes all monthly marked dates. Note that you must call UpdateMarkedDates method to reflect these changes on calendar. + + + + + Removes the date from the MonthlyMarkedDates. Note that you must call UpdateMarkedDates method to reflect these changes on calendar. + + + + + + Returns whether property should be serialized. Provided for Windows Forms designer support. + + + + + Resets property to its default value. Provided for Windows Forms designer support. + + + + + Removes all weekly marked days. Note that you must call UpdateMarkedDates method to reflect these changes on calendar. + + + + + Removes the date from the MonthlyMarkedDates. Note that you must call UpdateMarkedDates method to reflect these changes on calendar. + + + + + + Returns whether property should be serialized. Provided for Windows Forms designer support. + + + + + Resets property to its default value. Provided for Windows Forms designer support. + + + + + Removes all annually marked dates. Note that you must call UpdateMarkedDates method to reflect these changes on calendar. + + + + + Removes the date from the AnnuallyMarkedDates. Note that you must call UpdateMarkedDates method to reflect these changes on calendar. + + + + + + Returns whether property should be serialized. Provided for Windows Forms designer support. + + + + + Resets property to its default value. Provided for Windows Forms designer support. + + + + + Removes all marked dates set through MarkedDates property. Note that you must call UpdateMarkedDates method to reflect these changes on calendar. + + + + + Removes the date from the MarkedDates collection. Note that you must call UpdateMarkedDates method to reflect these changes on calendar. + + + + + + Repaints the marked dates to reflect the dates set in the lists of marked dates. + Use this method to reflect the changes made to the AnnuallyMarkedDates, MonthlyMarkedDates or MarkedDates properties as well + as change to the marked Colors properties. + + + + + Raises the MonthChanged event. + + Provides additional event data. + + + + Raises the MonthChanging event. + + Provides additional event data. + + + + Raises the PaintLabel event. + + Provides event data. + + + + Raises the LabelMouseDown event. + + Provides event data. + + + + Raises the LabelMouseUp event. + + Provides event data. + + + + Raises the LabelMouseEnter event. + + Provides event data. + + + + Raises the LabelMouseLeave event. + + Provides event data. + + + + Raises the LabelMouseMove event. + + Provides event data. + + + + Raises the LabelMouseHover event. + + Provides event data. + + + + Gets whether property should be serialized. Provided for designer support. + + + + + + Reset property to default value. Provided for designer support. + + + + + Gets whether property should be serialized. Provided for designer support. + + + + + + Reset property to default value. Provided for designer support. + + + + + Gets whether Value property should be serialized by Windows Forms designer. + + true if value serialized otherwise false. + + + + Reset the MinDate property to its default value. + + + + + Gets whether Value property should be serialized by Windows Forms designer. + + true if value serialized otherwise false. + + + + Reset the MaxDate property to its default value. + + + + + Resets property to its default value. Provided for design-time support. + + + + + Gets whether property should be serialized. Provided for design-time support. + + + + + Sets the number of columns and rows of months to display. + + The number of columns. + The number of rows. + ArgumentOutOfRangeException will be raised if any value is less than zero or one value is grater than zero and other is zero. + + + + Raises the DateChanged event. + + Provides event data. + + + + Raises the DateSelected event. + + Provides event data. + + + + Reloads the localized strings for Today and Clear buttons. + + + + + Called when DayClickAutoClosePopup property has changed. + + Old property value + New property value + + + + Occurs when month displayed by the item has changed. + + + + + Occurs before the month that is displayed is changed. + + + + + Occurs when child label representing days is rendered and it allows you to override default rendering. + + + + + Occurs when mouse button is pressed over the day/week label inside of the calendar. + + + + + Occurs when mouse button is released over day/week label inside of the calendar. + + + + + Occurs when mouse enters the day/week label inside of the calendar. + + + + + Occurs when mouse leaves the day/week label inside of the calendar. + + + + + Occurs when mouse moves over the day/week label inside of the calendar. + + + + + Occurs when mouse remains still inside an day/week label of the calendar for an amount of time. + + + + + Occurs when SelectedDate property has changed. + + + + + Occurs when the user makes an explicit date selection using the mouse. + + + This event is similar to the DateChanged event, but it occurs at the end of a date selection made using the mouse. + The DateChanged event occurs during any date selection, whether by mouse, keyboard, or code. You should handle this event + when you enable multiple date selection through MultiSelect property and want to be notified after the date selection has been + made. DateChanged event would fire each time selection changes during the selection of multiple dates. + + + + + Gets or sets the maximum number of days that can be selected in a month calendar control. + + + + + Gets or sets the start date of the selected range of dates. + + + + + Gets or sets the end date of the selected range of dates. + + + + + Gets or sets the selected range of dates for a month calendar control. + + Setting this property is functionally equivalent to using the SetSelectionRange method. You can set the start and end dates separately by setting either the SelectionStart or SelectionEnd properties. You cannot change the start and end dates by setting the SelectionRange.Start or SelectionRange.End property values of the SelectionRange property. You should use SelectionStart, SelectionEnd, or SetSelectionRange. + If the Start property value of the SelectionRange is greater than its End property value, the dates are swapped; the End property value becomes the starting date, and Start property value becomes the end date. + + + + + Gets or sets whether selection of multiple dates up to the MaxSelectionCount is enabled. Default value is false which indicates that only + single day can be selected. + + + + + Gets or sets the array of DateTime objects that determine which monthly days to mark using Colors.MonthlyMarker settings. + + + + + Gets or sets the array of DayOfWeek members that determine which days of week to mark using Colors.WeeklyMarker settings. + + + + + Gets or sets the array of DateTime objects that determines which annual days are marked using Colors.AnnualMarker settings. + + + + + Gets or sets the array of DateTime objects that determines which nonrecurring dates are marked using Colors.DayMarker settings. + + + + + Gets or sets the first month displayed by the control. + + + + + Gets number of months displayed on the control. + + + + + Gets the calendar colors used by the control. + + + + + Gets or sets the size of each day item on the calendar. Default value is 24, 15. + + + + + Gets or sets the size of date navigation buttons on the calendar. Default value is 13, 18. If you increase size of the navigation + buttons change DaySize as well so everything fits. + + + + + Gets or sets the minimum date and time that can be selected in the control. + + + + + Gets or sets the maximum date and time that can be selected in the control. + + + + + Specifies the commands container background style. Commands container displays Today and Clear buttons if they are visible. + + + + + Specifies the navigation container background style. Navigation container displays month, year and optional buttons. Default value is an empty style which means that container does not display any background. + BeginGroup property set to true will override this style on some styles. + + + + + Gets or sets the number of columns and rows of months displayed on control. Default value is 0,0 which indicates that + calendar will display as many columns and rows as it is possible to fit into container space available. + + + + + Gets or sets whether weekend days can be selected. Default value is true. + + + + + Gets or sets the rule used to determine first week of the year for week of year display on calendar. Default value is first-day. + + + + + Gets or sets the value that is used by calendar as today's date. + + + + + Gets a value indicating whether the TodayDate property has been explicitly set. + + + + + Gets or sets whether today marker that indicates TodayDate is visible on the calendar. Default value is true. + + + + + Gets or sets whether week of year is visible. Default value is false. + + + + + Gets or sets whether control uses the two letter day names. Default value is true. + + + + + Gets or sets the array of custom names for days displayed on calendar header. The array must have exactly 7 elements representing day names from 0 to 6. + + + + + Gets or sets the first day of week displayed on the calendar. Default value is Sunday. + + + + + Gets or sets the calendar selected date. Note that SelectedDate property should be used only when MultiSelect property is set to false. + When multiple dates can be selected use range selection properties: SelectionStart, SelectionEnd and SelectionRange. + + + + + Gets the reference to the bottom container that parents the Today, and Clear system buttons. + + + + + Gets reference to internal Today button on calendar. + + + + + Gets or sets whether Today button displayed at the bottom of the calendar is visible. Default value is false. + + + + + Gets or sets whether Clear button displayed at the bottom of the calendar is visible. Clear button clears the currently selected date. Default value is false. + + + + + Gets or sets a value indicating whether the item is expanded or not. For Popup items this would indicate whether the item is popped up or not. + + + + + Gets or sets whether clicking the day closes the parent popup if item is on popup. + + + + + Gets or sets whether Year/Century selection is enabled when calendar is displaying single month. + + + + + Indicates whether month selector which is displayed when month label is clicked is using abbreviated month names instead of month number. + + + + + Indicates whether calendar is used in month selection mode which shows only month and year. + + + + + Gets or sets the size available for the item currently being arranged. + + + + + Gets or sets whether mouse is over the host control. + + + + + Gets or sets system colors used by the control. + + + + + Defines data for the ParseValue event that allows you to provide custom parsing for values set to ValueObject property. + + + + + Get the value that was set to the ValueObject property and which should be converted to ParsedValue DateTime. + + + + + Gets or sets whether you have provided ParsedValue. + + + + + Initializes a new instance of the ParseDateTimeValueEventArgs class. + + Indicates the value object. + + + + /// + Gets or sets the parsed value from ValueObject property. + + + + + + Defines delegate for ParseValue event. + + + + + + + Defines data for the ParseValue event that allows you to provide custom parsing for values set to ValueObject property. + + + + + Get the value that was set to the ValueObject property and which should be converted to ParsedValue DateTime. + + + + + Gets or sets whether you have provided ParsedValue. + + + + + Initializes a new instance of the ParseDateTimeValueEventArgs class. + + Indicates the value object. + + + + /// + Gets or sets the parsed value from ValueObject property. + + + + + + Defines delegate for ParseValue event. + + + + + + + Gets or sets whether button automatically gets Click events repeated when mouse is kept pressed on the button. Default value is false. + + + + + Gets or sets the auto-repeat interval for the click event when mouse button is kept pressed over the item. + + + + + Gets or sets whether default button background is rendered when mouse is not over the host control. Default value is true. + + + + + Gets or sets the shortcut key which when pressed triggers button click event or its default function. + + + + + Gets or sets the button tooltip. + + + + + Called when Symbol property has changed. + + Old property value + New property value + + + + Called when SymbolSet property value changes. + + Indciates old value + Indicates new value + + + + Gets or sets the fixed button height. + + + + + Gets whether mouse is over the control. + + + + + Gets whether mouse is pressed on the control. + + + + + Gets or sets the text displayed on the face of the button. + + + + + Gets or sets the image displayed on the face of the button. + + + + + Gets the realized symbol string. + + + + + Indicates the symbol displayed on face of the button instead of the image. Setting the symbol overrides the image setting. + + + + + Gets or sets the symbol set used to represent the Symbol. + + + + + Gets or sets the color of the Symbol. + + + + + Raises DecreaseValue event. + + Provides event arguments. + + + + Raises IncreaseValue event. + + Provides event arguments. + + + + Defines data for ConvertFreeTextEntry event. + + + + + Gets the string value that was entered by the user. + + + + + Gets or sets the converted ValueEntered into the control's value type. For example for IpAddressInput the value set here + must be of string type and in IP address format. For IntegerInput control the value set here must be an int type. For DateTimeInput + control value set here must be DateTime type. + If you provide ControlValue set ValueConverted=true to indicate so. + + + + + Gets or sets whether ValueEntered has been converted to ControlValue. Set to true to indicate that you have performed conversion. + + + + + Defines delegate for ConvertFreeTextEntry event. + + Source of event. + Provides event data. + + + + Gets or sets the value to increment or decrement the value of the control when the up or down buttons are clicked. + + + + + Gets or sets the Numeric String Format that is used to format the numeric value entered for display purpose. + + + + + Specifies trigger types for the value changed events on editor controls. + + + + + ValueChanged event is fired as soon as user types in the value. + + + + + ValueChanged event is fired after control loses input focus. + + + + + ValueChanged event is fired after control loses input focus or user presses the Enter key. + + + + Creates new instance of the class. + + + Creates new instance of the class. + + + + Adds new object to the collection. + + Object to add. + Index of newly added object. + + + + Adds array of new objects to the collection. + + Array of object to add. + + + + Adds array of new objects to the collection. + + Array of object to add. + + + + Inserts new object into the collection. + + Position of the object. + Object to insert. + + + + Returns index of the object inside of the collection. + + Reference to the object. + Index of the object. + + + + Returns whether collection contains specified object. + + Object to look for. + true if object is part of the collection, otherwise false. + + + + Removes specified object from the collection. + + + + + + Copies collection into the specified array. + + Array to copy collection to. + Starting index. + + + + Copies contained items to the VisualItem array. + + Array to copy to. + + + + Returns reference to the object in collection based on it's index. + + + + + Represents the up down button which allows change of the value in currently focused input control. + + + + + Initializes a new instance of the VisualUpDownButton class. + + + + + Raises the UpClick event. + + Provides event data. + + + + Raises the DownClick event. + + Provides event data. + + + + Occurs when Up part of the button has been clicked. + + + + + Occurs when Down part of the button has been clicked. + + + + + Gets or sets the image displayed on the face of the button. + + + + + Gets or sets the image displayed on the face of the button. + + + + + Gets or sets the default width of the buttons. + + + + + Gets or sets whether control automatically tries to increase/decrease the value of the item that has input focus in the same + parent group as the button. Default value is false. + + + + + Gets or sets the item that is automatically changed when buttons are pressed. + + + + + Statis functions for design-time support. + + + + + Summary description for DesignTimeDte. + + + + + Summary description for Display. + + + + + System item that displays the items that could not fit inside the container on popup menu or toolbar. + + + + + Create new instance of DisplayMoreItem object. + + + + + Returns copy of DisplayMoreItem item + + + + + Called when item container has changed. If you override this method you must call the base implementation to allow default processing to occur. + + Previous container of the item. + + + + Overridden. Draws the item. + + Target Graphics object. + + + + Overriden. Recalculates the size of the item. + + + + + Overridden. Displays the sub-items on popup. + + Popup location. + + + + Overridden. Displays the sub-items on popup. + + Horizontal coordinate in pixels of the upper left corner of a popup. + Vertical coordinate in pixels of the upper left corner of a popup. + + + + Overridden. Displays the sub-items on popup toolbar. + + Horizontal coordinate in pixels of the upper left corner of a popup. + Vertical coordinate in pixels of the upper left corner of a popup. + + + + Overridden. Displays the sub-items on popup menu. + + Horizontal coordinate in pixels of the upper left corner of a popup. + Vertical coordinate in pixels of the upper left corner of a popup. + + + + Overridden. Close the popup window if open. + + + + + Adds the items that are not visible to the overflow popup. + + + + + Returns the insertion index for the items removed from overflow popup. Assumes that right-most items are removed first by the layout manager. + + + + + + Removes the items from the overflow and adds them back to the parent item. + + + + + Forces the repaint the item. + + + + + Returns the fixed size of the item. + + + + + Get or sets whether item has been changed in a way that it needs its size recalculated. This is internal + property and it should not be used by your code. + + + + + Gets whether the mouse is over the item. + + + + + Represents panel that is hosted by DockContainerItem as docked control. + + + + + Represents graphical panel control with support for different visual styles and gradients. + + + + + Default constructor. + + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Applies color scheme colors to the style objects. + + + + + Sets the internal mouse down flag which controls appearance of the control. You can use this method to simulate the pressed state for the panel with appropriate StyleMouseDown assigned. + + New value for the mouse down flag. + + + + Sets the mouse over internal flag that tracks whether the mouse is over the control. You can use this method to simulate the mouse over appearance when appropriate StyleMouseOver style is set. + + New value for the mouse over flag. + + + + Indicates whether CanvasColor should be serialized. Used by windows forms designer design-time support. + + + + + Resets CanvasColor to it's default value. Used by windows forms designer design-time support. + + + + + Resets the style to it's default value. + + + + + Resets the internal mouse tracking properties that track whether mouse is over the panel and whether is mouse pressed while over the panel. + + + + + Resets the style to it's default value. + + + + + Resets the style to it's default value. + + + + + Called when AntiAlias property has changed. + + + + + Called after either ColorScheme or ColorSchemeStyle has changed. If you override make sure that you call base implementation so default + processing can occur. + + + + + Returns the size of the panel calculated based on the text assigned. + + Calculated size of the panel or Size.Empty if panel size cannot be calculated. + + + + Returns the size of the panel calculated based on the text assigned. + + Calculated size of the panel or Size.Empty if panel size cannot be calculated. + + + + Updates the markup size to reflect current position of the scrollbars. You must call this method if you are scrolling control with markup using the AutoScrollPosition property. + + + + + Applies predefined Panel color scheme to the control. + + + + + Applies predefined Button color scheme to the control. + + + + + Applies predefined Label color scheme to the control. + + + + + Notifies a control that it is the default button so that its appearance and behavior is adjusted accordingly. + + true if the control should behave as a default button; otherwise false. + + + + Generates a Click event for the control. + + + + + Returns the renderer control will be rendered with. + + The current renderer. + + + + Raises NonClientSizeChanged event. + + Provides event arguments. + + + + Raises ScrollBarValueChanged event. + + Provides event arguments. + + + + Raises NonClientSizeChanged event. + + Provides event arguments. + + + + Occurs when text markup link is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + Gets or sets a value indicating whether right-to-left mirror placement is turned on. Default value is false. + + + + + Gets or sets Bar Color Scheme. Note that when ColorSchemeStyle property is set to Office 2007 style the color scheme is always retrived from the GlobalManager.Renderer and any\ + changes made on this property will not have any effect. + + + + + Gets or sets whether paint operations for the control are suspended. + + + + + Gets or sets whether Text supports and renders text markup. Default value is true. + + + + + Gets or sets the text displayed on panel. + + + + + Gets or sets whether focus rectangle is displayed when control has focus. + + + + + Gets or sets the canvas color for the panel. Canvas color will be visible on areas of the control that do not get covered + by the style and it will also be used as a base color for style to be painted on. + + + + + Gets or sets the panel style. + + + + + Gets or sets the panel style when mouse hovers over the panel. + + + + + Gets or sets the panel style when mouse button is pressed on the panel. + + + + + Gets or sets whether anti-alias smoothing is used while painting. + + + + + Gets or sets color scheme style. + + + + + Gets or sets a value indicating whether the container will allow the user to scroll to any controls placed outside of its visible boundaries. + + + + + Gets or sets whether text rectangle painted on panel is considering docked controls inside the panel. + + + + + Gets or sets the text rectangle. This property is set by internal implementation and it should not be set by outside code. + + + + + Gets or sets whether text markup if it occupies less space than control provides uses the Style Alignment and LineAlignment properties to align the markup inside of the control. Default value is false. + + + + + Returns reference to internal vertical scroll-bar control. + + + + + Returns reference to internal horizontal scroll-bar control. + + + + + Indicates whether panel uses themed DotNetBar scrollbars. Default value is true. + + + + + Gets or sets the scroll-bar visual style. + + + + + Gets or sets the value returned to the parent form when the button is clicked. + + + + + Specifies whether item is drawn using Themes when running on OS that supports themes like Windows XP. + + + + + Specifies back color when Enabled=false + + + + + Creates new instance of the panel. + + + + + Called after either ColorScheme or ColorSchemeStyle has changed. If you override make sure that you call base implementation so default + processing can occur. + + + + + Indicates whether style of the panel is managed by tab control automatically. + Set this to true if you would like to control style of the panel. + + + + + Gets or sets TabItem that this panel is attached to. + + + + + Gets or sets which edge of the parent container a control is docked to. + + + + + Gets or sets the size of the control. + + + + + Gets or sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container. + + + + + Gets or sets a value indicating whether the control is displayed. + + + + + Gets or sets which edges of the control are anchored to the edges of its container. + + + + + Defines single color blend point for the multicolor gradient fills. + + + + + Creates new instance of the class. When defining multicolor gradinet blends and using the percentage positions the positions created + must start with 0f and end with 1f. + + + + + Creates new instance of the class and initialize it with default values. + + + + + Creates new instance of the class and initialize it with default values. + + + + + Gets or sets Color to use in multicolor gradient blend at specified position. + + + + + Gets or sets the color position in multicolor gradient blend. Values less or equal to 1 are used as percentage specifing percentages of distance along the gradient line. + Values greater than 1 are used as absolute pixel values of distance along the gradient line. + + + + + Represents Collection for the BackgroundColorBlend objects. + + + + Creates new instance of the class. + + + + Adds new object to the collection. + + Object to add. + Index of newly added object. + + + + Adds array of new objects to the collection. + + Array of object to add. + + + + Inserts new object into the collection. + + Position of the object. + Object to insert. + + + + Returns index of the object inside of the collection. + + Reference to the object. + Index of the object. + + + + Returns whether collection contains specified object. + + Object to look for. + true if object is part of the collection, otherwise false. + + + + Removes specified object from the collection. + + + + + + Copies collection into the specified array. + + Array to copy collection to. + Starting index. + + + + Copies contained items to the BackgroundColorBlend array. + + Array to copy to. + + + + Creates ColorBlend object based on the members of the collection. ColorBlend object will be valid only if all members of the collection + represents relative/percentage based color blends. + + + + + + Adds the BackgroundColorBlend objects from the collection. + + Collection to copy objects from + + + + Initializes the collection with the two color blend. + + Collection to initialize. + Start color. + End color. + + + + Initializes the collection with the two color blend. + + Collection to initialize. + Start color. + End color. + + + + Initializes the collection with the two color blend. + + Collection to initialize. + Solid Color + + + + Returns reference to the object in collection based on it's index. + + + + + Represents BackgroundColorBlend object converter. + + + + + Represents the cancelable event arguments with integer value. + + + + + Gets or sets the new value that will be used if event is not canceled. + + + + + Indicates the source of the event. + + + + + Defines delegate for cancelable events. + + + + + Represents the cancelable event arguments with object value. + + + + + Initializes a new instance of the CancelObjectValueEventArgs class. + + + + + + Gets or sets the data connected to this event. + + + + + Defines delegate for cancelable events. + + + + + Provides data for CheckBoxItem rendering events. + + + + + Gets or sets Graphics object group is rendered on. + + + + + Gets or sets the reference to CheckBoxItem being rendered. + + + + + ColorScheme object that is used to provide colors for rendering check box item in legacy styles like Office 2003. Office 2007 style + uses color tables provided by renderers. + + + + + Indicates whether item is in Right-To-Left environment. + + + + + Gets or sets the text font. + + + + + Gets or sets the ItemPaintArgs reference. + + + + + Creates new instance of the object and provides default values. + + Reference to Graphics object + Reference to CheckBoxItem + Reference to legacy ColorScheme + Indicates the font for the text. + Indicates whether item is in Right-To-Left environment. + + + + Defines the event arguments class for ColorPickerDropDown ColorPreview event. + + + + + Gets the color that is being previewed. + + + + + Gets the ColorItem if available for the color being previewed. This property can be null if there is no ColorItem connected with the color. + + + + + Creates new instance of the object. + + Color being previewed. + ColorItem connected with the color. + + + + Defines delegate for ColorPreview event. + + + + + Delegate for the CancelableEventSource event. + + + + + Represents event arguments that provide information on source of action and allow canceling of action. + + + + + Gets or sets whether event action will be canceled. + + + + + Initializes a new instance of the EventSourceArgs class. + + + + + + Initializes a new instance of the CancelableEventSourceArgs class. + + + + + + Provides data for the Navigation Pane rendering events. + + + + + Gets or sets Graphics object group is rendered on. + + + + + Gets or sets the rendering bounds. + + + + + Creates new instance of the objects and initializes it with default values. + + + + + Provides data for the ProgressBarItem rendering events. + + + + + Gets or sets Graphics object group is rendered on. + + + + + Gets or sets the reference to ProgressBarItem being rendered. + + + + + Indicates whether item is in Right-To-Left environment. + + + + + Gets or sets the text font. + + + + + Creates new instance of the object and provides default values. + + Reference to Graphics object + Reference to ProgressBarItem + Indicates the font for the text. + Indicates whether item is in Right-To-Left environment. + + + + Provides data for the Quick Access Toolbar Customize dialog events. + + + + + Gets or sets whether to cancel the current operation. When showing the dialog this allows to cancel the showing. When dialog is closed + it allows to cancel the changes made on customize dialog. + + + + + Gets or sets the reference to the form that is acting as dialog. You can set this value to your custom form to display it instead of + built-in dialog. + + + + + Creates new instance of the object and initializes it with default values. + + Reference to the dialog being used for customization. + + + + Provides data for the Quick Access Toolbar Customize Item rendering events. + + + + + Gets or sets the reference to the item being rendered. + + + + + Gets or sets the reference to graphics object. + + + + + Creates new instance of the object and initializes it with default values. + + Reference to the customize item being rendered. + Reference to the graphics object. + + + + Provides data for the Quick Access Toolbar Overflow item rendering events. + + + + + Gets or sets the reference to the item being rendered. + + + + + Gets or sets the reference to graphics object. + + + + + Creates new instance of the object and initializes it with default values. + + Reference to the overflow item being rendered. + Reference to the graphics object. + + + + Provides information for ribbon customization events. + + + + + Gets or sets whether the menu popup will be cancelled. Default value is false. + + + + + Gets or sets the reference to the object customize menu will be acting on. This could be an ButtonItem or any + BaseItem derived class as well as RibbonBar object. + + + + + Gets or sets the reference to the popup menu that will be displayed. You can change the members of SubItems collection to add/remove/change + the context menu items that will be displayed. + + + + + Creates new instance of the object and initializes it with default values. + + Reference to context object. + Reference to popup menu item if any. + + + + Provides data for the RenderMdiSystemitem event. + + + + + Gets or sets Graphics object group is rendered on. + + + + + Gets or sets the reference to MdiSystemItem being rendered. + + + + + Creates new instance of the class and initializes it with default values. + + Reference to graphics object. + Reference to MdiSystemItem being rendered. + + + + Represents events arguments for the Ribbon Control rendering events. + + + + + Gets or sets Graphics control is rendered on. + + + + + Gets the reference to RibbonControl instance being rendered. + + + + + Gets whether Windows Vista Glass is enabled. + + + + + Creates new instance and initializes it with the default values. + + Reference to Graphics object + Reference to RibbonControl + + + + Gets or sets whether the closing of the ribbon menu is canceled. + + + + + Gets or sets the source object that was cause of the menu closing. For example this could be reference to an item that was clicked. + Default value is null which indicates that there is no information about the object that caused closing available. + + + Following is the possible list of types that this property could be set to + and causes for closing: + + BaseItem - when an item is clicked the Source will be set to the instance + of the item that was clicked. + RibbonControl - when parent form RibbonControl is on loses the input + focus the Source will be set to the RibbonControl + RibbonTabItem - when tab menu is displayed and user clicks the same tab + to close the menu. The RibbonTabItem with EventSource=Code will be also set as + source when user double-clicks the tab to maximize the ribbon. + Any other type if RibbonControl.PopupRibbon method is called by your + code. + + + + + + Gets or sets the source of the event. + + + + + Creates new instance of the object. + + + + + Gets or sets the reference to graphics object. + + + + + Initializes a new instance of the SideBarPanelItemRendererEventArgs class. + + + + + + + Gets or sets the reference to graphics object. + + + + + Initializes a new instance of the SideBarRendererEventArgs class. + + + + + + + Provides data for the Slider item rendering events. + + + + + Gets or sets the reference to the item being rendered. + + + + + Gets or sets the reference to graphics object. + + + + + Creates new instance of the object and initializes it with default values. + + Reference to the Slider item being rendered. + Reference to the graphics object. + + + + Defines the abstract class for form caption painter. + + + + + Provides data for form caption rendering events. + + + + + Gets or sets the reference to graphics object. + + + + + Gets or sets the caption bounds. + + + + + Gets or sets the form caption is rendered for. + + + + + Creates new instance of the class. + + + + + Defines the Office 2007 style form caption painter. + + + + + Gets or sets color table used by renderer. + + + + + Represents an item that provides system buttons displayed on form caption. + + + + + Summary description for MDISystemItem. + + + + + Returns copy of CustomizeItem item + + + + + Returns the single button size. + + Size of the button. + + + + MDI System Item can render itself as either Simple icon with system drop down menu or set of + system buttons Minimize, Restore and Close. This item is rendered on the Bar that is designated as + Menu bar and when bar is used on MDI form and MDI Child form is maximized. + + + + + Gets the default size of the system buttons. + + + + + + Gets or sets the custom button size to use instead of system determined size. + + + + + Gets or sets whether Minimize button is visible. + + + + + Gets or sets whether Restore/Maximize button is visible. + + + + + Gets or sets whether Close button is visible. + + + + + Gets or sets whether help button is visible. + + + + + Gets or sets whether Icon is queried when item is painted. Default value is false. + + + + + Provides data for the RenderSystemCaptionItem event. + + + + + Gets or sets Graphics control is rendered on. + + + + + Gets reference to SystemCaptionItem being rendered. + + + + + Gets whether Windows Vista Glass is enabled. + + + + + Creates new instance of the class and initializes it with default values. + + Reference to Graphics object. + Reference to item being rendered. + Indicates whether Vista Glass effect is enabled. + + + + Represents the line drawn between start and end point. + + + + + Paints the shape on canvas. If overriden base implementation must be called to paint any child shapes. + + Shape paint information. + + + + Returns absolute location of the shape based on parent bounds. + + Parent absolute bounds. + Absolute location of the shape + + + + Returns absolute size of the shape based on the parent bounds. + + Absolute parent bounds. + Absolute size of the shape. + + + + Gets the absolute bounds of the shape. + + Parent bounds. + Absolute bounds of the shape. + + + + Gets the location of the shape. + + + + + Gets the size of the shape. + + + + + Gets the shape padding. Padding is the inside spacing between shape and it's child shapes. + + + + + Gets the collection of child shapes. + + + + + Gets or sets whether this shape will set the ShapePaintInfo.ChildContentClip property to the region that represents the inside content of the shape. + This is used when there is inside content of the shape which is not part of the shape itself and calling routine needs + access to the region that defines the shape inside bounds. + + + + + Gets the start point of the line. + + + + + Gets the end point of the line. + + + + + Gets the line border. + + + + + Describes the shape location. + + + + + Gets or sets the X location of the shape relative to it's parent. + + + + + Gets or sets the Y location of the shape relative to it's parent. + + + + + Gets or sets the relative X position. + + + + + Gets or sets the relative Y position. + + + + + Describes the relative location. + + + + + Describes the padding for the shape. Padding is the space inside the shape and between it's child shapes. + + + + + Creates new instance of the class. + + + + + Creates new instance of the class and initializes it with default values. + + + + + Gets or sets the left padding in pixels. + + + + + Gets or sets the right padding in pixels. + + + + + Gets or sets the top padding in pixels. + + + + + Gets or sets the bottom padding in pixels. + + + + + Gets the total horizontal padding. + + + + + Gets the total vertical padding. + + + + + Paints the border. + + + + + Paints the border. + + + + + Gets or sets the rounded corner size. + + + + + Gets the shape border. + + + + + Gets the shape fill. + + + + + Defines the shape border. + + + + + Gets or sets the border width in pixels. + + + + + Gets or sets the border color. + + + + + Gets or sets the ending gradient border color. + + + + + Gets or sets the gradient angle. Default value is 90. + + + + Creates new instance of the class. + + + + Adds new object to the collection. + + Object to add. + Index of newly added object. + + + + Inserts new object into the collection. + + Position of the object. + Object to insert. + + + + Returns index of the object inside of the collection. + + Reference to the object. + Index of the object. + + + + Returns whether collection contains specified object. + + Object to look for. + true if object is part of the collection, otherwise false. + + + + Removes specified object from the collection. + + + + + + Copies collection into the specified array. + + Array to copy collection to. + Starting index. + + + + Copies contained items to the Shape array. + + Array to copy to. + + + + Returns reference to the object in collection based on it's index. + + + + + Gets or sets the starting fill color. + + + + + Gets or sets the end fill color. + + + + + Gets or sets the gradient angle. + + + + + Gets or sets the background color collection blend. + + + + + Gets or sets the fill gradient type. + + + + + Paints the border. + + + + + Paints the border. + + + + + Gets the shape border. + + + + + Gets the shape fill. + + + + + Describes shape size. + + + + + Gets or sets the width of the shape. When RelativeWidth is specified then number specifed here is added to the actual shape width. + + + + + Gets or sets the height of the shape. When RelativeHeight is specified the number specified here is added to the actual shape height. + + + + + Gets or sets the relative shape width. + + + + + Gets or sets the relative shape height. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Represents the class used to create Color objects. + + + + + Creates new instance of the object. + + + + + Represents the class used to create Color objects blended based on base color. + + + + + Creates new instance of the object. + + + + + Converts integer color representation to Color type. + + Color representation as 32-bit RGB value. + Reference to Color object. + + + + Converts integer color representation to Color type. + + Color representation as 32-bit RGB value. + Reference to Color object. + + + + Converts integer color representation to Color type. + + Color value. + Reference to Color object. + + + + Converts color representation to alpha Color type. + + Color value. + Reference to Color object. + + + + Converts integer color representation to Color type. + + Color value. + Reference to Color object. + + + + Defines the names for the ElementStyle.Class style classes. + + + + + Gets the key for the GalleryContainer background style class. + + + + + Gets the key for the Ribbon File menu outer container background style class. + + + + + Gets the key for the Ribbon File menu two column container background style class. + + + + + Gets the key for the Ribbon File menu first column container background style class. + + + + + Gets the key for the Ribbon File menu second column container background style class. + + + + + Gets the key for the Ribbon File menu bottom container background style class. + + + + + Gets the key for the text box border style class. + + + + + Gets the key for the RichTextBox control border style class. + + + + + Gets the key for the ItemPanel style class. + + + + + Gets the key for the ListBoxAdv style class. + + + + + Gets the key for the date time input background style class. + + + + + Gets the style key for the Ribbon client panel. + + + + + Gets the style key for the ListView control border style. + + + + + Gets the style key for the Office2007 Status Bar alternative background. + + + + + Gets the style key for the AdvTree control border and background. + + + + + Gets the style key for the AdvTree control columns header. + + + + + Gets the style key for the AdvTree control columns header for the child nodes. + + + + + Gets the style key for the AdvTree control column. + + + + + Gets the style key for the CrumbBar background style. + + + + + Gets the key for the DataGridView border style class. + + + + + Gets the key for the DataGridViewNumeric border style class. + + + + + Gets the key for the DataGridViewDateTime border style class. + + + + + Gets the key for the DataGridViewIpAddress border style class. + + + + + Gets the key for SlidePanel slide-out button style. + + + + + Gets the key for the MetroTilePanel style class. + + + + + Gets the key for Metro tile group container title class. + + + + + Gets the style key for the MonthCalendarAdv control. + + + + + Gets the style key for the ProgressSteps control. + + + + + Gets the style key for the SideNavStrip control. + + + + + Gets the style key for the TabFormPanel control. + + + + + Gets the style key for the ToolboxGroup title. + + + + + Gets the style key for the ToolboxGroup title mouse over. + + + + + Gets the style key for the ToolboxGroup title group expanded state. + + + + + Gets the style key for the ToolboxControl. + + + + + Represents a static class that maintains the global rendering properties for all controls when eRenderMode is set to global. + + + + + Gets or sets the global renderer used by all controls that have RenderMode set to eRenderMode.Global. + + + + + Represents complex gradient color table. + + + + + Creates new instance of the object. + + + + + Creates new instance of the object and initializes it with default values. + + Start color + End color + + + + Creates new instance of the object and initializes it with default values. + + Start color + End color + + + + Creates new instance of the object and initializes it with default values. + + Start color + End color + + + + Creates new instance of the object and initializes it with default values. + + Start color + End color + Linear gradient angle + + + + Creates new instance of the object and initializes it with default values. + + Start color + End color + Linear gradient angle + + + + Gets or sets the color collection blend that describes the gradient. + + + + + Gets or sets the gradient type. + + + + + Gets or sets the linear gradient angle. + + + + + Creates a copy of table. + + A copy. + + + + Represents the color table of linear gradient. + + + + + Creates new instance of the object. + + + + + Creates new instance of the object. + + Start color. + + + + Creates new instance of the object. + + Start color. + End color. + + + + Creates new instance of the object. + + Start color in hexadecimal representation like FFFFFF. + End color in hexadecimal representation like FFFFFF. + + + + Creates new instance of the object. + + Start color in 32-bit RGB representation. + + + + Creates new instance of the object. + + Start color in 32-bit RGB representation. + End color in 32-bit RGB representation. + + + + Creates new instance of the object. + + Start color in 32-bit RGB representation. + End color in 32-bit RGB representation. + Gradient angle. + + + + Creates new instance of the object. + + Start color. + End color. + Gradient angle. + + + + Gets or sets the start color. + + + + + Gets or sets the end color. + + + + + Gets or sets the gradient angle. Default value is 90. + + + + + Gets whether both colors assigned are empty. + + + + + Item container for dockable windows. + + + + + Creates new instance of ControlContainerItem and assigns item name. + + + + + Creates new instance of ControlContainerItem and assigns item name. + + Item name. + + + + Creates new instance of ControlContainerItem and assigns item name and item text. + + Item name. + Item text. + + + + Overriden. Returns the copy of the ControlContainerItem. + + Copy of the ControlContainerItem. + + + + Overriden. Draws the item. + + Target Graphics object. + + + + Overriden. Recalculates the size of the item. + + + + + Returns the Font object to be used for drawing the item text. + + Font object. + + + + Occurs after an item has been removed. + + Item being removed. + + + + Occurs after text has changed. + + + + + Occurs after item visual style has changed. + + + + + Occurs when container control needs to be assigned to the item. + + + + + Gets or sets the reference to the contained control. + + + + + Returns category for this item. If item cannot be customzied using the + customize dialog category is empty string. + + + + + Gets or sets whether Click event will be auto repeated when mouse button is kept pressed over the item. + + + + + Gets or sets the auto-repeat interval for the click event when mouse button is kept pressed over the item. + + + + + Gets or sets item description. This description is displayed in + Customize dialog to describe the item function in an application. + + + + + Gets or sets item alignment inside the container. + + + + + Gets or sets the collection of shortcut keys associated with the item. + + + + + Gets or sets whether item will display sub items. + + + + + Gets or sets a value indicating whether the item is visible. + + + + + Specifies the Tab image. Image specified here is used only on Tab when there are multiple dock containers on Bar. + + + + + Specifies the index of the Tab image if ImageList is used. Image specified here is used only on Tab when there are multiple dock containers on Bar. + + + + + Specifies the Button icon. Icons support multiple image sizes and alpha blending. + + + + + Gets or sets the predefined tab color. Default value is eTabItemColor.Default which means that default color is used. + + + + + Gets or sets whether tab that dock container item is on is selected. + + + + + Gets or sets the width of the item in pixels. + + + + + Gets or sets the height of the item in pixels. + + + + + Gets or sets the minimum size of the item. When used please note that layout logic for dockable windows expects that + all DockContainerItems that are in particular docking side have exact same minimum size. When setting this property it is + best to set the same value for all DockContainerItem instances you create. + + + + + Gets or sets the default floating size of the Bar that is containing this item. + + + + + Gets or sets the minimum size of the form client area that is tried to maintain when dockable window is resized. + + + + + Gets or sets whether the item expands automatically to fill out the remaining space inside the container. Applies to Items on stretchable, no-wrap Bars only. + + + + + Gets or sets whether item can be customized by end user. + + + + + Returns whether item is in design mode or not. + + + + + Gets or sets whether item is global or not. + This flag is used to propagate property changes to all items with the same name. + Setting for example Visible property on the item that has GlobalItem set to true will + set visible property to the same value on all items with the same name. + + + + + Gets or sets the close button behavior on the host Bar. Default value is eDockContainerClose.Inherit which means that Bar.CanHide will control whether DockContainerItem can be closed. + + + + + Gets or sets a value indicating whether the item is enabled. + + + + + Specifies the behavior of the close button on host bar for the DockContainerItem. + + + + + Closing of the bar is inherited from the host bar. Bar.CanHide property will control close button visibility. + + + + + Closing of the DockContainerItem is allowed. + + + + + Closing of DockContainerItem is not allowed. + + + + + Summary description for DockingHint. + + + + + Required designer variable. + + + + + Clean up any resources being used. + + + + + Update control region based on hint side + + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Represent the docking information for an control. + + + + + Control dock side. + + + + + Control dock site. + + + + + Docking offset. + + + + + Docking line. + + + + + Docked control width. + + + + + Docked control height. + + + + + Control position. + + + + + Indicates whether to use outline or not + + + + + Indicates that dock site should change it's Z-Order so it maximizes the space it consumes as related to other dock sites. + + + + + Indicates that dock site should change it's Z-Order so it reduces the amount of space it consumes as related to other dock sites. + + + + + When either FullSizeDock or PartialSizeDock is set it indicates the new dock site Z-Order index. + + + + + Returns the bar that mouse is placed over. + + + + + Returns dock side the mouse is indicating user wants to dock bar at. + + + + + Gets the last relative docked to bar. + + + + + Gets the last relative docked to document id. + + + + + Returns side of last docked-to dock site. + + + + + Dock Sites are created by DotNetBar control on each edge of the + DotNetBar container control and are used for docking purposes. + If Dock Site does not contain any controls it will be invisible. + + + + + Creates new instance of DockSite object with specified dock style. + + Specifies the position and manner in which a site is docked. + + + + Creates new instance of DockSite object. + + + + + Returns reference to the DocumentDockUIManager object used for interaction with document docking engine. + + Reference to the DocumentDockUIManager object. + + + + Saves layout for bars contained by dock site. + + Parent XmlElement. + + + + Loads layout for the bars. + + Parent XmlElement that was passed to SaveLayout method to save layout + + + + Suspends normal layout logic. + + + + + Resumes normal layout logic. + + + + + Resumes normal layout logic. Optionally forces an immediate layout of pending layout requests. + + + + + Docks the bar to the dock site. + + Bar to dock. + + + + Dockes the Bar to dock site at specified position. + + Bar to dock. + Bar insert position. + + + + Relayouts all docked controls in the site. + + + + + Returns the docking information for current position. + + Controls docking provider. + Horizontal assumed docking position. + Vertical assumed docking position. + Docking information. + + + + + Undocks the control from the site. + + Control to undock. + + + + Gets or sets whether painting is disabled on dock site while layout of bars is performed. Default value is true. + You might need to set this property to false if you are expirience vide flashing while using DirectX video animation in Bar controls that are part of the + dock site. + + + + + Specifies background image position when container is larger than image. + + + + + Specifies the transparency of background image. + + + + + Gets or sets the target gradient background color. + + + + + Gets or sets gradient fill angle. + + + + + Specifies the position and manner in which a site is docked. + + + + + Gets the reference to the DotNetBarManager that uses this dock site. + + + + + Represents class that is a bar container for document docking. + + + + + Represents Document container base class. + + + + + Creates new instance of the class. + + + + + Resizes the document within specified bounds. + + Area available for the document. + + + + Sets the display bounds. + + New display bounds. + + + + Sets layout bounds. + + New layout bounds. + + + + Resets the layout bounds for the document base container to the empty bounds. + + + + + Resets the layout bounds for the document base container to the empty bounds. + + + + + Sets the parent document. + + Parent container. + + + + Sets the width of the document. + + Width in pixels + + + + Sets the height of the document. + + Height in pixels. + + + + Occurs when width is being set on child document. + + Reference document being changed + Width in pixels + True if width was applied by parent otherwise false + + + + Occurs when height is being set on child document. + + Reference document being changed + Height in pixels + True if width was applied by parent otherwise false + + + + Updates bounds of the item in response to the scrolling of LayoutControl. + + + + + + + Gets the unique ID for the container. + + + + + Returns actual display bounds of the document. + + + + + Returns layout bounds of the document. Layout bounds are proposed bounds of the layout and might not be the same + as DisplayBounds. + + + + + Gets the parent container. + + + + + Gets whether document is visible or not. + + + + + Gets minimum size of the document. + + + + + Creates new instance of the class. + + + + + Creates new instance of the class and initializes it with the Bar object. + + Bar to contain on document. + + + + Creates new instance of the class and initializes it with the bar and propesed width and height. + + Bar to contain on document. + Proposed width of the document in pixels + Proposed height of the document in pixels + + + + Resizes document object. + + Available bounds for the document. + + + + Gets or sets the bar that is contained by this document. + + + + + Gets whether document is visible. + + + + + Gets the minimum size of the document. + + + + + Represents DocumentBarContainer converter. + + + + + Creates new instance of the class. + + + + + Checks whether conversion can be made to specified type. + + Context Information. + Destination type. + + + + + Converts object to specified type. + + Context information. + Culture information. + Object to convert. + Destination type. + Object converted to destination type. + + + + Collection of DocumentBaseContainer objects. + + + + + Adds new object to the collection. + + Object to add. + Index of newly added object. + + + + Adds new objects to the collection. + + Array of documents to add. + + + + Inserts new object into the collection. + + Position of the object. + Object to insert. + + + + Returns index of the object inside of the collection. + + Reference to the object. + Index of the object. + + + + Returns whether collection contains specified object. + + Object to look for. + true if object is part of the collection, otherwise false. + + + + Removes specified object from the collection. + + + + + + Copies collection into the specified array. + + Array to copy collection to. + Starting index. + + + + Copies contained items to the DocumentBaseContainer array. + + Array to copy to. + + + + Returns reference to the object in collection based on it's index. + + + + + Represents Dock container with either horizontal or vertical layout. + + + + + Creates new instance of the object and initializes it with specified values. + + Array of documents to host in this container. + Container orientation + + + + Creates new instance of the object. + + + + + Resizes the object inside of the given bounds. + + Available area. + + + + Occurs when width is being set on child document. + + Reference document being changed + Width in pixels + True if width was applied by parent otherwise false + + + + Occurs when height is being set on child document. + + Reference document being changed + Height in pixels + True if width was applied by parent otherwise false + + + + Returns the DocumentBarContainer object for a given bar. + + Bar to search for. + Reference to container or null if bar could not be found + + + + Gets whether document is visible or not. + + + + + Gets the orientation of the container. Default value is Horizontal. + + + + + Returns collection of the documents hosted by this container. + + + + + Returns minimum size of the object. + + + + + Gets or sets splitter size in pixels between the documents docking inside the container. Default value is 3. + + + + + Gets or sets whether the size of the documents is recorded once the layout is calculated. + + + + + Indicates whether the container is allowed to exceed the parent control client size due to inner child windows minimum size constraints. + + + + + Represents DocumentDockContainer object converter. + + + + + Represents class that manages document docking UI interaction. + + + + + + Returns DocumentBaseContainer that holds the reference bar. + + Bar to return document container for. + Returns null if document container cannot be found or reference to the document container. + + + + Docks specified bar by appending it to the container. Bar will be added according to the container's orientation. + + Bar to dock. + + + + Docks specified bar by appending it to the container. Bar will be added according to the container's orientation. + + Bar to dock. + Side to dock bar at. + + + + Adjusts the size of the dock container if needed after a bar has been docked to it. + + Bar object that has been docked. + Indicates that bar was already docked but its Visible property has changed + + + + Processes OnMouseMove events from DockSite. This routine assumes that mouse messages are received only when mouse is actually over + the dock site and not containing bars. This is significant because it will receive messages only if mouse is over the splitter + space between bars. + + Mouse event arguments. + + + + Returns reference to the DocumentDockContainer that contains specified coordinates. Searches through the Documents collection first. + + X coordinate + Y coordinate + + + + + Sets the width of the bar that is managed by this document layout. Width can be set only if parent container has + Horizontal orientation. Note that bar minimum size is respected by this method and + it will be enforced. If width is less than minimum width bar's width will be set to minimum width. + + Reference to bar object. + Desired width. + + + + Sets the height of the bar that is managed by this document layout. Height can be set only if parent container has + vertical orientation. Note that bar minimum size is respected by this method and + it will be enforced. If height is less than minimum height bar's height will be set to minimum height. + + Reference to bar object. + Desired height. + + + + Gets or sets the root document dock container object. + + + + + Gets or sets the splitter width used for mouse hit-testing. + + + + + Gets or sets the container of the document. + + + + + Gets whether document/bar is being resized. + + + + + Represent the menu, toolbar and popup menu structure for the form. + + + + + Raises BarStateChanged event. + + Provides event arguments. + + + + Creates new instance of DotNetBarManager. + + + + + Creates new instance of DotNetBarManager. + + Container. + + + + Dock bar to the specified side of the form. + + Bar to dock. + Side to dock bar to. + + + + Docks the bar to the specified side of the reference bar. + + Bar to dock. + Reference bar. + Side of the reference bar to dock the bar to. + + + + Docks specified DockContainerItem. + + DockContainerItem to dock. + Side to dock item to. + + + + Docks specified DockContainerItem. + + DockContainerItem to dock. + Reference bar. + Side to dock item to. + + + + Docks specified DockContainerItem. + + DockContainerItem to dock. + Reference bar. + Side to dock item to. + + + + Tear-off specified DockContainerItem and float it. + + Item to float. + + + + Tear-off specified DockContainerItem and float it. + + Item to float. + + + + Make specified bar floating bar, i.e. undock it and place in floating window. + + Bar to float. + + + + Make specified bar floating bar, i.e. undock it and place in floating window and specified location on the screen. + + Bar to float. + Screen coordinates for the floating bar. + + + + Raises the ActiveDockContainerChanged event. + + Provides event arguments. + + + + Invokes ItemDoubleClick event. + + Reference to item double-clicked + Event arguments + + + + Returns the Bar object that contains the item. + + + + + Clean up any resources being used. + + + + + Returns whether property should be serialized by Windows Forms designer. + + + + + Use to remove bar from DotNetBar control. Bar will be undocked if it is docked and + removed from all internal collections. + + Bar to remove. + + + + Forces the loading of the definition specified in DefinitionName property. + By default definition is loaded after parent form handle has been created and form is loaded. + However, under certain circumstances you might need DotNetBar to load definition right away so + you can access bars and items. We recommend moving the code to Form Load event and leaving the loading process for DotNetBar definition as is. + + + + + Loads DotNetBar definition from file. + + File that contains DotNetBar defintion. + + + + Invokes SerializeItem event. + + Provides data for the event. + + + + Invokes DeserializeItem event. + + Provides data for the event. + + + + Saves current DotNetBar definition and state to the file. + + File name. + + + + Loads DotNetBar layout from file. + + File that contains DotNetBar defintion. + + + + Saves current DotNetBar layout to the file. + + File name. + + + + Invokes the DotNetBar Customize dialog. + + + + + Returns the collection of items with the specified name. + + Item name to look for. + + + + + Returns the collection of items with the specified name. This method search for items on all Bars, Items collection and ContextMenus collection. + The order of search is as follows. All Bars from Bars collections are searched, then Items collection and then ContextMenus collection. + + Item name to look for. + Specifies that search will be performed through all DotNetBar collections. + + + + + Returns the collection of items with the specified name and type. + + Item name to look for. + Item type to look for. + + + + + Returns the collection of items with the specified name and type. This method will searchs for items on all Bars, Items collection and ContextMenus collection. + The order of search is as follows. All Bars from Bars collections are searced, then Items collection and then ContextMenus collection. + + Item name to look for. + Item type to look for. + Specifies that full search (through all collections) will be performed. + + + + + Returns the collection of items with the specified name and type. This method will searchs for items on all Bars, Items collection and ContextMenus collection. + The order of search is as follows. All Bars from Bars collections are searced, then Items collection and then ContextMenus collection. + + Item name to look for. + Item type to look for. + Specifies that full search (through all collections) will be performed. + + + + + Returns the first item that matches specified name. + + Item name to look for. + + + + + Returns the first item that matches specified name with the option to indicate full search of all collections. + The order of search is as follows. All Bars from Bars collections are searced, then Items collection and then ContextMenus collection. + + Item name to look for. + Specifies that all collection will be searched. + + + + + Called before modal dialog is displayed using ShowModal() method. + + + + + Called after modal dialog is closed. + + + + + You must call this procedure if you are implementing custom customize dialog box after your dialog box is closed. + + + + + Registers popup item with DotNetBar. Use this function carefully. The registration is required only if Popup item is created completely from code and it is not added to any DotNetBarManager collection. + + + + + + Un-registers specified popup. See RegisterPopup for more information. + + + + + + Resets the ColorScheme property to its default value. + + + + + Informs the DotNetBarManager that Mdi Child for has been activated. Calling this method is needed only under special + conditions where MDI child system items do not show. + + + + + Resets all usage data collected by DotNetBar in relation to the Personalized menus. + + + + + Occurs after bar registered with DotNetBarManager state has changed, like selected dock tab has changed, bar has closed, bar has been docked or undocked etc. + + + + + Occurs when focused (active) DockContainerItem has changed. You can use ActiveDockContainerItem property to get reference to currently focused DockContainerItem. + + + + + Occurs just before customize popup menu is shown. + + + + + Occurs when Item is clicked. + + + + + Occurs when Item is clicked. + + + + + Occurs when popup of type container is loading. + + + + + Occurs when popup of type container is unloading. + + + + + Occurs when popup item is about to open. + + + + + Occurs when popup item is closing. + + + + + Occurs just before popup window is shown. + + + + + Occurs when Item Expanded property has changed. + + + + + Occurs when Bar is docked. + + + + + Occurs when Bar is Undocked. + + + + + Occurs before dock tab is displayed. + + + + + Occurs when Bar auto-hide state has changed. + + + + + Occurs when mouse button is pressed. + + + + + Occurs when mouse button is released. + + + + + Occurs when mouse enters the item. + + + + + Occurs when mouse leaves the item. + + + + + Occurs when mouse moves over the item. + + + + + Occurs when mouse remains still inside an item for an amount of time. + + + + + Occurs when item loses input focus. + + + + + Occurs when item receives input focus. + + + + + Occurs when user changes the item position, removes the item, adds new item or creates new bar. + + + + + Occurs after DotNetBar definition is loaded. + + + + + Occurs when users wants to reset the DotNetBar to default state. + + + + + Occurs after an Item is removed from SubItemsCollection. + + + + + Occurs after an Item has been added to the SubItemsCollection. + + + + + Occurs when ControlContainerControl is created and contained control is needed. + + + + + Occurs when Text property of an Item has changed. + + + + + Occurs when Customize Dialog is about to be shown. + + + + + Occurs when Customize Dialog is closed. + + + + + Use this event if you want to serialize the hosted control state directly into the DotNetBar definition file. + + + + + Use this event if you want to deserialize the hosted control state directly from the DotNetBar definition file. + + + + + Occurs when current Dock tab has changed. + + + + + Occurs when Bar is about to be closed as a result of user clicking the Close button on the bar. + + + + + Occurs when Bar in auto-hide state is about to be displayed. + + + + + Occurs when user starts to drag the item when customize dialog is open. + + + + + Occurs when users Tears-off the Tab from the Bar and new Bar is created as result of that action. + + + + + Occurs when DotNetBar is looking for translated text for one of the internal text that are + displayed on menus, toolbars and customize forms. You need to set Handled=true if you want + your custom text to be used instead of the built-in system value. + + + + + Occurs before an item in option group is checked and provides opportunity to cancel the change. + + + + + Occurs before tooltip for an item is shown. Sender could be the BaseItem or derived class for which tooltip is being displayed or it could be a ToolTip object itself it tooltip is not displayed for any item in particular. + + + + + Occurs on dockable bars when end-user attempts to close the individual DockContainerItem objects using system buttons on dock tab. + Event can be canceled by setting the Cancel property of event arguments to true. This even will occur only after user presses the + X button on tab that is displaying the dockable windows/documents. + + + + + Occurs on dockable bars after DockContainerItem is closed. This action cannot be cancelled. + + + + + Occurs after an item has been serialized to XmlElement and provides you with opportunity to add any custom data + to serialized XML. This allows you to serialize any data with the item and load it back up in DeserializeItem event. + + + To serialize custom data to XML definition control creates handle this event and use CustomXmlElement + property on SerializeItemEventArgs to add new nodes or set attributes with custom data you want saved. + + + + + Occurs after an item has been de-serialized (load) from XmlElement and provides you with opportunity to load any custom data + you have serialized during SerializeItem event. + + + To de-serialize custom data from XML definition handle this event and use CustomXmlElement + property on SerializeItemEventArgs to retrive any data you saved in SerializeItem event. + + + + + Occurs when TextBoxItem input text has changed. + + + + + Occurs when color on ColorPickerDropDown is choosen from drop-down color picker or from Custom Colors dialog box. Selected color can be accessed through SelectedColor property. + + + + + Occurs when Checked property of an button has changed. + + + + + Gets or sets docking splitter size. + + + + + Indicates whether mouse drag and drop for docking is enabled. + + + + + Indicates whether Ctrl+Tab keys cycles the currently selected dock tab. + + + + + Gets or sets the Context menu bar associated with the this control which is used as part of Global Items feature. The context menu + bar assigned here will be used to search for the items with the same Name or GlobalName property so global properties can be propagated when changed. + You should assign this property to enable the Global Items feature to reach your ContextMenuBar. + + + + + Gets or sets the form DotNetBarManager is attached to. + + + + + Gets or sets the user control DotNetBarManager is parented to when on user control and providing popups only. + + + + + Gets currently focused (active) DockContainerItem. Note that only if DockContainer Item has input focus it will be consider active + so there can only be one active DockContainerItem at a time. + + + + + Gets whether component has been disposed. + + + + + Disposed will return true after Dispose method has been executed. + + + + + Gets or sets whether GC.Collect() is called when this component is disposed. + + + + + Gets or sets the minimum client size that docking windows will try to maintain for the client area (not occupied by dock windows). + Note that this value is suggested value and cannot be observed when form is resized below the minimum size required for the given layout. + Default value is 48x48 pixels. + + + + + Indicates whether DotNetBar provides docking hints for easy docking of bars. + + + + + Gets or sets whether user can control how first bar is docked when using docking hints (default value is True). When enabled (default value) placing the mouse over the middle + docking hint will dock the bar at partial size and using the far docking hint will dock bar at full size. Full size indicates that dock site which hosts the bar + consumes all the space of the parent form while partial size indicates that dock site consumes the full size minus the space of the other dock sites. Default value is true. + + + + + Gets or sets whether uniform styling is applied to bars docked as documents. Default value is true which means + that bar that will be docked as document will have it's style changed so it fits in default document styling. + Such bars will have GrabHandleStyle=None, DockTabAlignment=Top and AlwaysDisplayDockTab=true. + Set this property to false to have bars keep these properties once they are docked as documents. + Value of these properties will be returned back to the default values once bar is not docked as document. + + + + + Gets the collection of the Bar objects associated with DotNetBarManager. + + + + + Gets whether definition is loaded. + + + + + Gets the collection of all items that are used for end-user design-time customization. + + + + + Gets the collection of all popup menus managed by DotNetBarManager. + + + + + Indicates whether shortucts handled by items are dispatched to the next handler or control. + + + + + Gets or sets the collection of shortcut keys that are automatically dispatched to the control that has focus even if they are handled and used by one of the items. This gives you fine control over which shortcuts are passed through the system and which ones are marked as handled by DotNetBar. + + + + + Indicates whether Reset buttons is shown that allows end-user to reset the toolbar state. + + + + + ImageList for images used on Items. Images specified here will always be used on menu-items and are by default used on all Bars. + + + + + ImageList for medium-sized images used on Items. + + + + + ImageList for large-sized images used on Items. + + + + + Suspends the bar layout for all bars. + + + + + Specifes whether drop shadow is displayed for Menus and pop-up Bars. OfficeXP Style only. + + + + + Specifes whether to use Alpha-Blending shadows for pop-up items if supported by target OS. Disabling Alpha-Blended shadows can improve performance. + + + + + Gets or sets whether gray-scale algorithm is used to create automatic gray-scale images. Default is true. + + + + + Gets or sets whether hooks are used for internal DotNetBar system functionality. Using hooks is recommended only if DotNetBar is used in hybrid environments like Visual Studio designers or IE. + + + + + Gets whether any handlers have been defined for SerializeItem event. If no handles have been defined to optimize performance SerializeItem event will not be attempted to fire. + + + + + Gets whether any handlers have been defined for DeserializeItem event. If no handles have been defined to optimize performance DeserializeItem event will not be attempted to fire. + + + + + Returns whether definition is being currently loaded. + + + + + Gets or sets whether document bars are saved in definition file. Default value is false which means that document + bars are not saved as part of definition file. You can set this value to true to save document bar to definition file and + be able to load them. + + + Note that by default Document bars that you created during design-time get member + variables assigned to them by Windows Forms designer. If you decide to save definition + of such bars and load definition back member variables will not point to correct bar + instances since loading definition recreates all bars from scratch. You should always + use Bars collection to access bars when saving and loading definitions. + + + + + Gets or sets the DotNetBar definition string. + + + + + Gets or sets the DotNetBar layout string. + + + + + Gets whether DotNetBarManager is loading layout. + + + + + Specifies that custom customize dialog will be used. Use EnterCustomize event to show your custom dialog box. + + + + + Gets or sets the toolbar Top dock site used by DotNetBarManager. + + + + + Gets or sets the toolbar Bottom dock site used by DotNetBarManager. + + + + + Gets or sets the toolbar Left dock site used by DotNetBarManager. + + + + + Gets or sets the toolbar Right dock site used by DotNetBarManager. + + + + + Gets or sets the Top dock site used by DotNetBarManager. + + + + + Gets or sets the Bottom dock site used by DotNetBarManager. + + + + + Gets or sets the Left dock site used by DotNetBarManager. + + + + + Gets or sets the Right dock site used by DotNetBarManager. + + + + + Gets or sets the Fill dock site used by DotNetBarManager. Fill dock site is most commonly used as dock site + for document type docking. + + + + + Specifies whether bars are drawn using Themes when running on OS that supports themes like Windows XP. + + + + + Sets the style of all items in DotNetBar Manager. + + + + + Gets or sets Color scheme for all bars. Note that you need to set UseGlobalColorScheme to true to indicate + that this ColorScheme object will be used on all bars managed by this instance of DotNetBarManager. + + + + + Gets or sets whether ColorScheme object on DotNetBarManager is used as a default ColorScheme for all bars managed by DotNetBarManager. + Default value is false which indicates that ColorScheme on each Bar is used. + When set to true each bar will use the ColorScheme settings from DotNetBarManager and it will ignore any + setting on the Bar.ColorScheme object. + + + + + Indicates whether the Personalized menu setting is ignored and full menus are always shown. + + + + + Gets or sets whether accelerator letters for menu or toolbar commands are underlined regardless of + current Windows settings. Accelerator keys allow easy access to menu commands by using + Alt + choosen key (letter). Default value is false which indicates that system setting is used + to determine whether accelerator letters are underlined. Setting this property to true + will always display accelerator letter underlined. + + + + + Returns whether theme support is enabled on the OS that supports themes like Windows XP. + + + + + Indicates whether the CustomizeItem (allows toolbar customization) is added for new Bars end users are creating. + + + + + Gets or sets whether DotNetBar ignores the F10 key which when pressed sets the focus to menu bar + + + + + Indicates whether the items that are not recenly used are shown after mouse hovers over the expand button. + + + + + Indicates whether Tooltips are shown on Bars and menus. + + + + + Indicates whether item shortcut is displayed in Tooltips. + + + + + Specifies the pop-up animation style. + + + + + Specifies whether the MDI system buttons are displayed in menu bar when MDI Child window is maximized. + + + + + Gets or sets whether MDI Child form System Menu is hidden. System menu is displayed in MDI form menu area when form is maximized. Default value is false. + + + + + Gets or sets whether customize context menu is shown on all bars or dock sites. + + + + + Gets or sets whether parent form is activated when dock window layout is loaded. + + + + + Represents delegate for ContextMenu events. + + + + + Represents the method that will handle the ItemRemoved event. + + + + + Defines the delegate for DockTabChange event + + + + + Defines the delegate for BarClosing event + + + + + Defines the delegate for BarAutoHideDisplay event + + + + + Represents the method that will handle the LocalizeString event. + + + + + Gets or sets the display rectangle for popup auto-hide bar. + + + + + Event arguments for LocalizeString event. + + + + + Indicates that event has been handled and that LocalizedValue should be used. + + + + + Indicates the string key for the text that needs to be localized. + + + + + Indicates the localized text value. If you are performing custom string localization + you need to set this value to the translated text for current locale and you need to set + Handled property to true. + + + + + Default constructor. + + + + + Event arguments for EndUserCustomize event. + + + + + Indicates the customize action that user executed. + + + + + Default constructor. + + Indicates action user executed. + + + + Initializes a new instance of the EndUserCustomizeEventArgs class. + + + + + + + Gets any action data, might be null/nothing. + + + + + Delegate for EndUserCustomize event. + + + + + Defines delegate for ActiveDockContainerChanged event. + + + + + + + Provides event arguments for ActiveDockContainerChanged event. + + + + + Gets the DockContainerItem that has been activate or deactivated. + + + + + Initializes a new instance of the ActiveDockContainerChangedEventArgs class. + + + + + + Summary description for DotNetBarResourcesAttribute. + + + + + Summary description for DotNetBarStreamer. + + + + + Represents class that can serialize compatible marked properties. + + + + + XML element is expected to be something like Image data Base64 encoded + + Image data + + + + + Represents visual style of an User Interface Element. + + + + Creates new instance of the class. + + + + Initializes a new instance of the ElementStyle class. + + + + + Creates new instance of the class. + + + Creates new instance of the class. + + + Creates new instance of the class. + + + + Indicates whether BackgroundColor should be serialized. Used by windows forms designer design-time support. + + + + + Resets BackgroundColor to it's default value. Used by windows forms designer design-time support. + + + + + Indicates whether BackgroundColor2 should be serialized. Used by windows forms designer design-time support. + + + + + Resets BackgroundColor2 to it's default value. Used by windows forms designer design-time support. + + + + + Resets BackgroundImage to it's default value null (VB Nothing). Used by windows forms designer design-time support. + + + + + Indicates whether TextColor should be serialized. Used by windows forms designer design-time support. + + + + + Resets TextColor to it's default value. Used by windows forms designer design-time support. + + + + + Indicates whether TextShadowColor should be serialized. Used by windows forms designer design-time support. + + + + + Resets TextColor to it's default value. Used by windows forms designer design-time support. + + + + + Indicates whether TextShadowOffset should be serialized. Used by windows forms designer design-time support. + + + + + Resets TextShadowOffset to it's default value. Used by windows forms designer design-time support. + + + + + Sets size of the element style. + + Indicates new size. + + + + Indicates whether BorderColor should be serialized. Used by windows forms designer design-time support. + + + + + Resets BorderColor to it's default value. Used by windows forms designer design-time support. + + + + + Indicates whether BorderColor3 should be serialized. Used by windows forms designer design-time support. + + + + + Resets BorderColor to it's default value. Used by windows forms designer design-time support. + + + + + Indicates whether BorderColorLight should be serialized. Used by windows forms designer design-time support. + + + + + Resets BorderColor to it's default value. Used by windows forms designer design-time support. + + + + + Indicates whether BorderColor2 should be serialized. Used by windows forms designer design-time support. + + + + + Resets BorderColorLight2 to it's default value. Used by windows forms designer design-time support. + + + + + Indicates whether property should be serialized. Used by windows forms designer design-time support. + + + + + Resets property to it's default value. Used by windows forms designer design-time support. + + + + + Indicates whether property should be serialized. Used by windows forms designer design-time support. + + + + + Resets property to it's default value. Used by windows forms designer design-time support. + + + + + Indicates whether property should be serialized. Used by windows forms designer design-time support. + + + + + Resets property to it's default value. Used by windows forms designer design-time support. + + + + + Indicates whether property should be serialized. Used by windows forms designer design-time support. + + + + + Resets property to it's default value. Used by windows forms designer design-time support. + + + + + Releases all resources used in this control. After calling Dispose() + object is not in valid state and cannot be recovered to the valid state. + Recreation of the object is required. + + + + + Applies a "child/inherited" style text and box properties but not any background or border properties to this style. + Use this method to create style hierarchies. + + Style to apply to this style + + + + + Applies a "child/inherited" style to this style. Use this method to create style + hierarchies. + + + This method is used to support style hierarchies where a base style is defined + and inherited/child styles are derived and based on it. By using this method on the + base style you can apply only style changes defined by the child style. For example if + you defined a base style for normal user interface element then in most cases you do + not want to redefine the styling for the case when same user interface element is + selected. You will just defined the behavior of the selected state and then apply it to + the base normal style using ApplyStyle method. + + Style to apply to current style. + + + + Makes an exact copy of the style. + + New copy of ElementStyle object. + + + + Reset all style properties to default values. + + + + Returns default style for the Cell object. + + Reference to the default style for the Node. Cell style is based on the given + node style. + + + + Returns default style for disabled cells. + Returns new instance of ElementStyle object. + + + Returns default style for the selected cell object. + New instance of the ElementStyle object. + + + + Sets Alpha value for all colors defined by style to specified value. + + Style to change. + Alpha value for the colors. + + + + Returns reference to ColorScheme object used by this style. + + Instance of ColorScheme object or null if object could not be obtained. + + + + Occurs when appearance property of the style has changed. + + + + + Occurs when component is Disposed. + + + + + Gets the collection that defines the multicolor gradient background. + + + + + Gets or sets the background color for UI element. If used in combination with + BackgroundColor2 is specifies starting gradient color. + + + + + Gets or sets the color scheme color that is used as background color. Setting + this property overrides the setting of the corresponding BackColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through BackColor property. + + + + + Gets or sets the target gradient background color for UI element. + + + + + Gets or sets the color scheme color that is used as target gradient background color. Setting + this property overrides the setting of the corresponding BackColor2 property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through BackColor2 property. + + + + + Gets or sets the background gradient angle. + + + + + Gets or sets the background gradient fill type. Default value is Linear. + + + + + Specifies background image. + + + + + Specifies background image position when container is larger than image. + + + + + Specifies the transparency of background image. + + + + + Gets or sets the text color displayed in this UI element. + + + + + Gets or sets the color scheme color that is used as text color. Setting + this property overrides the setting of the corresponding TextColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through TextColor property. + + + + + Gets or sets the text shadow color. + + + + + Gets or sets the color scheme color that is used as text shadow color. Setting + this property overrides the setting of the corresponding TextShadowColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through TextColor property. + + + + + Indicates text shadow offset in pixels + + + + + Gets or sets the Font used to draw this the text. + + + + + Gets or sets a value that determines whether text is displayed in multiple lines or one long line. + + + + + Specifies alignment of the text. + + + + + Specifies alignment of the text. + + + + + Specifies how to trim characters when text does not fit. + + + + + Gets the total horizontal margin (Left + Right) + + + + + Gets the total vertical margin (Top + Bottom) + + + + + Gets or sets the left margin. + + + + + Gets or sets the right margin. + + + + + Gets or sets the top margin. + + + + + Gets or sets the bottom margin. + + + + + Gets or sets whether any style property has changed which could influence the size of the style. + + + + + Gets the calcuated size of the element style. + + + + + Gets or sets the border type for all sides of the element. + + + + + Gets or sets border width in pixels. + + + + + Gets or sets the border type for top side of the element. + + + + + Gets or sets the border type for bottom side of the element. + + + + + Gets or sets the border type for left side of the element. + + + + + Gets or sets the border type for right side of the element. + + + + + Gets or sets border width in pixels. + + + + + Gets or sets border width in pixels. + + + + + Gets or sets border width in pixels. + + + + + Gets or sets border width in pixels. + + + + + Gets or sets the border color for all sides. Specifing the color for the side will override this value. + + + + + Gets or sets the color scheme color that is used as border color. Setting + this property overrides the setting of the corresponding BorderColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through BorderColor property. + + + + + Gets or sets the target background gradient color for border on all sides. Specifing the color for the side will override this value. Gradient border colors + be employed only when per side border color is not specified. + + + + + Gets or sets the color scheme color that is used as taget gradient border color. Setting + this property overrides the setting of the corresponding BorderColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through BorderColor property. + + + + + Gets or sets the border gradient angle. Default value is 90. + + + + + Gets or sets the color for light border part when etched border is used. + + + + + Gets or sets the color scheme color that is used as border light color for etched border style. Setting + this property overrides the setting of the corresponding BorderColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through BorderColor property. + + + + + Gets or sets the target background gradient color for border on all sides. Specifing the color for the side will override this value. Gradient border colors + be employed only when per side border color is not specified. + + + + + Gets or sets the color scheme color that is used as taget gradient border light color for etched border style. Setting + this property overrides the setting of the corresponding BorderColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through BorderColor property. + + + + + Gets or sets the light border gradient angle. Default value is 90. + + + + + Gets or sets the background color for the left side border. + + + + + Gets or sets the color scheme color that is used as left border color. Setting + this property overrides the setting of the corresponding BorderLeftColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through BorderLeftColor property. + + + + + Gets or sets the background color for the right side border. + + + + + Gets or sets the color scheme color that is used as right border color. Setting + this property overrides the setting of the corresponding BorderRightColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through BorderRightColor property. + + + + + Gets or sets the background color for the top side border. + + + + + Gets or sets the color scheme color that is used as top border color. Setting + this property overrides the setting of the corresponding BorderTopColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through BorderTopColor property. + + + + + Gets or sets the background color for the bottom side border. + + + + + Gets or sets the color scheme color that is used as bottom border color. Setting + this property overrides the setting of the corresponding BorderBottomColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through BorderBottomColor property. + + + + + Gets the total horizontal padding (Left + Right) + + + + + Gets the total vertical padding (Top + Bottom) + + + + + Gets or sets the padding space in pixels for all 4 sides of the box. + + + + + Gets or sets the amount of space to insert between the top border of the element and the content. + + + + + Gets or sets the amount of space to insert between the bottom border of the element and the content. + + + + + Gets or sets the amount of space to insert between the left border of the element and the content. + + + + + Gets or sets the amount of space to insert between the right border of the element and the content. + + + + + Gets or sets the name of the style. + + + + + Gets or sets the class style belongs to. The Class styles are used to apply predefined values to the styles that belong to the same class. + This feature is used to manage color schemes/tables per class style. + + + + + Gets or sets the description of the style. + + + + + Gets or sets the Site associated with this component. Used by Windows forms designer. + + + + + Gets or sets the maximum height of the element. This property should be used in + conjunction with the WordWrap property to limit the size of + text bounding box. + + Default value is 0 which indicates that height of the style is unlimited. + + + + Returns System.Drawing.StringFormat constructed from current style settings. + + + + + Gets or sets a value indicating whether the control interprets an ampersand character (&) in the control's Text property to be an access key prefix character. Default value is false. + + + + + Indicates whether control hides the underlines of the letter prefixed by ampersand character when UseMnemonic=true + + + + + Returns eTextFormat constructed from current style settings. + + + + + Gets or sets the border corner type for all 4 sides. Default corner type is Square. + + + + + Gets or sets the border corner type for top left corner. Default value is Inherit which means that setting from CornerType property is used. + + + + + Gets or sets the border corner type for top right corner. Default value is Inherit which means that setting from CornerType property is used. + + + + + Gets or sets the border corner type for bottom left corner. Default value is Inherit which means that setting from CornerType property is used. + + + + + Gets or sets the border corner type for bottom right corner. Default value is Inherit which means that setting from CornerType property is used. + + + + + Gets or sets the diameter in pixels of the corner type rounded or diagonal. + + + + + Gets whether to paint left border for the style. + + + + + Gets whether to paint right border for the style. + + + + + Gets whether to paint top border for the style. + + + + + Gets whether to paint bottom border for the style. + + + + + Gets whether to paint any border for the style. + + + + + Gets whether to paint any border for the style. + + + + + Gets whether custom has any of properties changed. + + + + + Gets or sets whether ElementStyle is in design mode. + + + + + Gets or sets the maximum width of the element. This property should be used in + conjunction with the WordWrap property to limit the size of + text bounding box. + + Default value is 0 which indicates that width of the style is not limited. + + + + Gets or sets the reference to the parent collection. + + + + + Gets or sets the tree control style is assigned to. + + + + + Specifies the type of the gradient fill. + + + + + Represents linear gradient fill. + + + + + Represents radial gradient fill. + + + + + Paints the ElementStyle + + + + Creates new instance of the object. + + + + Paints text for given style. + + Display information. + Text to paint. + Default font if no font by style is specified. + + + + + Returns new Region object for given ElementStyle. + New instance of Region object. + Information to describe ElementStyle. + + + + Returns the clipping for the content of the element style. + + + + + + + Paints the element style on the canvas. + + Holds information necessary to paint style on canvas. + + + + Paint style border. + + Style display information. + + + + Paints style background. + + Style display information. + + + + Paints style background. + + Style display information. + + + + Paints style background image. + + Style display information. + + + + Returns background rectangle for given style by taking in account margins. + + Reference to style object. + Style bounds + Background rectangle. + + + + Returns GraphicsPath for given style. + + Reference to style. + Style bounds. + New instance of GraphicsPath + + + + Returns GraphicsPath for given style. + + Reference to style. + Style bounds. + New instance of GraphicsPath + + + + Initializes a new instance of the BorderDrawInfo structure. + + + + + + + + + + Represents information necessary to paint the style on canvas. + + + + Reference to ElementStyle object. + + + Reference to Graphics object. + + + ElementStyle bounds. + + + Get or sets whether layout is right-to-left. + + + + Gets or sets whether bottom and right border is "twisted" giving beveled look when double border is used. + + + + Creates new instance of the object. + + + Creates new instance of the object and initializes it with default values. + Style to initialize object with. + Graphics object to initialize object with. + Bounds to initialize object with. + + + Creates new instance of the object and initializes it with default values. + Style to initialize object with. + Graphics object to initialize object with. + Bounds to initialize object with. + + + + Specifies part of the background path. + + + + + Indicates complete background path + + + + + Indicates Top half of background path + + + + + Indicates Bottom half of background path + + + + + Represents the layout for the element style. + + + + + Calculates size of an style element. + + Style to calculate size for. + Default font that will be used by style if style does not uses it's own font. + Size of the style element. At this time only Height member will be calculated. + + + + Returns the total white space for a style. Whitespace is the space between the edge of the element and inner content of the element. + + Style to return white space for + + + + + Returns the total white space for a style. Whitespace is the space between the edge of the element and inner content of the element. + + Style to return white space for. + + + + + Returns total white space for left side of the style. Whitespace is the space between the edge of the element and inner content of the element. + + Style to return white space for. + + + + + Returns total white space for left side of the style. Whitespace is the space between the edge of the element and inner content of the element. + + Style to return white space for. + + + + + Returns total white space for right side of the style. Whitespace is the space between the edge of the element and inner content of the element. + + Style to return white space for. + + + + + Returns total white space for right side of the style. Whitespace is the space between the edge of the element and inner content of the element. + + Style to return white space for. + + + + + Returns total white space for top side of the style. Whitespace is the space between the edge of the element and inner content of the element. + + Style to return white space for. + + + + + Returns total white space for top side of the style. Whitespace is the space between the edge of the element and inner content of the element. + + Style to return white space for. + + + + + Returns total white space for top side of the style. Whitespace is the space between the edge of the element and inner content of the element. + + Style to return white space for. + + + + + Returns total white space for top side of the style. Whitespace is the space between the edge of the element and inner content of the element. + + Style to return white space for. + + + + + Returns amount of spacing for specified style parts. + + Style to calculate spacing for. + Part of the style spacing is calculated for. Values can be combined. + Side of the style to use for calculation. + + + + + Gets inner rectangle taking in account style padding, margins and border. + + + + + Specifies the appearance of a item. + + + + + Specifies the CrumbBar control style. + + + + + Specifies the Bar state. + + + + + Specifies the Bar grab handle style. + + + + + Specifies the Orientation of the item within container. + + + + + Specifies the design-marker orientation for the item. + + + + + Specifies the supported orientations by the item. + + + + + Specifies the docked Bar border type. + + + + + Specifes vertical alignment. + + + + + Specifies item alignment. + + + + + Specifies the popup type. + + + + + Specifies the dock side. + + + + + Specifies the item shortcut. + + + + + Specifies the item menu visibility. + + + + + Specifies the item behavior personalized menus. + + + + + Specifies the popup animation. + + + + + Specifies ButtonItem style. + + + + + Specifies the image position. + + + + + Specifies the hot tracking style for buttons. + + + + + Specifies the menu drop shadow. + + + + + Specifies the image size for the items on the Bar. + + + + + Specifies button image list selection. + + + + + Indicates that image is stretched to fill the container space. + + + + + Image is centered inside of container space. + + + + + Image is tiled to fill container space. + + + + + Image is drawn in top left corner of container space. + + + + + Image is drawn in top right corner of container space. + + + + + Image is drawn in bottom left corner of container space. + + + + + Image is drawn in bottom right corner of container space. + + + + + Image is drawn on the left side in the middle of the container space. + + + + + Image is drawn on the right side in the middle of the container space. + + + + + Specifies the sides of a rectangle to apply a border to. + + + + + No Border. + + + + + Border on the Left edge. + + + + + Border on the Right edge. + + + + + Border on the Top edge. + + + + + Border on the Bottom edge. + + + + + Border on all 4 sides. + + + + + Specifies appearance type of the Side Bar control. + + + + + Traditional Side Bar appearance with 3D panels. + + + + + Improved Flat Side Bar appearance with extended appearance options. + + + + + Specifies predefined side bar color scheme. + + + + + Specifies the side popup is displayed in relation to it's parent. + + + + + Indicates layout type used for items within side bar panel. + + + + + Default layout all items arranged in one column. + + + + + Items arranged in multiple columns determined by the width of the panel. + + + + + Indicates color scheme assigned to the tab item. + + + + + Indicates the action end user took during toolbar/menubar customization. + + + + + User has changed the visibility of the bar. + + + + + Indicates that item visibility has changed i.e. it's visible property. + + + + + Indicates that an item has been moved to different location. + + + + + Indicates that an item has been removed from the bar. + + + + + Indicates that item's text has been changed. + + + + + Indicates that style of the button i.e. ButtonStyle property has changed. + + + + + Indicates that item's BeginGroup property has changed. + + + + + Indicates that user has created a new bar. + + + + + Indicates that user has renamed the bar i.e. changed it's Text property. + + + + + Indicates that user has deleted the bar. + + + + + Specifies the type of the layout for tabs. + + + + + Tabs are auto-sized to fit the width of the container. + + + + + Tab's width is calculated based on the image and text and navigation box is displayed + when tabs cannot fit the container. + + + + + Tab are wrapping on multiple lines based on the width and navigation box is displayed. + + + + + Tab are wrapping on multiple lines based on the width and NO navigation box is displayed. + + + + + Indicates the corner type. + + + + + Inherits setting if applies. + + + + + Specifies square corner. + + + + + Specifies rounded corner. + + + + + Specifies diagonal corner. + + + + + Specifies the action that raised a event + + + + + The event was caused by a keystroke. + + + + + The event was caused by a mouse operation. + + + + + The event is caused programmatically from user code. + + + + + Specifies the button alignment inside of the BubbleBar. + + + + + Buttons are aligned to the top and arranged horizontally. + + + + + Buttons are aligned to the bottom and arranged horizontally. + + + + Specifies the way background image is displayed on background. + + + Image is stretched to fill the background + + + Image is centered inside the background + + + Image is tiled inside the background + + + + Image is drawn in top left corner of container space. + + + + + Image is drawn in top right corner of container space. + + + + + Image is drawn in bottom left corner of container space. + + + + + Image is drawn in bottom right corner of container space. + + + + + Imaged is centered and fills the control but aspect ratio is unchanged. + + + + + Specifies the border type for style element. + + + + Indicates no border + + + Border is a solid line + + + Border is a solid dash line + + + Border is solid dash-dot line + + + Border is solid dash-dot-dot line + + + Border consists of dots + + + Border consists light and dark part creating an etched effect + + + Border consists dark and light part. Light part is the inside border. + + + + Specifies the alignment of a text string relative to its element's rectangle. + + + + + Specifies the text be aligned near from the origin position of the element's rectangle. In a left-to-right layout, the near position is left. In a right-to-left layout, the near position is right. + + + + + Specifies that text is aligned in the center of the element's rectangle. + + + + + Specifies that text is aligned far from the origin position of the element's rectangle. In a left-to-right layout, the far position is right. In a right-to-left layout, the far position is left. + + + + + Specifies how to trim characters from a text that does not completely fit into a element's shape. + + + + + Specifies that the text is trimmed to the nearest character. + + + + + Specifies that the text is trimmed to the nearest character, and an ellipsis is inserted at the end of a trimmed line. + + + + + The center is removed from trimmed lines and replaced by an ellipsis. The algorithm keeps as much of the last slash-delimited segment of the line as possible. + + + + + Specifies that text is trimmed to the nearest word, and an ellipsis is inserted at the end of a trimmed line. + + + + + Specifies no trimming. + + + + + Specifies that text is trimmed to the nearest word. + + + + + Specifies the alignment of buttons in title bar. + + + + + Buttons are left aligned. + + + + + Buttons are right aligned. + + + + + Indicates white-space part of the style. + + + + + Represents style padding. + + + + + Represents style border. + + + + + Represents style margin. + + + + + Indicates the style side. + + + + + Specifies left side of the style. + + + + + Specifies right side of the style. + + + + + Specifies top side of the style. + + + + + Specifies bottom side of the style. + + + + + Specifies the button state. + + + + + Button is in it's default state. + + + + + Button is disabled + + + + + Mouse is over the button + + + + + Left mouse button is pressed + + + + + Right mouse button is pressed + + + + + Button is hidden. + + + + + Indicates predefined color scheme assigned to super tooltip. + + + + + Specifies predefined color assigned to ribbon items. + + + + + Specifies predefined color assigned to ribbon tab groups. + + + + + Specifies the state of the Wizard button. + + + + + Specifies the button that caused the wizard page change. + + + + + Page change was started using Wizard Back button. + + + + + Page change was started using Wizard Next button. + + + + + Page change was started from code. + + + + + Specifies wizard button that is clicked when the user presses the ENTER key. + + + + + If finish button is enabled and visible it will be clicked otherwise click next button + + + + + Click finish button + + + + + Click next button + + + + + No button will be clicked + + + + + Specifies wizard button that is clicked when the user presses the Escape key. + + + + + Cancel button will be clicked + + + + + No button will be clicked + + + + + Specifies border around ColorItem. + + + + + No Border. + + + + + Border on the Left edge. + + + + + Border on the Right edge. + + + + + Border on the Top edge. + + + + + Border on the Bottom edge. + + + + + Border on all 4 sides. + + + + + Specifies the line alignment of the items inside of the container. + + + + + Items are aligned to the top. + + + + + Items are aligned to the middle point of the line. + + + + + Items are aligned to the bottom. + + + + + Specifies the alignment of the items inside of the container in horizontal layout. + + + + + Items are left aligned. + + + + + Items are centered. + + + + + Items are right aligned. + + + + + Specifies the alignment of the items inside of the container in vertical layout. + + + + + Items are top aligned. + + + + + Items are in the middle. + + + + + Items are Bottom aligned. + + + + + Specifies the rendering mode used by a user interface element. + + + + + Indicates that rendering on user interface element instance set through Renderer property is used. + + + + + Indicates that global application wide renderer is used as specified by GlobalManager.Renderer property. + + + + + Indicates that custom rendered will be used for an user interface element. Renderer property must be set when using this value to the renderer + that will be used. + + + + + Specifies the predefined color table for button. + + + + + Specifies the color table used to render ProgressBarItem in Office 2007 style. + + + + + Indicates default Normal color table, usually green. + + + + + Indicates Pause state color table, usually yellow. + + + + + Indicates Error state color table, usually red. + + + + + Specifies the position of ribbon title. + + + + + Title is positioned on the top of the ribbon. + + + + + Title is positioned on the bottom of the ribbon. + + + + + Specifies text alignment on the button. + + + + + Specifies the left aligned text. + + + + + Specifies the center aligned text. + + + + + Specifies the right aligned text. + + + + + Specifies the position of the tab close button. + + + + + Close button is on the left side of the tab. + + + + + Close button is on the right side of the tab. + + + + + Describes the bar type. + + + + + Indicates that bar is toolbar. + + + + + Indicates that bar is menu bar. + + + + + Indicates that bar is status bar. + + + + + Indicates that bar is dock window. + + + + + Describes the categorization mode used to categorize items on the Customize Ribbon dialog. + + + + + Items are automatically categorized by the ribbon bar they appear on. + + + + + Items are categorized by the Category property on each item. Category property should be set on each item. + + + + + Describes the check-box item appearance style + + + + + Standard check-box style. + + + + + Radio button style. Only one button can be selected/checked in given container. + + + + + Indicates the position of the check box sign related to the text for CheckBoxItem. + + + + + Check box sign is positioned on the left side of the text. + + + + + Check box sign is positioned on the right side of the text. + + + + + Check box sign is positioned above the text. + + + + + Check box sing is positioned below the text + + + + + Indicates the type of the progress bar. + + + + + Standard step based progress bar. + + + + + The automatically moving progress bar. + + + + + Defines the direction of collapsing/expanding + + + + + Control is collapsed from bottom to top. + + + + + Control is collapsed from top to bottom. + + + + + Control is collapsed from right to left. + + + + + Control is collapsed from left to right. + + + + + Describes the scroll bar skinning applied to the controls. + + + + + No scrollbar skinning is applied to the control. + + + + + Optimized scrollbar skinning algorithm is used. Might provide better appearance in certain scenarios. + + + + + Unoptimized scrollbar skinning algorithm is used. Might provide better appearance in certain scenarios. + + + + + Indicates the position of the slider label text related to the slider part. + + + + + Label is positioned on the left side of the slider. + + + + + Label is positioned on the right side of the slider. + + + + + Label is positioned above the slider. + + + + + Label is positioned below the slider. + + + + + Defines the slider item parts. + + + + + Indicates no part. + + + + + Indicates the increase button of slider control. + + + + + Indicates the decrease button of slider control. + + + + + Indicates the label part of slider control. + + + + + Indicates the track area part of the control. + + + + + Specifies the position of the title image. + + + + + Image is positioned on the left side. + + + + + Image is centered. + + + + + Image is positioned on the right side. + + + + + Specifies the Wizard control Appearance. + + + + + Indicates default Wizard 97 style. + + + + + Indicates the Office 2007 Style Wizard Appearance. + + + + + Specifies wizard title image alignment + + + + + Image is aligned to left + + + + + Image is aligned to right + + + + + Specifies the behaviour used to hide watermark. + + + + + Watermark for control is hidden when control receives the input focus. + + + + + Watermark for control is hidden when control has non-empty input value. + + + + + Specifies the advanced ScrollBar appearance. + + + + + Default scroll bar appearance. + + + + + Office 2007 style Application scroll bar appearance. + + + + + Defines text position in relation to the content of the item.. + + + + + Text is positioned to the left of the content. + + + + + Text is positioned to the right of the content. + + + + + Text is positioned on top of the content. + + + + + Text is positioned on bottom of the content. + + + + + Defines position for the notification mark + + + + + Defines available symbol sets. + + + + + FontAwesome Symbol Set. + + + + + Android Material Symbol Set. + + + + + Gets or sets Graphics object group is rendered on. + + + + + Gets the reference to ButtonItem instance being rendered. + + + + + Creates new instance of the object and initializes it with default values + + Reference to Graphics object. + Reference to ColorItem object. + + + + Represents event arguments for DockTabClosing event. + + + + + Indicates the DockContainerItem that is about to close. + + + + + Provides ability to cancel closing of the DockContainerItem. Default value is false. + + + + + Set to true to automatically remove DockContainerItem from the Bar.Items collection after it is closed. Default value is false + which means that DockContainerItem will be kept in collection but it will be hidden after this event is complete. + + + + + Returns source of the event: keyboard, mouse or code. + + + + + Creates new instance of the class. + + Reference to DockContainerItem that is about to close + + + + Delegate for DockTabClosing event. + + + + + Represents arguments for SerializeItem event which allows you to add custom serialization data to definitions saved by control. + + + + + Gets reference to item being serialized or de-serialized. + + + + + Gets reference to instance of XmlElement that item is serialized to or is being de-serialized from. You should not change any data directly on this element. + + + + + Gets the reference to XmlElement that you can serialize to or de-serialize any custom data from. You can add child elements or set the attributes on + this XmlElement when handling SerializeItem event. When handling DeserializeItem event you can load same data from this element. + + + + + Defines delegate for SerializeItem event. + + + + + Provides more information about MarkupLinkClick event. + + + + + Gets the value of href attribute from the markup link that was clicked. + + + + + Gets the value of name attribute from the markup link that was clicked. + + + + + Creates new instance of the object. + + Value of name attribute. + Value of href attribute. + + + + Defines delegate for MarkupLinkClick event. + + + + + Panel control with title bar that can be expanded or collapsed. + + + + + Called after either ColorScheme or ColorSchemeStyle has changed. If you override make sure that you call base implementation so default + processing can occur. + + + + + Used for design time support. + + true if property should be serialized. + + + + Resets the style to it's default value. + + + + + Resets the style to it's default value. + + + + + Resets the style to it's default value. + + + + + Called when AntiAlias property has changed. + + + + + Occurs before Expanded property is changed. You can cancel change of this property by setting Cancel=true on the event arguments. + + + + + Occurs after Expanded property has changed. You can handle ExpandedChanging event and have opportunity to cancel the change. + + + + + Indicates whether panel will hide the controls it contains when its collapsed and show them when its expanded. Default value is false. + + + + + Gets or sets whether the panel is collapsed/expanded when title bar is clicked. Default value is false. + + + + + Gets or sets the collapse/expand direction for the control. Default value causes the control to collapse from bottom to top. + + + + + Gets or sets whether panel is expanded or not. Default value is true. + + + + + Gets or sets animation time in milliseconds. Default value is 100 miliseconds. You can set this to 0 (zero) to disable animation. + + + + + Gets or sets the bounds of panel when expanded. This value is managed automatically by control based on the starting designer size and value + of Expanded property. + + + + + Gets or sets whether expand button is visible or not. Default value is true. + + + + + Returns bounds of expand button. Bounds are relative to the TitlePanel coordinates. + + + + + Gets or sets image that is used on title bar button to collapse panel. Default value is null which indicates + that system default image is used. + + + + + Gets or sets image that is used on title bar button to expand panel. Default value is null which indicates + that system default image is used. + + + + + Gets or sets the text for the title of the panel. + + + + + Gets or sets the title style. + + + + + Gets or sets the title style when mouse hovers over the title. + + + + + Gets or sets the title style when mouse button is pressed on the title. + + + + + Gets or sets the height of the title portion of the panel. Height must be greater than 0. Default is 26. + + + + + Gets reference to Panel control used as title bar. + + + + + Gets reference to the title bar expand button. + + + + + Gets or sets alignment of the expand button. + + + + + Gets the reference to the panel used as button when control is collapsed to the left or right. + + + + + Represents multi-functional splitter control. + + + + + Creates new instance of the object. + + + + + This member overrides Control.OnPaint. + + Event arguments. + + + + Resets BackgroundColor to it's default value. Used by windows forms designer design-time support. + + + + + Resets BackgroundColor2 to it's default value. Used by windows forms designer design-time support. + + + + + Resets BackgroundColor2 to it's default value. Used by windows forms designer design-time support. + + + + + Resets BackgroundColor2 to it's default value. Used by windows forms designer design-time support. + + + + + Resets BackgroundColor2 to it's default value. Used by windows forms designer design-time support. + + + + + Resets BackgroundColor2 to it's default value. Used by windows forms designer design-time support. + + + + + Resets BackgroundColor to it's default value. Used by windows forms designer design-time support. + + + + + Resets BackgroundColor2 to it's default value. Used by windows forms designer design-time support. + + + + + Resets BackgroundColor2 to it's default value. Used by windows forms designer design-time support. + + + + + Resets BackgroundColor2 to it's default value. Used by windows forms designer design-time support. + + + + + Resets BackgroundColor2 to it's default value. Used by windows forms designer design-time support. + + + + + Resets BackgroundColor2 to it's default value. Used by windows forms designer design-time support. + + + + + Apply default splitter style colors. + + Style colors to apply. + + + + Gets or sets whether expandable control ExpandableControl assigned to this splitter is expaned or not. Default value is true. + + + + + Gets or sets whether Click event is triggering expand/collapse of the splitter. Default value is true. + + + + + Gets or sets whether DoubleClick event is triggering expand/collapse of the splitter. Default value is false. + + + + + Gets or sets whether splitter will act as expandable splitter. Default value is true. When set to true ExpandableControl property should be set to the control that should be expanded/collapsed. + + + + + Gets or sets the control that will be expanded/collapsed by the splitter. Default value is null. Expandable property should be also set to true (default) to enable expand/collapse functionality. + + + + + Gets or sets visual style of the control. Default value is eSplitterStyle.Office2003. + + + + + Gets or sets animation time in milliseconds. Default value is 100 miliseconds. You can set this to 0 (zero) to disable animation. + + + + + Gets or sets the shortcut key to expand/collapse splitter. + + + + + Gets or sets the background color for UI element. If used in combination with + BackgroundColor2 is specifies starting gradient color. + + + + + Gets or sets the color scheme color that is used as background color. Setting + this property overrides the setting of the corresponding BackColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through BackColor property. + + + + + Gets or sets the target gradient background color for UI element. + + + + + Gets or sets the color scheme color that is used as target gradient background color. Setting + this property overrides the setting of the corresponding BackColor2 property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through BackColor2 property. + + + + + Gets or sets the background gradient angle. + + + + + Gets or sets the expand part fill color. + + + + + Gets or sets the color scheme color that is used expand part fill color. Setting + this property overrides the setting of the corresponding ExpandFillColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through ExpandFillColor property. + + + + + Gets or sets the expand part line color. + + + + + Gets or sets the color scheme color that is used expand part line color. Setting + this property overrides the setting of the corresponding ExpandLineColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through ExpandLineColor property. + + + + + Gets or sets the grip part dark color. + + + + + Gets or sets the color scheme color that is used grip part dark color. Setting + this property overrides the setting of the corresponding GripDarkColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through GripDarkColor property. + + + + + Gets or sets the expand part line color. + + + + + Gets or sets the color scheme color that is used expand part line color. Setting + this property overrides the setting of the corresponding GripLightColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through GripLightColor property. + + + + + Gets or sets the background color for UI element when mouse is over the element. If used in combination with + BackgroundColor2 is specifies starting gradient color. + + + + + Gets or sets the color scheme color that is used as background color when mouse is over the element. Setting + this property overrides the setting of the corresponding HotBackColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through HotBackColor property. + + + + + Gets or sets the target gradient background color for UI element when mouse is over the element. + + + + + Gets or sets the color scheme color that is used as target gradient background color when mouse is over the element. Setting + this property overrides the setting of the corresponding HotBackColor2 property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through HotBackColor2 property. + + + + + Gets or sets the background gradient angle when mouse is over the element. + + + + + Gets or sets the expand part fill color when mouse is over the element. + + + + + Gets or sets the color scheme color that is used expand part fill color when mouse is over the element. Setting + this property overrides the setting of the corresponding HotExpandFillColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through HotExpandFillColor property. + + + + + Gets or sets the expand part line color when mouse is over the element. + + + + + Gets or sets the color scheme color that is used expand part line color when mouse is over the element. Setting + this property overrides the setting of the corresponding HotExpandLineColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through HotExpandLineColor property. + + + + + Gets or sets the grip part dark color when mouse is over the element. + + + + + Gets or sets the color scheme color that is used grip part dark color when mouse is over the element. Setting + this property overrides the setting of the corresponding HotGripDarkColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through HotGripDarkColor property. + + + + + Gets or sets the grip part light color when mouse is over the element. + + + + + Gets or sets the color scheme color that is used grip part light color when mouse is over the element. Setting + this property overrides the setting of the corresponding HotGripLightColor property. + Color scheme colors are automatically managed and are based on current system colors. + That means if colors on the system change the color scheme will ensure that it's colors + are changed as well to fit in the color scheme of target system. Set this property to + eColorSchemePart.None to + specify explicit color to use through HotGripLightColor property. + + + + + Indicates the style of mutli-functional splitter control. + + + + + Specifies Office 2003 like splitter style and color scheme. + + + + + Specifies Mozilla like splitter style and color scheme. + + + + + Specifies Office 2007 like splitter style and color scheme. + + + + + Represents event arguments for ExpandedChanging and ExpandedChanged events. + + + + + Gets the action that caused the event, event source. + + + + + Gets or sets whether execution Expand event should be canceled. Applies only to ExpandedChanging event. Default is false. + + + + + Indicates new value for the Expanded property. + + + + + Represents the Outlook like Explorer-bar Control. + + + + + Creates new instance of side bar control. + + + + + Clean up any resources being used. + + + + + Returns true if color scheme has changed. + + + + + Resets color scheme to it's default value. + + + + + Creates the Graphics object for the control. + + The Graphics object for the control. + + + + Returns the renderer control will be rendered with. + + The current renderer. + + + + Raises ItemLayoutUpdated event. + + Provides event arguments. + + + + Applies any layout changes and repaint the control. + + + + + Invokes ItemDoubleClick event. + + Reference to item double-clicked + Event arguments + + + + Returns the collection of items with the specified name. + + Item name to look for. + + + + + Returns the collection of items with the specified name and type. + + Item name to look for. + Item type to look for. + + + + + Returns the collection of items with the specified name and type. + + Item name to look for. + Item type to look for. + + + + + Returns the first item that matches specified name. + + Item name to look for. + + + + + Ensures that item is displayed on the screen. Item needs to have it's Visible property set to true. This method will expand the group if needed or it will scroll control to display an item. + + Item to display. + + + + Returns the item located at specific client coordinates. + + X Coordinate + Y Coordinate + + + + + Invokes the DotNetBar Customize dialog. + + + + + Invokes SerializeItem event. + + Provides data for the event. + + + + Invokes DeserializeItem event. + + Provides data for the event. + + + + Loads the Side bar definition from file. + + Definition file name. + + + + Saves the Side bar definition to file. + + Definition file name. + + + + Occurs when Checked property of an button has changed. + + + + + Occurs when Item is clicked. + + + + + Occurs when Item is clicked. + + + + + Occurs when popup of type container is loading. + + + + + Occurs when popup of type container is unloading. + + + + + Occurs when popup item is about to open. + + + + + Occurs when popup item is closing. + + + + + Occurs just before popup window is shown. + + + + + Occurs when Item Expanded property has changed. + + + + + Occurs when mouse button is pressed. + + + + + Occurs when mouse button is released. + + + + + Occurs when mouse enters the item. + + + + + Occurs when mouse leaves the item. + + + + + Occurs when mouse moves over the item. + + + + + Occurs when mouse remains still inside an item for an amount of time. + + + + + Occurs when item loses input focus. + + + + + Occurs when item receives input focus. + + + + + Occurs when user changes the item position, removes the item, adds new item or creates new bar. + + + + + Occurs after an Item is removed from SubItemsCollection. + + + + + Occurs after an Item has been added to the SubItemsCollection. + + + + + Occurs when ControlContainerControl is created and contained control is needed. + + + + + Occurs when Text property of an Item has changed. + + + + + Use this event if you want to serialize the hosted control state directly into the DotNetBar definition file. + + + + + Use this event if you want to deserialize the hosted control state directly from the DotNetBar definition file. + + + + + Occurs after DotNetBar definition is loaded. + + + + + Occurs before an item in option group is checked and provides opportunity to cancel that. + + + + + Occurs before tooltip for an item is shown. Sender could be the BaseItem or derived class for which tooltip is being displayed or it could be a ToolTip object itself it tooltip is not displayed for any item in particular. + + + + + Occurs after an item has been serialized to XmlElement and provides you with opportunity to add any custom data + to serialized XML. This allows you to serialize any data with the item and load it back up in DeserializeItem event. + + + To serialize custom data to XML definition control creates handle this event and use CustomXmlElement + property on SerializeItemEventArgs to add new nodes or set attributes with custom data you want saved. + + + + + Occurs after an item has been de-serialized (load) from XmlElement and provides you with opportunity to load any custom data + you have serialized during SerializeItem event. + + + To de-serialize custom data from XML definition handle this event and use CustomXmlElement + property on SerializeItemEventArgs to retrive any data you saved in SerializeItem event. + + + + + Suspends the layout and painting of the control. When you want to perform multiple operations on the explorer bar and you want to ensure + that layout of the items on it and painting is not performed for performance and appearance reasons set this property to true. Once you + want to enable layout and painting set the property back to false and call RecalcLayout method. Default value is false. + + + + + Gets or sets Bar Color Scheme. + + + + + Specifies whether ExplorerBar is drawn using Themes when running on OS that supports themes like Windows XP. + + + + + Specifies the background style of the Explorer Bar. + + + + + Gets or sets the vertical spacing between the group items. + + + + + Occurs after internal item layout has been updated and items have valid bounds assigned. + + + + + Gets or sets whether anti-alias smoothing is used while painting. + + + + + Returns the collection of Explorer Bar Groups. + + + + + Gets or sets the form ExplorerBar is attached to. + + + + + Gets or sets the margin in pixels between the explorer bar groups and the edge of the control. + + + + + Gets or sets whether end-user can rearrange the items inside the panels. + + + + + Gets or sets whether animation is enabled. + + + + + Gets or sets maximum animation time in milliseconds. + + + + + Gets or sets whether native .NET Drag and Drop is used by side-bar to perform drag and drop operations. AllowDrop must be set to true to allow drop of the items on control. + + + + + Gets or sets whether external ButtonItem object is accepted in drag and drop operation. UseNativeDragDrop must be set to true in order for this property to be effective. + + + + + Applies the stock style to the object. + + + + + Gets or sets whether gray-scale algorithm is used to create automatic gray-scale images. Default is true. + + + + + Specifies custom image to be used as button on ExplorerBarGroup item to expand the group. Default value is null + which indicates that default button is used. + + + + + Specifies custom image to be used as button on ExplorerBarGroup item to expand the group. This image is used when mouse is over the button. Default value is null + which indicates that default button is used. + + + + + Specifies custom image to be used as button on ExplorerBarGroup item to expand the group. This image is used when user presses left mouse button while cursor is positioned over the button. Default value is null + which indicates that default button is used. + + + + + Specifies custom image to be used as button on ExplorerBarGroup item to collapse the group. Default value is null + which indicates that default button is used. + + + + + Specifies custom image to be used as button on ExplorerBarGroup item to collapse the group. + This Image is used when mouse is over the button. Default value is null + which indicates that default button is used. + + + + + Specifies custom image to be used as button on ExplorerBarGroup item to collapse the group. + This Image is used when left mouse button is pressed while cursor is over the button. Default value is null + which indicates that default button is used. + + + + + ImageList for images used on Items. Images specified here will always be used on menu-items and are by default used on all Bars. + + + + + ImageList for images displayed on the Group Item. + + + + + ImageList for large-sized images used on Items. + + + + + Indicates whether Tooltips are shown on Bars and menus. + + + + + Indicates whether item shortcut is displayed in Tooltips. + + + + + Gets or sets the item default accesibility action will be performed on. + + + + + Indicates whether Reset buttons is shown that allows end-user to reset the toolbar state. + + + + + Returns the reference to the container that containing the sub-items. + + + + + Gets whether any handlers have been defined for SerializeItem event. If no handles have been defined to optimize performance SerializeItem event will not be attempted to fire. + + + + + Gets whether any handlers have been defined for DeserializeItem event. If no handles have been defined to optimize performance DeserializeItem event will not be attempted to fire. + + + + + Gets/Sets Bar definition as XML string. + + + + + Indicates whether shortucts handled by items are dispatched to the next handler or control. + + + + + Represents the method that will handle the ItemRemoved event. + + + + + Provides layout for Explorer-Bar control. + + + + + Creates new instance of ExplorerBarContainerItem class. + + + + + Returns copy of ExplorerBarContainerItem item + + + + + Recalculates the size of the item + + + + + Paints this base container + + + + + Occurs when the mouse pointer is over the item and a mouse button is pressed. This is used by internal implementation only. + + + + + Occurs when the mouse pointer is over the item and a mouse button is released. This is used by internal implementation only. + + + + + Sets input focus to next visible item in Explorer Bar. + + True if focus was set to next visible item otherwise false. + + + + Sets input focus to previous visible item in Explorer Bar. + + True if focus was set to previous visible item otherwise false. + + + + Gets or sets a value indicating whether the item is expanded or not. For Popup items this would indicate whether the item is popped up or not. + + + + + Represents the Explorer-Bar Group item. + + + + + Creates new instance of ExplorerBarGroupItem. + + + + + Creates new instance of ExplorerBarGroupItem and assigns the name to it. + + Item name. + + + + Creates new instance of ExplorerBarGroupItem and assigns the name and text to it. + + Item name. + item text. + + + + Returns copy of ExplorerBarGroupItem item. + + + + + Returns the Font object to be used for drawing the item text. + + Font object. + + + + Occurs when the mouse pointer is moved over the item. This is used by internal implementation only. + + + + + Occurs when the mouse pointer is over the item and a mouse button is pressed. This is used by internal implementation only. + + + + + Occurs when the item is clicked. This is used by internal implementation only. + + + + + Called when Visibility of the items has changed. + + New Visible state. + + + + Overloaded. Serializes the item and all sub-items into the XmlElement. + + XmlElement to serialize the item to. + + + + Overloaded. Deserializes the Item from the XmlElement. + + Source XmlElement. + + + + Shows tooltip for this item. + + + + + Forces the repaint the item. + + + + + Applies default appearance to ExplorerBarGroupItem. + + + + + Specifies whether item is drawn using Themes when running on OS that supports themes like Windows XP. + + + + + Gets or sets whether expand button is visible. + + + + + Gets or sets a value indicating whether the item is expanded or not. For Popup items this would indicate whether the item is popped up or not. + + + + + Gets or sets whether drop shadow is displayed when non-themed display is used. + + + + + Gets the reference to ElementStyle object which describes visual appearance of the explorer group item title. + + + + + Gets the reference to ElementStyle object which describes visual appearance of the explorer group item title while mouse is over the title bar. + + + + + Gets or sets the item background style. + + + + + Gets or sets whether clicking the header of the control expands the item. + + + + + Applies the stock style to the object. + + + + + Applies new visual style to this the item and all of its sub-items. + + + + + Gets or sets expand button border color. + + + + + Gets or sets expand button back color. + + + + + Gets or sets expand button fore color. + + + + + Gets or sets hot expand button border color. + + + + + Gets or sets hot expand button back color. + + + + + Gets or sets hot expand button fore color. + + + + + Gets or sets a value indicating whether the item is enabled. + + + + + Gets the rectangle of the panel item Button. + + + + + Specifies the image. + + + + + Indicates whether XP themed special group colors are used for drawing. + + + + + Gets or sets the margin in pixels between the edge of the container and the items contained inside of it. Default value is 4. + + + + + Gets or sets whether text on sub items is wrapped on new line if it cannot fit the space available. + + + + + Specifies the index of the image if ImageList is used. + + + + + Summary description for frmCustomize. + + + + + Required designer variable. + + + + + Clean up any resources being used. + + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Defines the generic container item that is used by toolbar, menu bar and other control for item layout. + + + + + Occurs when new item is added to the container. + + + + + Returns copy of GenericItemContainer item + + + + + Paints this base container + + + + + Recalculate Size of this item + + + + + This must be called by child item to let the parent know that its size + has been changed. + + + + + Occurs when the mouse pointer is over the item and a mouse button is released. This is used by internal implementation only. + + + + + Called when item owner has changed. + + + + + Return Sub Item at specified location + + + + + Set/Get does container wraps item into the new line when they exceed the container size + + + + + Specifies whether to display more items on popup menu or Bar. + + + + + Gets or sets a value indicating whether the item is expanded or not. For Popup items this would indicate whether the item is popped up or not. + + + + + Gets or sets whether container is system container used internally by DotNetBar. + + + + + When parent items does recalc size for its sub-items it should query + image size and store biggest image size into this property. + + + + + Gets or sets whether item container fills the container control completely. + + + + + Summary description for Hook. + + + + + Summary description for HTMLHelp. + + + + + Interface for designer-item integration. + + + + + Describes container support for setting the word-wrap behavior of it's sub-items. + + + + + Gets or sets whether sub items text will be word wrapped if it cannot fit the space allocated. + + + + + Summary description for ItemPaintArgs. + + + + + Holds reference to all unique items in the DotNetBar. + + + + + Provides context information for serialization. + + + + + Gets or sets reference to context XmlElement an item is being serialized to. + + + + + Gets or sets whether SerializeItem event handler has been defined and whether event should be fired. + + + + + Gets or sets whether DeserializeItem event handler has been defined and whether event should be fired. + + + + + Provides access to serializer. + + + + + + + + + + Returns the renderer control will be rendered with. + + The current renderer. + + + + Represent an style for the item. + + + + + Default Constructor + + + + + Makes a copy of the ItemStyle object. + + New Instance of a ItemStyle object + + + + Paints the style. + + Graphics object + Target area + Text + Text area + Text Font + + + + Paints the style + + Graphics object + Target Area + Text + Text area + Text Font + Border Type + + + + Paints the style + + Graphics object + Target Area + + + + Paints the style text only. + + Graphics object + Text + Text area + Font + + + + Gets or sets whether text is drawn vertically by this style. + + + + + Gets or sets a background color or starting color for gradient background. + + + + + Gets or sets a background color or ending color for gradient background. + + + + + Gets or sets a text color. + + + + + Gets or sets the gradient angle. + + + + + Gets or sets the style Font + + + + + Gets or sets a value that determines whether text is displayed in multiple lines or one long line. + + + + + Specifies alignment of the text. + + + + + Specifies alignment of the text. + + + + + Specifies how to trim characters when text does not fit. + + + + + Specifies background image. + + + + + Specifies background image position when container is larger than image. + + + + + Specifies the transparency of background image. + + + + + Gets or sets the corner type. + + + + + Gets or sets the diameter in pixels of the corner type rounded or diagonal. + + + + + Gets or sets the border type. + + + + + Gets or sets dash style for single line border type. + + + + + Gets or sets the border sides that are displayed. + + + + + Gets or sets the border color. + + + + + Gets or sets the line tickness of single line border. + + + + + Gets or sets the left text margin. + + + + + Gets or sets the right text margin. + + + + + Gets or sets the top text margin. + + + + + Gets or sets the bottom text margin. + + + + + + ColorEx object that provides the transparency setting ability. + + + + + Constructor with Color Initialization. + + Color object + + + + Constructor with Color and Transparency Initialization. + + Color object + Transparency + + + + Returns the color object with the transparency set. + + Color object + + + + Gets or sets the Color object which does not include transparency. + + + + + Indicates the transparency for the color. + + + + + Specifies that color derived from system colors which is part of DotNetBar Color Scheme object is used. + Colors derived from system colors are automatically refreshed when + system colors are changed. + + + We recommend using this property to specify color rather than setting color directly. + Using colors that are derived from system colors improves uniform look of your application + and visual integration into user environment. + + + + + Returns empty ColorEx object. + + + + + Indicates whether object contain any color. + + + + + Gets or sets a background color or starting color for gradient background. + + + + + Gets or sets a background color or ending color for gradient background. + + + + + Gets or sets a text color. + + + + + Gets or sets the gradient angle. + + + + + Gets or sets the style Font + + + + + Gets or sets a value that determines whether text is displayed in multiple lines or one long line. + + + + + Specifies alignment of the text. + + + + + Specifies alignment of the text. + + + + + Specifies how to trim characters when text does not fit. + + + + + Specifies background image. + + + + + Specifies background image position when container is larger than image. + + + + + Specifies the transparency of background image. + + + + + Gets or sets the corner type. + + + + + Gets or sets the diameter in pixels of the corner type rounded or diagonal. + + + + + Gets or sets the border type. + + + + + Gets or sets dash style for single line border type. + + + + + Gets or sets the border sides that are displayed. + + + + + Gets or sets the border color. + + + + + Gets or sets the line tickness of single line border. + + + + + Gets or sets the left text margin. + + + + + Gets or sets the right text margin. + + + + + Gets or sets the top text margin. + + + + + Gets or sets the bottom text margin. + + + + + ColorEx object that provides the transparency setting ability. + + + + + Gets or sets the Color object which does not include transparency. + + + + + Indicates the transparency for the color. + + + + + Specifies that color derived from system colors which is part of DotNetBar Color Scheme object is used. + Colors derived from system colors are automatically refreshed when + system colors are changed. + + + We recommend using this property to specify color rather than setting color directly. + Using colors that are derived from system colors improves uniform look of your application + and visual integration into user environment. + + + + + Summary description for LabelItem. + + + + + Called when ImageTextSpacing property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Reset property to its default value. + + + + + Gets whether property should be serialized. + + + + + Gets whether property should be serialized. + + + + + Resets the SingleLineColor property to its default value. + + + + + Called when Symbol property has changed. + + Old property value + New property value + + + + Called when SymbolSet property value changes. + + Indciates old value + Indicates new value + + + + Called when SymbolSize property has changed. + + Old property value + New property value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Occurs when text markup link is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + Specifies spacing between label image and text. + + + + + Gets whether item supports text markup. Default is false. + + + + + Gets or sets whether text-markup support is enabled for items Text property. Default value is true. + Set this property to false to display HTML or other markup in the item instead of it being parsed as text-markup. + + + + + Gets or sets the type of the border drawn around the label. + + + + + Gets or sets the border sides that are displayed. Default value specifies border on all 4 sides. + + + + + Gets or sets the background color of the label. + + + + + Gets or sets the text color. + + + + + Gets or sets the border line color when border is single line. + + + + + Gets or sets the horizontal text alignment. + + + + + Gets or sets the text vertical alignment. + + + + + Gets or sets the label font. + + + + + Gets or sets the left padding in pixels. + + + + + Gets or sets the right padding in pixels. + + + + + Gets or sets the top padding in pixels. + + + + + Gets or sets the bottom padding in pixels. + + + + + Gets or sets the width of the label in pixels. + + + + + Gets or sets the height of the label. + + + + + Gets or sets whether the label is drawn as a divider label. + + + + + Gets or sets a value that determines whether text is displayed in multiple lines or one long line. + + + + + Indicates whether label text is rendered using bold font unless the Font property is specifically set to different font. + + + + + Gets or sets the text associated with this item. + + + + + Specifies the label icon. Icons support alpha blending. + + + + + Specifies label image. + + + + + Specifies the index of the image for the label if ImageList is used. + + + + + Gets/Sets the image position inside the label. + + + + + Gets or sets text-orientation. Default is horizontal. + + + + + Gets or sets how vertical text is rotated when TextOrientation = Vertical. + + + + + Gets the realized symbol string. + + + + + Indicates the symbol displayed on label instead of the image. Setting the symbol overrides the image setting. + + + + + Gets or sets the symbol set used to represent the Symbol. + + + + + Indicates the size of the symbol in points. + + + + + Gets or sets the color of the symbol. + + + + + Gets or sets whether label hosted in multi-line ItemContainer triggers new line switch after label is processed. + + + + + Contains static keys that are used to discover localized text for internal controls. + + + + + Navigation Pane collapse button tooltip text. + + + + + Navigation Pane expand button tooltip text. + + + + + Bar auto-hide button tooltip text. + + + + + Bar customize button tooltip text. + + + + + Bar close button tooltip text. + + + + + Bar maximize button tooltip text. + + + + + CustomizeItem tooltip text. + + + + + CustomizeItem Add/Remove text. + + + + + CustomizeItem text for button that opens Customize dialog. + + + + + CustomizeItem text for Reset command. + + + + + Tooltip text for system button that displays overflow items. + + + + + Text for Customize Dialog caption. + + + + + Text for Customize Dialog toolbars tab. + + + + + Text for Customize Dialog commands tab. + + + + + Text for Customize Dialog options tab. + + + + + Text for Customize Dialog keyboard button. + + + + + Text for Customize Dialog close button. + + + + + Text for Customize Dialog new toolbar button. + + + + + Text for Customize Dialog rename toolbar button. + + + + + Text for Customize Dialog delete toolbar button. + + + + + Text for Customize Dialog reset toolbar button. + + + + + Text for Customize Dialog label that gives following instructions to user: + To add a command to Bar select the category and drag the command out of this box to a Bar. + + + + + Text for Customize Dialog categories label. + + + + + Text for Customize Dialog toolbars label. + + + + + Text for Customize Dialog options tab Personalized Menus and Toolbars label. + + + + + Text for Customize Dialog options tab Aways show full menus check box. + + + + + Text for Customize Dialog options tab Show full menus after a short delay check box. + + + + + Text for Customize Dialog options tab 'Reset my usage data' command. + + + + + Text for Customize Dialog options tab 'Other' labe. + + + + + + + Text for Customize Dialog options tab 'Menu Animation:' label. + + + + + Text for Customize Dialog options tab Menu Animation combo box None option. + + + + + Text for Customize Dialog options tab Menu Animation combo box System Default option. + + + + + Text for Customize Dialog options tab Menu Animation combo box Random option. + + + + + Text for Customize Dialog options tab Menu Animation combo box Unfold option. + + + + + Text for Customize Dialog options tab Menu Animation combo box Slide option. + + + + + Text for Customize Dialog Confirm delete of bar message box. + + + + + Text for Reset command on customize item context menu. + + + + + Text for Delete item command on customize item context menu. + + + + + Text for Change Name item command on customize item context menu. + + + + + Text for Default Style item command on customize item context menu. + + + + + Text for Text Only item command on customize item context menu. + + + + + Text for Image And Text item command on customize item context menu. + + + + + Text for Begin Group item command on customize item context menu. + + + + + Text MdiSystemItem Minimize button. + + + + + Text MdiSystemItem Restore button. + + + + + Text MdiSystemItem Close button. + + + + + Text MdiSystemItem menu Restore command. + + + + + Text MdiSystemItem menu Move command. + + + + + Text MdiSystemItem menu Size command. + + + + + Text MdiSystemItem menu Minimize command. + + + + + Text MdiSystemItem menu Maximize command. + + + + + Text MdiSystemItem menu Close command. + + + + + Text MdiSystemItem menu Next command. + + + + + Text Navigation Bar Show More Buttons menu item. + + + + + Text Navigation Bar Show Fewer Buttons menu item. + + + + + Text Navigation Bar Options menu item. + + + + + Text for Move Up button on Navigation Bar Options dialog box. + + + + + Text for Move Down button on Navigation Bar Options dialog box. + + + + + Text for Reset button on Navigation Bar Options dialog box. + + + + + Text for OK button on Navigation Bar Options dialog box. + + + + + Text for Cancel button on Navigation Bar Options dialog box. + + + + + Text for Navigation Bar Options dialog box title. + + + + + Text for Navigation Bar Options label which is displayed above the list box which lists all the controls. + + + + + Text for Rename Toolbar dialog caption. + + + + + Text for New Toolbar dialog caption. + + + + + Text for Bar Name label on Bar edit dialog (either rename or new). + + + + + Text for OK Button on Bar edit dialog (either rename or new). + + + + + Text for Cancel Button on Bar edit dialog (either rename or new). + + + + + Text for Invalid Name Message on Bar edit dialog (either rename or new). + + + + + Text displayed on Color Picker drop down Theme Colors label. + + + + + Text displayed on Color Picker drop down Standard Colors label. + + + + + Text displayed on Color Picker drop down more colors menu item. + + + + + Text for the OK Button on Color Picker dialog. + + + + + Text for the Cancel Button on Color Picker dialog. + + + + + Text for the new color label on Color Picker dialog. + + + + + Text for the current color label on Color Picker dialog. + + + + + Text for the colors label on the standard colors tab. + + + + + Text for the colors label on the custom colors tab. + + + + + Text for the green component label on the custom colors tab. + + + + + Text for the blue component label on the custom colors tab. + + + + + Text for the red component label on the custom colors tab. + + + + + Text for the Color Model label on the custom colors tab. + + + + + Text for the RGB combo box item choice on the custom colors tab. + + + + + Text for the Standard tab on color picker dialog. + + + + + Text for the Custom tab on color picker dialog. + + + + + Text for the Custom tab on color picker dialog. + + + + + Text for the Custom tab on color picker dialog. + + + + + Indicates the text for Today button displayed on the MonthCalendarItem control. + + + + + Indicates the text for Clear button displayed on the MonthCalendarItem control. + + + + + Indicates the text for MessageBoxEx Abort button. + + + + + Indicates the text for MessageBoxEx Cancel button. + + + + + Indicates the text for MessageBoxEx Close button. + + + + + Indicates the text for MessageBoxEx Continue button. + + + + + Indicates the text for MessageBoxEx Help button. + + + + + Indicates the text for MessageBoxEx Ignore button. + + + + + Indicates the text for MessageBoxEx No button. + + + + + Indicates the text for MessageBoxEx OK button. + + + + + Indicates the text for MessageBoxEx Retry button. + + + + + Indicates the text for MessageBoxEx Try Again button. + + + + + Indicates the text for MessageBoxEx Yes button. + + + + + Identifies Form system menu Restore item. + + + + + Identifies Form system menu Move item. + + + + + Identifies Form system menu Size item. + + + + + Identifies Form system menu Minimize item. + + + + + Identifies Form system menu Maximize item. + + + + + Identifies Form system menu Close item. + + + + + Identifies Time Selector OK button. + + + + + Identifies Time Selector Clear button. + + + + + Identifies Time Selector Hour Label. + + + + + Identifies Time Selector Minute Label. + + + + + Identifies 'Show all' Filter Expression label. + + + + + Identifies 'Show null' Filter Expression label. + + + + + Identifies 'Show not null' Filter Expression label. + + + + + Identifies 'Custom' Filter Expression label. + + + + + Identifies 'Enter expression' Filter text. + + + + + Identifies 'Apply' Filter Expression button label. + + + + + Identifies 'Apply' Filter Expression button label. + + + + + Identifies 'Apply' Filter Expression button label. + + + + + Identifies 'Ok' Filter Expression button label. + + + + + Identifies 'Cancel' Filter Expression button label. + + + + + Identifies 'Close' Filter Expression button label. + + + + + Identifies 'Clear' Filter Expression button label. + + + + + Identifies 'Clear' Filter Expression button label. + + + + + Identifies Filter DateTimePicked dialog 'Filter by relative date' text. + + + + + Identifies Filter DateTimePicker dialog 'Filter by specific date' text. + + + + + Identifies Filter DateTimePicker dialog 'Filter by date range' text. + + + + + Identifies Filter DateTimePicker dialog, ByRelativeDate combo entry 'Current Month' text. + + + + + Identifies Filter DateTimePicker dialog, ByRelativeDate combo entry 'Current Year' text. + + + + + Identifies Filter DateTimePicker dialog, ByRelativeDate combo entry 'Last Month Period' text. + + + + + Identifies Filter DateTimePicker dialog, ByRelativeDate combo entry 'Last 3 Month Period' text. + + + + + Identifies Filter DateTimePicker dialog, ByRelativeDate combo entry 'Last 6 Month Period' text. + + + + + Identifies Filter DateTimePicker dialog, ByRelativeDate combo entry 'Last 9 Month Period' text. + + + + + Identifies Filter DateTimePicker dialog, ByRelativeDate combo entry 'Last Year' text. + + + + + Identifies Filter DateTimePicker dialog, ByRelativeDate combo entry 'Last 5 Year Period' text. + + + + + Identifies Filter DateTimePicker dialog, ByRelativeDate combo entry 'Last 10 Year Period' text. + + + + + Identifies Filter expression evaluation error 'Expression error' text. + + + + + Identifies Filter expression evaluation error 'Missing parenthesis' text. + + + + + Identifies Filter expression evaluation error 'Missing quote' text. + + + + + Identifies Filter expression evaluation error 'Invalid number of arguments' text. + + + + + Identifies Filter expression evaluation error 'Invalid argument' text. + + + + + Identifies Filter expression evaluation error 'Invalid 'Empty' operation' text. + + + + + Identifies Filter expression evaluation error 'Invalid DateTime operation' text. + + + + + Identifies Filter expression evaluation error 'Invalid bool operation' text. + + + + + Identifies Filter expression evaluation error 'Invalid string operation' text. + + + + + Identifies Filter expression evaluation error 'Invalid numeric operation' text. + + + + + Identifies Filter expression evaluation error 'Invalid logical evaluation' text. + + + + + Identifies Filter expression evaluation error 'Undefined User function' text. + + + + + Identifies custom filter dialog title 'Custom Filter' text. + + + + + Identifies custom filter dialog 'New Filter' text. + + + + + Identifies custom filter dialog 'New' button text. + + + + + Identifies custom filter dialog 'Delete' button text. + + + + + Identifies custom filter dialog 'Filter Name' text. + + + + + Identifies custom filter dialog 'Description' text. + + + + + Identifies custom filter dialog 'Show in FilterPopup' text. + + + + + Identifies custom filter dialog title 'Custom Filter' text. + + + + + Identifies the default GroupBy WaterMarkText. + + + + + Occurs when DotNetBar is looking for translated text for one of the internal text that are + displayed on menus, toolbars and customize forms. You need to set Handled=true if you want + your custom text to be used instead of the built-in system value. + + + + + Represents an item that displays log information in list container. + + + + + Initializes a new instance of the LogItem class. + + + + + + Creates new instance of LogItem and assigns the name to it. + + Item name. + + + + Creates new instance of LogItem and assigns the name and text to it. + + Item name. + item text. + + + + Returns copy of the item. + + + + + Copies the ButtonItem specific properties to new instance of the item. + + New ButtonItem instance. + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Occurs when text markup link is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + Gets or sets the color of the control text body. + + + + + Gets or sets the color of the header text. + + + + + Gets or sets the image displayed on the log item. + + + + + Gets or sets the image position in relation to text. + + + + + Gets or sets the background color of the item. + + + + + Gets whether item supports text markup. Default is false. + + + + + Summary description for MdiWindowListItem. + + + + + Initializes the item and connects it to the MDI form so it can process the events. You should not call this method directly since this process is + automatically managed by the item. + + + + + Initializes the item and connects it to the MDI form so it can process the events. You should not call this method directly since this process is + automatically managed by the item. + + + + + Refresh the MDI Child form Icons that are displayed on window list items. + + + + + Gets or sets whether the MDI Child Window Icons are displayed on items. + + + + + Gets or sets maximum form caption length that will be displayed on each item. If caption length exceeds given value ... characters are added. + + + + + Gets whether item has been connected to the MDI form so it can process its events. + + + + + Gets or sets whether flicker associated with switching maximized Mdi child forms is attempted to eliminate. You should set this property to false if you encounter any painting problems with your Mdi child forms. + + + + + Gets or sets whether numbered access keys are created for MDI Child window menu items for first 9 items. Access keys will start with number 1 and go through 9. Default value is false + which indicates that access keys are not created. + + + + + Summary description for PopupWindow. + + + + + Return Sub Item at specified location + + + + + Gets or sets whether Key Tips (accelerator keys) for items are displayed on top of them. + + + + + Gets or sets the font that is used to display Key Tips (accelerator keys) when they are displayed. Default value is null which means + that control Font is used for Key Tips display. + + + + + Gets or sets the item default accessibility action will be performed on. + + + + + Gets or sets whether anti-alias smoothing is used while painting. Default value is false. + + + + + Indicates whether Tooltips are shown on Bars and menus. + + + + + Sets,Gets the side bar image structure. + + + + + Gets or sets the HotSubItem on the menu. This method is used internally by DotNetBar and should not be used in your application. + + + + + Summary description for MessageHandler. + + + + + Summary description for NativeFunctions. + + + + + For use with ChildWindowFromPointEx + + + + + Does not skip any child windows + + + + + Skips invisible child windows + + + + + Skips disabled child windows + + + + + Skips transparent child windows + + + + + Represents Outlook 2003 like Navigation Bar. + + + + + Default constructor. + + + + + Applies design-time defaults to control. + + + + + Increases the size of the navigation bar if possible by showing more buttons on the top. + + + + + Reduces the size of the navigation bar if possible by showing fewer buttons on the top. + + + + + Saves current visual layout of navigation bar control to XML based file. + + File name to save layout to. + + + + Saves current visual layout of navigation bar control to XmlElement. + + XmlElement object that will act as a parent for the layout definition. Exact same element should be passed into the LoadLayout method to load the layout. + + + + Loads navigation bar layout that was saved using SaveLayout method. Note that this method must be called after all items are created and added to the control. + + File to load layout from. + + + + Loads navigation bar layout that was saved using SaveLayout method. Note that this method must be called after all items are created and added to the control. + + Parent XML element that is used to load layout from. Note that this must be the same element that was passed into the SaveLayout method. + + + + Occurs after Options dialog which is used to customize control's content has closed by user using OK button. + + + + + Returns collection of items on a bar. + + + + + Gets or sets whether Configure Buttons button is visible. + + + + + Gets or sets whether Show More Buttons and Show Fewer Buttons menu items are visible on Configure buttons menu. + + + + + Gets or sets whether Navigation Pane Options menu item is visible on Configure buttons menu. + + + + + Gets or sets whether Navigation Pane Add/Remove Buttons menu item is visible on Configure buttons menu. + + + + + Gets or sets whether summary line is visible. + + + + + Gets or sets the padding in pixels at the top portion of the item. Height of each item will be increased by padding amount. + + + + + Gets or sets the padding in pixels for bottom portion of the item. Height of each item will be increased by padding amount. + + + + + Returns items container. + + + + + Returns reference to currently checked button. + + + + + Gets or sets whether images are automatically resized to size specified in ImageSizeSummaryLine when button is on the bottom summary line of navigation bar. + + + + + Gets or sets size of the image that will be use to resize images to when button button is on the bottom summary line of navigation bar and AutoSizeButtonImage=true. + + + + + Gets or sets the navigation bar definition string. + + + + + Gets/Sets the visual style for items and color scheme. + + + + + Indicates whether splitter on top of the navigation bar is visible. When activated splitter will let user change the height of the + control to show fewer or more buttons. It is recommended to have navigation bar docked to bottom (Dock=Bottom) to maintain + proper layout. + + + + + Container control for Navigation Bar. + + + + + Creates new instance of NavigationBarContainer. + + + + + Creates new instance of SideBarPanelItem and assigns the name to it. + + Item name. + + + + Creates new instance of SideBarPanelItem and assigns the name and text to it. + + Item name. + item text. + + + + Returns copy of SideBarPanelItem item. + + + + + Recalculates size of this container. + + + + + Increases the size of the navigation bar if possible by showing more buttons on the top. + + + + + Reduces the size of the navigation bar if possible by showing fewer buttons on the top. + + + + + Must be called by any sub item that implements the image when image has changed + + + + + Occurs after an item has been added to the container. This procedure is called on both item being added and the parent of the item. To distinguish between those two states check the item parameter. + + When occurring on the parent this will hold the reference to the item that has been added. When occurring on the item being added this will be null (Nothing). + + + + Occurs after an item has been removed. + + Item being removed. + + + + Returns index of the first item that is displayed in summary line or -1 if there is no item displayed in summary line. + + + + + Gets or sets a value indicating whether the item is expanded or not. For Popup items this would indicate whether the item is popped up or not. + + + + + Gets or sets whether Configure Buttons button is visible. + + + + + Gets or sets whether Show More Buttons and Show Fewer Buttons menu items are visible on Configure buttons menu. + + + + + Gets or sets whether Navigation Pane Options menu item is visible on Configure buttons menu. + + + + + Gets or sets whether Navigation Pane Add/Remove Buttons menu item is visible on Configure buttons menu. + + + + + Gets or sets the padding in pixels at the top portion of the item. Height of each item will be increased by padding amount. + + + + + Gets or sets the padding in pixels for bottom portion of the item. Height of each item will be increased by padding amount. + + + + + Gets or sets whether images are automatically resized to size specified in ImageSizeSummaryLine when button is on the bottom summary line of navigation bar. + + + + + Gets or sets size of the image that will be use to resize images to when button button is on the bottom summary line of navigation bar and AutoSizeButtonImage=true. + + + + + Gets or sets whether summary line is visible. + + + + + Delegate for OptionGroupChanging event. + + + + + Delegate for PanelPopup events. + + + + + Represents Outlook 2003 style navigation pane control. + + + + + Required designer variable. + + + + + Clean up any resources being used. + + + + + Applies any layout changes and repaint the control. + + + + + Returns Panel associated with button on navigation bar or null if panel cannot be found. + + Button on navigation bar. + + + + + Suspends normal layout logic. + + + + + Resumes normal layout logic. Optionally forces an immediate layout of pending layout requests. + + + + + Increases the size of the navigation bar if possible by showing more buttons on the top. + + + + + Reduces the size of the navigation bar if possible by showing fewer buttons on the top. + + + + + Saves current visual layout of navigation bar control to XML based file. + + File name to save layout to. + + + + Saves current visual layout of navigation bar control to XmlElement. + + XmlElement object that will act as a parent for the layout definition. Exact same element should be passed into the LoadLayout method to load the layout. + + + + Popup selected pane when control is collapsed. When control is collapsed (Expanded=false) currently selected pane is not visible + calling this method will popup selected pane and allow user access to it. Use PopupPaneVisible property + to check whether currently selected pane is displayed as popup. + + + + + Hides popup selected pane when control is collapsed and selected pane is displayed as popup. When control is collapsed (Expanded=false) + currently selected pane can be displayed as popup. Calling this method will hide the popup pane. Use PopupPaneVisible property + to check whether currently selected pane is displayed as popup. + + + + + Raises the PanelPopupClosed event. + + Provides event arguments. + + + + Loads navigation bar layout that was saved using SaveLayout method. Note that this method must be called after all items are created and added to the control. + + File to load layout from. + + + + Loads navigation bar layout that was saved using SaveLayout method. Note that this method must be called after all items are created and added to the control. + + Parent XML element that is used to load layout from. Note that this must be the same element that was passed into the SaveLayout method. + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Updates the color scheme on child panels to reflect the style of the NavigationBar control. Calling this method is necessary only if you manually + change the NavigationBar.ColorScheme property. + + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Occurs when Item is clicked. + + + + + Occurs when currently selected panel is about to change. + + + + + Occurs when control is looking for translated text for one of the internal text that are + displayed on menus, toolbars and customize forms. You need to set Handled=true if you want + your custom text to be used instead of the built-in system value. + + + + + Occurs before panel is displayed on popup when control is collapsed. You can use this event to modify default + size of the popup panel or cancel the popup of the panel. + + + + + Occurs after panel is displayed on popup. + + + + + Occurs after panel displayed on popup is closed. + + + + + Occurs before Expanded property is changed. You can cancel change of this property by setting Cancel=true on the event arguments. + + + + + Occurs after Expanded property has changed. You can handle ExpandedChanging event and have opportunity to cancel the change. + + + + + Occurs after Options dialog which is used to customize control's content has closed by user using OK button. + + + + + Returns the width of the expanded control if control is currently collapsed. + + + + + Returns collection containing buttons on navigation bar. + + + + + Gets or sets the height of the navigation bar part of the navigation pane control. + Navigation Bar height is automatically calculated based on the content. + Setting this property suggests desired height of the navigation bar but the actual height will be + calculated to ensure that complete buttons are visible so suggested and actual height might differ. + + + + + Returns reference to internal NavigationBar control. + + + + + Gets or sets size of the image that will be use to resize images to when button button is on the bottom summary line of navigation bar and AutoSizeButtonImage=true. + + + + + Gets or sets whether Configure Buttons button is visible. + + + + + Gets or sets whether Show More Buttons and Show Fewer Buttons menu items are visible on Configure buttons menu. + + + + + Gets or sets whether Navigation Pane Options menu item is visible on Configure buttons menu. + + + + + Gets or sets whether Navigation Pane Add/Remove Buttons menu item is visible on Configure buttons menu. + + + + + Returns reference to currently checked button. + + + + + Returns reference to currently selected panel. Panels are automatically switched when buttons are checked. + + + + + ImageList for images used on Items. + + + + + Returns reference to the PanelEx that is used to display title. + + + + + Gets or sets the padding in pixels at the top portion of the item. Height of each item will be increased by padding amount. + + + + + Gets or sets the padding in pixels for bottom portion of the item. Height of each item will be increased by padding amount. + + + + + Gets or sets whether images are automatically resized to size specified in ImageSizeSummaryLine when button is on the bottom summary line of navigation bar. + + + + + Gets or sets the navigation bar definition string. + + + + + Gets or sets whether anti-alias smoothing is used while painting. Default value is false. + + + + + Gets or sets animation time in milliseconds when control is expanded or collapsed. Default value is 100 miliseconds. You can set this to 0 (zero) to disable animation. + + + + + Gets or sets whether navigation pane can be collapsed. Default value is false. When set to true + expand/collapse button will be displayed in title so control can be reduced in size. + + + + + Gets or sets alignment of the expand button inside of title bar. + + + + + Gets or sets whether navigation pane is expanded. Default value is true. + When control is collapsed it is reduced in size so it consumes less space. + + + + + Gets the reference to the inner panel displaying Navigation Pane vertical text created when control is collapsed. + + + + + Gets or sets whether selected pane is displayed as popup when control is collapsed (Expanded=false). Using + navigation pane button that is displayed when control is collapsed user can popup or close currently selected pane without + expanding the control. You can use this property to do same from code as well as check whether selected pane is displayed as + popup. Note that control must be collapsed (Expanded=false) in order for this property to have any effect. + + + + + Gets/Sets the visual style for the control. Default style is Office 2003. + + + + + Represents event arguments for PanelChanging event. + + + + + Set to true to cancel changing of the panel. + + + + + Panel that will be selected if operation is not cancelled. + + + + + Panel that is currently selected and which will be de-selected if operation is not cancelled. + + + + + Default constructor. + + + + + Represents event arguments for BeforePanelPopup event. + + + + + Set to true to cancel popup of the panel. + + + + + Size and position of popup. You can modify this memeber to affect size and position of popup. + + + + + Default constructor. + + + + + Represents Panel on Navigation Pane control. + + + + + Gets or sets button associated with the pane on the panel when hosted on NavigationPane control. + + + + + Summary description for NavPaneOptions. + + + + + Required designer variable. + + + + + Clean up any resources being used. + + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Updates position of the title bar button to reflect any changes to the button that influence size of the button. + + + + + Occurs when Expanded/Collapse button is clicked. + + + + + Gets or sets whether expand button is visible or not. Default value is true. + + + + + Gets or sets alignment of the button. + + + + + Gets or sets whether text markup if it occupies less space than control provides uses the Style Alignment and LineAlignment properties to align the markup inside of the control. Default value is true. + + + + + Use as a popup container for DotNetBar objects. + + + + + Summary description for PopupContainer. + + + + + Summary description for PopupShadow. + + + + + Represents a progress bar item. + + + + + Creates new instance of ProgressBarItem. + + + + + Creates new instance of ProgressBarItem and assigns the name to it. + + Item name. + + + + Creates new instance of ProgressBarItem and assigns the name and text to it. + + Item name. + item text. + + + + Returns copy of the item. + + + + + Copies the ProgressBarItem specific properties to new instance of the item. + + New ProgressBarItem instance. + + + + Copies the ProgressBarItem specific properties to new instance of the item. + + New ProgressBarItem instance. + + + + Overriden. Draws the item. + + Target Graphics object. + + + + Overriden. Recalculates the size of the item. + + + + + Resets style to default value. Used by windows forms designer. + + + + + Advances the current position of the progress bar by the amount of the Step property. + + + + + Advances the current position of the progress bar by the specified amount. + + The amount by which to increment the progress bar's current position. + + + + Gets whether ChunkColor property should be serialized. + + + + + Resets the ChunkColor property to its default value. + + + + + Gets whether ChunkColor property should be serialized. + + + + + Resets the ChunkColor property to its default value. + + + + + Overloaded. Deserializes the Item from the XmlElement. + + Source XmlElement. + + + + Overloaded. Serializes the item and all sub-items into the XmlElement. + + XmlElement to serialize the item to. + + + + Gets or sets the item background style. + + + + + Specifies the background style of the item. + + + + + Gets or sets the maximum value of the range of the control. + + + + + Gets or sets the minimum value of the range of the control. + + + + + Gets or sets the current position of the progress bar. + + + + + Gets or sets the amount by which a call to the PerformStep method increases the current position of the progress bar. + + + + + Gets or sets whether the text inside the progress bar is displayed. + + + + + Gets or sets the width of the item in pixels. 0 value indicates the auto-sizing item based on the text contained in it. + + + + + Gets or sets the height of the label. 0 value indicates the auto-sizing item based on the text height. + + + + + Gets or sets the color of the progress chunk. + + + + + Gets or sets the target gradient color of the progress chunk. + + + + + Gets or sets the gradient angle of the progress chunk. + + + + + Indicates item's visiblity when on pop-up menu. + + + + + Indicates whether item was recently used. + + + + + Gets or sets the type of progress bar used to indicate progress. The Standard style displays the progress based on Minimum, Maximum and current Value. + The Marquee type is automatically moving progress bar that is used to indicate an ongoing operation for which the actual duration cannot be estimated. + + + + + Gets or sets the marquee animation speed in milliseconds. + + + + + Gets or sets the predefined color state table for progress bar. Color specified applies to items with Office 2007 style only. It does not have + any effect on other styles. You can use ColorTable to indicate the state of the operation that Progress Bar is tracking. Default value is eProgressBarItemColor.Normal. + + + + + Summary description for RemindForm. + + + + + Clean up any resources being used. + + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Represents color table for Bar objects in various states. + + + + + Gets or sets the colors for top part of toolbar background. + + + + + Gets or sets the colors for bottom part of toolbar background. + + + + + Gets or sets the color of the bottom border. + + + + + Gets or sets the popup toolbar background color. + + + + + Gets or sets the color of popup toolbar border. + + + + + Gets or sets the status bar top border color. + + + + + Gets or sets the status bar top border light color. + + + + + Gets or sets the alternative background colors for the status bar. + + + + + Represents color table for ButtonItem object. + + + + + Gets or sets the name of the color table. + + + + + Gets or sets the color table applied for button in default state. + + + + + Gets or sets the color table applied when mouse is over the button. + + + + + Gets or sets the color table applied when mouse is over the buttons inactive split part. Applies to split button appearance only. + + + + + Gets or sets the color table applied when mouse is pressed over the button. + + + + + Gets or sets the color table applied when mouse is pressed over the button. + + + + + Gets or sets the color table applied when button is expanded. + + + + + Gets or sets the color table applied when cursor is over button on a menu. + + + + + Represents typed collection of Office2007ButtonItemColorTable type. + + + + Creates new instance of the class. + + + + Adds new object to the collection. + + Object to add. + Index of newly added object. + + + + Inserts new object into the collection. + + Position of the object. + Object to insert. + + + + Returns index of the object inside of the collection. + + Reference to the object. + Index of the object. + + + + Returns whether collection contains specified object. + + Object to look for. + true if object is part of the collection, otherwise false. + + + + Returns whether collection contains object with specified name. + + Name of the object to look for + true if object with given name is part of the collection otherwise false + + + + Removes specified object from the collection. + + + + + + Copies collection into the specified array. + + Array to copy collection to. + Starting index. + + + + Copies contained items to the Office2007ButtonItemColorTable array. + + Array to copy to. + + + + Returns reference to the object in collection based on it's index. + + + + + Returns reference to the object in collection based on it's index. + + + + + Represents a color table for ButtonItem in certain state like but not limited to mouse over, checked or pressed. + + + + + Gets or sets the outer border colors. + + + + + Gets or sets the outer border width. Default is 1. + + + + + Gets or sets the inner border colors. + + + + + Gets or sets top part background colors. + + + + + Gets or sets highlight colors for the top background part. + + + + + Gets or sets bottom part background colors. + + + + + Gets or sets highlight colors for the bottom background part. + + + + + Gets or sets the split border colors that divides button text and image from expand part of the button. + + + + + Gets or sets the split border light colors that divides button text and image from expand part of the button. + + + + + Gets or sets the text color. + + + + + Gets or sets the background color of the expand sign. + + + + + Gets or sets the outline light color of the expand sign. + + + + + Gets or sets the single gradient background for the button. When specified it is used instead of TopBackground and BottomBackground for rendering. + + + + + Represent the color table for the CheckBoxItem. + + + + + Gets or sets the colors for the item in default state. + + + + + Gets or sets the colors for the item when mouse is over the item. + + + + + Gets or sets the colors for the item when mouse is pressed over the item. + + + + + Gets or sets the colors for the item when item is disabled. + + + + + Defines the colors for the single CheckBoxItem state. + + + + + Gets or sets the background colors of the check box. + + + + + Gets or sets the color of the check border. + + + + + Gets or sets the inner color of check box border. + + + + + Gets or sets the inner background color of check box. + + + + + Gets or sets the color of the check sign that is drawn when item is checked. + + + + + Gets or sets the text color. + + + + + Defines color table for ColorItem. + + + + + Gets or sets the border that is drawn around each individual color item or color item group. + + + + + Gets or sets the inner mouse over color. + + + + + Gets or sets the outer mouse over color. + + + + + Represents the painter for ColorItem in Office 2007 style + + + + + Gets or sets color table used by renderer. + + + + + Defines the color scheme type for the Office2007ColorTable. + + + + + Blue color scheme. + + + + + Black color scheme. + + + + + Silver color scheme. + + + + + Windows Vista Glass inspired color scheme. + + + + + Defines the delegate which retrieves the color for specific integer value. + + color represented as integer. + Reference to Color object. + + + + Defines contextual label colors. + + + + + Initializes a new instance of the LabelColors structure. + + + + + + + Initializes ColorScheme object with the black color scheme. + + ColorScheme object to initialize. + + + + Defines the color table for the combo box. + + + + + Gets or sets the color for combo box in default state. + + + + + Gets or sets the color for standalone combo box in default state. Standalone combo box is a control not used by ComboBoxItem. + + + + + Gets or sets the colors when mouse is over the control. + + + + + Gets or sets the colors when control is dropped down. + + + + + Defines the combo box colors for a particular state. + + + + + Gets or sets the border color. + + + + + Gets or sets the background color. + + + + + Gets or sets the outer expand button border. + + + + + Gets or sets the inner expand button border. + + + + + Gets or sets the background color of the expand button. + + + + + Gets or sets the foreground color of the expand button. + + + + + Defines color table for the Office 2007 style DataGridView control. + + + + + Gets or sets grid background color. + + + + + Gets or sets default cell color. + + + + + Gets or sets default cell text color. + + + + + Gets or sets the background color for the column headers in normal state. + + + + + Gets or sets the normal column text color. + + + + + Gets or sets the column header border color. + + + + + Gets or sets the background color for the column headers in mouse over state. + + + + + Gets or sets the column header border color when mouse is over the column. + + + + + Gets or sets the selected column header text color. + + + + + Gets or sets the background color for the column headers in selected state. + + + + + Gets or sets the border color for the column headers in selected state. + + + + + Gets or sets the background color for the column headers in selected mouse over state. + + + + + Gets or sets the border color for the column headers in selected mouse over state. + + + + + Gets or sets the background color for the column headers in pressed state. + + + + + Gets or sets the border color for the column headers in pressed state. + + + + + Gets or sets the column header foreground color. + + + + + Gets or sets the background color for row marker background. + + + + + Gets or sets the border color for row marker. + + + + + Gets or sets the background color for row marker background. + + + + + Gets or sets the border color for row marker. + + + + + Gets or sets the background color for row marker background. + + + + + Gets or sets the border color for row marker. + + + + + Gets or sets the background color for row marker background. + + + + + Gets or sets the border color for row marker. + + + + + Gets or sets the background color for row marker background. + + + + + Gets or sets the border color for row marker. + + + + + Gets or sets the color of the grid lines. + + + + + Gets or sets the background color of selector cell usually located in top-left corner. + + + + + Gets or sets the border color of selector cell usually located in top-left corner. + + + + + Gets or sets the light border color of selector cell usually located in top-left corner. + + + + + Gets or sets the dark border color of selector cell usually located in top-left corner. + + + + + Gets or sets the sign color of selector cell usually located in top-left corner. + + + + + Gets or sets the background color of selector cell usually located in top-left corner. + + + + + Gets or sets the border color of selector cell usually located in top-left corner. + + + + + Gets or sets the light border color of selector cell usually located in top-left corner. + + + + + Gets or sets the dark border color of selector cell usually located in top-left corner. + + + + + Gets or sets the sign color of selector cell usually located in top-left corner. + + + + + Defines color table for the Dialog Launcher button. + + + + + Gets or sets the colors for the default state. + + + + + Gets or sets the colors for the mouse over state. + + + + + Gets or sets the colors for the pressed state. + + + + + Defines the color table for dialog launcher state. + + + + + Gets or sets the color of dialog launcher symbol. + + + + + Gets or sets the shade color of dialog launcher symbol. + + + + + Gets or sets the background color for the top part of the element. + + + + + Gets or sets the background color for the bottom part of the element. + + + + + Gets or sets the outer border colors. + + + + + Gets or sets the inner border colors. + + + + + Defines the color table for all states of Office 2007 style form caption. + + + + + Gets or sets the color table for caption in active state. + + + + + Gets or sets the color table for caption in inactive state. + + + + + Gets or sets the background color of the form. + + + + + Gets or sets the text color of the form. + + + + + Gets or sets the MDI Client Background image. + + + + + Defines color table for the Office 2007 style Form caption color state. + + + + + Gets or sets the colors for the top part of the background. + + + + + Gets or sets the colors for the bottom part of the background. + + + + + Gets or sets the array of colors used to draw the border that separates the form caption and the form content. Applies only to the Office2007Form rendering. + + + + + Gets or sets the color of caption text. + + + + + Gets or sets the color of caption extra text that is appended to the caption. + + + + + Gets or sets the array of colors that represents the border colors. Outer border is at index 0. + + + + + Represents the color table used by the Gallery container. + + + + + Gets or sets the background color of the Gallery Group label when gallery is displayed on popup. + + + + + Gets or sets the text color of the Gallery Group label when gallery is displayed on popup. + + + + + Gets or sets the border color of the Gallery Group label when gallery is displayed on popup. + + + + + Represents color table for ItemContainer object with BeginGroup set to true. + + + + + Gets or sets the outer border colors. + + + + + Gets or sets the inner border colors. + + + + + Gets or sets the top background colors. + + + + + Gets or sets the bottom background colors. + + + + + Gets or sets the dark color of item devider for items inside of the ItemContainer. + + + + + Gets or sets the light color of item devider for items inside of the ItemContainer. + + + + + Represents the color table for key tips. + + + + + Gets or sets KeyTip Text color. + + + + + Gets or sets KeyTip border color. + + + + + Gets or sets KeyTip Background color. + + + + + Represents color table for ListViewEx control. + + + + + Gets or sets the background color of the columns. + + + + + Gets or sets the color of the column separator. + + + + + Gets or sets the color of the column text. + + + + + Gets or sets the color of the control border. + + + + + Gets or sets the background colors for the selected item. + + + + + Gets or sets the color of the selected item border that is draw on top and bottom of the selection. + + + + + Gets or sets the text color for selected item. + + + + + Defines the color table for the menus. + + + + + Gets or sets the menu background colors. + + + + + Gets or sets the menu side background colors. + + + + + Gets or sets the menu side background colors for the items that were not recently used. + + + + + Gets or sets the menu border background colors. + + + + + Gets or sets the menu side border. + + + + + Gets or sets the light menu side border. + + + + + Gets or sets the background color blend for the special file menu background. + + + + + Gets or sets the two column container border color. + + + + + Gets or sets the two column container light border color. + + + + + Gets or sets the background color of first file column. + + + + + Gets or sets the border color of first file column. + + + + + Gets or sets the background color of first file column. + + + + + Gets or sets the background color blend for the bottom container on file menu. + + + + + Defines the color table for the NavigationPane control. + + + + + Gets or sets the background color collection blend for the button background. + + + + + Gets or sets color table used by renderer. + + + + + Defines color table for the Office 2007 style ProgressBarItem. + + + + + Gets or sets the background color collection blend for the item background. + + + + + Gets or sets the outer border color. + + + + + Gets or sets the inner border color. + + + + + Gets or sets the color collection blend for the current progress part of the item. + + + + + Gets or sets the color collection blend for overlay for the current progress of the item. + + + + + Gets or sets the color collection blend of shadow for the current progress of the item. + + + + + Defines abstract class for the ProgressBarItem painter. + + + + + Gets or sets color table used by renderer. + + + + + Defines painter for the Office 2007 style QAT Customize Item. + + + + + Defines base class for QAT customize item painter. + + + + + Gets or sets color table used by renderer. + + + + + Defines Office 2007 style QAT painter. + + + + + Defines base class for QAT overflow item painter. + + + + + Gets or sets color table used by renderer. + + + + + Defines the color table for the quick access toolbar in all states. + + + + + Gets or sets the colors for the quick access toolbar background when hosted in ribbon control caption and form is active + or the background colors when toolbar is hosted below the ribbon control. + + + + + Gets or sets the colors for the quick access toolbar background when hosted in ribbon control caption and form is inactive + + + + + Gets or sets the colors for the quick access toolbar background when positioned below the ribbon bar. + + + + + Gets or sets the background color of Customize Quick Access Toolbar menu label displayed on customize quick access toolbar menu. + + + + + Gets or sets the text color of Customize Quick Access Toolbar menu label displayed on customize quick access toolbar menu. + + + + + Defines the color table for the Quick Access toolbar. + + + + + Gets or sets the colors of the top background. + + + + + Gets or sets the colors of the bottom background. + + + + + Gets or sets the outer border color. + + + + + Gets or sets the middle border color. + + + + + Gets or sets the inner border color. + + + + + Gets or sets the border when Windows Vista Glass is enabled. + + + + + Represents Office 2007 Control renderer. + + + + + Represents bases class that defines a renderer. + + + + + Raises RenderKeyTips event. + + Provides context information. + + + + Draws KeyTip for an object. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderKeyTips method so events can occur. + + Provides context information. + + + + Raises RenderRibbonTabGroup event. + + Provides context information. + + + + Draws ribbon tab group. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderRibbonTabGroup method so events can occur. + + Provides context information. + + + + Raises RenderItemContainer event. + + Provides context information. + + + + Draws the separator for an item inside of item container. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderItemContainerSeparator method so events can occur. + + Provides context information. + + + + Raises RenderItemContainer event. + + Provides context information. + + + + Draws item container. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderItemContainer method so events can occur. + + Provides context information. + + + + Raises RenderButtonItem event. + + Provides context information. + + + + Draws ButtonItem. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderButtonItem method so events can occur. + + Provides context information. + + + + Raises RenderRibbonTabItem event. + + Provides context information. + + + + Draws RibbonTabItem. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderRibbonTabItem method so events can occur. + + Provides context information. + + + + Raises RenderToolbarBackground event. + + Provides context information. + + + + Draws docked or floating toolbar background. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderToolbarBackground method so events can occur. + + Provides context information. + + + + Raises RenderPopupToolbarBackground event. + + Provides context information. + + + + Draws popup toolbar background. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderPopupToolbarBackground method so events can occur. + + Provides context information. + + + + Raises RenderRibbonDialogLauncher event. + + Provides context information. + + + + Draws ribbon bar dialog launcher button. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderRibbonDialogLauncher method so events can occur. + + Provides context information. + + + + Raises RenderColorItem event event. + + Provides context information. + + + + Draws ColorItem. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderColorItem method so events can occur. + + Provides context information. + + + + Raises RenderRibbonControlBackground event event. + + Provides context information. + + + + Draws the background of the Ribbon Control. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderRibbonControlBackground method so events can occur. + + Provides context information. + + + + Raises RenderSystemCaptionItem event event. + + Provides context information. + + + + Draws the SystemCaptionItem. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderSystemCaptionItem method so events can occur. + + Provides context information. + + + + Raises RenderRibbonFormCaptionText event event. + + Provides context information. + + + + Draws the form caption text for the Ribbon Control. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderRibbonFormCaptionText method so events can occur. + + Provides context information. + + + + Raises RenderQuickAccessToolbarBackground event event. + + Provides context information. + + + + Draws the background of Quick Access Toolbar on Ribbon Control. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderQuickAccessToolbarBackground method so events can occur. + + Provides context information. + + + + Raises RenderMdiSystemItem event. + + Provides context information. + + + + Draws the MdiSystemItem. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderMdiSystemItem method so events can occur. + + Provides context information. + + + + Raises RenderFormCaptionBackground event. + + Provides context information. + + + + Draws the form caption background. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderFormCaptionBackground method so events can occur. + + Provides context information. + + + + Raises RenderQatOverflowItem event. + + Provides context information. + + + + Draws the Quick Access Toolbar Overflow item. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderQatOverflowItem method so events can occur. + + Provides context information. + + + + Raises RenderQatCustomizeItem event. + + Provides context information. + + + + Draws the Quick Access Toolbar Customize Item. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderQatCustomizeItem method so events can occur. + + Provides context information. + + + + Raises RenderCheckBoxItem event. + + Provides context information. + + + + Draws the CheckBoxItem. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderCheckBoxItem method so events can occur. + + Provides context information. + + + + Raises RenderCheckBoxItem event. + + Provides context information. + + + + Draws the ProgressBarItem. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderProgressBarItem method so events can occur. + + Provides context information. + + + + Raises RenderNavPaneButtonBackground event. + + Provides context information. + + + + Draws the Navigation Pane button background. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderNavPaneButtonBackground method so events can occur. + + Provides context information. + + + + Raises RenderSliderItem event. + + Provides context information. + + + + Draws the Slider item. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderSliderItem method so events can occur. + + Provides context information. + + + + Raises RenderSideBar event. + + Provides context information. + + + + Draws the SideBar control. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderSideBar method so events can occur. + + Provides context information. + + + + Raises RenderSideBarPanelItem event. + + Provides context information. + + + + Draws the SideBar control. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderSideBarPanelItem method so events can occur. + + Provides context information. + + + + Raises RenderCrumbBarItemView event. + + Provides context information. + + + + Draws CrumbBarItemView. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderCrumbBarItemView method so events can occur. + + Provides context information. + + + + Raises RenderCrumbBarOverflowItem event. + + Provides context information. + + + + Draws CrumbBarOverflowButton. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderCrumbBarOverflowItem method so events can occur. + + Provides context information. + + + + Raises RenderSwitchButton event. + + Provides context information. + + + + Draws the Switch Button. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderSwitchButton method so events can occur. + + Provides context information. + + + + Raises RenderRangeSliderItem event. + + Provides context information. + + + + Draws the Range Slider item. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderRangeSliderItem method so events can occur. + + Provides context information. + + + + Raises RenderStepItem event. + + Provides context information. + + + + Draws the Step item. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderStepItem method so events can occur. + + Provides context information. + + + + Raises RenderListBoxItem event. + + Provides context information. + + + + Draws the ListBoxItem. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderListBoxItem method so events can occur. + + Provides context information. + + + + Raises RenderListBoxItem event. + + Provides context information. + + + + Draws the ListBoxItem. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderListBoxItem method so events can occur. + + Provides context information. + + + + Raises RenderTabFormStrip event. + + Provides context information. + + + + Draws the TabStrip. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderTabFormStrip method so events can occur. + + Provides context information. + + + + Raises RenderTabFormItem event. + + Provides context information. + + + + Draws the TabStrip. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderTabFormStrip method so events can occur. + + Provides context information. + + + + Raises RenderNewTabFormItem event. + + Provides context information. + + + + Draws the NewTabFormItem. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderTabFormStrip method so events can occur. + + Provides context information. + + + + Raises RenderTabParentForm event. + + Provides context information. + + + + Draws the TabParentForm. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderTabParentForm method so events can occur. + + Provides context information. + + + + Occurs when KeyTip is rendered. + + + + + Occurs when ribbon tab group is rendered. + + + + + Occurs when ItemContainer is rendered. + + + + + Occurs when separator is drawn for an item inside of ItemContainer. + + + + + Occurs when ButtonItem is rendered. + + + + + Occurs when RibbonTabItem is rendered. + + + + + Occurs when docked or floating toolbar is rendered. + + + + + Occurs when popup toolbar is rendered. + + + + + Occurs when dialog launcher button on ribbon bar is rendered. + + + + + Occurs when Ribbon Control background is rendered. + + + + + Occurs when form caption text on ribbon control is rendered. + + + + + Occurs when Quick Access Toolbar background is rendered. + + + + + Occurs when ColorItem is rendered. + + + + + Occurs when SystemCaptionItem is rendered. + + + + + Occurs when MdiSystemItem is rendered. + + + + + Occurs when form caption is background is being rendered. + + + + + Occurs when quick access toolbar overflow item is being rendered. + + + + + Occurs when quick access toolbar customize item is being rendered. + + + + + Occurs when CheckBoxItem is being rendered. + + + + + Occurs when ProgressBarItem is being rendered. + + + + + Occurs when Navigation pane button background is being rendered. + + + + + Occurs when Slider item is being rendered. + + + + + Occurs when Range Slider item is being rendered. + + + + + Occurs when SideBar control is being rendered. + + + + + Occurs when SideBarPanelItem control is being rendered. + + + + + Occurs when CrumbBarItemView is rendered. + + + + + Occurs when CrumbBarOverflowButton is rendered. + + + + + Occurs when Slider item is being rendered. + + + + + Occurs when StepItem is being rendered. + + + + + Occurs when ListBoxItem is being rendered. + + + + + Occurs when SideNavItem is being rendered. + + + + + Occurs when TabStrip is being rendered. + + + + + Occurs when TabFormItem is rendered. + + + + + Occurs when NewTabFormItem is rendered. + + + + + Occurs when TabParentForm is being rendered. + + + + + Draws KeyTip for an object. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderKeyTips method so events can occur. + + Provides context information. + + + + Draws ribbon tab group. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderRibbonTabGroup method so events can occur. + + Provides context information. + + + + Draws item container. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderItemContainer method so events can occur. + + Provides context information. + + + + Draws the separator for an item inside of item container. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderItemContainerSeparator method so events can occur. + + Provides context information. + + + + Draws ButtonItem. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderButtonItem method so events can occur. + + Provides context information. + + + + Draws RibbonTabItem. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderRibbonTabItem method so events can occur. + + Provides context information. + + + + Draws popup toolbar background. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderPopupToolbarBackground method so events can occur. + + Provides context information. + + + + Draws docked or floating toolbar background. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderToolbarBackground method so events can occur. + + Provides context information. + + + + Draws floating toolbar background. + + Provides context information. + + + + Draws ribbon bar dialog launcher button. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderPopupToolbarBackground method so events can occur. + + Provides context information. + + + + Draws ColorItem. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderColorItem method so events can occur. + + Provides context information. + + + + Draws the background of the Ribbon Control. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderRibbonControlBackground method so events can occur. + + Provides context information. + + + + Draws the form caption text for the Ribbon Control. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderRibbonFormCaptionText method so events can occur. + + Provides context information. + + + + Draws the background of Quick Access Toolbar on Ribbon Control. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderQuickAccessToolbarBackground method so events can occur. + + Provides context information. + + + + Draws the SystemCaptionItem. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderSystemCaptionItem method so events can occur. + + Provides context information. + + + + Draws the MdiSystemItem. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderMdiSystemItem method so events can occur. + + Provides context information. + + + + Draws the form caption background. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderFormCaptionBackground method so events can occur. + + Provides context information. + + + + Draws the Quick Access Toolbar Overflow item. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderQatOverflowItem method so events can occur. + + Provides context information. + + + + Draws the Quick Access Toolbar Overflow item. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderQatOverflowItem method so events can occur. + + Provides context information. + + + + Draws the ProgressBarItem. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderProgressBarItem method so events can occur. + + Provides context information. + + + + Draws the Navigation Pane button background. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderNavPaneButtonBackground method so events can occur. + + Provides context information. + + + + Draws the Slider item. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderSliderItem method so events can occur. + + Provides context information. + + + + Draws the SideBar control. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderSideBar method so events can occur. + + Provides context information. + + + + Draws the SideBar control. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderSideBarPanelItem method so events can occur. + + Provides context information. + + + + Draws CrumbBarItemView. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderButtonItem method so events can occur. + + Provides context information. + + + + Draws CrumbBarOverflowButton. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderCrumbBarOverflowItem method so events can occur. + + Provides context information. + + + + Draws SwitchButton. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderButtonItem method so events can occur. + + Provides context information. + + + + Draws the Slider item. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderSliderItem method so events can occur. + + Provides context information. + + + + Draws the Step item. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderStepItem method so events can occur. + + Provides context information. + + + + Draws the ListBoxItem. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderListBoxItem method so events can occur. + + Provides context information. + + + + Draws the ListBoxItem. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderListBoxItem method so events can occur. + + Provides context information. + + + + Draws the TabStrip. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderTabFormStrip method so events can occur. + + Provides context information. + + + + Draws the TabStrip. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderTabFormStrip method so events can occur. + + Provides context information. + + + + Draws the TabStrip. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderTabFormStrip method so events can occur. + + Provides context information. + + + + Draws the TabParentForm. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you + do not want default rendering to occur do not call the base implementation. You can call OnRenderTabParentForm method so events can occur. + + Provides context information. + + + + Occurs when color table is changed by setting the ColorTable property on the renderer. + + + + + Gets or sets color table used by renderer. + + + + + Defines color table for RibbonBar in various states. + + + + + Gets or sets the colors for the default RibbonBar state. + + + + + Gets or sets the colors for RibbonBar when mouse is over the control. + + + + + Gets or sets the colors for RibbonBar when ribbon bar is in overflow state and expanded to show all the items. + + + + + Represents the color table of RibbonBar for Office 2007 style. Default values represent blue Luna theme. + + + + + Gets or sets the height in pixels of top background part. + + + + + Gets or sets the outer border colors. + + + + + Gets or sets the inner border colors. + + + + + Gets or sets the top background colors. + + + + + Gets or sets the bottom background colors. + + + + + Gets or sets the title background colors. + + + + + Gets or sets the color of title text. + + + + + Defines color table for Ribbon Control. + + + + + Gets or sets the colors for the outer border. + + + + + Gets or sets the colors for the inner border. + + + + + Gets or sets the colors for the tabs background area. + + + + + Gets or sets the colors for the tabs background area when Windows Glass is enabled. + + + + + Gets or sets the color of border which is drawn above the tab. + + + + + Gets or sets the light color of border which is drawn above the tab. + + + + + Gets or sets the round corner size for the ribbon control parts. + + + + + Gets or sets the height in pixels of top background part. + + + + + Gets or sets the top background colors. + + + + + Gets or sets the bottom background colors. + + + + + Gets or sets the background image used on Office 2007 style start button displayed in top-left corner of ribbon control. + Note that image assigned to all StartButton properties must be the same size. The size for the button will be determined by image + size set on this property. + + + + + Gets or sets the background image used on Office 2007 style start button displayed in top-left corner of ribbon control when mouse is over the button. + + + + + Gets or sets the background image used on Office 2007 style start button displayed in top-left corner of ribbon control when button is pressed. + + + + + Represents painter for Office 2007 style ribbon overflow button. + + + + + Defines the color table for the Ribbon Tab Group. + + + + + Gets or sets the name of the color table. + + + + + Gets or sets the background color. + + + + + Gets or sets the background highlight colors. + + + + + Gets or sets the text color. + + + + + Gets or sets the border color + + + + + Collection for Office2007RibbonTabGroupColorTable type. + + + + Creates new instance of the class. + + + + Adds new object to the collection. + + Object to add. + Index of newly added object. + + + + Inserts new object into the collection. + + Position of the object. + Object to insert. + + + + Returns index of the object inside of the collection. + + Reference to the object. + Index of the object. + + + + Returns whether collection contains specified object. + + Object to look for. + true if object is part of the collection, otherwise false. + + + + Returns whether collection contains object with specified name. + + Name of the object to look for + true if object with given name is part of the collection otherwise false + + + + Removes specified object from the collection. + + + + + + Copies collection into the specified array. + + Array to copy collection to. + Starting index. + + + + Copies contained items to the Office2007RibbonTabItemColorTable array. + + Array to copy to. + + + + Returns reference to the object in collection based on it's index. + + + + + Returns reference to the object in collection based on it's index. + + + + + Defines the color table for RibbonTabItem states. + + + + + Gets or sets the name of the color table. + + + + + Gets or sets the default tab colors. + + + + + Gets or sets the selected tab colors. + + + + + Gets or sets the selected tab colors when mouse is over the tab. + + + + + Gets or sets the colors when mouse is over the tab but tab is not selected. + + + + + Gets or sets the round corner size for the top part of the ribbon tab item. + + + + + Defines collection for Office2007RibbonTabItemColorTable items. + + + + Creates new instance of the class. + + + + Adds new object to the collection. + + Object to add. + Index of newly added object. + + + + Inserts new object into the collection. + + Position of the object. + Object to insert. + + + + Returns index of the object inside of the collection. + + Reference to the object. + Index of the object. + + + + Returns whether collection contains specified object. + + Object to look for. + true if object is part of the collection, otherwise false. + + + + Returns whether collection contains object with specified name. + + Name of the object to look for + true if object with given name is part of the collection otherwise false + + + + Removes specified object from the collection. + + + + + + Copies collection into the specified array. + + Array to copy collection to. + Starting index. + + + + Copies contained items to the Office2007ButtonItemColorTable array. + + Array to copy to. + + + + Returns reference to the object in collection based on it's index. + + + + + Returns reference to the object in collection based on it's index. + + + + + Defines the colors for the RibbonTabItem state like but not limited to selected, mouse over etc. + + + + + Gets or sets the colors for the outer border. + + + + + Gets or sets the colors for the inner border. + + + + + Gets or sets the background colors. + + + + + Gets or sets the background highlight colors. + + + + + Gets or sets the text color. + + + + + Gets or sets the text color when rendered on Windows Glass. + + + + + Defines the colors for the scroll bar control. + + + + + Gets or sets the colors for the control default state. + + + + + Gets or sets the colors for the control when mouse is pressed over the control. + + + + + Gets or sets the colors for the control when mouse is over the control but not over an active part of the control like scroll buttons. + + + + + Gets or sets the colors for the control when mouse is over the active part of the control like scroll buttons. + + + + + Gets or sets the colors for the control when control is disabled. + + + + + Represents the color table for the Scroll bar in single state. + + + + + Gets or sets the outer border color for the scroll bar thumb. + + + + + Gets or sets the inner border color for the scroll bar thumb. + + + + + Gets or sets the thumb background color blend collection. + + + + + Gets or sets the directional sign background color for the scroll bar thumb. + + + + + Gets or sets the outer border color for the scroll bar track button. + + + + + Gets or sets the inner border color for the scroll bar track button. + + + + + Gets or sets the track background color blend collection. + + + + + Gets or sets the background color for the track signs. + + + + + Gets or sets the background colors for the entire control. + + + + + Gets or sets the border colors for the entire control. + + + + + Represents the color table for Office 2007 Style Side Bar Control. + + + + + Gets or sets the background color of the control. + + + + + Gets or sets the control border color. + + + + + Gets or sets the color of SideBarPanelItem text. + + + + + Gets or sets the color table for SideBarPanelItem in default state. + + + + + Gets or sets the color table for SideBarPanelItem in mouse over state. + + + + + Gets or sets the color table for SideBarPanelItem in expanded state. + + + + + Gets or sets the color table for SideBarPanelItem when mouse button is pressed on the item. + + + + + Gets or sets color table used by renderer. + + + + + Populates Office 2007 Color Table with Silver color scheme + + + + + Initializes ColorScheme object with the black color scheme. + + ColorScheme object to initialize. + + + + Defines the color table for the slider item. + + + + + Gets or sets the default state colors. + + + + + Gets or sets the mouse over state colors. + + + + + Gets or sets the mouse pressed colors. + + + + + Gets or sets the disabled colors. + + + + + Gets or sets the optional color table for Thumb part of the slider. When set to null default values from Office2007SliderColorTable are used. + + + + + Gets or sets the optional color table for Increase button part of the slider. When set to null default values from Office2007SliderColorTable are used. + + + + + Gets or sets the optional color table for Decrease button part of the slider. When set to null default values from Office2007SliderColorTable are used. + + + + + Defines set of color tables for single slider part. + + + + + Gets or sets the default state colors. + + + + + Gets or sets the mouse over state colors. + + + + + Gets or sets the mouse pressed colors. + + + + + Renders the Slider items. + + + + + Gets or sets color table used by renderer. + + + + + Defines the color table for the Slider Item in single state. + + + + + Gets or sets the part background colors. + + + + + Gets or sets the part border color + + + + + Gets or sets the part border light color + + + + + Gets or sets the part foreground color. + + + + + Gets or sets the part foreground light color. + + + + + Gets or sets the track line color. + + + + + Gets or sets the track line light color. + + + + + Gets or sets the track label color. + + + + + Gets or sets the track label color when on Slider control. + + + + + Defines the color table for the SuperTooltip. + + + + + Gets or sets the background colors. + + + + + Gets or sets the text color. + + + + + Represents color table for Office 2007 style system button displayed in form caption. + + + + + Gets or sets the color table of default button state. + + + + + Gets or sets the color table of button state when mouse is over the button. + + + + + Gets or sets the color table of button state when mouse is pressed over the button. + + + + + Represents color table for single state of Office 2007 style system button displayed in form caption. + + + + + Gets or sets the outer border colors. + + + + + Gets or sets the inner border colors. + + + + + Gets or sets top part background colors. + + + + + Gets or sets bottom part background colors. + + + + + Gets or sets highlight colors for the top background part. + + + + + Gets or sets highlight colors for the bottom background part. + + + + + Gets or sets the foreground color for the button. + + + + + Gets or sets the dark shading color for the foreground. + + + + + Gets or sets the light shading color for the foreground. + + + + + Represents the color table for the tab control. + + + + + Gets or sets the default tab item colors. + + + + + Gets or sets the mouse over tab item colors. + + + + + Gets or sets the selected tab item colors. + + + + + Gets or sets the color of the tab background colors. + + + + + Gets or sets the tab-strip background image. + + + + + Gets or sets the color of the tab panel background colors. + + + + + Gets or sets the color of tab panel border. + + + + + Represents the color table for the tab item. + + + + + Gets or sets top part background colors. + + + + + Gets or sets the bottom part background colors. + + + + + Gets or sets the outer border colors. + + + + + Gets or sets the inner border colors. + + + + + Gets or sets the text colors. + + + + + Paints background of docked bar. + + Context information + + + + Paints background of floating bar. + + Context information + + + + Paints background of popup bar. + + Context information + + + + Summary description for ButtonItemPainterHelper. + + + + + Provides data for ButtonItem rendering. + + + + + Gets or sets Graphics object group is rendered on. + + + + + Gets the reference to ButtonItem instance being rendered. + + + + + Reference to internal data. + + + + + Indicates whether to cancel system rendering of the item. + + + + + Creates new instance of the object. + + + + + Creates new instance of the object and initializes it with default values + + Reference to Graphics object. + Reference to ButtonItem object. + + + + Creates new instance of the object and initializes it with default values + + Reference to Graphics object. + Reference to ButtonItem object. + + + + Defines container for ribbon caption layout and quick access toolbar customization and overflow. + + + + + Summary description for DesignTimeProviderContainer. + + + + + + + + Returns insertion index for an item taking in account any system items that are at the end of the collection. + + Parent item + Returns the index at which an item should be inserted + + + + Defines delegate for RenderKeyTips event. + + + + + Defines delegate for RenderRibbonTabGroup event. + + + + + Defines delegate for RenderItemContainer event. + + + + + Defines delegate for RenderItemContainerSeparator event. + + + + + Defines delegate for ButtonItem rendering events. + + + + + Defines delegate for RibbonTabItem rendering events. + + + + + Defines delegate for toolbar rendering events. + + + + + Defines delegate for Rendering dialog launcher button rendering events. + + + + + Defines delegate for ColorItem rendering events. + + + + + Defines delegate for RibbonControl rendering events. + + + + + Defines delegate for SystemCaptionItem rendering events. + + + + + Defines delegate for MdiSystemItem rendering events. + + + + + Defines delegate for RenderFormCaptionBackground rendering events. + + + + + Defines delegate for CustomizeMenuPopup events. + + + + + Defines delegate for the Quick Access Overflow item rendering events. + + + + + Defines delegate for the Quick Access Customize item rendering events. + + + + + Defines delegate for the Quick Access Customization dialog events. + + + + + Defines delegate for the CheckBoxItem rendering events. + + + + + Defines delegate for the ProgressBarItem rendering events. + + + + + Defines delegate for the Navigation Pane rendering events. + + + + + Defines delegate for the BeforeRibbonPanelPopupClose event. + + + + + Defines delegate for the Slider item rendering events. + + + + + Defines delegate for the SideBar control rendering event. + + + + + Defines delegate for the SideBarPanelItem control rendering event. + + + + + Defines delegate for the SwitchButtonItem control rendering event. + + + + + Defines delegate for the Slider item rendering events. + + + + + Defines delegate for the StepItem rendering events. + + + + + Defines delegate for the ListBoxItem rendering events. + + + + + Defines delegate for the SideNavItem rendering events. + + + + + Defines delegate for the TabStrip rendering events. + + + + + Defines delegate for the TabParentForm rendering events. + + + + + Represents the class that provides Office 2007 style Gallery container with drop-down ability. + + + + + Creates new instance of the class + + + + + Returns copy of the item. + + + + + Copies the ButtonItem specific properties to new instance of the item. + + New ButtonItem instance. + + + + Returns the client rectangle which is DisplayRectangle excluding scroll-bar bounds + + + + + + Invokes GalleryPopupOpen event. + + + + + + Invokes GalleryPopupShowing event. + + + + + + Invokes GalleryPopupClose event. + + + + + + Invokes GalleryPopupFinalized event. + + + + + + Gets whether DefaultSize property is serialized by Windows Forms designer based on its current value. + + + + + Resets DefaultSize property to its default value. + + + + + Gets whether PopupGallerySize property is serialized by Windows Forms designer based on its current value. + + + + + Resets PopupGallerySize property to its default value. + + + + + Scrolls the gallery if necessary to ensures that item is visible. + + Reference to the items that is part of the gallery. + + + + Scrolls gallery down to show next line of items. + + + + + Scrolls gallery up to show previous line of items. + + + + + + Opens the Gallery popup menu. + + + + + Called on each item when ScaleControl method of parent control is called and gives opportunity to item to adjust its displayed based on current scaling. + + Scale factor. + + + + Returns whether Gallery can extend the object. + + Object to test extensibility for. + Returns true if object can be extended otherwise false. + + + + Gets the GalleryGroup item is assigned to. + + Reference to item. + An instance of GalleryGroup object or null if item is not assigned to the group + + + + Assigns the item to the gallery group. + + Item to assign. + Group to assign item to. Can be null to remove item assignment. + + + + Occurs when Gallery popup item is about to open. + + + + + Occurs just before Gallery popup window is shown. + + + + + Occurs before the Gallery popup item is closed. + + + + + Occurs after Gallery popup item has been closed. + + + + + Gets or sets orientation inside the container. GalleryContainer automatically manages the layout orientation and this property should not be changed from its default value. + + + + + Gets or sets the item alignment when container is in horizontal layout. Default value is Left. + + + + + Gets or sets the item vertical alignment. Default value is Top. + + + + + Gets or sets whether items in horizontal layout are wrapped into the new line when they cannot fit allotted container size. Default value is false. + + + + + Gets or sets whether items contained by container are resized to fit the container bounds. When container is in horizontal + layout mode then all items will have the same height. When container is in vertical layout mode then all items + will have the same width. Default value is true. + + + + + Gets or sets whether Gallery when on popup is using standard scrollbars to scroll the content. + Standard scrollbars are displayed on right hand side of the Gallery. Default value for this property is true. + When set to false the scroll buttons are displayed only when needed and two buttons on top and bottom + of the Gallery are used to indicate the scrolling possibility and enable scrolling. Buttons are only + visible when needed. This scrolling button style can be used for example on Application Menu + to enable scrolling of list of most recently used files. + + + + + Gets or sets whether gallery is using incremental sizing when stretched. Default + value is true. Incremental sizing will resize the width of the gallery so it fits + completely the items it can contain in available space. That means that gallery will + occupy enough space to display the whole items within available space. When set to + false, it indicates that gallery will resize to fill all available space. + + + + + Gets or sets whether Gallery width is determined based on the RibbonBar width. This property is in effect when + Gallery is hosted directly the RibbonBar control. Default value is false. + When set to true the Gallery size is changed as the RibbonBar control is resized. The initial size of the Gallery is + determined by DefaultSize property. The MinimumSize property specifies the minimum size of the Gallery. + Note that only single Gallery can be stretched per RibbonBar control. + + + + + Gets the collection of the items that are added to the popup gallery. The items displayed on the gallery are combined with the + items from this collection and they are displayed on the gallery popup. This collection can for example have items that are + customizing the choices of the commands in gallery etc. + + + + + Gets or sets the default size of the gallery. The gallery height will be always enforced so all scroll buttons can be displayed. + Gallery width should allow display of both scroll buttons and the gallery content. + + + + + Gets or sets the default size of the gallery when gallery is displayed on the popup menu. + + + + + Gets or sets whether gallery can be displayed on the popup. Default value is true. + + + + + Gets or sets a value indicating whether the item is expanded or not. For Popup items this would indicate whether the item is popped up or not. + + + + + Gets whether the Gallery popup is open. + + + + + Gets or sets the Key Tips access key or keys for the item when on Ribbon Control or Ribbon Bar. Use KeyTips property + when you want to assign the one or more letters to be used to access an item. For example assigning the FN to KeyTips property + will require the user to press F then N keys to select an item. Pressing the F letter will show only keytips for the items that start with letter F. + + + + + Gets or sets whether scroll animation is enabled. Default value is true. + Scroll animation will be disabled if gallery is running under Remote Windows Terminal session or fade animation effect is disabled on the + container control. + + + + + Gets the collection of GalleryGroup objects associated with this gallery. Groups are assigned optionally to one or more items + that are part of the GalleryContainer. Groups are used to visually group the items when gallery is displayed on the popup. + + + + + Represents the popup gallery group that groups set of items inside of gallery into the group. + + + + + Creates new instance of the object. + + + + + Gets or sets title of the group that will be displayed on the group label when on popup gallery. + + + + + Gets or sets name of the group that can be used to identify item from the code. + + + + + Gets the parent gallery for the group. + + + + + Gets or sets the display order for the group when displayed on the popup. Lower values are displayed closer to the top. Default value is 0. + + + + + Gets the collection of the items assigned to this group. + + + + + Represents the GalleryGroup typed collection. + + + + + Adds new object to the collection. + + Object to add. + Index of newly added object. + + + + Adds new objects to the collection. + + Array of groups to add. + + + + Inserts new object into the collection. + + Position of the object. + Object to insert. + + + + Returns index of the object inside of the collection. + + Reference to the object. + Index of the object. + + + + Returns whether collection contains specified object. + + Object to look for. + true if object is part of the collection, otherwise false. + + + + Removes specified object from the collection. + + + + + + Copies collection into the specified array. + + Array to copy collection to. + Starting index. + + + + Copies contained items to the GalleryGroup array. + + Array to copy to. + + + + Returns reference to the object in collection based on it's index. + + + + + Returns reference to the object in collection based on it's name. + + + + + Summary description for ISimpleElement. + + + + + Represents IBlock layout manager implementation + + + + + Resizes the content block and sets it's Bounds property to reflect new size. + + Content block to resize. + + + + Indicates container title location. + + + + + Provides data for rendering ItemContainer. + + + + + Gets or sets Graphics object group is rendered on. + + + + + Gets the reference to ItemContainer instance being rendered. + + + + + Creates new instance of the object. + + Reference to graphics object. + Reference to ItemContainer object. + + + + Provides data for the item separator rendering inside of the ItemContainer. + + + + + Gets or sets the reference to the item separator is being rendered for. + + + + + Creates new instance of the object. + + + + + Represents class for Accessibility support. + + + + + Creates new instance of the object and initializes it with owner control. + + Reference to owner control. + + + + Returns number of child objects. + + Total number of child objects. + + + + Returns reference to child object given the index. + + 0 based index of child object. + Reference to child object. + + + + Gets accessible role. + + + + + Gets parent accessibility object. + + + + + Returns bounds of the control. + + + + + Returns current accessible state. + + + + + Represents class for item display. + + + + + Represents canvas for KeyTips + + + + + Represents data for key tips rendering. + + + + + Gets or sets the graphics object used for rendering. + + + + + Gets or sets key tip bounds. + + + + + Gets or sets the text of key tip to be rendered. + + + + + Gets or sets the font key tip should be rendered with. + + + + + Reference object for which Key Tip is rendered. For example this could be reference to an instance of ButtonItem or BaseItem as well + as reference to System.Windows.Forms.Control object. Always test for type before accessing this reference. + + + + + Creates new instance of the object and initializes it with default values. + + + + + Represents painter for the MdiSystemItem. + + + + + Paints MdiSystemItem. + + Provides arguments for the operation. + + + + Required designer variable. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Gets or sets whether Text supports and renders text markup. Default value is true. + + + + + Gets or sets whether divider panel that divides message box buttons and text content is visible. Default value is true. + + + + + Gets or sets the anti-alias setting for text-pane. + + + + + Enumeration of available common system strings. + + + + + Represents the class that provides MessageBox like functionality with the styled Office 2007 dialog and text markup support. + + + + + Displays a message box with specified text. + + The text to display in the message box. + One of the DialogResult values. + + + + Displays a message box in front of the specified object and with the specified text. + + The IWin32Window the message box will display in front of. + The text to display in the message box. + One of the DialogResult values. + + + + Displays a message box with specified text and caption. + + The text to display in the message box. + The text to display in the title bar of the message box. + One of the DialogResult values. + + + + Displays a message box with specified text and caption. + + The IWin32Window the message box will display in front of. + The text to display in the message box. + The text to display in the title bar of the message box. + One of the DialogResult values. + + + + Displays a message box with specified text, caption, and buttons. + + The text to display in the message box. + The text to display in the title bar of the message box. + One of the MessageBoxButtons values that specifies which buttons to display in the message box. + One of the DialogResult values. + + + + Displays a message box with specified text, caption, and buttons. + + The IWin32Window the message box will display in front of. + The text to display in the message box. + The text to display in the title bar of the message box. + One of the MessageBoxButtons values that specifies which buttons to display in the message box. + One of the DialogResult values. + + + + Displays a message box with specified text, caption, buttons, and icon. + + The text to display in the message box. + The text to display in the title bar of the message box. + One of the MessageBoxButtons values that specifies which buttons to display in the message box. + One of the MessageBoxIcon values that specifies which icon to display in the message box. + One of the DialogResult values. + + + + Displays a message box with specified text, caption, buttons, and icon. + + The IWin32Window the message box will display in front of. + The text to display in the message box. + The text to display in the title bar of the message box. + One of the MessageBoxButtons values that specifies which buttons to display in the message box. + One of the MessageBoxIcon values that specifies which icon to display in the message box. + One of the DialogResult values. + + + + Displays a message box with the specified text, caption, buttons, icon, and default button. + + The text to display in the message box. + The text to display in the title bar of the message box. + One of the MessageBoxButtons values that specifies which buttons to display in the message box. + One of the MessageBoxIcon values that specifies which icon to display in the message box. + One of the MessageBoxDefaultButton values that specifies the default button for the message box. + One of the DialogResult values. + + + + Displays a message box with the specified text, caption, buttons, icon, and default button. + + The IWin32Window the message box will display in front of. + The text to display in the message box. + The text to display in the title bar of the message box. + One of the MessageBoxButtons values that specifies which buttons to display in the message box. + One of the MessageBoxIcon values that specifies which icon to display in the message box. + One of the MessageBoxDefaultButton values that specifies the default button for the message box. + One of the DialogResult values. + + + + Displays a message box with the specified text, caption, buttons, icon, and default button. + + The IWin32Window the message box will display in front of. + The text to display in the message box. + The text to display in the title bar of the message box. + One of the MessageBoxButtons values that specifies which buttons to display in the message box. + One of the MessageBoxIcon values that specifies which icon to display in the message box. + One of the MessageBoxDefaultButton values that specifies the default button for the message box. + Indicates value for Message Box dialog TopMost property. + One of the DialogResult values. + + + + Occurs when text markup link on Message Box is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + Gets or sets whether MessageBoxEx is using Windows System API function to retrieve the localized strings used by MessageBoxEx. Set this to false + if you experience issues when using MessageBoxEx under certain conditions. + + + + + Gets or sets whether MessageBoxEx form has Windows Vista Glass enabled if running on + Windows Vista with Glass enabled. Default value is true. + + + + + Gets or sets the anti-alias setting for message box text. + + + + + Gets or sets the text color for the message box text. Default value is Color.Empty which indicates that system colors are used. + + + + + Gets or sets whether divider panel that divides message box buttons and text content is visible. Default value is true. + + + + + Gets or sets the message box start position when Owner is not specified. Default value is CenterScreen. + + + + + Gets or sets the message box start position when Owner is specified. Default value is CenterParent. + + + + + Gets or sets whether message box text renders text markup. Default value is true. + + + + + Summary description for Office2003RibbonTabItemPainter. + + + + + Paints state of the button, either hot, pressed or checked + + + + + + + + Paints background of docked bar. + + Context information + + + + Paints background of floating bar. + + Context information + + + + Paints background of popup bar. + + Context information + + + + Gets or sets color table used by renderer. + + + + + Gets or sets color table used by renderer. + + + + + Gets or sets color table used by renderer. + + + + + Represents Office 2007 style MdiSystemItem painter + + + + + Gets or sets color table used by renderer. + + + + + Represents base class for Ribbon Control painting. + + + + + Paints controls background + + + + + Paints form caption background + + + + + Paints form caption text when ribbon control is displaying form caption + + + + + Paints the background of quick access toolbar. + + + + + Paints controls background + + + + + Paints form caption background + + + + + Paints the background of quick access toolbar. + + + + + RibbonTabItem painter for Office 2007 style + + + + + Represents the Office Application Button displayed in the top-left corner of the Ribbon Control. + + + + + Processes the Escape key when Application Button is hosting the backstage tab and uses it to close the tab if open. + This method is called from ProcessDialogKey method of Office2007RibbonForm. + + Key data + true if key was used to close backstage tab + + + + Gets or sets a value indicating whether the item is expanded or not. For Popup items this would indicate whether the item is popped up or not. + + + + + Gets or sets whether control set on BackstageTab property is used on application menu popup. + + + + + Gets or sets the backstage tab that is displayed instead of popup menu. + + + + + Summary description for PainterFactory. + + + + + Forces the creation of the objects inside of factory. + + + + + Required designer variable. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Loads the items for the customization into the ribbon control. All Ribbon Bars on the ribbon are enumerated and items + are added if they have CanCustomize=true. + + Ribbon control to enumerate. + + + + Loads the items for the customization from MetroTab control. Registered MetroToolbar controls are enumerated and items + are added if they have CanCustomize=true. + + MetroTab control that holds references to known MetroToolbars. + + + + Gets reference to the internal Quick Access Toolbar Customization panel. + + + + + Represents the item that provides Quick Access Toolbar customization. + + + + + Creates new instance of CustomizeItem object. + + + + + Returns copy of CustomizeItem item + + + + + Overridden. Recalculates the size of the item. + + + + + Gets localized tooltip text for this instance of the item. + + Tooltip text. + + + + Called when mouse hovers over the customize item. + + + + + Gets or sets whether Customize menu item is visible. + + + + + Gets/Sets informational text (tooltip) for the item. + + + + + Represents the Quick Access Toolbar customization panel which can be used on the custom QAT customization dialogs + so customization of Quick Access Toolbar can be reused. + + + + + Gets reference to the internal ItemPanel control that displays the commands for selected category. + + + + + Gets reference to the ItemPanel control that displays the Quick Access Toolbar Items. + + + + + Gets reference to the button that perform addition of commands to the Quick Access Toolbar. + + + + + Gets reference to the button that perform removal of commands from the Quick Access Toolbar. + + + + + Gets reference to the combo box control that holds all categories. + + + + + Gets reference to the combo box categories label control. + + + + + Gets reference to the check box that changes the placement of the Quick Access Toolbar. + + + + + Required designer variable. + + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Loads the items for the customization into the ribbon control. All Ribbon Bars on the ribbon are enumerated and items + are added if they have CanCustomize=true. + + Ribbon control to enumerate. + + + + Loads the items for the customization from MetroTab registered toolbars. All registered Toolbars are enumerated and items + are added if they have CanCustomize=true. + + MetroTab control to enumerate. + + + + Gets or sets the value of data changed flag. + + + + + Represents the stand-alone Quick Access Toolbar control + + + + + Returns the collection of items with the specified name. + + Item name to look for. + + + + + Returns the collection of items with the specified name and type. + + Item name to look for. + Item type to look for. + + + + + Returns the collection of items with the specified name and type. + + Item name to look for. + Item type to look for. + Indicates whether GlobalName property is used for searching. + + + + + Returns the first item that matches specified name. + + Item name to look for. + + + + + Gets/Sets the visual style for items and color scheme. + + + + + Returns collection of items on a bar. + + + + + Represents a single ribbon container control. + + + + + Creates new accessibility instance. + + Reference to AccessibleObject. + + + + Closes the RibbonBar overflow popup if control is in overflow mode and displays the overflow popup that shows complete content of the control. + + + + + Resets style to default value. Used by windows forms designer. + + + + + Invokes the LaunchDialog event to execute default launch dialog action. + + + + + Called when item on popup container is right-clicked. + + Instance of the item that is right-clicked. + + + + Invokes DialogLauncherMouseEnter event. + + + + + Invokes DialogLauncherMouseLeave event. + + + + + Invokes DialogLauncherMouseHover event. + + + + + Returns the collection of items with the specified name. + + Item name to look for. + + + + + Returns the collection of items with the specified name and type. + + Item name to look for. + Item type to look for. + + + + + Returns the first item that matches specified name. + + Item name to look for. + + + + + Returns the collection of items with the specified name and type. + + Item name to look for. + Item type to look for. + Indicates whether GlobalName property is used for searching. + + + + + Resets cached content size. Content size is cached to improve performance of the control when control is + switched into overflow mode displaying a single button. If you change content of Rendering, hide/show items or + add new items you will need to call this method to erase cached value and allow the full Rendering size to be calculated. + + + + + Returns size of the control based on current content size. + + Size based on content. + + + + Sets the height of the control to the automatically calculated height based on content. + + + + + Returns automatically calculated height of the control given current content. + + Height in pixels. + + + + Returns automatically calculated width of the control given current content. + + Width in pixels. + + + + Gets the bounds of the title. + + + + + Resets TitleStyle property to its default value. Used by Windows Forms designer for design-time support. + + + + + Resets TitleStyle property to its default value. Used by Windows Forms designer for design-time support. + + + + + Occurs when dialog launcher button in title bar is clicked. Use DialogLauncherVisible property to show the button in title bar. + + + + + Occurs when overflow button for control is created because control size is below the minimum size required to display complete content of the control. + This event allows you to get access to the internal overflow button that is created and change it's properties if required. + + + + + Occurs after overflow button setup is complete and all items contained by this control are moved to it. + + + + + Occurs before overflow button is destroyed. + + + + + Occurs when mouse enters dialog launcher button. + + + + + Occurs when mouse leaves dialog launcher button. + + + + + Occurs when mouse hovers over the dialog launcher button. + + + + + Occurs when mouse is pressed over the dialog launcher button. + + + + + Gets or sets parent button when on QAT. + + + + + Gets or sets whether this RibbonBar is on QAT. + + + + + Gets or sets whether Office 2007 Design Guidelines specification for positioning KeyTips is used. + + + + + Gets or sets the Accessible name for the Dialog Launcher button + + + + + Specifies the background style of the control when mouse is over the control. Style specified here will be applied to the + BackgroundStyle. + + + + + Gets or sets image that is used as dialog luncher button in ribbon title bar. Default value is null which indicates that + default appearance for the button is used. + + + + + Gets or sets image that is used as dialog luncher button when mouse is over the button. + Note that if this property is set you also must set the DialogLauncherButton property. Images set to both + properties must have same size. Default value is null which indicates that + default appearance for the button is used. + + + + + Gets or sets maximum text length for automatic overflow button text. When overflow button is created due to the + reduced size of the control text for the button can be specified using OverflowButtonText property. If + text is not specified RibbonBar.Text property is used as overflow button text. In that case + this property specifies maximum length of the text to display on the button. Default value is 25. You can set + this property to 0 to use complete text regardless of length. + + + + + Gets or sets resize order index of the control. When control is parented to RibbonPanel control (which is the case when control is + used as part of RibbonControl) index specified here indicates the order in which controls that are part of the same panel + are resized. Lower index value indicates that control should be resized later when size needs to be reduced or earlier when size needs + to be increased. Default value is 0. + + + + + Gets or sets whether automatic overflow handling is enabled. When overflow is enabled if control is resized below the + size that is needed to display its complete content overflow button is created and all content is moved to the overflow button + popup. Control will only display overflow button when in this state and user can click overflow button to display the actual + content of the control. + Default value is true. + + + + + Gets or sets the text for overflow button that is created when ribbon bar size is reduced so it cannot display all its content. + When control is resized so it cannot display its content overflow button is created which is displayed on face of the control. + Complete content of the control is then displayed on popup toolbar when user clicks overflow button. + + + + + Gets or sets the Image for overflow button that is created when ribbon bar size is reduced so it cannot display all its content. + When control is resized so it cannot display its content overflow button is created which is displayed on face of the control. + Complete content of the control is then displayed on popup toolbar when user clicks overflow button. This Image is also used when + RibbonBar is added to the Quick Access Toolbar to identify the RibbonBar button. + + + + + Gets or sets whether dialog launcher button is visible in title of the ribbon. Default value is false. + + + + + Gets or sets default layout orientation inside the control. You can have multiple layouts inside of the control by adding + one or more instances of the ItemContainer object and changing it's LayoutOrientation property. + + + + + Gets or sets spacing in pixels between items. Default value is 1. + + + + + Gets or sets whether items contained by container are resized to fit the container bounds. When container is in horizontal + layout mode then all items will have the same height. When container is in vertical layout mode then all items + will have the same width. Default value is true. + + + + + Gets or sets the item alignment when container is in horizontal layout. Default value is Left. + + + + + Gets or sets the item vertical alignment. Default value is Top. + + + + + Returns collection of items on a bar. + + + + + Gets or sets whether ribbon bar can be customized by end user i.e. added to Quick Access Toolbar. + + + + + Returns reference to the overflow button that is used by control. + + + + + Gets whether control is in overflow state or not. + + + + + Gets or sets whether ButtonItem objects hosted on control are resized to reduce the space consumed by ribbon bar when required. + Default value is true. + + + + + Indicates whether auto-sizing for RibbonBar includes ribbon bar title width so in case when ribbon bar title width is wider than ribbon bar width the + width of the ribbon bar will always be at least the title bar width so complete title text can be displayed. + + + + + Gets/Sets the visual style for items and color scheme. + + + + + Gets or sets the KeyTip for the dialog launcher button. + + + + + Gets or sets whether ribbon bar title is visible. Default value is true. + + + + + Specifies the style of the title of the control. + + + + + Specifies the style of the title of the control when mouse is over the control. + + + + + Gets the title bounds. + + + + + Gets or sets whether control changes its background when mouse is over the control. + + + + + Gets or sets whether external ButtonItem object is accepted in drag and drop operation. UseNativeDragDrop must be set to true in order for this property to be effective. + + + + + Gets or sets whether native .NET Drag and Drop is used by control to perform drag and drop operations. AllowDrop must be set to true to allow drop of the items on control. + + + + + + Defines event handler for overflow button events. + + Control that is hosting the overflow button. + Event arguments + + + + Represents event arguments for overflow button events. + + + + + Creates new instance of the class and initializes it. + + Reference to overflow button. + + + + Returns reference to the overflow button that is used by control. + + + + + Represents class for RibbonBar Accessibility support. + + + + + Creates new instance of the object and initializes it with owner control. + + Reference to owner control. + + + + Returns number of child objects. + + Total number of child objects. + + + + Returns reference to child object given the index. + + 0 based index of child object. + Reference to child object. + + + + Represents the container for RibbonBar objects that will be merged into the MDI parent ribbon control. + + + + + Represents panel used by RibbonTabItem as a container panel for the control. + + + + + Creates new instance of the panel. + + + + + Scrolls the RibbonBar controls to the right one step if there is more of the controls on the panel that can fit into the available space. + + + + + Scrolls the RibbonBar controls one step to the left. + + + + + Resets the panel scroll position. + + + + + Gets or sets whether default control layout is used instead of Rendering layout for RibbonBar controls positioning. By default + internal layout logic is used so proper resizing of Ribbons can be performed. You can disable internal layout by setting this property + to true. + Default value is false. + + + + + Indicates whether style of the panel is managed by tab control automatically. + Set this to true if you would like to control style of the panel. + + + + + Gets or sets TabItem that this panel is attached to. + + + + + Gets or sets whether last RibbonBar is stretched to fill available space inside of the panel. Default value is false. + + + + + Gets or sets which edge of the parent container a control is docked to. + + + + + Gets or sets the size of the control. + + + + + Gets or sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container. + + + + + Gets or sets a value indicating whether the control is displayed. + + + + + Gets or sets which edges of the control are anchored to the edges of its container. + + + + + Removes any RibbonBar objects that were merged into the Ribbon control. + + Reference to ribbon control to remove RibbonBar objects from. + + + + Merges RibbonBar objects from this container into the Ribbon control. + + Reference to ribbon control to remove RibbonBar objects from. + + + + Raises the BeforeRibbonMerge event. + + + + + Raises the AfterRibbonMerge event. + + + + + Raises the BeforeRibbonUnmerge event. + + + + + Raises the AfterRibbonUnmerge event. + + + + + Occurs before the RibbonBar objects from container are merged into the Ribbon control. + + + + + Occurs after the RibbonBar objects are merged into the Ribbon control. + + + + + Occurs after the RibbonBar objects are removed from the Ribbon control. + + + + + + Gets whether RibbonBar controls are merged into the RibbonControl. + + + + + Gets or sets whether RibbonTab item the RibbonBar controls are added to when merged is automatically activated (selected) after + controls are merged. Default value is true. + + + + + Gets or sets whether merge functionality is enabled for the container. Default value is true. + + + + + Gets or sets the Ribbon Tab text for the tab that will be created when ribbon bar objects from this container are merged into the ribbon. + + + + + Gets or sets the Key Tips access key or keys for the Ribbon Tab. Use KeyTips property + when you want to assign the one or more letters to be used to access an item. For example assigning the FN to KeyTips property + will require the user to press F then N keys to select an item. Pressing the F letter will show only keytips for the items that start with letter F. + + + + + Gets or sets the predefined color for the ribbon tab that is created when ribbon bar controls are merged into the ribbon. + Default value is eRibbonTabColor.Default + + + + + Gets or sets the name of RibbonTabItem object that already exists on Ribbon control into which the RibbonBar controls are merged. + If name is not specified new RibbonTabItem is created and RibbonBar controls are added to it. + + + + + Gets or sets the name of the RibbonTabItemGroup the new Ribbon Tab Item that is created will be added to. The RibbonTabItemGroup + must be created and added to RibbonControl.TabGroups collection. + + + + + Gets or sets the insertion index for the ribbon tab item that is created when ribbon bars are merged into the ribbon control. + Default value is -1 which means that ribbon tab item is appended to the existing ribbon tab items. + + + + + Gets or sets whether panel automatically provides shadows for child controls. + + + + + Represents Rendering control composed of two parts, RibbonStrip and multiple RibbonBar controls per strip. + + + + + Gets the name of the QAT Customize Item which is used to display the QAT Customize Dialog box. + + + + + Gets the name of the Add to Quick Access Toolbar context menu item. + + + + + Gets the name of the Remove from Quick Access Toolbar context menu item. + + + + + Gets the name of the QAT placement change context menu item. + + + + + Gets the name of the Minimize Ribbon Item which is used to minimize the ribbon. + + + + + Gets the name of the Maximize Ribbon Item which is used to maximize the ribbon. + + + + + Gets the name of the label displayed on Quick Access Toolbar customize popup menu. + + + + + Gets the string that is used as starting name for the frequently used QAT menu items created when QAT Customize menu is displayed. + + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Sets the height of the control to the automatically calcualted height based on content. + + + + + Sets the height of the control to the automatically calcualted height based on content. + + + + + Performs the setup of the RibbonPanel with the current style of the Ribbon Control. + + Panel to apply style changes to. + + + + Creates new Rendering Tab at specified position, creates new associated panel and adds them to the control. + + Specifies the text displayed on the tab. + Specifies the name of the tab + Specifies the position of the new tab inside of Items collection. + New instance of the RibbonTabItem that was created. + + + + Creates new Rendering Tab and associated panel and adds them to the control. + + Specifies the text displayed on the tab. + Specifies the name of the tab + New instance of the RibbonTabItem that was created. + + + + Recalculates layout of the control and applies any changes made to the size or position of the items contained. + + + + + Returns Control region if any when control is hosted by Office2007RibbonForm + + + + + + Occurs when text markup link is clicked. + + + + + Resets DefaultGroupFont property to default value null. + + + + + Raises the BeforeRibbonPanelPopupClose event. + + + + + Raises the AfterRibbonPanelPopupClose event. + + + + + Raises the BeforeRibbonPanelPopup event. + + + + + + Raises the BeforeRibbonPanelPopup event. + + + + + + Sets up timer that watches when active window changes. + + + + + Called after change of active window has been detected. SetupActiveWindowTimer must be called to enable detection. + + + + + Releases and disposes the active window watcher timer. + + + + + Displays the active ribbon panel on the popup if ribbon control is collapsed. + + Reference to the object that was cause of the event. This is provided to the BeforeRibbonPanelPopupClose event if an menu needs to be closed. + Indicates the event source. This is provided to the BeforeRibbonPanelPopupClose event if an menu needs to be closed. + + + + Closes the Ribbon tab menu with source set to null and event source set to Code. + + + + + Closes the Ribbon Menu if one is currently displayed. + + + + + Suspends the form layout. + + + + + Suspends the form layout. + + + + + Suspends the form layout. + + + + + Selects first visible RibbonTab. + + Returns true if selection is performed otherwise false. + + + + Called when right-mouse button is pressed over RibbonBar + + Reference to RibbonBar object. + + + + Called when right-mouse button is pressed over RibbonStrip + + Reference to RibbonStrip object. + + + + Displays popup customize context menu for given customization object. + + Object that should be customized, usually an instance of BaseItem. + Indicates whether customize menu is displayed over ribbon strip + + + + Raises the QatPlacementChanged event. + + Event arguments. + + + + Removes an item from the Quick Access Toolbar. + + Reference to the item that is already part of Quick Access Toolbar. + + + + Adds an instance of base type BaseItem or RibbonBar to the Quick Access Toolbar. Note that this method creates + new instance of the item or an representation of the item being added and adds that to the Quick Access Toolbar. + + Reference to the item to add, must be an BaseItem type or RibbonBar type. + + + + Raises the BeforeCustomizeMenuPopup event. + + Event arguments + + + + Raises the BeforeAddItemToQuickAccessToolbar event. + + Event arguments. + + + + Shows the quick access toolbar customize dialog. + + + + + Applies the Quick Access Toolbar customization changes made on QatCustomizePanel to the Ribbon Control Quick Access Toolbar. Note that QatCustomizePanel.DataChanged property indicates whether user made any changes to the data on the panel. + + Reference to the QatCustomizePanel + + + + Raises the AfterQatDialogChangesApplied event. + + + + + Returns the ribbon Application Button. + + reference to Application Button or null if button is not found. + + + + Occurs when Quick Access Toolbar placement is changed, i.e. below or above the Ribbon. + + + + + Occurs just before the customize popup menu is displayed and provides the ability to cancel the menu display as well + as to add/remove the menu items from the customize popup menu. + + + + + Occurs before an item is added to the quick access toolbar as result of user action. This event provides ability to + cancel the addition of the item by setting the Cancel=true of event arguments. + + + + + Occurs before an item is removed from the quick access toolbar as result of user action. This event provides ability to + cancel the addition of the item by setting the Cancel=true of event arguments. + + + + + Occurs when DotNetBar is looking for translated text for one of the internal text that are + displayed on menus, toolbars and customize forms. You need to set Handled=true if you want + your custom text to be used instead of the built-in system value. + + + + + Occurs when Item on ribbon tab strip or quick access toolbar is clicked. + + + + + Occurs before Quick Access Toolbar dialog is displayed. This event provides the opportunity to cancel the showing of + built-in dialog and display custom customization dialog. You can also set the Dialog property of the event arguments to + the custom dialog you want used instead of the DotNetBar system customization dialog. + + + + + Occurs after the Quick Access Toolbar dialog is closed. + + + + + Occurs after any changes done on the Quick Access Toolbar dialog are applied to the actual Quick Access Toolbar. + + + + + Occurs after selected Ribbon tab has changed. You can use + RibbonControl.SelectedRibbonTabItem + property to get reference to newly selected tab. + + + + + Occurs before selected RibbonPanel is displayed on popup while ribbon is collapsed. This event gives you the opportunity to cancel the popup of the ribbon panel. + + + + + Occurs after selected RibbonPanel is displayed on popup while ribbon is collapsed. + + + + + Occurs before RibbonPanel popup is closed and provides opportunity to cancel the closing. Note that if you cancel closing of ribbon popup you are + responsible for closing the popup. + + + + + Occurs after RibbonPanel popup is closed. + + + + + Occurs when text markup link from TitleText markup is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + Occurs after Expanded property has changed. + + + + + Gets the collection of the Quick Access Toolbar Frequently used commands. You should add existing buttons to this collection that + you already have on the RibbonBar controls or on the application menu. The list will be used to construct the frequently used + menu that is displayed when Customize Quick Access Toolbar menu is displayed and it allows end-user to remove and add these + frequently used commands to the QAT directly from this menu. + Note that items you add here should not be items that are already on Quick Access Toolbar, i.e. in RibbonControl.QuickToolbarItems collection. + + + + + Gets or sets whether KeyTips functionality is enabled. Default value is true. + + + + + Gets or sets whether merge functionality is enabled for the control. Default value is true. + + + + + Gets or sets whether control height is set automatically based on the content. Default value is false. + + + + + Gets or sets whether anti-alias smoothing is used while painting. Default value is false. + + + + + + Gets or sets the Context menu bar associated with the this control which is used as part of Global Items feature. The context menu + bar assigned here will be used to search for the items with the same Name or GlobalName property so global properties can be propagated when changed. + You should assign this property to enable the Global Items feature to reach your ContextMenuBar. + + + + + Gets or sets whether custom caption and quick access toolbar provided by the control is visible. Default value is false. + This property should be set to true when control is used on Office2007RibbonForm. + + + + + Gets or sets the font for the form caption text when CaptionVisible=true. Default value is NULL which means that system font is used. + + + + + Gets or sets the explicit height of the caption provided by control. Caption height when set is composed of the TabGroupHeight and + the value specified here. Default value is 0 which means that system default caption size is used. + + + + + Gets or sets the indent of the ribbon strip. The indent setting is useful when control is used with caption visible and the Office 2007 + style start button. The indent specified here will move the ribbon strip so the start button does not overlap the tabs. + Value of this property is used only when CaptionVisible = true. + Default value is 46. + + + + + Gets or sets the font used by the ribbon strip. + + + + + Gets or sets whether mouse over fade effect is enabled. Default value is true. + + + + + Gets or sets the font that is used to display Key Tips (accelerator keys) when they are displayed. Default value is null which means + that control Font is used for Key Tips display. + + + + + Collection of RibbonTabItemGroup items. Groups are assigned optionally to one or more RibbonTabItem object through the RibbonTabItem.Group + property to visually group tabs that belong to same functions. These tabs should be positioned next to each other. + + + + + Gets or sets the height in pixels of tab group line that is displayed above the RibbonTabItem objects that have group assigned. + Default value is 10 pixels. To show tab groups you need to assign the RibbonTabItem.Group property and set TabGroupsVisible=true. + + + + + Gets or sets whether tab group line that is displayed above the RibbonTabItem objects that have group assigned is visible. + Default value is false. To show tab groups you need to assign the RibbonTabItem.Group property and set TabGroupsVisible=true. Use TabGroupHeight + property to control height of the group line. + + + + + Gets or sets default font for tab groups. This font will be used if font is not specified by group style element. + + + + + Specifies the background style of the control. + + + + + Gets or sets the currently selected RibbonTabItem. RibbonTabItems are selected using the Checked property. Only a single + RibbonTabItem can be selected (Checked) at any given time. + + + + + Returns reference to internal ribbon strip control. + + + + + Returns collection of items on a bar. + + + + + Returns collection of quick toolbar access and caption items. + + + + + Gets/Sets the visual style of the control. If you are changing style to Office 2007 or Office 2010 use RibbonPredefinedColorSchemes.ChangeStyle method instead to ensure + all controls are switched properly. + + + + + Indicates whether control automatically updates Padding property for the ribbon and RibbonPanel based on style. Default value is true. + + + + + Gets or sets the Office 2007 Renderer global Color Table. Setting this property will affect all controls on the form that are using Office 2007 global renderer. + + + + + Gets whether collapsed ribbon is displaying the selected ribbon panel as popup. + + + + + Gets or sets whether mouse wheel scrolls through the ribbon tabs. Default value is true. + + + + + Gets or sets whether control is expanded or not. When control is expanded both the tabs and the tab ribbons are visible. When collapsed + only tabs are visible. + + + + + Gets or sets whether control is collapsed when RibbonTabItem is double clicked and expanded when RibbonTabItem is clicked. + Default value is true. + + + + + Gets or sets whether control is collapsed/expanded when Ctrl+F1 key is clicked. + Default value is true. + + + + + ImageList for images used on Items. Images specified here will always be used on menu-items and are by default used on all Bars. + + + + + ImageList for medium-sized images used on Items. + + + + + ImageList for large-sized images used on Items. + + + + + Gets or sets a value indicating whether the user can give the focus to this control using the TAB key. Default value is false. + + + + + Indicates the position of the BackgroundImage + + + + + Specifies whether the MDI system buttons are displayed in ribbon strip when MDI Child window is maximized. + + + + + Gets or sets whether Ribbon control employs the Windows Vista Glass support when available. This is managed automatically by Ribbon Control and + no setting is necessary on your part. + + + + + Indicates Quick Access Toolbar height when positioned below the Ribbon. Default value of 0 indicates auto-height. + + + + + Gets or sets whether control can be customized and items added by end-user using context menu to the quick access toolbar. + Caption of the control must be visible for customization to be enabled. Default value is true. + + + + + Gets or sets whether external implementation for ribbon bar and menu item customization will be used for customizing the ribbon control. When set to true + it enables the displaying of RibbonBar and menu item context menus which allow customization. You are responsible for + adding the menu items to context menu to handle all aspects of item customization. See "Ribbon Control Quick Access Toolbar Customization" topic in help file under How To. + Default value is false. + + + + + Gets or sets whether end-user customization of the placement of the Quick Access Toolbar is enabled. User + can change the position of the Quick Access Toolbar using the customize menu. Default value is true. + + + + + Gets or sets whether customize dialog is used to customize the quick access toolbar. You can handle the EnterCustomize event + to display your custom dialog instead of built-in dialog for customization. Default value is true. + + + + + Gets or sets the categorization mode for the items on Quick Access Toolbar customize dialog box. Default value categorizes + items by the ribbon bar they appear on. + + + + + Gets or sets whether Quick Access toolbar is positioned below the ribbon. + + + + + Gets or sets the Quick Access Toolbar layout description. You can use the value obtained from this property to save + the customized Quick Access Toolbar into registry or into any other storage object. You can also set the saved layout description back + to restore user customize layout. + + + + + Gets or sets whether Quick Access Toolbar has been customized by end-user. You can use value of this property to determine + whether Quick Access Toolbar layout that can be accessed using QatLayout property should be saved. + + + + + Gets the reference to the ribbon localization object which holds all system text used by the component. + + + + + Provides data for RibbonBar rendering events. + + + + + Gets or sets the reference to Graphics object. + + + + + Gets or sets the part bounds. + + + + + Gets or sets the reference to RibbonBar. + + + + + Gets or sets whether mouse over state should be painted for the ribbon bar part. + + + + + Gets or sets whether mouse is pressed over the ribbon part. + + + + + Gets or sets the region that defines the content bounds. When background is rendered the renderer should set this property + to define the content clip. + + + + + Creates new instance of the object and initializes it with default values. + + Reference to Graphics object. + Bounds of the part to be rendered. + Reference to ribbon bar. + + + + Represents the class that stores text used by ribbon control only for localization purposes. + + + + + Gets or sets the title text of the Quick Access Toolbar Customize dialog form. + + + + + Gets or sets the text of the "Place Quick Access Toolbar below the Ribbon" check-box on the Quick Access Toolbar Customize dialog form. + + + + + Gets or sets the text of the Choose commands from label on the Quick Access Toolbar Customize dialog form. + + + + + Gets or sets the text of the Remove button on the Quick Access Toolbar Customize dialog form. + + + + + Gets or sets the text of the Add button on the Quick Access Toolbar Customize dialog form. + + + + + Gets or sets the text of the OK button on the Quick Access Toolbar Customize dialog form. + + + + + Gets or sets the text of the Cancel button on the Quick Access Toolbar Customize dialog form. + + + + + Gets or sets the text that is used on context menu used to customize Quick Access Toolbar. + + + + + Gets or sets the text that is used on context menu used to customize Quick Access Toolbar. + + + + + Gets or sets the text that is used on context menu used to customize Quick Access Toolbar. + + + + + Gets or sets the text that is used on Quick Access Toolbar customize menu label. + + + + + Gets or sets the text that is used on context menu used to change placement of the Quick Access Toolbar. + + + + + Gets or sets the text that is used on context menu used to change placement of the Quick Access Toolbar. + + + + + Gets or sets the text that is used on context menu item used to minimize the Ribbon. + + + + + Gets or sets the text that is used on context menu item used to maximize the Ribbon. + + + + + Represents ribbon overflow button. + + + + + Gets or sets the ribbon bar control overflow button is displayed on. + + + + + Represents predefined color schemes for ribbon controls. + + + + + Applies default gray color scheme to background and title. + + Reference to object. + + + + Applies orange color scheme to background and title. + + Reference to object + + + + Apply Office 2003 color scheme to background and title. + + Reference to object + + + + Applies Office 2003 color scheme to ribbon control background. + + Reference to object. + + + + Applies Gray color scheme to ribbon control background. + + Reference to object. + + + + Applies Office 2007 color table to ribbon control background. + + Reference to object. + + + + Applies Office 2007 Luna blue color scheme to the Ribbon Bar. + + Reference to object. + + + + Applies specified style to Ribbon control and all other controls that are managed by the ribbon control. + This method is useful for example when switching the color tables for Office 2007 renderer. Once + the GlobalManager.Renderer color table is changed you can call this method to apply color table + changes to the Ribbon Control and other controls managed by it. + + RibbonControl to set the style on. + Visual style to apply. + + + + Applies specified visual style to the RibbonBar control. + + RibbonBar control to set the style on. + Visual style to apply. + + + + Applies current color scheme and layout settings to the container which acts as top-level file menu container. + Applies to Office 2007 style only. + + Container to apply style to. + + + + Applies current color scheme and layout properties to the two column menu container used by the top-level file menu. + Applies to Office 2007 style only. + + Container to apply style to. + + + + Applies current color scheme and layout properties to the first column menu container used by the top-level file menu. + This column usually contains menu items. + Applies to Office 2007 style only. + + Container to apply style to. + + + + Applies current color scheme and layout properties to the first column menu container used by the top-level file menu. + This column usually contains most recently used list of files or documents. + Applies to Office 2007 style only. + + Container to apply style to. + + + + Applies current color scheme and layout properties to the bottom menu container used by the top-level file menu. + This container usually contains Options and Exit buttons. + Applies to Office 2007 style only. + + Container to apply style to. + + + + Changes the Office 2007 color table for all DotNetBar controls on the open forms that are tracked by Application.OpenForms collection. You can use this function for example to + apply Black color scheme to all DotNetBar control on all open forms. The color table will be changed only for controls that + have Office 2007 style. Any other style will be unchanged. + + Color table to select and apply. + + + + Applies current Office 2007 style color table set on GlobalManager.Renderer to all DotNetBar controls with Office 2007 style on all open forms. + + + + + Changes the Office 2007 color table for all DotNetBar controls on the form. You can use this function for example to + apply Black color scheme to all DotNetBar control on given form. The color table will be changed only for controls that + have Office 2007 style. Any other style will be unchanged. + + Form to apply color table to. + Color table to select and apply. + + + + Generates and Changes the Office 2007 color table for all DotNetBar controls on the form. You can use this function for example to + create custom color scheme based on the base color and apply it to all DotNetBar control on given form. The new color table will be applied only to controls that + have Office 2007 style. Any other style will be unchanged. + + Form to apply color table to. + Base color table to use for creation of custom color table that will be applied. + Base color used to create custom color table. + + + + Generates and Changes the Office 2007 color table for all DotNetBar controls on all open forms. You can use this function for example to + create custom color scheme based on the base color and apply it to all DotNetBar control on given form. The new color table will be applied only to controls that + have Office 2007 style. Any other style will be unchanged. + + Base color table to use for creation of custom color table that will be applied. + Base color used to create custom color table. + + + + Applies current Office 2007 style color table to all DotNetBar controls on the form. + + Reference to the form or parent control that contains DotNetBar controls you would like to apply color table to. + + + + Changes style for all controls on Application.OpenForms to specified style. Use this method to change the style for all controls to Office 2007 or Office 2010 styles only. + + New style to assign to controls on forms. + + + + Changes style for all controls on Application.OpenForms to specified style. Use this method to change the style for all controls to Office 2007 or Office 2010 styles only. + + New style to assign to controls on forms. + Color used to blend with the base color scheme. + + + + Changes style for all controls on a form to specified style. Use this method to change the style for all controls to Office 2007 or Office 2010 styles only. + + New style to assign to controls. + Form or Control to process. + + + + Changes style for all controls on a form to specified style. Use this method to change the style for all controls to Office 2007 or Office 2010 styles only. + + New style to assign to controls. + Form or Control to process. + Color used to blend with the base color scheme. + + + + Changes the Office 2010 color table for all DotNetBar controls on the form. You can use this function for example to + apply Black color scheme to all DotNetBar control on given form. The color table will be changed only for controls that + have Office 2007 and 2010 style. Any other style will be unchanged. + + Form to apply color table to. + Color table to select and apply. + + + + Generates and Changes the Office 2010 color table for all DotNetBar controls on the form. You can use this function for example to + create custom color scheme based on the base color and apply it to all DotNetBar control on given form. The new color table will be applied only to controls that + have Office 2007 and 2010 style. Any other style will be unchanged. + + Form to apply color table to. + Base color table to use for creation of custom color table that will be applied. + Base color used to create custom color table. + + + + Generates and Changes the Office 2010 color table for all DotNetBar controls on all open forms. You can use this function for example to + create custom color scheme based on the base color and apply it to all DotNetBar control on given form. The new color table will be applied only to controls that + have Office 2007 and 2010 style. Any other style will be unchanged. + + Base color table to use for creation of custom color table that will be applied. + Base color used to create custom color table. + + + + Changes the Windows 7 color table for all DotNetBar controls on the form. You can use this function for example to + apply Black color scheme to all DotNetBar control on given form. The color table will be changed only for controls that + have Windows 7, Office 2007, 2010 style. Any other style will be unchanged. + + Form to apply color table to. + Color table to select and apply. + + + + Generates and Changes the Windows 7 color table for all DotNetBar controls on the form. You can use this function for example to + create custom color scheme based on the base color and apply it to all DotNetBar control on given form. The new color table will be applied only to controls that + have Windows 7, Office 2007 and 2010 style. Any other style will be unchanged. + + Form to apply color table to. + Base color table to use for creation of custom color table that will be applied. + Base color used to create custom color table. + + + + Generates and Changes the Windows 7 color table for all DotNetBar controls on all open forms. You can use this function for example to + create custom color scheme based on the base color and apply it to all DotNetBar control on given form. The new color table will be applied only to controls that + have Windows 7, Office 2007 and 2010 style. Any other style will be unchanged. + + Base color table to use for creation of custom color table that will be applied. + Base color used to create custom color table. + + + + Defines the Ribbon Quick Access Overflow system item. Used internally by Ribbon control. + + + + + Returns copy of DisplayMoreItem item + + + + + Overriden. Draws the item. + + Target Graphics object. + + + + Returns the insertion index for the items removed from overflow popup. Assumes that right-most items are removed first by the layout manager. + + + + + + Represents RibbonStrip control internally used by RibbonControl. + + + + + Occurs when text markup link is clicked. + + + + + Resets DefaultGroupFont property to default value null. + + + + + Returns automatically calculated height of the control given current content. + + Height in pixels. + + + + Returns the collection of items with the specified name. + + Item name to look for. + + + + + Returns the collection of items with the specified name and type. + + Item name to look for. + Item type to look for. + + + + + Returns the collection of items with the specified name and type. + + Item name to look for. + Item type to look for. + Indicates whether GlobalName property is used for searching. + + + + + Returns the first item that matches specified name. + + Item name to look for. + + + + + Called when ShowKeyTips on RibbonBar contained by this Ribbon is set to true + + + + + Forces the control to exit Ribbon Key-Tips mode. + + + + + Called when item on popup container is right-clicked. + + Instance of the item that is right-clicked. + + + + Returns true if point is inside the caption area. + + Client point coordinates. + True if point is inside of caption area otherwise false. + + + + Occurs when text markup link from TitleText markup is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + Gets or sets whether RibbonStrip control employs the Windows Vista Glass support when available. This is managed automatically by Ribbon Control and + no setting is necessary on your part. + + + + + + Gets reference to parsed markup body element if text was markup otherwise returns null. + + + + + Gets or sets whether KeyTips functionality is enabled. Default value is true. + + + + + Gets or sets whether control can be customized and items added by end-user using context menu to the quick access toolbar. + Caption of the control must be visible for customization to be enabled. Default value is true. + + + + + Gets or sets the explicit height of the caption provided by control. Caption height when set is composed of the TabGroupHeight and + the value specified here. Default value is 0 which means that system default caption size is used. + + + + + Gets or sets whether custom caption line provided by the control is visible. Default value is false. + This property should be set to true when control is used on Office2007RibbonForm. + + + + + Gets or sets the font for the form caption text when CaptionVisible=true. Default value is NULL which means that system font is used. + + + + + Gets or sets the indent of the ribbon strip. The indent setting is useful when control is used with caption visible and the Office 2007 + style start button. The indent specified here will move the ribbon strip so the start button does not overlap the tabs. + Value of this property is used only when CaptionVisible = true. + Default value is 46. + + + + + Gets or sets the height in pixels of tab group line that is displayed above the RibbonTabItem objects that have group assigned. + Default value is 14 pixels. To show tab groups you need to assign the RibbonTabItem.Group property and set TabGroupsVisible=true. + + + + + Gets or sets whether tab group line that is displayed above the RibbonTabItem objects that have group assigned is visible. + Default value is false. To show tab groups you need to assign the RibbonTabItem.Group property and set TabGroupsVisible=true. Use TabGroupHeight + property to control height of the group line. + + + + + Collection of RibbonTabItemGroup items. Groups are assigned optionally to one or more RibbonTabItem object through the RibbonTabItem.Group + property to visually group tabs that belong to same functions. These tabs should be positioned next to each other. + + + + + Gets/Sets the visual style of the control. + + + + + Returns collection of items on a bar. + + + + + Returns currently selected RibbonTabItem. RibbonTabItems are selected using the Checked property. Only a single + RibbonTabItem can be Checked at any given time. + + + + + Gets or set whether TabGroup painting is suspended. + + + + + Gets or sets default font for tab groups. This font will be used if font is not specified by group style element. + + + + + Gets or sets whether control is collapsed when RibbonTabItem is double clicked and expanded when RibbonTabItem is clicked. + + + + + Gets or sets whether control is collapsed when RibbonTabItem is double clicked and expanded when RibbonTabItem is clicked. + + + + + Gets or sets whether F10 key is ignored as way to set KeyTips focus to Ribbon. + + + + + Gets whether Ribbon is in key-tips mode including its child controls. + + + + + Returns collection of items on a bar. + + + + + Gets the reference to the internal container item for the items displayed in control caption. + + + + + Gets the reference to the internal container for the ribbon tabs and other items. + + + + + Defines the internal container item for the ribbon strip control. + + + + + Creates new instance of the class and initializes it with the parent RibbonStrip control. + + Reference to parent RibbonStrip control + + + + Paints this base container + + + + + Returns copy of GenericItemContainer item + + + + + Return Sub Item at specified location + + + + + Gets whether Metro Backstage application menu is open. + + + + + Gets reference to internal ribbon strip container that contains tabs and/or other items. + + + + + Gets reference to internal caption container item that contains the quick toolbar, start button and system caption item. + + + + + Gets or sets a value indicating whether the item is expanded or not. For Popup items this would indicate whether the item is popped up or not. + + + + + When parent items does recalc size for its sub-items it should query + image size and store biggest image size into this property. + + + + + Provides data for RenderRibbonTabGroup event. + + + + + Gets or sets Graphics object group is rendered on. + + + + + Gets or sets RibbonTabItemGroup being rendered. + + + + + Gets or sets the bounds of the tab group. Bounds specified here are bounds of the tab group title. GroupBounds contains the bounds + that include all tabs that belong to the tab group. + + + + + Gets or sets the font that should be used to render group text. + + + + + Gets or sets group bounds including the tabs that belong to the group. + + + + + Gets or sets the effective style for the group. + + + + + Gets whether Windows Vista glass is enabled. + + + + + Represents Rendering Tab used on RibbonControl. + + + + + Selects the tab. + + + + + Resets Group property to default value null. + + + + + Called after Checked property has changed. + + + + + Occurs just before Click event is fired. + + + + + Occurs when the item is clicked. This is used by internal implementation only. + + + + + Called when Visibility of the items has changed. + + New Visible state. + + + + Occurs after item visual style has changed. + + + + + Gets or sets whether tab renders its state. Used internally by DotNetBar. Do not set. + + + + + Gets or sets the additional padding added around the tab item in pixels. Default value is 0. + + + + + Gets or sets whether size of the tab has been reduced below the default calculated size. + + + + + Gets or sets the predefined color of item. Color specified here applies to items with Office 2007 style only. It does not have + any effect on other styles. Default value is eRibbonTabColor.Default + + + + + Gets or sets the group this tab belongs to. Groups are optional classification that is used to + visually group tabs that belong to same functions. These tabs should be positioned next to each other. + + + + + Gets or sets the panel assigned to this ribbon tab item. + + + + + Gets or set the Group item belongs to. The groups allows a user to choose from mutually exclusive options within the group. The choice is reflected by Checked property. + + + + + Returns the collection of sub items. + + + + + Indicates whether the item will auto-collapse (fold) when clicked. + When item is on popup menu and this property is set to false, menu will not + close when item is clicked. + + + + + Indicates whether the item will auto-expand when clicked. + When item is on top level bar and not on menu and contains sub-items, sub-items will be shown only if user + click the expand part of the button. Setting this propert to true will expand the button and show sub-items when user + clicks anywhere inside of the button. Default value is false which indicates that button is expanded only + if its expand part is clicked. + + + + + Gets or sets whether item can be customized by end user. + + + + + Gets or set a value indicating whether the button is in the checked state. + + + + + Gets or sets whether Click event will be auto repeated when mouse button is kept pressed over the item. + + + + + Gets or sets the auto-repeat interval for the click event when mouse button is kept pressed over the item. + + + + + Gets or sets a value indicating whether the item is enabled. + + + + + Indicates item's visiblity when on pop-up menu. + + + + + Indicates when menu items are displayed when MenuVisiblity is set to VisibleIfRecentlyUsed and RecentlyUsed is true. + + + + + Indicates Animation type for Popups. + + + + + Indicates the font that will be used on the popup window. + + + + + Indicates whether sub-items are shown on popup Bar or popup menu. + + + + + Specifies the inital width for the Bar that hosts pop-up items. Applies to PopupType.Toolbar only. + + + + + Gets or sets whether item will display sub items. + + + + + Gets or sets whether the item expands automatically to fill out the remaining space inside the container. Applies to Items on stretchable, no-wrap Bars only. + + + + + Gets or sets the width of the expand part of the button item. + + + + + Gets or set the alternative shortcut text. + + + + + Gets or sets whether item separator is shown before this item. + + + + + Returns category for this item. If item cannot be customzied using the + customize dialog category is empty string. + + + + + Gets or sets the text color of the button when mouse is over the item. + + + + + Indicates the way item is painting the picture when mouse is over it. Setting the value to Color will render the image in gray-scale when mouse is not over the item. + + + + + Gets or sets the text color of the button. + + + + + Represents a group RibbonTabItem objects are assigned to. + + + + + Selected first tab that is part of this group. + + + + + Gets or sets the predefined color of the group. Color specified here applies to groups with Office 12 style only. It does not have + any effect on other styles. Default value is eRibbonTabGroupColor.Default + + + + + Gets or sets the custom color name. Name specified here must be represented by the coresponding object with the same name that is part + of the Office2007ColorTable.RibbonTabGroupColors collection. See documentation for Office2007ColorTable.RibbonTabGroupColors for more information. + If color table with specified name cannot be found default color will be used. Valid settings for this property override any + setting to the Color property. + + + + + Gets the style for tab group. + + + + + Gets or sets title of the group that will be displayed when group is visually represented. + + + + + Gets or sets parent ribbon strip for this group. + + + + + Gets or sets whether RibbonTabItem objects that belong to this group are visible. Setting this property will + show/hide all RibbonTabItem objects that are assigned to this group through RibbonTabItem.Group property. + + + + + Gets whether any tab from this tab group is selected. + + + + + Gets or sets name of the group that can be used to identify item from the code. + + + + + Gets an array of Rectangle objects that describe the visual position on the ribbon control of the group titles displayed. + If tabs that belong to a tab group are not next to each other then there will be multiple rectangle returned as part of the array + for each tab group that is apart. + + + + + Collection of RibbonTabItemGroup objects. + + + + + Adds new object to the collection. + + Object to add. + Index of newly added object. + + + + Adds new objects to the collection. + + Array of groups to add. + + + + Inserts new object into the collection. + + Position of the object. + Object to insert. + + + + Returns index of the object inside of the collection. + + Reference to the object. + Index of the object. + + + + Returns whether collection contains specified object. + + Object to look for. + true if object is part of the collection, otherwise false. + + + + Removes specified object from the collection. + + + + + + Copies collection into the specified array. + + Array to copy collection to. + Starting index. + + + + Copies contained items to the RibbonTabItemGroup array. + + Array to copy to. + + + + Returns reference to the object in collection based on it's index. + + + + + Returns reference to the object in collection based on it's name. + + + + + Provides data for ButtonItem rendering. + + + + + Gets or sets Graphics object group is rendered on. + + + + + Gets the reference to ButtonItem instance being rendered. + + + + + Reference to internal data. + + + + + Creates new instance of the object. + + + + + Creates new instance of the object and initializes it with default values + + Reference to Graphics object. + Reference to ButtonItem object. + + + + Creates new instance of the object and initializes it with default values + + Reference to Graphics object. + Reference to ButtonItem object. + + + + Summary description for SimpleElement. + + + + + Summary description for SimpleElementLayout. + + + + + Indicates absolute vertical alignment of the content. + + + + + Content is aligned to the top + + + + + Content is aligned in the middle + + + + + Content is aligned at the bottom + + + + + Indicates absolute horizontal alignment + + + + + Content is left aligned + + + + + Content is centered + + + + + Content is right aligned + + + + Indicates alignment of a part of the cell like image or check box in relation to the text. + + + + Part is aligned to the left center of the text assuming left-to-right + orientation. + + + + + Part is aligned to the right center of the text assuming left-to-right + orientation. + + + + + Part is aligned to the top left of the text assuming left-to-right + orientation. + + + + Part is aligned above the text and centered. + + + + Part is aligned to the top right of the text assuming left-to-right + orientation. + + + + + Part is aligned to the bottom left of the text assuming left-to-right + orientation. + + + + Part is aligned below the text and centered. + + + + Part is aligned to the bottom right of the text assuming left-to-right + orientation. + + + + + Summary description for SimpleNodeDisplay. + + + + + Represents information neccessary to paint the cell on canvas. + + + + + Represents the slider item which allows you to select a value from predefined range. + + + + + Creates new instance of SliderItem. + + + + + Creates new instance of SliderItem and assigns the name to it. + + Item name. + + + + Creates new instance of SliderItem and assigns the name and text to it. + + Item name. + item text. + + + + Returns copy of the item. + + + + + Copies the SliderItem specific properties to new instance of the item. + + New SliderItem instance. + + + + Copies the SliderItem specific properties to new instance of the item. + + New SliderItem instance. + + + + Raises the IncreaseButtonClick event. + + Provides event arguments + + + + Raises the DecreaseButtonClick event. + + Provides event arguments + + + + Returns the Font object to be used for drawing the item text. + + Font object. + + + + Advances the current position of the slider by the amount of the Step property. + + + + + Advances the current position of the slider by the amount of the Step property. + + + + + Advances the current position of the slider by the specified amount. + + The amount by which to increment the sliders current position. + + + + Advances the current position of the slider by the specified amount. + + The amount by which to increment the sliders current position. + + + + Raises the ValueChanged event. + + + + + Raises the ValueChanged event. + + + + + Raises the ValueChanging event. + + + + + Returns whether property should be serialized. Used by Windows Forms designer. + + + + + Resets the property to default value. Used by Windows Forms designer. + + + + + Occurs after Value property has changed. + + + + + Occurs before Value property has changed. + + + + + Occurs when Increase button is clicked using mouse. + + + + + Occurs when Decrease button is clicked using mouse. + + + + + Gets or sets the slider mouse over part. + + + + + Gets or sets the slider part that mouse is pressed over. This property should not be modified and it is for internal usage only. + + + + + Returns the label bounds inside of the control. + + + + + Gets or sets the text associated with this item. + + + + + Gets whether item supports text markup. Default is false. + + + + + Gets or sets whether text-markup support is enabled for items Text property. Default value is true. + Set this property to false to display HTML or other markup in the item instead of it being parsed as text-markup. + + + + + Gets or sets the maximum value of the range of the control. + + + + + Gets or sets the minimum value of the range of the control. + + + + + Gets or sets the current position of the slider. + + + + + Gets or sets the amount by which a call to the PerformStep method increases the current position of the slider. Value must be greater than 0. + + + + + Gets or sets whether the text label next to the slider is displayed. + + + + + Gets or sets the width of the slider part of the item in pixels. Value must be greater than 0. Default value is 136. + + + + + Gets or sets the width of the label part of the item in pixels. Value must be greater than 0. Default value is 38. + + + + + Gets or sets the text label position in relationship to the slider. Default value is Left. + + + + + Gets or sets whether Click event will be auto repeated when mouse button is kept pressed over the item. + + + + + Gets or sets the auto-repeat interval for the click event when mouse button is kept pressed over the item. + + + + + Gets or sets whether vertical line track marker is displayed on the slide line. Default value is true. + + + + + Gets or sets the color of the label text. + + + + + Gets or sets the Key Tips access key or keys for the item when on Ribbon Control or Ribbon Bar. Use KeyTips property + when you want to assign the one or more letters to be used to access an item. For example assigning the FN to KeyTips property + will require the user to press F then N keys to select an item. Pressing the F letter will show only keytips for the items that start with letter F. + + + + + Gets or sets the collection of shortcut keys associated with the item. + + + + + Gets or sets whether item will display sub items. + + + + + Specifies whether item is drawn using Themes when running on OS that supports themes like Windows XP. + + + + + Gets or sets whether the item expands automatically to fill out the remaining space inside the container. Applies to Items on stretchable, no-wrap Bars only. + + + + + Gets or sets the tooltip for the Increase button of the slider. + + + + + Gets or sets the tooltip for the Decrease button of the slider. + + + + + Gets or sets the slider orientation. Default value is horizontal. + + + + + Gets or sets the custom color table for the item. Color table here will override all system color table settings. + + + + + Indicates spacing for an user interface element either padding or margins. + + + + + Gets or sets the amount of the space on the left side. + + + + + Gets or sets the amount of the space on the right side. + + + + + Gets or sets the amount of the space on the top. + + + + + Gets or sets the amount of the space on the bottom. + + + + + Gets total horizontal spacing. + + + + + Gets total vertical spacing. + + + + + Gets whether all memebers of class are set to 0. + + + + + Summary description for SubItemsCollection. + + + + + Sorts the items in the collection using the built in IComparable on each item which sorts items by the Text property. + + + + + Sorts the items in the collection using specified comparer. + + Comparer to use for item sorting. + + + + Gets whether MinimumTooltipSize property should be serialized. + + + + + Retrieves SuperTooltipInfo for given component or return null if component does not have tooltip associated with it. + + + + + Associates SuperTooltipInfo with given component. + + Reference to supported component. + Instance of SuperTooltipInfo class. If null is passed the SuperTooltip is detached from the given component. + + + + Raises the MarkupLinkClick event. + + + + + Shows SuperTooltip for given object that has been registered using SetSuperTooltip method at specific location on the screen. + + Object to show tooltip for. Object must be registered using SetSuperTooltip method before tooltip is shown for it. + Specifies the explicit position of the SuperTooltip in screen coordinates. + + + + Shows SuperTooltip for given object that has been registered using SetSuperTooltip method. + + Object to show tooltip for. Object must be registered using SetSuperTooltip method before tooltip is shown for it. + + + + Shows SuperTooltip for given object that has been registered using SetSuperTooltip method. + + Object to show tooltip for. Object must be registered using SetSuperTooltip method before tooltip is shown for it. + + + + Raises the TooltipClosed event. + + Provides event arguments. + + + + Hides tooltip if it is visible. + + + + + Resets Hoover timer. + + + + + Occurs just before tooltip is displayed and gives you opportunity to cancel showing of tooltip. + + + + + Occurs after tooltip has been closed. + + + + + Occurs when text markup link is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + Gets or sets the maximum width of the super tooltip. Default value is 0 which indicates that maximum width is not used. The maximum width property + will not be used if custom size is specified. + + + + + Gets or sets whether form active state is ignored when control is deciding whether to show tooltip. By default this property is set to false + which indicates that tooltip will be shown only if parent form is active. When set to true the form active state is ignored when + deciding whether to show tooltip. + + + + + Gets or sets whether anti-alias smoothing is used while painting. Default value is true. + + + + + Gets or sets whether SuperTooltip will be shown for the controls assigned to it. Default value is true. You can set + this property to false to disable SuperTooltip for all controls assigned to it. + + + + + Gets or sets whether tooltip is shown immediately after the mouse enters the control. The default value is false which indicates + that tooltip is shown after system hover timeout has expired which provides slight delay before tooltip is shown. + + + + + Gets or sets the minimum tooltip size. Default value is 150 width and 24 height. + + + + + Gets or sets the duration in seconds that tooltip is kept on screen after it is displayed. Default value is 20 seconds. + You can set this value to 0 to keep tooltip displayed until user moves mouse out of control or application loses focus. + + + + + Gets or sets the delay time for hiding the tooltip in milliseconds after + mouse has left the control. Default value is 0 which means that tooltip will be + hidden as soon as mouse leaves the control tooltip was displayed for. You can use + this property to provide the user with enough time to move the mouse cursor to the + tooltip so user can act on the content of the tooltip, like hyper links. + + + + + Gets or sets whether tooltip position is checked before tooltip is displayed and adjusted to tooltip always + falls into screen bounds. Default value is true. + + + + + Gets or sets whether tooltip position is checked before tooltip is displayed and adjusted so tooltip does not overlaps the + control it is displayed for. Default value is true. + + + + + Gets or sets the tooltip position in relationship to the control tooltip is providing information for. + Set this property to false if you want tooltip to be displayed below the mouse cursor. Default value is + true which indicates that tooltip is displayed below mouse cursor but it is positioned below the control + that it provides the information for so it is not covering its content. + + + + + Gets or sets default setting for new Tooltips you create in design time. If all your tooltips have common elements + you can change this property to reflect these default setting before you start writing tooltips for all controls on the form. + As you start creating new tooltips for controls on the form default values specified here will be used as starting values + for new tooltip you are creating. + + + + + Returns instance of default tooltip information used in design-time. + + + + + Gets the reference to internal Hashtable that contains reference to all controls and assigned SuperTooltips. This + collection must not be modified directly and it is automatically managed by the SuperTooltip component. You can use it + for example to change the color for all SuperTooltips managed by the component but you should not add or remove items to it. + Instead use SetSuperTooltip methods to add or remove the tooltip for a component. + + + + + Gets or sets the hover delay multiplier which controls how fast tooltip appears. The value set here indicates + how many hover events are needed to occur before the tooltip is displayed. + + + + + Returns whether tooltip is visible. + + + + + Gets reference to instance of tooltip control if any has been created at the time call is made. + + + + + Gets or sets default tooltip font. Default value is null which means that default system font is used. + + + + + Gets or sets whether complete tooltip is shown including header, body and footer. Default value is true. When set to false only tooltip header will be shown. + Providing this option to your end users as part of your application setting allows them to customize the level of information displayed and reduce it after they are familiar with your product. + + + + + Gets or sets whether tooltip is shown when control that tooltip is assigned to is focused. You can set this value to false to disable Tooltip display when control receives input focus. Default value is true. + + This property is effective only when Super Tooltip is assigned to the controls that inherit from System.Windows.Forms.Control class and it relies on Focused property of respective control for proper function. + + + + Provides information about SuperTooltip attached to a component. + + + + + Creates new instance of the class. + + + + + Creates new instance of the class with specified parameters. + + + + + Creates new instance of the class with specified parameters. + + + + + Returns whether property should be serialized. + + + + + Gets or sets whether tooltip header text is visible or not. Default value is true. + + + + + Gets or sets whether tooltip footer text is visible or not. Default value is true. + + + + + Gets or sets the header text. + + + + + Gets or sets the footer text. + + + + + Gets or sets body text. + + + + + Gets or sets body image displayed to the left of body text. + + + + + Gets or sets footer image displayed to the left of footer text. + + + + + Gets or sets the custom size for tooltip. Default value is 0,0 which indicates that tooltip is automatically + resized based on the content. + + + + + Gets or sets predefined tooltip color. + + + + + Extensibility interface that custom components may implement + so SuperTooltip can be provided for them. + + + + + This event should be triggered by the component when it wants to display SuperTooltip. Normally + this event would be equivalent of MouseHover event but you can trigger it in response to anything else. + Sender for this event must be object that implements ISuperTooltipInfoProvider interface. + + + + + This event should be triggered by component when it wants to hide SuperTooltip. For example this event + might be triggered when mouse leaves your component. Sender of this event must be object that implements ISuperTooltipInfoProvider interface. + + + + + Returns rectangle of the visible area of the component in screen coordinates. This rectangle is used + to position SuperTooltip on the screen. + + + + + Delegate for SuperTooltip events. + + + + + Represents event arguments for PanelChanging event. + + + + + Set to true to cancel display of tooltip. + + + + + Object that has triggered displaying of tooltip + + + + + Information that will be used to populate tooltip. + + + + + Location where tooltip will be displayed. You can change the location here to display tooltip at different position. + + + + + Indicates the tooltip size, read-only and valid only if tooltip position is checked on screen. + + + + + Default constructor. + + + + + Represents SuperTooltipControl. + + + + + Default constructor. + + + + + Paints insides of the control. + + Paint event arguments. + + + + Recalculates and set size of the control based on the content that is made available to it. + + + + + Calculates the tooltip height based on the specified width. + + Tooltip width + Size of the tooltip based on specified width. + + + + Shows tooltip at specified screen coordinates. + + X coordinate + Y coordinate + Indicates whether to enforce the screen position of tooltip if tooltip falls out of screen bounds. + + + + Updates the popup shadow size and position if shadow is visible. + + + + + Gets or sets whether complete tooltip is shown including header, body and footer. Default value is true. When set to false only tooltip header will be shown. + Providing this option to your end users as part of your application setting allows them to customize the level of information displayed and reduce it after they are familiar with your product. + + + + + Gets or sets the maximum width of the super tooltip. Default value is 0 which indicates that maximum width is not used. The maximum width property + will not be used if custom size is specified. + + + + + Gets or sets the minimum tooltip size. Default value is 150, 50 + + + + + Gets or sets image used next to body text. + + + + + Gets or sets image used next to footer text. + + + + + Gets or sets text displayed in header of tooltip + + + + + Gets or sets whether header in tooltip is visible. Default value is true. + + + + + Gets or sets text displayed in footer of the tooltip + + + + + Gets or sets whether footer in tooltip is visible. Default value is true. + + + + + Gets or sets whether line above footer text is drawn to separate footer from body text. Default value is true. + + + + + Gets or sets whether mouse click on super tooltip will activate it, make it active window. Default value is true. + + + + + Gets or sets whether tooltip control is popup tooltip or standard control. Default is false which means tooltip is popup style. + + + + + Represents class that holds padding information for user interface elements. + + + + + Gets or sets padding on left side. Default value is 0 + + + + + Gets or sets padding on right side. Default value is 0 + + + + + Gets or sets padding on top side. Default value is 0 + + + + + Gets or sets padding on bottom side. Default value is 0 + + + + + Creates new instance of the class and initializes it. + + Padding for all sides + + + + Creates new instance of the class and initializes it. + + Left padding + Right padding + Top padding + Bottom padding + + + + Raises the PropertyChanged event. + + Event arguments + + + + Gets amount of Top padding + + + + + Gets amount of Left padding + + + + + Gets amount of Bottom padding + + + + + Gets amount of Right padding + + + + + Gets amount of horizontal padding (Left+Right) + + + + + Gets amount of vertical padding (Top+Bottom) + + + + + Gets whether Padding is empty. + + + + + Gets or sets the padding for all sides. + + + + + Occurs when property value has changed. + + + + + Summary description for ThemedButtonItemPainter. + + + + + Provides data for toolbar rendering. + + + + + Gets or sets the reference to Bar object being rendered + + + + + Gets or sets Graphics object bar is rendered on. + + + + + Gets the bounds of the region that should be rendered. + + + + + Reference to internal data. + + + + + Creates new instance of the object and initializes it with default data. + + Reference to bar object. + Reference to Graphics object. + + + + Describes the round rectangle shape. + + + + + Initializes a new instance of the RoundCornerDescriptor class. + + + + + Initializes a new instance of the RoundCornerDescriptor class. + + + + + Initializes a new instance of the RoundCornerDescriptor class. + + + + + + + + + Gets or sets the top-left round corner size. + + + + + Gets or sets the top-right round corner size. + + + + + Gets or sets the bottom-left round corner size. + + + + + Gets or sets the bottom-right round corner size. + + + + + Gets whether all corner size values are set to zero which results in no rounded corners. + + + + + Gets whether all corner size values are set to same value. + + + + + Represents DocumentDockContainer object converter. + + + + + Initializes a new instance of the ScrollBarAdv class. + + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Gets whether scrollbar is vertical. + + true if scrollbar is vertical otherwise false for horizontal scrollbar + + + + Raises the Scroll event. + + Provides Event arguments. + + + + Raises the ValueChanged event. + + Provides Event arguments. + + + + Called when Command property value changes. + + + + + Occurs when the Value property is changed, either by a Scroll event or programmatically. + + + + + Occurs when the scroll box has been moved by either a mouse or keyboard action. + + + + + Gets or sets a value to be added to or subtracted from the Value property when the scroll box is moved a large distance. + A numeric value. The default value is 10. + ArgumentOutOfRangeException is raised if assigned value is less than 0. + + + + + Gets or sets the upper limit of values of the scrollable range. + A numeric value. The default value is 100. + + + + + Gets or sets the lower limit of values of the scrollable range. + A numeric value. The default value is 0. + + + + + Gets or sets the value to be added to or subtracted from the Value property when the scroll box is moved a small distance. + A numeric value. The default value is 1. + ArgumentOutOfRangeException is raised if assigned value is less than 0. + + + + + Gets or sets a numeric value that represents the current position of the scroll box on the scroll bar control. + A numeric value that is within the Minimum and Maximum range. The default value is 0. + ArgumentOutOfRangeException is raised if assigned value is less than the Minimum property value or assigned value is greater than the Maximum property value. + + + + + Gets or sets the scroll bar appearance style. + + + + + Gets or sets the command assigned to the item. Default value is null. + Note that if this property is set to null Enabled property will be set to false automatically to disable the item. + + + + + Gets or sets user defined data value that can be passed to the command when it is executed. + + + + + Summary description for ScrollButton. + + + + + Clean up any resources being used. + + + + + Represents class that provides shadows to elements. + + + + + Creates new instance of shadow painter. + + + + + Represents class that provides display context for shadow painter. + + + + + Summary description for ShortcutList. + + + + + Represents the Outlook like Side-bar Control. + + + + + Creates new instance of side bar control. + + + + + Clean up any resources being used. + + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Returns the renderer control will be rendered with. + + The current renderer. + + + + Raises ItemLayoutUpdated event. + + Provides event arguments. + + + + Invokes ItemDoubleClick event. + + Reference to item double-clicked + Event arguments + + + + Returns the collection of items with the specified name. + + Item name to look for. + + + + + Returns the collection of items with the specified name and type. + + Item name to look for. + Item type to look for. + + + + + Returns the collection of items with the specified name and type. + + Item name to look for. + Item type to look for. + + + + + Returns the first item that matches specified name. + + Item name to look for. + + + + + Invokes the DotNetBar Customize dialog. + + + + + Invokes SerializeItem event. + + Provides data for the event. + + + + Invokes DeserializeItem event. + + Provides data for the event. + + + + Loads the Side bar definition from file. + + Definition file name. + + + + Saves the Side bar definition to file. + + Definition file name. + + + + Occurs when Checked property of an button has changed. + + + + + Occurs when Item is clicked. + + + + + Occurs when Item is clicked. + + + + + Occurs when popup of type container is loading. + + + + + Occurs when popup of type container is unloading. + + + + + Occurs when popup item is about to open. + + + + + Occurs when popup item is closing. + + + + + Occurs just before popup window is shown. + + + + + Occurs when Item Expanded property has changed. + + + + + Occurs when mouse button is pressed. + + + + + Occurs when mouse button is released. + + + + + Occurs when mouse enters the item. + + + + + Occurs when mouse leaves the item. + + + + + Occurs when mouse moves over the item. + + + + + Occurs when mouse remains still inside an item for an amount of time. + + + + + Occurs when item loses input focus. + + + + + Occurs when item receives input focus. + + + + + Occurs when user changes the item position, removes the item, adds new item or creates new bar. + + + + + Occurs after an Item is removed from SubItemsCollection. + + + + + Occurs after an Item has been added to the SubItemsCollection. + + + + + Occurs when ControlContainerControl is created and contained control is needed. + + + + + Occurs when Text property of an Item has changed. + + + + + Use this event if you want to serialize the hosted control state directly into the DotNetBar definition file. + + + + + Use this event if you want to deserialize the hosted control state directly from the DotNetBar definition file. + + + + + Occurs after DotNetBar definition is loaded. + + + + + Occurs before an item in option group is checked and provides opportunity to cancel that. + + + + + Occurs before tooltip for an item is shown. Sender could be the BaseItem or derived class for which tooltip is being displayed or it could be a ToolTip object itself it tooltip is not displayed for any item in particular. + + + + + Occurs after an item has been serialized to XmlElement and provides you with opportunity to add any custom data + to serialized XML. This allows you to serialize any data with the item and load it back up in DeserializeItem event. + + + To serialize custom data to XML definition control creates handle this event and use CustomXmlElement + property on SerializeItemEventArgs to add new nodes or set attributes with custom data you want saved. + + + + + Occurs after an item has been de-serialized (load) from XmlElement and provides you with opportunity to load any custom data + you have serialized during SerializeItem event. + + + To de-serialize custom data from XML definition handle this event and use CustomXmlElement + property on SerializeItemEventArgs to retrive any data you saved in SerializeItem event. + + + + + Gets or sets the redering mode used by control. Default value is eRenderMode.Global which means that static GlobalManager.Renderer is used. If set to Custom then Renderer property must + also be set to the custom renderer that will be used. + + + + + Gets or sets the custom renderer used by the items on this control. RenderMode property must also be set to eRenderMode.Custom in order renderer + specified here to be used. + + + + + Gets or sets visual appearance for the control. + + + + + Gets or sets whether flat side bar is using system colors. + + + This property is used internally by side bar to determine whether to reset color scheme based on system colors. + If you want side bar to use system colors you need to set PredefinedColorScheme property. + + + + + Gets or sets Bar Color Scheme. + + + + + Gets/Sets the visual style of the SideBar. + + + + + Specifies whether SideBar is drawn using Themes when running on OS that supports themes like Windows XP. + + + + + Occurs after internal item layout has been updated and items have valid bounds assigned. + + + + + Returns the collection of side-bar Panels. + + + + + Gets or sets the expanded panel. Only one panel can be expanded at a time. + + + + + Gets or sets the form SideBar is attached to. + + + + + Gets or sets whether end-user can rearrange the items inside the panels. + + + + + Gets or sets whether native .NET Drag and Drop is used by side-bar to perform drag and drop operations. AllowDrop must be set to true to allow drop of the items on control. + + + + + Gets or sets whether external ButtonItem object is accepted in drag and drop operation. UseNativeDragDrop must be set to true in order for this property to be effective. + + + + + Gets or sets whether gray-scale algorithm is used to create automatic gray-scale images. Default is true. + + + + + ImageList for images used on Items. Images specified here will always be used on menu-items and are by default used on all Bars. + + + + + ImageList for medium-sized images used on Items. + + + + + ImageList for large-sized images used on Items. + + + + + Indicates whether Tooltips are shown on Bars and menus. + + + + + Indicates whether item shortcut is displayed in Tooltips. + + + + + Indicates whether Reset buttons is shown that allows end-user to reset the toolbar state. + + + + + Returns the reference to the container that containing the sub-items. + + + + + Gets/Sets control border style. + + + + + Gets whether any handlers have been defined for SerializeItem event. If no handles have been defined to optimize performance SerializeItem event will not be attempted to fire. + + + + + Gets whether any handlers have been defined for DeserializeItem event. If no handles have been defined to optimize performance DeserializeItem event will not be attempted to fire. + + + + + Gets/Sets Bar definition as XML string. + + + + + Indicates whether shortucts handled by items are dispatched to the next handler or control. + + + + + Represents the method that will handle the ItemRemoved event. + + + + + Provides layout for Side-Bar control. + + + + + Creates new instance of SideBarContainerItem class. + + + + + Returns copy of SideBarContainerItem item + + + + + Recalculates the size of the item + + + + + Paints this base container + + + + + Occurs when sub item expanded state has changed. + + Sub item affected. + + + + Occurs when the mouse pointer is over the item and a mouse button is pressed. This is used by internal implementation only. + + + + + Sets input focus to next visible item in Explorer Bar. + + True if focus was set to next visible item otherwise false. + + + + Sets input focus to previous visible item in Explorer Bar. + + True if focus was set to previous visible item otherwise false. + + + + Gets or sets a value indicating whether the item is expanded or not. For Popup items this would indicate whether the item is popped up or not. + + + + + Summary description for SideBarPanelControl. + + + + + Represents the Side-Bar Panel item. + + + + + Creates new instance of SideBarPanelItem. + + + + + Creates new instance of SideBarPanelItem and assigns the name to it. + + Item name. + + + + Creates new instance of SideBarPanelItem and assigns the name and text to it. + + Item name. + item text. + + + + Returns copy of SideBarPanelItem item. + + + + + Returns the Font object to be used for drawing the item text. + + Font object. + + + + Occurs when the mouse pointer is moved over the item. This is used by internal implementation only. + + + + + Occurs when the mouse pointer is over the item and a mouse button is pressed. This is used by internal implementation only. + + + + + Occurs when the item is clicked. This is used by internal implementation only. + + + + + Overloaded. Serializes the item and all sub-items into the XmlElement. + + XmlElement to serialize the item to. + + + + Overloaded. Deserializes the Item from the XmlElement. + + Source XmlElement. + + + + Shows tooltip for this item. + + + + + Forces the repaint the item. + + + + + Must be called by any sub item that implements the image when image has changed + + + + + Gets whether mouse is over the panel header. + + + + + Gets whether mouse is pressed over the panel header. + + + + + Specifies panel title text alignment. Default value is Center. + + + + + Gets or sets the layout type for the items. Default layout orders items in a single column. Multi-column layout will order + items in multiple colums based on the width of the control. + + + + + Gets or sets the text associated with this item. + + + + + Gets or sets the item background style. + + + + + Gets or sets the item header style. Applies only when SideBar.Appearance is set to Flat. + + + + + Gets or sets the item header style when mouse is over the header. Applies only when SideBar.Appearance is set to Flat. + + + + + Gets or sets the item header style when left mouse button is pressed on header. Applies only when SideBar.Appearance is set to Flat. + + + + + Gets or sets the item header side style. Applies only when SideBar.Appearance is set to Flat. + + + + + Gets or sets the item header side style when mouse is over the header. Applies only when SideBar.Appearance is set to Flat. + + + + + Gets or sets the item header side style when left mouse button is pressed on header. Applies only when SideBar.Appearance is set to Flat. + + + + + Gets or sets whether the font used to draw the item text is bold. + + + + + Gets or sets whether the font used to draw the item text is bold when mouse is over the item. + + + + + Gets or sets whether the font used to draw the item text is underlined when mouse is over the item. + + + + + Gets or sets the text color of the button when mouse is over the item. + + + + + Gets or sets the text color of the button. + + + + + Gets/Sets the Image size for all sub-items on the Bar. + + + + + Gets the rectangle of the panel item Button. + + + + + Gets or sets the index of the first visible item on the panel. + + + + + Gets or sets a value that determines whether text is displayed in multiple lines or one long line. + This setting applies to the buttons inside Panel as well. + + + + + Gets or sets whether scroll buttons are displayed when content of the panel exceeds it's height. + + + + + Specifies the Button icon. Icons support multiple image sizes and alpha blending. + + + + + Specifies the Button image. + + + + + Specifies the index of the image for the button if ImageList is used. + + + + + Specifies the image for the button when mouse is over the item. + + + + + Specifies the index of the image for the button when mouse is over the item when ImageList is used. + + + + + Specifies the image for the button when mouse left button is pressed. + + + + + Specifies the index of the image for the button when mouse left button is pressed and ImageList is used. + + + + + Represents class that provide display support for simple tabs. + + + + + Default constructor. + + + + + Provides layout management for ISimpleTab tab implementations. + + + + + Resizes the content block and sets it's Bounds property to reflect new size. + + Content block to resize. + + + + Represents painter for Mozilla style splitter. + + + + + Base class for painting expandable splitter control. + + + + + Default constructor. + + + + + Paints splitter. + + Paint information. + + + + Creates new instance of splitter painter. + + + + + Paints splitter. + + Paint information. + + + + Represents painter for Office 2003 style splitter. + + + + + Creates new instance of splitter painter. + + + + + Paints splitter. + + Paint information. + + + + Represents class that holds information neccessary to paint the expandable splitter. + + + + + Specifies reference to graphics canvas. + + + + + Specifies splitter display rectangle. + + + + + Holds color settings for painting. + + + + + Specifies whether splitter is expandable or not. + + + + + Specifies whether splitter is expanded or not. + + + + + Specifies the splitter dock. + + + + + Represents class that holds colors for the splitter display. + + + + + Specifies back color. + + + + + Specifies target gradient background color. + + + + + Specifies background gradient angle. + + + + + Specifies grip part dark color. + + + + + Specifies grip part light color. + + + + + Specifies expand part line color. + + + + + Specifies expand part fill color. + + + + + Initializes a new instance of the StyleManager class. + + + + + Initializes a new instance of the StyleManager class with the specified container. + + An IContainer that represents the container for the command. + + + + Updates Ambient colors for control and its child controls. + + + + + + Updates ambient colors for the control and its children. + + + + + + Gets whether property should be serialized by WinForms designer. + + + + + Resets property to its default value. + + + + + Changes the StyleManager style and color tint in one step. Use this method if you need to change style and color tint simultaneously in single step for better performance. + + New style. + Color tint for the style. + + + + Registers control with the StyleManager so control can be notified of global style changes. + + Control to register with the StyleManager. + + + + Unregister the control from StyleManager notifications. + + Control that was registered through Register method. + + + + Returns whether style is a Metro type style. + + style to test. + true if Metro type style otherwise false. + + + + Returns whether style is a Metro type style. + + style to test. + true if Metro type style otherwise false. + + + + Returns whether style is a Metro type style. + + style to test. + true if Metro type style otherwise false. + + + + Gets or sets the global style for the controls that have Style=ManagerControlled. + + + + + Gets or sets the color current style is tinted with. + + + + + Gets previous effective style. + + + + + Gets or sets color generation parameters for Metro color generator. + + + + + Gets or sets color generation parameters for Metro color generator. + + + + + Gets or sets the current visual style. + + + + + Gets or sets the color tint that is applied to current Office 2007, Office 2010 or Windows 7 color table. + Default value is Color.Empty which indicates that no color blending is performed. + + + + + Defines the StyleManager styles. + + + + + Manages whether ambient property settings (BackColor, ForeColor etc.) are applied to child controls of the form when StyleManager component changes style. + + + + + Initializes a new instance of the StyleManagerAmbient class. + + + + + Initializes a new instance of the StyleManagerAmbient class with the specified container. + + An IContainer that represents the container for the command. + + + + Gets ambient settings StyleManager is allowed to change on the control. + + + + + Sets the ambient settings StyleManager is allowed to change on component. + + Reference to supported component. + Ambient settings that StyleManager may change. + + + + Specifies ambient settings enabled on the control for StyleManager. + + + + + All ambient settings are allowed to change. + + + + + StyleManager cannot change ambient settings. + + + + + StyleManager should process child controls. + + + + + StyleManager should change BackColor. + + + + + StyleManager should change ForeColor. + + + + + Constructor + + Associated SuperTabItem + + + + Paint processing + + + + + + Gets the default tab ContentRectangle + + Rectangle + + + + Gets the tab ContentRectangle + + Rectangle + + + + Gets the tab path + + GraphicsPath + + + + Sets the default color tables + + + + + Gets the tab ColorTable + + ColorTable + + + + Gets the tab state + + eTabState + + + + Gets the tab panel Color Table + + Color Table + + + + Draws the tab background + + Graphics + Tab path + StateColorTable + + + + Draws the tab border + + Graphics + Tab path + Color table + + + + Draws the tab contents + + Graphics + State color table + + + + Draws the tab image + + Graphics + + + + Draws the tab text + + + + + + + Draws the tab close button + + Graphics + State color table + + + + Sets the GraphicsTransform for the given alignment + and Horizontal text setting + + Graphics + Rectangle to transform + Transformed rectangle + + + + Resets out transform + + Graphics + + + + Gets the focus rectangle + + + + + + + Gets the tab close button bitmap + + Graphics + State color table + Button bitmap + + + + Creates the close button bitmap + + Graphics + State color table + Close bitmap + + + + Gets the hot close button bitmap + + Graphics + Close bitmap + + + + Creates the hot button bitmap + + Graphics + Close bitmap + + + + Gets the pressed close button bitmap + + Graphics + Close bitmap + + + + Creates the pressed button bitmap + + Graphics + Close bitmap + + + + Gets the close button path + + Close rectangle + Corner radius + + + + + Gets or sets the default item ColorTable + + + + + Constructor for Office2007 style SuperTabItem base display + + Associated SuperTabItem + + + + Creates the tab item GraphicsPath + + Tab path + + + + Create the Top tab path + + GraphicsPath + + + + Creates the Bottom tab path + + GraphicsPath + + + + Creates the Left tab path + + GraphicsPath + + + + Create the Right tab path + + GraphicsPath + + + + Constructor + + Associated SuperTabStripItem + + + + Handles ContentManager NextPosition events + + + + + + + Handles RecalcSize requests + + + + + + Handles RecLayoutContent requests + + + + + Initializes the layout engine + + + + + + Performs the Recalc Layout + + + + + + Recalculates the bounds for the TabControlBox + + + + + + + Gets the tab client area + + + + + + Gets the tab client area + + + + + + Gets the tab height + + + + + + Layout manager NextBlockPosition + + + + + + PromoteTab NextBlockPosition + + + + + + + + Determines if all tabs are visible + + + + + + Paint processing + + + + + + Draws the background + + + + + + + Draws the tabs + + + + + + Draws the Drag and Drop insert marker + + ItemPaintArgs + Color table + + + + Draws the top insert marker + + + + + + Draws the left insert marker + + + + + + Determines if the given items are on the same line + + + + + + + + Draws the TabStrip border + + + + + + + Gets the inner and outer border lines + + + + + + + Sets the default color table + + + + + Gets the tab color table + + Tab color table + + + + Gets the tab close button bitmap + + + + + + + + Creates the tab close button bitmap + + + + + + + Gets the Menu button bitmap + + + + + + + + Create the Menu button bitmap + + + + + + + Gets the Menu button path + + + + + + Gets the Menu button bitmap + + + + + + + + Create the Menu button bitmap + + + + + + + Gets the Menu button path + + + + + + Gets the TabAlignment + + + + + gets or sets the default color table + + + + + Gets if display is RightToLeft + + + + + Gets tab vertical orientation + + + + + Gets the minimum TabStrip height + + + + + Gets whether we are to show the Focus rectangle + + + + + Gets CloseButtonOnTabsVisible + + + + + Gets FixedTabSize + + + + + Gets the minimum tab size + + + + + Gets the selected tab + + + + + Gets the selected font + + + + + Gets the tab ControlBox + + + + + Gets the tab height + + + + + Gets the tab bounds + + + + + Gets the Tabs collection + + + + + Gets the TabStrip + + + + + Gets the TabStripItem + + + + + Gets the PreDrawStripBorder state + + + + + Gets the SelectedPaddingWidth + + + + + Gets the TabOverlap + + + + + Gets the TabSpacing + + + + + Gets the TabOverlapLeft + + + + + Gets the TabLayoutOffset + + + + + Office2007 TabStrip base display constructor + + Associated TabStrip + + + + Tab layout offsets + + + + + Office 2010 Backstage SuperTabItem display constructor + + Associated SuperTabItem + + + + Draws the tab border + + + + + + + + Draws the Backstage SelectedItem marker + + + + + + + DrawTabItemBackground + + + + + + + + DrawTabItemHighLight + + + + + + + + + Creates the tab item GraphicsPath + + Tab path + + + + Create the Top tab path + + GraphicsPath + + + + Creates the Bottom tab path + + GraphicsPath + + + + Creates the Left tab path + + GraphicsPath + + + + Create the Right tab path + + GraphicsPath + + + + Gets the Layout manager NextBlockPosition + + + + + + Gets the "PromoteSelTab" NextBlockPosition + + + + + + + + Draws the background + + + + + + + PreDrawStripBorder + + + + + SelectedPaddingWidth + + + + + Constructor for OfficeMobile2014 style SuperTabItem base display + + Associated SuperTabItem + + + + Calculates the Content Rectangle for the tab + + Content Rectangle + + + + Creates the tab item GraphicsPath + + Tab path + + + + Create the Top tab path + + GraphicsPath + + + + Creates the Bottom tab path + + GraphicsPath + + + + Creates the Left tab path + + GraphicsPath + + + + Create the Right tab path + + GraphicsPath + + + + OfficeMobile2014 SuperTabStripBaseDisplay + + Associated TabStripItem + + + + Gets the next layout block position + + LayoutManagerPositionEventArgs + + + + Gets the next block position when attempting + to make a specific tab visible + + Potential item to replace + View item being placed + Block Rectangle + + + + Returns the Minimum tab size for this style + + + + + Tab layout offsets + + + + + Tab Overlap + + + + + Tab Spacing + + + + + Constructor for OneNote2007 style SuperTabItem base display + + Associated SuperTabItem + + + + Calculates the Content Rectangle for the tab + + Content Rectangle + + + + Creates the tab item GraphicsPath + + Tab path + + + + Create the Top tab path + + GraphicsPath + + + + Creates the Bottom tab path + + GraphicsPath + + + + Creates the Left tab path + + GraphicsPath + + + + Create the Right tab path + + GraphicsPath + + + + OneNote2007 SuperTabStripBaseDisplay + + Associated TabStripItem + + + + Gets the next layout block position + + LayoutManagerPositionEventArgs + + + + Gets the next block position when attempting + to make a specific tab visible + + Potential item to replace + View item being placed + Block Rectangle + + + + Returns the Minimum tab size for this style + + + + + Tab Overlap + + + + + Tab Spacing + + + + + Constructor + + Associated SuperTabControlBox + + + + Performs RecalcSize processing + + + + + Refreshes the CloseBox + + + + + Performs control Paint processing + + + + + + InternalMouseEnter + + + + + InternalMouseLeave + + + + + InternalMouseDown + + + + + + InternalMouseUp + + + + + + Returns copy of the item + + + + + Gets or sets the CloseBox Visible state + + + + + Gets whether the mouse is down + + + + + Gets whether the mouse is over the CloseBox + + + + + Constructor + + Associated SuperTabStripItem + + + + Performs RecalcSize processing + + + + + Performs RecalcLayout processing + + + + + Performs individual running layout processing for the given BaseItem + + Item to Layout + Running Layout Size + Whether a recalcSize is needed + New running Size + + + + Refresh code + + + + + Paint processing + + + + + + InternalMouseEnter + + + + + InternalMouseLeave + + + + + InternalMouseMove + + + + + + InternalMouseDown + + + + + + InternalMouseUp + + + + + + Gets the ControlBoxItem from the given Point + + + + + + + OnItemAdded + + + + + + OnAfterItemRemoved + + + + + + Removes all user added items from the ControlBox + + + + + Returns copy of the item. + + + + + Gets or sets the ControlBox Bounds + + + + + Gets the CloseBox + + + + + Gets the MenuBox + + + + + Gets or sets the ControlBox Visible state + + + + + Gets the MouseDown state + + + + + Gets the MouseOver state + + + + + Gets the TabStrip TabDisplay + + + + + Constructor + + Associated SuperTabControlBox + + + + RecalcSize + + + + + Refreshes the display + + + + + Paint processing + + + + + + Determines if all the items are visible + + true if all visible + + + + Gets MenuButton1 + + + + + + + + Gets MenuButton2 + + + + + + + + InternalMouseEnter + + + + + InternalMouseLeave + + + + + InternalMouseDown + + + + + + Gets the popup menu position + + + + + + Loads the TabMenu + + + + + Loads Tabs only into the TabMenu + + + + + + Loads all items into the TabMenu + + + + + + Sets the TabMenu entry image + + + + + + + Handles SuperTabMenuBox_Click event + + + + + + + InternalMouseUp + + + + + + Returns copy of the item. + + + + + Gets or sets whether the MenuBox is automatically hidden when the tab items size does not exceed the size of the control + + + + + Gets or sets whether the MenuBox raises a ClickEvent when selected + + + + + Gets or sets whether MenuBox shows only Tabs entries + + + + + Gets or sets whether the MenuBox displays each menu entry with its associated Image/Icon + + + + + Gets or sets MenuBox Visible state + + + + + Gets the MouseDown state + + + + + Gets the MouseOver state + + + + + Constructor + + + + + Sets the tab docking based upon the given alignment + + + + + + Hooks (or unhooks) underlying TabStrip events + + true to hook, false to unhook + + + + Handles TabItemOpen events + + + + + + + Handles TabItemClose events + + + + + + + Handles TabMoving events + + + + + + + Handles TabMoved events + + + + + + + Handles TabRemoved events + + + + + + + Handles SelectedTabChanging events + + + + + + + Handles SelectedTabChanged events + + + + + + + Handles GetTabItemPath events + + + + + + + Handles GetTabItemContentRectangle events + + + + + + + Handles BeforeTabDisplay events + + + + + + + Handles MeasureTabItem events + + + + + + + Handles PreRenderTabItem events + + + + + + + Handles PostRenderTabItem events + + + + + + + Handles GetTabCloseBounds events + + + + + + + Handles GetTabImageBounds events + + + + + + + Handles GetTabTextBounds events + + + + + + + Handles TabStripPaintBackground events + + + + + + + Handles StyleManagerStyleChanged events + + + + + + Handles TabStripTabColorChanged events + + + + + + + Handles TabStrip_MouseUp events + + + + + + + Handles TabStrip_MouseDown events + + + + + + + Handles TabStrip_MouseMove events + + + + + + + Handles TabStrip_MouseClick events + + + + + + + Handles TabStrip_MouseDoubleClick events + + + + + + + Handles TabStrip_MouseEnter events + + + + + + + Handles TabStrip_MouseHover events + + + + + + + Handles TabStrip_MouseLeave events + + + + + + + Creates a TabControl tab + + + + + + + Creates a TabControl tab + + + + + + + + Creates a TabControl tab + + + + + + + + + Selects the previous tab + + true if tab selected + + + + Selects the next tab + + true if tab selected + + + + Gets the SuperTabItem tab containing the given Point + + Point to test + Associated tab, or null + + + + Gets the item (SuperTabItem or BaseView) associated + with the given Point + + Point to test + BaseItem or null + + + + Closes the given tab + + + + + + Causes a Layout Recalculation of the SuperTabControl + + + + + Refreshes all panel styles + + + + + Applies color and border settings to the given panel + + + + + + Applies color settings to the given panel + + + + + + + Applies border settings for the given panel + + + + + + Performs OnSystemColorsChanged processing + + + + + + Performs OnResize processing + + + NOT NEEDED. Let WinForms layout do the work! + + + + OnControlAdded + + + + + + OnControlRemoved + + + + + + BeginInit + + + + + EndInit + + + + + Occurs when a tab is added to the Tabs collection + + + + + Occurs when a tab is about to Close + + + + + Occurs when a tab is removed from the Tabs collection + + + + + Occurs when a tab is about to be displayed + + + + + Occurs when a tab is being moved or dragged by the user + + + + + Occurs when a tab has been moved or dragged by the user + + + + + Occurs when the Selected tab is changing + + + + + Occurs when the Selected tab has changed + + + + + Occurs when the control needs a tab's bordering path + + + + + Occurs when the control needs a tab's Content Rectangle + + + + + Occurs when the control needs to measure a tab + + + + + Occurs before any tab rendering is done + + + + + Occurs After all tab rendering is complete + + + + + Occurs when the control needs to get the tab's Text Bounds + + + + + Occurs when the control needs to get the tab's Image Bounds + + + + + Occurs when the control needs to get the tab's Close Button Bounds + + + + + Occurs when the TabStrip background needs painted + + + + + Occurs when a TabStrip MouseUp event is raised + + + + + Occurs when a TabStrip MouseDown event is raised + + + + + Occurs when a TabStrip MouseMove event is raised + + + + + Occurs when a TabStrip MouseClick event is raised + + + + + Occurs when a TabStrip MouseDoubleClick event is raised + + + + + Occurs when a TabStrip MouseEnter event is raised + + + + + Occurs when a TabStrip MouseHover event is raised + + + + + Occurs when a TabStrip MouseLeave event is raised + + + + + Gets or sets whether TabStrip will get focus when Tab key is used. Default value is false. + + + + + Gets or sets whether tabs are automatically closed when a close button is clicked + + + + + Gets or sets whether the tab's visible close button is displayed for every tab state + + + + + Gets or sets whether close button is visible on each tab + + + + + Gets or sets the position of the tab close button + + + + + Gets or sets the custom tab Close button image + + + + + Gets or sets the custom Close button image that is used on tabs when the mouse is over the close button + + + + + Gets or sets the custom Close button image that is used on tabs when the button has been pressed + + + + + Gets the TabStrip ControlBox + + + + + Gets or sets whether the only Text displayed is for the SelectedTab + + + + + Gets or sets whether text is drawn horizontally regardless of tab orientation + + + + + Gets or sets the default alignment of the Image within the tab + + + + + Gets or sets the ImageList used by the TabStrip and its tab items + + + + + Gets or sets BaseItem tab padding in pixels. + + + + + Gets or sets whether vertical tab text is rotated 180 degrees + + + + + Gets or sets the SelectedTab based upon the given panel + + + + + Gets or sets whether a focus rectangle is displayed when tab has input focus + + + + + Gets or sets the fixed tab size in pixels. Either Height, Width, or both can be set + + + + + Gets or sets whether a tab is currently in a drag operation + + + + + Gets or sets whether tabs can be reordered through the user interface + + + + + Gets or sets the selected tab + + + + + Gets or sets the selected tab Font + + + + + Gets or sets the index of the selected tab + + + + + Gets or sets the tab alignment within the Tab-Strip control + + + + + Gets or sets the tab Font + + + + + Gets or sets the Horizontal spacing around tab elements + + + + + Gets or sets the type of the tab layout + + + + + Gets the collection of Tabs + + + + + Gets the control TabStrip + + + + + Gets or sets the Color of the TabStrip + + + + + Gets or sets the tab style + + + + + Gets or sets the Vertical spacing around tab elements + + + + + Gets or sets whether tabs are visible + + + + + Gets or sets tab text alignment + + + + + Gets the DefaultSize + + + + + Indicates whether Form.Validate is called and checked before selected tab is changed. Default value is true. + + + + + Represents Panel for the SuperTabControl + + + + + + _PanelColor_ColorTableChanged + + + + + + + Processes ColorTable changes + + + + + GetStyle + + + + + + Provides OnPaint support + + + + + + Occurs when the tab colors have changed + + + + + Gets or sets which edge of the parent container a control is docked to. + + + + + Gets or sets user specified tab panel display colors + + + + + Gets or sets the Panel ElementStyle + + + + + Gets or sets TabItem that this panel is attached to. + + + + + Specifies background image position when container is larger than image. + + + + + Constructor + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when Symbol property has changed. + + Old property value + New property value + + + + Called when SymbolSet property value changes. + + Indciates old value + Indicates new value + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Called when SymbolSize property has changed. + + Old property value + New property value + + + + Hooks or unhooks control events + + true to hook + + + + SuperTabItem_TextChanged processing + + + + + + + TextMarkupLinkClick + + + + + + + OnMarkupLinkClick + + + + + + ColorTable_ColorTableChanged + + + + + + + Processes ColorTable changes + + + + + Closes the tab + + + + + Gets the operational tab font + + + + + + Gets the tab ColorTable + + SuperTabItemStateColorTable + + + + Gets the tab ColorStateTable for the given state + + eTabState + SuperTabItemStateColorTable + + + + Gets the tab Panel ColorTable + + + + + + Gets the area of the tab that contains the given Point + + + + + + + Determines if the given Point is in the tab + + Point to test + true if Point is in tab + + + + Gets the tab bordering GraphicsPath + + GraphicsPath + + + + Gets the Close Button bounding Rectangle + + Bounding Rectangle + + + + Gets the Image bounding Rectangle + + Bounding Rectangle + + + + Gets the Text bounding Rectangle + + Bounding Rectangle + + + + Calculates Close button bounds + + Running rectangle + Running rectangle + + + + Calculates Image bounds + + Running rectangle + Running rectangle + + + + Refreshes the tab owner + + + + + Refreshes the tab display + + + + + Paint processing + + + + + + InternalMouseMove + + + + + + InternalMouseEnter + + + + + InternalMouseLeave + + + + + InternalMouseDown + + + + + + InternalMouseUp + + + + + + ToString + + + + + + Dispose + + + + + Returns copy of the item. + + + + + Copies specific properties to new instance of the item. + + New SuperTabItem instance + + + + Occurs when text markup link is clicked + + + + + Occurs when the tab colors have changed + + + + + IsMarkupSupported + + + + + Gets or sets the default SelectedTabFont + + + + + Gets the tab CloseButton Bounds + + + + + Gets or sets the CloseButtonMouseOver state + + + + + Gets or sets the CloseButtonPressed state + + + + + Gets the effective image alignment + + + + + Gets the tab Image Bounds + + + + + Gets the tabs vertical orientation + + + + + Gets the TabItemDisplay + + + + + Gets the tabs TabStrip + + + + + Gets the tabs Text Bounds + + + + + Gets or sets whether image animation is enabled + + + + + Gets or sets user specified tab display colors + + + + + Gets or sets whether Close button on the tab is visible when SuperTabStrip.CloseButtonOnTabsVisible property is set to true + + + + + Enabled + + + + + Gets or sets whether text-markup support is enabled for the control's Text property + + + + + Gets or sets the FixedTabSize + + + + + Gets or sets the tab icon. Icon has same functionality as Image except that it supports Alpha blending + + + + + Gets or sets the tab image + + + + + Gets or sets the tab image index + + + + + Gets or sets the alignment of the Image within the tab + + + + + Gets or sets the spacing between content and edges of the Image + + + + + Gets or sets the predefined color for the tab + + + + + Gets or sets the selected tab Font + + + + + StartsNewTabLine + + + + + Gets the realized symbol string. + + + + + Indicates the symbol displayed on face of the button instead of + the image. Setting the symbol overrides the image setting. + + + + + Gets or sets the symbol set used to represent the Symbol. + + + + + Gets or sets the color of the Symbol. + + + + + Indicates the size of the symbol in points. + + + + + Gets or sets the text alignment + + + + + Gets or sets the tab Font + + + + + Gets or sets the tab text + + + + + Gets or sets the control that is attached to this tab + + + + + Gets or sets the tab Bounds + + + + + Gets the MouseOver state + + + + + Gets the tab selected state + + + + + Gets the tab alignment + + + + + Gets the tab Content Rectangle + + + + + Gets or sets the tab TabStripItem + + + + + Gets or sets the tabs TabStyle + + + + + Visible + + + + + Alignment + + + + + + + + + TopLeft + + + + + TopCenter + + + + + TopRight + + + + + MiddleLeft + + + + + MiddleCenter + + + + + MiddleRight + + + + + BottomLeft + + + + + BottomCenter + + + + + BottomRight + + + + + Tab area parts + + + + + Tab states + + + + + Constructor + + + + + Required designer variable. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + ShowWithoutActivation + + + + + Constructor + + + + + Hooks or unhooks TabStripItem events + + true to hook + + + + TabStripItem_TabItemOpen + + + + + + + TabStripItem_TabItemClose + + + + + + + TabStripItem_TabRemoved + + + + + + + TabStripItem_TabMoving + + + + + + + TabStripItem_TabMoved + + + + + + + TabStripItem_GetTabItemPath + + + + + + + TabStripItem_GetTabItemContentRectangle + + + + + + + TabStripItem_BeforeTabDisplay + + + + + + + TabStripItem_MeasureTabItem + + + + + + + TabStripItem_PreRenderTabItem + + + + + + + TabStripItem_PostRenderTabItem + + + + + + + TabStripItem_GetTabCloseBounds + + + + + + + TabStripItem_GetTabImageBounds + + + + + + + TabStripItem_GetTabTextBounds + + + + + + + TabStripItem_TabStripPaintBackground + + + + + + + TabStripItem_SelectedTabChanging + + + + + + + TabStripItem_SelectedTabChanged + + + + + + + TabStripItem_TabStripTabColorChanged + + + + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Performs layout recalculation + + + + + Ensures that the given tab is visible on the TabStrip + + + + + + Gets the SuperTabItem from the given Point + + + SuperTabItem or null + + + + Gets the BaseItem from the given Point + + + BaseItem or null + + + + Closes the given tab + + + + + + Selects the previous tab + + true if successful + + + + Selects the next tab + + true if successful + + + + OnResize processing + + + + + + BeginInit + + + + + EndInit + + + + + Occurs when a tab is added to the Tabs collection + + + + + Occurs when a tab is about to Close + + + + + Occurs when a tab is removed from the Tabs collection + + + + + Occurs when a tab is about to be displayed + + + + + Occurs when a tab is being moved or dragged by the user + + + + + Occurs when a tab has been moved or dragged by the user + + + + + Occurs when the Selected tab is changing + + + + + Occurs when the Selected tab has changed + + + + + Occurs when the control needs a tab's bordering path + + + + + Occurs when the control needs a tab's Content Rectangle + + + + + Occurs when the control needs to measure a tab + + + + + Occurs before any tab rendering is done + + + + + Occurs After all tab rendering is complete + + + + + Occurs when the control needs to get the tab's Text Bounds + + + + + Occurs when the control needs to get the tab's Image Bounds + + + + + Occurs when the control needs to get the tab's Close Button Bounds + + + + + Occurs when the TabStrip background needs painted + + + + + Occurs when the TabStrip TabColor has changed + + + + + Gets or sets whether the control attached to the TabItem.AttachedControl property + is automatically selected when TabItem becomes the selected tab. Default value is true. + + + + + Gets or sets whether tabs are automatically closed when a close button is clicked + + + + + Gets or sets whether the tab's visible close button is displayed for every tab state + + + + + Gets or sets whether close button is visible on each tab + + + + + Gets or sets the position of the tab close button + + + + + Gets or sets the custom tab Close button image + + + + + Gets or sets the custom Close button image that is used on tabs when the mouse is over the close button + + + + + Gets or sets the custom Close button image that is used on tabs when the button has been pressed + + + + + Gets the TabStrip ControlBox + + + + + Gets or sets whether the only Text displayed is for the SelectedTab + + + + + Gets or sets the default alignment of the Image within the tab + + + + + Gets or sets BaseItem tab padding in pixels. + + + + + Gets or sets whether vertical tab text is rotated 180 degrees + + + + + Gets or sets the fixed tab size in pixels. Either Height, Width, or both can be set + + + + + Gets or sets whether a tab is currently in a drag operation + + + + + Gets or sets whether tabs can be reordered through the user interface + + + + + Gets or sets the selected tab + + + + + Gets or sets the selected tab Font + + + + + Gets or sets the index of the selected tab + + + + + Gets or sets the tab alignment within the Tab-Strip control + + + + + Gets or sets the tab Font + + + + + Gets or sets the Horizontal spacing around tab elements + + + + + Gets or sets the type of the tab layout + + + + + Gets the collection of Tabs + + + + + Gets or sets the Color of the TabStrip + + + + + Gets or sets the tab style + + + + + Gets or sets the Vertical spacing around tab elements + + + + + Gets the TabStrip associated TabStripItem + + + + + Gets or sets tab text alignment + + + + + Gets whether the tabStrip is visually available + + + + + Gets the Design state for the control + + + + + Gets the ISupportInitialize state + + + + + Gets the TabDisplay + + + + + Gets or sets the reference to ribbon application button when tab control is used as backstage ribbon control. + + + + + Gets the DefaultSize + + + + + Constructor + + Associated SuperTabStrip + + + + Syncs the Orientation of each SubItem to + the current TabAlignment Orientation + + + + + Gets the Orientation based upon the current + TabAlignment + + + + + + Makes sure all newly added items + are set to the design orientation and style + + + + + + Applies the current TabStyle to each tab and + sets the item style to the DotNetBarStyle from the TabStyle + + + + + Gets the DotNetBarStyle from the SuperTabStyle + + eDotNetBarStyle + + + + Hooks or unhooks our events + + + + + + Handles SubItemsChanged events + + + + + + + Handles newly added items + + + + + + Handles newly removed items + + + + + + Handles tab color changes + + + + + + + Handles color table changes + + + + + + + Performs NeedRecalcSize and refresh + + + + + Recalculates the size of the tabs. + + + + + Ensures that the given item is visible on the TabStrip + + + + + + Selects the given tab + + + + + + + Selects the previous tab + + + + + + Selects the previous tab + + + + + + Selects the next tab + + + + + + Selects the next tab + + + + + + UpdateSelectedTab + + + + + OnTabStyleChanged + + + + + OnMeasureTabItem + + + + + + + + + OnPreRenderTabItem + + + + + + + + OnPostRenderTabItem + + + + + + + OnGetTabItemContentRectangle + + + + + + + OnGetTabItemPath + + + + + + + OnSelectedTabRemoved + + + + + + + OnSelectedTabChanging + + + + + + + + OnSelectedTabChanged + + + + + + + + OnBeforeTabDisplay + + + + + + OnTabItemClose + + + + + + + OnTabStripColorChanged + + + + + OnPaintBackground + + + + + + + OnGetTextBounds + + + + + + + + OnGetImageBounds + + + + + + + + OnGetCloseBounds + + + + + + + + OnTabMoving + + + + + + + + + OnTabMoved + + Tab that was moved + Old tab order + New tab order + + + + + ItemAtLocation + + + + + + + + InternalClick + + + + + + + InternalMouseDown + + + + + + InternalMouseUp + + + + + + InternalMouseMove + + + + + + InternalOnMouseMove + + + + + + ProcessMouseMove + + + + + + HotTabMouseMove + + + + + + + ControlBoxMouseMove + + + + + + ProcessTabMove + + + + + + StartTabMove + + + + + + + SetDragWindowRegion + + + + + TabDragWindow_Paint + + + + + + + InternalMouseLeave + + + + + InternalOnMouseLeave + + + + + Get the tab at the given Point + + + SuperTabItem or null + + + + Gets the item at the given point + + + BaseItem or null + + + + Gets the next visible Tab + + + SuperTabItem + + + + Closes the given tab + + + + + + Paint processing + + + + + + SubItemSizeChanged + + + + + + Returns copy of the item. + + + + + Copies specific properties to new instance of the item. + + New SuperTabStripItem instance + + + + Occurs when a tab is added to the Tabs collection + + + + + Occurs when a tab is about to Close + + + + + Occurs when a tab is removed from the Tabs collection + + + + + Occurs when a tab is about to be displayed + + + + + Occurs when a tab is being moved or dragged by the user + + + + + Occurs when a tab has been moved or dragged by the user + + + + + Occurs when the Selected tab is changing + + + + + Occurs when the Selected tab has changed + + + + + Occurs when the control needs a tab's bordering path + + + + + Occurs when the control needs a tab's Content Rectangle + + + + + Occurs when the control needs to measure a tab + + + + + Occurs before any tab rendering is done + + + + + Occurs After all tab rendering is complete + + + + + Occurs when the control needs to get the tab's Text Bounds + + + + + Occurs when the control needs to get the tab's Image Bounds + + + + + Occurs when the control needs to get the tab's Close Button Bounds + + + + + Occurs when the TabStrip background needs painted + + + + + Occurs when the TabStrip TabColor has changed + + + + + Occurs when the TabStrip Color has changed + + + + + Gets or sets AutoCloseTabs + + + + + Gets or sets whether the control attached to the TabItem.AttachedControl property + is automatically selected when TabItem becomes the selected tab. Default value is true. + + + + + Gets or sets TabCloseButtonNormal + + + + + Gets or sets TabCloseButtonHot + + + + + Gets or sets TabCloseButtonPressed + + + + + Gets or sets TabHorizontalSpacing + + + + + Gets or sets TabVerticalSpacing + + + + + Gets or sets CloseButtonOnTabsVisible + + + + + Gets or sets CloseButtonOnTabsAlwaysDisplayed + + + + + Gets or sets CloseButtonPosition + + + + + Gets the ControlBox + + + + + Gets or sets DisplaySelectedTextOnly + + + + + Gets or set the Expanded state + + + + + Gets or sets the tab font + + + + + Gets or sets the selected tab font + + + + + Gets or sets the HorizontalText + + + + + Gets or sets the default alignment of the Image within the tab + + + + + Gets or sets the BaseItem tab padding. + + + + + Gets or sets RotateVerticalText + + + + + Gets or sets ShowFocusRectangle + + + + + Gets or sets the FixedTabSize + + + + + Gets or sets + + + + + Gets the MinTabStripHeight + + + + + Gets or sets ReorderTabsEnabled + + + + + Gets or sets the selected tab + + + + + Gets or sets the selected tab index + + + + + Gets or sets the tab alignment + + + + + Gets or sets the TabLayoutType + + + + + Gets or sets the TabStripColor + + + + + Gets or sets the TabStyle + + + + + Gets or sets the TextAlignment + + + + + Gets the First Visible Tab + + + + + Gets the HotTab + + + + + Gets the InsertTab + + + + + Gets whether to insert before or after + + + + + Gets the MouseOver tab + + + + + Gets TabStrip vertical orientation + + + + + Gets the Last Visible Tab + + + + + Gets the tab close button size + + + + + Gets the TabDisplay + + + + + Gets or sets the TabItemsBounds + + + + + Gets or sets the number of TabLines + + + + + Gets the TabStrip + + + + + Gets the visible tab count + + + + + Gets or sets the promoted visible tab + + + + + Generic ValueChangingEventArgs + + oldValue type + newValue type + + + + Gets the old value + + + + + Gets the new value + + + + + Generic ValueChangingSourceEventArgs + + oldValue type + newValue type + EventSource + + + + Gets the old value + + + + + Gets the new value + + + + + Gets the eventSource + + + + + Generic ValueChangedEventArgs + + oldValue type + newValue type + + + + Gets the old value + + + + + Gets the new value + + + + + Generic ValueChangedSourceEventArgs + + oldValue type + newValue type + EventSource + + + + Gets the old value + + + + + Gets the new value + + + + + Gets the eventSource + + + + + Gets the tab + + + + + Gets the tab + + + + + Gets the old order of the tabs + + + + + Gets or sets the new order of the tabs + + + + + TabStripTabColorChangedEventArgs + + + + + Constructor + + + + + Constructor + + Associated SuperTabStripItem + + + + Resizes the content block and sets it's Bounds property to reflect new size. + + Content block to resize. + + + + + Measures the given tab + + + + + + + Measures the markup text + + + + + + + + + Measures the given text + + + + + + + + + Finalizes the layout + + + + + + + + + Reorders the lines to keep the selected tab as line 0. + + + + + + + Adjusts the line layout + + + + + + + Gets the array od line sizes + + + + + + + Adjusts the individual blocks within a given line + + + + + + + Sets the Displayed status for the line blocks + + + + + + + Gets the count of BeginBreak groups + + + + + + + + Process item BeginBreaks + + + + + + + + + Makes sure the "VisibleTab" is in fact visible. + + + + + + + Determines what line th selected tab lies within + + + + + + + Finds the SelectedTab block + + + + + + + Resizes single line layouts + + + + + + Resizes multiline layouts + + + + + + gets or sets the FixedTabSize + + + + + Gets or sets the TabLayoutOffset + + + + + Gets the TabDisplay + + + + + Creates the tab item GraphicsPath + + Tab path + + + + Create the Top tab path + + GraphicsPath + + + + Creates the Bottom tab path + + GraphicsPath + + + + Creates the Left tab path + + GraphicsPath + + + + Create the Right tab path + + GraphicsPath + + + + Applies the predefined tab color to the color table + + + + + + + Applies the predefined color to the panel color table + + + + + + Constructor + + Associated SuperTabStripItem + + + + Gets the TabLayoutOffset + + + + + Constructor + + Associated SuperTabItem + + + + Returns the tab ContentRectangle + + + + + + Creates the tab item GraphicsPath + + Tab path + + + + Create the Top tab path + + GraphicsPath + + + + Creates the Bottom tab path + + GraphicsPath + + + + Creates the Left tab path + + GraphicsPath + + + + Create the Right tab path + + GraphicsPath + + + + Constructor + + Associated SuperTabStripItem + + + + Gets the LayoutManager NextBlockPosition + + + + + + Gets the PromoteSelectedTab NextBlockPosition + + + + + + + + Gets the TabOverlap + + + + + Gets the TabSpacing + + + + + Gets the TabOverlapLeft + + + + + Gets the TabLayoutOffset + + + + + Gets the MinTabSize + + + + + Constructor + + Associated SuperTabItem + + + + Creates the tab item GraphicsPath + + Tab path + + + + Create the Top tab path + + GraphicsPath + + + + Creates the Bottom tab path + + GraphicsPath + + + + Creates the Left tab path + + GraphicsPath + + + + Create the Right tab path + + GraphicsPath + + + + Constructor + + Associated SuperTabStripItem + + + + Gets the Layout manager NextBlockPosition + + + + + + Gets the "PromoteSelTab" NextBlockPosition + + + + + + + + Raises ValueChanging event. + + Provides event arguments. + + + + Raises ValueChanged event. + + Provides event arguments. + + + + Forces the button to perform internal layout. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Cancels animation if in progress. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Sets the value of the control with state transition animation (if enabled) and specifies the source of the action. + + New value for Value property. + Source of the action. + + + + Sets the value of the control and specifies the source of the action. + + New value for Value property. + Source of the action. + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Raises ValueObjectChanged event. + + Provides event arguments. + + + + Called when Command property value changes. + + + + + Occurs before Value property has changed and it allows you to cancel the change. + + + + + Occurs after Value property has changed. + + + + + Gets or sets the switch value. + + + + + Gets or sets the item border color. + + + + + Gets or sets whether state transition animation is enabled. + + + + + Gets or sets the color of the OFF state background. + + + + + Gets or sets the color of the ON state background. + + + + + Gets or sets the color of the ON state text. + + + + + Gets or sets the color of the OFF state text. + + + + + Gets or sets the border color of the button switch. + + + + + Gets or sets the background color of the switch button. + + + + + Gets or sets the text color. + + + + + Gets or sets the font that is used to draw ON/OFF text on the switch button. + + + + + Gets or sets the text that is displayed on switch when Value property is set to true. + + + + + Gets or sets the text that is displayed on switch when Value property is set to false. + + + + + Gets or sets the width in pixels of the switch part of the button. Minimum value is 6. + + + + + Gets the switch bounds. + + + + + Gets the On part of the switch button bounds excluding the SwitchBounds. + + + + + Gets the Off part of the switch button bounds excluding the SwitchBounds. + + + + + Gets or sets whether button is in read-only state meaning that it appears as enabled but user cannot change its state. + + + + + Gets or sets whether lock marker is visible on face of the control when IsReadOnly is set to true. + Default value is true. + + + + + Gets or sets the color of the read-only marker. + + + + + Indicates whether clicking left mouse button on the switch part of the item will toggle the switch Value. + + + + + Occurs after ValueObject property changes. + + + + + Gets or sets the object that represents the Value state of control. + + + + + Gets or sets the value that represents the True state of control when ValueObject property is set to that value. + + + + + Gets or sets the value that represents the False state of control when ValueObject property is set to that value. + + + + + Gets or sets the command assigned to the item. Default value is null. + Note that if this property is set to null Enabled property will be set to false automatically to disable the item. + + + + + Gets or sets user defined data value that can be passed to the command when it is executed. + + + + + Represents the switch button UI element. + + + + + Raises ValueChanging event. + + Provides event arguments. + + + + Raises ValueChanged event. + + Provides event arguments. + + + + Creates new instance of SwitchButtonItem. + + + + + Creates new instance of SwitchButtonItem and assigns the name to it. + + Item name. + + + + Creates new instance of SwitchButtonItem and assigns the name and text to it. + + Item name. + item text. + + + + Returns copy of the item. + + + + + Copies the SwitchButtonItem specific properties to new instance of the item. + + New SwitchButtonItem instance. + + + + Copies the SwitchButtonItem specific properties to new instance of the item. + + New SwitchButtonItem instance. + + + + Sets the value of the control and specifies the source of the action. + + New value for Value property. + Source of the action. + + + + Sets the value of the control with state transition animation (if enabled) and specifies the source of the action. + + New value for Value property. + Source of the action. + + + + Cancels any current inprogress animation. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Gets whether property should be serialized. + + + + + Resets property to its default value. + + + + + Occurs before Value property has changed and it allows you to cancel the change. + + + + + Occurs after Value property has changed. + + + + + Gets whether item supports text markup. Default is false. + + + + + Gets or sets whether text-markup support is enabled for items Text property. Default value is true. + Set this property to false to display HTML or other markup in the item instead of it being parsed as text-markup. + + + + + Gets or sets the text associated with this item. + + + + + Gets or sets the switch value. + + + + + Indicates whether clicking left mouse button on the switch part of the item will toggle the switch Value. + + + + + Gets the switch bounds. + + + + + Gets the button bounds. + + + + + Gets the On part of the switch button bounds excluding the SwitchBounds. + + + + + Gets the Off part of the switch button bounds excluding the SwitchBounds. + + + + + Gets or sets the switch offset from its initial position. Used for animation and dragging of the switch. + + + + + Gets whether switch part of the button is pressed using mouse left button. + + + + + Gets or sets the width in pixels of the switch part of the button. Minimum value is 6. + + + + + Gets or sets the text that is displayed on switch when Value property is set to true. + + + + + Gets or sets the text that is displayed on switch when Value property is set to false. + + + + + Gets whether fade effect is enabled. + + + + + Gets or sets whether state transition animation is enabled. + + + + + Gets or sets the width of the switch button. Must be greater than SwitchWidth. + + + + + Gets or sets the height of the switch button. Must be greater than 5. + + + + + Gets or sets text padding. + + + + + Gets or sets switch margin. + + + + + Gets or sets the color of the OFF state background. + + + + + Gets or sets the color of the ON state background. + + + + + Gets or sets the color of the ON state text. + + + + + Gets or sets the color of the OFF state text. + + + + + Gets or sets the item border color. + + + + + Gets or sets the border color of the button switch. + + + + + Gets or sets the background color of the switch button. + + + + + Gets or sets whether caption/label set using Text property is visible. + + + + + Gets or sets the text color. + + + + + Gets or sets the font that is used to draw ON/OFF text on the switch button. + + + + + Gets or sets whether button is in read-only state meaning that it appears as enabled but user cannot change its state. + + + + + Gets or sets whether lock marker is visible on face of the control when IsReadOnly is set to true. + Default value is true. + + + + + Gets or sets the color of the read-only marker. + + + + + Provides data for SwitchButton rendering. + + + + + Gets or sets Graphics object group is rendered on. + + + + + Gets or sets the reference to SwitchButtonItem being rendered. + + + + + ColorScheme object that is used to provide colors for rendering check box item in legacy styles like Office 2003. Office 2007 style + uses color tables provided by renderer. + + + + + Indicates whether item is in Right-To-Left environment. + + + + + Gets or sets the text font. + + + + + Gets or sets the ItemPaintArgs reference. + + + + + Creates new instance of the object and provides default values. + + Reference to Graphics object + Reference to SwitchButtonItem + Reference to legacy ColorScheme + Indicates the font for the text. + Indicates whether item is in Right-To-Left environment. + + + + Returns specific font set at specified size/ + + Font size + Symbol set to return + Font + + + + Returns FontAwesome at specific size. + + Font size in points + Font in desired size. + + + + Returns FontAwesome at specific size. + + Font size in points + Font in desired size. + + + + Gets FontAwesome at default size. + + + + + Returns FontAwesome Family. + + + + + Gets Material Font at default size. + + + + + Returns Material Font Family. + + + + + Gets the default size for the Material font size in points. + + + + + Gets the default size for the FontAwesome font size in points. + + + + + Represents colors for the active tab. + + + + + Creates new instance of the object. + + + + + Returns whether property should be serialized. + + true if property should be serialized otherwise false. + + + + Resets property to the default value. + + + + + Returns whether property should be serialized. + + true if property should be serialized otherwise false. + + + + Resets property to the default value. + + + + + Returns whether property should be serialized. + + true if property should be serialized otherwise false. + + + + Resets property to the default value. + + + + + Returns whether property should be serialized. + + true if property should be serialized otherwise false. + + + + Resets property to the default value. + + + + + Returns whether property should be serialized. + + true if property should be serialized otherwise false. + + + + Resets property to the default value. + + + + + Returns whether property should be serialized. + + true if property should be serialized otherwise false. + + + + Resets property to the default value. + + + + + Occurs after color property has changed. + + + + + Gets or sets the background color of the tab when inactive. + + + + + Gets or sets the target gradient background color of the tab when inactive. + + + + + Gets or sets the gradient angle. + + + + + Gets the collection that defines the multi-color gradient background for tab item.. + + + + + Gets or sets the light border color when tab is inactive. + + + + + Gets or sets the dark border color when tab is inactive. + + + + + Gets or sets the border color when tab is inactive. + + + + + Gets or sets the text color when tab is inactive. + + + + + Represents the class that defines colors for a tab control. + + + + + Default constructor. + + + + + Default contructor that accepts style. + + + + + Refreshes colors stored in the color scheme. This method is used for example to refresh the color after system display colors have changed. + + + + + Generates color scheme for flat style. + + + + + Generates color scheme for Office 2003 style. + + + + + Generates the VS2005 document tab like color scheme. + + + + + Generates Windows XP Themed color scheme. + + + + + Generates OneNote style color scheme. + + + + + Generates VS2005 style color scheme. + + + + + Generates OneNote style color scheme. + + + + + Generates OneNote style color scheme. + + + + + Resets changed flag for all color properties. When changed flag is set for a color property color is not automatically generated for that property. + Reseting the flag will ensure that all colors are automatically generated. + + + + + Applies predefinied tab item color scheme to the tab. + + Tab item to apply color to. + Predefined color to apply + + + + Applies predefinied tab item color scheme to the tab. + + Tab item to apply color to. + Predefined color to apply + + + + Gets or sets the style that color scheme represents. + + + + + Gets or sets whether themed color scheme is generated. + + + + + Indicates whether any of the colors has changed. + + + + + Gets or sets the tab-strip background image. + + + + + Specifies the background color of the tab control. + + + + + Specifies the target gradient background color of the tab control. + + + + + Specifies the gradient angle. + + + + + Specifies the border color of the tab control. + + + + + Specifies the background color of the tab panel. + + + + + Specifies the target gradient background color of the tab panel. + + + + + Specifies the gradient angle. + + + + + Specifies the border color of the tab panel. + + + + + Specifies the border color of the tab item. + + + + + Specifies the light border color of the tab item. + + + + + Specifies the dark border color of the tab item. + + + + + Specifies the background color of the tab item. + + + + + Specifies the target gradient background color of the tab item. + + + + + Specifies the gradient angle. + + + + + Gets the collection that defines the multi-color gradient background for tab item.. + + + + + Specifies the text of the tab item. + + + + + Specifies the border color of the tab item when mouse is over it. + + + + + Specifies the light border color of the tab item when mouse is over it. + + + + + Specifies the dark border color of the tab item when mouse is over it. + + + + + Specifies the background color of the tab item when mouse is over it. + + + + + Specifies the target gradient background color of the tab item when mouse is over it. + + + + + Specifies the gradient angle. + + + + + Gets the collection that defines the multi-color gradient background for tab item.. + + + + + Specifies the text color of the tab item when mouse is over it. + + + + + Specifies the border color of the tab item when selected. + + + + + Specifies the light border color of the tab item when selected. + + + + + Specifies the dark border color of the tab item when selected. + + + + + Specifies the background color of the tab item when selected. + + + + + Specifies the target gradient background color of the tab item when selected. + + + + + Specifies the gradient angle. + + + + + Gets the collection that defines the multi-color gradient background for tab item.. + + + + + Specifies the text color of the tab item when selected. + + + + + Specifies the tab item separator color. + + + + + Specifies the tab item separator shadow color. + + + + + Specifies the text of the tab item. + + + + + Summary description for TabControl. + + + + + Required designer variable. + + + + + Clean up any resources being used. + + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Gets whether property should be serialized. Used by Windows Forms designer. + + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Applies default tab colors to the panel + + Panel to apply colors to. + + + + Resumes normal layout logic. Optionally forces an immediate layout of pending layout requests. + + + + + Resizes the portion of the control that holds the tabs. + + + + + Creates new tab and tab panel and adds it to the Tabs collection. + + Tab text. + Reference to newly created TabItem. + + + + Creates new tab and tab panel and inserts it at specified position inside of Tabs collection. + + Tab text. + Index to insert newly created tab at. -1 will append tab to the end of Tabs collection. + Reference to newly created TabItem. + + + + Selects previous visible tab. Returns true if previous tab was found for selection. + + + + + Selects next visible tab. Returns true if next tab was found for selection. + + + + + Resets color scheme to default value. + + + + + Memeber used by Windows Forms designer. + + true if property should be serialized. + + + + Memeber used by Windows Forms designer to reset property to default value. + + + + + Occurs when selected tab changes. + + + + + Occurs before selected tab changes and gives you opportunity to cancel the change. + + + + + Occurs when tab is dragged by user. + + + + + Occurs when the user navigates back using the back arrow. + + + + + Occurs when the user navigates forward using the forward arrow. + + + + + Occurs when tab item is closing. + + + + + Occurs when tab item is added to the tabs collection. + + + + + Occurs before control or item attached to the tab is displayed. + + + + + Occurs after tab item has been removed from tabs collection. + + + + + Gets or sets the background color. + + + + + Gets the collection of all tabs. + + + + + Gets or sets whether tabs are visible. Default value is true. + + + + + Returns reference to internal tab strip control. + + + + + Gets or sets whether TabStrip will get focus when Tab key is used. Default value is false. + + + + + Use TabControlPanel.Style property to set the background image for each tab panel. + + + + + Gets or sets whether pressing Ctrl+Tab keys will cycle through the selected tabs. Default value is true. + + + + + Gets or sets whether tabs use anti-alias smoothing when painted. Default value is false. + + + + + Gets or sets whether the tab scrolling is animated. + + + + + Gets or sets whether system box that enables scrolling and closing of the tabs is automatically hidden when tab items size does not exceed the size of the control. + + + + + Specifes whether end-user can reorder the tabs. + + + + + Gets or sets whether tab is automatically closed when close button is clicked. Closing the tab will remove tab being closed from Tabs collection + and it will remove the panel as well. Default value is false which means that tab will not be closed and you should handle TabClose event to + perform desired action as result of user closing the tab. + + + + + Gets or sets whether the Close button that closes the active tab is visible on system box. + + + + + Gets or sets whether close button is visible on each tab instead of in system box. + + + + + Gets or sets whether close button on tabs when visible is displayed for every tab state. Default value is true. When set to false + the close button will be displayed only for selected and tab that mouse is currently over. + + + + + Gets or sets the position of the close button displayed on each tab. Default value is Left. + + + + + Gets or sets custom image that is used on tabs as Close button that allows user to close the tab. + Use TabCloseButtonHot property to specify image that is used when mouse is over the close button. Note that image size must + be same for both images. + Default value is null + which means that internal representation of close button is used. + + + + + Gets or sets custom image that is used on tabs as Close button whem mouse is over the close button. + To use this property you must set TabCloseButtonNormal as well. Note that image size for both images must be same. + Default value is null which means that internal representation of close button is used. + + + + + Gets or sets whether only selected tab is displaying it's text. + + + + + Gets or sets the image list used by tab items. + + + + + Gets or sets scrolling offset of the first tab. You can use this property to programmatically scroll the tab strip. + + + + + Gets or sets Tab Control style. Theme style is supported only on themed OS and only for bottom or top aligned tabs. + + + + + Specifies whether tab is drawn using Themes when running on OS that supports themes like Windows XP. + + + + + Gets or sets whether tabs are scrolled continuously while mouse is pressed over the scroll tab button. + + + + + Gets or sets the auto-repeat interval for the tab scrolling while mouse button is kept pressed over the scroll tab button. + + + + + Gets or sets Tab Color Scheme. + + + + + Gets or sets the tab alignment within the Tab-Strip control. + + + + + Gets or sets the selected tab. + + + + + Gets or sets the selected tab Font + + + + + Gets or sets whether focus rectangle is displayed on the tab when tab has input focus. + + + + + Gets or sets whether keyboard navigation using Left and Right arrow keys to select tabs is enabled. Default value is true. + + + + + Gets or sets the index of the selected tab. + + + + + Gets or sets selected tab panel. + + + + + Gets or sets the type of the tab layout. + + + + + Indicates whether selected tab is aligned with the panel in multiple lines use case. + + + + + Gets or sets the fixed tab size in pixels. Either Height or Width can be set or both. + Value of 0 indicates that size is automatically calculated which is + default behavior. + + + + + Represents Panel for the Tab Control. + + + + + Default constructor. + + + + + Gets or sets TabItem that this panel is attached to. + + + + + Indicates whether style of the panel is managed by tab control automatically. + Set this to true if you would like to control style of the panel. + + + + + Gets or sets which edge of the parent container a control is docked to. + + + + + Represents the Tab on the Tab-Strip control. + + + + + Default constructor. + + Container object. + + + + Default constructor. + + + + + Returns the font for the tab text. + + Reference to the font object. + + + + Raises the Click event. + + + + + Occurs when mouse is pressed over the tab item. + + + + + Occurs when mouse button is released over the tab item. + + + + + Occurs when mouse hovers over the tab item. + + + + + Occurs when mouse enters the tab item. + + + + + Occurs when mouse leaves the tab item. + + + + + Occurs when mouse moves over the tab item. + + + + + Occurs when mouse click is performed on the tab item. + + + + + Gets the AccessibleObject assigned to the item. + + + + + Gets or sets the tab Image index. + + + + + Gets or sets the tab image. + + + + + Gets or sets the tab icon. Icon has same functionality as Image except that it support Alpha blending. + + + + + Gets or sets the text displayed on the tab. + + + + + Gets or sets whether tab is visible. + + + + + Gets the display bounds of the tab. + + + + + Gets or sets the bounds of the close button rectangle if displayed on the tab. You should not set value of this property. + + + + + Gets or sets the control that is attached to this tab. When tab is selected the control Visible property is set to true and when tab is unselected the control Visible property is set to false. + + + + + Gets or sets the background color of the tab when inactive. + + + + + Gets or sets the target gradient background color of the tab when inactive. + + + + + Gets or sets the gradient angle. + + + + + Gets or sets the light border color when tab is inactive. + + + + + Gets or sets the dark border color when tab is inactive. + + + + + Gets or sets the border color when tab is inactive. + + + + + Gets or sets the text color when tab is inactive. + + + + + Gets or sets name of the tab item that can be used to identify item from the code. + + + + + Gets or sets the predefined tab color. + + + + + Gets or sets an object that contains data to associate with the item. + + + + + Gets/Sets informational text (tooltip) for the tab. + + + + + Returns true if tab is selected tab. + + + + + Gets the tab alignment. + + + + + Returns true if mouse is over the tab. + + + + + Gets or sets whether Close button on the tab is visible when TabStrip.CloseButtonOnTabsVisible property is set to true. Default value is true. You can use this property + to selectively hide Close button on tabs. + + + + + Gets or sets the bounds of the content block. + + + + + Gets or sets item margin only used by certain items in certain containers. Provided only for internal DotNetBar use. + + + + + Summary description for TabItemLayoutManager. + + + + + Resizes the content block and sets it's Bounds property to reflect new size. + + Content block to resize. + + + + Gets or sets the padding in pixels for the measured text. Default is 4. + + + + + Gets or sets the padding in pixels for the measured image size. Default is 4. + + + + + Gets or sets the padding in pixels that is added to the measured height of the tab. Default is 4. + + + + + Gets or sets the padding in pixels that is added to the measured width of the tab. Default is 0. + + + + + Gets or sets whether text is always layed out horizontaly even if tabs are vertically aligned. + + + + + Gets or sets the additional padding for the selected item. + + + + + Gets or sets the fixed tab size in pixels. Either member can be set. Value of 0 indicates that size is automatically calculated which is + default behavior. + + + + + Summary description for TabsCollection. + + + + + Get the TabItem with given name. Name comparison is case insensitive. + + + + + + + Represents Tab-Strip control. + + + + + Raises TabMouseEnter event. + + Provides event arguments. + + + + Raises TabMouseLeave event. + + Provides event arguments. + + + + Raises TabMouseMove event. + + Provides event arguments. + + + + Raises TabMouseClick event. + + Provides event arguments. + + + + Raises TabMouseHover event. + + Provides event arguments. + + + + Default constructor. + + + + + Returns the bounds of the tab system box if one is available in current tab style. + + Rectangle describing the system box bounds. + + + + Recalculates the size of the tabs. + + + + + Selectes previous visible tab. Returns true if previous tab was found for selection. + + + + + Selectes next visible tab. Returns true if next tab was found for selection. + + + + + Invokes the TabCleared event. + + Provides events arguments + + + + Ensures that the tab is visible, scrolling the tab-strip view as necessary. + + Tab to make visible. + + + + Clean up any resources being used. + + + + + Called by StyleManager to notify control that style on manager has changed and that control should refresh its appearance if + its style is controlled by StyleManager. + + New active style. + + + + Refreshes the color scheme with the colors from system color table. + + + + + Resets color scheme to default value. + + + + + Memeber used by Windows Forms designer. + + true if property should be serialized. + + + + Memeber used by Windows Forms designer to reset property to default value. + + + + + Returns tab item that contains specified coordinates. + + X - coordinate to hit test + Y - coordinate to hit test + + + + + Hides tooltip for a tab is one is displayed. + + + + + Shows tooltip for given tab. + + + + + Resets Hoover timer. + + + + + Occurs after selected tab has changed. + + + + + Occurs before selected tab changes and gives you opportunity to cancel the change. + + + + + Occurs when tab is dragged by user. + + + + + Occurs when the user navigates back using the back arrow. + + + + + Occurs when the user navigates forward using the forward arrow. + + + + + Occurs when tab item is closing. + + + + + Occurs when tab item is added to the tabs collection. + + + + + Occurs before control or item attached to the tab is displayed. + + + + + Occurs after tab item has been removed from tabs collection. + + + + + Occurs after Tabs collection has been cleared. + + + + + Occurs after the tab item size has been determined and allows you to apply your custom size to the TabItem. + + + + + Occurs before tab is rendered and allows you to cancel default tab rendering performed by the control. + + + + + Occurs after tab is rendered and allows you to render on top of the default rendering performed by the control. + + + + + Occurs when mouse enters a tab. + + + + + Occurs when mouse leaves a tab. + + + + + Occurs when mouse moves over the tab. + + + + + Occurs when mouse clicks the tab. + + + + + Occurs when mouse hovers over the tab. + + + + + Gets or sets whether anti-alias smoothing is used while painting. Default value is false. + + + + + Returns minimum tab strip height given the style and the tabs it contains. + + + + + Returns the rectangle that contains all the tabs. + + + + + Gets or sets the index of currently selected tab. + + + + + Gets or sets the selected tab. + + + + + Gets or sets whether tabs are scrolled continuously while mouse is pressed over the scroll tab button. + + + + + Gets or sets the auto-repeat interval for the tab scrolling while mouse button is kept pressed over the scroll tab button. + + + + + Gets or sets whether the Close button that closes the active tab is visible. + + + + + Gets or sets whether close button is visible on each tab instead of in system box. + + + + + Gets or sets whether close button on tabs when visible is displayed for every tab state. Default value is true. When set to false + the close button will be displayed only for selected and tab that mouse is currently over. + + + + + Gets or sets the position of the close button displayed on each tab. Default value is Left. + + + + + Gets or sets custom image that is used on tabs as Close button that allows user to close the tab. + Use TabCloseButtonHot property to specify image that is used when mouse is over the close button. Note that image size must + be same for both images. + Default value is null + which means that internal representation of close button is used. + + + + + Gets or sets custom image that is used on tabs as Close button whem mouse is over the close button. + To use this property you must set TabCloseButtonNormal as well. Note that image size for both images must be same. + Default value is null which means that internal representation of close button is used. + + + + + Gets the collection of all tabs. + + + + + Gets or sets whether control attached to the TabItem.AttachedControl property is automatically selected when TabItem becomes selected tab. Default value is true. + + + + + Gets or sets the image list used by tab items. + + + + + Indicates whether selected tab is aligned with the panel in multiple lines use case. + + + + + Gets or sets the type of the tab layout. + + + + + Gets or sets whether tab size is adjusted to fit the available control size. + + + + + Gets or sets scrolling offset of the first tab. You can use this property to programmatically scroll the tab strip. + + + + + Gets or sets whether keyboard navigation using Left and Right arrow keys to select tabs is enabled. Default value is true. + + + + + Gets or sets the mouse cursor that is displayed when tab is dragged. + + + + + Returns tab mouse is over or null if mouse is not over the tab. + + + + + Gets or sets the selected tab Font + + + + + Gets or sets the tab alignment within the Tab-Strip control. + + + + + Specifes whether end-user can reorder the tabs. + + + + + Gets or sets whether system box that enables scrolling and closing of the tabs is automatically hidden when tab items size does not exceed the size of the control. + + + + + Gets or sets the background color. + + + + + Gets or sets whether only selected tab is displaying it's text. + + + + + Gets or sets TabStrip style. Theme style is supported only on themed OS and only for bottom or top aligned tabs. + + + + + Specifies whether tab is drawn using Themes when running on OS that supports themes like Windows XP. + + + + + Gets whether control should be represented in themed style. + + + + + Gets or sets Tab Color Scheme. + + + + + Gets or sets whether the tab scrolling is animanted. + + + + + Gets or sets the fixed tab size in pixels. Either Height or Width can be set or both. + Value of 0 indicates that size is automatically calculated which is + default behavior. + + + + + Gets or sets whether focus rectangle is displayed when tab has input focus. + + + + + Gets or sets whether Tab-Strip control provides Tabbed MDI Child form support. Default value is false. + + + + + Gets or sets the maximum number of characters that will be used as Tab text from Mdi Child caption. + + + + + Gets or sets whether the Mdi Child Icon is displayed on Tab. + + + + + Gets or sets whether the Tab-strip is automatically hidden when there are not Mdi Child forms open. + + + + + Gets or sets whether flicker associated with switching maximized Mdi child forms is attempted to eliminate. You should set this property to false if you encounter any painting problems with your Mdi child forms. + + + + + Gets or sets Mdi Container form for which Tab-Strip is providing Tabbed MDI Child support. + + + + + Event delegate for SelectedTabChanged event. + + + + + Event delegate for SelectedTabChanging event. + + + + + Event delegate for TabMoved event + + + + + Event delegate for NavigateBack, NavigateForward and TabItemClose events. + + + + + Represents the event arguments for tab selection events. + + + + + Currently selected tab. + + + + + Tab being selected. + + + + + Specifies the action that caused the event. + + + + + Default constructor. + + Currently selected tab. + New selection. + + + + Represents the event arguments for tab selection events. + + + + + Currently selected tab. + + + + + Tab being selected. + + + + + Cancels the selection operation. + + + + + Specifies the action that caused the event. + + + + + Default constructor. + + Currently selected tab. + New selection. + + + + Represents the event arguments for tab moving events. + + + + + Tab being moved. + + + + + Moved from index. + + + + + Moving to index. + + + + + Cancels the operation. + + + + + Default Constructor + + Tab + Old Index + New Index + + + + Represents the event arguments for action events. + + + + + Cancels the operation. + + + + + Reference to relevant TabItem, if any, otherwise null/nothing. + + + + + Default Constructor. + + + + + Destroys tooltip window. + + + + + Specifies the tab alignment inside the Tab-Strip control. + + + + + Tabs are left aligned. + + + + + Tabs are right aligned. + + + + + Tabs are top aligned. + + + + + Tabs are bottom aligned. + + + + + Indicates tab strip style. + + + + + Default VS.NET like flat style. + + + + + Office 2003 like style. + + + + + OneNote like style. + + + + + VS.NET 2005 style tabs. + + + + + Tab style where tabs are centered and first and last tab have the corners rounded. This style does not support multi-line tabs or tab scrolling. + + + + + VS.NET 2005 dock style tabs. + + + + + VS.NET 2005 document style tabs. + + + + + Simulated theme style with the horizontal text alignment at all times. + + + + + Office 2007 document style. + + + + + Office 2007 dock style. + + + + + Metro UI style. + + + + + Defines delegate for the MeasureTabItem event. + + + + + Represents event arguments for MeasureTabItem event. + + + + + Gets the TabItem that is being measured. + + + + + Gets or sets the size of the TabItem. The default size calculated by the control will be set by default. You can inspect it and change it to the + custom size by setting this property. + + + + + Creates new instance of the class and initializes it with default values. + + TabItem being measured. + Default size. + + + + Defines delegate for the PreRenderTabItem and PostRenderTabItem events. + + + + + Represents event arguments for PreRenderTabItem and PostRenderTabItem event. + + + + + Gets the reference to the TabItem being rendered. You can use properties like DisplayRectangle to determine the rendering bounds for the tab. + + + + + When used in PreRenderTabItem event allows you to cancel the default rendering by setting this property to true. + + + + + Gets the reference to the Graphics object to render the tab on. + + + + + Creates new instance of the class and initializes it with default values. + + Default value for TabItem property. + Default value for Graphics property. + + + + Represents base class for tab display. + + + + + Main method for painting. + + Reference to graphics object + TabStrip to paint + + + + Gets or sets whether anti-alias is used for painting the tabs. Default value is true. + + + + + Gets or sets whether text is drawn horizontaly regardless of tab orientation. + + + + + Gets or sets whether close button is painted on each tab. + + + + + Provides display capabilities for TabStrip with Office 2007 Dock style. + + + + + Provides display capabilities for TabStrip with Office 2007 Document style. + + + + + Creates new instance of the class. + + + + + Represents class performing the display of tabs with RoundHeader style. + + + + + Provides display support for SimualtedTheme tab style. + + + + + Provides display capabilites for TabStrip with VS2005Dock style. + + + + + Creates new instance of the class. + + + + + Represent a task-dialog message box window. + + + + + Displays TaskDialog message. + + Title of the window. + Task dialog header. + Task dialog text. + Displayed buttons. + Result from task-dialog. + + + + Displays TaskDialog message. + + Title of the window. + Task dialog header. + Task dialog text. + Displayed buttons. + Specifies the predefined color for the dialog. + Result from task-dialog. + + + + Displays TaskDialog message. + + Title of the window. + Icon displayed on dialog. + Task dialog header. + Task dialog text. + Displayed buttons. + Result from task-dialog. + + + + Displays TaskDialog message. + + Title of the window. + Icon displayed on dialog. + Task dialog header. + Task dialog text. + Displayed buttons. + Specifies the predefined color for the dialog. + Result from task-dialog. + + + + Displays TaskDialog message. + + Specifies the content of the task dialog. + Result from task-dialog. + + + + Displays TaskDialog message. + + Window owner of the task dialog. + Specifies the content of the task dialog. + Result from task-dialog. + + + + Closes the task dialog if it is open with eTaskDialogResult.None result. + + + + + Closes the task dialog if it is open with specified result value. + + Value that will be used as return value from Show method. + + + + Gets or sets whether TaskDialog form has Windows Vista Glass enabled if running on + Windows Vista with Glass enabled. Default value is true. + + + + + Gets or sets the anti-alias text-rendering setting for the controls on task-dialog. Default value is true. + + + + + Occurs when any text markup link on Task-Dialog Box is clicked. Markup links can be created using "a" tag, for example: + Markup link + + + + + Specifies the information displayed on task-dialog. + + + + + Initializes a new instance of the TaskDialogInfo structure. + + Title of dialog. + Task-dialog icon + Header text. + Dialog main/content text. + Dialog buttons displayed. + Dialog background color. + Radio Button Commands + Button commands. + Check-box command. + Footer text + Footer image. + + + + Initializes a new instance of the TaskDialogInfo structure. + + Title of dialog. + Task-dialog icon + Header text. + Dialog main/content text. + Dialog buttons displayed. + Dialog background color. + Radio Button Commands + Button commands. + Check-box command. + Footer text + Footer image. + Indicates whether TaskDialog is top most. + + + + Initializes a new instance of the TaskDialogInfo structure. + + Title of dialog. + Task-dialog icon + Header text. + Dialog main/content text. + Dialog buttons displayed. + Dialog background color. + + + + Initializes a new instance of the TaskDialogInfo structure. + + Title of dialog. + Task-dialog icon + Header text. + Dialog main/content text. + Dialog buttons displayed. + + + + Initializes a new instance of the TaskDialogInfo structure. + + Title of dialog. + Task-dialog icon + Header text. + Dialog main/content text. + Dialog buttons displayed. + + + + Gets or sets the task-dialog window title. + + + + + Gets or sets the task-dialog header. + + + + + Gets or sets the task-dialog text. + + + + + Gets or sets the task-dialog buttons displayed. + + + + + Gets or sets the task-dialog background color. + + + + + Gets or sets the array of commands that will be used to create the radio-buttons displayed on task-dialog. Each command will be executed as radio-buttons are checked by user. + + + + + Gets or sets the array of commands that will be used to create the buttons displayed on task-dialog. Each command will be executed as buttons are clicked by user. + + + + + Gets or sets the footer text displayed on task-dialog. + + + + + Gets or sets the command that is used to initialize the footer check-box. Command will be executed when check-box state changes by end user. + + + + + Gets or sets the icon that is displayed on task dialog. + + + + + Gets or sets the image that is displayed in the task-dialog footer. Expected image size is 16x16 pixels. + + + + + Gets or sets whether TaskDialog form is top-most. Default value is false. + + + + + Gets or sets the TaskDialog default button. + + + + + Indicates whether task dialog form close button is enabled, default value is true. + + + + + Specifies the task dialog buttons. + + + + + OK button will be displayed. + + + + + Yes button will be displayed. + + + + + No button will be displayed. + + + + + Cancel button will be displayed. + + + + + Retry button will be displayed. + + + + + Close button will be displayed. + + + + + Specifies the task dialog return values. + + + + + No button was clicked because dialog was closed using TaskDialog.Close method. + + + + + OK button was clicked. + + + + + Yes button was clicked. + + + + + No button was clicked. + + + + + Cancel button was clicked. + + + + + Retry button was clicked. + + + + + Close button was clicked. + + + + + Specifies the custom result. Custom result can be specified if TaskDialog.Close method is called to close dialog. + + + + + Specifies the custom result. Custom result can be specified if TaskDialog.Close method is called to close dialog. + + + + + Specifies the custom result. Custom result can be specified if TaskDialog.Close method is called to close dialog. + + + + + Define icons available on TaskDialog. + + + + + No icon. + + + + + Blue flag icon. + + + + + Blue stop icon. + + + + + Light bulb, idea icon. + + + + + Check-mark icon. + + + + + Check-mark icon. + + + + + Trash-can delete icon. + + + + + Exclamation icon. + + + + + Flag icon. + + + + + Hand-stop icon. + + + + + Help icon. + + + + + Informational icon. + + + + + Informational icon. + + + + + No entry icon. + + + + + Shield icon. + + + + + Shield help icon. + + + + + Shield OK icon. + + + + + Shield stop icon. + + + + + Stop icon. + + + + + Stop icon. + + + + + Users icons. + + + + + Required designer variable. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Gets or sets the task-background color. + + + + + Gets the task-dialog result + + + + + Gets or sets the anti-alias text-rendering setting for the controls. + + + + + Defines TaskDialog colors. + + + + + Task dialog will use default background as specified by current theme. + + + + + Task dialog will use silver background color. + + + + + Task dialog will use tan background color. + + + + + Task dialog will use dark-blue background color. + + + + + Task dialog will use blue background color. + + + + + Task dialog will use red background color. + + + + + Task dialog will use olive-green background color. + + + + + Task dialog will use purple background color. + + + + + Task dialog will use aqua background color. + + + + + Task dialog will use orange background color. + + + + + Summary description for TextBoxItem. + + + + + Selects all text in text box. + + + + + Indicates whether property should be serialized by Windows Forms designer. + + + + + Resets the property to default value. + + + + + Occurs when ButtonCustom control is clicked. + + + + + Occurs when ButtonCustom2 control is clicked. + + + + + IBlock member implementation + + + + + Gets or sets a value indicating whether the text in the TextBox control should appear as the default password character. + + + + + Gets or sets the character used to mask characters of a password in a single-line TextBox control. + + + + + Gets or sets the text associated with the editable part of the item. + + + + + Gets or sets the item caption text displayed next to the text input. + + + + + Gets or sets the maximum number of characters the user can type or paste into the text box control. + + + + + Gets or sets whether watermark text is displayed when control is empty. Default value is true. + + + + + Gets or sets the watermark image displayed inside of the control when Text is not set and control does not have input focus. + + + + + Gets or sets the watermark image alignment. + + + + + + Gets or sets the watermark font. + + + + + Gets or sets the watermark text color. + + + + + Gets or sets the watermark hiding behaviour. Default value indicates that watermark is hidden when control receives input focus. + + + + + Gets or sets whether FocusHighlightColor is used as background color to highlight text box when it has input focus. Default value is false. + + + + + Gets or sets the color used as background color to highlight text box when it has input focus and focus highlight is enabled. + + + + + Gets or sets the text-alignment inside of the text box. + + + + + Gets the object that describes the settings for the custom button that can execute an custom action of your choosing when clicked. + + + + + Gets the object that describes the settings for the custom button that can execute an custom action of your choosing when clicked. + + + + + Measures the element given available size. + + Size available to element + Reference to graphics object + + + + Measures the end tag of an element. Most implementations do not need to do anything but implementations like the ones + that change color should return state back at this time. + + + + + + + Renders element. + + Provides markup drawing context information. + + + + Renders element tag end. Most implementations do not need to do anything but mplementations like the ones + that change color should return state back at this time. + + Provides markup drawing context information. + + + + Provides final rectangle to element and lets it arrange it's content given new constraint. + + Final rectangle. + + + + + Arranges the element given the final size. Layout is two step process with Measure followed by Arrange. + + + + + + + Returns whether markup element is an container so it receives full available size of parent control for layout. + + + + + Returns whether markup element is an block element that always consumes a whole line in layout. + + + + + Returns whether layout manager switches to new line after processing this element. + + + + + Returns whether layout manager can start new line with this element. + + + + + Gets the collection of child elements if any for this markup element. + + + + + Gets or sets whether element size is valid. When size is not valid element Measure method will be called to validate size. + + + + + Gets element parent or null if parent is not set. + + + + + Gets or sets actual rendering bounds. + + + + + Gets or sets whether markup element is visible. + + + + + Gets or sets the element margin. + + + + + Gets or sets actual rendered bounds for a give markup element if applicable. + + + + + Returns whether markup element is an block element that always consumes a whole line in layout. + + + + + Indicates paragraph content alignment + + + + + Indicates paragraph content alignment + + + + + Gets reference to markup start element. + + + + + Returns whether layout manager can start new line with this element. + + + + + Gets or sets heading level. Values from 1 to 6 are valid. Default is 1. + + + + + Returns whether hyper-link contains specified coordinates. + + + + + + + Creates new instance of the class. + + + + Adds new object to the collection. + + Object to add. + Index of newly added object. + + + + Inserts new object into the collection. + + Position of the object. + Object to insert. + + + + Returns index of the object inside of the collection. + + Reference to the object. + Index of the object. + + + + Returns whether collection contains specified object. + + Object to look for. + true if object is part of the collection, otherwise false. + + + + Removes specified object from the collection. + + + + + + Copies collection into the specified array. + + Array to copy collection to. + Starting index. + + + + Copies contained items to the MarkupElement array. + + Array to copy to. + + + + Gets or sets the collection parent element. + + + + + Returns reference to the object in collection based on it's index. + + + + + Tests whether input text could be markup text. + + Text to test. + true if text could be markup, otherwise false + + + + Gets the style of the hyperlink in its default state. + + + + + Gets the style of the hyperlink when mouse is over the link. + + + + + Gets the style of the visited hyperlink. + + + + + + Represents the method that will handle the ResolveImage event. + + + + + Defines the text-markup hyperlink appearance style. + + + + + Initializes a new instance of the HyperlinkStyle class. + + + + + Initializes a new instance of the HyperlinkStyle class. + + + + + + + Initializes a new instance of the HyperlinkStyle class. + + + + + + + + Gets or sets hyperlink text color. + + + + + Gets or sets hyperlink back color. + + + + + Gets or sets the underline style for the hyperlink. + + + + + Gets whether style has been changed from its default state. + + + + + + Indicates that event has been handled and that ResolvedImage should be used. + + + + + Indicates the string key parameters in url-style for the image that needs to be resolved. + + + + + Indicates the resolved image value. + you need to set this value to the resolved image and you need to set Handled property to true. + + + + + Default constructor. + + + + + Gets or sets whether element size is valid. When size is not valid element Measure method will be called to validate size. + + + + + Returns whether layout manager switches to new line after processing this element. + + + + + Returns whether markup element is an block element that always consumes a whole line in layout. + + + + + Returns whether layout manager can start new line with this element. + + + + + Summary description for Themes. + + + + + Represents toast display control. This class is not for public use. + + + + + Initializes a new instance of the ToastDisplay class. + + + + + Specifies the alpha-blending, opacity for the content rendered by the control. Setting this property allows fading in and out of the control content. + + + + + Gets or sets the toast background color. + + + + + Gets or sets the toast glow color. + + + + + Gets or sets the image displayed on the toast. + + + + + Represents class used to display toast notifications. A toast notification is a message that appears on the surface of the screen for a moment, + but it does not take focus (or pause the current activity), so it cannot accept any user input. + Notification pops up on the surface of the specified Form or Control. + It only fills the amount of space required for the message and the user's current activity remains visible and interactive. + The notification automatically fades in and out after specified time interval. + Notification text supports text-markup. + + + + + Closes all toast notifications open on specified parent control. + + Parent control. + + + + Closes specified toast notification on parent control. + + Parent control. + Toast ID as returned by the Show method. + + + + Updates the already displayed toast text. Note that toast notification will not be resized. + + Parent control which was used to show toast. + Toast ID returned by the Show toast method. + New toast notification text. + + + + Displays the toast notification on top of the specified parent control, we recommend always using a parent form. + + Parent form to display toast notification on top of + Message to display. + Image to display next to toast text. + Interval in milliseconds after which the notification is hidden. + Specifies toast-glow color used. + Specifies the position of the toast notification. + + + + Displays the toast notification on top of the specified parent control, we recommend always using a parent form. + + Parent form to display toast notification on top of + Message to display. + Image to display next to toast text. + Interval in milliseconds after which the notification is hidden. + Specifies toast-glow color used. + Specifies the X position of the toast notification with its parent window. + Specifies the Y position of the toast notification with its parent window. + + + + Displays the toast notification on top of the specified parent control, we recommend always using a parent form. + + Parent form to display toast notification on top of + Message to display. + Image to display next to toast text. + Interval in milliseconds after which the notification is hidden. + /// Specifies toast-glow color used. + + + + Displays the toast notification on top of the specified parent control, we recommend always using a parent form, with default timeout interval. + + Parent control to display toast notification on top of + Message to display. + + + + Displays the toast notification on top of the specified parent control, we recommend always using a parent form, with default timeout interval. + + Parent control to display toast notification on top of + Message to display. + Specifies the position of the toast notification. + + + + Displays the toast notification on top of the specified parent control, we recommend always using a parent form, with default timeout interval. + + Parent control to display toast notification on top of + Message to display. + Image to display next to toast text. + + + + Displays the toast notification on top of the specified parent control, we recommend always using a parent form. + + Parent form to display toast notification on top of + Message to display. + Image to display next to toast text. + Interval in milliseconds after which the notification is hidden. + + + + Displays the toast notification on top of the specified parent control, we recommend always using a parent form. + + Parent form to display toast notification on top of + Message to display. + Interval in milliseconds after which the notification is hidden. + + + + Displays the toast notification on top of the specified parent control, we recommend always using a parent form. + + Parent form to display toast notification on top of + Message to display. + Interval in milliseconds after which the notification is hidden. + Specifies the position of the toast notification. + + + + Specifies the toast margin from the edges of the parent control. Default value is 16 pixels on all sides. + + + + + Specifies the default toast position within the parent control. Default value is BottomCenter. + + + + + Specifies default glow color around toast notification. Default value is Blue. + + + + + Specifies the default timeout interval for the toast notification. + + + + + Specifies the toast background color. + + + + + Specifies the toast text color. + + + + + Specifies the font used for the toast. + + + + + Specifies the custom glow color used when eToastGlowColor.Custom is used. + + + + + Specifies toast position within parent control. + + + + + Specifies the glow color around toast notification. + + + + + Summary description for NewToolbar. + + + + + Required designer variable. + + + + + Clean up any resources being used. + + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Summary description for Tooltip. + + + + + Gets or sets the rectangle of the control or item tooltip is displayed for. + + + + + Gets or sets whether text-markup is enabled for the tooltips. + + + + + Specifies fixed location for tooltip window. + + + + + Raises PanBegin event. + + Provides event arguments. + + + + Raises PanBegin event. + + Provides event arguments. + + + + Raises PanBegin event. + + Provides event arguments. + + + + Raises Begin event. + + Provides event arguments. + + + + Raises End event. + + Provides event arguments. + + + + Raises PressAndTap event. + + Provides event arguments. + + + + Raises RotateBegin event. + + Provides event arguments. + + + + Raises Rotate event. + + Provides event arguments. + + + + Raises RotateEnd event. + + Provides event arguments. + + + + Raises TwoFingerTap event. + + Provides event arguments. + + + + Raises ZoomBegin event. + + Provides event arguments. + + + + Raises Zoom event. + + Provides event arguments. + + + + Raises ZoomEnd event. + + Provides event arguments. + + + + Raises TouchDown event. + + Provides event arguments. + + + + Raises TouchDown event. + + Provides event arguments. + + + + Raises TouchDown event. + + Provides event arguments. + + + + Initializes a new instance of the TouchHandler class. + + + + + + Initializes a new instance of the TouchHandler class. + + + + + + Initializes handler + + + + + The Windows message handler. + + + + + Decode the message and create a collection of event arguments + + + + + The last event in the current gesture event sequence + + + + + Register for touch event + + true if succeeded + + + + The event arguments that started the current gesture + + + + + Gets or sets whether palm rejection is enabled. + + + + + Check if Multi-touch support device is ready + + + + + Gets or sets whether internal touch support is enabled for all DotNetBar controls. + + + + + Create new gesture event instance and decode the gesture info structure + + The gesture handler + The gesture information + + + + Gesture relative rotation angle for Rotate event. + + + + + Indicates calculated gesture center. + + + + + Gesture zoom factor for Zoom event. + + + + + Gesture relative panning translation for Pan event. + + + + + Gesture velocity vector of the pan gesture for custom inertia implementations. + + + + + The last touch arguments in this gesture event sequence. + + + + + The client location of gesture. + + + + + Is this the first event of a gesture. + + + + + It this last event of a gesture. + + + + + Has gesture triggered inertia. + + + + + The first touch arguments in this gesture event sequence. + + + + + Gets or sets whether event is handled. + + + + + EventArgs passed to Touch handlers + + + + + Create new touch event argument instance + + The target control + one of the inner touch input in the message + + + + Touch client coordinate in pixels + + + + + A touch point identifier that distinguishes a particular touch input + + + + + A set of bit flags that specify various aspects of touch point + press, release, and motion. + + + + + mask which fields in the structure are valid + + + + + touch event time + + + + + touch event time from system up + + + + + the size of the contact area in pixels + + + + + Is Primary Contact (The first touch sequence) + + + + + Specifies that movement occurred + + + + + Specifies that the corresponding touch point was established through a new contact + + + + + Specifies that a touch point was removed + + + + + Specifies that a touch point is in range + + + + + specifies that this input was not coalesced. + + + + + Specifies that the touch point is associated with a pen contact + + + + + The touch event came from the user's palm + + Set to true + + + + Gets or sets whether event is handled. + + + + + Get the current Digitizer Status + + + + + Initializes a new instance of the GESTURECONFIG structure. + + + + + + + + Specifies available digitizer capabilities + + + + + Gesture Info Interop Structure + + + + + A Simple POINTS Interop structure + + + + + A Simple POINT Interop structure + + + + + Touch API defined structures [winuser.h] + + + + + Represents class that holds User Interface static methods. + + + + + Gets the graphics path that represents triangle. + + Top left position of the triangle. + Size of the triangle. + Pointing direction of the triangle. + Returns graphics path for the triangle of given size and pointing in given direction. + + + + Creates the double arrow >> collapse expand image for the collapsable controls. + + Indicates the direction of the arrow + Color for the arrows + Indicates whether image is for vertical collapse/expand + + + + + Specifies the pointing direction of triangle. + + + + + Triangle point to the left. + + + + + Triangle point to the right. + + + + + Triangle point to the top. + + + + + Triangle point to the bottom. + + + + + Represents compare validator for SuperValidator control used to compare two input fields or input fields to specified value. + + + + + Represents base validator used by SuperValidator component. + + + + + Validates the input control. + + Input control to validate. + true if validation is successful otherwise false + + + + Gets the input control value. + + Control to return value for. + Controls value + + + + Gets the input control value. + + Control to return value for. + Controls value + + + + Raises the GetValue event. + + Event arguments. + + + + Occurs when validator retrieves the value for the control. It allows you to return value for the controls validator does not recognize. + + + + + Gets or sets the error message that is displayed by error provider when validation fails. + + + + + Gets the last validation result returned from Validate call. True if validation was successful or false if validation failed. + + + + + Returns SuperValidator control validator is assigned to. + + + + + Gets or sets whether error is displayed using the error provider on SuperValidator when validation fails. Default value is true. + + + + + Gets or sets whether validator is enabled. Default value is true. + + + + + Gets or sets the group name validation belongs to. When control belongs to optional validation group the validation is considered successful when any of the controls in the group validates. + + + + + Gets or sets the highlight color for control when validation fails if Highlighter component is used on SuperValidator. Default Value is None. + + + + + Gets or sets the value property name for the control to validate. + + + + + Initializes a new instance of the RequiredFieldValidator class. + + + + + Initializes a new instance of the RequiredFieldValidator class. + + + + + Initializes a new instance of the RequiredFieldValidator class. + + + + + Initializes a new instance of the RequiredFieldValidator class. + + + + + Initializes a new instance of the RequiredFieldValidator class. + + + + + Initializes a new instance of the RequiredFieldValidator class. + + + + + Initializes a new instance of the RequiredFieldValidator class. + + + + + Initializes a new instance of the RequiredFieldValidator class. + + + + + Gets or sets the control to compare validated control to. + + + + + Gets or sets the Value property name for the ControlToCompare control. + + + + + Gets or sets the value to compare to the validation control. + + + + + Gets or sets the operator used for comparison. + + + + + Specifies the validation comparison operators used by the CompareValidator. + + + + + A comparison for equality. + + + + + A comparison for inequality. + + + + + A comparison for greater than. + + + + + A comparison for greater than or equal to. + + + + + A comparison for less than. + + + + + A comparison for less than or equal to. + + + + + A comparison for data type only. + + + + + Initializes a new instance of the CustomValidator class. + + + + + Gets or sets custom data associated with the validator + + + + + Defines delegate for CustomValidator ValidateValue event. + + Sender + Event arguments + + + + Gets the reference to the control to validate. + + + + + Gets or sets whether control's value is valid. + + + + + Initializes a new instance of the ValidateValueEventArgs class. + + Control to validate. + + + + Defines an interface that can be implemented by custom error providers to be used with SuperValidator. + + + + + Sets the error state on the control. + + Control for which error state is being set. + The error message from validator. + + + + Clears the error state for the control. + + Control to clear error state for. + + + + Retrieves whether control is highlighted when it receives input focus. + + + + + Sets whether control is highlighted when it receives input focus. + + Reference to supported control. + Indicates whether to highlight control on focus. + + + + Retrieves the highlight color that is applied to the control. + + + + + Sets the highlight color for the control. + + Reference to supported control. + Highlight color. + + + + Updates the highlighted controls border. Usually call to this method is not needed but under + certain scenarios where highlighter does not automatically detects the change in visibility of + the highlighted control call to this method is necessary. + + + + + Indicates the highlight focus color. + + + + + Gets or sets the container control highlighter is bound to. The container control must be set in order for highlighter to work. + Container control should always be a form. + + + + + Gets or sets the array of colors used to render custom highlight color. Control expects 3 colors in array to be specified which define the highlight border. + + + + + Defines highlight colors provided by Highlighter control. + + + + + Initializes a new instance of the ErrorProviderWrapper class. + + + + + + Initializes a new instance of the ErrorProviderWrapper class. + + + + + + + Initializes a new instance of the HighlightPanel class. + + + + + + Gets or sets the array of colors used to render custom highlight color. Control expects 3 colors in array to be specified which define the highlight border. + + + + + Initializes a new instance of the HighlightRegion structure. + + + + + + + + Initializes a new instance of the RangeValidator class. + + + + + Initializes a new instance of the RangeValidator class. + + + + + Initializes a new instance of the RangeValidator class. + + + + + Gets or sets the maximum value control may have. + + + + + Gets or sets the minimum value control may have. + + + + + Indicates whether empty string of zero length is considered valid input. + + + + + Represents the regular expression validator used with SuperValidator control. + + + + + Initializes a new instance of the RegularExpressionValidator class. + + + + + Initializes a new instance of the RegularExpressionValidator class. + + + + + + Initializes a new instance of the RegularExpressionValidator class. + + + + + + Initializes a new instance of the RegularExpressionValidator class. + + + + + + Gets or sets regular expression used to validate controls value. + + + + + Gets or sets whether empty value is considered valid value by the validator. Default value is false. + + + + + Describes required field validator used with SuperValidator control. + + + + + Initializes a new instance of the RequiredFieldValidator class. + + + + + Initializes a new instance of the RequiredFieldValidator class. + + + + + Initializes a new instance of the RequiredFieldValidator class. + + + + + Raises EvaluateIsEmpty event. + + Event Arguments + + + + Occurs when controls value needs to be evaluated to check whether it is empty. You can use this event to perform custom evaluation. + + + + + Indicates whether empty string of zero length is considered valid input. + + + + + Initializes a new instance of the ValidatorGetValueEventArgs class. + + + + + + + Gets Control to retrieve value for. + + + + + Gets the Value to evaluate. + + + + + Gets validator that is requesting value. + + + + + Resets the Value set and indicates that validator will internally retrieve value for the control. + + + + + Gets or sets the value that will be used by validator. + + + + + Raises the CustomValidatorValidateValue event. + + Validator that needs validation. + Control to validate. + + + + Retrieves first level Validator for given control or return null if control does not have validator associated with it. + + + + + Associates first level Validator with given control. + + Reference to supported control. + Instance of validator class. If null is passed existing Validator is detached from the given control. + + + + Retrieves second level Validator for given control or return null if control does not have validator associated with it. + + + + + Associates second level Validator with given control. + + Reference to supported control. + Instance of validator class. If null is passed existing Validator is detached from the given control. + + + + Retrieves third level Validator for given control or return null if control does not have validator associated with it. + + + + + Associates third level Validator with given control. + + Reference to supported control. + Instance of validator class. If null is passed existing Validator is detached from the given control. + + + + Raises the GetValue event. + + Event arguments. + + + + Performs validation on all validators. It also uses error provider to display failed validations if validator has that enabled. + + Returns true if all validations succeeded or false if at least one validation has failed. + + + + Validate single control. Note that control must have validator assigned to it. This method will change LastFailedValidationResults collection. + + Control to validate. + returns true if validation succeeds or false if it fails + + + + Validate single control. Note that control must have validator assigned to it. This method will change LastFailedValidationResults collection. + + Control to validate. + Indicates whether to clear the last set of failed validations by calling ClearFailedValidations() method. + returns true if validation succeeds or false if it fails + + + + Removes all visual markers from failed validations that were placed on the controls. + + + + + Occurs when validator retrieves the value for the control. It allows you to return value for the controls validator does not recognize. + + + + + Occurs when CustomValidator needs to validate the control value. + + + + + Gets or sets whether validation is performed in steps meaning that if first level validation fails, second level is not validated + until first level validation succeeds. Default value is false which means that all validation levels are validated even if first level fails. + + + + + Gets the readonly collection that returns failed validations that were result of last Validate method call. + + + + + Indicates default ErrorProvider IconPadding when Highlighter is used with SuperValidator. Setting this property to 0 will allow you to set IconPadding for each control manually. + + + + + Gets or sets the error provider that is used by the validator to report validation errors. + + + + + Gets or sets the custom error provider that is used by validator to report errors. You can provide your own error validators by implementing IErrorProvider interface. + + + + + Gets or sets the Highlighter component that is used to highlight validation errors. + + + + + Gets or sets the validation type performed by the control. Default value is Manual. + + + + + Gets or sets the container control validator is bound to. The container control must be set for the ValidationType ValidatingEventOnContainer. + When ContainerControl is Form the validator handles the Closing event of the form to perform the validation and cancel the form closing. + You can disable that by setting either Enabled=false or Form.CausesValidation=false. + + + + + Gets or sets whether validation is performed. Default value is true. + + + + + Gets or sets whether Cancel argument in Validating event for validation type ValidatingEventPerControl is set to true when validation fails. + + + + + Specifies the validation type for SuperValidator control. + + + + + SuperValidator uses manual validation, i.e. you will call Validate method to perform validation. + + + + + Validation is performed per control from each controls Validating event. The Cancel is set to true on event arguments if validation fails. + + + + + Validation is performed for all controls from Validating event on container control. By default container control is Form that SuperValidator is on. + + + + + Defines validator control pair used by SuperValidator control. + + + + + Gets the validator associated with the control. + + + + + Gets control reference. + + + + + Initializes a new instance of the ValidatorControlPair structure. + + Validator associated with the control + Control reference + + + + Initializes a new instance of the ValidatorGetValueEventArgs class. + + + + + + + Gets Control to retrieve value for. + + + + + Gets validator that is requesting value. + + + + + Resets the Value set and indicates that validator will internally retrieve value for the control. + + + + + Gets or sets the value that will be used by validator. + + + + + Retrieves the show state and the restored, minimized, and maximized positions of the specified window. + + + A handle to the window. + + + A pointer to the WINDOWPLACEMENT structure that receives the show state and position information. + + Before calling GetWindowPlacement, set the length member to sizeof(WINDOWPLACEMENT). GetWindowPlacement fails if lpwndpl-> length is not set correctly. + + + + If the function succeeds, the return value is nonzero. + + If the function fails, the return value is zero. To get extended error information, call GetLastError. + + + + + Options available when a form is tested for mose positions. + + + HTERROR: On the screen background or on a dividing line between windows + (same as HTNOWHERE, except that the DefWindowProc function produces a system + beep to indicate an error). + + + HTTRANSPARENT: In a window currently covered by another window in the + same thread (the message will be sent to underlying windows in the same thread + until one of them returns a code that is not HTTRANSPARENT). + + + HTNOWHERE: On the screen background or on a dividing line between + windows. + + + HTCLIENT: In a client area. + + + HTCAPTION: In a title bar. + + + HTSYSMENU: In a window menu or in a Close button in a child window. + + + HTGROWBOX: In a size box (same as HTSIZE). + + + HTMENU: In a menu. + + + HTHSCROLL: In a horizontal scroll bar. + + + HTVSCROLL: In the vertical scroll bar. + + + HTMINBUTTON: In a Minimize button. + + + HTMAXBUTTON: In a Maximize button. + + + HTLEFT: In the left border of a resizable window (the user can click + the mouse to resize the window horizontally). + + + HTRIGHT: In the right border of a resizable window (the user can click + the mouse to resize the window horizontally). + + + HTTOP: In the upper-horizontal border of a window. + + + HTTOPLEFT: In the upper-left corner of a window border. + + + HTTOPRIGHT: In the upper-right corner of a window border. + + + HTBOTTOM: In the lower-horizontal border of a resizable window (the + user can click the mouse to resize the window vertically). + + + HTBOTTOMLEFT: In the lower-left corner of a border of a resizable + window (the user can click the mouse to resize the window diagonally). + + + HTBOTTOMRIGHT: In the lower-right corner of a border of a resizable + window (the user can click the mouse to resize the window diagonally). + + + HTBORDER: In the border of a window that does not have a sizing + border. + + + HTOBJECT: Unknown...No Documentation Found + + + HTCLOSE: In a Close button. + + + HTHELP: In a Help button. + + + HTSIZE: In a size box (same as HTGROWBOX). (Same as GrowBox). + + + HTREDUCE: In a Minimize button. (Same as MinimizeButton). + + + HTZOOM: In a Maximize button. (Same as MaximizeButton). + + + + Hides the window and activates another window. + + + + + Activates and displays a window. If the window is minimized or + maximized, the system restores it to its original size and position. + An application should specify this flag when displaying the window + for the first time. + + + + + Activates the window and displays it as a minimized window. + + + + + Maximizes the specified window. + + + + + Activates the window and displays it as a maximized window. + + + + + Displays a window in its most recent size and position. This value + is similar to , except + the window is not actived. + + + + + Activates the window and displays it in its current size and position. + + + + + Minimizes the specified window and activates the next top-level + window in the Z order. + + + + + Displays the window as a minimized window. This value is similar to + , except the + window is not activated. + + + + + Displays the window in its current size and position. This value is + similar to , except the + window is not activated. + + + + + Activates and displays the window. If the window is minimized or + maximized, the system restores it to its original size and position. + An application should specify this flag when restoring a minimized window. + + + + + Sets the show state based on the SW_* value specified in the + STARTUPINFO structure passed to the CreateProcess function by the + program that started the application. + + + + + Windows 2000/XP: Minimizes a window, even if the thread + that owns the window is not responding. This flag should only be + used when minimizing windows from a different thread. + + + + + Represents Wizard control. + + + + + Required designer variable. + + + + + Clean up any resources being used. + + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Resets the style to it's default value. + + + + + Resets the style to it's default value. + + + + + Simulates Back button click on Wizard control. Note that this method will raise the same events as + standard Wizard Back button click. + + + + + Simulates Next button click on Wizard control. Note that this method will raise the same events as + standard Wizard Next button click. + + + + + Simulates Cancel button click on Wizard control. Note that this method will raise the same events as + standard Wizard Cancel button click. + + + + + Simulates Finish button click on Wizard control. Note that this method will raise the same events as + standard Wizard Finish button click. + + + + + Raises BackButtonClick event. + + Event arguments + + + + Raises NextButtonClick event. + + Event arguments + + + + Raises FinishButtonClick event. + + Event arguments + + + + Raises CancelButtonClick event. + + Event arguments + + + + Raises HelpButtonClick event. + + Event arguments + + + + Raises WizardPageChanging event. + + Provides event arguments + + + + Raises WizardPageChanged event. + + Provides event arguments + + + + Occurs when Back button is clicked. You can cancel any default processing performed by Wizard control by setting Cancel=true on event arguments. + + + + + Occurs when Next button is clicked. You can cancel any default processing performed by Wizard control by setting Cancel=true on event arguments. + + + + + Occurs when Finish button is clicked. You can cancel any default processing performed by Wizard control by setting Cancel=true on event arguments. + + + + + Occurs when Cancel button is clicked. You can cancel any default processing performed by Wizard control by setting Cancel=true on event arguments. + + + + + Occurs when Help button is clicked. You can cancel any default processing performed by Wizard control by setting Cancel=true on event arguments. + + + + + Occurs before wizard page has changed and gives you opportunity to cancel the change. + + + + + Occurs after wizard page has changed. This event cannot be cancelled. To cancel the page change please use WizardPageChanging event. + + + + + Occurs when wizard buttons (Back, Next, Finish etc) are positioned and resized. + + + + + Gets or sets the header image. Default value is null which means that internal header image is used. You can hide header image + by setting HeaderImageVisible property. + + + + + Gets or sets whether header image is visible. Default value is true. + + + + + Gets or sets wizard button that is clicked when ENTER key is pressed. Default value is eWizardFormAcceptButton.FinishAndNext which + indicates that finish button will be clicked if available otherwise next button will be clicked. + + + + + Gets or sets wizard button that is clicked when ESCAPE key is pressed. Default value is eWizardFormCancelButton.Cancel which + indicates that Cancel button will be clicked. + + + + + Gets or sets whether all buttons are disabled while wizard page is changed which prevents users from clicking the buttons + if page change is taking longer. Default value is true. + + + + + Gets or sets whether wait cursor is displayed while page is changed. Default value is true. + + + + + Gets or sets the selected page index. You can set this property to change the currently selected wizard page. + + + + + Gets or sets selected wizard page. You can set this property to change the currently selected wizard page. + + + + + Gets the collection of Wizard pages. The order of WizardPage objects inside of this collection determines the flow of the wizard. + + + + + Returns a Stack of page history. Each time next page is displayed by wizard, previously visited page is added to the history. + When user commands Wizard back, the last page from the history is shown and removed from the stack. You should not modify this collection + directly since it is maintained by Wizard control. + + + + + Gets or sets the FlatStyle setting for the wizard buttons. Default value is FlatStyle.System + + + + + Gets or sets height of wizard command buttons. Default value is 22 pixels. + + + + + Gets or sets whether back button causes validation to be performed on any controls that require validation when it receives focus. Default value is false. + + + + + Gets or sets tab index of back button. Default value is 1. + + + + + Gets or sets a value indicating whether the user can give the focus to this back button using the TAB key. Default value is true. + + + + + Gets or sets caption of the back button. + + + + + Gets or sets width of the back button. Default value is 74. + + + + + Gets or sets auto size of the button. Default value is false. + + + + + Gets or sets auto size mode of the button. Default value is AutoSizeMode.GrowOnly. + + + + + Gets or sets whether next button causes validation to be performed on any controls that require validation when it receives focus. Default value is true. + + + + + Gets or sets tab index of next button. Default value is 2. + + + + + Gets or sets a value indicating whether the user can give the focus to button using the TAB key. Default value is true. + + + + + Gets or sets caption of the next button. + + + + + Gets or sets width of the next button. Default value is 74. + + + + + Gets or sets auto size of the button. Default value is false. + + + + + Gets or sets auto size mode of the button. Default value is AutoSizeMode.GrowOnly. + + + + + Gets or sets whether button causes validation to be performed on any controls that require validation when it receives focus. Default value is false. + + + + + Gets or sets tab index of the button. Default value is 4. + + + + + Gets or sets a value indicating whether the user can give the focus to button using the TAB key. Default value is true. + + + + + Gets or sets caption of the button. + + + + + Gets or sets width of the button. Default value is 74. + + + + + Gets or sets auto size of the button. Default value is false. + + + + + Gets or sets auto size mode of the button. Default value is AutoSizeMode.GrowOnly. + + + + + Gets or sets whether button causes validation to be performed on any controls that require validation when it receives focus. Default value is true. + + + + + Gets or sets tab index of the button. Default value is 4. + + + + + Gets or sets a value indicating whether the user can give the focus to button using the TAB key. Default value is true. + + + + + Gets or sets caption of the button. + + + + + Gets or sets width of the button. Default value is 74. + + + + + Gets or sets whether finish button is always visible next to the Next button. Default value is false which means that Finish + button will be visible only on last Wizard page and it will replace the Next button. When set to true Finish button is always visible next + to the Next button except on first Welcome wizard page. + + + + + Gets or sets auto size of the button. Default value is false. + + + + + Gets or sets auto size mode of the button. Default value is AutoSizeMode.GrowOnly. + + + + + Gets or sets whether button causes validation to be performed on any controls that require validation when it receives focus. Default value is false. + + + + + Gets or sets whether button is visible. Default value is true. + + + + + Gets or sets tab index of the button. Default value is 5. + + + + + Gets or sets a value indicating whether the user can give the focus to button using the TAB key. Default value is true. + + + + + Gets or sets caption of the button. + + + + + Gets or sets width of the button. Default value is 74. + + + + + Gets or sets auto size of the button. Default value is false. + + + + + Gets or sets auto size mode of the button. Default value is AutoSizeMode.GrowOnly. + + + + + Gets or sets the height of the wizard footer. Default value is 46 + + + + + Gets or sets the height of the wizard header. Default value is 60 + + + + + Gets or sets the header image alignment. Default value is right. + + + + + Gets or sets the header image size for interior wizard pages. Default value is 48x48 + + + + + Gets or sets indentation of header title label. Default value is 16. + + + + + Gets or sets indentation of header description label. Default value is 44. + + + + + + Indicates the font used to render caption header text. + + + + + Gets or sets whether description text displayed in wizard header is visible. + + + + + Gets or sets the header background style. + + + + + Gets or sets the footer background style. + + + + + Returns reference to internal Next button control. + + + + + Returns reference to internal Cancel button control. + + + + + Returns reference to internal Finish button control. + + + + + Returns reference to internal Help button control. + + + + + Returns reference to internal Back button control. + + + + + Gets or sets whether Focus cues on wizard navigation buttons are enabled. Default value is true. + + + + + Gets or sets the visual style used for wizard buttons. + + + + + Provides data for LayoutWizardButtons event. + + + + + Gets or sets bounds of Back button. + + + + + Gets or sets bounds of Next button. + + + + + Gets or sets bounds of Finish button. + + + + + Gets or sets bounds of Cancel button. + + + + + Gets or sets bounds of Help button. + + + + + Creates new instance of the class. + + + + + Creates new instance of the class and initializes it with default values. + + + + + Defines delegate for WizardPageChange events. + + + + + Updates page state when one of the page appearance properties has changed. + + + + + Fires BeforePageDisplayed event. + + Event arguments + + + + Invokes the BeforePageDisplayed event. + + Event arguments + + + + Fires AfterPageDisplayed event. + + Event arguments. + + + + Invokes AfterPageDisplayed event. + + Event arguments + + + + Fires BeforePageDisplayed event. + + Event arguments + + + + Invokes the BeforePageDisplayed event. + + Event arguments + + + + Raises BackButtonClick event. + + Event arguments + + + + Invokes BackButtonClick event. + + + + + Raises NextButtonClick event. + + Event arguments + + + + Invokes NextButtonClick event. + + + + + Raises FinishButtonClick event. + + Event arguments + + + + Invokes FinishButtonClick event. + + + + + Raises CancelButtonClick event. + + Event arguments + + + + Invokes CancelButtonClick event. + + + + + Raises HelpButtonClick event. + + Event arguments + + + + Invokes HelpButtonClick event. + + + + + Occurs before page is displayed. This event can cancel the page change. You can perform any additional setup of the Wizard page in this event. + + + + + Occurs after page has been displayed.This event can cancel the page change. You can perform any additional setup of the Wizard page in this event. + + + + + Occurs after page is hidden. You can perform any additional steps that are needed to complete wizard step in this event. + + + + + Occurs when Back button is clicked. You can cancel any default processing performed by Wizard control by setting Cancel=true on event arguments. + + + + + Occurs when Next button is clicked. You can cancel any default processing performed by Wizard control by setting Cancel=true on event arguments. + + + + + Occurs when Finish button is clicked. You can cancel any default processing performed by Wizard control by setting Cancel=true on event arguments. + + + + + Occurs when Cancel button is clicked. You can cancel any default processing performed by Wizard control by setting Cancel=true on event arguments. + + + + + Occurs when Help button is clicked. You can cancel any default processing performed by Wizard control by setting Cancel=true on event arguments. + + + + + Gets whether page is currently selected page in Wizard. + + + + + Gets or sets whether back button is enabled when page is active. Default value is eWizardButtonState.Auto which indicates that state is + automatically managed by control. + + + + + Gets or sets whether back button is visible when page is active. Default value is eWizardButtonState.Auto. + + + + + Gets or sets whether next button is enabled when page is active. Default value is eWizardButtonState.Auto which indicates that state is + automatically managed by control. + + + + + Gets or sets whether next button is visible when page is active. Default value is eWizardButtonState.Auto. + + + + + Gets or sets whether finish button is enabled when page is active. Default value is eWizardButtonState.Auto which indicates that state is + automatically managed by control. + + + + + Gets or sets whether cancel button is enabled when page is active. Default value is eWizardButtonState.Auto which indicates that state is + automatically managed by control. + + + + + Gets or sets whether cancel button is visible when page is active. Default value is eWizardButtonState.Auto. + + + + + Gets or sets whether help button is enabled when page is active. Default value is eWizardButtonState.Auto which indicates that state is + automatically managed by control. + + + + + Gets or sets whether help button is visible when page is active. Default value is eWizardButtonState.Auto. + + + + + Gets or sets the page header image when page is an interior page, InteriorPage=true. Default value is null. + + + + + Gets or sets the text that is displayed as title in wizard header when page is active. + + + + + Gets or sets the text that is displayed as description in wizard header when page is active. + + + + + Gets or sets the text that is displayed on form caption when page is active. Default value is empty string which indicates that form caption + is not changed when page becomes active. + + + + + Gets or sets whether page is interior page. Interior pages use wizard header area to display page title, description and optional image. They are also padded and do not + fill the client area of the Wizard. Default value is true. + You can set this value to false to hide header area and make page fill the client area of the wizard. + + + + + Gets or sets whether page is visible. Page visibility is managed by Wizard control and it should not be set directly. + + + + + Represents the collection of WizardPage objects which determines the flow of the wizard. + + + + + Adds new object to the collection. + + Object to add. + Index of newly added object. + + + + Adds an array of objects to the collection. + + Array of WizardPage objects. + + + + Inserts new object into the collection. + + Position of the object. + Object to insert. + + + + Returns index of the object inside of the collection. + + Reference to the object. + Index of the object. + + + + Returns whether collection contains specified object. + + Object to look for. + true if object is part of the collection, otherwise false. + + + + Removes specified object from the collection. + + + + + + Copies collection into the specified array. + + Array to copy collection to. + Starting index. + + + + Copies contained items to the WizardPage array. + + Array to copy to. + + + + Copies contained items to the WizardPage array. + + Array to copy to. + + + + Gets the parent this collection is associated with. + + + + + Returns reference to the object in collection based on it's index. + + + + + Returns reference to the object in collection based on it's name. + + + + + Provides data for Wizard Page Change events. + + + + + Specifies the new active wizard page. You can change this argument when handling WizardPageChanging event and provide newly selected page of your own. + + + + + Specifies page that was or currently is active. + + + + + Indicates the wizard button that was source of page change. + + + + + Creates new instance of the class with default values. + + New wizard page + Old or current wizard page + Page change source + + + + Provides data for Wizard Page Change events. + + + + + Allows you to cancel the page change. + + + + + Creates new instance of the class with default values. + + New wizard page + Old or current wizard page + Page change source + + + + Defines delegate for WizardPageChange events. + + + + + Defines delegate for WizardPageChange events. + + +
+
diff --git a/北京北汽/SCP/DLL/EntityFramework.Extensions.dll b/北京北汽/SCP/DLL/EntityFramework.Extensions.dll new file mode 100644 index 0000000..b3c07e5 Binary files /dev/null and b/北京北汽/SCP/DLL/EntityFramework.Extensions.dll differ diff --git a/北京北汽/SCP/DLL/EntityFramework.SqlServer.dll b/北京北汽/SCP/DLL/EntityFramework.SqlServer.dll new file mode 100644 index 0000000..9a9c5e9 Binary files /dev/null and b/北京北汽/SCP/DLL/EntityFramework.SqlServer.dll differ diff --git a/北京北汽/SCP/DLL/EntityFramework.SqlServer.xml b/北京北汽/SCP/DLL/EntityFramework.SqlServer.xml new file mode 100644 index 0000000..77acacd --- /dev/null +++ b/北京北汽/SCP/DLL/EntityFramework.SqlServer.xml @@ -0,0 +1,2093 @@ + + + + EntityFramework.SqlServer + + + + + Contains extension methods for the class. + + + + + Configures an awaiter used to await this to avoid + marshalling the continuation + back to the original context, but preserve the current culture and UI culture. + + + The type of the result produced by the associated . + + The task to be awaited on. + An object used to await this task. + + + + Configures an awaiter used to await this to avoid + marshalling the continuation + back to the original context, but preserve the current culture and UI culture. + + The task to be awaited on. + An object used to await this task. + + + + Provides an awaitable object that allows for awaits on that + preserve the culture. + + + The type of the result produced by the associated . + + This type is intended for compiler use only. + + + + Constructs a new instance of the class. + + The task to be awaited on. + + + Gets an awaiter used to await this . + An awaiter instance. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was canceled. + The task completed in a Faulted state. + + + This method is not implemented and should not be called. + The action to invoke when the await operation completes. + + + + Schedules the continuation onto the associated with this + . + + The action to invoke when the await operation completes. + + The argument is null + (Nothing in Visual Basic). + + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + + Gets whether this Task has completed. + + + will return true when the Task is in one of the three + final states: RanToCompletion, + Faulted, or + Canceled. + + + + + Provides an awaitable object that allows for awaits on that + preserve the culture. + + This type is intended for compiler use only. + + + + Constructs a new instance of the class. + + The task to be awaited on. + + + Gets an awaiter used to await this . + An awaiter instance. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The awaiter was not properly initialized. + The task was canceled. + The task completed in a Faulted state. + + + This method is not implemented and should not be called. + The action to invoke when the await operation completes. + + + + Schedules the continuation onto the associated with this + . + + The action to invoke when the await operation completes. + + The argument is null + (Nothing in Visual Basic). + + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + + Gets whether this Task has completed. + + + will return true when the Task is in one of the three + final states: RanToCompletion, + Faulted, or + Canceled. + + + + + An that retries actions that throw exceptions caused by SQL Azure transient failures. + + + This execution strategy will retry the operation on and + if the contains any of the following error numbers: + 40613, 40501, 40197, 10929, 10928, 10060, 10054, 10053, 233, 64 and 20 + + + + + Creates a new instance of . + + + The default retry limit is 5, which means that the total amount of time spent between retries is 26 seconds plus the random factor. + + + + + Creates a new instance of with the specified limits for + number of retries and the delay between retries. + + The maximum number of retry attempts. + The maximum delay in milliseconds between retries. + + + + + + + Contains function stubs that expose SqlServer methods in Linq to Entities. + + + + Returns the checksum of the values in a collection. Null values are ignored. + The checksum computed from the input collection. + The collection of values over which the checksum is computed. + + + Returns the checksum of the values in a collection. Null values are ignored. + The checksum computed from the input collection. + The collection of values over which the checksum is computed. + + + Returns the ASCII code value of the left-most character of a character expression. + The ASCII code of the first character in the input string. + A valid string. + + + Returns the character that corresponds to the specified integer ASCII value. + The character that corresponds to the specified ASCII value. + An ASCII code. + + + Returns the starting position of one expression found within another expression. + The starting position of toFind if it is found in toSearch . + The string expression to be found. + The string expression to be searched. + + + Returns the starting position of one expression found within another expression. + The starting position of toFind if it is found in toSearch . + The string expression to be found. + The string expression to be searched. + + + Returns the starting position of one expression found within another expression. + The starting position of toFind if it is found in toSearch . + The string expression to be found. + The string expression to be searched. + The character position in toSearch where searching begins. + + + Returns the starting position of one expression found within another expression. + The starting position of toFind if it is found in toSearch . + The string expression to be found. + The string expression to be searched. + The character position in toSearch where searching begins. + + + Returns the starting position of one expression found within another expression. + + A of value that is the starting position of toFind if it is found in toSearch . + + The string expression to be found. + The string expression to be searched. + The character position in toSearch where searching begins. + + + Returns the starting position of one expression found within another expression. + The starting position of toFind if it is found in toSearch . + The string expression to be found. + The string expression to be searched. + The character position in toSearch where searching begins. + + + Returns an integer value that indicates the difference between the SOUNDEX values of two character expressions. + The SOUNDEX difference between the two strings. + The first string. + The second string. + + + Returns the Unicode character with the specified integer code, as defined by the Unicode standard. + The character that corresponds to the input character code. + A character code. + + + Returns the starting position of the first occurrence of a pattern in a specified expression, or zeros if the pattern is not found, on all valid text and character data types. + The starting character position where the string pattern was found. + A string pattern to search for. + The string to search. + + + Returns a Unicode string with the delimiters added to make the input string a valid Microsoft SQL Server delimited identifier. + The original string with brackets added. + The expression that quote characters will be added to. + + + Returns a Unicode string with the delimiters added to make the input string a valid Microsoft SQL Server delimited identifier. + The original string with the specified quote characters added. + The expression that quote characters will be added to. + The one-character string to use as the delimiter. It can be a single quotation mark ( ' ), a left or right bracket ( [ ] ), or a double quotation mark ( " ). If quote_character is not specified, brackets are used. + + + Repeats a string value a specified number of times. + The target string, repeated the number of times specified by count . + A valid string. + The value that specifies how many time to repeat target . + + + Converts an alphanumeric string to a four-character (SOUNDEX) code to find similar-sounding words or names. + The SOUNDEX code of the input string. + A valid string. + + + Returns a string of repeated spaces. + A string that consists of the specified number of spaces. + The number of spaces. If negative, a null string is returned. + + + Returns character data converted from numeric data. + The numeric input expression converted to a string. + A numeric expression. + + + Returns character data converted from numeric data. + The input expression converted to a string. + A numeric expression. + + + Returns character data converted from numeric data. + The numeric input expression converted to a string. + A numeric expression. + The total length of the string. This includes decimal point, sign, digits, and spaces. The default is 10. + + + Returns character data converted from numeric data. + The input expression converted to a string. + A numeric expression. + The total length of the string. This includes decimal point, sign, digits, and spaces. The default is 10. + + + Returns character data converted from numeric data. + The numeric input expression converted to a string. + A numeric expression. + The total length of the string. This includes decimal point, sign, digits, and spaces. The default is 10. + The number of places to the right of the decimal point. decimal must be less than or equal to 16. If decimal is more than 16 then the result is truncated to sixteen places to the right of the decimal point. + + + Returns character data converted from numeric data. + The input expression converted to a string. + A numeric expression. + The total length of the string. This includes decimal point, sign, digits, and spaces. The default is 10. + The number of places to the right of the decimal point. decimal must be less than or equal to 16. If decimal is more than 16 then the result is truncated to sixteen places to the right of the decimal point. + + + Inserts a string into another string. It deletes a specified length of characters in the target string at the start position and then inserts the second string into the target string at the start position. + A string consisting of the two strings. + The target string. + The character position in stringinput where the replacement string is to be inserted. + The number of characters to delete from stringInput . If length is longer than stringInput , deletion occurs up to the last character in stringReplacement . + The substring to be inserted into stringInput . + + + Returns the integer value, as defined by the Unicode standard, for the first character of the input expression. + The character code for the first character in the input string. + A valid string. + + + A mathematical function that returns the angle, in radians, whose cosine is the specified numerical value. This angle is called the arccosine. + The angle, in radians, defined by the input cosine value. + The cosine of an angle. + + + A mathematical function that returns the angle, in radians, whose cosine is the specified numerical value. This angle is called the arccosine. + An angle, measured in radians. + The cosine of an angle. + + + A mathematical function that returns the angle, in radians, whose sine is the specified numerical value. This angle is called the arcsine. + An angle, measured in radians. + The sine of an angle. + + + A mathematical function that returns the angle, in radians, whose sine is the specified numerical value. This angle is called the arcsine. + An angle, measured in radians. + The sine of an angle. + + + A mathematical function that returns the angle, in radians, whose tangent is the specified numerical value. This angle is called the arctangent. + An angle, measured in radians. + The tangent of an angle. + + + A mathematical function that returns the angle, in radians, whose tangent is the specified numerical value. This angle is called the arctangent. + An angle, measured in radians. + The tangent of an angle. + + + Returns the positive angle, in radians, between the positive x-axis and the ray from the origin through the point (x, y), where x and y are the two specified numerical values. The first parameter passed to the function is the y-value and the second parameter is the x-value. + An angle, measured in radians. + The y-coordinate of a point. + The x-coordinate of a point. + + + Returns the positive angle, in radians, between the positive x-axis and the ray from the origin through the point (x, y), where x and y are the two specified numerical values. The first parameter passed to the function is the y-value and the second parameter is the x-value. + An angle, measured in radians. + The y-coordinate of a point. + The x-coordinate of a point. + + + Returns the trigonometric cosine of the specified angle, in radians, in the specified expression. + The trigonometric cosine of the specified angle. + An angle, measured in radians. + + + Returns the trigonometric cosine of the specified angle, in radians, in the specified expression. + The trigonometric cosine of the specified angle. + An angle, measured in radians. + + + A mathematical function that returns the trigonometric cotangent of the specified angle, in radians. + The trigonometric cotangent of the specified angle. + An angle, measured in radians. + + + A mathematical function that returns the trigonometric cotangent of the specified angle, in radians. + The trigonometric cotangent of the specified angle. + An angle, measured in radians. + + + Returns the corresponding angle in degrees for an angle specified in radians. + The specified angle converted to degrees. + An angle, measured in radians. + + + Returns the corresponding angle in degrees for an angle specified in radians. + The specified angle converted to degrees. + An angle, measured in radians. + + + Returns the corresponding angle in degrees for an angle specified in radians. + The specified angle converted to degrees. + An angle, measured in radians. + + + Returns the corresponding angle in degrees for an angle specified in radians. + The specified angle converted to degrees. + An angle, measured in radians. + + + Returns the exponential value of the specified float expression. + The constant e raised to the power of the input value. + The input value. + + + Returns the exponential value of the specified float expression. + The constant e raised to the power of the input value. + The input value. + + + Returns the natural logarithm of the specified input value. + The natural logarithm of the input value. + A numeric expression. + + + Returns the natural logarithm of the specified input value. + The natural logarithm of the input value. + A numeric expression. + + + Returns the base-10 logarithm of the specified input value. + The base-10 logarithm of the input value. + A numeric expression. + + + Returns the base-10 logarithm of the specified input value. + The base-10 logarithm of the input value. + A numeric expression. + + + Returns the constant value of pi. + The numeric value of pi. + + + Returns the radian measure corresponding to the specified angle in degrees. + The radian measure of the specified angle. + The angle, measured in degrees + + + Returns the radian measure corresponding to the specified angle in degrees. + The radian measure of the specified angle. + The angle, measured in degrees + + + Returns the radian measure corresponding to the specified angle in degrees. + The radian measure of the specified angle. + The angle, measured in degrees. + + + Returns the radian measure corresponding to the specified angle in degrees. + The radian measure of the specified angle. + The angle, measured in degrees. + + + Returns a pseudo-random float value from 0 through 1, exclusive. + The pseudo-random value. + + + Returns a pseudo-random float value from 0 through 1, exclusive. + The pseudo-random value. + The seed value. If seed is not specified, the SQL Server Database Engine assigns a seed value at random. For a specified seed value, the result returned is always the same. + + + Returns the positive (+1), zero (0), or negative (-1) sign of the specified expression. + The sign of the input expression. + A numeric expression. + + + Returns the positive (+1), zero (0), or negative (-1) sign of the specified expression. + The sign of the input expression. + A numeric expression. + + + Returns the positive (+1), zero (0), or negative (-1) sign of the specified expression. + The sign of the input expression. + A numeric expression. + + + Returns the positive (+1), zero (0), or negative (-1) sign of the specified expression. + The sign of the input expression. + A numeric expression. + + + Returns the trigonometric sine of the specified angle. + The trigonometric sine of the input expression. + An angle, measured in radians. + + + Returns the trigonometric sine of the specified angle. + The trigonometric sine of the input expression. + An angle, measured in radians. + + + Returns the square root of the specified number. + The square root of the input value. + A numeric expression. + + + Returns the square root of the specified number. + The square root of the input value. + A numeric expression. + + + Returns the square of the specified number. + The square of the input value. + A numeric expression. + + + Returns the square of the specified number. + The square of the input value. + A numeric expression. + + + Returns the trigonometric tangent of the input expression. + The tangent of the input angle. + An angle, measured in radians. + + + Returns the trigonometric tangent of the input expression. + The tangent of the input angle. + An angle, measured in radians. + + + Returns a new datetime value based on adding an interval to the specified date. + The new date. + The part of the date to increment. + The value used to increment a date by a specified amount. + The date to increment. + + + Returns a new time span value based on adding an interval to the specified time span. + The new time span. + The part of the date to increment. + The value used to increment a date by a specified amount. + The time span to increment. + + + Returns a new date value based on adding an interval to the specified date. + The new point in time, expressed as a date and time of day, relative to Coordinated Universal Time (UTC). + The part of the date to increment. + The value used to increment a date by a specified amount. + The date to increment. + + + Returns a new datetime value based on adding an interval to the specified date. + + A of value that is the new date. + + The part of the date to increment. + The value used to increment a date by a specified amount. + The date to increment. + + + Returns the count of the specified datepart boundaries crossed between the specified start date and end date. + The number of time intervals between the two dates. + The part of the date to calculate the differing number of time intervals. + The first date. + The second date. + + + Returns the count of the specified datepart boundaries crossed between the specified start date and end date. + The number of time intervals between the two dates. + The part of the date to calculate the differing number of time intervals. + The first date. + The second date. + + + Returns the count of the specified datepart boundaries crossed between the specified start date and end date. + The number of time intervals between the two dates. + The part of the date to calculate the differing number of time intervals. + The first date. + The second date. + + + Returns the count of the specified datepart boundaries crossed between the specified start date and end date. + The number of time intervals between the two dates. + The part of the date to calculate the differing number of time intervals. + The first date. + The second date. + + + Returns the count of the specified datepart boundaries crossed between the specified start date and end date. + The number of time intervals between the two dates. + The part of the date to calculate the differing number of time intervals. + The first date. + The second date. + + + Returns the count of the specified datepart boundaries crossed between the specified start date and end date. + The value specifying the number of time intervals between the two dates. + The part of the date to calculate the differing number of time intervals. + The first date. + The second date. + + + Returns the count of the specified datepart boundaries crossed between the specified start date and end date. + The number of time intervals between the two dates. + The part of the date to calculate the differing number of time intervals. + The first date. + The second date. + + + Returns the count of the specified datepart boundaries crossed between the specified start date and end date. + The number of time intervals between the two dates. + The part of the date to calculate the differing number of time intervals. + The first date. + The second date. + + + Returns the count of the specified datepart boundaries crossed between the specified start date and end date. + The number of time intervals between the two dates. + The part of the date to calculate the differing number of time intervals. + The first date. + The second date. + + + Returns the count of the specified datepart boundaries crossed between the specified start date and end date. + The number of time intervals between the two dates. + The part of the date to calculate the differing number of time intervals. + The first date. + The second date. + + + Returns the count of the specified datepart boundaries crossed between the specified start date and end date. + The number of time intervals between the two dates. + The part of the date to calculate the differing number of time intervals. + The first date. + The second date. + + + Returns the count of the specified datepart boundaries crossed between the specified start date and end date. + The number of time intervals between the two dates. + The part of the date to calculate the differing number of time intervals. + The first date. + The second date. + + + Returns the count of the specified datepart boundaries crossed between the specified start date and end date. + The number of time intervals between the two dates. + The part of the date to calculate the differing number of time intervals. + The first date. + The second date. + + + Returns the count of the specified datepart boundaries crossed between the specified start date and end date. + The number of time intervals between the two Dates. + The part of the date to calculate the differing number of time intervals. + The first date. + The second date. + + + Returns the count of the specified datepart boundaries crossed between the specified start date and end date. + The number of time intervals between the two dates. + The part of the date to calculate the differing number of time intervals. + The first date. + The second date. + + + Returns the count of the specified datepart boundaries crossed between the specified start date and end date. + The number of time intervals between the two dates. + The part of the date to calculate the differing number of time intervals. + The first date. + The second date. + + + Returns a character string that represents the specified datepart of the specified date. + The specified part of the specified date. + The part of the date to calculate the differing number of time intervals. + The date. + + + Returns a character string that represents the specified datepart of the specified date. + The specified part of the specified date. + The part of the date to calculate the differing number of time intervals. + The date. + + + Returns a character string that represents the specified datepart of the specified date. + The specified part of the specified date. + The part of the date to calculate the differing number of time intervals. + The date. + + + Returns a character string that represents the specified datepart of the specified date. + The specified part of the specified date. + The part of the date to calculate the differing number of time intervals. + The date. + + + Returns an integer that represents the specified datepart of the specified date. + The the specified datepart of the specified date. + The part of the date to return the value. + The date. + + + Returns an integer that represents the specified datepart of the specified date. + The specified datepart of the specified date. + The part of the date to return the value. + The date. + + + Returns an integer that represents the specified datepart of the specified date. + The specified datepart of the specified date. + The part of the date to return the value. + The date. + + + Returns an integer that represents the specified datepart of the specified date. + The specified datepart of the specified date. + The part of the date to return the value. + The date. + + + Returns the current database system timestamp as a datetime value without the database time zone offset. This value is derived from the operating system of the computer on which the instance of SQL Server is running. + The current database timestamp. + + + Returns the current database system timestamp as a datetime value. The database time zone offset is not included. This value represents the current UTC time (Coordinated Universal Time). This value is derived from the operating system of the computer on which the instance of SQL Server is running. + The current database UTC timestamp. + + + Returns the number of bytes used to represent any expression. + The number of bytes in the input value. + The value to be examined for data length. + + + Returns the number of bytes used to represent any expression. + The number of bytes in the input value. + The value to be examined for data length. + + + Returns the number of bytes used to represent any expression. + The number of bytes in the input value. + The value to be examined for data length. + + + Returns the number of bytes used to represent any expression. + The number of bytes in the input value. + The value to be examined for data length. + + + Returns the number of bytes used to represent any expression. + The number of bytes in the input value. + The value to be examined for data length. + + + Returns the number of bytes used to represent any expression. + The number of bytes in the input value. + The value to be examined for data length. + + + Returns the number of bytes used to represent any expression. + The number of bytes in the input value. + The value to be examined for data length. + + + Returns the number of bytes used to represent any expression. + The number of bytes in the input value. + The value to be examined for length. + + + Returns the number of bytes used to represent any expression. + The number of bytes in the input value. + The value to be examined for data length. + + + Returns the checksum value computed over the input argument. + The checksum computed over the input value. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input argument. + The checksum computed over the input value. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input argument. + The checksum computed over the input value. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input argument. + The checksum computed over the input value. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input argument. + The checksum computed over the input values. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input argument. + The checksum computed over the input value. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input argument. + The checksum computed over the input value. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input argument. + The checksum computed over the input value. + The character array for which the checksum is calculated. + + + Returns the checksum value computed over the input argument. + The checksum computed over the input value. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input arguments. + The checksum computed over the input values. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input arguments. + The checksum computed over the input values. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input arguments. + The checksum computed over the input values. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input arguments. + The checksum computed over the input values. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input arguments. + The checksum computed over the input values. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input arguments. + The checksum computed over the input values. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input arguments. + The checksum computed over the input values. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input arguments. + The checksum computed over the input values. + The character array for which the checksum is calculated. + The character array for which the checksum is calculated. + + + Returns the checksum value computed over the input arguments. + The checksum computed over the input values. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input arguments. + The checksum computed over the input values. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input arguments. + The checksum computed over the input values. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input arguments. + The checksum computed over the input values. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input arguments. + The checksum computed over the input values. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input arguments. + The checksum computed over the input values. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input arguments. + The checksum computed over the input values. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input arguments. + The checksum computed over the input values. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + + + Returns the checksum value computed over the input arguments. + The checksum computed over the input values. + The character array for which the checksum is calculated. + The character array for which the checksum is calculated. + The character array for which the checksum is calculated. + + + Returns the checksum value computed over the input arguments. + The checksum computed over the input values. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + The value for which the checksum is calculated. + + + Returns the current date and time. + The current date and time. + + + Returns the name of the current user. + The name of the current user. + + + Returns the workstation name. + The name of the workstation. + + + Returns a database user name corresponding to a specified identification number. + The user name. + A user ID. + + + Returns a database user name corresponding to a specified identification number. + The user name. + + + Indicates whether the input value is a valid numeric type. + 1 if the input expression is a valid numeric data type; otherwise, 0. + A string expression. + + + Indicates whether the input value is a valid date or time. + 1 if the input expression is a valid date or time value of datetime or smalldatetime data types; otherwise, 0. + The tested value. + + + + Provider to convert provider agnostic migration operations into SQL commands + that can be run against a Microsoft SQL Server database. + + + + + Determines if a provider specific exception corresponds to a database-level permission denied error. + + The database exception. + true if the supplied exception corresponds to a database-level permission denied error; otherwise false. + + + + Converts a set of migration operations into Microsoft SQL Server specific SQL. + + The operations to be converted. + Token representing the version of SQL Server being targeted (i.e. "2005", "2008"). + A list of SQL statements to be executed to perform the migration operations. + + + + Generates the SQL body for a stored procedure. + + The command trees representing the commands for an insert, update or delete operation. + The rows affected parameter name. + The provider manifest token. + The SQL body for the stored procedure. + + + + Generates the specified update database operation which represents applying a series of migrations. + The generated script is idempotent, meaning it contains conditional logic to check if individual migrations + have already been applied and only apply the pending ones. + + The update database operation. + + + + Generates SQL for a . + Allows derived providers to handle additional operation types. + Generated SQL should be added using the Statement method. + + The operation to produce SQL for. + + + + Creates an empty connection for the current provider. + Allows derived providers to use connection other than . + + An empty connection for the current provider. + + + + Generates the specified create procedure operation. + + The create procedure operation. + + + + Generates the specified alter procedure operation. + + The alter procedure operation. + + + + Generates the specified drop procedure operation. + + The drop procedure operation. + + + + Generates SQL for a . This method differs from + in that it will + create the target database schema if it does not already exist. + Generated SQL should be added using the Statement method. + + The operation to produce SQL for. + + + + Generates SQL for a . + Generated SQL should be added using the Statement method. + + The operation to produce SQL for. + + + + Writes CREATE TABLE SQL to the target writer. + + The operation to produce SQL for. + The target writer. + + + + Override this method to generate SQL when the definition of a table or its attributes are changed. + The default implementation of this method does nothing. + + The operation describing changes to the table. + + + + Generates SQL to mark a table as a system table. + Generated SQL should be added using the Statement method. + + The table to mark as a system table. + The to write the generated SQL to. + + + + Generates SQL to create a database schema. + Generated SQL should be added using the Statement method. + + The name of the schema to create. + + + + Generates SQL for a . + Generated SQL should be added using the Statement method. + + The operation to produce SQL for. + + + + Generates SQL for a . + Generated SQL should be added using the Statement method. + + The operation to produce SQL for. + + + + Generates SQL for a . + Generated SQL should be added using the Statement method. + + The operation to produce SQL for. + + + + Generates SQL for a . + Generated SQL should be added using the Statement method. + + The operation to produce SQL for. + + + + Generates SQL for a . + Generated SQL should be added using the Statement method. + + The operation to produce SQL for. + + + + Generates SQL for a . + Generated SQL should be added using the Statement method. + + The operation to produce SQL for. + + + + Generates SQL for a . + Generated SQL should be added using the Statement method. + + The operation to produce SQL for. + + + + Generates SQL for a . + Generated SQL should be added using the Statement method. + + The operation to produce SQL for. + + + + Generates SQL for a . + Generated SQL should be added using the Statement method. + + The operation to produce SQL for. + + + + Call this method to generate SQL that will attempt to drop the default constraint created + when a column is created. This method is usually called by code that overrides the creation or + altering of columns. + + The table to which the constraint applies. + The column to which the constraint applies. + The writer to which generated SQL should be written. + + + + Generates SQL for a . + Generated SQL should be added using the Statement method. + + The operation to produce SQL for. + + + + Generates SQL for a . + Generated SQL should be added using the Statement or StatementBatch methods. + + The operation to produce SQL for. + + + + Generates SQL for a . + Generated SQL should be added using the Statement method. + + The operation to produce SQL for. + + + + Generates SQL for a . + Generated SQL should be added using the Statement method. + + The operation to produce SQL for. + + + + Generates SQL for a . + Generated SQL should be added using the Statement method. + + The operation to produce SQL for. + + + + Generates the specified rename procedure operation. + + The rename procedure operation. + + + + Generates the specified move procedure operation. + + The move procedure operation. + + + + Generates SQL for a . + Generated SQL should be added using the Statement method. + + The operation to produce SQL for. + + + + Generates SQL for the given column model. This method is called by other methods that + process columns and can be overridden to change the SQL generated. + + The column for which SQL is being generated. + The writer to which generated SQL should be written. + + + + Generates SQL for a . + Generated SQL should be added using the Statement method. + + The operation to produce SQL for. + + + + Generates SQL to specify a constant byte[] default value being set on a column. + This method just generates the actual value, not the SQL to set the default value. + + The value to be set. + SQL representing the default value. + + + + Generates SQL to specify a constant bool default value being set on a column. + This method just generates the actual value, not the SQL to set the default value. + + The value to be set. + SQL representing the default value. + + + + Generates SQL to specify a constant DateTime default value being set on a column. + This method just generates the actual value, not the SQL to set the default value. + + The value to be set. + SQL representing the default value. + + + + Generates SQL to specify a constant DateTimeOffset default value being set on a column. + This method just generates the actual value, not the SQL to set the default value. + + The value to be set. + SQL representing the default value. + + + + Generates SQL to specify a constant Guid default value being set on a column. + This method just generates the actual value, not the SQL to set the default value. + + The value to be set. + SQL representing the default value. + + + + Generates SQL to specify a constant string default value being set on a column. + This method just generates the actual value, not the SQL to set the default value. + + The value to be set. + SQL representing the default value. + + + + Generates SQL to specify a constant TimeSpan default value being set on a column. + This method just generates the actual value, not the SQL to set the default value. + + The value to be set. + SQL representing the default value. + + + + Generates SQL to specify a constant geogrpahy default value being set on a column. + This method just generates the actual value, not the SQL to set the default value. + + The value to be set. + SQL representing the default value. + + + + Generates SQL to specify a constant geometry default value being set on a column. + This method just generates the actual value, not the SQL to set the default value. + + The value to be set. + SQL representing the default value. + + + + Generates SQL to specify a constant default value being set on a column. + This method just generates the actual value, not the SQL to set the default value. + + The value to be set. + SQL representing the default value. + + + + Generates SQL to specify the data type of a column. + This method just generates the actual type, not the SQL to create the column. + + The definition of the column. + SQL representing the data type. + + + + Generates a quoted name. The supplied name may or may not contain the schema. + + The name to be quoted. + The quoted name. + + + + Quotes an identifier for SQL Server. + + The identifier to be quoted. + The quoted identifier. + + + + Adds a new Statement to be executed against the database. + + The statement to be executed. + Gets or sets a value indicating whether this statement should be performed outside of the transaction scope that is used to make the migration process transactional. If set to true, this operation will not be rolled back if the migration process fails. + The batch terminator for the database provider. + + + + Gets a new that can be used to build SQL. + This is just a helper method to create a writer. Writing to the writer will + not cause SQL to be registered for execution. You must pass the generated + SQL to the Statement method. + + An empty text writer to use for SQL generation. + + + + Adds a new Statement to be executed against the database. + + The writer containing the SQL to be executed. + The batch terminator for the database provider. + + + + Breaks sql string into one or more statements, handling T-SQL utility statements as necessary. + + The SQL to split into one ore more statements to be executed. + Gets or sets a value indicating whether this statement should be performed outside of the transaction scope that is used to make the migration process transactional. If set to true, this operation will not be rolled back if the migration process fails. + + + + Returns the column default value to use for store-generated GUID columns when + no default value is explicitly specified in the migration. + Returns newsequentialid() for on-premises SQL Server 2005 and later. + Returns newid() for SQL Azure. + + Either newsequentialid() or newid() as described above. + + + + Contains function stubs that expose SqlServer methods in Linq to Entities. + + + + Constructs a geography instance representing a Point instance from its x and y values and a spatial reference ID (SRID). + The constructed geography instance. + The x-coordinate of the Point being generated. + The y-coordinate of the Point being generated + The SRID of the geography instance. + + + Returns the Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation of a geography instance augmented with any Z (elevation) and M (measure) values carried by the instance. + The Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation of a geography instance. + The geography value. + + + Returns a geometric object representing the union of all point values whose distance from a geography instance is less than or equal to a specified value, allowing for a specified tolerance. + The union of all point values whose distance from a geography instance is less than or equal to a specified value + The geography value. + The distance. + The specified tolerance. + Specifying whether the tolerance value is relative or absolute. + + + Returns the maximum angle between the point returned by EnvelopeCenter() and a point in the geography instance in degrees. + the maximum angle between the point returned by EnvelopeCenter(). + The geography value. + + + Returns a point that can be used as the center of a bounding circle for the geography instance. + A SqlGeography value that specifies the location of the center of a bounding circle. + The geography value. + + + Offers a fast, index-only intersection method to determine if a geography instance intersects another SqlGeography instance, assuming an index is available. + True if a geography instance potentially intersects another SqlGeography instance; otherwise, false. + The geography value. + Another geography instance to compare against the instance on which Filter is invoked. + + + Tests if the SqlGeography instance is the same as the specified type. + A string that specifies one of the 12 types exposed in the geography type hierarchy. + The geography value. + A string that specifies one of the 12 types exposed in the geography type hierarchy. + + + Returns the total number of rings in a Polygon instance. + The total number of rings. + The geography value. + + + Returns an approximation of the given geography instance produced by running the Douglas-Peucker algorithm on the instance with the given tolerance. + + Returns . + + The geography value. + The tolerance to input to the Douglas-Peucker algorithm. tolerance must be a positive number. + + + Returns the specified ring of the SqlGeography instance: 1 ≤ n ≤ NumRings(). + A SqlGeography object that represents the ring specified by n. + The geography value. + An int expression between 1 and the number of rings in a polygon instance. + + + Constructs a geometry instance representing a Point instance from its x and y values and a spatial reference ID (SRID). + The constructed geometry instance. + The x-coordinate of the Point being generated. + The y-coordinate of the Point being generated + The SRID of the geography instance. + + + Returns the Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation of a geography instance augmented with any Z (elevation) and M (measure) values carried by the instance. + The Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation of a geometry instance. + The geometry value. + + + Returns a geometric object representing the union of all point values whose distance from a geometry instance is less than or equal to a specified value, allowing for a specified tolerance. + The union of all point values whose distance from a geometry instance is less than or equal to a specified value + The geometry value. + The distance. + The specified tolerance. + Specifying whether the tolerance value is relative or absolute. + + + Tests if the SqlGeometry instance is the same as the specified type. + A string that specifies one of the 12 types exposed in the geography type hierarchy. + The geometry value. + A string that specifies one of the 12 types exposed in the geography type hierarchy. + + + Offers a fast, index-only intersection method to determine if a geography instance intersects another SqlGeometry instance, assuming an index is available. + True if a geography instance potentially intersects another SqlGeography instance; otherwise, false. + The geometry value. + Another geography instance to compare against the instance on which Filter is invoked. + + + Converts an invalid geometry instance into a geometry instance with a valid Open Geospatial Consortium (OGC) type. + The converted geometry instance. + The geometry value. + + + Returns an approximation of the given geography instance produced by running the Douglas-Peucker algorithm on the instance with the given tolerance. + + Returns . + + The geometry value. + The tolerance to input to the Douglas-Peucker algorithm. tolerance must be a positive number. + + + + Indicates if the provider supports the parameter optimization described in EntityFramework6 GitHub issue #195. + + True since this provider supports the parameter optimization. + + + + The DbProviderServices implementation for the SqlClient provider for SQL Server. + + + Note that instance of this type also resolve additional provider services for Microsoft SQL Server + when this type is registered as an EF provider either using an entry in the application's config file + or through code-based registration in . + The services resolved are: + Requests for are resolved to a Singleton instance of + to create connections to SQL Express by default. + Requests for for the invariant name "System.Data.SqlClient" + for any server name are resolved to a delegate that returns a + to provide a non-retrying policy for SQL Server. + Requests for for the invariant name "System.Data.SqlClient" are + resolved to instances to provide default Migrations SQL + generation for SQL Server. + Requests for for the invariant name "System.Data.SqlClient" are + resolved to a Singleton instance of to provide default spatial + services for SQL Server. + + + + + This is the well-known string using in configuration files and code-based configuration as + the "provider invariant name" used to specify Microsoft SQL Server for ADO.NET and + Entity Framework provider services. + + + + + Registers a handler to process non-error messages coming from the database provider. + + The connection to receive information for. + The handler to process messages. + + + + Create a Command Definition object, given the connection and command tree + + provider manifest that was determined from metadata + command tree for the statement + an executable command definition object + + + + See issue 2390 - cloning the DesignTimeVisible property on the + can cause deadlocks. + So here overriding to provide a method that does not clone DesignTimeVisible. + + the object to clone + a clone of the + + + + Sets the parameter value and appropriate facets for the given . + + The parameter. + The type of the parameter. + The value of the parameter. + + + + Returns provider manifest token for a given connection. + + Connection to find manifest token from. + The provider manifest token for the specified connection. + + + + Returns the provider manifest by using the specified version information. + + The token information associated with the provider manifest. + The provider manifest by using the specified version information. + + + + Gets a spatial data reader for SQL Server. + + The reader where the spatial data came from. + The manifest token associated with the provider manifest. + The spatial data reader. + + + + Gets a spatial data reader for SQL Server. + + The manifest token associated with the provider manifest. + The spatial data reader. + + + + Generates a data definition language (DDL) script that creates schema objects + (tables, primary keys, foreign keys) based on the contents of the StoreItemCollection + parameter and targeted for the version of the database corresponding to the provider manifest token. + + The provider manifest token identifying the target version. + The structure of the database. + + A DDL script that creates schema objects based on the contents of the StoreItemCollection parameter + and targeted for the version of the database corresponding to the provider manifest token. + + + + + Create the database and the database objects. + If initial catalog is not specified, but AttachDBFilename is specified, we generate a random database name based on the AttachDBFilename. + Note: this causes pollution of the db, as when the connection string is later used, the mdf will get attached under a different name. + However if we try to replicate the name under which it would be attached, the following scenario would fail: + The file does not exist, but registered with database. + The user calls: If (DatabaseExists) DeleteDatabase + CreateDatabase + For further details on the behavior when AttachDBFilename is specified see Dev10# 188936 + + Connection to a non-existent database that needs to be created and populated with the store objects indicated with the storeItemCollection parameter. + Execution timeout for any commands needed to create the database. + The collection of all store items based on which the script should be created. + + + + Determines whether the database for the given connection exists. + There are three cases: + 1. Initial Catalog = X, AttachDBFilename = null: (SELECT Count(*) FROM sys.databases WHERE [name]= X) > 0 + 2. Initial Catalog = X, AttachDBFilename = F: if (SELECT Count(*) FROM sys.databases WHERE [name]= X) > 0 then true, + if not, try to open the connection and then return (SELECT Count(*) FROM sys.databases WHERE [name]= X) > 0 + 3. Initial Catalog = null, AttachDBFilename = F: Try to open the connection. If that succeeds the result is true, otherwise + if the there are no databases corresponding to the given file return false, otherwise throw. + Note: We open the connection to cover the scenario when the mdf exists, but is not attached. + Given that opening the connection would auto-attach it, it would not be appropriate to return false in this case. + Also note that checking for the existence of the file does not work for a remote server. (Dev11 #290487) + For further details on the behavior when AttachDBFilename is specified see Dev10# 188936 + + Connection to a database whose existence is checked by this method. + Execution timeout for any commands needed to determine the existence of the database. + The collection of all store items from the model. This parameter is no longer used for determining database existence. + True if the provider can deduce the database only based on the connection. + + + + Determines whether the database for the given connection exists. + There are three cases: + 1. Initial Catalog = X, AttachDBFilename = null: (SELECT Count(*) FROM sys.databases WHERE [name]= X) > 0 + 2. Initial Catalog = X, AttachDBFilename = F: if (SELECT Count(*) FROM sys.databases WHERE [name]= X) > 0 then true, + if not, try to open the connection and then return (SELECT Count(*) FROM sys.databases WHERE [name]= X) > 0 + 3. Initial Catalog = null, AttachDBFilename = F: Try to open the connection. If that succeeds the result is true, otherwise + if the there are no databases corresponding to the given file return false, otherwise throw. + Note: We open the connection to cover the scenario when the mdf exists, but is not attached. + Given that opening the connection would auto-attach it, it would not be appropriate to return false in this case. + Also note that checking for the existence of the file does not work for a remote server. (Dev11 #290487) + For further details on the behavior when AttachDBFilename is specified see Dev10# 188936 + + Connection to a database whose existence is checked by this method. + Execution timeout for any commands needed to determine the existence of the database. + The collection of all store items from the model. This parameter is no longer used for determining database existence. + True if the provider can deduce the database only based on the connection. + + + + Delete the database for the given connection. + There are three cases: + 1. If Initial Catalog is specified (X) drop database X + 2. Else if AttachDBFilename is specified (F) drop all the databases corresponding to F + if none throw + 3. If niether the catalog not the file name is specified - throw + Note that directly deleting the files does not work for a remote server. However, even for not attached + databases the current logic would work assuming the user does: if (DatabaseExists) DeleteDatabase + + Connection + Timeout for internal commands. + Item Collection. + + + + Clones the connection. + + The original connection. + The factory to use. + Cloned connection + + + + The Singleton instance of the SqlProviderServices type. + + + + + Set to the full name of the Microsoft.SqlServer.Types assembly to override the default selection + + + + + Get or sets a value indicating whether parameter values are truncated to + the scale (number of decimal places) defined for their corresponding columns when they are sent + to the database. A value of true indicates that objects + created for columns will have their + properties set, which will cause the parameter values to be truncated. If set to false + then the properties will not be set, avoiding the truncation + behavior of and allowing SQL Server to round values if necessary. + The default value is true to prevent breaking existing applications that depend on this + behavior. + + + + + Gets or sets a value indicating whether to use the SCOPE_IDENTITY() function to retrieve values + generated by the database for numeric columns during an INSERT operation. The default value of + true is recommended and can provide better performance if all numeric values are generated + using IDENTITY columns. If set to false, an OUTPUT clause will be used instead. An OUTPUT + clause makes it possible to retrieve values generated by sequences or other means. + + + + + Gets or sets a value indicating whether the ROW_NUMBER() function is used in sort expression + passed to the ORDER BY clause when OFFSET is present in query. The default value of true + is recommended to obtain query results that are stable for paging operations. The value of + false can be used for compatibility with previous versions of EF and will cause the sort + expression to be passed unmodified to the ORDER BY clause, which can lead to unstable results + if the ordering is ambiguous. + + + This flag only applies to SQL Server 2012 or later. This flag does not affect queries that have + already been translated to SQL and cached, therefore applications that need to set the value to + false for compatibility should do so before executing any queries. + + + + + An implementation of to provide support for geospatial types when using + Entity Framework with Microsoft SQL Server. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/北京北汽/SCP/DLL/EntityFramework.Utilities.dll b/北京北汽/SCP/DLL/EntityFramework.Utilities.dll new file mode 100644 index 0000000..f778cf7 Binary files /dev/null and b/北京北汽/SCP/DLL/EntityFramework.Utilities.dll differ diff --git a/北京北汽/SCP/DLL/EntityFramework.dll b/北京北汽/SCP/DLL/EntityFramework.dll new file mode 100644 index 0000000..9275df6 Binary files /dev/null and b/北京北汽/SCP/DLL/EntityFramework.dll differ diff --git a/北京北汽/SCP/DLL/EntityFramework.xml b/北京北汽/SCP/DLL/EntityFramework.xml new file mode 100644 index 0000000..0ca5849 --- /dev/null +++ b/北京北汽/SCP/DLL/EntityFramework.xml @@ -0,0 +1,53236 @@ + + + + EntityFramework + + + + + Represents a result mapping for a function import. + + + + + Base class for items in the mapping space (DataSpace.CSSpace) + + + + + Adds a type mapping. + + The type mapping to add. + + + + Removes a type mapping. + + The type mapping to remove. + + + + Gets the type mappings. + + + + + Specifies a mapping condition evaluated by checking whether the value + of the a property/column is null or not null. + + + + + Mapping metadata for Conditional property mapping on a type. + Condition Property Mapping specifies a Condition either on the C side property or S side property. + + + For Example if conceptually you could represent the CS MSL file as following + --Mapping + --EntityContainerMapping ( CNorthwind-->SNorthwind ) + --EntitySetMapping + --EntityTypeMapping + --MappingFragment + --EntityKey + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ConditionProperyMap ( constant value-->SMemberMetadata ) + --EntityTypeMapping + --MappingFragment + --EntityKey + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ComplexPropertyMap + --ComplexTypeMap + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ScalarProperyMap ( CMemberMetadata-->SMemberMetadata ) + --ConditionProperyMap ( constant value-->SMemberMetadata ) + --AssociationSetMapping + --AssociationTypeMapping + --MappingFragment + --EndPropertyMap + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ScalarProperyMap ( CMemberMetadata-->SMemberMetadata ) + --EndPropertyMap + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + This class represents the metadata for all the condition property map elements in the + above example. + + + + + Mapping metadata for all types of property mappings. + + + For Example if conceptually you could represent the CS MSL file as following + --Mapping + --EntityContainerMapping ( CNorthwind-->SNorthwind ) + --EntitySetMapping + --EntityTypeMapping + --MappingFragment + --EntityKey + --ScalarPropertyMap + --ScalarPropertyMap + --EntityTypeMapping + --MappingFragment + --EntityKey + --ScalarPropertyMap + --ComplexPropertyMap + --ScalarPropertyMap + --ScalarProperyMap + --ScalarPropertyMap + --AssociationSetMapping + --AssociationTypeMapping + --MappingFragment + --EndPropertyMap + --ScalarPropertyMap + --ScalarProperyMap + --EndPropertyMap + --ScalarPropertyMap + This class represents the metadata for all property map elements in the + above example. This includes the scalar property maps, complex property maps + and end property maps. + + + + + Gets an EdmProperty that specifies the mapped property. + + + + + Gets an EdmProperty that specifies the mapped property. + + + + + Gets an EdmProperty that specifies the mapped column. + + + + + Creates an IsNullConditionMapping instance. + + An EdmProperty that specifies a property or column. + A boolean that indicates whether to perform a null or a not-null check. + + + + Gets a bool that specifies whether the condition is evaluated by performing a null check + or a not-null check. + + + + + Specifies a mapping condition evaluated by comparing the value of + a property or column with a given value. + + + + + Creates a ValueConditionMapping instance. + + An EdmProperty that specifies a property or column. + An object that specifies the value to compare with. + + + + Gets an object that specifies the value to check against. + + + + + Serializes an that conforms to the restrictions of a single + CSDL schema file to an XML writer. The model to be serialized must contain a single + . + + + + + Serialize the to the XmlWriter. + + + The EdmModel to serialize. + + The XmlWriter to serialize to. + The serialized model's namespace. + true if the model is valid; otherwise, false. + + + + Occurs when an error is encountered serializing the model. + + + + + Information about an error that occurred processing an Entity Framework model. + + + + + Gets an optional value indicating which property of the source item caused the event to be raised. + + + + + Gets an optional descriptive message the describes the error that is being raised. + + + + + Gets a value indicating the that caused the event to be raised. + + + + + Contains additional attributes and properties of the + + + Note that objects are short lived and exist only to + make initialization easier. Instance of this type are not + compared to each other and arrays returned by array properties are copied to internal + collections in the ctor. Therefore it is fine to suppress the + Code Analysis messages. + + + + Gets or sets the function schema. + The function schema. + + + Gets or sets the store function name. + The store function name. + + + Gets or sets the command text associated with the function. + The command text associated with the function. + + + Gets or sets the entity sets for the function. + The entity sets for the function. + + + Gets a value that indicates whether this is an aggregate function. + true if this is an aggregate function; otherwise, false. + + + Gets or sets whether this function is a built-in function. + true if this function is a built-in function; otherwise, false. + + + Gets or sets whether the function contains no arguments. + true if the function contains no arguments; otherwise, false. + + + Gets or sets whether this function can be composed. + true if this function can be composed; otherwise, false. + + + Gets or sets whether this function is from a provider manifest. + true if this function is from a provider manifest; otherwise, false. + + + Gets or sets whether this function is a cached store function. + true if this function is a cached store function; otherwise, false. + + + Gets or sets whether this function is a function import. + true if this function is a function import; otherwise, false. + + + Gets or sets the return parameters. + The return parameters. + + + Gets or sets the parameter type semantics. + The parameter type semantics. + + + Gets or sets the function parameters. + The function parameters. + + + + Serializes the storage (database) section of an to XML. + + + + + Serialize the to the + + The EdmModel to serialize + Provider information on the Schema element + ProviderManifestToken information on the Schema element + The XmlWriter to serialize to + A value indicating whether to serialize Nullable attributes when they are set to the default value. + true if model can be serialized, otherwise false + + + + Serialize the to the + + The EdmModel to serialize + Namespace name on the Schema element + Provider information on the Schema element + ProviderManifestToken information on the Schema element + The XmlWriter to serialize to + A value indicating whether to serialize Nullable attributes when they are set to the default value. + true if model can be serialized, otherwise false + + + + Occurs when an error is encountered serializing the model. + + + + Visits each element of an expression tree from a given root expression. If any element changes, the tree is rebuilt back to the root and the new root expression is returned; otherwise the original root expression is returned. + + + Defines the basic functionality that should be implemented by visitors that return a result value of a specific type. + The type of the result produced by the visitor. + + + When overridden in a derived class, handles any expression of an unrecognized type. + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern method for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + A result value of a specific type. + + The that is being visited. + + + + + Typed visitor pattern method for DbInExpression. + + The DbInExpression that is being visited. + An instance of TResultType. + + + + Initializes a new instance of the + + class. + + + + Replaces an old expression with a new one for the expression visitor. + The old expression. + The new expression. + + + Represents an event when the variable is rebound for the expression visitor. + The location of the variable. + The reference of the variable where it is rebounded. + + + Represents an event when entering the scope for the expression visitor with specified scope variables. + The collection of scope variables. + + + Exits the scope for the expression visitor. + + + Implements the visitor pattern for the expression. + The implemented visitor pattern. + The expression. + + + Implements the visitor pattern for the expression list. + The implemented visitor pattern. + The expression list. + + + Implements the visitor pattern for expression binding. + The implemented visitor pattern. + The expression binding. + + + Implements the visitor pattern for the expression binding list. + The implemented visitor pattern. + The expression binding list. + + + Implements the visitor pattern for the group expression binding. + The implemented visitor pattern. + The binding. + + + Implements the visitor pattern for the sort clause. + The implemented visitor pattern. + The sort clause. + + + Implements the visitor pattern for the sort order. + The implemented visitor pattern. + The sort order. + + + Implements the visitor pattern for the aggregate. + The implemented visitor pattern. + The aggregate. + + + Implements the visitor pattern for the function aggregate. + The implemented visitor pattern. + The aggregate. + + + Implements the visitor pattern for the group aggregate. + The implemented visitor pattern. + The aggregate. + + + Implements the visitor pattern for the Lambda function. + The implemented visitor pattern. + The lambda function. + + + Implements the visitor pattern for the type. + The implemented visitor pattern. + The type. + + + Implements the visitor pattern for the type usage. + The implemented visitor pattern. + The type. + + + Implements the visitor pattern for the entity set. + The implemented visitor pattern. + The entity set. + + + Implements the visitor pattern for the function. + The implemented visitor pattern. + The function metadata. + + + Implements the visitor pattern for the basic functionality required by expression types. + The implemented visitor. + The expression. + + + Implements the visitor pattern for the different kinds of constants. + The implemented visitor. + The constant expression. + + + Implements the visitor pattern for a reference to a typed null literal. + The implemented visitor. + The expression. + + + Implements the visitor pattern for a reference to a variable that is currently in scope. + The implemented visitor. + The expression. + + + Implements the visitor pattern for a reference to a parameter declared on the command tree that contains this expression. + The implemented visitor. + The expression. + + + Implements the visitor pattern for an invocation of a function. + The implemented visitor. + The function expression. + + + Implements the visitor pattern for the application of a lambda function to arguments represented by DbExpression objects. + The implemented visitor. + The expression. + + + Implements the visitor pattern for retrieving an instance property. + The implemented visitor. + The expression. + + + Implements the visitor pattern for the comparison operation applied to two arguments. + The implemented visitor. + The cast expression. + + + Implements the visitor pattern for a string comparison against the specified pattern with an optional escape string. + The implemented visitor. + The expression. + + + Implements the visitor pattern for the restriction of the number of elements in the argument collection to the specified limit value. + The implemented visitor. + The expression. + + + Implements the visitor pattern for the null determination applied to a single argument. + The implemented visitor. + The expression. + + + Implements the visitor pattern for the arithmetic operation applied to numeric arguments. + The implemented visitor. + The arithmetic expression. + + + Implements the visitor pattern for the logical AND expression. + The implemented visitor. + The logical AND expression. + + + Implements the visitor pattern for the logical OR of two Boolean arguments. + The implemented visitor. + The expression. + + + Implements the visitor pattern for the DbInExpression. + The implemented visitor. + The DbInExpression that is being visited. + + + Implements the visitor pattern for the logical NOT of a single Boolean argument. + The implemented visitor. + The expression. + + + Implements the visitor pattern for the removed duplicate elements from the specified set argument. + The implemented visitor. + The distinct expression. + + + Implements the visitor pattern for the conversion of the specified set argument to a singleton the conversion of the specified set argument to a singleton. + The implemented visitor. + The element expression. + + + Implements the visitor pattern for an empty set determination applied to a single set argument. + The implemented visitor. + The expression. + + + Implements the visitor pattern for the set union operation between the left and right operands. + The implemented visitor. + The expression. + + + Implements the visitor pattern for the set intersection operation between the left and right operands. + The implemented visitor. + The expression. + + + Implements the visitor pattern for the set subtraction operation between the left and right operands. + The implemented visitor. + The expression. + + + Implements the visitor pattern for a type conversion operation applied to a polymorphic argument. + The implemented visitor. + The expression. + + + Implements the visitor pattern for the type comparison of a single argument against the specified type. + The implemented visitor. + The expression. + + + Implements the visitor pattern for the type conversion of a single argument to the specified type. + The implemented visitor. + The cast expression. + + + Implements the visitor pattern for the When, Then, and Else clauses. + The implemented visitor. + The case expression. + + + Implements the visitor pattern for the retrieval of elements of the specified type from the given set argument. + The implemented visitor. + The expression. + + + Implements the visitor pattern for the construction of a new instance of a given type, including set and record types. + The implemented visitor. + The expression. + + + Implements the visitor pattern for a strongly typed reference to a specific instance within an entity set. + The implemented visitor. + The expression. + + + Implements the visitor pattern for the navigation of a relationship. + The implemented visitor. + The expression. + + + Implements the visitor pattern for the expression that retrieves an entity based on the specified reference. + The implemented visitor. + The DEREF expression. + + + Implements the visitor pattern for the retrieval of the key value from the underlying reference value. + The implemented visitor. + The expression. + + + Implements the visitor pattern for the expression that extracts a reference from the underlying entity instance. + The implemented visitor. + The entity reference expression. + + + Implements the visitor pattern for a scan over an entity set or relationship set, as indicated by the Target property. + The implemented visitor. + The expression. + + + Implements the visitor pattern for a predicate applied to filter an input set. + The implemented visitor. + The filter expression. + + + Implements the visitor pattern for the projection of a given input set over the specified expression. + The implemented visitor. + The expression. + + + Implements the visitor pattern for the unconditional join operation between the given collection arguments. + The implemented visitor. + The join expression. + + + Implements the visitor pattern for an inner, left outer, or full outer join operation between the given collection arguments on the specified join condition. + The implemented visitor. + The expression. + + + Implements the visitor pattern for the invocation of the specified function for each element in the specified input set. + The implemented visitor. + The APPLY expression. + + + Implements the visitor pattern for a group by operation. + The implemented visitor. + The expression. + + + Implements the visitor pattern for the skip expression. + The implemented visitor. + The expression. + + + Implements the visitor pattern for a sort key that can be used as part of the sort order. + The implemented visitor. + The expression. + + + Implements the visitor pattern for a quantifier operation of the specified kind over the elements of the specified input set. + The implemented visitor. + The expression. + + + + When this attribute is placed on a property it indicates that the database column to which the + property is mapped has an index. + + + This attribute is used by Entity Framework Migrations to create indexes on mapped database columns. + Multi-column indexes are created by using the same index name in multiple attributes. The information + in these attributes is then merged together to specify the actual database index. + + + + + Creates a instance for an index that will be named by convention and + has no column order, clustering, or uniqueness specified. + + + + + Creates a instance for an index with the given name and + has no column order, clustering, or uniqueness specified. + + The index name. + + + + Creates a instance for an index with the given name and column order, + but with no clustering or uniqueness specified. + + + Multi-column indexes are created by using the same index name in multiple attributes. The information + in these attributes is then merged together to specify the actual database index. + + The index name. + A number which will be used to determine column ordering for multi-column indexes. + + + + Returns true if this attribute specifies the same name and configuration as the given attribute. + + The attribute to compare. + True if the other object is equal to this object; otherwise false. + + + + + + + Returns true if this attribute specifies the same name and configuration as the given attribute. + + The attribute to compare. + True if the other object is equal to this object; otherwise false. + + + + + + + The index name. + + + Multi-column indexes are created by using the same index name in multiple attributes. The information + in these attributes is then merged together to specify the actual database index. + + + + + A number which will be used to determine column ordering for multi-column indexes. This will be -1 if no + column order has been specified. + + + Multi-column indexes are created by using the same index name in multiple attributes. The information + in these attributes is then merged together to specify the actual database index. + + + + + Set this property to true to define a clustered index. Set this property to false to define a + non-clustered index. + + + The value of this property is only relevant if returns true. + If returns false, then the value of this property is meaningless. + + + + + Returns true if has been set to a value. + + + + + Set this property to true to define a unique index. Set this property to false to define a + non-unique index. + + + The value of this property is only relevant if returns true. + If returns false, then the value of this property is meaningless. + + + + + Returns true if has been set to a value. + + + + + Returns a different ID for each object instance such that type descriptors won't + attempt to combine all IndexAttribute instances into a single instance. + + + + + A class derived from this class can be placed in the same assembly as a class derived from + to define Entity Framework configuration for an application. + Configuration is set by calling protected methods and setting protected properties of this + class in the constructor of your derived type. + The type to use can also be registered in the config file of the application. + See http://go.microsoft.com/fwlink/?LinkId=260883 for more information about Entity Framework configuration. + + + + + Any class derived from must have a public parameterless constructor + and that constructor should call this constructor. + + + + + The Singleton instance of for this app domain. This can be + set at application start before any Entity Framework features have been used and afterwards + should be treated as read-only. + + The instance of . + + + + Attempts to discover and load the associated with the given + type. This method is intended to be used by tooling to ensure that + the correct configuration is loaded into the app domain. Tooling should use this method + before accessing the property. + + A type to use for configuration discovery. + + + + Attempts to discover and load the from the given assembly. + This method is intended to be used by tooling to ensure that the correct configuration is loaded into + the app domain. Tooling should use this method before accessing the + property. If the tooling knows the type being used, then the + method should be used since it gives a greater chance that + the correct configuration will be found. + + An to use for configuration discovery. + + + + Call this method from the constructor of a class derived from to + add a instance to the Chain of Responsibility of resolvers that + are used to resolve dependencies needed by the Entity Framework. + + + Resolvers are asked to resolve dependencies in reverse order from which they are added. This means + that a resolver can be added to override resolution of a dependency that would already have been + resolved in a different way. + The exceptions to this is that any dependency registered in the application's config file + will always be used in preference to using a dependency resolver added here. + + The resolver to add. + + + + Call this method from the constructor of a class derived from to + add a instance to the Chain of Responsibility of resolvers that + are used to resolve dependencies needed by the Entity Framework. Unlike the AddDependencyResolver + method, this method puts the resolver at the bottom of the Chain of Responsibility such that it will only + be used to resolve a dependency that could not be resolved by any of the other resolvers. + + + A implementation is automatically registered as a default resolver + when it is added with a call to . This allows EF providers to act as + resolvers for other services that may need to be overridden by the provider. + + The resolver to add. + + + + Call this method from the constructor of a class derived from to register + an Entity Framework provider. + + + Note that the provider is both registered as a service itself and also registered as a default resolver with + a call to AddDefaultResolver. This allows EF providers to act as resolvers for other services that + may need to be overridden by the provider. + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for + and also using AddDefaultResolver to add the provider as a default + resolver. This means that, if desired, the same functionality can be achieved using a custom resolver or a + resolver backed by an Inversion-of-Control container. + + The ADO.NET provider invariant name indicating the type of ADO.NET connection for which this provider will be used. + The provider instance. + + + + Call this method from the constructor of a class derived from to register + an ADO.NET provider. + + + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using AddDependencyResolver to add an appropriate resolvers for + and . This means that, if desired, + the same functionality can be achieved using a custom resolver or a resolver backed by an + Inversion-of-Control container. + + The ADO.NET provider invariant name indicating the type of ADO.NET connection for which this provider will be used. + The provider instance. + + + + Call this method from the constructor of a class derived from to register an + for use with the provider represented by the given invariant name. + + + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for + . This means that, if desired, the same functionality can be achieved using + a custom resolver or a resolver backed by an Inversion-of-Control container. + + The ADO.NET provider invariant name indicating the type of ADO.NET connection for which this execution strategy will be used. + A function that returns a new instance of an execution strategy. + + + + Call this method from the constructor of a class derived from to register an + for use with the provider represented by the given invariant name and + for a given server name. + + + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using to add an appropriate resolver for + . This means that, if desired, the same functionality can be achieved using + a custom resolver or a resolver backed by an Inversion-of-Control container. + + + The ADO.NET provider invariant name indicating the type of ADO.NET connection for which this execution strategy will be used. + + A function that returns a new instance of an execution strategy. + A string that will be matched against the server name in the connection string. + + + + Call this method from the constructor of a class derived from to register a + . + + + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using to add an appropriate resolver for + . This means that, if desired, the same functionality can be achieved using + a custom resolver or a resolver backed by an Inversion-of-Control container. + + A function that returns a new instance of a transaction handler. + + + + Call this method from the constructor of a class derived from to register a + for use with the provider represented by the given invariant name. + + + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using to add an appropriate resolver for + . This means that, if desired, the same functionality can be achieved using + a custom resolver or a resolver backed by an Inversion-of-Control container. + + + The ADO.NET provider invariant name indicating the type of ADO.NET connection for which this transaction handler will be used. + + A function that returns a new instance of a transaction handler. + + + + Call this method from the constructor of a class derived from to register a + for use with the provider represented by the given invariant name and + for a given server name. + + + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using to add an appropriate resolver for + . This means that, if desired, the same functionality can be achieved using + a custom resolver or a resolver backed by an Inversion-of-Control container. + + + The ADO.NET provider invariant name indicating the type of ADO.NET connection for which this transaction handler will be used. + + A function that returns a new instance of a transaction handler. + A string that will be matched against the server name in the connection string. + + + + Sets the that is used to create connections by convention if no other + connection string or connection is given to or can be discovered by . + Note that a default connection factory is set in the app.config or web.config file whenever the + EntityFramework NuGet package is installed. As for all config file settings, the default connection factory + set in the config file will take precedence over any setting made with this method. Therefore the setting + must be removed from the config file before calling this method will have any effect. + Call this method from the constructor of a class derived from to change + the default connection factory being used. + + + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for + . This means that, if desired, the same functionality can be achieved using + a custom resolver or a resolver backed by an Inversion-of-Control container. + + The connection factory. + + + + Call this method from the constructor of a class derived from to + set the pluralization service. + + The pluralization service to use. + + + + Call this method from the constructor of a class derived from to + set the database initializer to use for the given context type. The database initializer is called when a + the given type is used to access a database for the first time. + The default strategy for Code First contexts is an instance of . + + + Calling this method is equivalent to calling . + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for + . This means that, if desired, the same functionality can be achieved using + a custom resolver or a resolver backed by an Inversion-of-Control container. + + The type of the context. + The initializer to use, or null to disable initialization for the given context type. + + + + Call this method from the constructor of a class derived from to register a + for use with the provider represented by the given invariant name. + + + This method is typically used by providers to register an associated SQL generator for Code First Migrations. + It is different from setting the generator in the because it allows + EF to use the Migrations pipeline to create a database even when there is no Migrations configuration in the project + and/or Migrations are not being explicitly used. + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for + . This means that, if desired, the same functionality can be achieved using + a custom resolver or a resolver backed by an Inversion-of-Control container. + + The invariant name of the ADO.NET provider for which this generator should be used. + A delegate that returns a new instance of the SQL generator each time it is called. + + + + Call this method from the constructor of a class derived from to set + an implementation of which allows provider manifest tokens to + be obtained from connections without necessarily opening the connection. + + + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for + . This means that, if desired, the same functionality can be achieved using + a custom resolver or a resolver backed by an Inversion-of-Control container. + + The manifest token resolver. + + + + Call this method from the constructor of a class derived from to set + a factory for implementations of which allows custom annotations + represented by instances to be serialized to and from the EDMX XML. + + + Note that an is not needed if the annotation uses a simple string value. + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for + . This means that, if desired, the same functionality can be achieved using + a custom resolver or a resolver backed by an Inversion-of-Control container. + + The name of custom annotation that will be handled by this serializer. + A delegate that will be used to create serializer instances. + + + + Call this method from the constructor of a class derived from to set + an implementation of which allows a + to be obtained from a in cases where the default implementation is not + sufficient. + + + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for + . This means that, if desired, the same functionality can be achieved using + a custom resolver or a resolver backed by an Inversion-of-Control container. + + The provider factory service. + + + + Call this method from the constructor of a class derived from to set + a as the model cache key factory which allows the key + used to cache the model behind a to be changed. + + + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for + . This means that, if desired, the same functionality can + be achieved using a custom resolver or a resolver backed by an Inversion-of-Control container. + + The key factory. + + + + Call this method from the constructor of a class derived from to set + a delegate which which be used for + creation of the default for a any + . This default factory will only be used if no factory is + set explicitly in the and if no factory has been registered + for the provider in use using the + + method. + + + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for + . This means that, if desired, the same functionality + can be achieved using a custom resolver or a resolver backed by an Inversion-of-Control container. + + + A factory for creating instances for a given and + representing the default schema. + + + + + Call this method from the constructor of a class derived from to set + a delegate which allows for creation of a customized + for the given provider for any + that does not have an explicit factory set. + + + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for + . This means that, if desired, the same functionality + can be achieved using a custom resolver or a resolver backed by an Inversion-of-Control container. + + The invariant name of the ADO.NET provider for which this generator should be used. + + A factory for creating instances for a given and + representing the default schema. + + + + + Call this method from the constructor of a class derived from to set + the global instance of which will be used whenever a spatial provider is + required and a provider-specific spatial provider cannot be found. Normally, a provider-specific spatial provider + is obtained from the a implementation which is in turn returned by resolving + a service for passing the provider invariant name as a key. However, this + cannot work for stand-alone instances of and since + it is impossible to know the spatial provider to use. Therefore, when creating stand-alone instances + of and the global spatial provider is always used. + + + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for + . This means that, if desired, the same functionality can be achieved using + a custom resolver or a resolver backed by an Inversion-of-Control container. + + The spatial provider. + + + + Call this method from the constructor of a class derived from to set + an implementation of to use for a specific provider and provider + manifest token. + + + Use + to register spatial services for use only when a specific manifest token is returned by the provider. + Use to register global + spatial services to be used when provider information is not available or no provider-specific + spatial services are found. + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for + . This means that, if desired, the same functionality can be achieved using + a custom resolver or a resolver backed by an Inversion-of-Control container. + + + The indicating the type of ADO.NET connection for which this spatial provider will be used. + + The spatial provider. + + + + Call this method from the constructor of a class derived from to set + an implementation of to use for a specific provider with any + manifest token. + + + Use + to register spatial services for use when any manifest token is returned by the provider. + Use to register global + spatial services to be used when provider information is not available or no provider-specific + spatial services are found. + + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for + . This means that, if desired, the same functionality can be achieved using + a custom resolver or a resolver backed by an Inversion-of-Control container. + + The ADO.NET provider invariant name indicating the type of ADO.NET connection for which this spatial provider will be used. + The spatial provider. + + + + Call this method from the constructor of a class derived from to set + a factory for the type of to use with . + + + Note that setting the type of formatter to use with this method does change the way command are + logged when is used. It is still necessary to set a + instance onto before any commands will be logged. + For more low-level control over logging/interception see and + . + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for + . This means that, if desired, the same functionality can be achieved using + a custom resolver or a resolver backed by an Inversion-of-Control container. + + A delegate that will create formatter instances. + + + + Call this method from the constructor of a class derived from to + register an at application startup. Note that interceptors can also + be added and removed at any time using . + + + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for + . This means that, if desired, the same functionality can be achieved using + a custom resolver or a resolver backed by an Inversion-of-Control container. + + The interceptor to register. + + + + Call this method from the constructor of a class derived from to set + a factory to allow to create instances of a context that does not have a public, + parameterless constructor. + + + This is typically needed to allow design-time tools like Migrations or scaffolding code to use contexts that + do not have public, parameterless constructors. + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for + with the context as the key. This means that, if desired, + the same functionality can be achieved using a custom resolver or a resolver backed by an + Inversion-of-Control container. + + The context type for which the factory should be used. + The delegate to use to create context instances. + + + + Call this method from the constructor of a class derived from to set + a factory to allow to create instances of a context that does not have a public, + parameterless constructor. + + + This is typically needed to allow design-time tools like Migrations or scaffolding code to use contexts that + do not have public, parameterless constructors. + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for + with the context as the key. This means that, if desired, + the same functionality can be achieved using a custom resolver or a resolver backed by an + Inversion-of-Control container. + + The context type for which the factory should be used. + The delegate to use to create context instances. + + + + Sets a singleton model store implementation (persisted model cache). + + The model store implementation. + + + + Call this method from the constructor of a class derived from to register + a database table existence checker for a given provider. + + + This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. + Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for + and also using AddDefaultResolver to add the provider as a default + resolver. This means that, if desired, the same functionality can be achieved using a custom resolver or a + resolver backed by an Inversion-of-Control container. + + The ADO.NET provider invariant name indicating the type of ADO.NET connection for which this provider will be used. + The table existence checker to use. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Creates a shallow copy of the current . + + A shallow copy of the current . + + + + Occurs during EF initialization after the DbConfiguration has been constructed but just before + it is locked ready for use. Use this event to inspect and/or override services that have been + registered before the configuration is locked. Note that this event should be used carefully + since it may prevent tooling from discovering the same configuration that is used at runtime. + + + Handlers can only be added before EF starts to use the configuration and so handlers should + generally be added as part of application initialization. Do not access the DbConfiguration + static methods inside the handler; instead use the the members of + to get current services and/or add overrides. + + + + + Gets the that is being used to resolve service + dependencies in the Entity Framework. + + + + + This attribute can be placed on a subclass of to indicate that the subclass of + representing the code-based configuration for the application is in a different + assembly than the context type. + + + Normally a subclass of should be placed in the same assembly as + the subclass of used by the application. It will then be discovered automatically. + However, if this is not possible or if the application contains multiple context types in different + assemblies, then this attribute can be used to direct DbConfiguration discovery to the appropriate type. + An alternative to using this attribute is to specify the DbConfiguration type to use in the application's + config file. See http://go.microsoft.com/fwlink/?LinkId=260883 for more information. + + + + + Indicates that the given subclass of should be used for code-based configuration + for this application. + + + The type to use. + + + + + Indicates that the subclass of represented by the given assembly-qualified + name should be used for code-based configuration for this application. + + + The type to use. + + + + + Gets the subclass of that should be used for code-based configuration + for this application. + + + + Implements the basic functionality required by aggregates in a GroupBy clause. + + + + Gets the result type of this . + + + The result type of this . + + + + + Gets the list of expressions that define the arguments to this + + . + + + The list of expressions that define the arguments to this + + . + + + + Represents the logical AND of two Boolean arguments. This class cannot be inherited. + + + Implements the basic functionality required by expressions that accept two expression operands. + + + Represents the base type for all expressions. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + The type of the result produced by . + + + An instance of . + + The type of the result produced by visitor. + + + + Determines whether the specified is equal to the current DbExpression instance. + + + True if the specified is equal to the current DbExpression instance; otherwise, false. + + + The object to compare to the current . + + + + Serves as a hash function for the type. + A hash code for the current expression. + + + + Creates a that represents the specified binary value, which may be null + + + A that represents the specified binary value. + + The binary value on which the returned expression should be based. + + + + Enables implicit casting from a byte array. + + The value to be converted. + The converted value. + + + + Creates a that represents the specified (nullable) Boolean value. + + + A that represents the specified Boolean value. + + The Boolean value on which the returned expression should be based. + + + + Enables implicit casting from . + + The value to be converted. + The converted value. + + + + Creates a that represents the specified (nullable) byte value. + + + A that represents the specified byte value. + + The byte value on which the returned expression should be based. + + + + Enables implicit casting from . + + The value to be converted. + The converted value. + + + + Creates a that represents the specified (nullable) + + value. + + + A that represents the specified DateTime value. + + The DateTime value on which the returned expression should be based. + + + + Enables implicit casting from . + + The expression to be converted. + The converted value. + + + + Creates a that represents the specified (nullable) + + value. + + + A that represents the specified DateTimeOffset value. + + The DateTimeOffset value on which the returned expression should be based. + + + + Enables implicit casting from . + + The value to be converted. + The converted value. + + + + Creates a that represents the specified (nullable) decimal value. + + + A that represents the specified decimal value. + + The decimal value on which the returned expression should be based. + + + + Enables implicit casting from . + + The value to be converted. + The converted value. + + + + Creates a that represents the specified (nullable) double value. + + + A that represents the specified double value. + + The double value on which the returned expression should be based. + + + + Enables implicit casting from . + + The value to be converted. + The converted value. + + + + Creates a that represents the specified + + value, which may be null. + + + A that represents the specified DbGeography value. + + The DbGeography value on which the returned expression should be based. + + + + Enables implicit casting from . + + The value to be converted. + The converted value. + + + + Creates a that represents the specified + + value, which may be null. + + + A that represents the specified DbGeometry value. + + The DbGeometry value on which the returned expression should be based. + + + + Enables implicit casting from . + + The value to be converted. + The converted value. + + + + Creates a that represents the specified (nullable) + + value. + + + A that represents the specified Guid value. + + The Guid value on which the returned expression should be based. + + + + Enables implicit casting from . + + The value to be converted. + The converted value. + + + + Creates a that represents the specified (nullable) Int16 value. + + + A that represents the specified Int16 value. + + The Int16 value on which the returned expression should be based. + + + + Enables implicit casting from . + + The value to be converted. + The converted value. + + + + Creates a that represents the specified (nullable) Int32 value. + + + A that represents the specified Int32 value. + + The Int32 value on which the returned expression should be based. + + + + Enables implicit casting from . + + The value to be converted. + The converted value. + + + + Creates a that represents the specified (nullable) Int64 value. + + + A that represents the specified Int64 value. + + The Int64 value on which the returned expression should be based. + + + + Enables implicit casting from . + + The value to be converted. + The converted value. + + + + Creates a that represents the specified (nullable) Single value. + + + A that represents the specified Single value. + + The Single value on which the returned expression should be based. + + + + Enables implicit casting from . + + The value to be converted. + The converted value. + + + + Creates a that represents the specified string value. + + + A that represents the specified string value. + + The string value on which the returned expression should be based. + + + + Enables implicit casting from . + + The value to be converted. + The converted value. + + + Gets the type metadata for the result type of the expression. + The type metadata for the result type of the expression. + + + Gets the kind of the expression, which indicates the operation of this expression. + The kind of the expression, which indicates the operation of this expression. + + + + Gets the that defines the left argument. + + + The that defines the left argument. + + The expression is null. + + The expression is not associated with the command tree of the + + ,or its result type is not equal or promotable to the required type for the left argument. + + + + + Gets the that defines the right argument. + + + The that defines the right argument. + + The expression is null. + + The expression is not associated with the command tree of the + + ,or its result type is not equal or promotable to the required type for the right argument. + + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by the visitor . + visitor is null. + + + Represents an apply operation, which is the invocation of the specified function for each element in the specified input set. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by the visitor . + visitor is null. + + + + Gets the that specifies the function that is invoked for each element in the input set. + + + The that specifies the function that is invoked for each element in the input set. + + + + + Gets the that specifies the input set. + + + The that specifies the input set. + + + + + Represents an arithmetic operation applied to numeric arguments. + Addition, subtraction, multiplication, division, modulo, and negation are arithmetic operations. + This class cannot be inherited. + + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + + Gets the list of elements that define the current arguments. + + + A fixed-size list of elements. + + + + + Represents the When, Then, and Else clauses of the + + . This class cannot be inherited. + + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor. + visitor is null. + + + + Gets the When clauses of this . + + + The When clauses of this . + + + + + Gets the Then clauses of this . + + + The Then clauses of this . + + + + + Gets the Else clause of this . + + + The Else clause of this . + + The expression is null. + + The expression is not associated with the command tree of the + + ,or its result type is not equal or promotable to the result type of the + + . + + + + Represents the type conversion of a single argument to the specified type. This class cannot be inherited. + + + Implements the basic functionality required by expressions that accept a single expression argument. + + + + Gets the that defines the argument. + + + The that defines the argument. + + The expression is null. + + The expression is not associated with the command tree of a + + , or its result type is not equal or promotable to the required type for the argument. + + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor. + visitor is null. + + + + Describes the different "kinds" (classes) of command trees. + + + + + A query to retrieve data + + + + + Update existing data + + + + + Insert new data + + + + + Deleted existing data + + + + + Call a function + + + + Represents a comparison operation applied to two arguments. Equality, greater than, greater than or equal, less than, less than or equal, and inequality are comparison operations. This class cannot be inherited. + + DbComparisonExpression requires that its arguments have a common result type + that is equality comparable (for .Equals and .NotEquals), + order comparable (for .GreaterThan and .LessThan), + or both (for .GreaterThanOrEquals and .LessThanOrEquals). + + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor. + visitor is null. + + + Represents different kinds of constants (literals). This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor. + visitor is null. + + + Gets the constant value. + The constant value. + + + Represents an unconditional join operation between the given collection arguments. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor. + visitor is null. + + + + Gets a list that provides the input sets to the join. + + + A list that provides the input sets to the join. + + + + Represents the an expression that retrieves an entity based on the specified reference. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor. + visitor is null. + + + Removes duplicate elements from the specified set argument. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor. + visitor is null. + + + Represents the conversion of the specified set argument to a singleton. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor. + visitor is null. + + + Represents an expression that extracts a reference from the underlying entity instance. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor. + visitor is null. + + + Represents the set subtraction operation between the left and right operands. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor. + visitor is null. + + + + Describes a binding for an expression. Conceptually similar to a foreach loop + in C#. The DbExpression property defines the collection being iterated over, + while the Var property provides a means to reference the current element + of the collection during the iteration. DbExpressionBinding is used to describe the set arguments + to relational expressions such as , + and . + + + + + + + Gets the that defines the input set. + + + The that defines the input set. + + The expression is null. + The expression is not associated with the command tree of the binding, or its result type is not equal or promotable to the result type of the current value of the property. + + + Gets the name assigned to the element variable. + The name assigned to the element variable. + + + Gets the type metadata of the element variable. + The type metadata of the element variable. + + + + Gets the that references the element variable. + + The variable reference. + + + Represents a predicate applied to filter an input set. This produces the set of elements that satisfy the predicate. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + + Gets the that specifies the input set. + + + The that specifies the input set. + + + + + Gets the that specifies the predicate used to filter the input set. + + + The that specifies the predicate used to filter the input set. + + The expression is null. + + The expression is not associated with the command tree of the + + , or its result type is not a Boolean type. + + + + Represents an invocation of a function. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + Gets the metadata for the function to invoke. + The metadata for the function to invoke. + + + + Gets an list that provides the arguments to the function. + + + An list that provides the arguments to the function. + + + + Represents a collection of elements that compose a group. + + + Represents a group by operation. A group by operation is a grouping of the elements in the input set based on the specified key expressions followed by the application of the specified aggregates. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + + Gets the that specifies the input set and provides access to the set element and group element variables. + + + The that specifies the input set and provides access to the set element and group element variables. + + + + + Gets a list that provides grouping keys. + + + A list that provides grouping keys. + + + + + Gets a list that provides the aggregates to apply. + + + A list that provides the aggregates to apply. + + + + Represents the set intersection operation between the left and right operands. This class cannot be inherited. + + DbIntersectExpression requires that its arguments have a common collection result type + + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + Represents an empty set determination applied to a single set argument. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + Represents null determination applied to a single argument. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + Represents the type comparison of a single argument against the specified type. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + Gets the type metadata that the type metadata of the argument should be compared to. + The type metadata that the type metadata of the argument should be compared to. + + + Represents an inner, left outer, or full outer join operation between the given collection arguments on the specified join condition. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + + Gets the that provides the left input. + + + The that provides the left input. + + + + + Gets the that provides the right input. + + + The that provides the right input. + + + + Gets the join condition to apply. + The join condition to apply. + The expression is null. + + The expression is not associated with the command tree of the + + , or its result type is not a Boolean type. + + + + + Allows the application of a lambda function to arguments represented by + + objects. + + + + The visitor pattern method for expression visitors that do not produce a result value. + + An instance of . + + visitor is null + + + The visitor pattern method for expression visitors that produce a result value of a specific type. + The type of the result produced by the expression visitor. + + An instance of a typed that produces a result value of type TResultType. + + The type of the result produced by visitor + visitor is null + + + + Gets the representing the Lambda function applied by this expression. + + + The representing the Lambda function applied by this expression. + + + + + Gets a list that provides the arguments to which the Lambda function should be applied. + + + The list. + + + + Represents a string comparison against the specified pattern with an optional escape string. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + Gets an expression that specifies the string to compare against the given pattern. + An expression that specifies the string to compare against the given pattern. + The expression is null. + + The expression is not associated with the command tree of + + , or its result type is not a string type. + + + + Gets an expression that specifies the pattern against which the given string should be compared. + An expression that specifies the pattern against which the given string should be compared. + The expression is null. + + The expression is not associated with the command tree of + + , or its result type is not a string type. + + + + Gets an expression that provides an optional escape string to use for the comparison. + An expression that provides an optional escape string to use for the comparison. + The expression is null. + + The expression is not associated with the command tree of + + , or its result type is not a string type. + + + + Represents the restriction of the number of elements in the argument collection to the specified limit value. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + Gets an expression that specifies the input collection. + An expression that specifies the input collection. + The expression is null. + + The expression is not associated with the command tree of the + + , or its result type is not a collection type. + + + + Gets an expression that specifies the limit on the number of elements returned from the input collection. + An expression that specifies the limit on the number of elements returned from the input collection. + The expression is null. + + The expression is not associated with the command tree of the + + , or is not one of + + or + + , or its result type is not equal or promotable to a 64-bit integer type. + + + + + Gets whether the limit operation will include tied results. Including tied results might produce more results than specified by the + + value. + + true if the limit operation will include tied results; otherwise, false. The default is false. + + + Represents the construction of a new instance of a given type, including set and record types. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + + Gets an list that provides the property/column values or set elements for the new instance. + + + An list that provides the property/column values or set elements for the new instance. + + + + Represents the logical NOT of a single Boolean argument. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + Represents a reference to a typed null literal. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + Represents the retrieval of elements of the specified type from the given set argument. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + Gets the metadata of the type of elements that should be retrieved from the set argument. + The metadata of the type of elements that should be retrieved from the set argument. + + + Represents the logical OR of two Boolean arguments. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + Represents a reference to a parameter declared on the command tree that contains this expression. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + Gets the name of the referenced parameter. + The name of the referenced parameter. + + + Represents the projection of a given input set over the specified expression. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + + Gets the that specifies the input set. + + + The that specifies the input set. + + + + + Gets the that defines the projection. + + + The that defines the projection. + + The expression is null. + + The expression is not associated with the command tree of the + + , or its result type is not equal or promotable to the reference type of the current projection. + + + + Provides methods and properties for retrieving an instance property. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + Creates a new key/value pair based on this property expression. + + A new key/value pair with the key and value derived from the + + . + + + + + Enables implicit casting to . + + The expression to be converted. + The converted value. + + + Gets the property metadata for the property to retrieve. + The property metadata for the property to retrieve. + + + + Gets a that defines the instance from which the property should be retrieved. + + + A that defines the instance from which the property should be retrieved. + + The expression is null. + + The expression is not associated with the command tree of the + + , or its result type is not equal or promotable to the type that defines the property. + + + + Represents a quantifier operation of the specified kind over the elements of the specified input set. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + + Gets the that specifies the input set. + + + The that specifies the input set. + + + + Gets the Boolean predicate that should be evaluated for each element in the input set. + The Boolean predicate that should be evaluated for each element in the input set. + The expression is null. + + The expression is not associated with the command tree for the + + ,or its result type is not a Boolean type. + + + + Represents a strongly typed reference to a specific instance within an entity set. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + Gets the metadata for the entity set that contains the instance. + The metadata for the entity set that contains the instance. + + + Represents the navigation of a relationship. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + Gets the metadata for the relationship over which navigation occurs. + The metadata for the relationship over which navigation occurs. + + + Gets the metadata for the relationship end to navigate from. + The metadata for the relationship end to navigate from. + + + Gets the metadata for the relationship end to navigate to. + The metadata for the relationship end to navigate to. + + + + Gets an that specifies the starting point of the navigation and must be a reference to an entity instance. + + + An that specifies the instance of the source relationship end from which navigation should occur. + + The expression is null. + + The expression is not associated with the command tree of the + + , or its result type is not equal or promotable to the reference type of the + + property. + + + + + Skips a specified number of elements in the input set. + + can only be used after the input collection has been sorted as specified by the sort keys. + + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + + Gets the that specifies the input set. + + + The that specifies the input set. + + + + + Gets a list that defines the sort order. + + + A list that defines the sort order. + + + + Gets an expression that specifies the number of elements to skip from the input collection. + An expression that specifies the number of elements to skip from the input collection. + The expression is null. + + The expression is not associated with the command tree of the + + ; the expression is not either a + + or a + + ; or the result type of the expression is not equal or promotable to a 64-bit integer type. + + + + + Specifies a sort key that can be used as part of the sort order in a + + . This class cannot be inherited. + + + + Gets a Boolean value indicating whether or not this sort key uses an ascending sort order. + true if this sort key uses an ascending sort order; otherwise, false. + + + Gets a string value that specifies the collation for this sort key. + A string value that specifies the collation for this sort key. + + + + Gets the that provides the value for this sort key. + + + The that provides the value for this sort key. + + + + Represents a sort operation applied to the elements of the specified input set based on the given sort keys. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by + visitor + + + visitor + is null. + + + + Gets the that specifies the input set. + + + The that specifies the input set. + + + + + Gets a list that defines the sort order. + + + A list that defines the sort order. + + + + Represents a type conversion operation applied to a polymorphic argument. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + Supports standard aggregate functions, such as MIN, MAX, AVG, SUM, and so on. This class cannot be inherited. + + + Gets a value indicating whether this aggregate is a distinct aggregate. + true if the aggregate is a distinct aggregate; otherwise, false. + + + Gets the method metadata that specifies the aggregate function to invoke. + The method metadata that specifies the aggregate function to invoke. + + + + An abstract base type for types that implement the IExpressionVisitor interface to derive from. + + + + + An abstract base type for types that implement the IExpressionVisitor interface to derive from. + + + + Defines the basic functionality that should be implemented by visitors that do not return a result value. + + + When overridden in a derived class, handles any expression of an unrecognized type. + The expression to be handled. + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + When overridden in a derived class, implements the visitor pattern for + + . + + + The that is visited. + + + + + Visitor pattern method for DbInExpression. + + The DbInExpression that is being visited. + + + + Convenience method to visit the specified . + + The DbUnaryExpression to visit. + + + is null + + + + + Convenience method to visit the specified . + + The DbBinaryExpression to visit. + + + is null + + + + + Convenience method to visit the specified . + + The DbExpressionBinding to visit. + + + is null + + + + + Convenience method for post-processing after a DbExpressionBinding has been visited. + + The previously visited DbExpressionBinding. + + + + Convenience method to visit the specified . + + The DbGroupExpressionBinding to visit. + + + is null + + + + + Convenience method indicating that the grouping keys of a have been visited and the aggregates are now about to be visited. + + The DbGroupExpressionBinding of the DbGroupByExpression + + + + Convenience method for post-processing after a DbGroupExpressionBinding has been visited. + + The previously visited DbGroupExpressionBinding. + + + + Convenience method indicating that the body of a Lambda is now about to be visited. + + The DbLambda that is about to be visited + + + is null + + + + + Convenience method for post-processing after a DbLambda has been visited. + + The previously visited DbLambda. + + + + Convenience method to visit the specified , if non-null. + + The expression to visit. + + + is null + + + + + Convenience method to visit each in the given list, if the list is non-null. + + The list of expressions to visit. + + + is null + + + + + Convenience method to visit each in the list, if the list is non-null. + + The list of aggregates to visit. + + + is null + + + + + Convenience method to visit the specified . + + The aggregate to visit. + + + is null + + + + + Called when an of an otherwise unrecognized type is encountered. + + The expression + + + is null + + + Always thrown if this method is called, since it indicates that + + is of an unsupported type + + + + + Visitor pattern method for . + + The DbConstantExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbNullExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbVariableReferenceExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbParameterReferenceExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbFunctionExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbLambdaExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbPropertyExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbComparisonExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbLikeExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbLimitExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbIsNullExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbArithmeticExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbAndExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbOrExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbInExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbNotExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbDistinctExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbElementExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbIsEmptyExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbUnionAllExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbIntersectExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbExceptExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbOfTypeExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbTreatExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbCastExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbIsOfExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbCaseExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbNewInstanceExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbRefExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbRelationshipNavigationExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DeRefExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbRefKeyExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbEntityRefExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbScanExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbFilterExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbProjectExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbCrossJoinExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbJoinExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbApplyExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbSkipExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbSortExpression that is being visited. + + + is null + + + + + Visitor pattern method for . + + The DbQuantifierExpression that is being visited. + + + is null + + + + Implements the visitor pattern for the set clause. + The set clause. + + + Implements the visitor pattern for the modification clause. + The modification clause. + + + Implements the visitor pattern for the collection of modification clauses. + The modification clauses. + + + Implements the visitor pattern for the command tree. + The command tree. + + + Implements the visitor pattern for the delete command tree. + The delete command tree. + + + Implements the visitor pattern for the function command tree. + The function command tree. + + + Implements the visitor pattern for the insert command tree. + The insert command tree. + + + Implements the visitor pattern for the query command tree. + The query command tree. + + + Implements the visitor pattern for the update command tree. + The update command tree. + + + An immutable class that implements the basic functionality for the Query, Insert, Update, Delete, and function invocation command tree types. + + + + Returns a that represents this command. + + + A that represents this command. + + + + + Gets a value indicating whether database null semantics are exhibited when comparing + two operands, both of which are potentially nullable. The default value is true. + + For example (operand1 == operand2) will be translated as: + + (operand1 = operand2) + + if UseDatabaseNullSemantics is true, respectively + + (((operand1 = operand2) AND (NOT (operand1 IS NULL OR operand2 IS NULL))) OR ((operand1 IS NULL) AND (operand2 IS NULL))) + + if UseDatabaseNullSemantics is false. + + + true if database null comparison behavior is enabled, otherwise false . + + + + + Gets the name and corresponding type of each parameter that can be referenced within this + + . + + + The name and corresponding type of each parameter that can be referenced within this + + . + + + + + Gets the kind of this command tree. + + + + + Gets the metadata workspace used by this command tree. + + + + + Gets the data space in which metadata used by this command tree must reside. + + + + Represents a single row delete operation expressed as a command tree. This class cannot be inherited. + + + Represents a data manipulation language (DML) operation expressed as a command tree. + + + + Gets the that specifies the target table for the data manipulation language (DML) operation. + + + The that specifies the target table for the DML operation. + + + + + Initializes a new instance of the class. + + The model this command will operate on. + The data space. + The target table for the data manipulation language (DML) operation. + A predicate used to determine which members of the target collection should be deleted. + + + + Gets an that specifies the predicate used to determine which members of the target collection should be deleted. + + + The predicate can include only the following elements: + + Equality expression + Constant expression + IsNull expression + Property expression + Reference expression to the target + And expression + Or expression + Not expression + + + + An that specifies the predicate used to determine which members of the target collection should be deleted. + + + + Gets the kind of this command tree. + The kind of this command tree. + + + + Contains values that each expression class uses to denote the operation it represents. The + + property of an + + can be retrieved to determine which operation that expression represents. + + + + + True for all. + + + + + Logical And. + + + + + True for any. + + + + + Conditional case statement. + + + + + Polymorphic type cast. + + + + + A constant value. + + + + + Cross apply + + + + + Cross join + + + + + Dereference. + + + + + Duplicate removal. + + + + + Division. + + + + + Set to singleton conversion. + + + + + Entity ref value retrieval. + + + + + Equality + + + + + Set subtraction + + + + + Restriction. + + + + + Full outer join + + + + + Invocation of a stand-alone function + + + + + Greater than. + + + + + Greater than or equal. + + + + + Grouping. + + + + + Inner join + + + + + Set intersection. + + + + + Empty set determination. + + + + + Null determination. + + + + + Type comparison (specified Type or Subtype). + + + + + Type comparison (specified Type only). + + + + + Left outer join + + + + + Less than. + + + + + Less than or equal. + + + + + String comparison. + + + + + Result count restriction (TOP n). + + + + + Subtraction. + + + + + Modulo. + + + + + Multiplication. + + + + + Instance, row, and set construction. + + + + + Logical Not. + + + + + Inequality. + + + + + Null. + + + + + Set members by type (or subtype). + + + + + Set members by (exact) type. + + + + + Logical Or. + + + + + Outer apply. + + + + + A reference to a parameter. + + + + + Addition. + + + + + Projection. + + + + + Retrieval of a static or instance property. + + + + + Reference. + + + + + Ref key value retrieval. + + + + + Navigation of a (composition or association) relationship. + + + + + Entity or relationship set scan. + + + + + Skip elements of an ordered collection. + + + + + Sorting. + + + + + Type conversion. + + + + + Negation. + + + + + Set union (with duplicates). + + + + + A reference to a variable. + + + + + Application of a lambda function + + + + + In. + + + + Represents the invocation of a database function. + + + + Constructs a new DbFunctionCommandTree that uses the specified metadata workspace, data space and function metadata + + The metadata workspace that the command tree should use. + The logical 'space' that metadata in the expressions used in this command tree must belong to. + The that represents the function that is being invoked. + The expected result type for the function’s first result set. + The function's parameters. + + , or is null + + + does not represent a valid data space or + is a composable function + + + + + Gets the that represents the function that is being invoked. + + + The that represents the function that is being invoked. + + + + Gets the expected result type for the function’s first result set. + The expected result type for the function’s first result set. + + + Gets or sets the command tree kind. + The command tree kind. + + + Represents a single row insert operation expressed as a command tree. This class cannot be inherited. + + Represents a single row insert operation expressed as a canonical command tree. + When the property is set, the command returns a reader; otherwise, + it returns a scalar value indicating the number of rows affected. + + + + + Initializes a new instance of the class. + + The model this command will operate on. + The data space. + The target table for the data manipulation language (DML) operation. + The list of insert set clauses that define the insert operation. . + A that specifies a projection of results to be returned, based on the modified rows. + + + Gets the list of insert set clauses that define the insert operation. + The list of insert set clauses that define the insert operation. + + + + Gets an that specifies a projection of results to be returned based on the modified rows. + + + An that specifies a projection of results to be returned based on the modified rows. null indicates that no results should be returned from this command. + + + + Gets the command tree kind. + The command tree kind. + + + + Represents a Lambda function that can be invoked to produce a + + . + + + + + Creates a with the specified inline Lambda function implementation and formal parameters. + + A new DbLambda that describes an inline Lambda function with the specified body and formal parameters + An expression that defines the logic of the Lambda function + + A collection that represents the formal parameters to the Lambda function. These variables are valid for use in the body expression. + + + + is null or contains null, or + + is null + + + + contains more than one element with the same variable name. + + + + + Creates a with the specified inline Lambda function implementation and formal parameters. + + A new DbLambda that describes an inline Lambda function with the specified body and formal parameters + An expression that defines the logic of the Lambda function + + A collection that represents the formal parameters to the Lambda function. These variables are valid for use in the body expression. + + + + is null or contains null, or + + is null. + + + + contains more than one element with the same variable name. + + + + + Creates a new with a single argument of the specified type, as defined by the specified function. + + A new DbLambda that describes an inline Lambda function with the specified body and single formal parameter. + + A that defines the EDM type of the argument to the Lambda function + + + A function that defines the logic of the Lambda function as a + + + + + is null, or + + is null or produces a result of null. + + + + + Creates a new with arguments of the specified types, as defined by the specified function. + + A new DbLambda that describes an inline Lambda function with the specified body and formal parameters. + + A that defines the EDM type of the first argument to the Lambda function + + + A that defines the EDM type of the second argument to the Lambda function + + + A function that defines the logic of the Lambda function as a + + + + + is null, + + is null, or + + is null or produces a result of null. + + + + + Creates a new with arguments of the specified types, as defined by the specified function. + + A new DbLambda that describes an inline Lambda function with the specified body and formal parameters. + + A that defines the EDM type of the first argument to the Lambda function + + + A that defines the EDM type of the second argument to the Lambda function + + + A that defines the EDM type of the third argument to the Lambda function + + + A function that defines the logic of the Lambda function as a + + + + + is null, + + is null, + + is null, or + + is null or produces a result of null. + + + + + Creates a new with arguments of the specified types, as defined by the specified function. + + A new DbLambda that describes an inline Lambda function with the specified body and formal parameters. + + A that defines the EDM type of the first argument to the Lambda function + + + A that defines the EDM type of the second argument to the Lambda function + + + A that defines the EDM type of the third argument to the Lambda function + + + A that defines the EDM type of the fourth argument to the Lambda function + + + A function that defines the logic of the Lambda function as a + + + + + is null, + + is null, + + is null, + + is null, or + + is null or produces a result of null. + + + + + Creates a new with arguments of the specified types, as defined by the specified function. + + A new DbLambda that describes an inline Lambda function with the specified body and formal parameters. + + A that defines the EDM type of the first argument to the Lambda function + + + A that defines the EDM type of the second argument to the Lambda function + + + A that defines the EDM type of the third argument to the Lambda function + + + A that defines the EDM type of the fourth argument to the Lambda function + + + A that defines the EDM type of the fifth argument to the Lambda function + + + A function that defines the logic of the Lambda function as a + + + + + is null, + + is null, + + is null, + + is null, + + is null, or + + is null or produces a result of null. + + + + + Creates a new with arguments of the specified types, as defined by the specified function. + + A new DbLambda that describes an inline Lambda function with the specified body and formal parameters. + + A that defines the EDM type of the first argument to the Lambda function + + + A that defines the EDM type of the second argument to the Lambda function + + + A that defines the EDM type of the third argument to the Lambda function + + + A that defines the EDM type of the fourth argument to the Lambda function + + + A that defines the EDM type of the fifth argument to the Lambda function + + + A that defines the EDM type of the sixth argument to the Lambda function + + + A function that defines the logic of the Lambda function as a + + + + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, or + + is null or produces a result of null. + + + + + Creates a new with arguments of the specified types, as defined by the specified function. + + A new DbLambda that describes an inline Lambda function with the specified body and formal parameters. + + A that defines the EDM type of the first argument to the Lambda function + + + A that defines the EDM type of the second argument to the Lambda function + + + A that defines the EDM type of the third argument to the Lambda function + + + A that defines the EDM type of the fourth argument to the Lambda function + + + A that defines the EDM type of the fifth argument to the Lambda function + + + A that defines the EDM type of the sixth argument to the Lambda function + + + A that defines the EDM type of the seventh argument to the Lambda function + + + A function that defines the logic of the Lambda function as a + + + + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, or + + is null or produces a result of null. + + + + + Creates a new with arguments of the specified types, as defined by the specified function. + + A new DbLambda that describes an inline Lambda function with the specified body and formal parameters. + + A that defines the EDM type of the first argument to the Lambda function + + + A that defines the EDM type of the second argument to the Lambda function + + + A that defines the EDM type of the third argument to the Lambda function + + + A that defines the EDM type of the fourth argument to the Lambda function + + + A that defines the EDM type of the fifth argument to the Lambda function + + + A that defines the EDM type of the sixth argument to the Lambda function + + + A that defines the EDM type of the seventh argument to the Lambda function + + + A that defines the EDM type of the eighth argument to the Lambda function + + + A function that defines the logic of the Lambda function as a + + + + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, or + + is null or produces a result of null. + + + + + Creates a new with arguments of the specified types, as defined by the specified function. + + A new DbLambda that describes an inline Lambda function with the specified body and formal parameters. + + A that defines the EDM type of the first argument to the Lambda function + + + A that defines the EDM type of the second argument to the Lambda function + + + A that defines the EDM type of the third argument to the Lambda function + + + A that defines the EDM type of the fourth argument to the Lambda function + + + A that defines the EDM type of the fifth argument to the Lambda function + + + A that defines the EDM type of the sixth argument to the Lambda function + + + A that defines the EDM type of the seventh argument to the Lambda function + + + A that defines the EDM type of the eighth argument to the Lambda function + + + A that defines the EDM type of the ninth argument to the Lambda function + + + A function that defines the logic of the Lambda function as a + + + + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, or + + is null or produces a result of null. + + + + + Creates a new with arguments of the specified types, as defined by the specified function. + + A new DbLambda that describes an inline Lambda function with the specified body and formal parameters. + + A that defines the EDM type of the first argument to the Lambda function + + + A that defines the EDM type of the second argument to the Lambda function + + + A that defines the EDM type of the third argument to the Lambda function + + + A that defines the EDM type of the fourth argument to the Lambda function + + + A that defines the EDM type of the fifth argument to the Lambda function + + + A that defines the EDM type of the sixth argument to the Lambda function + + + A that defines the EDM type of the seventh argument to the Lambda function + + + A that defines the EDM type of the eighth argument to the Lambda function + + + A that defines the EDM type of the ninth argument to the Lambda function + + + A that defines the EDM type of the tenth argument to the Lambda function + + + A function that defines the logic of the Lambda function as a + + + + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, or + + is null or produces a result of null. + + + + + Creates a new with arguments of the specified types, as defined by the specified function. + + A new DbLambda that describes an inline Lambda function with the specified body and formal parameters. + + A that defines the EDM type of the first argument to the Lambda function + + + A that defines the EDM type of the second argument to the Lambda function + + + A that defines the EDM type of the third argument to the Lambda function + + + A that defines the EDM type of the fourth argument to the Lambda function + + + A that defines the EDM type of the fifth argument to the Lambda function + + + A that defines the EDM type of the sixth argument to the Lambda function + + + A that defines the EDM type of the seventh argument to the Lambda function + + + A that defines the EDM type of the eighth argument to the Lambda function + + + A that defines the EDM type of the ninth argument to the Lambda function + + + A that defines the EDM type of the tenth argument to the Lambda function + + + A that defines the EDM type of the eleventh argument to the Lambda function + + + A function that defines the logic of the Lambda function as a + + + + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, or + + is null or produces a result of null. + + + + + Creates a new with arguments of the specified types, as defined by the specified function. + + A new DbLambda that describes an inline Lambda function with the specified body and formal parameters. + + A that defines the EDM type of the first argument to the Lambda function + + + A that defines the EDM type of the second argument to the Lambda function + + + A that defines the EDM type of the third argument to the Lambda function + + + A that defines the EDM type of the fourth argument to the Lambda function + + + A that defines the EDM type of the fifth argument to the Lambda function + + + A that defines the EDM type of the sixth argument to the Lambda function + + + A that defines the EDM type of the seventh argument to the Lambda function + + + A that defines the EDM type of the eighth argument to the Lambda function + + + A that defines the EDM type of the ninth argument to the Lambda function + + + A that defines the EDM type of the tenth argument to the Lambda function + + + A that defines the EDM type of the eleventh argument to the Lambda function + + + A that defines the EDM type of the twelfth argument to the Lambda function + + + A function that defines the logic of the Lambda function as a + + + + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, or + + is null or produces a result of null. + + + + + Creates a new with arguments of the specified types, as defined by the specified function. + + A new DbLambda that describes an inline Lambda function with the specified body and formal parameters. + + A that defines the EDM type of the first argument to the Lambda function + + + A that defines the EDM type of the second argument to the Lambda function + + + A that defines the EDM type of the third argument to the Lambda function + + + A that defines the EDM type of the fourth argument to the Lambda function + + + A that defines the EDM type of the fifth argument to the Lambda function + + + A that defines the EDM type of the sixth argument to the Lambda function + + + A that defines the EDM type of the seventh argument to the Lambda function + + + A that defines the EDM type of the eighth argument to the Lambda function + + + A that defines the EDM type of the ninth argument to the Lambda function + + + A that defines the EDM type of the tenth argument to the Lambda function + + + A that defines the EDM type of the eleventh argument to the Lambda function + + + A that defines the EDM type of the twelfth argument to the Lambda function + + + A that defines the EDM type of the thirteenth argument to the Lambda function + + + A function that defines the logic of the Lambda function as a + + + + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, or + + is null or produces a result of null. + + + + + Creates a new with arguments of the specified types, as defined by the specified function. + + A new DbLambda that describes an inline Lambda function with the specified body and formal parameters. + + A that defines the EDM type of the first argument to the Lambda function + + + A that defines the EDM type of the second argument to the Lambda function + + + A that defines the EDM type of the third argument to the Lambda function + + + A that defines the EDM type of the fourth argument to the Lambda function + + + A that defines the EDM type of the fifth argument to the Lambda function + + + A that defines the EDM type of the sixth argument to the Lambda function + + + A that defines the EDM type of the seventh argument to the Lambda function + + + A that defines the EDM type of the eighth argument to the Lambda function + + + A that defines the EDM type of the ninth argument to the Lambda function + + + A that defines the EDM type of the tenth argument to the Lambda function + + + A that defines the EDM type of the eleventh argument to the Lambda function + + + A that defines the EDM type of the twelfth argument to the Lambda function + + + A that defines the EDM type of the thirteenth argument to the Lambda function + + + A that defines the EDM type of the fourteenth argument to the Lambda function + + + A function that defines the logic of the Lambda function as a + + + + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, or + + is null or produces a result of null. + + + + + Creates a new with arguments of the specified types, as defined by the specified function. + + A new DbLambda that describes an inline Lambda function with the specified body and formal parameters. + + A that defines the EDM type of the first argument to the Lambda function + + + A that defines the EDM type of the second argument to the Lambda function + + + A that defines the EDM type of the third argument to the Lambda function + + + A that defines the EDM type of the fourth argument to the Lambda function + + + A that defines the EDM type of the fifth argument to the Lambda function + + + A that defines the EDM type of the sixth argument to the Lambda function + + + A that defines the EDM type of the seventh argument to the Lambda function + + + A that defines the EDM type of the eighth argument to the Lambda function + + + A that defines the EDM type of the ninth argument to the Lambda function + + + A that defines the EDM type of the tenth argument to the Lambda function + + + A that defines the EDM type of the eleventh argument to the Lambda function + + + A that defines the EDM type of the twelfth argument to the Lambda function + + + A that defines the EDM type of the thirteenth argument to the Lambda function + + + A that defines the EDM type of the fourteenth argument to the Lambda function + + + A that defines the EDM type of the fifteenth argument to the Lambda function + + + A function that defines the logic of the Lambda function as a + + + + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + or + + is null or produces a result of null. + + + + + Creates a new with arguments of the specified types, as defined by the specified function. + + A new DbLambda that describes an inline Lambda function with the specified body and formal parameters. + + A that defines the EDM type of the first argument to the Lambda function + + + A that defines the EDM type of the second argument to the Lambda function + + + A that defines the EDM type of the third argument to the Lambda function + + + A that defines the EDM type of the fourth argument to the Lambda function + + + A that defines the EDM type of the fifth argument to the Lambda function + + + A that defines the EDM type of the sixth argument to the Lambda function + + + A that defines the EDM type of the seventh argument to the Lambda function + + + A that defines the EDM type of the eighth argument to the Lambda function + + + A that defines the EDM type of the ninth argument to the Lambda function + + + A that defines the EDM type of the tenth argument to the Lambda function + + + A that defines the EDM type of the eleventh argument to the Lambda function + + + A that defines the EDM type of the twelfth argument to the Lambda function + + + A that defines the EDM type of the thirteenth argument to the Lambda function + + + A that defines the EDM type of the fourteenth argument to the Lambda function + + + A that defines the EDM type of the fifteenth argument to the Lambda function + + + A that defines the EDM type of the sixteenth argument to the Lambda function + + + A function that defines the logic of the Lambda function as a + + + + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, + + is null, or + + is null or produces a result of null. + + + + Gets the body of the lambda expression. + + A that represents the body of the lambda function. + + + + Gets the parameters of the lambda expression. + The list of lambda function parameters represented as DbVariableReferenceExpression objects. + + + + Specifies a single clause in an insert or update modification operation, see + and + + + An abstract base class allows the possibility of patterns other than + Property = Value in future versions, e.g., + update SomeTable + set ComplexTypeColumn.SomeProperty() + where Id = 2 + + + + Represents a query operation expressed as a command tree. This class cannot be inherited. + + + + Constructs a new DbQueryCommandTree that uses the specified metadata workspace. + + The metadata workspace that the command tree should use. + The logical 'space' that metadata in the expressions used in this command tree must belong to. + + A that defines the logic of the query. + + When set to false the validation of the tree is turned off. + A boolean that indicates whether database null semantics are exhibited when comparing + two operands, both of which are potentially nullable. + + + or + + is null + + + + does not represent a valid data space + + + + + Constructs a new DbQueryCommandTree that uses the specified metadata workspace, using database null semantics. + + The metadata workspace that the command tree should use. + The logical 'space' that metadata in the expressions used in this command tree must belong to. + + A that defines the logic of the query. + + When set to false the validation of the tree is turned off. + + + or + + is null + + + + does not represent a valid data space + + + + + Constructs a new DbQueryCommandTree that uses the specified metadata workspace, using database null semantics. + + The metadata workspace that the command tree should use. + The logical 'space' that metadata in the expressions used in this command tree must belong to. + + A that defines the logic of the query. + + + + or + + is null + + + + does not represent a valid data space + + + + + Gets an that defines the logic of the query operation. + + + An that defines the logic of the query operation. + + The expression is null. + The expression is associated with a different command tree. + + + Gets the kind of this command tree. + The kind of this command tree. + + + Specifies the clause in a modification operation that sets the value of a property. This class cannot be inherited. + + + + Gets an that specifies the property that should be updated. + + + An that specifies the property that should be updated. + + + + + Gets an that specifies the new value with which to update the property. + + + An that specifies the new value with which to update the property. + + + + Represents a single-row update operation expressed as a command tree. This class cannot be inherited. + + Represents a single-row update operation expressed as a canonical command tree. + When the property is set, the command returns a reader; otherwise, + it returns a scalar indicating the number of rows affected. + + + + + Initializes a new instance of the class. + + The model this command will operate on. + The data space. + The target table for the data manipulation language (DML) operation. + A predicate used to determine which members of the target collection should be updated. + The list of update set clauses that define the update operation. + A that specifies a projection of results to be returned, based on the modified rows. + + + Gets the list of update set clauses that define the update operation. + The list of update set clauses that define the update operation. + + + + Gets an that specifies a projection of results to be returned, based on the modified rows. + + + An that specifies a projection of results to be returned based, on the modified rows. null indicates that no results should be returned from this command. + + + + + Gets an that specifies the predicate used to determine which members of the target collection should be updated. + + + An that specifies the predicate used to determine which members of the target collection should be updated. + + + + Gets the kind of this command tree. + The kind of this command tree. + + + Represents a reference to a variable that is currently in scope. This class cannot be inherited. + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + Gets the name of the referenced variable. + The name of the referenced variable. + + + + Defines the binding for the input set to a . + In addition to the properties of , DbGroupExpressionBinding + also provides access to the group element via the variable reference + and to the group aggregate via the property. + + + + + Gets the that defines the input set. + + + The that defines the input set. + + The expression is null. + + The expression is not associated with the command tree of the + + , or its result type is not equal or promotable to the result type of the current value of the property. + + + + Gets the name assigned to the element variable. + The name assigned to the element variable. + + + Gets the type metadata of the element variable. + The type metadata of the element variable. + + + + Gets the that references the element variable. + + A reference to the element variable. + + + Gets the name assigned to the group element variable. + The name assigned to the group element variable. + + + Gets the type metadata of the group element variable. + The type metadata of the group element variable. + + + + Gets the that references the group element variable. + + A reference to the group element variable. + + + + Gets the that represents the collection of elements in the group. + + The elements in the group. + + + + Provides an API to construct s and allows that API to be accessed as extension methods on the expression type itself. + + + + Returns the specified arguments as a key/value pair object. + A key/value pair object. + The value in the key/value pair. + The key in the key/value pair. + + + Returns the specified arguments as a key/value pair object. + A key/value pair object. + The value in the key/value pair. + The key in the key/value pair. + + + + Creates a new that uses a generated variable name to bind the given expression. + + A new expression binding with the specified expression and a generated variable name. + The expression to bind. + input is null. + input does not have a collection result. + + + + Creates a new that uses the specified variable name to bind the given expression + + A new expression binding with the specified expression and variable name. + The expression to bind. + The variable name that should be used for the binding. + input or varName is null. + input does not have a collection result. + + + Creates a new group expression binding that uses generated variable and group variable names to bind the given expression. + A new group expression binding with the specified expression and a generated variable name and group variable name. + The expression to bind. + input is null. + input does not have a collection result type. + + + + Creates a new that uses the specified variable name and group variable names to bind the given expression. + + A new group expression binding with the specified expression, variable name and group variable name. + The expression to bind. + The variable name that should be used for the binding. + The variable name that should be used to refer to the group when the new group expression binding is used in a group-by expression. + input, varName or groupVarName is null. + input does not have a collection result type. + + + + Creates a new . + + A new function aggregate with a reference to the given function and argument. The function aggregate's Distinct property will have the value false. + The function that defines the aggregate operation. + The argument over which the aggregate function should be calculated. + function or argument null. + function is not an aggregate function or has more than one argument, or the result type of argument is not equal or promotable to the parameter type of function. + + + + Creates a new that is applied in a distinct fashion. + + A new function aggregate with a reference to the given function and argument. The function aggregate's Distinct property will have the value true. + The function that defines the aggregate operation. + The argument over which the aggregate function should be calculated. + function or argument is null. + function is not an aggregate function or has more than one argument, or the result type of argument is not equal or promotable to the parameter type of function. + + + + Creates a new over the specified argument + + The argument over which to perform the nest operation + A new group aggregate representing the elements of the group referenced by the given argument. + + + is null + + + + + Creates a with the specified inline Lambda function implementation and formal parameters. + + A new expression that describes an inline Lambda function with the specified body and formal parameters. + An expression that defines the logic of the Lambda function. + + A collection that represents the formal parameters to the Lambda function. These variables are valid for use in the body expression. + + variables is null or contains null, or body is null. + variables contains more than one element with the same variable name. + + + + Creates a with the specified inline Lambda function implementation and formal parameters. + + A new expression that describes an inline Lambda function with the specified body and formal parameters. + An expression that defines the logic of the Lambda function. + + A collection that represents the formal parameters to the Lambda function. These variables are valid for use in the body expression. + + variables is null or contains null, or body is null. + variables contains more than one element with the same variable name. + + + + Creates a new with an ascending sort order and default collation. + + A new sort clause with the given sort key and ascending sort order. + The expression that defines the sort key. + key is null. + key does not have an order-comparable result type. + + + + Creates a new with a descending sort order and default collation. + + A new sort clause with the given sort key and descending sort order. + The expression that defines the sort key. + key is null. + key does not have an order-comparable result type. + + + + Creates a new with an ascending sort order and the specified collation. + + A new sort clause with the given sort key and collation, and ascending sort order. + The expression that defines the sort key. + The collation to sort under. + key is null. + collation is empty or contains only space characters. + key does not have an order-comparable result type. + + + + Creates a new with a descending sort order and the specified collation. + + A new sort clause with the given sort key and collation, and descending sort order. + The expression that defines the sort key. + The collation to sort under. + key is null. + collation is empty or contains only space characters. + key does not have an order-comparable result type. + + + + Creates a new that determines whether the given predicate holds for all elements of the input set. + + A new DbQuantifierExpression that represents the All operation. + An expression binding that specifies the input set. + An expression representing a predicate to evaluate for each member of the input set. + input or predicate is null. + predicate does not have a Boolean result type. + + + + Creates a new that determines whether the given predicate holds for any element of the input set. + + A new DbQuantifierExpression that represents the Any operation. + An expression binding that specifies the input set. + An expression representing a predicate to evaluate for each member of the input set. + input or predicate is null. + The expression produced by predicate does not have a Boolean result type. + + + + Creates a new that evaluates the given apply expression once for each element of a given input set, producing a collection of rows with corresponding input and apply columns. Rows for which apply evaluates to an empty set are not included. + + + An new DbApplyExpression with the specified input and apply bindings and an + + of CrossApply. + + + An that specifies the input set. + + + An that specifies logic to evaluate once for each member of the input set. + + input or apply is null. + + + + Creates a new that evaluates the given apply expression once for each element of a given input set, producing a collection of rows with corresponding input and apply columns. Rows for which apply evaluates to an empty set have an apply column value of null. + + + An new DbApplyExpression with the specified input and apply bindings and an + + of OuterApply. + + + An that specifies the input set. + + + An that specifies logic to evaluate once for each member of the input set. + + input or apply is null. + + + + Creates a new that unconditionally joins the sets specified by the list of input expression bindings. + + + A new DbCrossJoinExpression, with an of CrossJoin, that represents the unconditional join of the input sets. + + A list of expression bindings that specifies the input sets. + inputs is null or contains null element. + inputs contains fewer than 2 expression bindings. + + + + Creates a new that joins the sets specified by the left and right expression bindings, on the specified join condition, using InnerJoin as the + + . + + + A new DbJoinExpression, with an of InnerJoin, that represents the inner join operation applied to the left and right input sets under the given join condition. + + + An that specifies the left set argument. + + + An that specifies the right set argument. + + An expression that specifies the condition on which to join. + left, right or joinCondition is null. + joinCondition does not have a Boolean result type. + + + + Creates a new that joins the sets specified by the left and right expression bindings, on the specified join condition, using LeftOuterJoin as the + + . + + + A new DbJoinExpression, with an of LeftOuterJoin, that represents the left outer join operation applied to the left and right input sets under the given join condition. + + + An that specifies the left set argument. + + + An that specifies the right set argument. + + An expression that specifies the condition on which to join. + left, right or joinCondition is null. + joinCondition does not have a Boolean result type. + + + + Creates a new that joins the sets specified by the left and right expression bindings, on the specified join condition, using FullOuterJoin as the + + . + + + A new DbJoinExpression, with an of FullOuterJoin, that represents the full outer join operation applied to the left and right input sets under the given join condition. + + + An that specifies the left set argument. + + + An that specifies the right set argument. + + An expression that specifies the condition on which to join. + left, right or joinCondition is null. + The expression produced by joinCondition does not have a Boolean result type. + + + + Creates a new that filters the elements in the given input set using the specified predicate. + + A new DbFilterExpression that produces the filtered set. + An expression binding that specifies the input set. + An expression representing a predicate to evaluate for each member of the input set. + input or predicate is null. + predicate does not have a Boolean result type. + + + + Creates a new that groups the elements of the input set according to the specified group keys and applies the given aggregates. + + A new DbGroupByExpression with the specified input set, grouping keys and aggregates. + + A that specifies the input set. + + A list of string-expression pairs that define the grouping columns. + A list of expressions that specify aggregates to apply. + input, keys or aggregates is null, keys contains a null column key or expression, or aggregates contains a null aggregate column name or aggregate. + Both keys and aggregates are empty, or an invalid or duplicate column name was specified. + + + + Creates a new that projects the specified expression over the given input set. + + A new DbProjectExpression that represents the projection operation. + An expression binding that specifies the input set. + An expression to project over the set. + input or projection is null. + + + + Creates a new that sorts the given input set by the given sort specifications before skipping the specified number of elements. + + A new DbSkipExpression that represents the skip operation. + An expression binding that specifies the input set. + A list of sort specifications that determine how the elements of the input set should be sorted. + An expression the specifies how many elements of the ordered set to skip. + input, sortOrder or count is null, or sortOrder contains null. + + sortOrder is empty, or count is not or + + or has a result type that is not equal or promotable to a 64-bit integer type. + + + + + Creates a new that sorts the given input set by the specified sort specifications. + + A new DbSortExpression that represents the sort operation. + An expression binding that specifies the input set. + A list of sort specifications that determine how the elements of the input set should be sorted. + input or sortOrder is null, or sortOrder contains null. + sortOrder is empty. + + + + Creates a new , which represents a typed null value. + + An instance of DbNullExpression. + The type of the null value. + nullType is null. + + + + Creates a new with the given constant value. + + A new DbConstantExpression with the given value. + The constant value to represent. + value is null. + value is not an instance of a valid constant type. + + + + Creates a new of the specified primitive type with the given constant value. + + A new DbConstantExpression with the given value and a result type of constantType. + The type of the constant value. + The constant value to represent. + value or constantType is null. + value is not an instance of a valid constant type, constantType does not represent a primitive type, or value is of a different primitive type than that represented by constantType. + + + + Creates a new that references a parameter with the specified name and type. + + A DbParameterReferenceExpression that represents a reference to a parameter with the specified name and type. The result type of the expression will be the same as type. + The type of the referenced parameter. + The name of the referenced parameter. + + + + Creates a new that references a variable with the specified name and type. + + A DbVariableReferenceExpression that represents a reference to a variable with the specified name and type. The result type of the expression will be the same as type. + The type of the referenced variable. + The name of the referenced variable. + + + + Creates a new that references the specified entity or relationship set. + + A new DbScanExpression based on the specified entity or relationship set. + Metadata for the entity or relationship set to reference. + targetSet is null. + + + + Creates an that performs the logical And of the left and right arguments. + + A new DbAndExpression with the specified arguments. + A Boolean expression that specifies the left argument. + A Boolean expression that specifies the right argument. + left or right is null. + left and right does not have a Boolean result type. + + + + Creates an that performs the logical Or of the left and right arguments. + + A new DbOrExpression with the specified arguments. + A Boolean expression that specifies the left argument. + A Boolean expression that specifies the right argument. + left or right is null. + left or right does not have a Boolean result type. + + + + Creates a that matches the result of the specified + expression with the results of the constant expressions in the specified list. + + A DbExpression to be matched. + A list of DbConstantExpression to test for a match. + + A new DbInExpression with the specified arguments. + + + + or + + is null. + + + The result type of + + is different than the result type of an expression from + . + + + + + Creates a that performs the logical negation of the given argument. + + A new DbNotExpression with the specified argument. + A Boolean expression that specifies the argument. + argument is null. + argument does not have a Boolean result type. + + + + Creates a new that divides the left argument by the right argument. + + A new DbArithmeticExpression representing the division operation. + An expression that specifies the left argument. + An expression that specifies the right argument. + left or right is null. + No common numeric result type exists between left or right. + + + + Creates a new that subtracts the right argument from the left argument. + + A new DbArithmeticExpression representing the subtraction operation. + An expression that specifies the left argument. + An expression that specifies the right argument. + left or right is null. + No common numeric result type exists between left and right. + + + + Creates a new that computes the remainder of the left argument divided by the right argument. + + A new DbArithmeticExpression representing the modulo operation. + An expression that specifies the left argument. + An expression that specifies the right argument. + left or right is null. + No common numeric result type exists between left and right. + + + + Creates a new that multiplies the left argument by the right argument. + + A new DbArithmeticExpression representing the multiplication operation. + An expression that specifies the left argument. + An expression that specifies the right argument. + left or right is null. + No common numeric result type exists between left and right. + + + + Creates a new that adds the left argument to the right argument. + + A new DbArithmeticExpression representing the addition operation. + An expression that specifies the left argument. + An expression that specifies the right argument. + left or right is null. + No common numeric result type exists between left and right. + + + + Creates a new that negates the value of the argument. + + A new DbArithmeticExpression representing the negation operation. + An expression that specifies the argument. + argument is null. + No numeric result type exists for argument. + + + + Creates a new that negates the value of the argument. + + A new DbArithmeticExpression representing the negation operation. + An expression that specifies the argument. + argument is null. + No numeric result type exists for argument. + + + + Creates a new that compares the left and right arguments for equality. + + A new DbComparisonExpression representing the equality comparison. + An expression that specifies the left argument. + An expression that specifies the right argument. + left or right is null. + No common equality-comparable result type exists between left and right. + + + + Creates a new that compares the left and right arguments for inequality. + + A new DbComparisonExpression representing the inequality comparison. + An expression that specifies the left argument. + An expression that specifies the right argument. + left or right is null. + No common equality-comparable result type exists between left and right. + + + + Creates a new that determines whether the left argument is greater than the right argument. + + A new DbComparisonExpression representing the greater-than comparison. + An expression that specifies the left argument. + An expression that specifies the right argument. + left or right is null. + No common order-comparable result type exists between left and right. + + + + Creates a new that determines whether the left argument is less than the right argument. + + A new DbComparisonExpression representing the less-than comparison. + An expression that specifies the left argument. + An expression that specifies the right argument. + left or right is null. + No common order-comparable result type exists between left and right. + + + + Creates a new that determines whether the left argument is greater than or equal to the right argument. + + A new DbComparisonExpression representing the greater-than-or-equal-to comparison. + An expression that specifies the left argument. + An expression that specifies the right argument. + left or right is null. + No common order-comparable result type exists between left and right. + + + + Creates a new that determines whether the left argument is less than or equal to the right argument. + + A new DbComparisonExpression representing the less-than-or-equal-to comparison. + An expression that specifies the left argument. + An expression that specifies the right argument. + left or right is null. + No common result type that is both equality- and order-comparable exists between left and right. + + + + Creates a new that determines whether the specified argument is null. + + A new DbIsNullExpression with the specified argument. + An expression that specifies the argument. + argument is null. + argument has a collection result type. + + + + Creates a new that compares the specified input string to the given pattern. + + A new DbLikeExpression with the specified input, pattern and a null escape. + An expression that specifies the input string. + An expression that specifies the pattern string. + Argument or pattern is null. + Argument or pattern does not have a string result type. + + + + Creates a new that compares the specified input string to the given pattern using the optional escape. + + A new DbLikeExpression with the specified input, pattern and escape. + An expression that specifies the input string. + An expression that specifies the pattern string. + An optional expression that specifies the escape string. + argument, pattern or escape is null. + argument, pattern or escape does not have a string result type. + + + + Creates a new that applies a cast operation to a polymorphic argument. + + A new DbCastExpression with the specified argument and target type. + The argument to which the cast should be applied. + Type metadata that specifies the type to cast to. + Argument or toType is null. + The specified cast is not valid. + + + + Creates a new . + + A new DbTreatExpression with the specified argument and type. + An expression that specifies the instance. + Type metadata for the treat-as type. + argument or treatType is null. + treatType is not in the same type hierarchy as the result type of argument. + + + + Creates a new that produces a set consisting of the elements of the given input set that are of the specified type. + + + A new DbOfTypeExpression with the specified set argument and type, and an ExpressionKind of + + . + + + A that specifies the input set. + + Type metadata for the type that elements of the input set must have to be included in the resulting set. + argument or type is null. + argument does not have a collection result type, or type is not a type in the same type hierarchy as the element type of the collection result type of argument. + + + + Creates a new that produces a set consisting of the elements of the given input set that are of exactly the specified type. + + + A new DbOfTypeExpression with the specified set argument and type, and an ExpressionKind of + + . + + + An that specifies the input set. + + Type metadata for the type that elements of the input set must match exactly to be included in the resulting set. + argument or type is null. + argument does not have a collection result type, or type is not a type in the same type hierarchy as the element type of the collection result type of argument. + + + + Creates a new that determines whether the given argument is of the specified type or a subtype. + + A new DbIsOfExpression with the specified instance and type and DbExpressionKind IsOf. + An expression that specifies the instance. + Type metadata that specifies the type that the instance's result type should be compared to. + argument or type is null. + type is not in the same type hierarchy as the result type of argument. + + + + Creates a new expression that determines whether the given argument is of the specified type, and only that type (not a subtype). + + A new DbIsOfExpression with the specified instance and type and DbExpressionKind IsOfOnly. + An expression that specifies the instance. + Type metadata that specifies the type that the instance's result type should be compared to. + argument or type is null. + type is not in the same type hierarchy as the result type of argument. + + + + Creates a new that retrieves a specific Entity given a reference expression. + + A new DbDerefExpression that retrieves the specified Entity. + + An that provides the reference. This expression must have a reference Type. + + argument is null. + argument does not have a reference result type. + + + + Creates a new that retrieves the ref of the specifed entity in structural form. + + A new DbEntityRefExpression that retrieves a reference to the specified entity. + The expression that provides the entity. This expression must have an entity result type. + argument is null. + argument does not have an entity result type. + + + + Creates a new that encodes a reference to a specific entity based on key values. + + A new DbRefExpression that references the element with the specified key values in the given entity set. + The entity set in which the referenced element resides. + + A collection of s that provide the key values. These expressions must match (in number, type, and order) the key properties of the referenced entity type. + + entitySet is null, or keyValues is null or contains null. + The count of keyValues does not match the count of key members declared by the entitySet’s element type, or keyValues contains an expression with a result type that is not compatible with the type of the corresponding key member. + + + + Creates a new that encodes a reference to a specific entity based on key values. + + A new DbRefExpression that references the element with the specified key values in the given entity set. + The entity set in which the referenced element resides. + + A collection of s that provide the key values. These expressions must match (in number, type, and order) the key properties of the referenced entity type. + + entitySet is null, or keyValues is null or contains null. + The count of keyValues does not match the count of key members declared by the entitySet’s element type, or keyValues contains an expression with a result type that is not compatible with the type of the corresponding key member. + + + + Creates a new that encodes a reference to a specific entity of a given type based on key values. + + A new DbRefExpression that references the element with the specified key values in the given entity set. + The entity set in which the referenced element resides. + The specific type of the referenced entity. This must be an entity type from the same hierarchy as the entity set's element type. + + A collection of s that provide the key values. These expressions must match (in number, type, and order) the key properties of the referenced entity type. + + entitySet or entityType is null, or keyValues is null or contains null. + entityType is not from the same type hierarchy (a subtype, supertype, or the same type) as entitySet's element type. + The count of keyValues does not match the count of key members declared by the entitySet’s element type, or keyValues contains an expression with a result type that is not compatible with the type of the corresponding key member. + + + + Creates a new that encodes a reference to a specific entity of a given type based on key values. + + A new DbRefExpression that references the element with the specified key values in the given entity set. + The entity set in which the referenced element resides. + The specific type of the referenced entity. This must be an entity type from the same hierarchy as the entity set's element type. + + A collection of s that provide the key values. These expressions must match (in number, type, and order) the key properties of the referenced entity type. + + entitySet or entityType is null, or keyValues is null or contains null. + entityType is not from the same type hierarchy (a subtype, supertype, or the same type) as entitySet's element type. + The count of keyValues does not match the count of key members declared by the entitySet’s element type, or keyValues contains an expression with a result type that is not compatible with the type of the corresponding key member. + + + + Creates a new that encodes a reference to a specific Entity based on key values. + + A new DbRefExpression that references the element with the specified key values in the given Entity set. + The Entity set in which the referenced element resides. + + A that constructs a record with columns that match (in number, type, and order) the Key properties of the referenced Entity type. + + entitySet or keyRow is null. + keyRow does not have a record result type that matches the key properties of the referenced entity set's entity type. + + + + Creates a new that encodes a reference to a specific Entity based on key values. + + A new DbRefExpression that references the element with the specified key values in the given Entity set. + The Entity set in which the referenced element resides. + + A that constructs a record with columns that match (in number, type, and order) the Key properties of the referenced Entity type. + + The type of the Entity that the reference should refer to. + entitySet, keyRow or entityType is null. + entityType is not in the same type hierarchy as the entity set's entity type, or keyRow does not have a record result type that matches the key properties of the referenced entity set's entity type. + + + + Creates a new that retrieves the key values of the specifed reference in structural form. + + A new DbRefKeyExpression that retrieves the key values of the specified reference. + The expression that provides the reference. This expression must have a reference Type with an Entity element type. + argument is null. + argument does not have a reference result type. + + + + Creates a new representing the navigation of a composition or association relationship. + + A new DbRelationshipNavigationExpression representing the navigation of the specified from and to relation ends of the specified relation type from the specified navigation source instance. + An expression that specifies the instance from which navigation should occur. + Metadata for the property that represents the end of the relationship from which navigation should occur. + Metadata for the property that represents the end of the relationship to which navigation should occur. + fromEnd, toEnd or navigateFrom is null. + fromEnd and toEnd are not declared by the same relationship type, or navigateFrom has a result type that is not compatible with the property type of fromEnd. + + + + Creates a new representing the navigation of a composition or association relationship. + + A new DbRelationshipNavigationExpression representing the navigation of the specified from and to relation ends of the specified relation type from the specified navigation source instance. + Metadata for the relation type that represents the relationship. + The name of the property of the relation type that represents the end of the relationship from which navigation should occur. + The name of the property of the relation type that represents the end of the relationship to which navigation should occur. + An expression the specifies the instance from which naviagtion should occur. + type, fromEndName, toEndName or navigateFrom is null. + type is not associated with this command tree's metadata workspace or navigateFrom is associated with a different command tree, or type does not declare a relation end property with name toEndName or fromEndName, or navigateFrom has a result type that is not compatible with the property type of the relation end property with name fromEndName. + + + + Creates a new that removes duplicates from the given set argument. + + A new DbDistinctExpression that represents the distinct operation applied to the specified set argument. + An expression that defines the set over which to perfom the distinct operation. + argument is null. + argument does not have a collection result type. + + + + Creates a new that converts a set into a singleton. + + A DbElementExpression that represents the conversion of the set argument to a singleton. + An expression that specifies the input set. + argument is null. + argument does not have a collection result type. + + + + Creates a new that determines whether the specified set argument is an empty set. + + A new DbIsEmptyExpression with the specified argument. + An expression that specifies the input set. + argument is null. + argument does not have a collection result type. + + + + Creates a new that computes the subtraction of the right set argument from the left set argument. + + A new DbExceptExpression that represents the difference of the left argument from the right argument. + An expression that defines the left set argument. + An expression that defines the right set argument. + left or right is null. + No common collection result type exists between left and right. + + + + Creates a new that computes the intersection of the left and right set arguments. + + A new DbIntersectExpression that represents the intersection of the left and right arguments. + An expression that defines the left set argument. + An expression that defines the right set argument. + left or right is null. + No common collection result type exists between left or right. + + + + Creates a new that computes the union of the left and right set arguments and does not remove duplicates. + + A new DbUnionAllExpression that union, including duplicates, of the the left and right arguments. + An expression that defines the left set argument. + An expression that defines the right set argument. + left or right is null. + No common collection result type with an equality-comparable element type exists between left and right. + + + + Creates a new that restricts the number of elements in the Argument collection to the specified count Limit value. Tied results are not included in the output. + + A new DbLimitExpression with the specified argument and count limit values that does not include tied results. + An expression that specifies the input collection. + An expression that specifies the limit value. + argument or count is null. + argument does not have a collection result type, or count does not have a result type that is equal or promotable to a 64-bit integer type. + + + + Creates a new . + + A new DbCaseExpression with the specified cases and default result. + A list of expressions that provide the conditional for of each case. + A list of expressions that provide the result of each case. + An expression that defines the result when no case is matched. + whenExpressions or thenExpressions is null or contains null, or elseExpression is null. + whenExpressions or thenExpressions is empty or whenExpressions contains an expression with a non-Boolean result type, or no common result type exists for all expressions in thenExpressions and elseExpression. + + + + Creates a new representing the invocation of the specified function with the given arguments. + + A new DbFunctionExpression representing the function invocation. + Metadata for the function to invoke. + A list of expressions that provide the arguments to the function. + function is null, or arguments is null or contains null. + The count of arguments does not equal the number of parameters declared by function, or arguments contains an expression that has a result type that is not equal or promotable to the corresponding function parameter type. + + + + Creates a new representing the invocation of the specified function with the given arguments. + + A new DbFunctionExpression representing the function invocation. + Metadata for the function to invoke. + Expressions that provide the arguments to the function. + function is null, or arguments is null or contains null. + The count of arguments does not equal the number of parameters declared by function, or arguments contains an expression that has a result type that is not equal or promotable to the corresponding function parameter type. + + + + Creates a new representing the application of the specified Lambda function to the given arguments. + + A new Expression representing the Lambda function application. + + A instance representing the Lambda function to apply. + + A list of expressions that provide the arguments. + lambda or arguments is null. + The count of arguments does not equal the number of variables declared by lambda, or arguments contains an expression that has a result type that is not equal or promotable to the corresponding variable type. + + + + Creates a new representing the application of the specified Lambda function to the given arguments. + + A new expression representing the Lambda function application. + + A instance representing the Lambda function to apply. + + Expressions that provide the arguments. + lambda or arguments is null. + The count of arguments does not equal the number of variables declared by lambda, or arguments contains an expression that has a result type that is not equal or promotable to the corresponding variable type. + + + + Creates a new . If the type argument is a collection type, the arguments specify the elements of the collection. Otherwise the arguments are used as property or column values in the new instance. + + A new DbNewInstanceExpression with the specified type and arguments. + The type of the new instance. + Expressions that specify values of the new instances, interpreted according to the instance's type. + instanceType or arguments is null, or arguments contains null. + arguments is empty or the result types of the contained expressions do not match the requirements of instanceType (as explained in the remarks section). + + + + Creates a new . If the type argument is a collection type, the arguments specify the elements of the collection. Otherwise the arguments are used as property or column values in the new instance. + + A new DbNewInstanceExpression with the specified type and arguments. + The type of the new instance. + Expressions that specify values of the new instances, interpreted according to the instance's type. + instanceType or arguments is null, or arguments contains null. + arguments is empty or the result types of the contained expressions do not match the requirements of instanceType (as explained in the remarks section). + + + + Creates a new that constructs a collection containing the specified elements. The type of the collection is based on the common type of the elements. If no common element type exists an exception is thrown. + + A new DbNewInstanceExpression with the specified collection type and arguments. + A list of expressions that provide the elements of the collection. + elements is null, or contains null. + elements is empty or contains expressions for which no common result type exists. + + + + Creates a new that constructs a collection containing the specified elements. The type of the collection is based on the common type of the elements. If no common element type exists an exception is thrown. + + A new DbNewInstanceExpression with the specified collection type and arguments. + A list of expressions that provide the elements of the collection. + elements is null, or contains null.. + elements is empty or contains expressions for which no common result type exists. + + + + Creates a new that constructs an empty collection of the specified collection type. + + A new DbNewInstanceExpression with the specified collection type and an empty Arguments list. + The type metadata for the collection to create + collectionType is null. + collectionType is not a collection type. + + + + Creates a new that produces a row with the specified named columns and the given values, specified as expressions. + + A new DbNewInstanceExpression that represents the construction of the row. + A list of string-DbExpression key-value pairs that defines the structure and values of the row. + columnValues is null or contains an element with a null column name or expression. + columnValues is empty, or contains a duplicate or invalid column name. + + + + Creates a new representing the retrieval of the specified property. + + A new DbPropertyExpression representing the property retrieval. + The instance from which to retrieve the property. May be null if the property is static. + Metadata for the property to retrieve. + propertyMetadata is null or instance is null and the property is not static. + + + + Creates a new representing the retrieval of the specified navigation property. + + A new DbPropertyExpression representing the navigation property retrieval. + The instance from which to retrieve the navigation property. + Metadata for the navigation property to retrieve. + navigationProperty or instance is null. + + + + Creates a new representing the retrieval of the specified relationship end member. + + A new DbPropertyExpression representing the relationship end member retrieval. + The instance from which to retrieve the relationship end member. + Metadata for the relationship end member to retrieve. + relationshipEnd is null or instance is null and the property is not static. + + + + Creates a new representing the retrieval of the instance property with the specified name from the given instance. + + A new DbPropertyExpression that represents the property retrieval. + The instance from which to retrieve the property. + The name of the property to retrieve. + propertyName is null or instance is null and the property is not static. + No property with the specified name is declared by the type of instance. + + + + Creates a new representing setting a property to a value. + + The property to be set. + The value to set the property to. + The newly created set clause. + + + + Creates a new that determines whether the given predicate holds for all elements of the input set. + + A new DbQuantifierExpression that represents the All operation. + An expression that specifies the input set. + A method representing a predicate to evaluate for each member of the input set. This method must produce an expression with a Boolean result type that provides the predicate logic. + source or predicate is null. + The expression produced by predicate is null. + source does not have a collection result type. + The expression produced by Predicate does not have a Boolean result type. + + + + Creates a new that determines whether the specified set argument is non-empty. + + + A new applied to a new + + with the specified argument. + + An expression that specifies the input set. + source is null. + source does not have a collection result type. + + + + Creates a new that determines whether the specified set argument is non-empty. + + + A new applied to a new + + with the specified argument. + + An expression that specifies the input set. + argument is null. + argument does not have a collection result type. + + + + Creates a new that determines whether the given predicate holds for any element of the input set. + + A new DbQuantifierExpression that represents the Any operation. + An expression that specifies the input set. + A method representing the predicate to evaluate for each member of the input set. This method must produce an expression with a Boolean result type that provides the predicate logic. + source or predicate is null. + The expression produced by predicate is null. + source does not have a collection result type. + The expression produced by predicate does not have a Boolean result type. + + + + Creates a new that evaluates the given apply expression once for each element of a given input set, producing a collection of rows with corresponding input and apply columns. Rows for which apply evaluates to an empty set are not included. + + + An new DbApplyExpression with the specified input and apply bindings and an + + of CrossApply. + + + A that specifies the input set. + + A method that specifies the logic to evaluate once for each member of the input set. + source or apply is null. + source does not have a collection result type. + The result of apply contains a name or expression that is null. + The result of apply contains a name or expression that is not valid in an expression binding. + + + + Creates a new that evaluates the given apply expression once for each element of a given input set, producing a collection of rows with corresponding input and apply columns. Rows for which apply evaluates to an empty set have an apply column value of null. + + + An new DbApplyExpression with the specified input and apply bindings and an + + of OuterApply. + + + A that specifies the input set. + + A method that specifies the logic to evaluate once for each member of the input set. + source or apply is null. + Source does not have a collection result type. + The result of apply contains a name or expression that is null. + The result of apply contains a name or expression that is not valid in an expression binding. + + + + Creates a new that joins the sets specified by the left and right expressions, on the specified join condition, using FullOuterJoin as the + + . + + + A new DbJoinExpression, with an of FullOuterJoin, that represents the full outer join operation applied to the left and right input sets under the given join condition. + + + A that specifies the left set argument. + + + A that specifies the right set argument. + + A method representing the condition on which to join. This method must produce an expression with a Boolean result type that provides the logic of the join condition. + left, right or joinCondition is null. + left or right does not have a collection result type. + The expression produced by joinCondition is null. + The expression produced by joinCondition does not have a Boolean result type. + + + + Creates a new that joins the sets specified by the left and right expressions, on the specified join condition, using InnerJoin as the + + . + + + A new DbJoinExpression, with an of InnerJoin, that represents the inner join operation applied to the left and right input sets under the given join condition. + + + A that specifies the left set argument. + + + A that specifies the right set argument. + + A method representing the condition on which to join. This method must produce an expression with a Boolean result type that provides the logic of the join condition. + left, right or joinCondition is null. + left or right does not have a collection result type. + The expression produced by joinCondition is null. + The expression produced by joinCondition does not have a Boolean result type. + + + + Creates a new that joins the sets specified by the left and right expressions, on the specified join condition, using LeftOuterJoin as the + + . + + + A new DbJoinExpression, with an of LeftOuterJoin, that represents the left outer join operation applied to the left and right input sets under the given join condition. + + + A that specifies the left set argument. + + + A that specifies the right set argument. + + A method representing the condition on which to join. This method must produce an expression with a Boolean result type that provides the logic of the join condition. + left, right or joinCondition is null. + left or right does not have a collection result type. + The expression produced by joinCondition is null. + The expression produced by joinCondition does not have a Boolean result type. + + + + Creates a new that joins the sets specified by the outer and inner expressions, on an equality condition between the specified outer and inner keys, using InnerJoin as the + + . + + + A new DbJoinExpression, with an of InnerJoin, that represents the inner join operation applied to the left and right input sets under a join condition that compares the outer and inner key values for equality. + + + A that specifies the outer set argument. + + + A that specifies the inner set argument. + + A method that specifies how the outer key value should be derived from an element of the outer set. + A method that specifies how the inner key value should be derived from an element of the inner set. + outer, inner, outerKey or innerKey is null. + outer or inner does not have a collection result type. + The expression produced by outerKey or innerKey is null. + The expressions produced by outerKey and innerKey are not comparable for equality. + + + + Creates a new that projects the specified selector over the sets specified by the outer and inner expressions, joined on an equality condition between the specified outer and inner keys, using InnerJoin as the + + . + + + A new DbProjectExpression with the specified selector as its projection, and a new DbJoinExpression as its input. The input DbJoinExpression is created with an + + of InnerJoin, that represents the inner join operation applied to the left and right input sets under a join condition that compares the outer and inner key values for equality. + + + A that specifies the outer set argument. + + + A that specifies the inner set argument. + + A method that specifies how the outer key value should be derived from an element of the outer set. + A method that specifies how the inner key value should be derived from an element of the inner set. + + A method that specifies how an element of the result set should be derived from elements of the inner and outer sets. This method must produce an instance of a type that is compatible with Join and can be resolved into a + + . Compatibility requirements for TSelector are described in remarks. + + The type of the selector . + outer, inner, outerKey, innerKey or selector is null. + outer or inner does not have a collection result type. + The expression produced by outerKey or innerKey is null. + The result of selector is null after conversion to DbExpression. + The expressions produced by outerKey and innerKey is not comparable for equality. + The result of Selector is not compatible with SelectMany. + + + + Creates a new that sorts the given input set by the specified sort key, with ascending sort order and default collation. + + A new DbSortExpression that represents the order-by operation. + An expression that specifies the input set. + A method that specifies how to derive the sort key expression given a member of the input set. This method must produce an expression with an order-comparable result type that provides the sort key definition. + source or sortKey is null. + The expression produced by sortKey is null. + source does not have a collection result type. + The expression produced by sortKey does not have an order-comparable result type. + + + + Creates a new that sorts the given input set by the specified sort key, with ascending sort order and the specified collation. + + A new DbSortExpression that represents the order-by operation. + An expression that specifies the input set. + A method that specifies how to derive the sort key expression given a member of the input set. This method must produce an expression with an order-comparable result type that provides the sort key definition. + The collation to sort under. + source, sortKey or collation is null. + The expression produced by sortKey is null. + source does not have a collection result type. + The expression produced by sortKey does not have an order-comparable string result type. + collation is empty or contains only space characters. + + + + Creates a new that sorts the given input set by the specified sort key, with descending sort order and default collation. + + A new DbSortExpression that represents the order-by operation. + An expression that specifies the input set. + A method that specifies how to derive the sort key expression given a member of the input set. This method must produce an expression with an order-comparable result type that provides the sort key definition. + source or sortKey is null. + The expression produced by sortKey is null. + source does not have a collection result type. + The expression produced by sortKey does not have an order-comparable result type. + + + + Creates a new that sorts the given input set by the specified sort key, with descending sort order and the specified collation. + + A new DbSortExpression that represents the order-by operation. + An expression that specifies the input set. + A method that specifies how to derive the sort key expression given a member of the input set. This method must produce an expression with an order-comparable result type that provides the sort key definition. + The collation to sort under. + source, sortKey or collation is null. + The expression produced by sortKey is null. + source does not have a collection result type. + The expression produced by sortKey does not have an order-comparable string result type. + collation is empty or contains only space characters. + + + + Creates a new that selects the specified expression over the given input set. + + A new DbProjectExpression that represents the select operation. + An expression that specifies the input set. + + A method that specifies how to derive the projected expression given a member of the input set. This method must produce an instance of a type that is compatible with Select and can be resolved into a + + . Compatibility requirements for TProjection are described in remarks. + + The method result type of projection. + source or projection is null. + The result of projection is null. + + + + Creates a new that evaluates the given apply expression once for each element of a given input set, producing a collection of rows with corresponding input and apply columns. Rows for which apply evaluates to an empty set are not included. A + + is then created that selects the apply column from each row, producing the overall collection of apply results. + + + An new DbProjectExpression that selects the apply column from a new DbApplyExpression with the specified input and apply bindings and an + + of CrossApply. + + + A that specifies the input set. + + A method that represents the logic to evaluate once for each member of the input set. + source or apply is null. + The expression produced by apply is null. + source does not have a collection result type. + The expression produced by apply does not have a collection type. + + + + Creates a new that evaluates the given apply expression once for each element of a given input set, producing a collection of rows with corresponding input and apply columns. Rows for which apply evaluates to an empty set are not included. A + + is then created that selects the specified selector over each row, producing the overall collection of results. + + + An new DbProjectExpression that selects the result of the given selector from a new DbApplyExpression with the specified input and apply bindings and an + + of CrossApply. + + + A that specifies the input set. + + A method that represents the logic to evaluate once for each member of the input set. + + A method that specifies how an element of the result set should be derived given an element of the input and apply sets. This method must produce an instance of a type that is compatible with SelectMany and can be resolved into a + + . Compatibility requirements for TSelector are described in remarks. + + The method result type of selector. + source, apply or selector is null. + The expression produced by apply is null. + The result of selector is null on conversion to DbExpression. + source does not have a collection result type. + The expression produced by apply does not have a collection type. does not have a collection type. + + + + Creates a new that skips the specified number of elements from the given sorted input set. + + A new DbSkipExpression that represents the skip operation. + + A that specifies the sorted input set. + + An expression the specifies how many elements of the ordered set to skip. + argument or count is null. + + count is not or + + or has a result type that is not equal or promotable to a 64-bit integer type. + + + + + Creates a new that restricts the number of elements in the Argument collection to the specified count Limit value. Tied results are not included in the output. + + A new DbLimitExpression with the specified argument and count limit values that does not include tied results. + An expression that specifies the input collection. + An expression that specifies the limit value. + argument or count is null. + argument does not have a collection result type, count does not have a result type that is equal or promotable to a 64-bit integer type. + + + + Creates a new that with a sort order that includes the sort order of the given order input set together with the specified sort key in ascending sort order and with default collation. + + A new DbSortExpression that represents the new overall order-by operation. + A DbSortExpression that specifies the ordered input set. + A method that specifies how to derive the additional sort key expression given a member of the input set. This method must produce an expression with an order-comparable result type that provides the sort key definition. + source or sortKey is null. + The expression produced by sortKey is null. + source does not have a collection result type. + sortKey does not have an order-comparable result type. + + + + Creates a new that with a sort order that includes the sort order of the given order input set together with the specified sort key in ascending sort order and with the specified collation. + + A new DbSortExpression that represents the new overall order-by operation. + A DbSortExpression that specifies the ordered input set. + A method that specifies how to derive the additional sort key expression given a member of the input set. This method must produce an expression with an order-comparable result type that provides the sort key definition. + The collation to sort under. + source, sortKey or collation is null. + The expression produced by sortKey is null. + source does not have a collection result type. + The expression produced by sortKey does not have an order-comparable string result type. + collation is empty or contains only space characters. + + + + Creates a new that with a sort order that includes the sort order of the given order input set together with the specified sort key in descending sort order and with default collation. + + A new DbSortExpression that represents the new overall order-by operation. + A DbSortExpression that specifies the ordered input set. + A method that specifies how to derive the additional sort key expression given a member of the input set. This method must produce an expression with an order-comparable result type that provides the sort key definition. + source or sortKey is null. + The expression produced by sortKey is null. + source does not have a collection result type. + The expression produced by sortKey does not have an order-comparable result type. + + + + Creates a new that with a sort order that includes the sort order of the given order input set together with the specified sort key in descending sort order and with the specified collation. + + A new DbSortExpression that represents the new overall order-by operation. + A DbSortExpression that specifies the ordered input set. + A method that specifies how to derive the additional sort key expression given a member of the input set. This method must produce an expression with an order-comparable result type that provides the sort key definition. + The collation to sort under. + source, sortKey or collation is null. + The expression produced by sortKey is null. + source does not have a collection result type. + The expression produced by sortKey does not have an order-comparable string result type. + collation is empty or contains only space characters. + + + + Creates a new that filters the elements in the given input set using the specified predicate. + + A new DbQuantifierExpression that represents the Any operation. + An expression that specifies the input set. + A method representing the predicate to evaluate for each member of the input set. This method must produce an expression with a Boolean result type that provides the predicate logic. + source or predicate is null. + The expression produced by predicate is null. + The expression produced by predicate does not have a Boolean result type. + + + + Creates a new that computes the union of the left and right set arguments with duplicates removed. + + A new DbExpression that computes the union, without duplicates, of the the left and right arguments. + An expression that defines the left set argument. + An expression that defines the right set argument. + left or right is null. + No common collection result type with an equality-comparable element type exists between left and right. + + + + Gets a with the Boolean value true. + + + A with the Boolean value true. + + + + + Gets a with the Boolean value false. + + + A with the Boolean value false. + + + + + Provides an API to construct s that invoke canonical EDM functions, and allows that API to be accessed as extension methods on the expression type itself. + + + + + Creates a that invokes the canonical 'Avg' function over the specified collection. The result type of the expression is the same as the element type of the collection. + + A new DbFunctionExpression that produces the average value. + An expression that specifies the collection from which the average value should be computed. + + + + Creates a that invokes the canonical 'Count' function over the specified collection. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that produces the count value. + An expression that specifies the collection over which the count value should be computed. + + + + Creates a that invokes the canonical 'BigCount' function over the specified collection. The result type of the expression is Edm.Int64. + + A new DbFunctionExpression that produces the count value. + An expression that specifies the collection over which the count value should be computed. + + + + Creates a that invokes the canonical 'Max' function over the specified collection. The result type of the expression is the same as the element type of the collection. + + A new DbFunctionExpression that produces the maximum value. + An expression that specifies the collection from which the maximum value should be retrieved + + + + Creates a that invokes the canonical 'Min' function over the specified collection. The result type of the expression is the same as the element type of the collection. + + A new DbFunctionExpression that produces the minimum value. + An expression that specifies the collection from which the minimum value should be retrieved. + + + + Creates a that invokes the canonical 'Sum' function over the specified collection. The result type of the expression is the same as the element type of the collection. + + A new DbFunctionExpression that produces the sum. + An expression that specifies the collection from which the sum should be computed. + + + + Creates a that invokes the canonical 'StDev' function over the non-null members of the specified collection. The result type of the expression is Edm.Double. + + A new DbFunctionExpression that produces the standard deviation value over non-null members of the collection. + An expression that specifies the collection for which the standard deviation should be computed. + + + + Creates a that invokes the canonical 'StDevP' function over the population of the specified collection. The result type of the expression is Edm.Double. + + A new DbFunctionExpression that produces the standard deviation value. + An expression that specifies the collection for which the standard deviation should be computed. + + + + Creates a that invokes the canonical 'Var' function over the non-null members of the specified collection. The result type of the expression is Edm.Double. + + A new DbFunctionExpression that produces the statistical variance value for the non-null members of the collection. + An expression that specifies the collection for which the statistical variance should be computed. + + + + Creates a that invokes the canonical 'VarP' function over the population of the specified collection. The result type of the expression Edm.Double. + + A new DbFunctionExpression that produces the statistical variance value. + An expression that specifies the collection for which the statistical variance should be computed. + + + + Creates a that invokes the canonical 'Concat' function with the specified arguments, which must each have a string result type. The result type of the expression is string. + + A new DbFunctionExpression that produces the concatenated string. + An expression that specifies the string that should appear first in the concatenated result string. + An expression that specifies the string that should appear second in the concatenated result string. + + + + Creates a that invokes the canonical 'Contains' function with the specified arguments, which must each have a string result type. The result type of the expression is Boolean. + + A new DbFunctionExpression that returns a Boolean value indicating whether or not searchedForString occurs within searchedString. + An expression that specifies the string to search for any occurence of searchedForString. + An expression that specifies the string to search for in searchedString. + + + + Creates a that invokes the canonical 'EndsWith' function with the specified arguments, which must each have a string result type. The result type of the expression is Boolean. + + A new DbFunctionExpression that returns a Boolean value indicating whether or not stringArgument ends with suffix. + An expression that specifies the string that is searched at the end for string suffix. + An expression that specifies the target string that is searched for at the end of stringArgument. + + + + Creates a that invokes the canonical 'IndexOf' function with the specified arguments, which must each have a string result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns the first index of stringToFind in searchString. + An expression that specifies the string to search for stringToFind. + An expression that specifies the string to locate within searchString should be checked. + + + + Creates a that invokes the canonical 'Left' function with the specified arguments, which must have a string and integer numeric result type. The result type of the expression is string. + + A new DbFunctionExpression that returns the the leftmost substring of length length from stringArgument. + An expression that specifies the string from which to extract the leftmost substring. + An expression that specifies the length of the leftmost substring to extract from stringArgument. + + + + Creates a that invokes the canonical 'Length' function with the specified argument, which must have a string result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns the length of stringArgument. + An expression that specifies the string for which the length should be computed. + + + + Creates a that invokes the canonical 'Replace' function with the specified arguments, which must each have a string result type. The result type of the expression is also string. + + A new DbFunctionExpression than returns a new string based on stringArgument where every occurence of toReplace is replaced by replacement. + An expression that specifies the string in which to perform the replacement operation. + An expression that specifies the string that is replaced. + An expression that specifies the replacement string. + + + + Creates a that invokes the canonical 'Reverse' function with the specified argument, which must have a string result type. The result type of the expression is also string. + + A new DbFunctionExpression that produces the reversed value of stringArgument. + An expression that specifies the string to reverse. + + + + Creates a that invokes the canonical 'Right' function with the specified arguments, which must have a string and integer numeric result type. The result type of the expression is string. + + A new DbFunctionExpression that returns the the rightmost substring of length length from stringArgument. + An expression that specifies the string from which to extract the rightmost substring. + An expression that specifies the length of the rightmost substring to extract from stringArgument. + + + + Creates a that invokes the canonical 'StartsWith' function with the specified arguments, which must each have a string result type. The result type of the expression is Boolean. + + A new DbFunctionExpression that returns a Boolean value indicating whether or not stringArgument starts with prefix. + An expression that specifies the string that is searched at the start for string prefix. + An expression that specifies the target string that is searched for at the start of stringArgument. + + + + Creates a that invokes the canonical 'Substring' function with the specified arguments, which must have a string and integer numeric result types. The result type of the expression is string. + + A new DbFunctionExpression that returns the substring of length length from stringArgument starting at start. + An expression that specifies the string from which to extract the substring. + An expression that specifies the starting index from which the substring should be taken. + An expression that specifies the length of the substring. + + + + Creates a that invokes the canonical 'ToLower' function with the specified argument, which must have a string result type. The result type of the expression is also string. + + A new DbFunctionExpression that returns value of stringArgument converted to lower case. + An expression that specifies the string that should be converted to lower case. + + + + Creates a that invokes the canonical 'ToUpper' function with the specified argument, which must have a string result type. The result type of the expression is also string. + + A new DbFunctionExpression that returns value of stringArgument converted to upper case. + An expression that specifies the string that should be converted to upper case. + + + + Creates a that invokes the canonical 'Trim' function with the specified argument, which must have a string result type. The result type of the expression is also string. + + A new DbFunctionExpression that returns value of stringArgument with leading and trailing space removed. + An expression that specifies the string from which leading and trailing space should be removed. + + + + Creates a that invokes the canonical 'RTrim' function with the specified argument, which must have a string result type. The result type of the expression is also string. + + A new DbFunctionExpression that returns value of stringArgument with trailing space removed. + An expression that specifies the string from which trailing space should be removed. + + + + Creates a that invokes the canonical 'LTrim' function with the specified argument, which must have a string result type. The result type of the expression is also string. + + A new DbFunctionExpression that returns value of stringArgument with leading space removed. + An expression that specifies the string from which leading space should be removed. + + + + Creates a that invokes the canonical 'Year' function with the specified argument, which must have a DateTime or DateTimeOffset result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns the integer year value from dateValue. + An expression that specifies the value from which the year should be retrieved. + + + + Creates a that invokes the canonical 'Month' function with the specified argument, which must have a DateTime or DateTimeOffset result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns the integer month value from dateValue. + An expression that specifies the value from which the month should be retrieved. + + + + Creates a that invokes the canonical 'Day' function with the specified argument, which must have a DateTime or DateTimeOffset result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns the integer day value from dateValue. + An expression that specifies the value from which the day should be retrieved. + + + + Creates a that invokes the canonical 'DayOfYear' function with the specified argument, which must have a DateTime or DateTimeOffset result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns the integer day of year value from dateValue. + An expression that specifies the value from which the day within the year should be retrieved. + + + + Creates a that invokes the canonical 'Hour' function with the specified argument, which must have a DateTime, DateTimeOffset or Time result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns the integer hour value from timeValue. + An expression that specifies the value from which the hour should be retrieved. + + + + Creates a that invokes the canonical 'Minute' function with the specified argument, which must have a DateTime, DateTimeOffset or Time result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns the integer minute value from timeValue. + An expression that specifies the value from which the minute should be retrieved. + + + + Creates a that invokes the canonical 'Second' function with the specified argument, which must have a DateTime, DateTimeOffset or Time result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns the integer second value from timeValue. + An expression that specifies the value from which the second should be retrieved. + + + + Creates a that invokes the canonical 'Millisecond' function with the specified argument, which must have a DateTime, DateTimeOffset or Time result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns the integer millisecond value from timeValue. + An expression that specifies the value from which the millisecond should be retrieved. + + + + Creates a that invokes the canonical 'GetTotalOffsetMinutes' function with the specified argument, which must have a DateTimeOffset result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns the number of minutes dateTimeOffsetArgument is offset from GMT. + An expression that specifies the DateTimeOffset value from which the minute offset from GMT should be retrieved. + + + + Creates a that invokes the canonical 'CurrentDateTime' function. + + A new DbFunctionExpression that returns the current date and time as an Edm.DateTime instance. + + + + Creates a that invokes the canonical 'CurrentDateTimeOffset' function. + + A new DbFunctionExpression that returns the current date and time as an Edm.DateTimeOffset instance. + + + + Creates a that invokes the canonical 'CurrentUtcDateTime' function. + + A new DbFunctionExpression that returns the current UTC date and time as an Edm.DateTime instance. + + + + Creates a that invokes the canonical 'TruncateTime' function with the specified argument, which must have a DateTime or DateTimeOffset result type. The result type of the expression is the same as the result type of dateValue. + + A new DbFunctionExpression that returns the value of dateValue with time set to zero. + An expression that specifies the value for which the time portion should be truncated. + + + + Creates a that invokes the canonical 'CreateDateTime' function with the specified arguments. second must have a result type of Edm.Double, while all other arguments must have a result type of Edm.Int32. The result type of the expression is Edm.DateTime. + + A new DbFunctionExpression that returns a new DateTime based on the specified values. + An expression that provides the year value for the new DateTime instance. + An expression that provides the month value for the new DateTime instance. + An expression that provides the day value for the new DateTime instance. + An expression that provides the hour value for the new DateTime instance. + An expression that provides the minute value for the new DateTime instance. + An expression that provides the second value for the new DateTime instance. + + + + Creates a that invokes the canonical 'CreateDateTimeOffset' function with the specified arguments. second must have a result type of Edm.Double, while all other arguments must have a result type of Edm.Int32. The result type of the expression is Edm.DateTimeOffset. + + A new DbFunctionExpression that returns a new DateTimeOffset based on the specified values. + An expression that provides the year value for the new DateTimeOffset instance. + An expression that provides the month value for the new DateTimeOffset instance. + An expression that provides the day value for the new DateTimeOffset instance. + An expression that provides the hour value for the new DateTimeOffset instance. + An expression that provides the minute value for the new DateTimeOffset instance. + An expression that provides the second value for the new DateTimeOffset instance. + An expression that provides the number of minutes in the time zone offset value for the new DateTimeOffset instance. + + + + Creates a that invokes the canonical 'CreateTime' function with the specified arguments. second must have a result type of Edm.Double, while all other arguments must have a result type of Edm.Int32. The result type of the expression is Edm.Time. + + A new DbFunctionExpression that returns a new Time based on the specified values. + An expression that provides the hour value for the new DateTime instance. + An expression that provides the minute value for the new DateTime instance. + An expression that provides the second value for the new DateTime instance. + + + + Creates a that invokes the canonical 'AddYears' function with the specified arguments, which must have DateTime or DateTimeOffset and integer result types. The result type of the expression is the same as the result type of dateValue. + + A new DbFunctionExpression that adds the number of years specified by addValue to the value specified by dateValue. + An expression that specifies the value to which addValueshould be added. + An expression that specifies the number of years to add to dateValue. + + + + Creates a that invokes the canonical 'AddMonths' function with the specified arguments, which must have DateTime or DateTimeOffset and integer result types. The result type of the expression is the same as the result type of dateValue. + + A new DbFunctionExpression that adds the number of months specified by addValue to the value specified by dateValue. + An expression that specifies the value to which addValueshould be added. + An expression that specifies the number of months to add to dateValue. + + + + Creates a that invokes the canonical 'AddDays' function with the specified arguments, which must have DateTime or DateTimeOffset and integer result types. The result type of the expression is the same as the result type of dateValue. + + A new DbFunctionExpression that adds the number of days specified by addValue to the value specified by dateValue. + An expression that specifies the value to which addValueshould be added. + An expression that specifies the number of days to add to dateValue. + + + + Creates a that invokes the canonical 'AddHours' function with the specified arguments, which must have DateTime, DateTimeOffset or Time, and integer result types. The result type of the expression is the same as the result type of timeValue. + + A new DbFunctionExpression that adds the number of hours specified by addValue to the value specified by timeValue. + An expression that specifies the value to which addValueshould be added. + An expression that specifies the number of hours to add to timeValue. + + + + Creates a that invokes the canonical 'AddMinutes' function with the specified arguments, which must have DateTime, DateTimeOffset or Time, and integer result types. The result type of the expression is the same as the result type of timeValue. + + A new DbFunctionExpression that adds the number of minutes specified by addValue to the value specified by timeValue. + An expression that specifies the value to which addValueshould be added. + An expression that specifies the number of minutes to add to timeValue. + + + + Creates a that invokes the canonical 'AddSeconds' function with the specified arguments, which must have DateTime, DateTimeOffset or Time, and integer result types. The result type of the expression is the same as the result type of timeValue. + + A new DbFunctionExpression that adds the number of seconds specified by addValue to the value specified by timeValue. + An expression that specifies the value to which addValueshould be added. + An expression that specifies the number of seconds to add to timeValue. + + + + Creates a that invokes the canonical 'AddMilliseconds' function with the specified arguments, which must have DateTime, DateTimeOffset or Time, and integer result types. The result type of the expression is the same as the result type of timeValue. + + A new DbFunctionExpression that adds the number of milliseconds specified by addValue to the value specified by timeValue. + An expression that specifies the value to which addValueshould be added. + An expression that specifies the number of milliseconds to add to timeValue. + + + + Creates a that invokes the canonical 'AddMicroseconds' function with the specified arguments, which must have DateTime, DateTimeOffset or Time, and integer result types. The result type of the expression is the same as the result type of timeValue. + + A new DbFunctionExpression that adds the number of microseconds specified by addValue to the value specified by timeValue. + An expression that specifies the value to which addValueshould be added. + An expression that specifies the number of microseconds to add to timeValue. + + + + Creates a that invokes the canonical 'AddNanoseconds' function with the specified arguments, which must have DateTime, DateTimeOffset or Time, and integer result types. The result type of the expression is the same as the result type of timeValue. + + A new DbFunctionExpression that adds the number of nanoseconds specified by addValue to the value specified by timeValue. + An expression that specifies the value to which addValueshould be added. + An expression that specifies the number of nanoseconds to add to timeValue. + + + + Creates a that invokes the canonical 'DiffYears' function with the specified arguments, which must each have DateTime or DateTimeOffset result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns the number of years that is the difference between dateValue1 and dateValue2. + An expression that specifies the first date value argument. + An expression that specifies the second date value argument. + + + + Creates a that invokes the canonical 'DiffMonths' function with the specified arguments, which must each have DateTime or DateTimeOffset result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns the number of months that is the difference between dateValue1 and dateValue2. + An expression that specifies the first date value argument. + An expression that specifies the second date value argument. + + + + Creates a that invokes the canonical 'DiffDays' function with the specified arguments, which must each have DateTime or DateTimeOffset result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns the number of days that is the difference between dateValue1 and dateValue2. + An expression that specifies the first date value argument. + An expression that specifies the second date value argument. + + + + Creates a that invokes the canonical 'DiffHours' function with the specified arguments, which must each have DateTime, DateTimeOffset or Time result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns the number of hours that is the difference between timeValue1 and timeValue2. + An expression that specifies the first time value argument. + An expression that specifies the second time value argument. + + + + Creates a that invokes the canonical 'DiffMinutes' function with the specified arguments, which must each have DateTime, DateTimeOffset or Time result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns the number of minutes that is the difference between timeValue1 and timeValue2. + An expression that specifies the first time value argument. + An expression that specifies the second time value argument. + + + + Creates a that invokes the canonical 'DiffSeconds' function with the specified arguments, which must each have DateTime, DateTimeOffset or Time result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns the number of seconds that is the difference between timeValue1 and timeValue2. + An expression that specifies the first time value argument. + An expression that specifies the second time value argument. + + + + Creates a that invokes the canonical 'DiffMilliseconds' function with the specified arguments, which must each have DateTime, DateTimeOffset or Time result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns the number of milliseconds that is the difference between timeValue1 and timeValue2. + An expression that specifies the first time value argument. + An expression that specifies the second time value argument. + + + + Creates a that invokes the canonical 'DiffMicroseconds' function with the specified arguments, which must each have DateTime, DateTimeOffset or Time result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns the number of microseconds that is the difference between timeValue1 and timeValue2. + An expression that specifies the first time value argument. + An expression that specifies the second time value argument. + + + + Creates a that invokes the canonical 'DiffNanoseconds' function with the specified arguments, which must each have DateTime, DateTimeOffset or Time result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns the number of nanoseconds that is the difference between timeValue1 and timeValue2. + An expression that specifies the first time value argument. + An expression that specifies the second time value argument. + + + + Creates a that invokes the canonical 'Round' function with the specified argument, which must each have a single, double or decimal result type. The result type of the expression is the same as the result type of value. + + A new DbFunctionExpression that rounds the specified argument to the nearest integer value. + An expression that specifies the numeric value to round. + + + + Creates a that invokes the canonical 'Round' function with the specified arguments, which must have a single, double or decimal, and integer result types. The result type of the expression is the same as the result type of value. + + A new DbFunctionExpression that rounds the specified argument to the nearest integer value, with precision as specified by digits. + An expression that specifies the numeric value to round. + An expression that specifies the number of digits of precision to use when rounding. + + + + Creates a that invokes the canonical 'Floor' function with the specified argument, which must each have a single, double or decimal result type. The result type of the expression is the same as the result type of value. + + A new DbFunctionExpression that returns the largest integer value not greater than value. + An expression that specifies the numeric value. + + + + Creates a that invokes the canonical 'Ceiling' function with the specified argument, which must each have a single, double or decimal result type. The result type of the expression is the same as the result type of value. + + A new DbFunctionExpression that returns the smallest integer value not less than than value. + An expression that specifies the numeric value. + + + + Creates a that invokes the canonical 'Abs' function with the specified argument, which must each have a numeric result type. The result type of the expression is the same as the result type of value. + + A new DbFunctionExpression that returns the absolute value of value. + An expression that specifies the numeric value. + + + + Creates a that invokes the canonical 'Truncate' function with the specified arguments, which must have a single, double or decimal, and integer result types. The result type of the expression is the same as the result type of value. + + A new DbFunctionExpression that truncates the specified argument to the nearest integer value, with precision as specified by digits. + An expression that specifies the numeric value to truncate. + An expression that specifies the number of digits of precision to use when truncating. + + + + Creates a that invokes the canonical 'Power' function with the specified arguments, which must have numeric result types. The result type of the expression is the same as the result type of baseArgument. + + A new DbFunctionExpression that returns the value of baseArgument raised to the power specified by exponent. + An expression that specifies the numeric value to raise to the given power. + An expression that specifies the power to which baseArgument should be raised. + + + + Creates a that invokes the canonical 'BitwiseAnd' function with the specified arguments, which must have the same integer numeric result type. The result type of the expression is the same as the type of the arguments. + + A new DbFunctionExpression that returns the value produced by performing the bitwise AND of value1 and value2. + An expression that specifies the first operand. + An expression that specifies the second operand. + + + + Creates a that invokes the canonical 'BitwiseOr' function with the specified arguments, which must have the same integer numeric result type. The result type of the expression is the same as the type of the arguments. + + A new DbFunctionExpression that returns the value produced by performing the bitwise OR of value1 and value2. + An expression that specifies the first operand. + An expression that specifies the second operand. + + + + Creates a that invokes the canonical 'BitwiseNot' function with the specified argument, which must have an integer numeric result type. The result type of the expression is the same as the type of the arguments. + + A new DbFunctionExpression that returns the value produced by performing the bitwise NOT of value. + An expression that specifies the first operand. + + + + Creates a that invokes the canonical 'BitwiseXor' function with the specified arguments, which must have the same integer numeric result type. The result type of the expression is the same as the type of the arguments. + + A new DbFunctionExpression that returns the value produced by performing the bitwise XOR (exclusive OR) of value1 and value2. + An expression that specifies the first operand. + An expression that specifies the second operand. + + + + Creates a that invokes the canonical 'NewGuid' function. + + A new DbFunctionExpression that returns a new GUID value. + + + + Provides a constructor-like means of calling + + . + + + + + Initializes a new instance of the class with the specified first column value and optional successive column values. + + A key-value pair that provides the first column in the new row instance. (required) + A key-value pairs that provide any subsequent columns in the new row instance. (optional) + + + + Creates a new that constructs a new row based on the columns contained in this Row instance. + + A new DbNewInstanceExpression that constructs a row with the same column names and DbExpression values as this Row instance. + + + + Converts the given Row instance into an instance of + + The Row instance. + A DbExpression based on the Row instance + + + is null. + + + + + + Provides an API to construct s that invoke spatial realted canonical EDM functions, and, where appropriate, allows that API to be accessed as extension methods on the expression type itself. + + + + + Creates a that invokes the canonical 'GeometryFromText' function with the specified argument, which must have a string result type. The result type of the expression is Edm.Geometry. Its value has the default coordinate system id (SRID) of the underlying provider. + + A new DbFunctionExpression that returns a new geometry value based on the specified value. + An expression that provides the well known text representation of the geometry value. + + + + Creates a that invokes the canonical 'GeometryFromText' function with the specified arguments. wellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns a new geometry value based on the specified values. + An expression that provides the well known text representation of the geometry value. + An expression that provides the coordinate system id (SRID) of the geometry value's coordinate system. + + + + Creates a that invokes the canonical 'GeometryPointFromText' function with the specified arguments. pointWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns a new geometry point value based on the specified values. + An expression that provides the well known text representation of the geometry point value. + An expression that provides the coordinate system id (SRID) of the geometry point value's coordinate system. + + + + Creates a that invokes the canonical 'GeometryLineFromText' function with the specified arguments. lineWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns a new geometry line value based on the specified values. + An expression that provides the well known text representation of the geometry line value. + An expression that provides the coordinate system id (SRID) of the geometry line value's coordinate system. + + + + Creates a that invokes the canonical 'GeometryPolygonFromText' function with the specified arguments. polygonWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns a new geometry polygon value based on the specified values. + An expression that provides the well known text representation of the geometry polygon value. + An expression that provides the coordinate system id (SRID) of the geometry polygon value's coordinate system. + + + + Creates a that invokes the canonical 'GeometryMultiPointFromText' function with the specified arguments. multiPointWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns a new geometry multi-point value based on the specified values. + An expression that provides the well known text representation of the geometry multi-point value. + An expression that provides the coordinate system id (SRID) of the geometry multi-point value's coordinate system. + + + + Creates a that invokes the canonical 'GeometryMultiLineFromText' function with the specified arguments. multiLineWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns a new geometry multi-line value based on the specified values. + An expression that provides the well known text representation of the geometry multi-line value. + An expression that provides the coordinate system id (SRID) of the geometry multi-line value's coordinate system. + + + + Creates a that invokes the canonical 'GeometryMultiPolygonFromText' function with the specified arguments. multiPolygonWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns a new geometry multi-polygon value based on the specified values. + An expression that provides the well known text representation of the geometry multi-polygon value. + An expression that provides the coordinate system id (SRID) of the geometry multi-polygon value's coordinate system. + + + + Creates a that invokes the canonical 'GeometryCollectionFromText' function with the specified arguments. geometryCollectionWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns a new geometry collection value based on the specified values. + An expression that provides the well known text representation of the geometry collection value. + An expression that provides the coordinate system id (SRID) of the geometry collection value's coordinate system. + + + + Creates a that invokes the canonical 'GeometryFromBinary' function with the specified argument, which must have a binary result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns a new geometry value based on the specified binary value. + An expression that provides the well known binary representation of the geometry value. + + + + Creates a that invokes the canonical 'GeometryFromBinary' function with the specified arguments. wellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns a new geometry value based on the specified values. + An expression that provides the well known binary representation of the geometry value. + An expression that provides the coordinate system id (SRID) of the geometry value's coordinate system. + + + + Creates a that invokes the canonical 'GeometryPointFromBinary' function with the specified arguments. pointWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns a new geometry point value based on the specified values. + An expression that provides the well known binary representation of the geometry point value. + An expression that provides the coordinate system id (SRID) of the geometry point value's coordinate system. + + + + Creates a that invokes the canonical 'GeometryLineFromBinary' function with the specified arguments. lineWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns a new geometry line value based on the specified values. + An expression that provides the well known binary representation of the geometry line value. + An expression that provides the coordinate system id (SRID) of the geometry line value's coordinate system. + + + + Creates a that invokes the canonical 'GeometryPolygonFromBinary' function with the specified arguments. polygonWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns a new geometry polygon value based on the specified values. + An expression that provides the well known binary representation of the geometry polygon value. + An expression that provides the coordinate system id (SRID) of the geometry polygon value's coordinate system. + + + + Creates a that invokes the canonical 'GeometryMultiPointFromBinary' function with the specified arguments. multiPointWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns a new geometry multi-point value based on the specified values. + An expression that provides the well known binary representation of the geometry multi-point value. + An expression that provides the coordinate system id (SRID) of the geometry multi-point value's coordinate system. + + + + Creates a that invokes the canonical 'GeometryMultiLineFromBinary' function with the specified arguments. multiLineWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns a new geometry multi-line value based on the specified values. + An expression that provides the well known binary representation of the geometry multi-line value. + An expression that provides the coordinate system id (SRID) of the geometry multi-line value's coordinate system. + + + + Creates a that invokes the canonical 'GeometryMultiPolygonFromBinary' function with the specified arguments. multiPolygonWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns a new geometry multi-polygon value based on the specified values. + An expression that provides the well known binary representation of the geometry multi-polygon value. + An expression that provides the coordinate system id (SRID) of the geometry multi-polygon value's coordinate system. + + + + Creates a that invokes the canonical 'GeometryCollectionFromBinary' function with the specified arguments. geometryCollectionWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns a new geometry collection value based on the specified values. + An expression that provides the well known binary representation of the geometry collection value. + An expression that provides the coordinate system id (SRID) of the geometry collection value's coordinate system. + + + + Creates a that invokes the canonical 'GeometryFromGml' function with the specified argument, which must have a string result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns a new geometry value based on the specified value with the default coordinate system id (SRID) of the underlying provider. + An expression that provides the Geography Markup Language (GML) representation of the geometry value. + + + + Creates a that invokes the canonical 'GeometryFromGml' function with the specified arguments. geometryMarkup must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns a new geometry value based on the specified values. + An expression that provides the Geography Markup Language (GML) representation of the geometry value. + An expression that provides the coordinate system id (SRID) of the geometry value's coordinate system. + + + + Creates a that invokes the canonical 'GeographyFromText' function with the specified argument, which must have a string result type. The result type of the expression is Edm.Geography. Its value has the default coordinate system id (SRID) of the underlying provider. + + A new DbFunctionExpression that returns a new geography value based on the specified value. + An expression that provides the well known text representation of the geography value. + + + + Creates a that invokes the canonical 'GeographyFromText' function with the specified arguments. wellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. + + A new DbFunctionExpression that returns a new geography value based on the specified values. + An expression that provides the well known text representation of the geography value. + An expression that provides the coordinate system id (SRID) of the geography value's coordinate system. + + + + Creates a that invokes the canonical 'GeographyPointFromText' function with the specified arguments. + + The canonical 'GeographyPointFromText' function. + An expression that provides the well-known text representation of the geography point value. + An expression that provides the coordinate system id (SRID) of the geography point value's coordinate systempointWellKnownTextValue. + + + + Creates a that invokes the canonical 'GeographyLineFromText' function with the specified arguments. lineWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. + + A new DbFunctionExpression that returns a new geography line value based on the specified values. + An expression that provides the well known text representation of the geography line value. + An expression that provides the coordinate system id (SRID) of the geography line value's coordinate system. + + + + Creates a that invokes the canonical 'GeographyPolygonFromText' function with the specified arguments. polygonWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. + + A new DbFunctionExpression that returns a new geography polygon value based on the specified values. + An expression that provides the well known text representation of the geography polygon value. + An expression that provides the coordinate system id (SRID) of the geography polygon value's coordinate system. + + + + Creates a that invokes the canonical 'GeographyMultiPointFromText' function with the specified arguments. multiPointWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. + + A new DbFunctionExpression that returns a new geography multi-point value based on the specified values. + An expression that provides the well known text representation of the geography multi-point value. + An expression that provides the coordinate system id (SRID) of the geography multi-point value's coordinate system. + + + + Creates a that invokes the canonical 'GeographyMultiLineFromText' function with the specified arguments. multiLineWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. + + A new DbFunctionExpression that returns a new geography multi-line value based on the specified values. + An expression that provides the well known text representation of the geography multi-line value. + An expression that provides the coordinate system id (SRID) of the geography multi-line value's coordinate system. + + + + Creates a that invokes the canonical 'GeographyMultiPolygonFromText' function with the specified arguments. multiPolygonWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. + + A new DbFunctionExpression that returns a new geography multi-polygon value based on the specified values. + An expression that provides the well known text representation of the geography multi-polygon value. + An expression that provides the coordinate system id (SRID) of the geography multi-polygon value's coordinate system. + + + + Creates a that invokes the canonical 'GeographyCollectionFromText' function with the specified arguments. geographyCollectionWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. + + A new DbFunctionExpression that returns a new geography collection value based on the specified values. + An expression that provides the well known text representation of the geography collection value. + An expression that provides the coordinate system id (SRID) of the geography collection value's coordinate system. + + + + Creates a that invokes the canonical 'GeographyFromBinary' function with the specified argument, which must have a binary result type. The result type of the expression is Edm.Geography. + + A new DbFunctionExpression that returns a new geography value based on the specified binary value. + An expression that provides the well known binary representation of the geography value. + + + + Creates a that invokes the canonical 'GeographyFromBinary' function with the specified arguments. wellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. + + A new DbFunctionExpression that returns a new geography value based on the specified values. + An expression that provides the well known binary representation of the geography value. + An expression that provides the coordinate system id (SRID) of the geography value's coordinate system. + + + + Creates a that invokes the canonical 'GeographyPointFromBinary' function with the specified arguments. pointWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. + + A new DbFunctionExpression that returns a new geography point value based on the specified values. + An expression that provides the well known binary representation of the geography point value. + An expression that provides the coordinate system id (SRID) of the geography point value's coordinate systempointWellKnownBinaryValue. + + + + Creates a that invokes the canonical 'GeographyLineFromBinary' function with the specified arguments. lineWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. + + A new DbFunctionExpression that returns a new geography line value based on the specified values. + An expression that provides the well known binary representation of the geography line value. + An expression that provides the coordinate system id (SRID) of the geography line value's coordinate system. + + + + Creates a that invokes the canonical 'GeographyPolygonFromBinary' function with the specified arguments. polygonWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. + + A new DbFunctionExpression that returns a new geography polygon value based on the specified values. + An expression that provides the well known binary representation of the geography polygon value. + An expression that provides the coordinate system id (SRID) of the geography polygon value's coordinate system. + + + + Creates a that invokes the canonical 'GeographyMultiPointFromBinary' function with the specified arguments. multiPointWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. + + A new DbFunctionExpression that returns a new geography multi-point value based on the specified values. + An expression that provides the well known binary representation of the geography multi-point value. + An expression that provides the coordinate system id (SRID) of the geography multi-point value's coordinate system. + + + + Creates a that invokes the canonical 'GeographyMultiLineFromBinary' function with the specified arguments. multiLineWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. + + A new DbFunctionExpression that returns a new geography multi-line value based on the specified values. + An expression that provides the well known binary representation of the geography multi-line value. + An expression that provides the coordinate system id (SRID) of the geography multi-line value's coordinate system. + + + + Creates a that invokes the canonical 'GeographyMultiPolygonFromBinary' function with the specified arguments. multiPolygonWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. + + A new DbFunctionExpression that returns a new geography multi-polygon value based on the specified values. + An expression that provides the well known binary representation of the geography multi-polygon value. + An expression that provides the coordinate system id (SRID) of the geography multi-polygon value's coordinate system. + + + + Creates a that invokes the canonical 'GeographyCollectionFromBinary' function with the specified arguments. geographyCollectionWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. + + A new DbFunctionExpression that returns a new geography collection value based on the specified values. + An expression that provides the well known binary representation of the geography collection value. + An expression that provides the coordinate system id (SRID) of the geography collection value's coordinate system. + + + + Creates a that invokes the canonical 'GeographyFromGml' function with the specified argument, which must have a string result type. The result type of the expression is Edm.Geography. + + A new DbFunctionExpression that returns a new geography value based on the specified value with the default coordinate system id (SRID) of the underlying provider. + An expression that provides the Geography Markup Language (GML) representation of the geography value. + + + + Creates a that invokes the canonical 'GeographyFromGml' function with the specified arguments. geographyMarkup must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. + + A new DbFunctionExpression that returns a new geography value based on the specified values. + An expression that provides the Geography Markup Language (GML) representation of the geography value. + An expression that provides the coordinate system id (SRID) of the geography value's coordinate system. + + + + Creates a that invokes the canonical 'CoordinateSystemId' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns the integer SRID value from spatialValue. + An expression that specifies the value from which the coordinate system id (SRID) should be retrieved. + + + + Creates a that invokes the canonical 'SpatialTypeName' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.String. + + A new DbFunctionExpression that returns the string Geometry Type name from spatialValue. + An expression that specifies the value from which the Geometry Type name should be retrieved. + + + + Creates a that invokes the canonical 'SpatialDimension' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns the Dimension value from spatialValue. + An expression that specifies the value from which the Dimension value should be retrieved. + + + + Creates a that invokes the canonical 'SpatialEnvelope' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns the the minimum bounding box for geometryValue. + An expression that specifies the value from which the Envelope value should be retrieved. + + + + Creates a that invokes the canonical 'AsBinary' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Binary. + + A new DbFunctionExpression that returns the well known binary representation of spatialValue. + An expression that specifies the spatial value from which the well known binary representation should be produced. + + + + Creates a that invokes the canonical 'AsGml' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.String. + + A new DbFunctionExpression that returns the Geography Markup Language (GML) representation of spatialValue. + An expression that specifies the spatial value from which the Geography Markup Language (GML) representation should be produced. + + + + Creates a that invokes the canonical 'AsText' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.String. + + A new DbFunctionExpression that returns the well known text representation of spatialValue. + An expression that specifies the spatial value from which the well known text representation should be produced. + + + + Creates a that invokes the canonical 'IsEmptySpatial' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Boolean. + + A new DbFunctionExpression that returns a Boolean value indicating whether spatialValue is empty. + An expression that specifies the spatial value from which the IsEmptySptiaal value should be retrieved. + + + + Creates a that invokes the canonical 'IsSimpleGeometry' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Boolean. + + A new DbFunctionExpression that returns a Boolean value indicating whether geometryValue is a simple geometry. + The geometry value. + + + + Creates a that invokes the canonical 'SpatialBoundary' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns the the boundary for geometryValue. + An expression that specifies the geometry value from which the SpatialBoundary value should be retrieved. + + + + Creates a that invokes the canonical 'IsValidGeometry' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Boolean. + + A new DbFunctionExpression that returns a Boolean value indicating whether geometryValue is valid. + An expression that specifies the geometry value which should be tested for spatial validity. + + + + Creates a that invokes the canonical 'SpatialEquals' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is Edm.Boolean. + + A new DbFunctionExpression that returns a Boolean value indicating whether spatialValue1 and spatialValue2 are equal. + An expression that specifies the first spatial value. + An expression that specifies the spatial value that should be compared with spatialValue1 for equality. + + + + Creates a that invokes the canonical 'SpatialDisjoint' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is Edm.Boolean. + + A new DbFunctionExpression that returns a Boolean value indicating whether spatialValue1 and spatialValue2 are spatially disjoint. + An expression that specifies the first spatial value. + An expression that specifies the spatial value that should be compared with spatialValue1 for disjointness. + + + + Creates a that invokes the canonical 'SpatialIntersects' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is Edm.Boolean. + + A new DbFunctionExpression that returns a Boolean value indicating whether spatialValue1 and spatialValue2 intersect. + An expression that specifies the first spatial value. + An expression that specifies the spatial value that should be compared with spatialValue1 for intersection. + + + + Creates a that invokes the canonical 'SpatialTouches' function with the specified arguments, which must each have an Edm.Geometry result type. The result type of the expression is Edm.Boolean. + + A new DbFunctionExpression that returns a Boolean value indicating whether geometryValue1 touches geometryValue2. + An expression that specifies the first geometry value. + An expression that specifies the geometry value that should be compared with geometryValue1. + + + + Creates a that invokes the canonical 'SpatialCrosses' function with the specified arguments, which must each have an Edm.Geometry result type. The result type of the expression is Edm.Boolean. + + A new DbFunctionExpression that returns a Boolean value indicating whether geometryValue1 crosses geometryValue2 intersect. + An expression that specifies the first geometry value. + An expression that specifies the geometry value that should be compared with geometryValue1. + + + + Creates a that invokes the canonical 'SpatialWithin' function with the specified arguments, which must each have an Edm.Geometry result type. The result type of the expression is Edm.Boolean. + + A new DbFunctionExpression that returns a Boolean value indicating whether geometryValue1 is spatially within geometryValue2. + An expression that specifies the first geometry value. + An expression that specifies the geometry value that should be compared with geometryValue1. + + + + Creates a that invokes the canonical 'SpatialContains' function with the specified arguments, which must each have an Edm.Geometry result type. The result type of the expression is Edm.Boolean. + + A new DbFunctionExpression that returns a Boolean value indicating whether geometryValue1 spatially contains geometryValue2. + An expression that specifies the first geometry value. + An expression that specifies the geometry value that should be compared with geometryValue1. + + + + Creates a that invokes the canonical 'SpatialOverlaps' function with the specified arguments, which must each have an Edm.Geometry result type. The result type of the expression is Edm.Boolean. + + A new DbFunctionExpression that returns a Boolean value indicating whether geometryValue1 spatially overlaps geometryValue2. + An expression that specifies the first geometry value. + An expression that specifies the geometry value that should be compared with geometryValue1. + + + + Creates a that invokes the canonical 'SpatialRelate' function with the specified arguments, which must have Edm.Geometry and string result types. The result type of the expression is Edm.Boolean. + + A new DbFunctionExpression that returns a Boolean value indicating whether geometryValue1 is spatially related to geometryValue2 according to the spatial relationship designated by intersectionPatternMatrix. + An expression that specifies the first geometry value. + An expression that specifies the geometry value that should be compared with geometryValue1. + An expression that specifies the text representation of the Dimensionally Extended Nine-Intersection Model (DE-9IM) intersection pattern used to compare geometryValue1 and geometryValue2. + + + + Creates a that invokes the canonical 'SpatialBuffer' function with the specified arguments, which must have a Edm.Geography or Edm.Geometry and Edm.Double result types. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns a geometry value representing all points less than or equal to distance from spatialValue. + An expression that specifies the spatial value. + An expression that specifies the buffer distance. + + + + Creates a that invokes the canonical 'Distance' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is Edm.Double. + + A new DbFunctionExpression that returns the distance between the closest points in spatialValue1 and spatialValue1. + An expression that specifies the first spatial value. + An expression that specifies the spatial value from which the distance from spatialValue1 should be measured. + + + + Creates a that invokes the canonical 'SpatialConvexHull' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns the the convex hull for geometryValue. + An expression that specifies the geometry value from which the convex hull value should be retrieved. + + + + Creates a that invokes the canonical 'SpatialIntersection' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is the same as the type of spatialValue1 and spatialValue2. + + A new DbFunctionExpression that returns the spatial value representing the intersection of spatialValue1 and spatialValue2. + An expression that specifies the first spatial value. + An expression that specifies the spatial value for which the intersection with spatialValue1 should be computed. + + + + Creates a that invokes the canonical 'SpatialUnion' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is the same as the type of spatialValue1 and spatialValue2. + + A new DbFunctionExpression that returns the spatial value representing the union of spatialValue1 and spatialValue2. + An expression that specifies the first spatial value. + An expression that specifies the spatial value for which the union with spatialValue1 should be computed. + + + + Creates a that invokes the canonical 'SpatialDifference' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is the same as the type of spatialValue1 and spatialValue2. + + A new DbFunctionExpression that returns the geometry value representing the difference of spatialValue2 with spatialValue1. + An expression that specifies the first spatial value. + An expression that specifies the spatial value for which the difference with spatialValue1 should be computed. + + + + Creates a that invokes the canonical 'SpatialSymmetricDifference' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is the same as the type of spatialValue1 and spatialValue2. + + A new DbFunctionExpression that returns the geometry value representing the symmetric difference of spatialValue2 with spatialValue1. + An expression that specifies the first spatial value. + An expression that specifies the spatial value for which the symmetric difference with spatialValue1 should be computed. + + + + Creates a that invokes the canonical 'SpatialElementCount' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns either the number of elements in spatialValue or null if spatialValue is not a collection. + An expression that specifies the geography or geometry collection value from which the number of elements should be retrieved. + + + + Creates a that invokes the canonical 'SpatialElementAt' function with the specified arguments. The first argument must have an Edm.Geography or Edm.Geometry result type. The second argument must have an integer numeric result type. The result type of the expression is the same as that of spatialValue. + + A new DbFunctionExpression that returns either the collection element at position indexValue in spatialValue or null if spatialValue is not a collection. + An expression that specifies the geography or geometry collection value. + An expression that specifies the position of the element to be retrieved from within the geometry or geography collection. + + + + Creates a that invokes the canonical 'XCoordinate' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Double. + + A new DbFunctionExpression that returns either the X co-ordinate value of geometryValue or null if geometryValue is not a point. + An expression that specifies the geometry point value from which the X co-ordinate value should be retrieved. + + + + Creates a that invokes the canonical 'YCoordinate' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Double. + + A new DbFunctionExpression that returns either the Y co-ordinate value of geometryValue or null if geometryValue is not a point. + An expression that specifies the geometry point value from which the Y co-ordinate value should be retrieved. + + + + Creates a that invokes the canonical 'Elevation' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Double. + + A new DbFunctionExpression that returns either the elevation value of spatialValue or null if spatialValue is not a point. + An expression that specifies the spatial point value from which the elevation (Z co-ordinate) value should be retrieved. + + + + Creates a that invokes the canonical 'Measure' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Double. + + A new DbFunctionExpression that returns either the Measure of spatialValue or null if spatialValue is not a point. + An expression that specifies the spatial point value from which the Measure (M) co-ordinate value should be retrieved. + + + + Creates a that invokes the canonical 'Latitude' function with the specified argument, which must have an Edm.Geography result type. The result type of the expression is Edm.Double. + + A new DbFunctionExpression that returns either the Latitude value of geographyValue or null if geographyValue is not a point. + An expression that specifies the geography point value from which the Latitude value should be retrieved. + + + + Creates a that invokes the canonical 'Longitude' function with the specified argument, which must have an Edm.Geography result type. The result type of the expression is Edm.Double. + + A new DbFunctionExpression that returns either the Longitude value of geographyValue or null if geographyValue is not a point. + An expression that specifies the geography point value from which the Longitude value should be retrieved. + + + + Creates a that invokes the canonical 'SpatialLength' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Double. + + A new DbFunctionExpression that returns either the length of spatialValue or null if spatialValue is not a curve. + An expression that specifies the spatial curve value from which the length should be retrieved. + + + + Creates a that invokes the canonical 'StartPoint' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type is the same as that of spatialValue. + + A new DbFunctionExpression that returns either the start point of spatialValue or null if spatialValue is not a curve. + An expression that specifies the spatial curve value from which the start point should be retrieved. + + + + Creates a that invokes the canonical 'EndPoint' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type is the same as that of spatialValue. + + A new DbFunctionExpression that returns either the end point of spatialValue or null if spatialValue is not a curve. + An expression that specifies the spatial curve value from which the end point should be retrieved. + + + + Creates a that invokes the canonical 'IsClosedSpatial' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type is Edm.Boolean. + + A new DbFunctionExpression that returns either a Boolean value indicating whether spatialValue is closed, or null if spatialValue is not a curve. + An expression that specifies the spatial curve value from which the IsClosedSpatial value should be retrieved. + + + + Creates a that invokes the canonical 'IsRing' function with the specified argument, which must have an Edm.Geometry result type. The result type is Edm.Boolean. + + A new DbFunctionExpression that returns either a Boolean value indicating whether geometryValue is a ring (both closed and simple), or null if geometryValue is not a curve. + An expression that specifies the geometry curve value from which the IsRing value should be retrieved. + + + + Creates a that invokes the canonical 'PointCount' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns either the number of points in spatialValue or null if spatialValue is not a line string. + An expression that specifies the spatial line string value from which the number of points should be retrieved. + + + + Creates a that invokes the canonical 'PointAt' function with the specified arguments. The first argument must have an Edm.Geography or Edm.Geometry result type. The second argument must have an integer numeric result type. The result type of the expression is the same as that of spatialValue. + + A new DbFunctionExpression that returns either the point at position indexValue in spatialValue or null if spatialValue is not a line string. + An expression that specifies the spatial line string value. + An expression that specifies the position of the point to be retrieved from within the line string. + + + + Creates a that invokes the canonical 'Area' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Double. + + A new DbFunctionExpression that returns either the area of spatialValue or null if spatialValue is not a surface. + An expression that specifies the spatial surface value for which the area should be calculated. + + + + Creates a that invokes the canonical 'Centroid' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns either the centroid point of geometryValue (which may not be on the surface itself) or null if geometryValue is not a surface. + An expression that specifies the geometry surface value from which the centroid should be retrieved. + + + + Creates a that invokes the canonical 'PointOnSurface' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns either a point guaranteed to be on the surface geometryValue or null if geometryValue is not a surface. + An expression that specifies the geometry surface value from which the point should be retrieved. + + + + Creates a that invokes the canonical 'ExteriorRing' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns either the exterior ring of the polygon geometryValue or null if geometryValue is not a polygon. + The geometry value. + + + + Creates a that invokes the canonical 'InteriorRingCount' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Int32. + + A new DbFunctionExpression that returns either the number of interior rings in the polygon geometryValue or null if geometryValue is not a polygon. + The geometry value. + + + + Creates a that invokes the canonical 'InteriorRingAt' function with the specified arguments. The first argument must have an Edm.Geometry result type. The second argument must have an integer numeric result types. The result type of the expression is Edm.Geometry. + + A new DbFunctionExpression that returns either the interior ring at position indexValue in geometryValue or null if geometryValue is not a polygon. + The geometry value. + An expression that specifies the position of the interior ring to be retrieved from within the polygon. + + + + Ensures that all metadata in a given expression tree is from the specified metadata workspace, + potentially rebinding and rebuilding the expressions to appropriate replacement metadata where necessary. + + + + Initializes a new instance of the class. + The target workspace. + + + Implements the visitor pattern for the entity set. + The implemented visitor pattern. + The entity set. + + + Implements the visitor pattern for the function. + The implemented visitor pattern. + The function metadata. + + + Implements the visitor pattern for the type. + The implemented visitor pattern. + The type. + + + Implements the visitor pattern for the type usage. + The implemented visitor pattern. + The type. + + + Implements the visitor pattern for retrieving an instance property. + The implemented visitor. + The expression. + + + + Represents a boolean expression that tests whether a specified item matches any element in a list. + + + + + The visitor pattern method for expression visitors that do not produce a result value. + + An instance of DbExpressionVisitor. + + + is null + + + + + The visitor pattern method for expression visitors that produce a result value of a specific type. + + An instance of a typed DbExpressionVisitor that produces a result value of type TResultType. + + The type of the result produced by + + + + is null + + + An instance of . + + + + + Gets a DbExpression that specifies the item to be matched. + + + + + Gets the list of DbExpression to test for a match. + + + + + Represents the retrieval of the key value of the specified Reference as a row. + + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + + Represents the set union (without duplicate removal) operation between the left and right operands. + + + DbUnionAllExpression requires that its arguments have a common collection result type + + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + + Represents a 'scan' of all elements of a given entity set. + + + + Implements the visitor pattern for expressions that do not produce a result value. + + An instance of . + + visitor is null. + + + Implements the visitor pattern for expressions that produce a result value of a specific type. + + A result value of a specific type produced by + + . + + + An instance of a typed that produces a result value of a specific type. + + The type of the result produced by visitor . + visitor is null. + + + Gets the metadata for the referenced entity or relationship set. + The metadata for the referenced entity or relationship set. + + + + Extension methods for . + + + + + Gets the conceptual model from the specified DbModel. + + An instance of a class that implements IEdmModelAdapter (ex. DbModel). + An instance of EdmModel that represents the conceptual model. + + + + Gets the store model from the specified DbModel. + + An instance of a class that implements IEdmModelAdapter (ex. DbModel). + An instance of EdmModel that represents the store model. + + + + An interface to get the underlying store and conceptual model for a . + + + + + Gets the conceptual model. + + + + + Gets the store model. + + + + + Inherit from this class to create a service that allows for code generation of custom annotations as part of + scaffolding Migrations. The derived class should be set onto the . + + + Note that an is not needed if the annotation uses a simple string value, + or if calling ToString on the annotation object is sufficient for use in the scaffolded Migration. + + + + + Override this method to return additional namespaces that should be included in the code generated for the + scaffolded migration. The default implementation returns an empty enumeration. + + The names of the annotations that are being included in the generated code. + A list of additional namespaces to include. + + + + Implement this method to generate code for the given annotation value. + + The name of the annotation for which a value is being generated. + The annotation value. + The writer to which generated code should be written. + + + + Represents a pair of annotation values in a scaffolded or hand-coded . + + + Code First allows for custom annotations to be associated with columns and tables in the + generated model. This class represents a pair of annotation values in a migration such + that when the Code First model changes the old annotation value and the new annotation + value can be provided to the migration and used in SQL generation. + + + + + Creates a new pair of annotation values. + + The old value of the annotation, which may be null if the annotation has just been created. + The new value of the annotation, which may be null if the annotation has been deleted. + + + + + + + + + + Returns true if both annotation pairs contain the same values, otherwise false. + + A pair of annotation values. + A pair of annotation values. + True if both pairs contain the same values. + + + + Returns true if the two annotation pairs contain different values, otherwise false. + + A pair of annotation values. + A pair of annotation values. + True if the pairs contain different values. + + + + Gets the old value of the annotation, which may be null if the annotation has just been created. + + + + + Gets the new value of the annotation, which may be null if the annotation has been deleted. + + + + + Returned by and related methods to indicate whether or + not one object does not conflict with another such that the two can be combined into one. + + + If the two objects are not compatible then information about why they are not compatible is contained + in the property. + + + + + Creates a new instance. + + Indicates whether or not the two tested objects are compatible. + + An error message indicating how the objects are not compatible. Expected to be null if isCompatible is true. + + + + + Implicit conversion to a bool to allow the result object to be used directly in checks. + + The object to convert. + True if the result is compatible; false otherwise. + + + + True if the two tested objects are compatible; otherwise false. + + + + + If is true, then returns an error message indicating how the two tested objects + are incompatible. + + + + + Types used as custom annotations can implement this interface to indicate that an attempt to use + multiple annotations with the same name on a given table or column may be possible by merging + the multiple annotations into one. + + + Normally there can only be one custom annotation with a given name on a given table or + column. If a table or column ends up with multiple annotations, for example, because + multiple CLR properties map to the same column, then an exception will be thrown. + However, if the annotation type implements this interface, then the two annotations will be + checked for compatibility using the method and, if compatible, + will be merged into one using the method. + + + + + Returns true if this annotation does not conflict with the given annotation such that + the two can be combined together using the method. + + The annotation to compare. + A CompatibilityResult indicating whether or not this annotation is compatible with the other. + + + + Merges this annotation with the given annotation and returns a new merged annotation. This method is + only expected to succeed if returns true. + + The annotation to merge with this one. + A new merged annotation. + + + + Instances of this class are used as custom annotations for representing database indexes in an + Entity Framework model. + + + An index annotation is added to a Code First model when an is placed on + a mapped property of that model. This is used by Entity Framework Migrations to create indexes on + mapped database columns. Note that multiple index attributes on a property will be merged into a + single annotation for the column. Similarly, index attributes on multiple properties that map to the + same column will be merged into a single annotation for the column. This means that one index + annotation can represent multiple indexes. Within an annotation there can be only one index with any + given name. + + + + + The name used when this annotation is stored in Entity Framework metadata or serialized into + an SSDL/EDMX file. + + + + + Creates a new annotation for the given index. + + An index attributes representing an index. + + + + Creates a new annotation for the given collection of indexes. + + Index attributes representing one or more indexes. + + + + Returns true if this annotation does not conflict with the given annotation such that + the two can be combined together using the method. + + + Each index annotation contains at most one with a given name. + Two annotations are considered compatible if each IndexAttribute with a given name is only + contained in one annotation or the other, or if both annotations contain an IndexAttribute + with the given name. + + The annotation to compare. + A CompatibilityResult indicating whether or not this annotation is compatible with the other. + + + + Merges this annotation with the given annotation and returns a new annotation containing the merged indexes. + + + Each index annotation contains at most one with a given name. + The merged annotation will contain IndexAttributes from both this and the other annotation. + If both annotations contain an IndexAttribute with the same name, then the merged annotation + will contain one IndexAttribute with that name. + + The annotation to merge with this one. + A new annotation with indexes from both annotations merged. + + The other annotation contains indexes that are not compatible with indexes in this annotation. + + + + + + + + Gets the indexes represented by this annotation. + + + + + This class is used to serialize and deserialize objects so that they + can be stored in the EDMX form of the Entity Framework model. + + + An example of the serialized format is: + { Name: 'MyIndex', Order: 7, IsClustered: True, IsUnique: False } { } { Name: 'MyOtherIndex' }. + Note that properties that have not been explicitly set in an index attribute will be excluded from + the serialized output. So, in the example above, the first index has all properties specified, + the second has none, and the third has just the name set. + + + + + Implement this interface to allow custom annotations represented by instances to be + serialized to and from the EDMX XML. Usually a serializer instance is set using the + method. + + + + + Serializes the given annotation value into a string for storage in the EDMX XML. + + The name of the annotation that is being serialized. + The value to serialize. + The serialized value. + + + + Deserializes the given string back into the expected annotation value. + + The name of the annotation that is being deserialized. + The string to deserialize. + The deserialized annotation value. + + + + Serializes the given into a string for storage in the EDMX XML. + + The name of the annotation that is being serialized. + The value to serialize which must be an IndexAnnotation object. + The serialized value. + + + + Deserializes the given string back into an object. + + The name of the annotation that is being deserialized. + The string to deserialize. + The deserialized annotation value. + If there is an error reading the serialized value. + + + + Base class for persisted model cache. + + + + + Loads a model from the store. + + The type of context representing the model. + The loaded metadata model. + + + + Retrieves an edmx XDocument version of the model from the store. + + The type of context representing the model. + The loaded XDocument edmx. + + + + Saves a model to the store. + + The type of context representing the model. + The metadata model to save. + + + + Gets the default database schema used by a model. + + The type of context representing the model. + The default database schema. + + + + Loads or saves models from/into .edmx files at a specified location. + + + + + Initializes a new DefaultDbModelStore instance. + + The parent directory for the .edmx files. + + + + Loads a model from the store. + + The type of context representing the model. + The loaded metadata model. + + + + Retrieves an edmx XDocument version of the model from the store. + + The type of context representing the model. + The loaded XDocument edmx. + + + + Saves a model to the store. + + The type of context representing the model. + The metadata model to save. + + + + Gets the path of the .edmx file corresponding to the specified context type. + + A context type. + The .edmx file path. + + + + Validates the model store is valid. + The default implementation verifies that the .edmx file was last + written after the context assembly was last written. + + The type of context representing the model. + The path of the stored model. + Whether the edmx file should be invalidated. + + + + Gets the location of the .edmx files. + + + + + This interface is implemented by any object that can resolve a dependency, either directly + or through use of an external container. + + + The public services currently resolved using IDbDependencyResolver are documented here: + http://msdn.microsoft.com/en-us/data/jj680697 + + + + + Attempts to resolve a dependency for a given contract type and optionally a given key. + If the resolver cannot resolve the dependency then it must return null and not throw. This + allows resolvers to be used in a Chain of Responsibility pattern such that multiple resolvers + can be asked to resolve a dependency until one finally does. + + The interface or abstract base class that defines the dependency to be resolved. The returned object is expected to be an instance of this type. + Optionally, the key of the dependency to be resolved. This may be null for dependencies that are not differentiated by key. + The resolved dependency, which must be an instance of the given contract type, or null if the dependency could not be resolved. + + + + Attempts to resolve a dependencies for a given contract type and optionally a given key. + If the resolver cannot resolve the dependency then it must return an empty enumeration and + not throw. This method differs from in that it returns all registered + services for the given type and key combination. + + The interface or abstract base class that defines the dependency to be resolved. Every returned object is expected to be an instance of this type. + Optionally, the key of the dependency to be resolved. This may be null for dependencies that are not differentiated by key. + All services that resolve the dependency, which must be instances of the given contract type, or an empty enumeration if the dependency could not be resolved. + + + + An implementation used for resolving + factories. + + + + + Initializes a new instance of + + A function that returns a new instance of a transaction handler. + + The ADO.NET provider invariant name indicating the type of ADO.NET connection for which the transaction handler will be used. + null will match anything. + + + A string that will be matched against the server name in the connection string. null will match anything. + + + + + If the given type is , then this method will attempt + to return the service to use, otherwise it will return null. When the given type is + , then the key is expected to be a . + + The service type to resolve. + A key used to make a determination of the service to return. + + An , or null. + + + + + If the given type is , then this resolver will attempt + to return the service to use, otherwise it will return an empty enumeration. When the given type is + , then the key is expected to be an . + + The service type to resolve. + A key used to make a determination of the service to return. + + An enumerable of , or an empty enumeration. + + + + + + + + + + + Utility class for reading a metadata model from .edmx. + + + + + Reads a metadata model from .edmx. + + XML reader for the .edmx + Default database schema used by the model. + The loaded metadata model. + + + + Provides utility methods for reading from an App.config or Web.config file. + + + + + Initializes a new instance of . + + The configuration to read from. + + + + Gets the specified provider services from the configuration. + + The invariant name of the provider services. + The provider services type name, or null if not found. + + + + A simple logger for logging SQL and other database operations to the console or a file. + A logger can be registered in code or in the application's web.config /app.config file. + + + + + An object that implements this interface can be registered with to + receive notifications when Entity Framework loads the application's . + + + Interceptors can also be registered in the config file of the application. + See http://go.microsoft.com/fwlink/?LinkId=260883 for more information about Entity Framework configuration. + + + + + This is the base interface for all interfaces that provide interception points for various + different types and operations. For example, see . + Interceptors are registered on the class. + + + + + Occurs during EF initialization after the has been constructed but just before + it is locked ready for use. Use this event to inspect and/or override services that have been + registered before the configuration is locked. Note that an interceptor of this type should be used carefully + since it may prevent tooling from discovering the same configuration that is used at runtime. + + + Handlers can only be added before EF starts to use the configuration and so handlers should + generally be added as part of application initialization. Do not access the DbConfiguration + static methods inside the handler; instead use the the members of + to get current services and/or add overrides. + + Arguments to the event that this interceptor mirrors. + Contextual information about the event. + + + + Creates a new logger that will send log output to the console. + + + + + Creates a new logger that will send log output to a file. If the file already exists then + it is overwritten. + + A path to the file to which log output will be written. + + + + Creates a new logger that will send log output to a file. + + A path to the file to which log output will be written. + True to append data to the file if it exists; false to overwrite the file. + + + + Stops logging and closes the underlying file if output is being written to a file. + + + + + Stops logging and closes the underlying file if output is being written to a file. + + + True to release both managed and unmanaged resources; False to release only unmanaged resources. + + + + + Starts logging. This method is a no-op if logging is already started. + + + + + Stops logging. This method is a no-op if logging is not started. + + + + + Called to start logging during Entity Framework initialization when this logger is registered. + as an . + + Arguments to the event that this interceptor mirrors. + Contextual information about the event. + + + + Represents contextual information associated with calls into + implementations. + + + Instances of this class are publicly immutable for contextual information. To add + contextual information use one of the With... or As... methods to create a new + interception context containing the new information. + + + + + Represents contextual information associated with calls into + implementations. + + + Note that specific types/operations that can be intercepted may use a more specific + interception context derived from this class. For example, if SQL is being executed by + a , then the DbContext will be contained in the + instance that is passed to the methods + of . + Instances of this class are publicly immutable for contextual information. To add + contextual information use one of the With... or As... methods to create a new + interception context containing the new information. + + + + + Constructs a new with no state. + + + + + Creates a new by copying state from the given + interception context. See + + The context from which to copy state. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + Creates a new that contains all the contextual information in this + interception context the flag set to true. + + A new interception context associated with the async flag set. + + + + Call this method when creating a copy of an interception context in order to add new state + to it. Using this method instead of calling the constructor directly ensures virtual dispatch + so that the new type will have the same type (and any specialized state) as the context that + is being cloned. + + A new context with all state copied. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Gets all the instances associated with this interception context. + + + This list usually contains zero or one items. However, it can contain more than one item if + a single has been used to construct multiple + instances. + + + + + Gets all the instances associated with this interception context. + + + This list usually contains zero or one items. However, it can contain more than one item when + EF has created a new for use in database creation and initialization, or + if a single is used with multiple . + + + + + True if the operation is being executed asynchronously, otherwise false. + + + + + Constructs a new with no state. + + + + + Creates a new by copying state from the given + interception context. Also see + + The context from which to copy state. + + + + + + + Creates a new that contains all the contextual information in + this interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + Creates a new that contains all the contextual information in + this interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + Creates a new that contains all the contextual information in + this interception context the flag set to true. + + A new interception context associated with the async flag set. + + + + + + + + + + + + + + + + Implemented by Entity Framework providers and used to check whether or not tables exist + in a given database. This is used by database initializers when determining whether or not to + treat an existing database as empty such that tables should be created. + + + + + When overridden in a derived class checks where the given tables exist in the database + for the given connection. + + + The context for which table checking is being performed, usually used to obtain an appropriate + . + + + A connection to the database. May be open or closed; should be closed again if opened. Do not + dispose. + + The tables to check for existence. + The name of the EdmMetadata table to check for existence. + True if any of the model tables or EdmMetadata table exists. + + + + Helper method to get the table name for the given s-space . + + The s-space entity set for the table. + The table name. + + + + Thrown when an error occurs committing a . + + + + + Initializes a new instance of + + + + + Initializes a new instance of + + The exception message. + + + + Initializes a new instance of + + The exception message. + The inner exception. + + + + Initializes a new instance of the class. + + The data necessary to serialize or deserialize an object. + Description of the source and destination of the specified serialized stream. + + + + Event arguments passed to event handlers. + + + + + Call this method to add a instance to the Chain of + Responsibility of resolvers that are used to resolve dependencies needed by the Entity Framework. + + + Resolvers are asked to resolve dependencies in reverse order from which they are added. This means + that a resolver can be added to override resolution of a dependency that would already have been + resolved in a different way. + The only exception to this is that any dependency registered in the application's config file + will always be used in preference to using a dependency resolver added here, unless the + overrideConfigFile is set to true in which case the resolver added here will also override config + file settings. + + The resolver to add. + If true, then the resolver added will take precedence over settings in the config file. + + + + Call this method to add a instance to the Chain of Responsibility + of resolvers that are used to resolve dependencies needed by the Entity Framework. Unlike the AddDependencyResolver + method, this method puts the resolver at the bottom of the Chain of Responsibility such that it will only + be used to resolve a dependency that could not be resolved by any of the other resolvers. + + The resolver to add. + + + + Adds a wrapping resolver to the configuration that is about to be locked. A wrapping + resolver is a resolver that incepts a service would have been returned by the resolver + chain and wraps or replaces it with another service of the same type. + + The type of service to wrap or replace. + A delegate that takes the unwrapped service and key and returns the wrapped or replaced service. + + + + + + + + + + + + + + + + Returns a snapshot of the that is about to be locked. + Use the GetService methods on this object to get services that have been registered. + + + + + An implementation used for resolving + factories. + + + This class can be used by to aid in the resolving + of factories as a default service for the provider. + + The type of execution strategy that is resolved. + + + + Initializes a new instance of + + + The ADO.NET provider invariant name indicating the type of ADO.NET connection for which this execution strategy will be used. + + + A string that will be matched against the server name in the connection string. null will match anything. + + A function that returns a new instance of an execution strategy. + + + + If the given type is , then this resolver will attempt + to return the service to use, otherwise it will return null. When the given type is + Func{IExecutionStrategy}, then the key is expected to be an . + + The service type to resolve. + A key used to make a determination of the service to return. + + An , or null. + + + + + If the given type is , then this resolver will attempt + to return the service to use, otherwise it will return an empty enumeration. When the given type is + Func{IExecutionStrategy}, then the key is expected to be an . + + The service type to resolve. + A key used to make a determination of the service to return. + + An enumerable of , or an empty enumeration. + + + + + Extension methods to call the method using + a generic type parameter and/or no name. + + + + + Calls passing the generic type of the method and the given + name as arguments. + + The contract type to resolve. + The resolver to use. + The key of the dependency to resolve. + The resolved dependency, or null if the resolver could not resolve it. + + + + Calls passing the generic type of the method as + the type argument and null for the name argument. + + The contract type to resolve. + The resolver to use. + The resolved dependency, or null if the resolver could not resolve it. + + + + Calls passing the given type argument and using + null for the name argument. + + The resolver to use. + The contract type to resolve. + The resolved dependency, or null if the resolver could not resolve it. + + + + Calls passing the generic type of the method and the given + name as arguments. + + The contract type to resolve. + The resolver to use. + The key of the dependency to resolve. + All resolved dependencies, or an if no services are resolved. + + + + Calls passing the generic type of the method as + the type argument and null for the name argument. + + The contract type to resolve. + The resolver to use. + All resolved dependencies, or an if no services are resolved. + + + + Calls passing the given type argument and using + null for the name argument. + + The resolver to use. + The contract type to resolve. + All resolved dependencies, or an if no services are resolved. + + + + Implements to resolve a dependency such that it always returns + the same instance. + + The type that defines the contract for the dependency that will be resolved. + + This class is immutable such that instances can be accessed by multiple threads at the same time. + + + + + Constructs a new resolver that will return the given instance for the contract type + regardless of the key passed to the Get method. + + The instance to return. + + + + Constructs a new resolver that will return the given instance for the contract type + if the given key matches exactly the key passed to the Get method. + + The instance to return. + Optionally, the key of the dependency to be resolved. This may be null for dependencies that are not differentiated by key. + + + + Constructs a new resolver that will return the given instance for the contract type + if the given key matches the key passed to the Get method based on the given predicate. + + The instance to return. + A predicate that takes the key object and returns true if and only if it matches. + + + + + + + + + + Represents contextual information associated with calls to + implementations. + + + Instances of this class are publicly immutable for contextual information. To add + contextual information use one of the With... or As... methods to create a new + interception context containing the new information. + + + + + Represents contextual information associated with calls to with return type . + + The return type of the target method. + + + + Represents contextual information associated with calls with return type . + + The return type of the target method. + + + + Constructs a new with no state. + + + + + Creates a new by copying immutable state from the given + interception context. Also see + + The context from which to copy state. + + + + Gets a value containing arbitrary user-specified state information associated with the operation. + + A key used to identify the user state. + The user state set, or null if none was found for the given key. + + + + Sets a value containing arbitrary user-specified state information associated with the operation. + + A key used to identify the user state. + The state to set. + + + + Prevents the operation from being executed if called before the operation has executed. + + + Thrown if this method is called after the operation has already executed. + + + + + Creates a new that contains all the contextual information in this + interception context together with the flag set to true. + + A new interception context associated with the async flag set. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + + + + + + + + + + + + + If execution of the operation completes without throwing, then this property will contain + the result of the operation. If the operation was suppressed or did not fail, then this property + will always contain the default value for the generic type. + + + When an operation operation completes without throwing both this property and the + property are set. However, the property can be set or changed by interceptors, + while this property will always represent the actual result returned by the operation, if any. + + + + + If this property is set before the operation has executed, then execution of the operation will + be suppressed and the set result will be returned instead. Otherwise, if the operation succeeds, then + this property will be set to the returned result. In either case, interceptors that run + after the operation can change this property to change the result that will be returned. + + + When an operation operation completes without throwing both this property and the + property are set. However, this property can be set or changed by interceptors, while the + property will always represent the actual result returned by the + operation, if any. + + + + + When true, this flag indicates that that execution of the operation has been suppressed by + one of the interceptors. This can be done before the operation has executed by calling + , by setting an to be thrown, or + by setting the operation result using . + + + + + Gets or sets a value containing arbitrary user-specified state information associated with the operation. + + + + + If execution of the operation fails, then this property will contain the exception that was + thrown. If the operation was suppressed or did not fail, then this property will always be null. + + + When an operation fails both this property and the property are set + to the exception that was thrown. However, the property can be set or + changed by interceptors, while this property will always represent the original exception thrown. + + + + + If this property is set before the operation has executed, then execution of the operation will + be suppressed and the set exception will be thrown instead. Otherwise, if the operation fails, then + this property will be set to the exception that was thrown. In either case, interceptors that run + after the operation can change this property to change the exception that will be thrown, or set this + property to null to cause no exception to be thrown at all. + + + When an operation fails both this property and the property are set + to the exception that was thrown. However, the this property can be set or changed by + interceptors, while the property will always represent + the original exception thrown. + + + + + Set to the status of the after an async operation has finished. Not used for + synchronous operations. + + + + + Constructs a new with no state. + + + + + Creates a new by copying immutable state from the given + interception context. Also see + + The context from which to copy state. + + + + Creates a new that contains all the contextual information in this + interception context together with the flag set to true. + + A new interception context associated with the async flag set. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + + + + + + + + + + + + + + + + Constructs a new with no state. + + + + + Creates a new by copying immutable state from the given + interception context. Also see + + The context from which to copy state. + + + + Creates a new that contains all the contextual information in this + interception context together with the flag set to true. + + A new interception context associated with the async flag set. + + + + Creates a new that contains all the contextual information in this + interception context together with the given . + + The isolation level to associate. + A new interception context associated with the given isolation level. + + + + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + + + + + + + + + + + + + The that will be used or has been used to start a transaction. + + + + + This is the default log formatter used when some is set onto the + property. A different formatter can be used by creating a class that inherits from this class and overrides + some or all methods to change behavior. + + + To set the new formatter create a code-based configuration for EF using and then + set the formatter class to use with . + Note that setting the type of formatter to use with this method does change the way command are + logged when is used. It is still necessary to set a + onto before any commands will be logged. + For more low-level control over logging/interception see and + . + Interceptors can also be registered in the config file of the application. + See http://go.microsoft.com/fwlink/?LinkId=260883 for more information about Entity Framework configuration. + + + + + An object that implements this interface can be registered with to + receive notifications when Entity Framework executes commands. + + + Interceptors can also be registered in the config file of the application. + See http://go.microsoft.com/fwlink/?LinkId=260883 for more information about Entity Framework configuration. + + + + + This method is called before a call to or + one of its async counterparts is made. + + The command being executed. + Contextual information associated with the call. + + + + This method is called after a call to or + one of its async counterparts is made. The result used by Entity Framework can be changed by setting + . + + + For async operations this method is not called until after the async task has completed + or failed. + + The command being executed. + Contextual information associated with the call. + + + + This method is called before a call to or + one of its async counterparts is made. + + The command being executed. + Contextual information associated with the call. + + + + This method is called after a call to or + one of its async counterparts is made. The result used by Entity Framework can be changed by setting + . + + + For async operations this method is not called until after the async task has completed + or failed. + + The command being executed. + Contextual information associated with the call. + + + + This method is called before a call to or + one of its async counterparts is made. + + The command being executed. + Contextual information associated with the call. + + + + This method is called after a call to or + one of its async counterparts is made. The result used by Entity Framework can be changed by setting + . + + + For async operations this method is not called until after the async task has completed + or failed. + + The command being executed. + Contextual information associated with the call. + + + + An object that implements this interface can be registered with to + receive notifications when Entity Framework performs operations on a . + + + Interceptors can also be registered in the config file of the application. + See http://go.microsoft.com/fwlink/?LinkId=260883 for more information about Entity Framework configuration. + + + + + Called before is invoked. + + The connection beginning the transaction. + Contextual information associated with the call. + + + + Called after is invoked. + The transaction used by Entity Framework can be changed by setting + . + + The connection that began the transaction. + Contextual information associated with the call. + + + + Called before is invoked. + + The connection being closed. + Contextual information associated with the call. + + + + Called after is invoked. + + The connection that was closed. + Contextual information associated with the call. + + + + Called before is retrieved. + + The connection. + Contextual information associated with the call. + + + + Called after is retrieved. + + The connection. + Contextual information associated with the call. + + + + Called before is set. + + The connection. + Contextual information associated with the call. + + + + Called after is set. + + The connection. + Contextual information associated with the call. + + + + Called before is retrieved. + + The connection. + Contextual information associated with the call. + + + + Called after is retrieved. + + The connection. + Contextual information associated with the call. + + + + Called before is retrieved. + + The connection. + Contextual information associated with the call. + + + + Called after is retrieved. + + The connection. + Contextual information associated with the call. + + + + Called before is retrieved. + + The connection. + Contextual information associated with the call. + + + + Called after is retrieved. + + The connection. + Contextual information associated with the call. + + + + Called before is invoked. + + The connection being disposed. + Contextual information associated with the call. + + + + Called after is invoked. + + The connection that was disposed. + Contextual information associated with the call. + + + + Called before is invoked. + + The connection. + Contextual information associated with the call. + + + + Called after is invoked. + + The connection. + Contextual information associated with the call. + + + + Called before or its async counterpart is invoked. + + The connection being opened. + Contextual information associated with the call. + + + + Called after or its async counterpart is invoked. + + The connection that was opened. + Contextual information associated with the call. + + + + Called before is retrieved. + + The connection. + Contextual information associated with the call. + + + + Called after is retrieved. + + The connection. + Contextual information associated with the call. + + + + Called before is retrieved. + + The connection. + Contextual information associated with the call. + + + + Called after is retrieved. + + The connection. + Contextual information associated with the call. + + + + An object that implements this interface can be registered with to + receive notifications when Entity Framework commits or rollbacks a transaction. + + + Interceptors can also be registered in the config file of the application. + See http://go.microsoft.com/fwlink/?LinkId=260883 for more information about Entity Framework configuration. + + + + + Called before is retrieved. + + The transaction. + Contextual information associated with the call. + + + + Called after is retrieved. + + The transaction. + Contextual information associated with the call. + + + + Called before is retrieved. + + The transaction. + Contextual information associated with the call. + + + + Called after is retrieved. + + The transaction. + Contextual information associated with the call. + + + + This method is called before is invoked. + + The transaction being commited. + Contextual information associated with the call. + + + + This method is called after is invoked. + + The transaction that was commited. + Contextual information associated with the call. + + + + This method is called before is invoked. + + The transaction being disposed. + Contextual information associated with the call. + + + + This method is called after is invoked. + + The transaction that was disposed. + Contextual information associated with the call. + + + + This method is called before is invoked. + + The transaction being rolled back. + Contextual information associated with the call. + + + + This method is called after is invoked. + + The transaction that was rolled back. + Contextual information associated with the call. + + + + Creates a formatter that will not filter by any and will instead log every command + from any context and also commands that do not originate from a context. + + + This constructor is not used when a delegate is set on . Instead it can be + used by setting the formatter directly using . + + The delegate to which output will be sent. + + + + Creates a formatter that will only log commands the come from the given instance. + + + This constructor must be called by a class that inherits from this class to override the behavior + of . + + + The context for which commands should be logged. Pass null to log every command + from any context and also commands that do not originate from a context. + + The delegate to which output will be sent. + + + + Writes the given string to the underlying write delegate. + + The string to write. + + + + The stopwatch used to time executions. This stopwatch is started at the end of + , , and + methods and is stopped at the beginning of the , , + and methods. If these methods are overridden and the stopwatch is being used + then the overrides should either call the base method or start/stop the stopwatch themselves. + + The interception context for which the stopwatch will be obtained. + The stopwatch. + + + + This method is called before a call to or + one of its async counterparts is made. + The default implementation calls and starts the stopwatch returned from + . + + The command being executed. + Contextual information associated with the call. + + + + This method is called after a call to or + one of its async counterparts is made. + The default implementation stopsthe stopwatch returned from and calls + . + + The command being executed. + Contextual information associated with the call. + + + + This method is called before a call to or + one of its async counterparts is made. + The default implementation calls and starts the stopwatch returned from + . + + The command being executed. + Contextual information associated with the call. + + + + This method is called after a call to or + one of its async counterparts is made. + The default implementation stopsthe stopwatch returned from and calls + . + + The command being executed. + Contextual information associated with the call. + + + + This method is called before a call to or + one of its async counterparts is made. + The default implementation calls and starts the stopwatch returned from + . + + The command being executed. + Contextual information associated with the call. + + + + This method is called after a call to or + one of its async counterparts is made. + The default implementation stopsthe stopwatch returned from and calls + . + + The command being executed. + Contextual information associated with the call. + + + + Called whenever a command is about to be executed. The default implementation of this method + filters by set into , if any, and then calls + . This method would typically only be overridden to change the + context filtering behavior. + + The type of the operation's results. + The command that will be executed. + Contextual information associated with the command. + + + + Called whenever a command has completed executing. The default implementation of this method + filters by set into , if any, and then calls + . This method would typically only be overridden to change the context + filtering behavior. + + The type of the operation's results. + The command that was executed. + Contextual information associated with the command. + + + + Called to log a command that is about to be executed. Override this method to change how the + command is logged to . + + The type of the operation's results. + The command to be logged. + Contextual information associated with the command. + + + + Called by to log each parameter. This method can be called from an overridden + implementation of to log parameters, and/or can be overridden to + change the way that parameters are logged to . + + The type of the operation's results. + The command being logged. + Contextual information associated with the command. + The parameter to log. + + + + Called to log the result of executing a command. Override this method to change how results are + logged to . + + The type of the operation's results. + The command being logged. + Contextual information associated with the command. + + + + Does not write to log unless overridden. + + The connection beginning the transaction. + Contextual information associated with the call. + + + + Called after is invoked. + The default implementation of this method filters by set into + , if any, and then logs the event. + + The connection that began the transaction. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The connection. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The connection. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The connection being opened. + Contextual information associated with the call. + + + + Called after or its async counterpart is invoked. + The default implementation of this method filters by set into + , if any, and then logs the event. + + The connection that was opened. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The connection being closed. + Contextual information associated with the call. + + + + Called after is invoked. + The default implementation of this method filters by set into + , if any, and then logs the event. + + The connection that was closed. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The connection. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The connection. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The connection. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The connection. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The connection. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The connection. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The connection. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The connection. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The connection. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The connection. + Contextual information associated with the call. + + + + Called before is invoked. + The default implementation of this method filters by set into + , if any, and then logs the event. + + The connection being disposed. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The connection that was disposed. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The connection. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The connection. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The connection. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The connection. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The transaction. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The transaction. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + The transaction. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The transaction. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The transaction being commited. + Contextual information associated with the call. + + + + This method is called after is invoked. + The default implementation of this method filters by set into + , if any, and then logs the event. + + The transaction that was commited. + Contextual information associated with the call. + + + + This method is called before is invoked. + The default implementation of this method filters by set into + , if any, and then logs the event. + + The transaction being disposed. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The transaction that was disposed. + Contextual information associated with the call. + + + + Does not write to log unless overridden. + + The transaction being rolled back. + Contextual information associated with the call. + + + + This method is called after is invoked. + The default implementation of this method filters by set into + , if any, and then logs the event. + + The transaction that was rolled back. + Contextual information associated with the call. + + + + + + + + + + + + + + + + The context for which commands are being logged, or null if commands from all contexts are + being logged. + + + + + This property is obsolete. Using it can result in logging incorrect execution times. Call + instead. + + + + + Represents contextual information associated with calls to that don't return any results. + + + + + Represents contextual information associated with calls that don't return any results. + + + + + Constructs a new with no state. + + + + + Creates a new by copying immutable state from the given + interception context. Also see + + The context from which to copy state. + + + + Prevents the operation from being executed if called before the operation has executed. + + + Thrown if this method is called after the operation has already executed. + + + + + Gets a value containing arbitrary user-specified state information associated with the operation. + + A key used to identify the user state. + The user state set, or null if none was found for the given key. + + + + Sets a value containing arbitrary user-specified state information associated with the operation. + + A key used to identify the user state. + The state to set. + + + + Creates a new that contains all the contextual information in this + interception context together with the flag set to true. + + A new interception context associated with the async flag set. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + + + + + + + + + + + + + When true, this flag indicates that that execution of the operation has been suppressed by + one of the interceptors. This can be done before the operation has executed by calling + or by setting an to be thrown + + + + + If execution of the operation fails, then this property will contain the exception that was + thrown. If the operation was suppressed or did not fail, then this property will always be null. + + + When an operation fails both this property and the property are set + to the exception that was thrown. However, the property can be set or + changed by interceptors, while this property will always represent the original exception thrown. + + + + + If this property is set before the operation has executed, then execution of the operation will + be suppressed and the set exception will be thrown instead. Otherwise, if the operation fails, then + this property will be set to the exception that was thrown. In either case, interceptors that run + after the operation can change this property to change the exception that will be thrown, or set this + property to null to cause no exception to be thrown at all. + + + When an operation fails both this property and the property are set + to the exception that was thrown. However, the this property can be set or changed by + interceptors, while the property will always represent + the original exception thrown. + + + + + Set to the status of the after an async operation has finished. Not used for + synchronous operations. + + + + + Gets or sets a value containing arbitrary user-specified state information associated with the operation. + + + + + Constructs a new with no state. + + + + + Creates a new by copying immutable state from the given + interception context. Also see + + The context from which to copy state. + + + + Creates a new that contains all the contextual information in this + interception context together with the flag set to true. + + A new interception context associated with the async flag set. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + + + + + + + + + + + + + + + + Represents contextual information associated with calls to property setters of type on a . + + The type of the target property. + + + + Represents contextual information associated with calls to property setters of type . + + + An instance of this class is passed to the dispatch methods and does not contain mutable information such as + the result of the operation. This mutable information is obtained from the + that is passed to the interceptors. Instances of this class are publicly immutable. To add contextual information + use one of the With... or As... methods to create a new interception context containing the new information. + + The type of the target property. + + + + Constructs a new with no state. + + + + + Creates a new by copying immutable state from the given + interception context. Also see + + The context from which to copy state. + + + + Gets a value containing arbitrary user-specified state information associated with the operation. + + A key used to identify the user state. + The user state set, or null if none was found for the given key. + + + + Sets a value containing arbitrary user-specified state information associated with the operation. + + A key used to identify the user state. + The state to set. + + + + Creates a new that contains all the contextual information in this + interception context together with the given property value. + + The value that will be assigned to the target property. + A new interception context associated with the given property value. + + + + + + + Prevents the operation from being executed if called before the operation has executed. + + + Thrown if this method is called after the operation has already executed. + + + + + Creates a new that contains all the contextual information in this + interception context together with the flag set to true. + + A new interception context associated with the async flag set. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + + + + + + + + + + + + + The value that will be assigned to the target property. + + + + + Gets or sets a value containing arbitrary user-specified state information associated with the operation. + + + + + When true, this flag indicates that that execution of the operation has been suppressed by + one of the interceptors. This can be done before the operation has executed by calling + or by setting an to be thrown + + + + + If execution of the operation fails, then this property will contain the exception that was + thrown. If the operation was suppressed or did not fail, then this property will always be null. + + + When an operation fails both this property and the property are set + to the exception that was thrown. However, the property can be set or + changed by interceptors, while this property will always represent the original exception thrown. + + + + + If this property is set before the operation has executed, then execution of the operation will + be suppressed and the set exception will be thrown instead. Otherwise, if the operation fails, then + this property will be set to the exception that was thrown. In either case, interceptors that run + after the operation can change this property to change the exception that will be thrown, or set this + property to null to cause no exception to be thrown at all. + + + When an operation fails both this property and the property are set + to the exception that was thrown. However, the this property can be set or changed by + interceptors, while the property will always represent + the original exception thrown. + + + + + Set to the status of the after an async operation has finished. Not used for + synchronous operations. + + + + + Constructs a new with no state. + + + + + Creates a new by copying immutable state from the given + interception context. Also see + + The context from which to copy state. + + + + Creates a new that contains all the contextual information in this + interception context together with the given property value. + + The value that will be assigned to the target property. + A new interception context associated with the given property value. + + + + + + + Creates a new that contains all the contextual information in this + interception context together with the flag set to true. + + A new interception context associated with the async flag set. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + + + + + + + + + + + + + Used for dispatching operations to a such that any + registered on will be notified before and after the + operation executes. + Instances of this class are obtained through the the fluent API. + + + This class is used internally by Entity Framework when executing commands. It is provided publicly so that + code that runs outside of the core EF assemblies can opt-in to command interception/tracing. This is + typically done by EF providers that are executing commands on behalf of EF. + + + + + Sends and + to any + registered on before/after making a + call to . + + + Note that the result of executing the command is returned by this method. The result is not available + in the interception context passed into this method since the interception context is cloned before + being passed to interceptors. + + The command on which the operation will be executed. + Optional information about the context of the call being made. + The result of the operation, which may have been modified by interceptors. + + + + Sends and + to any + registered on before/after making a + call to . + + + Note that the result of executing the command is returned by this method. The result is not available + in the interception context passed into this method since the interception context is cloned before + being passed to interceptors. + + The command on which the operation will be executed. + Optional information about the context of the call being made. + The result of the operation, which may have been modified by interceptors. + + + + Sends and + to any + registered on before/after making a + call to . + + + Note that the result of executing the command is returned by this method. The result is not available + in the interception context passed into this method since the interception context is cloned before + being passed to interceptors. + + The command on which the operation will be executed. + Optional information about the context of the call being made. + The result of the operation, which may have been modified by interceptors. + + + + Sends and + to any + registered on before/after making a + call to . + + + Note that the result of executing the command is returned by this method. The result is not available + in the interception context passed into this method since the interception context is cloned before + being passed to interceptors. + + The command on which the operation will be executed. + Optional information about the context of the call being made. + The cancellation token for the asynchronous operation. + The result of the operation, which may have been modified by interceptors. + + + + Sends and + to any + registered on before/after making a + call to . + + + Note that the result of executing the command is returned by this method. The result is not available + in the interception context passed into this method since the interception context is cloned before + being passed to interceptors. + + The command on which the operation will be executed. + Optional information about the context of the call being made. + The cancellation token for the asynchronous operation. + The result of the operation, which may have been modified by interceptors. + + + + Sends and + to any + registered on before/after making a + call to . + + + Note that the result of executing the command is returned by this method. The result is not available + in the interception context passed into this method since the interception context is cloned before + being passed to interceptors. + + The command on which the operation will be executed. + Optional information about the context of the call being made. + The cancellation token for the asynchronous operation. + The result of the operation, which may have been modified by interceptors. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Represents contextual information associated with calls into + implementations. + + + An instance of this class is passed to the dispatch methods of + and does not contain mutable information such as the result of the operation. This mutable information + is obtained from the that is passed to the interceptors. + Instances of this class are publicly immutable. To add contextual information use one of the + With... or As... methods to create a new interception context containing the new information. + + + + + Constructs a new with no state. + + + + + Creates a new by copying state from the given + interception context. Also see + + The context from which to copy state. + + + + Creates a new that contains all the contextual information in this + interception context together with the given . + + The command behavior to associate. + A new interception context associated with the given command behavior. + + + + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + Creates a new that contains all the contextual information in this + interception context the flag set to true. + + A new interception context associated with the async flag set. + + + + + + + + + + + + + + + + The that will be used or has been used to execute the command with a + . This property is only used for + and its async counterparts. + + + + + Represents contextual information associated with calls into + implementations including the result of the operation. + + The type of the operation's results. + + Instances of this class are publicly immutable for contextual information. To add + contextual information use one of the With... or As... methods to create a new + interception context containing the new information. + + + + + Constructs a new with no state. + + + + + Creates a new by copying immutable state from the given + interception context. Also see + + The context from which to copy state. + + + + Gets a value containing arbitrary user-specified state information associated with the operation. + + A key used to identify the user state. + The user state set, or null if none was found for the given key. + + + + Sets a value containing arbitrary user-specified state information associated with the operation. + + A key used to identify the user state. + The state to set. + + + + Prevents the operation from being executed if called before the operation has executed. + + + Thrown if this method is called after the operation has already executed. + + + + + Creates a new that contains all the contextual information in this + interception context together with the flag set to true. + + A new interception context associated with the async flag set. + + + + Creates a new that contains all the contextual information in this + interception context together with the given . + + The command behavior to associate. + A new interception context associated with the given command behavior. + + + + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + + + + + + + + + + + + + If execution of the operation completes without throwing, then this property will contain + the result of the operation. If the operation was suppressed or did not fail, then this property + will always contain the default value for the generic type. + + + When an operation operation completes without throwing both this property and the + property are set. However, the property can be set or changed by interceptors, + while this property will always represent the actual result returned by the operation, if any. + + + + + If this property is set before the operation has executed, then execution of the operation will + be suppressed and the set result will be returned instead. Otherwise, if the operation succeeds, then + this property will be set to the returned result. In either case, interceptors that run + after the operation can change this property to change the result that will be returned. + + + When an operation operation completes without throwing both this property and the + property are set. However, this property can be set or changed by interceptors, while the + property will always represent the actual result returned by the + operation, if any. + + + + + When true, this flag indicates that that execution of the operation has been suppressed by + one of the interceptors. This can be done before the operation has executed by calling + , by setting an to be thrown, or + by setting the operation result using . + + + + + Gets or sets a value containing arbitrary user-specified state information associated with the operation. + + + + + If execution of the operation fails, then this property will contain the exception that was + thrown. If the operation was suppressed or did not fail, then this property will always be null. + + + When an operation fails both this property and the property are set + to the exception that was thrown. However, the property can be set or + changed by interceptors, while this property will always represent the original exception thrown. + + + + + If this property is set before the operation has executed, then execution of the operation will + be suppressed and the set exception will be thrown instead. Otherwise, if the operation fails, then + this property will be set to the exception that was thrown. In either case, interceptors that run + after the operation can change this property to change the exception that will be thrown, or set this + property to null to cause no exception to be thrown at all. + + + When an operation fails both this property and the property are set + to the exception that was thrown. However, the this property can be set or changed by + interceptors, while the property will always represent + the original exception thrown. + + + + + Set to the status of the after an async operation has finished. Not used for + synchronous operations. + + + + + Base class that implements . This class is a convenience for + use when only one or two methods of the interface actually need to have any implementation. + + + + + + + + + + + + + + + + + + + + + + + Represents contextual information associated with calls into + implementations. + + + Instances of this class are publicly immutable for contextual information. To add + contextual information use one of the With... or As... methods to create a new + interception context containing the new information. + + + + + Constructs a new with no state. + + + + + Creates a new by copying state from the given + interception context. Also see + + The context from which to copy state. + + + + Gets a value containing arbitrary user-specified state information associated with the operation. + + A key used to identify the user state. + The user state set, or null if none was found for the given key. + + + + Sets a value containing arbitrary user-specified state information associated with the operation. + + A key used to identify the user state. + The state to set. + + + + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + Creates a new that contains all the contextual information in this + interception context the flag set to true. + + A new interception context associated with the async flag set. + + + + + + + + + + + + + + + + The original tree created by Entity Framework. Interceptors can change the + property to change the tree that will be used, but the + will always be the tree created by Entity Framework. + + + + + The command tree that will be used by Entity Framework. This starts as the tree contained in the + the property but can be set by interceptors to change + the tree that will be used by Entity Framework. + + + + + Gets or sets a value containing arbitrary user-specified state information associated with the operation. + + + + + Used for dispatching operations to a such that any + registered on will be notified before and after the + operation executes. + Instances of this class are obtained through the the fluent API. + + + This class is used internally by Entity Framework when interacting with . + It is provided publicly so that code that runs outside of the core EF assemblies can opt-in to command + interception/tracing. This is typically done by EF providers that are executing commands on behalf of EF. + + + + + Sends and + to any + registered on before/after making a + call to . + + + Note that the result of executing the command is returned by this method. The result is not available + in the interception context passed into this method since the interception context is cloned before + being passed to interceptors. + + The connection on which the operation will be executed. + Optional information about the context of the call being made. + The result of the operation, which may have been modified by interceptors. + + + + Sends and + to any + registered on before/after making a + call to . + + The connection on which the operation will be executed. + Optional information about the context of the call being made. + + + + Sends and + to any + registered on before/after making a + call to . + + The connection on which the operation will be executed. + Optional information about the context of the call being made. + + + + Sends and + to any + registered on before/after + getting . + + + Note that the value of the property is returned by this method. The result is not available + in the interception context passed into this method since the interception context is cloned before + being passed to interceptors. + + The connection on which the operation will be executed. + Optional information about the context of the call being made. + The result of the operation, which may have been modified by interceptors. + + + + Sends and + to any + registered on before/after + setting . + + The connection on which the operation will be executed. + Information about the context of the call being made, including the value to be set. + + + + Sends and + to any + registered on before/after + getting . + + + Note that the value of the property is returned by this method. The result is not available + in the interception context passed into this method since the interception context is cloned before + being passed to interceptors. + + The connection on which the operation will be executed. + Optional information about the context of the call being made. + The result of the operation, which may have been modified by interceptors. + + + + Sends and + to any + registered on before/after + getting . + + + Note that the value of the property is returned by this method. The result is not available + in the interception context passed into this method since the interception context is cloned before + being passed to interceptors. + + The connection on which the operation will be executed. + Optional information about the context of the call being made. + The result of the operation, which may have been modified by interceptors. + + + + Sends and + to any + registered on before/after + getting . + + + Note that the value of the property is returned by this method. The result is not available + in the interception context passed into this method since the interception context is cloned before + being passed to interceptors. + + The connection on which the operation will be executed. + Optional information about the context of the call being made. + The result of the operation, which may have been modified by interceptors. + + + + Sends and + to any + registered on before/after making a + call to . + + The connection on which the operation will be executed. + Optional information about the context of the call being made. + + + + Sends and + to any + registered on before/after making a + call to . + + The connection on which the operation will be executed. + Optional information about the context of the call being made. + + + + Sends and + to any + registered on before/after making a + call to . + + The connection on which the operation will be executed. + Optional information about the context of the call being made. + The cancellation token. + A task that represents the asynchronous operation. + + + + Sends and + to any + registered on before/after + getting . + + + Note that the value of the property is returned by this method. The result is not available + in the interception context passed into this method since the interception context is cloned before + being passed to interceptors. + + The connection on which the operation will be executed. + Optional information about the context of the call being made. + The result of the operation, which may have been modified by interceptors. + + + + Sends and + to any + registered on before/after + getting . + + + Note that the value of the property is returned by this method. The result is not available + in the interception context passed into this method since the interception context is cloned before + being passed to interceptors. + + The connection on which the operation will be executed. + Optional information about the context of the call being made. + The result of the operation, which may have been modified by interceptors. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Provides access to all dispatchers through the the fluent API. + + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Provides methods for dispatching to interceptors for + interception of methods on . + + + + + Provides methods for dispatching to interceptors for + interception of methods on . + + + + + Provides methods for dispatching to interceptors for + interception of methods on . + + + + + This is the registration point for interceptors. Interceptors + receive notifications when EF performs certain operations such as executing commands against + the database. For example, see . + + + + + Registers a new to receive notifications. Note that the interceptor + must implement some interface that extends from to be useful. + + The interceptor to add. + + + + Removes a registered so that it will no longer receive notifications. + If the given interceptor is not registered, then this is a no-op. + + The interceptor to remove. + + + + This is the entry point for dispatching to interceptors. This is usually only used internally by + Entity Framework but it is provided publicly so that other code can make sure that registered + interceptors are called when operations are performed on behalf of EF. For example, EF providers + a may make use of this when executing commands. + + + + + Used for dispatching operations to a such that any + registered on will be notified before and after the + operation executes. + Instances of this class are obtained through the the fluent API. + + + This class is used internally by Entity Framework when interacting with . + It is provided publicly so that code that runs outside of the core EF assemblies can opt-in to command + interception/tracing. This is typically done by EF providers that are executing commands on behalf of EF. + + + + + Sends and + to any + registered on before/after + getting . + + + Note that the value of the property is returned by this method. The result is not available + in the interception context passed into this method since the interception context is cloned before + being passed to interceptors. + + The transaction on which the operation will be executed. + Optional information about the context of the call being made. + The result of the operation, which may have been modified by interceptors. + + + + Sends and + to any + registered on before/after + getting . + + + Note that the value of the property is returned by this method. The result is not available + in the interception context passed into this method since the interception context is cloned before + being passed to interceptors. + + The transaction on which the operation will be executed. + Optional information about the context of the call being made. + The result of the operation, which may have been modified by interceptors. + + + + Sends and + to any + registered on before/after making a + call to . + + The transaction on which the operation will be executed. + Optional information about the context of the call being made. + + + + Sends and + to any + registered on before/after making a + call to . + + The transaction on which the operation will be executed. + Optional information about the context of the call being made. + + + + Sends and + to any + registered on before/after making a + call to . + + The transaction on which the operation will be executed. + Optional information about the context of the call being made. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Represents contextual information associated with calls to that don't return any results. + + + + + Constructs a new with no state. + + + + + Creates a new by copying immutable state from the given + interception context. Also see + + The context from which to copy state. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The connection on which the transaction was started. + A new interception context that also contains the connection on which the transaction was started. + + + + Creates a new that contains all the contextual information in this + interception context together with the flag set to true. + + A new interception context associated with the async flag set. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + + + + + + + + + + + + + + + + The connection on which the transaction was started + + + + + Represents contextual information associated with calls to with return type . + + The return type of the target method. + + + + Constructs a new with no state. + + + + + Creates a new by copying immutable state from the given + interception context. Also see + + The context from which to copy state. + + + + Creates a new that contains all the contextual information in this + interception context together with the flag set to true. + + A new interception context associated with the async flag set. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + + + + + + + + + + + + + + + + Represents contextual information associated with calls to + implementations. + + + Instances of this class are publicly immutable for contextual information. To add + contextual information use one of the With... or As... methods to create a new + interception context containing the new information. + + + + + Constructs a new with no state. + + + + + Creates a new by copying immutable state from the given + interception context. Also see + + The context from which to copy state. + + + + Creates a new that contains all the contextual information in this + interception context together with the flag set to true. + + A new interception context associated with the async flag set. + + + + Creates a new that contains all the contextual information in this + interception context together with the given . + + The transaction to be used in the invocation. + A new interception context associated with the given isolation level. + + + + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + Creates a new that contains all the contextual information in this + interception context with the addition of the given . + + The context to associate. + A new interception context associated with the given context. + + + + + + + + + + + + + + + + The that will be used or has been used to enlist a connection. + + + + + An object that implements this interface can be registered with to + receive notifications when Entity Framework creates command trees. + + + Interceptors can also be registered in the config file of the application. + See http://go.microsoft.com/fwlink/?LinkId=260883 for more information about Entity Framework configuration. + + + + + This method is called after a new has been created. + The tree that is used after interception can be changed by setting + while intercepting. + + + Command trees are created for both queries and insert/update/delete commands. However, query + command trees are cached by model which means that command tree creation only happens the + first time a query is executed and this notification will only happen at that time + + Contextual information associated with the call. + + + + Represents a mapping view. + + + + + Creates a instance having the specified entity SQL. + + A string that specifies the entity SQL. + + + + Gets the entity SQL. + + + + + Base abstract class for mapping view cache implementations. + Derived classes must have a parameterless constructor if used with . + + + + + Gets a view corresponding to the specified extent. + + An that specifies the extent. + A that specifies the mapping view, + or null if the extent is not associated with a mapping view. + + + + Gets a hash value computed over the mapping closure. + + + + + Specifies the means to create concrete instances. + + + + + Creates a generated view cache instance for the container mapping specified by + the names of the mapped containers. + + The name of a container in the conceptual model. + The name of a container in the store model. + + A that specifies the generated view cache. + + + + + Defines a custom attribute that specifies the mapping view cache type (subclass of ) + associated with a context type (subclass of or ). + The cache type is instantiated at runtime and used to retrieve pre-generated views in the + corresponding context. + + + + + Creates a instance that associates a context type + with a mapping view cache type. + + + A subclass of or . + + + A subclass of . + + + + + Creates a instance that associates a context type + with a mapping view cache type. + + + A subclass of or . + + The assembly qualified full name of the cache type. + + + + The base class for interceptors that handle the transaction operations. Derived classes can be registered using + or + . + + + + + Initializes a new instance of the class. + + + One of the Initialize methods needs to be called before this instance can be used. + + + + + Initializes this instance using the specified context. + + The context for which transaction operations will be handled. + + + + Initializes this instance using the specified context. + + The context for which transaction operations will be handled. + The connection to use for the initialization. + + This method is called by migrations. It is important that no action is performed on the + specified context that causes it to be initialized. + + + + + + + + Releases the resources used by this transaction handler. + + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + + Checks whether the supplied interception context contains the target context + or the supplied connection is the same as the one used by the target context. + + A connection. + An interception context. + + true if the supplied interception context contains the target context or + the supplied connection is the same as the one used by the target context if + the supplied interception context doesn't contain any contexts; false otherwise. + + + Note that calling this method will trigger initialization of any DbContext referenced from the + + + + + When implemented in a derived class returns the script to prepare the database + for this transaction handler. + + A script to change the database schema for this transaction handler. + + + + Can be implemented in a derived class. + + The connection beginning the transaction. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The connection that began the transaction. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The connection being closed. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The connection that was closed. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The connection. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The connection. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The connection. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The connection. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The connection. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The connection. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The connection. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The connection. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The connection. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The connection. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The connection being disposed. + Contextual information associated with the call. + + + + Can be implemented in a derived class. + + The connection that was disposed. + Contextual information associated with the call. + + + + Can be implemented in a derived class. + + The connection. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The connection. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The connection being opened. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The connection that was opened. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The connection. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The connection. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The connection. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The connection. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The transaction. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The transaction. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The transaction. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The transaction. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The transaction being commited. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The transaction that was commited. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The transaction being disposed. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The transaction that was disposed. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The transaction being rolled back. + Contextual information associated with the call. + + + + + Can be implemented in a derived class. + + The transaction that was rolled back. + Contextual information associated with the call. + + + + + Gets the context. + + + The for which the transaction operations will be handled. + + + + + Gets the context. + + + The for which the transaction operations will be handled, could be null. + + + + + Gets the connection. + + + The for which the transaction operations will be handled. + + + This connection object is only used to determine whether a particular operation needs to be handled + in cases where a context is not available. + + + + + Gets or sets a value indicating whether this transaction handler is disposed. + + + true if disposed; otherwise, false. + + + + + This class is used by to write and read transaction tracing information + from the database. + To customize the definition of the transaction table you can derive from + this class and override . Derived classes can be registered + using . + + + By default EF will poll the resolved to check wether the database schema is compatible and + will try to modify it accordingly if it's not. To disable this check call + Database.SetInitializer<TTransactionContext>(null) where TTransactionContext is the type of the resolved context. + + + + + A DbContext instance represents a combination of the Unit Of Work and Repository patterns such that + it can be used to query from a database and group together changes that will then be written + back to the store as a unit. + DbContext is conceptually similar to ObjectContext. + + + DbContext is usually used with a derived type that contains properties for + the root entities of the model. These sets are automatically initialized when the + instance of the derived class is created. This behavior can be modified by applying the + attribute to either the entire derived context + class, or to individual properties on the class. + The Entity Data Model backing the context can be specified in several ways. When using the Code First + approach, the properties on the derived context are used to build a model + by convention. The protected OnModelCreating method can be overridden to tweak this model. More + control over the model used for the Model First approach can be obtained by creating a + explicitly from a and passing this model to one of the DbContext constructors. + When using the Database First or Model First approach the Entity Data Model can be created using the + Entity Designer (or manually through creation of an EDMX file) and then this model can be specified using + entity connection string or an object. + The connection to the database (including the name of the database) can be specified in several ways. + If the parameterless DbContext constructor is called from a derived context, then the name of the derived context + is used to find a connection string in the app.config or web.config file. If no connection string is found, then + the name is passed to the DefaultConnectionFactory registered on the class. The connection + factory then uses the context name as the database name in a default connection string. (This default connection + string points to .\SQLEXPRESS on the local machine unless a different DefaultConnectionFactory is registered.) + Instead of using the derived context name, the connection/database name can also be specified explicitly by + passing the name to one of the DbContext constructors that takes a string. The name can also be passed in + the form "name=myname", in which case the name must be found in the config file or an exception will be thrown. + Note that the connection found in the app.config or web.config file can be a normal database connection + string (not a special Entity Framework connection string) in which case the DbContext will use Code First. + However, if the connection found in the config file is a special Entity Framework connection string, then the + DbContext will use Database/Model First and the model specified in the connection string will be used. + An existing or explicitly created DbConnection can also be used instead of the database/connection name. + A can be applied to a class derived from DbContext to set the + version of conventions used by the context when it creates a model. If no attribute is applied then the + latest version of conventions will be used. + + + + + Interface implemented by objects that can provide an instance. + The class implements this interface to provide access to the underlying + ObjectContext. + + + + + Gets the object context. + + The object context. + + + + Constructs a new context instance using conventions to create the name of the database to + which a connection will be made. The by-convention name is the full name (namespace + class name) + of the derived context class. + See the class remarks for how this is used to create a connection. + + + + + Constructs a new context instance using conventions to create the name of the database to + which a connection will be made, and initializes it from the given model. + The by-convention name is the full name (namespace + class name) of the derived context class. + See the class remarks for how this is used to create a connection. + + The model that will back this context. + + + + Constructs a new context instance using the given string as the name or connection string for the + database to which a connection will be made. + See the class remarks for how this is used to create a connection. + + Either the database name or a connection string. + + + + Constructs a new context instance using the given string as the name or connection string for the + database to which a connection will be made, and initializes it from the given model. + See the class remarks for how this is used to create a connection. + + Either the database name or a connection string. + The model that will back this context. + + + + Constructs a new context instance using the existing connection to connect to a database. + The connection will not be disposed when the context is disposed if + is false. + + An existing connection to use for the new context. + + If set to true the connection is disposed when the context is disposed, otherwise the caller must dispose the connection. + + + + + Constructs a new context instance using the existing connection to connect to a database, + and initializes it from the given model. + The connection will not be disposed when the context is disposed if + is false. + + An existing connection to use for the new context. + The model that will back this context. + + If set to true the connection is disposed when the context is disposed, otherwise the caller must dispose the connection. + + + + + Constructs a new context instance around an existing ObjectContext. + + An existing ObjectContext to wrap with the new context. + + If set to true the ObjectContext is disposed when the DbContext is disposed, otherwise the caller must dispose the connection. + + + + + This method is called when the model for a derived context has been initialized, but + before the model has been locked down and used to initialize the context. The default + implementation of this method does nothing, but it can be overridden in a derived class + such that the model can be further configured before it is locked down. + + + Typically, this method is called only once when the first instance of a derived context + is created. The model for that context is then cached and is for all further instances of + the context in the app domain. This caching can be disabled by setting the ModelCaching + property on the given ModelBuidler, but note that this can seriously degrade performance. + More control over caching is provided through use of the DbModelBuilder and DbContextFactory + classes directly. + + The builder that defines the model for the context being created. + + + + Returns a instance for access to entities of the given type in the context + and the underlying store. + + + Note that Entity Framework requires that this method return the same instance each time that it is called + for a given context instance and entity type. Also, the non-generic returned by the + method must wrap the same underlying query and set of entities. These invariants must + be maintained if this method is overridden for anything other than creating test doubles for unit testing. + See the class for more details. + + The type entity for which a set should be returned. + A set for the given entity type. + + + + Returns a non-generic instance for access to entities of the given type in the context + and the underlying store. + + The type of entity for which a set should be returned. + A set for the given entity type. + + Note that Entity Framework requires that this method return the same instance each time that it is called + for a given context instance and entity type. Also, the generic returned by the + method must wrap the same underlying query and set of entities. These invariants must + be maintained if this method is overridden for anything other than creating test doubles for unit testing. + See the class for more details. + + + + + Saves all changes made in this context to the underlying database. + + + The number of state entries written to the underlying database. This can include + state entries for entities and/or relationships. Relationship state entries are created for + many-to-many relationships and relationships where there is no foreign key property + included in the entity class (often referred to as independent associations). + + An error occurred sending updates to the database. + + A database command did not affect the expected number of rows. This usually indicates an optimistic + concurrency violation; that is, a row has been changed in the database since it was queried. + + + The save was aborted because validation of entity property values failed. + + + An attempt was made to use unsupported behavior such as executing multiple asynchronous commands concurrently + on the same context instance. + The context or connection have been disposed. + + Some error occurred attempting to process entities in the context either before or after sending commands + to the database. + + + + + Asynchronously saves all changes made in this context to the underlying database. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A task that represents the asynchronous save operation. + The task result contains the number of state entries written to the underlying database. This can include + state entries for entities and/or relationships. Relationship state entries are created for + many-to-many relationships and relationships where there is no foreign key property + included in the entity class (often referred to as independent associations). + + An error occurred sending updates to the database. + + A database command did not affect the expected number of rows. This usually indicates an optimistic + concurrency violation; that is, a row has been changed in the database since it was queried. + + + The save was aborted because validation of entity property values failed. + + + An attempt was made to use unsupported behavior such as executing multiple asynchronous commands concurrently + on the same context instance. + The context or connection have been disposed. + + Some error occurred attempting to process entities in the context either before or after sending commands + to the database. + + + + + Asynchronously saves all changes made in this context to the underlying database. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous save operation. + The task result contains the number of state entries written to the underlying database. This can include + state entries for entities and/or relationships. Relationship state entries are created for + many-to-many relationships and relationships where there is no foreign key property + included in the entity class (often referred to as independent associations). + + Thrown if the context has been disposed. + + + + Validates tracked entities and returns a Collection of containing validation results. + + Collection of validation results for invalid entities. The collection is never null and must not contain null values or results for valid entities. + + 1. This method calls DetectChanges() to determine states of the tracked entities unless + DbContextConfiguration.AutoDetectChangesEnabled is set to false. + 2. By default only Added on Modified entities are validated. The user is able to change this behavior + by overriding ShouldValidateEntity method. + + + + + Extension point allowing the user to override the default behavior of validating only + added and modified entities. + + DbEntityEntry instance that is supposed to be validated. + true to proceed with validation; false otherwise. + + + + Extension point allowing the user to customize validation of an entity or filter out validation results. + Called by . + + DbEntityEntry instance to be validated. + + User-defined dictionary containing additional info for custom validation. It will be passed to + + and will be exposed as + + . This parameter is optional and can be null. + + Entity validation result. Possibly null when overridden. + + + + Gets a object for the given entity providing access to + information about the entity and the ability to perform actions on the entity. + + The type of the entity. + The entity. + An entry for the entity. + + + + Gets a object for the given entity providing access to + information about the entity and the ability to perform actions on the entity. + + The entity. + An entry for the entity. + + + + Calls the protected Dispose method. + + + + + Disposes the context. The underlying is also disposed if it was created + is by this context or ownership was passed to this context when this context was created. + The connection to the database ( object) is also disposed if it was created + is by this context or ownership was passed to this context when this context was created. + + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + + + + + + + + + + + + + + Creates a Database instance for this context that allows for creation/deletion/existence checks + for the underlying database. + + + + + Returns the Entity Framework ObjectContext that is underlying this context. + + Thrown if the context has been disposed. + + + + Provides access to features of the context that deal with change tracking of entities. + + An object used to access features that deal with change tracking. + + + + Provides access to configuration options for the context. + + An object used to access configuration options. + + + + Initializes a new instance of the class. + + The connection used by the context for which the transactions will be recorded. + + + + + + + Gets or sets a that can be used to read and write instances. + + + + + A transaction handler that allows to gracefully recover from connection failures + during transaction commit by storing transaction tracing information in the database. + It needs to be registered by using . + + + This transaction handler uses to store the transaction information + the schema used can be configured by creating a class derived from + that overrides and passing it to the constructor of this class. + + + + + Initializes a new instance of the class using the default . + + + One of the Initialize methods needs to be called before this instance can be used. + + + + + Initializes a new instance of the class. + + The transaction context factory. + + One of the Initialize methods needs to be called before this instance can be used. + + + + + Creates a new instance of an to use for quering the transaction log. + If null the default will be used. + + An instance or null. + + + + + + + + + + + + + + + + Stores the tracking information for the new transaction to the database in the same transaction. + + The connection that began the transaction. + Contextual information associated with the call. + + + + + If there was an exception thrown checks the database for this transaction and rethrows it if not found. + Otherwise marks the commit as succeeded and queues the transaction information to be deleted. + + The transaction that was commited. + Contextual information associated with the call. + + + + + Stops tracking the transaction that was rolled back. + + The transaction that was rolled back. + Contextual information associated with the call. + + + + + Stops tracking the transaction that was disposed. + + The transaction that was disposed. + Contextual information associated with the call. + + + + + Removes all the transaction history. + + + This method should only be invoked when there are no active transactions to remove any leftover history + that was not deleted due to catastrophic failures + + + + + Asynchronously removes all the transaction history. + + + This method should only be invoked when there are no active transactions to remove any leftover history + that was not deleted due to catastrophic failures + + A task that represents the asynchronous operation. + + + + Asynchronously removes all the transaction history. + + + This method should only be invoked when there are no active transactions to remove any leftover history + that was not deleted due to catastrophic failures + + The cancellation token. + A task that represents the asynchronous operation. + + + + Adds the specified transaction to the list of transactions that can be removed from the database + + The transaction to be removed from the database. + + + + Removes the transactions marked for deletion. + + + + + Asynchronously removes the transactions marked for deletion. + + A task that represents the asynchronous operation. + + + + Asynchronously removes the transactions marked for deletion. + + The cancellation token. + A task that represents the asynchronous operation. + + + + Removes the transactions marked for deletion if their number exceeds . + + + if set to true will remove all the old transactions even if their number does not exceed . + + + if set to true the operation will be executed using the associated execution strategy + + + + + Removes the transactions marked for deletion if their number exceeds . + + + if set to true will remove all the old transactions even if their number does not exceed . + + + if set to true the operation will be executed using the associated execution strategy + + The cancellation token. + A task that represents the asynchronous operation. + + + + Gets the associated with the if there is one; + otherwise returns null. + + The context + The associated . + + + + Gets the associated with the if there is one; + otherwise returns null. + + The context + The associated . + + + + Gets the transaction context. + + + The transaction context. + + + + + The map between the store transactions and the transaction tracking objects + + + + + Gets the number of transactions to be executed on the context before the transaction log will be cleaned. + The default value is 20. + + + + + An implementation of this interface is used to initialize the underlying database when + an instance of a derived class is used for the first time. + This initialization can conditionally create the database and/or seed it with data. + The strategy used is set using the static InitializationStrategy property of the + class. + The following implementations are provided: , + , . + + The type of the context. + + + + Executes the strategy to initialize the database for the given context. + + The context. + + + + Rrepresents a transaction + + + + + + + + + + + A unique id assigned to a transaction object. + + + + + The local time when the transaction was started. + + + + + Helper class that is used to configure a parameter. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Creates a new parameter definition to pass Binary data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The maximum allowable length of the array data. + Value indicating whether or not all data should be padded to the maximum length. + Constant value to use as the default value for this parameter. + SQL expression used as the default value for this parameter. + The name of the parameter. + Provider specific data type to use for this parameter. + A value indicating whether the parameter is an output parameter. + The newly constructed parameter definition. + + + + Creates a new parameter definition to pass Boolean data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Constant value to use as the default value for this parameter. + SQL expression used as the default value for this parameter. + The name of the parameter. + Provider specific data type to use for this parameter. + A value indicating whether the parameter is an output parameter. + The newly constructed parameter definition. + + + + Creates a new parameter definition to pass Byte data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Constant value to use as the default value for this parameter. + SQL expression used as the default value for this parameter. + The name of the parameter. + Provider specific data type to use for this parameter. + A value indicating whether the parameter is an output parameter. + The newly constructed parameter definition. + + + + Creates a new parameter definition to pass DateTime data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The precision of the parameter. + Constant value to use as the default value for this parameter. + SQL expression used as the default value for this parameter. + The name of the parameter. + Provider specific data type to use for this parameter. + A value indicating whether the parameter is an output parameter. + The newly constructed parameter definition. + + + + Creates a new parameter definition to pass Decimal data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The numeric precision of the parameter. + The numeric scale of the parameter. + Constant value to use as the default value for this parameter. + SQL expression used as the default value for this parameter. + The name of the parameter. + Provider specific data type to use for this parameter. + A value indicating whether the parameter is an output parameter. + The newly constructed parameter definition. + + + + Creates a new parameter definition to pass Double data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Constant value to use as the default value for this parameter. + SQL expression used as the default value for this parameter. + The name of the parameter. + Provider specific data type to use for this parameter. + A value indicating whether the parameter is an output parameter. + The newly constructed parameter definition. + + + + Creates a new parameter definition to pass GUID data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Constant value to use as the default value for this parameter. + SQL expression used as the default value for this parameter. + The name of the parameter. + Provider specific data type to use for this parameter. + A value indicating whether the parameter is an output parameter. + The newly constructed parameter definition. + + + + Creates a new parameter definition to pass Single data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Constant value to use as the default value for this parameter. + SQL expression used as the default value for this parameter. + The name of the parameter. + Provider specific data type to use for this parameter. + A value indicating whether the parameter is an output parameter. + The newly constructed parameter definition. + + + + Creates a new parameter definition to pass Short data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Constant value to use as the default value for this parameter. + SQL expression used as the default value for this parameter. + The name of the parameter. + Provider specific data type to use for this parameter. + A value indicating whether the parameter is an output parameter. + The newly constructed parameter definition. + + + + Creates a new parameter definition to pass Integer data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Constant value to use as the default value for this parameter. + SQL expression used as the default value for this parameter. + The name of the parameter. + Provider specific data type to use for this parameter. + A value indicating whether the parameter is an output parameter. + The newly constructed parameter definition. + + + + Creates a new parameter definition to pass Long data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Constant value to use as the default value for this parameter. + SQL expression used as the default value for this parameter. + The name of the parameter. + Provider specific data type to use for this parameter. + A value indicating whether the parameter is an output parameter. + The newly constructed parameter definition. + + + + Creates a new parameter definition to pass String data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The maximum allowable length of the string data. + Value indicating whether or not all data should be padded to the maximum length. + Value indicating whether or not the parameter supports Unicode content. + Constant value to use as the default value for this parameter. + SQL expression used as the default value for this parameter. + The name of the parameter. + Provider specific data type to use for this parameter. + A value indicating whether the parameter is an output parameter. + The newly constructed parameter definition. + + + + Creates a new parameter definition to pass Time data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The precision of the parameter. + Constant value to use as the default value for this parameter. + SQL expression used as the default value for this parameter. + The name of the parameter. + Provider specific data type to use for this parameter. + A value indicating whether the parameter is an output parameter. + The newly constructed parameter definition. + + + + Creates a new parameter definition to pass DateTimeOffset data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The precision of the parameter. + Constant value to use as the default value for this parameter. + SQL expression used as the default value for this parameter. + The name of the parameter. + Provider specific data type to use for this parameter. + A value indicating whether the parameter is an output parameter. + The newly constructed parameter definition. + + + + Creates a new parameter definition to pass geography data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Constant value to use as the default value for this parameter. + SQL expression used as the default value for this parameter. + The name of the parameter. + Provider specific data type to use for this parameter. + A value indicating whether the parameter is an output parameter. + The newly constructed parameter definition. + + + + Creates a new parameter definition to pass geometry data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Constant value to use as the default value for this parameter. + SQL expression used as the default value for this parameter. + The name of the parameter. + Provider specific data type to use for this parameter. + A value indicating whether the parameter is an output parameter. + The newly constructed parameter definition. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Creates a shallow copy of the current . + + A shallow copy of the current . + + + + Represents altering an existing stored procedure. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + A migration operation that affects stored procedures. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Represents an operation to modify a database schema. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the MigrationOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" + }'. + + + + + Gets additional arguments that may be processed by providers. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Gets an operation that will revert this operation. + + + + + Gets a value indicating if this operation may result in data loss. + + + + + Initializes a new instance of the class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The name of the stored procedure. + The body of the stored procedure expressed in SQL. + Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets the name of the stored procedure. + + + The name of the stored procedure. + + + + + Gets the body of the stored procedure expressed in SQL. + + + The body of the stored procedure expressed in SQL. + + + + + Gets the parameters of the stored procedure. + + + The parameters of the stored procedure. + + + + + Gets a value indicating if this operation may result in data loss. Always returns false. + + + + + Initializes a new instance of the class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The name of the stored procedure. + The body of the stored procedure expressed in SQL. + Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets an operation that will revert this operation. + Always returns a . + + + + + Represents changes made to custom annotations on a table. + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the AlterTableOperation class. + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Name of the table on which annotations have changed. + The custom annotations on the table that have changed. + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Gets the name of the table on which annotations have changed. + + + + + Gets the columns to be included in the table for which annotations have changed. + + + + + Gets the custom annotations that have changed on the table. + + + + + Gets an operation that is the inverse of this one such that annotations will be changed back to how + they were before this operation was applied. + + + + + + + + Represents renaming an existing index. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the RenameIndexOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Name of the table the index belongs to. + Name of the index to be renamed. + New name for the index. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets the name of the table the index belongs to. + + + + + Gets the name of the index to be renamed. + + + + + Gets the new name for the index. + + + + + Gets an operation that reverts the rename. + + + + + + + + Used when scripting an update database operation to store the operations that would have been performed against the database. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The queries used to determine if this migration needs to be applied to the database. + This is used to generate an idempotent SQL script that can be run against a database at any version. + + + + + Adds a migration to this update database operation. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The id of the migration. + The individual operations applied by the migration. + + + + The queries used to determine if this migration needs to be applied to the database. + This is used to generate an idempotent SQL script that can be run against a database at any version. + + + + + Gets the migrations applied during the update database operation. + + + The migrations applied during the update database operation. + + + + + Gets a value indicating if any of the operations may result in data loss. + + + + + Represents a migration to be applied to the database. + + + + + Gets the id of the migration. + + + The id of the migration. + + + + + Gets the individual operations applied by this migration. + + + The individual operations applied by this migration. + + + + + Represents moving a stored procedure to a new schema in the database. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The name of the stored procedure to move. + The new schema for the stored procedure. + Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets the name of the stored procedure to move. + + + The name of the stored procedure to move. + + + + + Gets the new schema for the stored procedure. + + + The new schema for the stored procedure. + + + + + Gets an operation that will revert this operation. + + + + + Gets a value indicating if this operation may result in data loss. Always returns false. + + + + + Represents renaming a stored procedure in the database. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The name of the stored procedure to rename. + The new name for the stored procedure. + Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets the name of the stored procedure to rename. + + + The name of the stored procedure to rename. + + + + + Gets the new name for the stored procedure. + + + The new name for the stored procedure. + + + + + Gets an operation that will revert this operation. + + + + + Gets a value indicating if this operation may result in data loss. Always returns false. + + + + + Represents a migration operation that can not be performed, possibly because it is not supported by the targeted database provider. + + + + + Gets a value indicating if this operation may result in data loss. Always returns false. + + + + + Represents information about a parameter. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Represents information about a property of an entity. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the PropertyModel class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The data type for this property model. + Additional details about the data type. This includes details such as maximum length, nullability etc. + + + + Gets the data type for this property model. + + + + + Gets additional details about the data type of this property model. + This includes details such as maximum length, nullability etc. + + + + + Gets or sets the name of the property model. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Gets or sets a provider specific data type to use for this property model. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Gets or sets the maximum length for this property model. + Only valid for array data types. + + + + + Gets or sets the precision for this property model. + Only valid for decimal data types. + + + + + Gets or sets the scale for this property model. + Only valid for decimal data types. + + + + + Gets or sets a constant value to use as the default value for this property model. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Gets or sets a SQL expression used as the default value for this property model. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Gets or sets a value indicating if this property model is fixed length. + Only valid for array data types. + + + + + Gets or sets a value indicating if this property model supports Unicode characters. + Only valid for textual data types. + + + + + Initializes a new instance of the ParameterModel class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The data type for this parameter. + + + + Initializes a new instance of the ParameterModel class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The data type for this parameter. + Additional details about the data type. This includes details such as maximum length, nullability etc. + + + + Gets or sets a value indicating whether this instance is out parameter. + + + true if this instance is out parameter; otherwise, false. + + + + + Drops a stored procedure from the database. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The name of the stored procedure to drop. + Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets the name of the stored procedure to drop. + + + The name of the stored procedure to drop. + + + + + Gets an operation that will revert this operation. + Always returns a . + + + + + Gets a value indicating if this operation may result in data loss. Always returns false. + + + + + Configures an index. + + + + + Configures the index to be unique. + + The same IndexConfiguration instance so that multiple calls can be chained. + + + + Configures whether the index will be unique. + + Value indicating if the index should be unique or not. + The same IndexConfiguration instance so that multiple calls can be chained. + + + + Configures the index to be clustered. + + The same IndexConfigurationBase instance so that multiple calls can be chained. + + + + Configures whether or not the index will be clustered. + + Value indicating if the index should be clustered or not. + The same IndexConfigurationBase instance so that multiple calls can be chained. + + + + Configures the index to have a specific name. + + Value indicating what the index name should be. + The same IndexConfigurationBase instance so that multiple calls can be chained. + + + + Configures a primary key index. + + + + + Configures the index to be clustered. + + The same IndexConfigurationBase instance so that multiple calls can be chained. + + + + Configures whether or not the index will be clustered. + + Value indicating if the index should be clustered or not. + The same IndexConfigurationBase instance so that multiple calls can be chained. + + + + Configures the index to have a specific name. + + Value indicating what the index name should be. + The same IndexConfigurationBase instance so that multiple calls can be chained. + + + + Allows configuration to be performed for a lightweight convention based on + the entity types in a model. + + + + + Filters the entity types that this convention applies to based on a + predicate. + + A function to test each entity type for a condition. + + An instance so that multiple calls can be chained. + + + + + Filters the entity types that this convention applies to based on a predicate + while capturing a value to use later during configuration. + + Type of the captured value. + + A function to capture a value for each entity type. If the value is null, the + entity type will be filtered out. + + + An instance so that multiple calls can be chained. + + + + + Allows configuration of the entity types that this convention applies to. + + + An action that performs configuration against a + + . + + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Allows configuration to be performed for a lightweight convention based on + the entity types in a model that inherit from a common, specified type. + + The common type of the entity types that this convention applies to. + + + + Filters the entity types that this convention applies to based on a + predicate. + + A function to test each entity type for a condition. + + An instance so that multiple calls can be chained. + + + + + Filters the entity types that this convention applies to based on a predicate + while capturing a value to use later during configuration. + + Type of the captured value. + + A function to capture a value for each entity type. If the value is null, the + entity type will be filtered out. + + + An instance so that multiple calls can be chained. + + + + + Allows configuration of the entity types that this convention applies to. + + + An action that performs configuration against a + + . + + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Allows configuration to be performed for a lightweight convention based on + the entity types in a model that inherit from a common, specified type and a + captured value. + + The common type of the entity types that this convention applies to. + Type of the captured value. + + + + Allows configuration of the entity types that this convention applies to. + + + An action that performs configuration against a + using a captured value. + + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Allows configuration to be performed for a lightweight convention based on + the entity types in a model and a captured value. + + Type of the captured value. + + + + Allows configuration of the entity types that this convention applies to. + + + An action that performs configuration against a + using a captured value. + + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Allows configuration to be performed for an entity type in a model. + This configuration functionality is available via lightweight conventions. + + + + + Configures the entity set name to be used for this entity type. + The entity set name can only be configured for the base type in each set. + + The name of the entity set. + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + + + + + Excludes this entity type from the model so that it will not be mapped to the database. + + + The same instance so that multiple calls can be chained. + + + + + Changes this entity type to a complex type. + + + The same instance so that multiple calls can be chained. + + + + + Excludes a property from the model so that it will not be mapped to the database. + + The name of the property to be configured. + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect if the property does not exist. + + + + + Excludes a property from the model so that it will not be mapped to the database. + + The property to be configured. + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect if the property does not exist. + + + + + Configures a property that is defined on this type. + + The name of the property being configured. + A configuration object that can be used to configure the property. + + + + Configures a property that is defined on this type. + + The property being configured. + A configuration object that can be used to configure the property. + + + + Configures the primary key property for this entity type. + + The name of the property to be used as the primary key. + + The same instance so that multiple calls can be chained. + + + + + Configures the primary key property for this entity type. + + The property to be used as the primary key. + + The same instance so that multiple calls can be chained. + + + + + Configures the primary key property(s) for this entity type. + + The names of the properties to be used as the primary key. + + The same instance so that multiple calls can be chained. + + + + + Configures the primary key property(s) for this entity type. + + The properties to be used as the primary key. + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured or if any + property does not exist. + + + + + Configures the table name that this entity type is mapped to. + + The name of the table. + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + + + + + Configures the table name that this entity type is mapped to. + + The name of the table. + The database schema of the table. + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + + + + + Sets an annotation in the model for the table to which this entity is mapped. The annotation + value can later be used when processing the table such as when creating migrations. + + + It will likely be necessary to register a if the type of + the annotation value is anything other than a string. Calling this method will have no effect if the + annotation with the given name has already been configured. + + The annotation name, which must be a valid C#/EDM identifier. + The annotation value, which may be a string or some other type that + can be serialized with an . + The same configuration instance so that multiple calls can be chained. + + + + Configures this type to use stored procedures for insert, update and delete. + The default conventions for procedure and parameter names will be used. + + The same configuration instance so that multiple calls can be chained. + + + + Configures this type to use stored procedures for insert, update and delete. + + + Configuration to override the default conventions for procedure and parameter names. + + The same configuration instance so that multiple calls can be chained. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Gets the of this entity type. + + + + + Allows configuration to be performed for an entity type in a model. + This configuration functionality is available via lightweight conventions. + + A type inherited by the entity type. + + + + Configures the entity set name to be used for this entity type. + The entity set name can only be configured for the base type in each set. + + The name of the entity set. + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + + + + + Excludes this entity type from the model so that it will not be mapped to the database. + + + The same instance so that multiple calls can be chained. + + + + + Changes this entity type to a complex type. + + + The same instance so that multiple calls can be chained. + + + + + Excludes a property from the model so that it will not be mapped to the database. + + The type of the property to be ignored. + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + + The same instance so that multiple calls can be chained. + + + + + Configures a property that is defined on this type. + + The type of the property being configured. + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures the primary key property(s) for this entity type. + + The type of the key. + A lambda expression representing the property to be used as the primary key. C#: t => t.Id VB.Net: Function(t) t.Id If the primary key is made up of multiple properties then specify an anonymous type including the properties. C#: t => new { t.Id1, t.Id2 } VB.Net: Function(t) New With { t.Id1, t.Id2 } + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + + + + + Configures the table name that this entity type is mapped to. + + The name of the table. + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + + + + + Configures the table name that this entity type is mapped to. + + The name of the table. + The database schema of the table. + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + + + + + Sets an annotation in the model for the table to which this entity is mapped. The annotation + value can later be used when processing the table such as when creating migrations. + + + It will likely be necessary to register a if the type of + the annotation value is anything other than a string. Calling this method will have no effect if the + annotation with the given name has already been configured. + + The annotation name, which must be a valid C#/EDM identifier. + The annotation value, which may be a string or some other type that + can be serialized with an . + The same configuration instance so that multiple calls can be chained. + + + + Configures this type to use stored procedures for insert, update and delete. + The default conventions for procedure and parameter names will be used. + + The same configuration instance so that multiple calls can be chained. + + + + Configures this type to use stored procedures for insert, update and delete. + + + Configuration to override the default conventions for procedure and parameter names. + + The same configuration instance so that multiple calls can be chained. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Gets the of this entity type. + + + + + Identifies conventions that can be added to or removed from a instance. + + + Note that implementations of this interface must be immutable. + + + + + A general purpose class for Code First conventions that read attributes from .NET properties + and generate column annotations based on those attributes. + + The type of attribute to discover. + The type of annotation that will be created. + + + + A convention that doesn't override configuration. + + + + + The derived class can use the default constructor to apply a set rule of that change the model configuration. + + + + + Begins configuration of a lightweight convention that applies to all mapped types in + the model. + + A configuration object for the convention. + + + + Begins configuration of a lightweight convention that applies to all mapped types in + the model that derive from or implement the specified type. + + The type of the entities that this convention will apply to. + A configuration object for the convention. + This method does not add new types to the model. + + + + Begins configuration of a lightweight convention that applies to all properties + in the model. + + A configuration object for the convention. + + + + Begins configuration of a lightweight convention that applies to all primitive + properties of the specified type in the model. + + The type of the properties that the convention will apply to. + A configuration object for the convention. + + The convention will apply to both nullable and non-nullable properties of the + specified type. + + + + + Constructs a convention that will create column annotations with the given name and + using the given factory delegate. + + The name of the annotations to create. + A factory for creating the annotation on each column. + + + + A general purpose class for Code First conventions that read attributes from .NET types + and generate table annotations based on those attributes. + + The type of attribute to discover. + The type of annotation that will be created. + + + + Constructs a convention that will create table annotations with the given name and + using the given factory delegate. + + The name of the annotations to create. + A factory for creating the annotation on each table. + + + + A convention for discovering attributes on properties and generating + column annotations in the model. + + + + + Constructs a new instance of the convention. + + + + + Base class for conventions that process CLR attributes found on primitive properties in the model. + + The type of the attribute to look for. + + + + Initializes a new instance of the class. + + + + + Applies this convention to a property that has an attribute of type TAttribute applied. + + The configuration for the property that has the attribute. + The attribute. + + + + Base class for conventions that process CLR attributes found on properties of types in the model. + + + Note that the derived convention will be applied for any non-static property on the mapped type that has + the specified attribute, even if it wasn't included in the model. + + The type of the attribute to look for. + + + + Initializes a new instance of the class. + + + + + Applies this convention to a property that has an attribute of type TAttribute applied. + + The member info for the property that has the attribute. + The configuration for the class that contains the property. + The attribute. + + + + Base class for conventions that process CLR attributes found in the model. + + The type of the attribute to look for. + + + + Initializes a new instance of the class. + + + + + Applies this convention to a class that has an attribute of type TAttribute applied. + + The configuration for the class that contains the property. + The attribute. + + + + Used to configure a property in a mapping fragment. + This configuration functionality is available via the Code First Fluent API, see . + + + + + Configures the name of the database column used to store the property, in a mapping fragment. + + The name of the column. + The same PropertyMappingConfiguration instance so that multiple calls can be chained. + + + + Sets an annotation in the model for the database column used to store the property. The annotation + value can later be used when processing the column such as when creating migrations. + + + It will likely be necessary to register a if the type of + the annotation value is anything other than a string. Passing a null value clears any annotation with + the given name on the column that had been previously set. + + The annotation name, which must be a valid C#/EDM identifier. + The annotation value, which may be a string or some other type that + can be serialized with an . + The same PropertyMappingConfiguration instance so that multiple calls can be chained. + + + + Convention to introduce indexes for foreign keys. + + + + + A convention that operates on the database section of the model after the model is created. + + The type of metadata item that this convention operates on. + + + + Applies this convention to an item in the model. + + The item to apply the convention to. + The model. + + + + + + + A convention that operates on the conceptual section of the model after the model is created. + + The type of metadata item that this convention operates on. + + + + Applies this convention to an item in the model. + + The item to apply the convention to. + The model. + + + + Useful extension methods for use with Entity Framework LINQ queries. + + + + + Specifies the related objects to include in the query results. + + + This extension method calls the Include(String) method of the source object, + if such a method exists. If the source does not have a matching method, + then this method does nothing. The , , + and types all have an appropriate Include method to call. + Paths are all-inclusive. For example, if an include call indicates Include("Orders.OrderLines"), not only will + OrderLines be included, but also Orders. When you call the Include method, the query path is only valid on + the returned instance of the . Other instances of + and the object context itself are not affected. Because the Include method returns the query object, + you can call this method multiple times on an to specify multiple paths for the query. + + The type of entity being queried. + + The source on which to call Include. + + The dot-separated list of related objects to return in the query results. + + A new with the defined query path. + + + + + Specifies the related objects to include in the query results. + + + This extension method calls the Include(String) method of the source object, + if such a method exists. If the source does not have a matching method, + then this method does nothing. The , , + and types all have an appropriate Include method to call. + Paths are all-inclusive. For example, if an include call indicates Include("Orders.OrderLines"), not only will + OrderLines be included, but also Orders. When you call the Include method, the query path is only valid on + the returned instance of the . Other instances of + and the object context itself are not affected. Because the Include method returns the query object, + you can call this method multiple times on an to specify multiple paths for the query. + + + The source on which to call Include. + + The dot-separated list of related objects to return in the query results. + + A new with the defined query path. + + + + + Specifies the related objects to include in the query results. + + + The path expression must be composed of simple property access expressions together with calls to Select for + composing additional includes after including a collection proprty. Examples of possible include paths are: + To include a single reference: query.Include(e => e.Level1Reference) + To include a single collection: query.Include(e => e.Level1Collection) + To include a reference and then a reference one level down: query.Include(e => e.Level1Reference.Level2Reference) + To include a reference and then a collection one level down: query.Include(e => e.Level1Reference.Level2Collection) + To include a collection and then a reference one level down: query.Include(e => e.Level1Collection.Select(l1 => l1.Level2Reference)) + To include a collection and then a collection one level down: query.Include(e => e.Level1Collection.Select(l1 => l1.Level2Collection)) + To include a collection and then a reference one level down: query.Include(e => e.Level1Collection.Select(l1 => l1.Level2Reference)) + To include a collection and then a collection one level down: query.Include(e => e.Level1Collection.Select(l1 => l1.Level2Collection)) + To include a collection, a reference, and a reference two levels down: query.Include(e => e.Level1Collection.Select(l1 => l1.Level2Reference.Level3Reference)) + To include a collection, a collection, and a reference two levels down: query.Include(e => e.Level1Collection.Select(l1 => l1.Level2Collection.Select(l2 => l2.Level3Reference))) + This extension method calls the Include(String) method of the source IQueryable object, if such a method exists. + If the source IQueryable does not have a matching method, then this method does nothing. + The Entity Framework ObjectQuery, ObjectSet, DbQuery, and DbSet types all have an appropriate Include method to call. + When you call the Include method, the query path is only valid on the returned instance of the IQueryable<T>. Other + instances of IQueryable<T> and the object context itself are not affected. Because the Include method returns the + query object, you can call this method multiple times on an IQueryable<T> to specify multiple paths for the query. + + The type of entity being queried. + The type of navigation property being included. + The source IQueryable on which to call Include. + A lambda expression representing the path to include. + + A new IQueryable<T> with the defined query path. + + + + + Returns a new query where the entities returned will not be cached in the + or . This method works by calling the AsNoTracking method of the + underlying query object. If the underlying query object does not have an AsNoTracking method, + then calling this method will have no affect. + + The element type. + The source query. + A new query with NoTracking applied, or the source query if NoTracking is not supported. + + + + Returns a new query where the entities returned will not be cached in the + or . This method works by calling the AsNoTracking method of the + underlying query object. If the underlying query object does not have an AsNoTracking method, + then calling this method will have no affect. + + The source query. + A new query with NoTracking applied, or the source query if NoTracking is not supported. + + + + Returns a new query that will stream the results instead of buffering. This method works by calling + the AsStreaming method of the underlying query object. If the underlying query object does not have + an AsStreaming method, then calling this method will have no affect. + + + The type of the elements of . + + + An to apply AsStreaming to. + + A new query with AsStreaming applied, or the source query if AsStreaming is not supported. + + + + Returns a new query that will stream the results instead of buffering. This method works by calling + the AsStreaming method of the underlying query object. If the underlying query object does not have + an AsStreaming method, then calling this method will have no affect. + + + An to apply AsStreaming to. + + A new query with AsStreaming applied, or the source query if AsStreaming is not supported. + + + + Enumerates the query such that for server queries such as those of , + + , + , and others the results of the query will be loaded into the associated + + , + or other cache on the client. + This is equivalent to calling ToList and then throwing away the list without the overhead of actually creating the list. + + The source query. + + + + Asynchronously enumerates the query such that for server queries such as those of , + + , + , and others the results of the query will be loaded into the associated + + , + or other cache on the client. + This is equivalent to calling ToList and then throwing away the list without the overhead of actually creating the list. + + The source query. + + A task that represents the asynchronous operation. + + + + + Asynchronously enumerates the query such that for server queries such as those of , + + , + , and others the results of the query will be loaded into the associated + + , + or other cache on the client. + This is equivalent to calling ToList and then throwing away the list without the overhead of actually creating the list. + + The source query. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + + + + + Asynchronously enumerates the query results and performs the specified action on each element. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + An to enumerate. + + The action to perform on each element. + A task that represents the asynchronous operation. + + + + Asynchronously enumerates the query results and performs the specified action on each element. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + An to enumerate. + + The action to perform on each element. + + A to observe while waiting for the task to complete. + + A task that represents the asynchronous operation. + + + + Asynchronously enumerates the query results and performs the specified action on each element. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to enumerate. + + The action to perform on each element. + A task that represents the asynchronous operation. + + + + Asynchronously enumerates the query results and performs the specified action on each element. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to enumerate. + + The action to perform on each element. + + A to observe while waiting for the task to complete. + + A task that represents the asynchronous operation. + + + + Creates a from an by enumerating it asynchronously. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + An to create a from. + + + A task that represents the asynchronous operation. + The task result contains a that contains elements from the input sequence. + + + + + Creates a from an by enumerating it asynchronously. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + An to create a from. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains a that contains elements from the input sequence. + + + + + Creates a from an by enumerating it asynchronously. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to create a from. + + + A task that represents the asynchronous operation. + The task result contains a that contains elements from the input sequence. + + + + + Creates a from an by enumerating it asynchronously. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to create a list from. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains a that contains elements from the input sequence. + + + + + Creates an array from an by enumerating it asynchronously. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to create an array from. + + + A task that represents the asynchronous operation. + The task result contains an array that contains elements from the input sequence. + + + + + Creates an array from an by enumerating it asynchronously. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to create an array from. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains an array that contains elements from the input sequence. + + + + + Creates a from an by enumerating it asynchronously + according to a specified key selector function. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + The type of the key returned by . + + + An to create a from. + + A function to extract a key from each element. + + A task that represents the asynchronous operation. + The task result contains a that contains selected keys and values. + + + + + Creates a from an by enumerating it asynchronously + according to a specified key selector function. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + The type of the key returned by . + + + An to create a from. + + A function to extract a key from each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains a that contains selected keys and values. + + + + + Creates a from an by enumerating it asynchronously + according to a specified key selector function and a comparer. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + The type of the key returned by . + + + An to create a from. + + A function to extract a key from each element. + + An to compare keys. + + + A task that represents the asynchronous operation. + The task result contains a that contains selected keys and values. + + + + + Creates a from an by enumerating it asynchronously + according to a specified key selector function and a comparer. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + The type of the key returned by . + + + An to create a from. + + A function to extract a key from each element. + + An to compare keys. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains a that contains selected keys and values. + + + + + Creates a from an by enumerating it asynchronously + according to a specified key selector and an element selector function. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + The type of the key returned by . + + + The type of the value returned by . + + + An to create a from. + + A function to extract a key from each element. + A transform function to produce a result element value from each element. + + A task that represents the asynchronous operation. + The task result contains a that contains values of type + selected from the input sequence. + + + + + Creates a from an by enumerating it asynchronously + according to a specified key selector and an element selector function. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + The type of the key returned by . + + + The type of the value returned by . + + + An to create a from. + + A function to extract a key from each element. + A transform function to produce a result element value from each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains a that contains values of type + selected from the input sequence. + + + + + Creates a from an by enumerating it asynchronously + according to a specified key selector function, a comparer, and an element selector function. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + The type of the key returned by . + + + The type of the value returned by . + + + An to create a from. + + A function to extract a key from each element. + A transform function to produce a result element value from each element. + + An to compare keys. + + + A task that represents the asynchronous operation. + The task result contains a that contains values of type + selected from the input sequence. + + + + + Creates a from an by enumerating it asynchronously + according to a specified key selector function, a comparer, and an element selector function. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + The type of the key returned by . + + + The type of the value returned by . + + + An to create a from. + + A function to extract a key from each element. + A transform function to produce a result element value from each element. + + An to compare keys. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains a that contains values of type + selected from the input sequence. + + + + + Asynchronously returns the first element of a sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to return the first element of. + + + A task that represents the asynchronous operation. + The task result contains the first element in . + + + is null. + + + doesn't implement . + + The source sequence is empty. + + + + Asynchronously returns the first element of a sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to return the first element of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the first element in . + + + + is + null + . + + + + doesn't implement + + . + + The source sequence is empty. + + + + Asynchronously returns the first element of a sequence that satisfies a specified condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to return the first element of. + + A function to test each element for a condition. + + A task that represents the asynchronous operation. + The task result contains the first element in that passes the test in + . + + + + or + + is + null + . + + + + doesn't implement + + . + + + No element satisfies the condition in + + . + + + + + Asynchronously returns the first element of a sequence that satisfies a specified condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to return the first element of. + + A function to test each element for a condition. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the first element in that passes the test in + . + + + + or + + is + null + . + + + + doesn't implement + + . + + + No element satisfies the condition in + + . + + + + + Asynchronously returns the first element of a sequence, or a default value if the sequence contains no elements. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to return the first element of. + + + A task that represents the asynchronous operation. + The task result contains default ( ) if + is empty; otherwise, the first element in . + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously returns the first element of a sequence, or a default value if the sequence contains no elements. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to return the first element of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains default ( ) if + is empty; otherwise, the first element in . + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously returns the first element of a sequence that satisfies a specified condition + or a default value if no such element is found. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to return the first element of. + + A function to test each element for a condition. + + A task that represents the asynchronous operation. + The task result contains default ( ) if + is empty or if no element passes the test specified by ; otherwise, the first + element in that passes the test specified by . + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously returns the first element of a sequence that satisfies a specified condition + or a default value if no such element is found. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to return the first element of. + + A function to test each element for a condition. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains default ( ) if + is empty or if no element passes the test specified by ; otherwise, the first + element in that passes the test specified by . + + + + or + + is + null + . + + + + doesn't implement + + . + + + + has more than one element. + + + + + Asynchronously returns the only element of a sequence, and throws an exception + if there is not exactly one element in the sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to return the single element of. + + + A task that represents the asynchronous operation. + The task result contains the single element of the input sequence. + + + + is + null + . + + + + doesn't implement + + . + + The source sequence is empty. + + + + Asynchronously returns the only element of a sequence, and throws an exception + if there is not exactly one element in the sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to return the single element of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the single element of the input sequence. + + + + is + null + . + + + + doesn't implement + + . + + + + has more than one element. + + The source sequence is empty. + + + + Asynchronously returns the only element of a sequence that satisfies a specified condition, + and throws an exception if more than one such element exists. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to return the the single element of. + + A function to test an element for a condition. + + A task that represents the asynchronous operation. + The task result contains the single element of the input sequence that satisfies the condition in + . + + + + or + + is + null + . + + + + doesn't implement + + . + + + No element satisfies the condition in + + . + + + More than one element satisfies the condition in + + . + + + + + Asynchronously returns the only element of a sequence that satisfies a specified condition, + and throws an exception if more than one such element exists. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to return the single element of. + + A function to test an element for a condition. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the single element of the input sequence that satisfies the condition in + . + + + + or + + is + null + . + + + + doesn't implement + + . + + + No element satisfies the condition in + + . + + + More than one element satisfies the condition in + + . + + + + + Asynchronously returns the only element of a sequence, or a default value if the sequence is empty; + this method throws an exception if there is more than one element in the sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to return the single element of. + + + A task that represents the asynchronous operation. + The task result contains the single element of the input sequence, or default () + if the sequence contains no elements. + + + + is + null + . + + + + doesn't implement + + . + + + + has more than one element. + + + + + Asynchronously returns the only element of a sequence, or a default value if the sequence is empty; + this method throws an exception if there is more than one element in the sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to return the single element of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the single element of the input sequence, or default () + if the sequence contains no elements. + + + + is + null + . + + + + doesn't implement + + . + + + + has more than one element. + + + + + Asynchronously returns the only element of a sequence that satisfies a specified condition or + a default value if no such element exists; this method throws an exception if more than one element + satisfies the condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to return the single element of. + + A function to test an element for a condition. + + A task that represents the asynchronous operation. + The task result contains the single element of the input sequence that satisfies the condition in + , or default ( ) if no such element is found. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously returns the only element of a sequence that satisfies a specified condition or + a default value if no such element exists; this method throws an exception if more than one element + satisfies the condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to return the single element of. + + A function to test an element for a condition. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the single element of the input sequence that satisfies the condition in + , or default ( ) if no such element is found. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously determines whether a sequence contains a specified element by using the default equality comparer. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to return the single element of. + + The object to locate in the sequence. + + A task that represents the asynchronous operation. + The task result contains true if the input sequence contains the specified value; otherwise, false. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously determines whether a sequence contains a specified element by using the default equality comparer. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to return the single element of. + + The object to locate in the sequence. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains true if the input sequence contains the specified value; otherwise, false. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously determines whether a sequence contains any elements. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to check for being empty. + + + A task that represents the asynchronous operation. + The task result contains true if the source sequence contains any elements; otherwise, false. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously determines whether a sequence contains any elements. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An to check for being empty. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains true if the source sequence contains any elements; otherwise, false. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously determines whether any element of a sequence satisfies a condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An whose elements to test for a condition. + + A function to test each element for a condition. + + A task that represents the asynchronous operation. + The task result contains true if any elements in the source sequence pass the test in the specified predicate; otherwise, false. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously determines whether any element of a sequence satisfies a condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An whose elements to test for a condition. + + A function to test each element for a condition. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains true if any elements in the source sequence pass the test in the specified predicate; otherwise, false. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously determines whether all the elements of a sequence satisfy a condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An whose elements to test for a condition. + + A function to test each element for a condition. + + A task that represents the asynchronous operation. + The task result contains true if every element of the source sequence passes the test in the specified predicate; otherwise, false. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously determines whether all the elements of a sequence satisfy a condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An whose elements to test for a condition. + + A function to test each element for a condition. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains true if every element of the source sequence passes the test in the specified predicate; otherwise, false. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously returns the number of elements in a sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An that contains the elements to be counted. + + + A task that represents the asynchronous operation. + The task result contains the number of elements in the input sequence. + + + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously returns the number of elements in a sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An that contains the elements to be counted. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the number of elements in the input sequence. + + + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously returns the number of elements in a sequence that satisfy a condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An that contains the elements to be counted. + + A function to test each element for a condition. + + A task that represents the asynchronous operation. + The task result contains the number of elements in the sequence that satisfy the condition in the predicate function. + + + + or + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + that satisfy the condition in the predicate function + is larger than + + . + + + + + Asynchronously returns the number of elements in a sequence that satisfy a condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An that contains the elements to be counted. + + A function to test each element for a condition. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the number of elements in the sequence that satisfy the condition in the predicate function. + + + + or + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + that satisfy the condition in the predicate function + is larger than + + . + + + + + Asynchronously returns an that represents the total number of elements in a sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An that contains the elements to be counted. + + + A task that represents the asynchronous operation. + The task result contains the number of elements in the input sequence. + + + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously returns an that represents the total number of elements in a sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An that contains the elements to be counted. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the number of elements in the input sequence. + + + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously returns an that represents the number of elements in a sequence + that satisfy a condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An that contains the elements to be counted. + + A function to test each element for a condition. + + A task that represents the asynchronous operation. + The task result contains the number of elements in the sequence that satisfy the condition in the predicate function. + + + + or + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + that satisfy the condition in the predicate function + is larger than + + . + + + + + Asynchronously returns an that represents the number of elements in a sequence + that satisfy a condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An that contains the elements to be counted. + + A function to test each element for a condition. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the number of elements in the sequence that satisfy the condition in the predicate function. + + + + or + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + that satisfy the condition in the predicate function + is larger than + + . + + + + + Asynchronously returns the minimum value of a sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An that contains the elements to determine the minimum of. + + + A task that represents the asynchronous operation. + The task result contains the minimum value in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously returns the minimum value of a sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An that contains the elements to determine the minimum of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the minimum value in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously invokes a projection function on each element of a sequence and returns the minimum resulting value. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + The type of the value returned by the function represented by . + + + An that contains the elements to determine the minimum of. + + A projection function to apply to each element. + + A task that represents the asynchronous operation. + The task result contains the minimum value in the sequence. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously invokes a projection function on each element of a sequence and returns the minimum resulting value. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + The type of the value returned by the function represented by . + + + An that contains the elements to determine the minimum of. + + A projection function to apply to each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the minimum value in the sequence. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously returns the maximum value of a sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An that contains the elements to determine the maximum of. + + + A task that represents the asynchronous operation. + The task result contains the maximum value in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously returns the maximum value of a sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + An that contains the elements to determine the maximum of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the maximum value in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously invokes a projection function on each element of a sequence and returns the maximum resulting value. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + The type of the value returned by the function represented by . + + + An that contains the elements to determine the maximum of. + + A projection function to apply to each element. + + A task that represents the asynchronous operation. + The task result contains the maximum value in the sequence. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously invokes a projection function on each element of a sequence and returns the maximum resulting value. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + The type of the value returned by the function represented by . + + + An that contains the elements to determine the maximum of. + + A projection function to apply to each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the maximum value in the sequence. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the sum of a sequence of values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of values to calculate the sum of. + + + A task that represents the asynchronous operation. + The task result contains the sum of the values in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously computes the sum of a sequence of values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of values to calculate the sum of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the sum of the values in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously computes the sum of a sequence of nullable values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of nullable values to calculate the sum of. + + + A task that represents the asynchronous operation. + The task result contains the sum of the values in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously computes the sum of a sequence of nullable values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of nullable values to calculate the sum of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the sum of the values in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously computes the sum of a sequence of values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of values to calculate the sum of. + + + A task that represents the asynchronous operation. + The task result contains the sum of the values in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously computes the sum of a sequence of values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of values to calculate the sum of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the sum of the values in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously computes the sum of a sequence of nullable values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of nullable values to calculate the sum of. + + + A task that represents the asynchronous operation. + The task result contains the sum of the values in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously computes the sum of a sequence of nullable values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of nullable values to calculate the sum of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the sum of the values in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously computes the sum of a sequence of values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of values to calculate the sum of. + + + A task that represents the asynchronous operation. + The task result contains the sum of the values in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the sum of a sequence of values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of values to calculate the sum of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the sum of the values in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the sum of a sequence of nullable values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of nullable values to calculate the sum of. + + + A task that represents the asynchronous operation. + The task result contains the sum of the values in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the sum of a sequence of nullable values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of nullable values to calculate the sum of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the sum of the values in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the sum of a sequence of values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of values to calculate the sum of. + + + A task that represents the asynchronous operation. + The task result contains the sum of the values in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the sum of a sequence of values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of values to calculate the sum of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the sum of the values in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the sum of a sequence of nullable values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of nullable values to calculate the sum of. + + + A task that represents the asynchronous operation. + The task result contains the sum of the values in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the sum of a sequence of nullable values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of nullable values to calculate the sum of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the sum of the values in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the sum of a sequence of values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of values to calculate the sum of. + + + A task that represents the asynchronous operation. + The task result contains the sum of the values in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the sum of a sequence of values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of values to calculate the sum of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the sum of the values in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the sum of a sequence of nullable values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of nullable values to calculate the sum of. + + + A task that represents the asynchronous operation. + The task result contains the sum of the values in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the sum of a sequence of nullable values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of nullable values to calculate the sum of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the sum of the values in the sequence. + + + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously computes the sum of the sequence of values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + A sequence of values of type . + + A projection function to apply to each element. + + A task that represents the asynchronous operation. + The task result contains the sum of the projected values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously computes the sum of the sequence of values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + A sequence of values of type . + + A projection function to apply to each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the sum of the projected values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously computes the sum of the sequence of nullable values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + A sequence of values of type . + + A projection function to apply to each element. + + A task that represents the asynchronous operation. + The task result contains the sum of the projected values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously computes the sum of the sequence of nullable values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + A sequence of values of type . + + A projection function to apply to each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the sum of the projected values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously computes the sum of the sequence of values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + A sequence of values of type . + + A projection function to apply to each element. + + A task that represents the asynchronous operation. + The task result contains the sum of the projected values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously computes the sum of the sequence of values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + A sequence of values of type . + + A projection function to apply to each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the sum of the projected values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously computes the sum of the sequence of nullable values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + A sequence of values of type . + + A projection function to apply to each element. + + A task that represents the asynchronous operation. + The task result contains the sum of the projected values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously computes the sum of the sequence of nullable values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + A sequence of values of type . + + A projection function to apply to each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the sum of the projected values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously computes the sum of the sequence of values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + A sequence of values of type . + + A projection function to apply to each element. + + A task that represents the asynchronous operation. + The task result contains the sum of the projected values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the sum of the sequence of values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + A sequence of values of type . + + A projection function to apply to each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the sum of the projected values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the sum of the sequence of nullable values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + A sequence of values of type . + + A projection function to apply to each element. + + A task that represents the asynchronous operation. + The task result contains the sum of the projected values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the sum of the sequence of nullable values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + A sequence of values of type . + + A projection function to apply to each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the sum of the projected values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the sum of the sequence of values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + A sequence of values of type . + + A projection function to apply to each element. + + A task that represents the asynchronous operation. + The task result contains the sum of the projected values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the sum of the sequence of values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + A sequence of values of type . + + A projection function to apply to each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the sum of the projected values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the sum of the sequence of nullable values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + A sequence of values of type . + + A projection function to apply to each element. + + A task that represents the asynchronous operation. + The task result contains the sum of the projected values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the sum of the sequence of nullable values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + A sequence of values of type . + + A projection function to apply to each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the sum of the projected values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the sum of the sequence of values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + A sequence of values of type . + + A projection function to apply to each element. + + A task that represents the asynchronous operation. + The task result contains the sum of the projected values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously computes the sum of the sequence of values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + A sequence of values of type . + + A projection function to apply to each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the sum of the projected values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously computes the sum of the sequence of nullable values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + A sequence of values of type . + + A projection function to apply to each element. + + A task that represents the asynchronous operation. + The task result contains the sum of the projected values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously computes the sum of the sequence of nullable values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + + A sequence of values of type . + + A projection function to apply to each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the sum of the projected values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + The number of elements in + + is larger than + + . + + + + + Asynchronously computes the average of a sequence of values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of values to calculate the average of. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + is + null + . + + + + doesn't implement + + . + + + + contains no elements. + + + + + Asynchronously computes the average of a sequence of values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of values to calculate the average of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + is + null + . + + + + doesn't implement + + . + + + + contains no elements. + + + + + Asynchronously computes the average of a sequence of nullable values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of nullable values to calculate the average of. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the average of a sequence of nullable values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of nullable values to calculate the average of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the average of a sequence of values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of values to calculate the average of. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + is + null + . + + + + doesn't implement + + . + + + + contains no elements. + + + + + Asynchronously computes the average of a sequence of values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of values to calculate the average of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + is + null + . + + + + doesn't implement + + . + + + + contains no elements. + + + + + Asynchronously computes the average of a sequence of nullable values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of nullable values to calculate the average of. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the average of a sequence of nullable values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of nullable values to calculate the average of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the average of a sequence of values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of values to calculate the average of. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + is + null + . + + + + doesn't implement + + . + + + + contains no elements. + + + + + Asynchronously computes the average of a sequence of values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of values to calculate the average of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + is + null + . + + + + doesn't implement + + . + + + + contains no elements. + + + + + Asynchronously computes the average of a sequence of nullable values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of nullable values to calculate the average of. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the average of a sequence of nullable values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of nullable values to calculate the average of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the average of a sequence of values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of values to calculate the average of. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + is + null + . + + + + doesn't implement + + . + + + + contains no elements. + + + + + Asynchronously computes the average of a sequence of values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of values to calculate the average of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + is + null + . + + + + doesn't implement + + . + + + + contains no elements. + + + + + Asynchronously computes the average of a sequence of nullable values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of nullable values to calculate the average of. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the average of a sequence of nullable values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of nullable values to calculate the average of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the average of a sequence of values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of values to calculate the average of. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + is + null + . + + + + doesn't implement + + . + + + + contains no elements. + + + + + Asynchronously computes the average of a sequence of values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of values to calculate the average of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + is + null + . + + + + doesn't implement + + . + + + + contains no elements. + + + + + Asynchronously computes the average of a sequence of nullable values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of nullable values to calculate the average of. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the average of a sequence of nullable values. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A sequence of nullable values to calculate the average of. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the average of a sequence of values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + A sequence of values to calculate the average of. + A projection function to apply to each element. + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + contains no elements. + + + + + Asynchronously computes the average of a sequence of values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + A sequence of values to calculate the average of. + A projection function to apply to each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + contains no elements. + + + + + Asynchronously computes the average of a sequence of nullable values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + A sequence of values to calculate the average of. + A projection function to apply to each element. + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the average of a sequence of nullable values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + A sequence of values to calculate the average of. + A projection function to apply to each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the average of a sequence of values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + A sequence of values to calculate the average of. + A projection function to apply to each element. + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + contains no elements. + + + + + Asynchronously computes the average of a sequence of values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + A sequence of values to calculate the average of. + A projection function to apply to each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + contains no elements. + + + + + Asynchronously computes the average of a sequence of nullable values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + A sequence of values to calculate the average of. + A projection function to apply to each element. + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the average of a sequence of nullable values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + A sequence of values to calculate the average of. + A projection function to apply to each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the average of a sequence of values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + A sequence of values to calculate the average of. + A projection function to apply to each element. + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + contains no elements. + + + + + Asynchronously computes the average of a sequence of values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + A sequence of values to calculate the average of. + A projection function to apply to each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + contains no elements. + + + + + Asynchronously computes the average of a sequence of nullable values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + A sequence of values to calculate the average of. + A projection function to apply to each element. + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the average of a sequence of nullable values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + A sequence of values to calculate the average of. + A projection function to apply to each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the average of a sequence of values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + A sequence of values to calculate the average of. + A projection function to apply to each element. + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + contains no elements. + + + + + Asynchronously computes the average of a sequence of values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + A sequence of values to calculate the average of. + A projection function to apply to each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + contains no elements. + + + + + Asynchronously computes the average of a sequence of nullable values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + A sequence of values to calculate the average of. + A projection function to apply to each element. + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the average of a sequence of nullable values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + A sequence of values to calculate the average of. + A projection function to apply to each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the average of a sequence of values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + A sequence of values to calculate the average of. + A projection function to apply to each element. + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + contains no elements. + + + + + Asynchronously computes the average of a sequence of values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + A sequence of values to calculate the average of. + A projection function to apply to each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + contains no elements. + + + + + Asynchronously computes the average of a sequence of nullable values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + A sequence of values to calculate the average of. + A projection function to apply to each element. + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Asynchronously computes the average of a sequence of nullable values that is obtained + by invoking a projection function on each element of the input sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the elements of . + + A sequence of values to calculate the average of. + A projection function to apply to each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the average of the sequence of values. + + + + or + + is + null + . + + + + doesn't implement + + . + + + + + Bypasses a specified number of elements in a sequence and then returns the remaining elements. + + The type of the elements of source. + A sequence to return elements from. + An expression that evaluates to the number of elements to skip. + A sequence that contains elements that occur after the specified index in the + input sequence. + + + + Returns a specified number of contiguous elements from the start of a sequence. + + The type of the elements of source. + The sequence to return elements from. + An expression that evaluates to the number of elements + to return. + A sequence that contains the specified number of elements from the + start of the input sequence. + + + + Controls the transaction creation behavior while executing a database command or query. + + + + + If no transaction is present then a new transaction will be used for the operation. + + + + + If an existing transaction is present then use it, otherwise execute the command or query without a transaction. + + + + + Specifies a structural type mapping. + + + + + Adds a property mapping. + + The property mapping to be added. + + + + Removes a property mapping. + + The property mapping to be removed. + + + + Adds a property mapping condition. + + The property mapping condition to be added. + + + + Removes a property mapping condition. + + The property mapping condition to be removed. + + + + Gets a read-only collection of property mappings. + + + + + Gets a read-only collection of property mapping conditions. + + + + + Represents the base item class for all the metadata + + + Represents the base item class for all the metadata + + + + + Adds or updates an annotation with the specified name and value. + + + If an annotation with the given name already exists then the value of that annotation + is updated to the given value. If the given value is null then the annotation will be + removed. + + The name of the annotation property. + The value of the annotation property. + + + + Removes an annotation with the specified name. + + The name of the annotation property. + true if an annotation was removed; otherwise, false. + + + + Returns a conceptual model built-in type that matches one of the + + values. + + + An object that represents the built-in type in the EDM. + + + One of the values. + + + + Returns the list of the general facet descriptions for a specified type. + + A object that represents the list of the general facet descriptions for a specified type. + + + + Gets the built-in type kind for this type. + + A object that represents the built-in type kind for this type. + + + + Gets the list of properties of the current type. + + A collection of type that contains the list of properties of the current type. + + + + Gets or sets the documentation associated with this type. + + A object that represents the documentation on this type. + + + + + Indicates that the given method is a proxy for an EDM function. + + + Note that this attribute has been replaced by the starting with EF6. + + + + + Indicates that the given method is a proxy for an EDM function. + + + Note that this class was called EdmFunctionAttribute in some previous versions of Entity Framework. + + + + + Initializes a new instance of the class. + + The namespace of the mapped-to function. + The name of the mapped-to function. + + + The namespace of the mapped-to function. + The namespace of the mapped-to function. + + + The name of the mapped-to function. + The name of the mapped-to function. + + + + Creates a new DbFunctionAttribute instance. + + The namespace name of the EDM function represented by the attributed method. + The function name of the EDM function represented by the attributed method. + + + + Provides common language runtime (CLR) methods that expose EDM canonical functions + for use in or LINQ to Entities queries. + + + Note that these functions have been moved to the class starting with EF6. + The functions are retained here only to help in the migration of older EF apps to EF6. + + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate + the standard deviation of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate + the standard deviation of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate + the standard deviation of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate + the standard deviation of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate + the standard deviation of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate + the standard deviation of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate + the standard deviation of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate + the standard deviation of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate + the standard deviation for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate + the standard deviation for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate + the standard deviation for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate + the standard deviation for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate + the standard deviation for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate + the standard deviation for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate + the standard deviation for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate + the standard deviation for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate + the variance of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate + the variance of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate + the variance of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate + the variance of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate + the variance of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate + the variance of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate + the variance of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate + the variance of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate + the variance for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate + the variance for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate + the variance for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate + the variance for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate + the variance for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate + the variance for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate + the variance for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate + the variance for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Left EDM function to return a given + number of the leftmost characters in a string. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input string. + The number of characters to return + A string containing the number of characters asked for from the left of the input string. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Right EDM function to return a given + number of the rightmost characters in a string. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input string. + The number of characters to return + A string containing the number of characters asked for from the right of the input string. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Reverse EDM function to return a given + string with the order of the characters reversed. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input string. + The input string with the order of the characters reversed. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical GetTotalOffsetMinutes EDM function to + return the number of minutes that the given date/time is offset from UTC. This is generally between +780 + and -780 (+ or - 13 hrs). + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The date/time value to use. + The offset of the input from UTC. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical TruncateTime EDM function to return + the given date with the time portion cleared. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The date/time value to use. + The input date with the time portion cleared. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical TruncateTime EDM function to return + the given date with the time portion cleared. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The date/time value to use. + The input date with the time portion cleared. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical CreateDateTime EDM function to + create a new object. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The year. + The month (1-based). + The day (1-based). + The hours. + The minutes. + The seconds, including fractional parts of the seconds if desired. + The new date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical CreateDateTimeOffset EDM function to + create a new object. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The year. + The month (1-based). + The day (1-based). + The hours. + The minutes. + The seconds, including fractional parts of the seconds if desired. + The time zone offset part of the new date. + The new date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical CreateTime EDM function to + create a new object. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The hours. + The minutes. + The seconds, including fractional parts of the seconds if desired. + The new time span. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddYears EDM function to + add the given number of years to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of years to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddYears EDM function to + add the given number of years to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of years to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddMonths EDM function to + add the given number of months to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of months to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddMonths EDM function to + add the given number of months to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of months to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddDays EDM function to + add the given number of days to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of days to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddDays EDM function to + add the given number of days to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of days to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddHours EDM function to + add the given number of hours to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of hours to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddHours EDM function to + add the given number of hours to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of hours to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddHours EDM function to + add the given number of hours to a time span. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of hours to add. + A resulting time span. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddMinutes EDM function to + add the given number of minutes to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of minutes to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddMinutes EDM function to + add the given number of minutes to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of minutes to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddMinutes EDM function to + add the given number of minutes to a time span. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of minutes to add. + A resulting time span. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddSeconds EDM function to + add the given number of seconds to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of seconds to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddSeconds EDM function to + add the given number of seconds to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of seconds to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddSeconds EDM function to + add the given number of seconds to a time span. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of seconds to add. + A resulting time span. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddMilliseconds EDM function to + add the given number of milliseconds to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of milliseconds to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddMilliseconds EDM function to + add the given number of milliseconds to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of milliseconds to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddMilliseconds EDM function to + add the given number of milliseconds to a time span. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of milliseconds to add. + A resulting time span. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddMicroseconds EDM function to + add the given number of microseconds to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of microseconds to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddMicroseconds EDM function to + add the given number of microseconds to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of microseconds to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddMicroseconds EDM function to + add the given number of microseconds to a time span. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of microseconds to add. + A resulting time span. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddNanoseconds EDM function to + add the given number of nanoseconds to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of nanoseconds to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddNanoseconds EDM function to + add the given number of nanoseconds to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of nanoseconds to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddNanoseconds EDM function to + add the given number of nanoseconds to a time span. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of nanoseconds to add. + A resulting time span. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffYears EDM function to + calculate the number of years between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of years between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffYears EDM function to + calculate the number of years between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of years between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffMonths EDM function to + calculate the number of months between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of months between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffMonths EDM function to + calculate the number of months between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of months between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffDays EDM function to + calculate the number of days between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of days between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffDays EDM function to + calculate the number of days between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of days between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffHours EDM function to + calculate the number of hours between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of hours between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffHours EDM function to + calculate the number of hours between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of hours between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffHours EDM function to + calculate the number of hours between two time spans. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first time span. + The second time span. + The number of hours between the first and second time spans. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffMinutes EDM function to + calculate the number of minutes between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of minutes between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffMinutes EDM function to + calculate the number of minutes between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of minutes between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffMinutes EDM function to + calculate the number of minutes between two time spans. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first time span. + The second time span. + The number of minutes between the first and second time spans. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffSeconds EDM function to + calculate the number of seconds between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of seconds between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffSeconds EDM function to + calculate the number of seconds between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of seconds between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffSeconds EDM function to + calculate the number of seconds between two time spans. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first time span. + The second time span. + The number of seconds between the first and second time spans. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffMilliseconds EDM function to + calculate the number of milliseconds between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of milliseconds between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffMilliseconds EDM function to + calculate the number of milliseconds between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of milliseconds between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffMilliseconds EDM function to + calculate the number of milliseconds between two time spans. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first time span. + The second time span. + The number of milliseconds between the first and second time spans. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffMicroseconds EDM function to + calculate the number of microseconds between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of microseconds between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffMicroseconds EDM function to + calculate the number of microseconds between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of microseconds between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffMicroseconds EDM function to + calculate the number of microseconds between two time spans. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first time span. + The second time span. + The number of microseconds between the first and second time spans. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffNanoseconds EDM function to + calculate the number of nanoseconds between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of nanoseconds between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffNanoseconds EDM function to + calculate the number of nanoseconds between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of nanoseconds between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffNanoseconds EDM function to + calculate the number of nanoseconds between two time spans. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first time span. + The second time span. + The number of nanoseconds between the first and second time spans. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Truncate EDM function to + truncate the given value to the number of specified digits. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The value to truncate. + The number of digits to preserve. + The truncated value. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Truncate EDM function to + truncate the given value to the number of specified digits. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The value to truncate. + The number of digits to preserve. + The truncated value. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Like EDM operator to match an expression. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The string to search. + The expression to match against. + True if the searched string matches the expression; otherwise false. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Like EDM operator to match an expression. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The string to search. + The expression to match against. + The string to escape special characters with, must only be a single character. + True if the searched string matches the expression; otherwise false. + + + + When used as part of a LINQ to Entities query, this method acts as an operator that ensures the input + is treated as a Unicode string. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function impacts the way the LINQ query is translated to a query that can be run in the database. + + The input string. + The input string treated as a Unicode string. + + + + When used as part of a LINQ to Entities query, this method acts as an operator that ensures the input + is treated as a non-Unicode string. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function impacts the way the LINQ query is translated to a query that can be run in the database. + + The input string. + The input string treated as a non-Unicode string. + + + + Options for query execution. + + + + + Creates a new instance of . + + Merge option to use for entity results. + + + + Creates a new instance of . + + Merge option to use for entity results. + Whether the query is streaming or buffering. + + + Determines whether the specified objects are equal. + true if the two objects are equal; otherwise, false. + The left object to compare. + The right object to compare. + + + + Determines whether the specified objects are not equal. + + The left object to compare. + The right object to compare. + true if the two objects are not equal; otherwise, false. + + + + + + + + + + Merge option to use for entity results. + + + + + Whether the query is streaming or buffering. + + + + + DataRecord interface supporting structured types and rich metadata information. + + + + + Gets a object with the specified index. + + + A object. + + The index of the row. + + + + Returns nested readers as objects. + + + Nested readers as objects. + + The ordinal of the column. + + + + Gets for this + + . + + + A object. + + + + + DataRecordInfo class providing a simple way to access both the type information and the column information. + + + + + Initializes a new object for a specific type with an enumerable collection of data fields. + + + The metadata for the type represented by this object, supplied by + + . + + + An enumerable collection of objects that represent column information. + + + + + Gets for this + + object. + + + A object. + + + + + Gets type info for this object as a object. + + + A value. + + + + + A prepared command definition, can be cached and reused to avoid + repreparing a command. + + + + + Initializes a new instance of the class using the supplied + + . + + + The supplied . + + method used to clone the + + + + Initializes a new instance of the class. + + + + + Creates and returns a object that can be executed. + + The command for database. + + + + Metadata Interface for all CLR types types + + + + + Value to pass to GetInformation to get the StoreSchemaDefinition + + + + + Value to pass to GetInformation to get the StoreSchemaMapping + + + + + Value to pass to GetInformation to get the ConceptualSchemaDefinition + + + + + Value to pass to GetInformation to get the StoreSchemaDefinitionVersion3 + + + + + Value to pass to GetInformation to get the StoreSchemaMappingVersion3 + + + + + Value to pass to GetInformation to get the ConceptualSchemaDefinitionVersion3 + + + + + Name of the MaxLength Facet + + + + + Name of the Unicode Facet + + + + + Name of the FixedLength Facet + + + + + Name of the Precision Facet + + + + + Name of the Scale Facet + + + + + Name of the Nullable Facet + + + + + Name of the DefaultValue Facet + + + + + Name of the Collation Facet + + + + + Name of the SRID Facet + + + + + Name of the IsStrict Facet + + + + When overridden in a derived class, returns the set of primitive types supported by the data source. + The set of types supported by the data source. + + + When overridden in a derived class, returns a collection of EDM functions supported by the provider manifest. + A collection of EDM functions. + + + Returns the FacetDescription objects for a particular type. + The FacetDescription objects for the specified EDM type. + The EDM type to return the facet description for. + + + When overridden in a derived class, this method maps the specified storage type and a set of facets for that type to an EDM type. + + The instance that describes an EDM type and a set of facets for that type. + + The TypeUsage instance that describes a storage type and a set of facets for that type to be mapped to the EDM type. + + + When overridden in a derived class, this method maps the specified EDM type and a set of facets for that type to a storage type. + The TypeUsage instance that describes a storage type and a set of facets for that type. + The TypeUsage instance that describes the EDM type and a set of facets for that type to be mapped to a storage type. + + + When overridden in a derived class, this method returns provider-specific information. + The XmlReader object that represents the mapping to the underlying data store catalog. + The type of the information to return. + + + Gets the provider-specific information. + The provider-specific information. + The type of the information to return. + + + Indicates if the provider supports escaping strings to be used as patterns in a Like expression. + True if this provider supports escaping strings to be used as patterns in a Like expression; otherwise, false. + If the provider supports escaping, the character that would be used as the escape character. + + + + Indicates if the provider supports the parameter optimization described in EntityFramework6 GitHub issue #195. + The default is false. Providers should change this to true only after testing that schema queries (as + used in the Database First flow) work correctly with this flag. + + True only if the provider supports the parameter optimization. + + + Provider writers should override this method to return the argument with the wildcards and the escape character escaped. This method is only used if SupportsEscapingLikeArgument returns true. + The argument with the wildcards and the escape character escaped. + The argument to be escaped. + + + + Returns a boolean that specifies whether the provider can handle expression trees + containing instances of DbInExpression. + The default implementation returns false for backwards compatibility. Derived classes can override this method. + + + false + + + + + Returns a boolean that specifies whether the provider can process expression trees not having DbProjectExpression + nodes directly under both Left and Right sides of DbUnionAllExpression and DbIntersectExpression + + + false + + + + Gets the namespace used by this provider manifest. + The namespace used by this provider manifest. + + + + The factory for building command definitions; use the type of this object + as the argument to the IServiceProvider.GetService method on the provider + factory; + + + + + Constructs an EF provider that will use the obtained from + the app domain Singleton for resolving EF dependencies such + as the instance to use. + + + + + Registers a handler to process non-error messages coming from the database provider. + + The connection to receive information for. + The handler to process messages. + + + + Create a Command Definition object given a command tree. + + command tree for the statement + an executable command definition object + + This method simply delegates to the provider's implementation of CreateDbCommandDefinition. + + + + Creates command definition from specified manifest and command tree. + The created command definition. + The manifest. + The command tree. + + + Creates a command definition object for the specified provider manifest and command tree. + An executable command definition object. + Provider manifest previously retrieved from the store provider. + Command tree for the statement. + + + + Create the default DbCommandDefinition object based on the prototype command + This method is intended for provider writers to build a default command definition + from a command. + Note: This will clone the prototype + + the prototype command + an executable command definition object + + + + See issue 2390 - cloning the DesignTimeVisible property on the + DbCommand can cause deadlocks. So here allow sub-classes to override. + + the object to clone + a clone of the + + + + Clones the connection. + + The original connection. + Cloned connection + + + + Clones the connection. + + The original connection. + The factory to use. + Cloned connection + + + Returns provider manifest token given a connection. + The provider manifest token. + Connection to provider. + + + + Returns provider manifest token for a given connection. + + Connection to find manifest token from. + The provider manifest token for the specified connection. + + + Returns the provider manifest by using the specified version information. + The provider manifest by using the specified version information. + The token information associated with the provider manifest. + + + When overridden in a derived class, returns an instance of a class that derives from the DbProviderManifest. + A DbProviderManifest object that represents the provider manifest. + The token information associated with the provider manifest. + + + + Gets the that will be used to execute methods that use the specified connection. + + The database connection + + A new instance of + + + + + Gets the that will be used to execute methods that use the specified connection. + This overload should be used by the derived classes for compatability with wrapping providers. + + The database connection + The provider invariant name + + A new instance of + + + + + Gets the spatial data reader for the . + + The spatial data reader. + The reader where the spatial data came from. + The manifest token associated with the provider manifest. + + + + Gets the spatial services for the . + + The spatial services. + The token information associated with the provider manifest. + + + Gets the spatial services for the . + The spatial services. + Information about the database that the spatial services will be used for. + + + + Gets the spatial data reader for the . + + The spatial data reader. + The reader where the spatial data came from. + The token information associated with the provider manifest. + + + + Gets the spatial services for the . + + The spatial services. + The token information associated with the provider manifest. + + + + Sets the parameter value and appropriate facets for the given . + + The parameter. + The type of the parameter. + The value of the parameter. + + + + Sets the parameter value and appropriate facets for the given . + + The parameter. + The type of the parameter. + The value of the parameter. + + + Returns providers given a connection. + + The instanced based on the specified connection. + + Connection to provider. + + + Retrieves the DbProviderFactory based on the specified DbConnection. + The retrieved DbProviderFactory. + The connection to use. + + + + Return an XML reader which represents the CSDL description + + The name of the CSDL description. + An XmlReader that represents the CSDL description + + + Generates a data definition language (DDL script that creates schema objects (tables, primary keys, foreign keys) based on the contents of the StoreItemCollection parameter and targeted for the version of the database corresponding to the provider manifest token. + + Individual statements should be separated using database-specific DDL command separator. + It is expected that the generated script would be executed in the context of existing database with + sufficient permissions, and it should not include commands to create the database, but it may include + commands to create schemas and other auxiliary objects such as sequences, etc. + + A DDL script that creates schema objects based on the contents of the StoreItemCollection parameter and targeted for the version of the database corresponding to the provider manifest token. + The provider manifest token identifying the target version. + The structure of the database. + + + + Generates a data definition language (DDL) script that creates schema objects + (tables, primary keys, foreign keys) based on the contents of the StoreItemCollection + parameter and targeted for the version of the database corresponding to the provider manifest token. + + + Individual statements should be separated using database-specific DDL command separator. + It is expected that the generated script would be executed in the context of existing database with + sufficient permissions, and it should not include commands to create the database, but it may include + commands to create schemas and other auxiliary objects such as sequences, etc. + + The provider manifest token identifying the target version. + The structure of the database. + + A DDL script that creates schema objects based on the contents of the StoreItemCollection parameter + and targeted for the version of the database corresponding to the provider manifest token. + + + + + Creates a database indicated by connection and creates schema objects + (tables, primary keys, foreign keys) based on the contents of storeItemCollection. + + Connection to a non-existent database that needs to be created and populated with the store objects indicated with the storeItemCollection parameter. + Execution timeout for any commands needed to create the database. + The collection of all store items based on which the script should be created. + + + Creates a database indicated by connection and creates schema objects (tables, primary keys, foreign keys) based on the contents of a StoreItemCollection. + Connection to a non-existent database that needs to be created and populated with the store objects indicated with the storeItemCollection parameter. + Execution timeout for any commands needed to create the database. + The collection of all store items based on which the script should be created. + + + Returns a value indicating whether a given database exists on the server. + True if the provider can deduce the database only based on the connection. + Connection to a database whose existence is checked by this method. + Execution timeout for any commands needed to determine the existence of the database. + The collection of all store items from the model. This parameter is no longer used for determining database existence. + + + Returns a value indicating whether a given database exists on the server. + True if the provider can deduce the database only based on the connection. + Connection to a database whose existence is checked by this method. + Execution timeout for any commands needed to determine the existence of the database. + The collection of all store items from the model. This parameter is no longer used for determining database existence. + + + Returns a value indicating whether a given database exists on the server. + True if the provider can deduce the database only based on the connection. + Connection to a database whose existence is checked by this method. + Execution timeout for any commands needed to determine the existence of the database. + The collection of all store items from the model. This parameter is no longer used for determining database existence. + + + Returns a value indicating whether a given database exists on the server. + True if the provider can deduce the database only based on the connection. + Connection to a database whose existence is checked by this method. + Execution timeout for any commands needed to determine the existence of the database. + The collection of all store items from the model. This parameter is no longer used for determining database existence. + Override this method to avoid creating the store item collection if it is not needed. The default implementation evaluates the Lazy and calls the other overload of this method. + + + Deletes the specified database. + Connection to an existing database that needs to be deleted. + Execution timeout for any commands needed to delete the database. + The collection of all store items from the model. This parameter is no longer used for database deletion. + + + Deletes the specified database. + Connection to an existing database that needs to be deleted. + Execution timeout for any commands needed to delete the database. + The collection of all store items from the model. This parameter is no longer used for database deletion. + + + + Expands |DataDirectory| in the given path if it begins with |DataDirectory| and returns the expanded path, + or returns the given string if it does not start with |DataDirectory|. + + The path to expand. + The expanded path. + + + + Adds an that will be used to resolve additional default provider + services when a derived type is registered as an EF provider either using an entry in the application's + config file or through code-based registration in . + + The resolver to add. + + + + Called to resolve additional default provider services when a derived type is registered as an + EF provider either using an entry in the application's config file or through code-based + registration in . The implementation of this method in this + class uses the resolvers added with the AddDependencyResolver method to resolve + dependencies. + + + Use this method to set, add, or change other provider-related services. Note that this method + will only be called for such services if they are not already explicitly configured in some + other way by the application. This allows providers to set default services while the + application is still able to override and explicitly configure each service if required. + See and for more details. + + The type of the service to be resolved. + An optional key providing additional information for resolving the service. + An instance of the given type, or null if the service could not be resolved. + + + + Called to resolve additional default provider services when a derived type is registered as an + EF provider either using an entry in the application's config file or through code-based + registration in . The implementation of this method in this + class uses the resolvers added with the AddDependencyResolver method to resolve + dependencies. + + The type of the service to be resolved. + An optional key providing additional information for resolving the service. + All registered services that satisfy the given type and key, or an empty enumeration if there are none. + + + + A specialization of the ProviderManifest that accepts an XmlReader + + + + + Initializes a new instance of the class. + + + An object that provides access to the XML data in the provider manifest file. + + + + Returns the list of facet descriptions for the specified Entity Data Model (EDM) type. + + A collection of type that contains the list of facet descriptions for the specified EDM type. + + + An for which the facet descriptions are to be retrieved. + + + + Returns the list of primitive types supported by the storage provider. + + A collection of type that contains the list of primitive types supported by the storage provider. + + + + Returns the list of provider-supported functions. + + A collection of type that contains the list of provider-supported functions. + + + + Gets the namespace name supported by this provider manifest. + The namespace name supported by this provider manifest. + + + Gets the best mapped equivalent Entity Data Model (EDM) type for a specified storage type name. + The best mapped equivalent EDM type for a specified storage type name. + + + Gets the best mapped equivalent storage primitive type for a specified storage type name. + The best mapped equivalent storage primitive type for a specified storage type name. + + + + Class for representing a collection of items. + Most of the implementation for actual maintenance of the collection is + done by MetadataCollection + + + + + Class representing a read-only wrapper around MetadataCollection + + The type of items in this collection + + + Retrieves an item from this collection by using the specified identity. + An item from this collection. + The identity of the item to be searched for. + true to perform the case-insensitive search; otherwise, false. + + + Determines whether the collection contains an item with the specified identity. + true if the collection contains the item to be searched for; otherwise, false. The default is false. + The identity of the item. + + + Retrieves an item from this collection by using the specified identity. + true if there is an item that matches the search criteria; otherwise, false. + The identity of the item to be searched for. + true to perform the case-insensitive search; otherwise, false. + When this method returns, this output parameter contains an item from the collection. If there is no matched item, this output parameter contains null. + + + Returns an enumerator that can iterate through this collection. + + A that can be used to iterate through this + + . + + + + Returns the index of the specified value in this collection. + The index of the specified value in this collection. + A value to seek. + + + Gets a value indicating whether this collection is read-only. + true if this collection is read-only; otherwise, false. + + + Gets an item from this collection by using the specified identity. + An item from this collection. + The identity of the item to be searched for. + + + + The enumerator for MetadataCollection + + + + Disposes of this enumerator. + + + + Moves to the next member in the collection of type + + . + + + true if the enumerator is moved in the collection of type + + ; otherwise, false. + + + + + Positions the enumerator before the first position in the collection of type + + . + + + + Gets the member at the current position. + The member at the current position. + + + + Gets the member at the current position + + + + + Returns a strongly typed object by using the specified identity. + + The item that is specified by the identity. + The identity of the item. + The type returned by the method. + + + + Returns a strongly typed object by using the specified identity from this item collection. + + true if there is an item that matches the search criteria; otherwise, false. + The identity of the item. + + When this method returns, the output parameter contains a + + object. If there is no global item with the specified identity in the item collection, this output parameter contains null. + + The type returned by the method. + + + + Returns a strongly typed object by using the specified identity from this item collection. + + true if there is an item that matches the search criteria; otherwise, false. + The identity of the item. + true to perform the case-insensitive search; otherwise, false. + + When this method returns, the output parameter contains a + + object. If there is no global item with the specified identity in the item collection, this output parameter contains null. + + The type returned by the method. + + + + Returns a strongly typed object by using the specified identity with either case-sensitive or case-insensitive search. + + The item that is specified by the identity. + The identity of the item. + true to perform the case-insensitive search; otherwise, false. + The type returned by the method. + + + Returns all the items of the specified type from this item collection. + + A collection of type that contains all the items of the specified type. + + The type returned by the method. + + + + Returns an object by using the specified type name and the namespace name in this item collection. + + + An object that represents the type that matches the specified type name and the namespace name in this item collection. If there is no matched type, this method returns null. + + The name of the type. + The namespace of the type. + + + + Returns an object by using the specified type name and the namespace name from this item collection. + + true if there is a type that matches the search criteria; otherwise, false. + The name of the type. + The namespace of the type. + + When this method returns, this output parameter contains an + + object. If there is no type with the specified name and namespace name in this item collection, this output parameter contains null. + + + + + Returns an object by using the specified type name and the namespace name from this item collection. + + + An object that represents the type that matches the specified type name and the namespace name in this item collection. If there is no matched type, this method returns null. + + The name of the type. + The namespace of the type. + true to perform the case-insensitive search; otherwise, false. + + + + Returns an object by using the specified type name and the namespace name from this item collection. + + true if there is a type that matches the search criteria; otherwise, false. + The name of the type. + The namespace of the type. + true to perform the case-insensitive search; otherwise, false. + + When this method returns, this output parameter contains an + + object. If there is no type with the specified name and namespace name in this item collection, this output parameter contains null. + + + + Returns all the overloads of the functions by using the specified name from this item collection. + + A collection of type that contains all the functions that have the specified name. + + The full name of the function. + + + Returns all the overloads of the functions by using the specified name from this item collection. + + A collection of type that contains all the functions that have the specified name. + + The full name of the function. + true to perform the case-insensitive search; otherwise, false. + + + Returns all the overloads of the functions by using the specified name from this item collection. + A collection of type ReadOnlyCollection that contains all the functions that have the specified name. + A dictionary of functions. + The full name of the function. + true to perform the case-insensitive search; otherwise, false. + + + + Returns an object by using the specified entity container name. + + If there is no entity container, this method returns null; otherwise, it returns the first one. + The name of the entity container. + + + + Returns an object by using the specified entity container name. If there is no entity container, the output parameter contains null; otherwise, it contains the first entity container. + + true if there is an entity container that matches the search criteria; otherwise, false. + The name of the entity container. + + When this method returns, it contains an object. If there is no entity container, this output parameter contains null; otherwise, it contains the first entity container. + + + + + Returns an object by using the specified entity container name. + + If there is no entity container, this method returns null; otherwise, it returns the first entity container. + The name of the entity container. + true to perform the case-insensitive search; otherwise, false. + + + + Returns an object by using the specified entity container name. If there is no entity container, this output parameter contains null; otherwise, it contains the first entity container. + + true if there is an entity container that matches the search criteria; otherwise, false. + The name of the entity container. + true to perform the case-insensitive search; otherwise, false. + + When this method returns, it contains an object. If there is no entity container, this output parameter contains null; otherwise, it contains the first entity container. + + + + Gets the data model associated with this item collection. + The data model associated with this item collection. + + + + EntityRecordInfo class providing a simple way to access both the type information and the column information. + + + + + Initializes a new instance of the class of a specific entity type with an enumerable collection of data fields and with specific key and entity set information. + + + The of the entity represented by the + + described by this + + object. + + + An enumerable collection of objects that represent column information. + + The key for the entity. + The entity set to which the entity belongs. + + + + Gets the for the entity. + + The key for the entity. + + + + Public Entity SQL Parser class. + + + + Parse the specified query with the specified parameters. + + The containing + + and information describing inline function definitions if any. + + The EntitySQL query to be parsed. + The optional query parameters. + + + + Parse a specific query with a specific set variables and produce a + + . + + + The containing + + and information describing inline function definitions if any. + + The query to be parsed. + The optional query variables. + + + + Entity SQL query inline function definition, returned as a part of . + + + + Function name. + + + Function body and parameters. + + + Start position of the function definition in the eSQL query text. + + + End position of the function definition in the eSQL query text. + + + + Entity SQL Parser result information. + + + + A command tree produced during parsing. + + + + List of objects describing query inline function definitions. + + + + + Compares objects using reference equality. + + + + + Gets the default instance. + + + + + Wraps access to the transaction object on the underlying store connection and ensures that the + Entity Framework executes commands on the database within the context of that transaction. + An instance of this class is retrieved by calling BeginTransaction() on the + + object. + + + + + Commits the underlying store transaction + + + + + Rolls back the underlying store transaction + + + + + Cleans up this transaction object and ensures the Entity Framework + is no longer using that transaction. + + + + + Releases the resources used by this transaction object + + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + + + + + + + + + + + + + + Gets the database (store) transaction that is underlying this context transaction. + + + + + A service for obtaining the correct from a given + . + + + On .NET 4.5 the provider is publicly accessible from the connection. On .NET 4 the + default implementation of this service uses some heuristics to find the matching + provider. If these fail then a new implementation of this service can be registered + on to provide an appropriate resolution. + + + + + Returns the for the given connection. + + The connection. + The provider factory for the connection. + + + + Explicitly implemented by to prevent certain members from showing up + in the IntelliSense of scaffolded migrations. + + + + + Adds a custom to the migration. + Custom operation implementors are encouraged to create extension methods on + that provide a fluent-style API for adding new operations. + + The operation to add. + + + + A default implementation of that uses the + underlying provider to get the manifest token. + Note that to avoid multiple queries, this implementation using caching based on the actual type of + instance, the property, + and the property. + + + + + A service for getting a provider manifest token given a connection. + The class is used by default and makes use of the + underlying provider to get the token which often involves opening the connection. + A different implementation can be used instead by adding an + to that may use any information in the connection to return + the token. For example, if the connection is known to point to a SQL Server 2008 database then + "2008" can be returned without opening the connection. + + + + + Returns the manifest token to use for the given connection. + + The connection for which a manifest token is required. + The manifest token to use. + + + + + + + A strategy that is used to execute a command or query against the database, possibly with logic to retry when a failure occurs. + + + + + Executes the specified operation. + + A delegate representing an executable operation that doesn't return any results. + + + + Executes the specified operation and returns the result. + + + The return type of . + + + A delegate representing an executable operation that returns the result of type . + + The result from the operation. + + + + Executes the specified asynchronous operation. + + A function that returns a started task. + + A cancellation token used to cancel the retry operation, but not operations that are already in flight + or that already completed successfully. + + + A task that will run to completion if the original task completes successfully (either the + first time or after retrying transient failures). If the task fails with a non-transient error or + the retry limit is reached, the returned task will become faulted and the exception must be observed. + + + + + Executes the specified asynchronous operation and returns the result. + + + The result type of the returned by . + + + A function that returns a started task of type . + + + A cancellation token used to cancel the retry operation, but not operations that are already in flight + or that already completed successfully. + + + A task that will run to completion if the original task completes successfully (either the + first time or after retrying transient failures). If the task fails with a non-transient error or + the retry limit is reached, the returned task will become faulted and the exception must be observed. + + + + + Indicates whether this might retry the execution after a failure. + + + + + Provides the base implementation of the retry mechanism for unreliable operations and transient conditions that uses + exponentially increasing delays between retries. + + + A new instance will be created each time an operation is executed. + The following formula is used to calculate the delay after retryCount number of attempts: + min(random(1, 1.1) * (2 ^ retryCount - 1), maxDelay) + The retryCount starts at 0. + The random factor distributes uniformly the retry attempts from multiple simultaneous operations failing simultaneously. + + + + + Creates a new instance of . + + + The default retry limit is 5, which means that the total amount of time spent between retries is 26 seconds plus the random factor. + + + + + Creates a new instance of with the specified limits for number of retries and the delay between retries. + + The maximum number of retry attempts. + The maximum delay in milliseconds between retries. + + + + Repetitively executes the specified operation while it satisfies the current retry policy. + + A delegate representing an executable operation that doesn't return any results. + if the retry delay strategy determines the operation shouldn't be retried anymore + if an existing transaction is detected and the execution strategy doesn't support it + if this instance was already used to execute an operation + + + + Repetitively executes the specified operation while it satisfies the current retry policy. + + The type of result expected from the executable operation. + + A delegate representing an executable operation that returns the result of type . + + The result from the operation. + if the retry delay strategy determines the operation shouldn't be retried anymore + if an existing transaction is detected and the execution strategy doesn't support it + if this instance was already used to execute an operation + + + + Repetitively executes the specified asynchronous operation while it satisfies the current retry policy. + + A function that returns a started task. + + A cancellation token used to cancel the retry operation, but not operations that are already in flight + or that already completed successfully. + + + A task that will run to completion if the original task completes successfully (either the + first time or after retrying transient failures). If the task fails with a non-transient error or + the retry limit is reached, the returned task will become faulted and the exception must be observed. + + if the retry delay strategy determines the operation shouldn't be retried anymore + if an existing transaction is detected and the execution strategy doesn't support it + if this instance was already used to execute an operation + + + + Repeatedly executes the specified asynchronous operation while it satisfies the current retry policy. + + + The result type of the returned by . + + + A function that returns a started task of type . + + + A cancellation token used to cancel the retry operation, but not operations that are already in flight + or that already completed successfully. + + + A task that will run to completion if the original task completes successfully (either the + first time or after retrying transient failures). If the task fails with a non-transient error or + the retry limit is reached, the returned task will become faulted and the exception must be observed. + + if the retry delay strategy determines the operation shouldn't be retried anymore + if an existing transaction is detected and the execution strategy doesn't support it + if this instance was already used to execute an operation + + + + Determines whether the operation should be retried and the delay before the next attempt. + + The exception thrown during the last execution attempt. + + Returns the delay indicating how long to wait for before the next execution attempt if the operation should be retried; + null otherwise + + + + + Recursively gets InnerException from as long as it's an + , or + and passes it to + + The type of the unwrapped exception. + The exception to be unwrapped. + A delegate that will be called with the unwrapped exception. + + The result from . + + + + + Determines whether the specified exception represents a transient failure that can be compensated by a retry. + + The exception object to be verified. + + true if the specified exception is considered as transient, otherwise false. + + + + + Returns true to indicate that might retry the execution after a failure. + + + + + Indicates whether the strategy is suspended. The strategy is typically suspending while executing to avoid + recursive execution from nested operations. + + + + + A key used for resolving . It consists of the ADO.NET provider invariant name + and the database server name as specified in the connection string. + + + + + Initializes a new instance of + + + The ADO.NET provider invariant name indicating the type of ADO.NET connection for which this execution strategy will be used. + + A string that will be matched against the server name in the connection string. + + + + + + + + + + The ADO.NET provider invariant name indicating the type of ADO.NET connection for which this execution strategy will be used. + + + + + A string that will be matched against the server name in the connection string. + + + + + Implement this interface on your context to use custom logic to calculate the key used to lookup an already created model in the cache. + This interface allows you to have a single context type that can be used with different models in the same AppDomain, + or multiple context types that use the same model. + + + + Gets the cached key associated with the provider. + The cached key associated with the provider. + + + + Used by and when resolving + a provider invariant name from a . + + + + Gets the name of the provider. + The name of the provider. + + + + Represents a custom pluralization term to be used by the + + + + + Create a new instance + + A non null or empty string representing the singular. + A non null or empty string representing the plural. + + + + Get the singular. + + + + + Get the plural. + + + + + Default pluralization service implementation to be used by Entity Framework. This pluralization + service is based on English locale. + + + + + Pluralization services to be used by the EF runtime implement this interface. + By default the is used, but the pluralization service to use + can be set in a class derived from . + + + + + Pluralize a word using the service. + + The word to pluralize. + The pluralized word + + + + Singularize a word using the service. + + The word to singularize. + The singularized word. + + + + Constructs a new instance of default pluralization service + used in Entity Framework. + + + + + Constructs a new instance of default pluralization service + used in Entity Framework. + + + A collection of user dictionary entries to be used by this service.These inputs + can customize the service according the user needs. + + + + Returns the plural form of the specified word. + The plural form of the input parameter. + The word to be made plural. + + + Returns the singular form of the specified word. + The singular form of the input parameter. + The word to be made singular. + + + + The exception that is thrown when the action failed again after being retried the configured number of times. + + + + + Provider exception - Used by the entity client. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + The error message that explains the reason for the exception. + The exception that caused the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + + The that holds the serialized object data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Initializes a new instance of the class with no error message. + + + + + Initializes a new instance of the class with a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class. + + The message that describes the error. + The exception that is the cause of the current exception. + + + + An that doesn't retry operations if they fail. + + + + + Executes the specified operation once. + + A delegate representing an executable operation that doesn't return any results. + + + + Executes the specified operation once and returns the result. + + + The return type of . + + + A delegate representing an executable operation that returns the result of type . + + The result from the operation. + + + + Executes the specified asynchronous operation once, without retrying on failure. + + A function that returns a started task. + + A cancellation token used to cancel the retry operation, but not operations that are already in flight + or that already completed successfully. + + + A task that will run to completion if the original task completes successfully. + + + + + Executes the specified asynchronous operation once, without retrying on failure. + + + The result type of the returned by . + + A function that returns a started task. + + A cancellation token used to cancel the retry operation, but not operations that are already in flight + or that already completed successfully. + + + A task that will run to completion if the original task completes successfully. + + + + + Returns false to indicate that will not retry the execution after a failure. + + + + + Asynchronous version of the interface that allows elements to be retrieved asynchronously. + This interface is used to interact with Entity Framework queries and shouldn't be implemented by custom classes. + + + + + Gets an enumerator that can be used to asynchronously enumerate the sequence. + + Enumerator for asynchronous enumeration over the sequence. + + + + Asynchronous version of the interface that allows elements of the enumerable sequence to be retrieved asynchronously. + This interface is used to interact with Entity Framework queries and shouldn't be implemented by custom classes. + + The type of objects to enumerate. + + + + Gets an enumerator that can be used to asynchronously enumerate the sequence. + + Enumerator for asynchronous enumeration over the sequence. + + + + Represents a SQL query for entities that is created from a + and is executed using the connection from that context. + Instances of this class are obtained from the instance for the + entity type. The query is not executed when this object is created; it is executed + each time it is enumerated, for example by using foreach. + SQL queries for non-entities are created using . + See for a generic version of this class. + + + + + Represents a SQL query for non-entities that is created from a + and is executed using the connection from that context. + Instances of this class are obtained from the instance. + The query is not executed when this object is created; it is executed + each time it is enumerated, for example by using foreach. + SQL queries for entities are created using . + See for a generic version of this class. + + + + + Returns a new query that will stream the results instead of buffering. + + A new query with AsStreaming applied. + + + + Returns an which when enumerated will execute the SQL query against the database. + + + An object that can be used to iterate through the elements. + + + + + Returns an which when enumerated will execute the SQL query against the database. + + + An object that can be used to iterate through the elements. + + + + + Asynchronously enumerates the query results and performs the specified action on each element. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + The action to perform on each element. + A task that represents the asynchronous operation. + + + + Asynchronously enumerates the query results and performs the specified action on each element. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + The action to perform on each element. + + A to observe while waiting for the task to complete. + + A task that represents the asynchronous operation. + + + + Creates a from the query by enumerating it asynchronously. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A task that represents the asynchronous operation. + The task result contains a that contains elements from the query. + + + + + Creates a from the query by enumerating it asynchronously. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains a that contains elements from the query. + + + + + Returns a that contains the SQL string that was set + when the query was created. The parameters are not included. + + + A that represents this instance. + + + + + Throws an exception indicating that binding directly to a store query is not supported. + + Never returns; always throws. + + + + + + + + + + + + + Returns false. + + + false . + + + + + Creates an instance of a when called from the constructor of a derived + type that will be used as a test double for . Methods and properties + that will be used by the test double must be implemented by the test double except AsNoTracking + and AsStreaming where the default implementation is a no-op. + + + + + Returns a new query where the results of the query will not be tracked by the associated + . + + A new query with NoTracking applied. + + + + Returns a new query that will stream the results instead of buffering. + + A new query with AsStreaming applied. + + + + + + + + + + + + + + + + Represents a SQL query for entities that is created from a + and is executed using the connection from that context. + Instances of this class are obtained from the instance for the + entity type. The query is not executed when this object is created; it is executed + each time it is enumerated, for example by using foreach. + SQL queries for non-entities are created using . + See for a non-generic version of this class. + + The type of entities returned by the query. + + + + Represents a SQL query for non-entities that is created from a + and is executed using the connection from that context. + Instances of this class are obtained from the instance. + The query is not executed when this object is created; it is executed + each time it is enumerated, for example by using foreach. + SQL queries for entities are created using . + See for a non-generic version of this class. + + The type of elements returned by the query. + + + + Returns a new query that will stream the results instead of buffering. + + A new query with AsStreaming applied. + + + + Returns an which when enumerated will execute the SQL query against the database. + + + An object that can be used to iterate through the elements. + + + + + Returns an which when enumerated will execute the SQL query against the database. + + + An object that can be used to iterate through the elements. + + + + + Returns an which when enumerated will execute the SQL query against the database. + + + An object that can be used to iterate through the elements. + + + + + Returns an which when enumerated will execute the SQL query against the database. + + + An object that can be used to iterate through the elements. + + + + + Asynchronously enumerates the query results and performs the specified action on each element. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + The action to be executed. + A task that represents the asynchronous operation. + + + + Asynchronously enumerates the query results and performs the specified action on each element. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + The action to be executed. + + A to observe while waiting for the task to complete. + + A task that represents the asynchronous operation. + + + + Creates a from the query by enumerating it asynchronously. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A task that represents the asynchronous operation. + The task result contains a that contains elements from the input sequence. + + + + + Creates a from the query by enumerating it asynchronously. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains a that contains elements from the input sequence. + + + + + Creates an array from the query by enumerating it asynchronously. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A task that represents the asynchronous operation. + The task result contains an array that contains elements from the input sequence. + + + + + Creates an array from the query by enumerating it asynchronously. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains an array that contains elements from the input sequence. + + + + + Creates a from the query by enumerating it asynchronously + according to a specified key selector function. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the key returned by . + + A function to extract a key from each element. + + A task that represents the asynchronous operation. + The task result contains a that contains selected keys and values. + + + + + Creates a from the query by enumerating it asynchronously + according to a specified key selector function. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the key returned by . + + A function to extract a key from each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains a that contains selected keys and values. + + + + + Creates a from the query by enumerating it asynchronously + according to a specified key selector function and a comparer. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the key returned by . + + A function to extract a key from each element. + + An to compare keys. + + + A task that represents the asynchronous operation. + The task result contains a that contains selected keys and values. + + + + + Creates a from the query by enumerating it asynchronously + according to a specified key selector function and a comparer. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the key returned by . + + A function to extract a key from each element. + + An to compare keys. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains a that contains selected keys and values. + + + + + Creates a from the query by enumerating it asynchronously + according to a specified key selector and an element selector function. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the key returned by . + + + The type of the value returned by . + + A function to extract a key from each element. + A transform function to produce a result element value from each element. + + A task that represents the asynchronous operation. + The task result contains a that contains values of type + selected from the query. + + + + + Creates a from the query by enumerating it asynchronously + according to a specified key selector and an element selector function. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the key returned by . + + + The type of the value returned by . + + A function to extract a key from each element. + A transform function to produce a result element value from each element. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains a that contains values of type + selected from the query. + + + + + Creates a from the query by enumerating it asynchronously + according to a specified key selector function, a comparer, and an element selector function. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the key returned by . + + + The type of the value returned by . + + A function to extract a key from each element. + A transform function to produce a result element value from each element. + + An to compare keys. + + + A task that represents the asynchronous operation. + The task result contains a that contains values of type + selected from the input sequence. + + + + + Creates a from the query by enumerating it asynchronously + according to a specified key selector function, a comparer, and an element selector function. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The type of the key returned by . + + + The type of the value returned by . + + A function to extract a key from each element. + A transform function to produce a result element value from each element. + + An to compare keys. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains a that contains values of type + selected from the input sequence. + + + + + Asynchronously returns the first element of the query. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A task that represents the asynchronous operation. + The task result contains the first element in the query result. + + The query result is empty. + + + + Asynchronously returns the first element of the query. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the first element in the query result. + + The query result is empty. + + + + Asynchronously returns the first element of the query that satisfies a specified condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + A function to test each element for a condition. + + A task that represents the asynchronous operation. + The task result contains the first element in the query result that satisfies a specified condition. + + + + is + null + . + + The query result is empty. + + + + Asynchronously returns the first element of the query that satisfies a specified condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + A function to test each element for a condition. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the first element in the query result that satisfies a specified condition. + + + + is + null + . + + The query result is empty. + + + + Asynchronously returns the first element of the query, or a default value if the the query result contains no elements. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A task that represents the asynchronous operation. + The task result contains default ( ) if query result is empty; + otherwise, the first element in the query result. + + + + + Asynchronously returns the first element of the query, or a default value if the the query result contains no elements. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains default ( ) if query result is empty; + otherwise, the first element in the query result. + + + + + Asynchronously returns the first element of the query that satisfies a specified condition + or a default value if no such element is found. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + A function to test each element for a condition. + + A task that represents the asynchronous operation. + The task result contains default ( ) if query result is empty + or if no element passes the test specified by ; otherwise, the first element + in the query result that passes the test specified by . + + + + is + null + . + + + + + Asynchronously returns the first element of the query that satisfies a specified condition + or a default value if no such element is found. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + A function to test each element for a condition. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains default ( ) if query result is empty + or if no element passes the test specified by ; otherwise, the first element + in the query result that passes the test specified by . + + + + is + null + . + + + + + Asynchronously returns the only element of the query, and throws an exception + if there is not exactly one element in the sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A task that represents the asynchronous operation. + The task result contains the single element of the query result. + + The query result has more than one element. + The query result is empty. + + + + Asynchronously returns the only element of the query, and throws an exception + if there is not exactly one element in the sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the single element of the query result. + + The query result has more than one element. + The query result is empty. + + + + Asynchronously returns the only element of the query that satisfies a specified condition, + and throws an exception if more than one such element exists. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + A function to test each element for a condition. + + A task that represents the asynchronous operation. + The task result contains the single element of the query result that satisfies the condition in + . + + + + is + null + . + + + No element satisfies the condition in + + . + + + More than one element satisfies the condition in + + . + + + + + Asynchronously returns the only element of the query that satisfies a specified condition, + and throws an exception if more than one such element exists. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + A function to test each element for a condition. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the single element of the query result that satisfies the condition in + . + + + + is + null + . + + + No element satisfies the condition in + + . + + + More than one element satisfies the condition in + + . + + + + + Asynchronously returns the only element of a sequence, or a default value if the sequence is empty; + this method throws an exception if there is more than one element in the sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A task that represents the asynchronous operation. + The task result contains the single element of the query result, or default () + if the sequence contains no elements. + + The query result has more than one element. + + + + Asynchronously returns the only element of a sequence, or a default value if the sequence is empty; + this method throws an exception if there is more than one element in the sequence. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the single element of the query result, or default () + if the sequence contains no elements. + + The query result has more than one element. + + + + Asynchronously returns the only element of the query that satisfies a specified condition or + a default value if no such element exists; this method throws an exception if more than one element + satisfies the condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + A function to test each element for a condition. + + A task that represents the asynchronous operation. + The task result contains the single element of the query result that satisfies the condition in + , or default ( ) if no such element is found. + + + + is + null + . + + + More than one element satisfies the condition in + + . + + + + + Asynchronously returns the only element of the query that satisfies a specified condition or + a default value if no such element exists; this method throws an exception if more than one element + satisfies the condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + A function to test each element for a condition. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the single element of the query result that satisfies the condition in + , or default ( ) if no such element is found. + + + + is + null + . + + + More than one element satisfies the condition in + + . + + + + + Asynchronously determines whether the query contains a specified element by using the default equality comparer. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + The object to locate in the query result. + + A task that represents the asynchronous operation. + The task result contains true if the query result contains the specified value; otherwise, false. + + + + + Asynchronously determines whether the query contains a specified element by using the default equality comparer. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + The object to locate in the query result. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains true if the query result contains the specified value; otherwise, false. + + + + + Asynchronously determines whether the query contains any elements. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A task that represents the asynchronous operation. + The task result contains true if the query result contains any elements; otherwise, false. + + + + + Asynchronously determines whether the query contains any elements. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains true if the query result contains any elements; otherwise, false. + + + + + Asynchronously determines whether any element of the query satisfies a condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + A function to test each element for a condition. + + A task that represents the asynchronous operation. + The task result contains true if any elements in the query result pass the test in the specified predicate; otherwise, false. + + + + + Asynchronously determines whether any element of the query satisfies a condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + A function to test each element for a condition. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains true if any elements in the query result pass the test in the specified predicate; otherwise, false. + + + + + Asynchronously determines whether all the elements of the query satisfy a condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + A function to test each element for a condition. + + A task that represents the asynchronous operation. + The task result contains true if every element of the query result passes the test in the specified predicate; otherwise, false. + + + + is + null + . + + + + + Asynchronously determines whether all the elements of the query satisfy a condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + A function to test each element for a condition. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains true if every element of the query result passes the test in the specified predicate; otherwise, false. + + + + is + null + . + + + + + Asynchronously returns the number of elements in the query. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A task that represents the asynchronous operation. + The task result contains the number of elements in the query result. + + + The number of elements in the query result is larger than + + . + + + + + Asynchronously returns the number of elements in the query. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the number of elements in the query result. + + + The number of elements in the query result is larger than + + . + + + + + Asynchronously returns the number of elements in the query that satisfy a condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + A function to test each element for a condition. + + A task that represents the asynchronous operation. + The task result contains the number of elements in the query result that satisfy the condition in the predicate function. + + + The number of elements in the query result that satisfy the condition in the predicate function + is larger than + + . + + + + + Asynchronously returns the number of elements in the query that satisfy a condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + A function to test each element for a condition. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the number of elements in the query result that satisfy the condition in the predicate function. + + + The number of elements in the query result that satisfy the condition in the predicate function + is larger than + + . + + + + + Asynchronously returns an that represents the total number of elements in the query. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A task that represents the asynchronous operation. + The task result contains the number of elements in the query result. + + + The number of elements in the query result is larger than + + . + + + + + Asynchronously returns an that represents the total number of elements in the query. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the number of elements in the query result. + + + The number of elements in the query result is larger than + + . + + + + + Asynchronously returns an that represents the number of elements in the query + that satisfy a condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + A function to test each element for a condition. + + A task that represents the asynchronous operation. + The task result contains the number of elements in the query result that satisfy the condition in the predicate function. + + + The number of elements in the query result that satisfy the condition in the predicate function + is larger than + + . + + + + + Asynchronously returns an that represents the number of elements in the query + that satisfy a condition. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + A function to test each element for a condition. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the number of elements in the query result that satisfy the condition in the predicate function. + + + The number of elements in the query result that satisfy the condition in the predicate function + is larger than + + . + + + + + Asynchronously returns the minimum value of the query. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A task that represents the asynchronous operation. + The task result contains the minimum value in the query result. + + + + + Asynchronously returns the minimum value of the query. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the minimum value in the query result. + + + + + Asynchronously returns the maximum value of the query. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A task that represents the asynchronous operation. + The task result contains the maximum value in the query result. + + + + + Asynchronously returns the maximum value of the query. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the maximum value in the query result. + + + + + Returns a that contains the SQL string that was set + when the query was created. The parameters are not included. + + + A that represents this instance. + + + + + Throws an exception indicating that binding directly to a store query is not supported. + + Never returns; always throws. + + + + + + + + + + + + + Returns false. + + + false . + + + + + Creates an instance of a when called from the constructor of a derived + type that will be used as a test double for . Methods and properties + that will be used by the test double must be implemented by the test double except AsNoTracking and + AsStreaming where the default implementation is a no-op. + + + + + Returns a new query where the entities returned will not be cached in the . + + A new query with NoTracking applied. + + + + Returns a new query that will stream the results instead of buffering. + + A new query with AsStreaming applied. + + + + + + + + + + + + + + + + Asynchronous version of the interface that allows elements to be retrieved asynchronously. + This interface is used to interact with Entity Framework queries and shouldn't be implemented by custom classes. + + + + + Advances the enumerator to the next element in the sequence, returning the result asynchronously. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the sequence. + + + + + Gets the current element in the iteration. + + + + + Defines methods to create and asynchronously execute queries that are described by an + object. + This interface is used to interact with Entity Framework queries and shouldn't be implemented by custom classes. + + + + + Asynchronously executes the query represented by a specified expression tree. + + An expression tree that represents a LINQ query. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the value that results from executing the specified query. + + + + + Asynchronously executes the strongly-typed query represented by a specified expression tree. + + The type of the value that results from executing the query. + An expression tree that represents a LINQ query. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the value that results from executing the specified query. + + + + + Asynchronous version of the interface that allows elements to be retrieved asynchronously. + This interface is used to interact with Entity Framework queries and shouldn't be implemented by custom classes. + + The type of objects to enumerate. + + + + Gets the current element in the iteration. + + + + + Represents a key value that uniquely identifies an Entity Framework model that has been loaded into memory. + + + + Determines whether the current cached model key is equal to the specified cached model key. + true if the current cached model key is equal to the specified cached model key; otherwise, false. + The cached model key to compare to the current cached model key. + + + Returns the hash function for this cached model key. + The hash function for this cached model key. + + + + Thrown when an operation can't be performed because there are existing migrations that have not been applied to the database. + + + + + Represents errors that occur inside the Code First Migrations pipeline. + + + + + Initializes a new instance of the MigrationsException class. + + + + + Initializes a new instance of the MigrationsException class. + + The message that describes the error. + + + + Initializes a new instance of the MigrationsException class. + + The message that describes the error. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the MigrationsException class with serialized data. + + + The that holds the serialized object data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Initializes a new instance of the MigrationsPendingException class. + + + + + Initializes a new instance of the MigrationsPendingException class. + + The message that describes the error. + + + + Initializes a new instance of the MigrationsPendingException class. + + The message that describes the error. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + A migration operation to add a new stored procedure to the database. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The name of the stored procedure. + The body of the stored procedure expressed in SQL. + Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets an operation to drop the stored procedure. + + + + + Allows configuration to be performed for a lightweight convention based on + the properties in a model. + + + + + Filters the properties that this convention applies to based on a predicate. + + A function to test each property for a condition. + + A instance so that multiple calls can be chained. + + + + + Filters the properties that this convention applies to based on a predicate + while capturing a value to use later during configuration. + + Type of the captured value. + + A function to capture a value for each property. If the value is null, the + property will be filtered out. + + + A instance so that multiple calls can be chained. + + + + + Allows configuration of the properties that this convention applies to. + + + An action that performs configuration against a + + . + + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Allows configuration to be performed for a lightweight convention based on + the properties of entity types in a model and a captured value. + + The type of the captured value. + + + + Allows configuration of the properties that this convention applies to. + + + An action that performs configuration against a + using a captured value. + + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Allows configuration to be performed for a stored procedure that is used to modify a relationship. + + The type of the entity that the relationship is being configured from. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the parameter. + The type of the property. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the parameter. + The type of the property. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the parameter. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the parameter. + + + + Creates a convention that configures stored procedures to be used to delete entities in the database. + + + + + Creates a convention that configures stored procedures to be used to modify entities in the database. + + + + Configures the name of the stored procedure. + The same configuration instance so that multiple calls can be chained. + The stored procedure name. + + + Configures the name of the stored procedure. + The same configuration instance so that multiple calls can be chained. + The stored procedure name. + The schema name. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + The name of the property to configure the parameter for. + The name of the parameter. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + The property to configure the parameter for. + The name of the parameter. + + + Configures the output parameter that returns the rows affected by this stored procedure. + The same configuration instance so that multiple calls can be chained. + The name of the parameter. + + + + + + + + + + + + + + + + Creates a convention that configures stored procedures to be used to insert entities in the database. + + + + Configures the name of the stored procedure. + The same configuration instance so that multiple calls can be chained. + The stored procedure name. + + + Configures the name of the stored procedure. + The same configuration instance so that multiple calls can be chained. + The stored procedure name. + The schema name. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + The name of the property to configure the parameter for. + The name of the parameter. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + The property to configure the parameter for. + The name of the parameter. + + + + Configures a column of the result for this stored procedure to map to a property. + This is used for database generated columns. + + The same configuration instance so that multiple calls can be chained. + The name of the property to configure the result for. + The name of the result column. + + + + Configures a column of the result for this stored procedure to map to a property. + This is used for database generated columns. + + The same configuration instance so that multiple calls can be chained. + The property to configure the result for. + The name of the result column. + + + + + + + + + + + + + + + + Creates a convention that configures stored procedures to be used to modify entities in the database. + + + + Configures stored procedure used to insert entities. + The same configuration instance so that multiple calls can be chained. + A lambda expression that performs configuration for the stored procedure. + + + Configures stored procedure used to update entities. + The same configuration instance so that multiple calls can be chained. + A lambda expression that performs configuration for the stored procedure. + + + Configures stored procedure used to delete entities. + The same configuration instance so that multiple calls can be chained. + A lambda expression that performs configuration for the stored procedure. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Creates a convention that configures stored procedures to be used to update entities in the database. + + + + Configures the name of the stored procedure. + The same configuration instance so that multiple calls can be chained. + The stored procedure name. + + + Configures the name of the stored procedure. + The same configuration instance so that multiple calls can be chained. + The stored procedure name. + The schema name. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + The name of the property to configure the parameter for. + The name of the parameter. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + The property to configure the parameter for. + The name of the parameter. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + The name of the property to configure the parameter for. + The current value parameter name. + The original value parameter name. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + The property to configure the parameter for. + The current value parameter name. + The original value parameter name. + + + + Configures a column of the result for this stored procedure to map to a property. + This is used for database generated columns. + + The same configuration instance so that multiple calls can be chained. + The name of the property to configure the result for. + The name of the result column. + + + + Configures a column of the result for this stored procedure to map to a property. + This is used for database generated columns. + + The same configuration instance so that multiple calls can be chained. + The property to configure the result for. + The name of the result column. + + + Configures the output parameter that returns the rows affected by this stored procedure. + The same configuration instance so that multiple calls can be chained. + The name of the parameter. + + + + + + + + + + + + + + + + Allows configuration to be performed for a stored procedure that is used to modify a many to many relationship. + + The type of the entity that the relationship is being configured from. + The type of the entity that the other end of the relationship targets. + + + + Performs configuration of a stored procedure uses to modify an entity in the database. + + + + + Sets the name of the stored procedure. + + Name of the procedure. + The same configuration instance so that multiple calls can be chained. + + + + Sets the name of the stored procedure. + + Name of the procedure. + Name of the schema. + The same configuration instance so that multiple calls can be chained. + + + + Configures the parameter for the left key value(s). + + The type of the property to configure. + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + Name of the parameter. + The same configuration instance so that multiple calls can be chained. + + + + Configures the parameter for the left key value(s). + + The type of the property to configure. + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + Name of the parameter. + The same configuration instance so that multiple calls can be chained. + + + + Configures the parameter for the left key value(s). + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + Name of the parameter. + The same configuration instance so that multiple calls can be chained. + + + + Configures the parameter for the left key value(s). + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + Name of the parameter. + The same configuration instance so that multiple calls can be chained. + + + + Configures the parameter for the right key value(s). + + The type of the property to configure. + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + Name of the parameter. + The same configuration instance so that multiple calls can be chained. + + + + Configures the parameter for the right key value(s). + + The type of the property to configure. + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + Name of the parameter. + The same configuration instance so that multiple calls can be chained. + + + + Configures the parameter for the right key value(s). + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + Name of the parameter. + The same configuration instance so that multiple calls can be chained. + + + + Configures the parameter for the right key value(s). + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + Name of the parameter. + The same configuration instance so that multiple calls can be chained. + + + + + + + + + + + + + + + + Allows configuration to be performed for a stored procedure that is used to modify a many to many relationship. + + The type of the entity that the relationship is being configured from. + The type of the entity that the other end of the relationship targets. + + + Configures stored procedure used to insert relationships. + The same configuration instance so that multiple calls can be chained. + A lambda expression that performs configuration for the stored procedure. + + + Configures stored procedure used to delete relationships. + The same configuration instance so that multiple calls can be chained. + A lambda expression that performs configuration for the stored procedure. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Allows configuration to be performed for a stored procedure that is used to delete entities. + + The type of the entity that the stored procedure can be used to delete. + + + Configures the name of the stored procedure. + The same configuration instance so that multiple calls can be chained. + The stored procedure name. + + + Configures the name of the stored procedure. + The same configuration instance so that multiple calls can be chained. + The stored procedure name. + The schema name. + + + Configures a parameter for this stored procedure. + The type of the property to configure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the parameter. + + + Configures a parameter for this stored procedure. + The type of the property to configure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the parameter. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the parameter. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the parameter. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the parameter. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the parameter. + + + Configures the output parameter that returns the rows affected by this stored procedure. + The same configuration instance so that multiple calls can be chained. + The name of the parameter. + + + Configures parameters for a relationship where the foreign key property is not included in the class. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the navigation property for the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A lambda expression that performs the configuration. + The type of the principal entity in the relationship. + + + Configures parameters for a relationship where the foreign key property is not included in the class. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the navigation property for the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A lambda expression that performs the configuration. + The type of the principal entity in the relationship. + + + + + + + + + + + + + + + + Allows configuration to be performed for a stored procedure that is used to insert entities. + + The type of the entity that the stored procedure can be used to insert. + + + Configures the name of the stored procedure. + The same configuration instance so that multiple calls can be chained. + The stored procedure name. + + + Configures the name of the stored procedure. + The same configuration instance so that multiple calls can be chained. + The stored procedure name. + The schema name. + + + Configures a parameter for this stored procedure. + The type of the property to configure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the parameter. + + + Configures a parameter for this stored procedure. + The type of the property to configure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the parameter. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the parameter. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the parameter. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the parameter. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the parameter. + + + + Configures a column of the result for this stored procedure to map to a property. + This is used for database generated columns. + + The type of the property to configure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the result column. + + + + Configures a column of the result for this stored procedure to map to a property. + This is used for database generated columns. + + The type of the property to configure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the result column. + + + + Configures a column of the result for this stored procedure to map to a property. + This is used for database generated columns. + + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the result column. + + + + Configures a column of the result for this stored procedure to map to a property. + This is used for database generated columns. + + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the result column. + + + + Configures a column of the result for this stored procedure to map to a property. + This is used for database generated columns. + + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the result column. + + + + Configures a column of the result for this stored procedure to map to a property. + This is used for database generated columns. + + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the result column. + + + Configures parameters for a relationship where the foreign key property is not included in the class. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the navigation property for the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A lambda expression that performs the configuration. + The type of the principal entity in the relationship. + + + Configures parameters for a relationship where the foreign key property is not included in the class. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the navigation property for the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A lambda expression that performs the configuration. + The type of the principal entity in the relationship. + + + + + + + + + + + + + + + + Allows configuration to be performed for a stored procedure that is used to update entities. + + The type of the entity that the stored procedure can be used to update. + + + Configures the name of the stored procedure. + The same configuration instance so that multiple calls can be chained. + The stored procedure name. + + + Configures the name of the stored procedure. + The same configuration instance so that multiple calls can be chained. + The stored procedure name. + The schema name. + + + Configures a parameter for this stored procedure. + The type of the property to configure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the parameter. + + + Configures a parameter for this stored procedure. + The type of the property to configure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the parameter. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the parameter. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the parameter. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the parameter. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the parameter. + + + Configures a parameter for this stored procedure. + The type of the property to configure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The current value parameter name. + The original value parameter name. + + + Configures a parameter for this stored procedure. + The type of the property to configure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The current value parameter name. + The original value parameter name. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The current value parameter name. + The original value parameter name. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The current value parameter name. + The original value parameter name. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The current value parameter name. + The original value parameter name. + + + Configures a parameter for this stored procedure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The current value parameter name. + The original value parameter name. + + + + Configures a column of the result for this stored procedure to map to a property. + This is used for database generated columns. + + The type of the property to configure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the result column. + + + + Configures a column of the result for this stored procedure to map to a property. + This is used for database generated columns. + + The type of the property to configure. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the result column. + + + + Configures a column of the result for this stored procedure to map to a property. + This is used for database generated columns. + + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the result column. + + + + Configures a column of the result for this stored procedure to map to a property. + This is used for database generated columns. + + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the result column. + + + + Configures a column of the result for this stored procedure to map to a property. + This is used for database generated columns. + + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the result column. + + + + Configures a column of the result for this stored procedure to map to a property. + This is used for database generated columns. + + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The name of the result column. + + + Configures the output parameter that returns the rows affected by this stored procedure. + The same configuration instance so that multiple calls can be chained. + The name of the parameter. + + + Configures parameters for a relationship where the foreign key property is not included in the class. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the navigation property for the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A lambda expression that performs the configuration. + The type of the principal entity in the relationship. + + + Configures parameters for a relationship where the foreign key property is not included in the class. + The same configuration instance so that multiple calls can be chained. + A lambda expression representing the navigation property for the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A lambda expression that performs the configuration. + The type of the principal entity in the relationship. + + + + + + + + + + + + + + + + Allows configuration to be performed for a stored procedure that is used to modify entities. + + The type of the entity that the stored procedure can be used to modify. + + + Configures stored procedure used to insert entities. + The same configuration instance so that multiple calls can be chained. + A lambda expression that performs configuration for the stored procedure. + + + Configures stored procedure used to update entities. + The same configuration instance so that multiple calls can be chained. + A lambda expression that performs configuration for the stored procedure. + + + Configures stored procedure used to delete entities. + The same configuration instance so that multiple calls can be chained. + A lambda expression that performs configuration for the stored procedure. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Used to configure a primitive property of an entity type or complex type. + This configuration functionality is available via lightweight conventions. + + + + + Configures the name of the database column used to store the property. + + The name of the column. + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + + + + + Sets an annotation in the model for the database column used to store the property. The annotation + value can later be used when processing the column such as when creating migrations. + + + It will likely be necessary to register a if the type of + the annotation value is anything other than a string. Calling this method will have no effect if the + annotation with the given name has already been configured. + + The annotation name, which must be a valid C#/EDM identifier. + The annotation value, which may be a string or some other type that + can be serialized with an . + The same configuration instance so that multiple calls can be chained. + + + + Configures the name of the parameter used in stored procedures for this property. + + Name of the parameter. + + The same instance so that multiple calls can be chained. + + + + + Configures the order of the database column used to store the property. + This method is also used to specify key ordering when an entity type has a composite key. + + The order that this column should appear in the database table. + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + + + + + Configures the data type of the database column used to store the property. + + Name of the database provider specific data type. + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + + + + + Configures the property to be used as an optimistic concurrency token. + + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + + + + + Configures whether or not the property is to be used as an optimistic concurrency token. + + Value indicating if the property is a concurrency token or not. + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + + + + + Configures how values for the property are generated by the database. + + The pattern used to generate values for the property in the database. + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + + + + + Configures the property to be optional. + The database column used to store this property will be nullable. + + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + + + + + Configures the property to be required. + The database column used to store this property will be non-nullable. + + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + + + + + Configures the property to support Unicode string content. + + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + This method throws if the property is not a . + + + + + Configures whether or not the property supports Unicode string content. + + Value indicating if the property supports Unicode string content or not. + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + This method throws if the property is not a . + + + + + Configures the property to be fixed length. + Use HasMaxLength to set the length that the property is fixed to. + + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + This method throws if the property does not have length facets. + + + + + Configures the property to be variable length. + Properties are variable length by default. + + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + This method throws if the property does not have length facets. + + + + + Configures the property to have the specified maximum length. + + The maximum length for the property. + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + This method throws if the property does not have length facets. + + + + + Configures the property to allow the maximum length supported by the database provider. + + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + This method throws if the property does not have length facets. + + + + + Configures the precision of the property. + If the database provider does not support precision for the data type of the column then the value is ignored. + + Precision of the property. + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + This method will throw if the property is not a . + + + + + Configures the precision and scale of the property. + + The precision of the property. + The scale of the property. + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + This method will throw if the property is not a . + + + + + Configures the property to be a row version in the database. + The actual data type will vary depending on the database provider being used. + Setting the property to be a row version will automatically configure it to be an + optimistic concurrency token. + + + The same instance so that multiple calls can be chained. + + + Calling this will have no effect once it has been configured. + This method throws if the property is not a . + + + + + Configures this property to be part of the entity type's primary key. + + + The same instance so that + multiple calls can be chained. + + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Gets the for this property. + + + + + An implementation of that does nothing. Using this + initializer disables database initialization for the given context type. Passing an instance + of this class to is equivalent to passing null. + When is being used to resolve initializers an instance of + this class must be used to disable initialization. + + The type of the context. + + + + + + + FieldMetadata class providing the correlation between the column ordinals and MemberMetadata. + + + + + Initializes a new object with the specified ordinal value and field type. + + An integer specified the location of the metadata. + The field type. + + + + Gets the type of field for this object. + + + The type of field for this object. + + + + + Gets the ordinal for this object. + + An integer representing the ordinal value. + + + + Class representing a parameter collection used in EntityCommand + + + + + Adds the specified object to the . + + + The index of the new object. + + + An . + + + + + Adds an array of values to the end of the + + . + + + The values to add. + + + + + Removes all the objects from the + + . + + + + + Determines whether the specified is in this + + . + + + true if the contains the value; otherwise false. + + + The value. + + + + + Copies all the elements of the current to the specified one-dimensional + + starting at the specified destination index. + + + The one-dimensional that is the destination of the elements copied from the current + + . + + + A 32-bit integer that represents the index in the at which copying starts. + + + + + Returns an enumerator that iterates through the + + . + + + An for the + + . + + + + + + + + + + + Gets the location of the specified with the specified name. + + + The zero-based location of the specified with the specified case-sensitive name. Returns -1 when the object does not exist in the + + . + + + The case-sensitive name of the to find. + + + + + Gets the location of the specified in the collection. + + + The zero-based location of the specified that is a + + in the collection. Returns -1 when the object does not exist in the + + . + + + The to find. + + + + + Inserts an into the + + at the specified index. + + The zero-based index at which value should be inserted. + + An to be inserted in the + + . + + + + Removes the specified parameter from the collection. + + A object to remove from the collection. + + + + + Removes the from the + + at the specified index. + + + The zero-based index of the object to remove. + + + + + Removes the from the + + at the specified parameter name. + + + The name of the to remove. + + + + + + + + + + + Adds the specified object to the + + . + + + A new object. + + + The to add to the collection. + + + The specified in the value parameter is already added to this or another + + . + + + The parameter passed was not a . + + The value parameter is null. + + + + Adds a value to the end of the . + + + A object. + + The name of the parameter. + The value to be added. + + + + Adds a to the + + given the parameter name and the data type. + + + A new object. + + The name of the parameter. + + One of the values. + + + + + Adds a to the + + with the parameter name, the data type, and the column length. + + + A new object. + + The name of the parameter. + + One of the values. + + The column length. + + + + Adds an array of values to the end of the + + . + + + The values to add. + + + + + Determines whether the specified is in this + + . + + + true if the contains the value; otherwise false. + + + The value. + + + + + Copies all the elements of the current to the specified + + starting at the specified destination index. + + + The that is the destination of the elements copied from the current + + . + + + A 32-bit integer that represents the index in the + + at which copying starts. + + + + + Gets the location of the specified in the collection. + + + The zero-based location of the specified that is a + + in the collection. Returns -1 when the object does not exist in the + + . + + + The to find. + + + + + Inserts a object into the + + at the specified index. + + The zero-based index at which value should be inserted. + + A object to be inserted in the + + . + + + + + Removes the specified from the collection. + + + A object to remove from the collection. + + + The parameter is not a . + + The parameter does not exist in the collection. + + + + Gets an Integer that contains the number of elements in the + + . + + + The number of elements in the as an Integer. + + + + + Gets a value that indicates whether the + + has a fixed size. + + + Returns true if the has a fixed size; otherwise false. + + + + + Gets a value that indicates whether the + + is read-only. + + + Returns true if the is read only; otherwise false. + + + + + Gets a value that indicates whether the + + is synchronized. + + + Returns true if the is synchronized; otherwise false. + + + + + Gets an object that can be used to synchronize access to the + + . + + + An object that can be used to synchronize access to the + + . + + + + + Gets the at the specified index. + + + The at the specified index. + + The zero-based index of the parameter to retrieve. + The specified index does not exist. + + + + Gets the with the specified name. + + + The with the specified name. + + The name of the parameter to retrieve. + The specified name does not exist. + + + + Class representing a command for the conceptual layer + + + + + Initializes a new instance of the class using the specified values. + + + + + Initializes a new instance of the class with the specified statement. + + The text of the command. + + + + Constructs the EntityCommand object with the given eSQL statement and the connection object to use + + The eSQL command text to execute + The connection object + Resolver used to resolve DbProviderServices + + + + Initializes a new instance of the class with the specified statement and connection. + + The text of the command. + A connection to the data source. + + + + Initializes a new instance of the class with the specified statement, connection and transaction. + + The text of the command. + A connection to the data source. + The transaction in which the command executes. + + + + Cancels the execution of an . + + + + + Creates a new instance of an object. + + + A new instance of an object. + + + + + Create and return a new parameter object representing a parameter in the eSQL statement + + The parameter object. + + + Executes the command and returns a data reader. + + The that contains the results. + + + + + Compiles the into a command tree and passes it to the underlying store provider for execution, then builds an + + out of the produced result set using the specified + + . + + + The that contains the results. + + + One of the values. + + + + + Asynchronously executes the command and returns a data reader for reading the results. May only + be called on CommandType.CommandText (otherwise, use the standard Execute* methods) + + + A task that represents the asynchronous operation. + The task result contains an EntityDataReader object. + + + For stored procedure commands, if called + for anything but an entity collection result + + + + + Asynchronously executes the command and returns a data reader for reading the results. May only + be called on CommandType.CommandText (otherwise, use the standard Execute* methods) + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains an EntityDataReader object. + + + For stored procedure commands, if called + for anything but an entity collection result + + + + + Asynchronously executes the command and returns a data reader for reading the results. May only + be called on CommandType.CommandText (otherwise, use the standard Execute* methods) + + The behavior to use when executing the command + + A task that represents the asynchronous operation. + The task result contains an EntityDataReader object. + + + For stored procedure commands, if called + for anything but an entity collection result + + + + + Asynchronously executes the command and returns a data reader for reading the results. May only + be called on CommandType.CommandText (otherwise, use the standard Execute* methods) + + The behavior to use when executing the command + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains an EntityDataReader object. + + + For stored procedure commands, if called + for anything but an entity collection result + + + + + Executes the command and returns a data reader for reading the results + + The behavior to use when executing the command + A DbDataReader object + + + + Asynchronously executes the command and returns a data reader for reading the results + + The behavior to use when executing the command + The token to monitor for cancellation requests + + A task that represents the asynchronous operation. + The task result contains a DbDataReader object. + + + + Executes the current command. + The number of rows affected. + + + + Asynchronously executes the command and discard any results returned from the command + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the number of rows affected. + + + + Executes the command, and returns the first column of the first row in the result set. Additional columns or rows are ignored. + The first column of the first row in the result set, or a null reference (Nothing in Visual Basic) if the result set is empty. + + + Compiles the entity-level command and creates a prepared version of the command. + + + Compiles the entity-level command and returns the store command text. + The store command text. + + + + Gets or sets the used by the + + . + + The connection used by the entity command. + + + + The connection object used for executing the command + + + + Gets or sets an Entity SQL statement that specifies a command or stored procedure to execute. + The Entity SQL statement that specifies a command or stored procedure to execute. + + + Gets or sets the command tree to execute; only one of the command tree or the command text can be set, not both. + The command tree to execute. + + + Gets or sets the amount of time to wait before timing out. + The time in seconds to wait for the command to execute. + + + + Gets or sets a value that indicates how the + + property is to be interpreted. + + + One of the enumeration values. + + + + Gets the parameters of the Entity SQL statement or stored procedure. + The parameters of the Entity SQL statement or stored procedure. + + + + The collection of parameters for this command + + + + + Gets or sets the transaction within which the executes. + + + The transaction within which the executes. + + + + + The transaction that this command executes in + + + + Gets or sets how command results are applied to rows being updated. + + One of the values. + + + + Gets or sets a value that indicates whether the command object should be visible in a Windows Form Designer control. + true if the command object should be visible in a Windows Form Designer control; otherwise, false. + + + Gets or sets a value that indicates whether the query plan caching is enabled. + true if the query plan caching is enabled; otherwise, false. + + + + Class representing a connection for the conceptual layer. An entity connection may only + be initialized once (by opening the connection). It is subsequently not possible to change + the connection string, attach a new store connection, or change the store connection string. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class, based on the connection string. + + The provider-specific connection string. + An invalid connection string keyword has been provided, or a required connection string keyword has not been provided. + + + + Initializes a new instance of the class with a specified + and + . + + + A to be associated with this + . + + + The underlying data source connection for this object. + + The workspace or connection parameter is null. + The conceptual model is missing from the workspace.-or-The mapping file is missing from the workspace.-or-The storage model is missing from the workspace.-or-The connection is not in a closed state. + The connection is not from an ADO.NET Entity Framework-compatible provider. + + + + Constructs the EntityConnection from Metadata loaded in memory + + Workspace containing metadata information. + Store connection. + If set to true the store connection is disposed when the entity connection is disposed, otherwise the caller must dispose the store connection. + + + + Returns the associated with this + + . + + + The associated with this + + . + + The inline connection string contains an invalid Metadata keyword value. + + + Establishes a connection to the data source by calling the underlying data provider's Open method. + An error occurs when you open the connection, or the name of the underlying data provider is not known. + The inline connection string contains an invalid Metadata keyword value. + + + + Asynchronously establishes a connection to the data store by calling the Open method on the underlying data provider + + + A to observe while waiting for the task to complete. + + A task that represents the asynchronous operation. + + + + Creates a new instance of an , with the + + set to this + + . + + + An object. + + The name of the underlying data provider is not known. + + + + Create a new command object that uses this connection object + + The command object. + + + Closes the connection to the database. + An error occurred when closing the connection. + + + Not supported. + Not supported. + When the method is called. + + + Begins a transaction by using the underlying provider. + + A new . The returned + + instance can later be associated with the + + to execute the command under that transaction. + + + The underlying provider is not known.-or-The call to + + was made on an + + that already has a current transaction.-or-The state of the + + is not + + . + + + + Begins a transaction with the specified isolation level by using the underlying provider. + + A new . The returned + + instance can later be associated with the + + to execute the command under that transaction. + + The isolation level of the transaction. + + The underlying provider is not known.-or-The call to + + was made on an + + that already has a current transaction.-or-The state of the + + is not + + . + + + + + Begins a database transaction + + The isolation level of the transaction + An object representing the new transaction + + + + Enlists this in the specified transaction. + + The transaction object to enlist into. + + The state of the is not + + . + + + + + Cleans up this connection object + + true to release both managed and unmanaged resources; false to release only unmanaged resources + + + + Gets or sets the connection string. + + The connection string required to establish the initial connection to a data source. The default value is an empty string. On a closed connection, the currently set value is returned. If no value has been set, an empty string is returned. + + An attempt was made to set the property after the + + ’s was initialized. The + + is initialized either when the instance is constructed through the overload that takes a + + as a parameter, or when the + + instance has been opened. + + An invalid connection string keyword has been provided or a required connection string keyword has not been provided. + + + Gets the number of seconds to wait when attempting to establish a connection before ending the attempt and generating an error. + The time (in seconds) to wait for a connection to open. The default value is the underlying data provider's default time-out. + The value set is less than 0. + + + Gets the name of the current database, or the database that will be used after a connection is opened. + The value of the Database property of the underlying data provider. + The underlying data provider is not known. + + + + Gets the state of the EntityConnection, which is set up to track the state of the underlying + database connection that is wrapped by this EntityConnection. + + + + Gets the name or network address of the data source to connect to. + The name of the data source. The default value is an empty string. + The underlying data provider is not known. + + + Gets a string that contains the version of the data source to which the client is connected. + The version of the data source that is contained in the provider connection string. + The connection is closed. + + + + Gets the provider factory associated with EntityConnection + + + + + Provides access to the underlying data source connection that is used by the + + object. + + + The for the data source connection. + + + + + Gets the current transaction that this connection is enlisted in. May be null. + + + + + Class representing a connection string builder for the entity client provider + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class using the supplied connection string. + + A provider-specific connection string to the underlying data source. + + + + Clears the contents of the instance. + + + + + Determines whether the contains a specific key. + + + Returns true if the contains an element that has the specified key; otherwise, false. + + + The key to locate in the . + + + + + Retrieves a value corresponding to the supplied key from this + + . + + Returns true if keyword was found in the connection string; otherwise, false. + The key of the item to retrieve. + The value corresponding to keyword. + keyword contains a null value (Nothing in Visual Basic). + + + + Removes the entry with the specified key from the + + instance. + + Returns true if the key existed in the connection string and was removed; false if the key did not exist. + + The key of the keyword/value pair to be removed from the connection string in this + + . + + keyword is null (Nothing in Visual Basic) + + + Gets or sets the name of a section as defined in a configuration file. + The name of a section in a configuration file. + + + Gets or sets the name of the underlying .NET Framework data provider in the connection string. + The invariant name of the underlying .NET Framework data provider. + + + Gets or sets the metadata locations in the connection string. + Gets or sets the metadata locations in the connection string. + + + Gets or sets the inner, provider-specific connection string. + The inner, provider-specific connection string. + + + + Gets a value that indicates whether the + + has a fixed size. + + + Returns true in every case, because the + + supplies a fixed-size collection of keyword/value pairs. + + + + + Gets an that contains the keys in the + + . + + + An that contains the keys in the + + . + + + + Gets or sets the value associated with the specified key. In C#, this property is the indexer. + The value associated with the specified key. + The key of the item to get or set. + keyword is a null reference (Nothing in Visual Basic). + Tried to add a key that does not exist in the available keys. + Invalid value in the connection string (specifically, a Boolean or numeric value was expected but not supplied). + + + + A data reader class for the entity client provider + + + + + Closes the object. + + + + + Releases the resources consumed by this and calls + + . + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Gets the value of the specified column as a Boolean. + The value of the specified column. + The zero-based column ordinal. + + + Gets the value of the specified column as a byte. + The value of the specified column. + The zero-based column ordinal. + + + Reads a stream of bytes from the specified column, starting at location indicated by dataIndex , into the buffer, starting at the location indicated by bufferIndex . + The actual number of bytes read. + The zero-based column ordinal. + The index within the row from which to begin the read operation. + The buffer into which to copy the data. + The index with the buffer to which the data will be copied. + The maximum number of characters to read. + + + Gets the value of the specified column as a single character. + The value of the specified column. + The zero-based column ordinal. + + + Reads a stream of characters from the specified column, starting at location indicated by dataIndex , into the buffer, starting at the location indicated by bufferIndex . + The actual number of characters read. + The zero-based column ordinal. + The index within the row from which to begin the read operation. + The buffer into which to copy the data. + The index with the buffer to which the data will be copied. + The maximum number of characters to read. + + + Gets the name of the data type of the specified column. + The name of the data type. + The zero-based column ordinal. + + + + Gets the value of the specified column as a object. + + The value of the specified column. + The zero-based column ordinal. + + + + Returns a object for the requested column ordinal that can be overridden with a provider-specific implementation. + + A data reader. + The zero-based column ordinal. + + + + Gets the value of the specified column as a object. + + The value of the specified column. + The zero-based column ordinal. + + + Gets the value of the specified column as a double-precision floating point number. + The value of the specified column. + The zero-based column ordinal. + + + Gets the data type of the specified column. + The data type of the specified column. + The zero-based column ordinal. + + + Gets the value of the specified column as a single-precision floating point number. + The value of the specified column. + The zero-based column ordinal. + + + Gets the value of the specified column as a globally-unique identifier (GUID). + The value of the specified column. + The zero-based column ordinal. + + + Gets the value of the specified column as a 16-bit signed integer. + The value of the specified column. + The zero-based column ordinal. + + + Gets the value of the specified column as a 32-bit signed integer. + The value of the specified column. + The zero-based column ordinal. + + + Gets the value of the specified column as a 64-bit signed integer. + The value of the specified column. + The zero-based column ordinal. + + + Gets the name of the column, given the zero-based column ordinal. + The name of the specified column. + The zero-based column ordinal. + + + Gets the column ordinal given the name of the column. + The zero-based column ordinal. + The name of the column. + The name specified is not a valid column name. + + + Returns the provider-specific field type of the specified column. + + The object that describes the data type of the specified column. + + The zero-based column ordinal. + + + + Gets the value of the specified column as an instance of . + + The value of the specified column. + The zero-based column ordinal. + + + Gets all provider-specific attribute columns in the collection for the current row. + + The number of instances of in the array. + + + An array of into which to copy the attribute columns. + + + + + Returns a that describes the column metadata of the + + . + + + A that describes the column metadata. + + + + + Gets the value of the specified column as an instance of . + + The value of the specified column. + The zero-based column ordinal. + + + + Gets the value of the specified column as an instance of . + + The value of the specified column. + The zero-based column ordinal. + + + Populates an array of objects with the column values of the current row. + + The number of instances of in the array. + + + An array of into which to copy the attribute columns. + + + + Gets a value that indicates whether the column contains nonexistent or missing values. + + true if the specified column is equivalent to ; otherwise, false. + + The zero-based column ordinal. + + + Advances the reader to the next result when reading the results of a batch of statements. + true if there are more result sets; otherwise, false. + + + + Asynchronously moves the reader to the next result set when reading a batch of statements + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains true if there are more result sets; false otherwise. + + + + Advances the reader to the next record in a result set. + true if there are more rows; otherwise, false. + + + + Asynchronously moves the reader to the next row of the current result set + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains true if there are more rows; false otherwise. + + + + + Returns an that can be used to iterate through the rows in the data reader. + + + An that can be used to iterate through the rows in the data reader. + + + + + Returns a nested . + + The nested data record. + The number of the DbDataRecord to return. + + + + Returns nested readers as objects. + + + The nested readers as objects. + + The ordinal of the column. + + + Gets a value indicating the depth of nesting for the current row. + The depth of nesting for the current row. + + + Gets the number of columns in the current row. + The number of columns in the current row. + + + + Gets a value that indicates whether this contains one or more rows. + + + true if the contains one or more rows; otherwise, false. + + + + + Gets a value indicating whether the is closed. + + + true if the is closed; otherwise, false. + + + + Gets the number of rows changed, inserted, or deleted by execution of the SQL statement. + The number of rows changed, inserted, or deleted. Returns -1 for SELECT statements; 0 if no rows were affected or the statement failed. + + + + Gets the value of the specified column as an instance of . + + The value of the specified column. + The zero-based column ordinal + + + + Gets the value of the specified column as an instance of . + + The value of the specified column. + The name of the column. + + + + Gets the number of fields in the that are not hidden. + + The number of fields that are not hidden. + + + + Gets for this + + . + + The information of a data record. + + + + Class representing a parameter used in EntityCommand + + + + + Initializes a new instance of the class using the default values. + + + + + Initializes a new instance of the class using the specified parameter name and data type. + + The name of the parameter. + + One of the values. + + + + + Initializes a new instance of the class using the specified parameter name, data type and size. + + The name of the parameter. + + One of the values. + + The size of the parameter. + + + + Initializes a new instance of the class using the specified properties. + + The name of the parameter. + + One of the values. + + The size of the parameter. + The name of the source column. + + + + Initializes a new instance of the class using the specified properties. + + The name of the parameter. + + One of the values. + + The size of the parameter. + + One of the values. + + true to indicate that the parameter accepts null values; otherwise, false. + The number of digits used to represent the value. + The number of decimal places to which value is resolved. + The name of the source column. + + One of the values. + + The value of the parameter. + + + + Resets the type associated with the . + + + + Returns a string representation of the parameter. + A string representation of the parameter. + + + Gets or sets the name of the entity parameter. + The name of the entity parameter. + + + + Gets or sets the of the parameter. + + + One of the values. + + + + Gets or sets the type of the parameter, expressed as an EdmType. + The type of the parameter, expressed as an EdmType. + + + + Gets or sets the number of digits used to represent the + + property. + + The number of digits used to represent the value. + + + + Gets or sets the number of decimal places to which + + is resolved. + + The number of decimal places to which value is resolved. + + + Gets or sets the value of the parameter. + The value of the parameter. + + + Gets or sets the direction of the parameter. + + One of the values. + + + + Gets or sets a value that indicates whether the parameter accepts null values. + true if null values are accepted; otherwise, false. + + + Gets or sets the maximum size of the data within the column. + The maximum size of the data within the column. + + + + Gets or sets the name of the source column mapped to the and used for loading or returning the + + . + + The name of the source column mapped to the dataset and used for loading or returning the value. + + + Gets or sets a value that indicates whether source column is nullable. + true if source column is nullable; otherwise, false. + + + + Gets or sets the to use when loading the value. + + + One of the values. + + + + + Class representing a provider factory for the entity client provider + + + + + A singleton object for the entity client provider factory object. + This remains a public field (not property) because DbProviderFactory expects a field. + + + + + Returns a new instance of the provider's class that implements the + + class. + + + A new instance of . + + + + + Throws a . This method is currently not supported. + + This method is currently not supported. + + + + Returns a new instance of the provider's class that implements the + + class. + + + A new instance of . + + + + + Returns a new instance of the provider's class that implements the + + class. + + + A new instance of . + + + + + Throws a . This method is currently not supported. + + This method is currently not supported. + + + + Returns a new instance of the provider's class that implements the + + class. + + + A new instance of . + + + + + Throws a . This method is currently not supported. + + This method is currently not supported. + This method is currently not supported. + + + + Returns the requested class. + + + A new instance of . The supported types are + + , + + , and + + . Returns null (or Nothing in Visual Basic) for every other type. + + + The to return. + + + + + Class representing a transaction for the conceptual layer + + + + Commits the underlying transaction. + + + Rolls back the underlying transaction. + + + + Cleans up this transaction object + + true to release both managed and unmanaged resources; false to release only unmanaged resources + + + + Gets for this + + . + + + An to the underlying data source. + + + + + The connection object owning this transaction object + + + + + Gets the isolation level of this . + + + An enumeration value that represents the isolation level of the underlying transaction. + + + + + Gets the DbTransaction for the underlying provider transaction. + + + + + Represents a failure while trying to prepare or execute a CommandCompilation + This exception is intended to provide a common exception that people can catch to + hold provider exceptions (SqlException, OracleException) when using the EntityCommand + to execute statements. + + + + + Initializes a new instance of . + + + + + Initializes a new instance of . + + The message that describes the error. + + + + Initializes a new instance of . + + The error message that explains the reason for the exception. + The exception that caused the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Represents a failure while trying to prepare or execute a CommandExecution + This exception is intended to provide a common exception that people can catch to + hold provider exceptions (SqlException, OracleException) when using the EntityCommand + to execute statements. + + + + + Initializes a new instance of . + + + + + Initializes a new instance of . + + The message that describes the error. + + + + Initializes a new instance of . + + The error message that explains the reason for the exception. + The exception that caused the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + An identifier for an entity. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with an entity set name and a generic + + collection. + + + A that is the entity set name qualified by the entity container name. + + + A generic collection.Each key/value pair has a property name as the key and the value of that property as the value. There should be one pair for each property that is part of the + + . The order of the key/value pairs is not important, but each key property should be included. The property names are simple names that are not qualified with an entity type name or the schema name. + + + + + Initializes a new instance of the class with an entity set name and an + + collection of + + objects. + + + A that is the entity set name qualified by the entity container name. + + + An collection of + + objects with which to initialize the key. + + + + + Initializes a new instance of the class with an entity set name and specific entity key pair. + + + A that is the entity set name qualified by the entity container name. + + + A that is the name of the key. + + + An that is the key value. + + + + Gets the entity set for this entity key from the given metadata workspace. + + The for the entity key. + + The metadata workspace that contains the entity. + The entity set could not be located in the specified metadata workspace. + + + Returns a value that indicates whether this instance is equal to a specified object. + true if this instance and obj have equal values; otherwise, false. + + An to compare with this instance. + + + + + Returns a value that indicates whether this instance is equal to a specified + + . + + true if this instance and other have equal values; otherwise, false. + + An object to compare with this instance. + + + + + Serves as a hash function for the current object. + + is suitable for hashing algorithms and data structures such as a hash table. + + + A hash code for the current . + + + + + Compares two objects. + + true if the key1 and key2 values are equal; otherwise, false. + + A to compare. + + + A to compare. + + + + + Compares two objects. + + true if the key1 and key2 values are not equal; otherwise, false. + + A to compare. + + + A to compare. + + + + + Helper method that is used to deserialize an . + + Describes the source and destination of a given serialized stream, and provides an additional caller-defined context. + + + + Helper method that is used to deserialize an . + + Describes the source and destination of a given serialized stream and provides an additional caller-defined context. + + + + Gets a singleton EntityKey by which a read-only entity is identified. + + + + + Gets a singleton EntityKey identifying an entity resulted from a failed TREAT. + + + + Gets or sets the name of the entity set. + + A value that is the name of the entity set for the entity to which the + + belongs. + + + + Gets or sets the name of the entity container. + + A value that is the name of the entity container for the entity to which the + + belongs. + + + + + Gets or sets the key values associated with this . + + + A of key values for this + + . + + + + + Gets a value that indicates whether the is temporary. + + + true if the is temporary; otherwise, false. + + + + + Information about a key that is part of an EntityKey. + A key member contains the key name and value. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified entity key pair. + + The name of the key. + The key value. + + + Returns a string representation of the entity key. + A string representation of the entity key. + + + Gets or sets the name of the entity key. + The key name. + + + Gets or sets the value of the entity key. + The key value. + + + + Kind of collection (applied to Properties) + + + + + Property is not a Collection + + + + + Collection has Bag semantics( unordered and duplicates ok) + + + + + Collection has List semantics + (Order is deterministic and duplicates ok) + + + + + The concurrency mode for properties. + + + + + Default concurrency mode: the property is never validated + at write time + + + + + Fixed concurrency mode: the property is always validated at + write time + + + + + The pattern for Server Generated Properties. + + + + + Not a Server Generated Property. This is the default. + + + + + A value is generated on INSERT, and remains unchanged on update. + + + + + A value is generated on both INSERT and UPDATE. + + + + + Represents an eSQL Query compilation exception; + The class of exceptional conditions that may cause this exception to be raised are mainly: + 1) Syntax Errors: raised during query text parsing and when a given query does not conform to eSQL formal grammar; + 2) Semantic Errors: raised when semantic rules of eSQL language are not met such as metadata or schema information + not accurate or not present, type validation errors, scoping rule violations, user of undefined variables, etc. + For more information, see eSQL Language Spec. + + + + + Initializes a new instance of . + + + + + Initializes a new instance of with a specialized error message. + + The message that describes the error. + + + + Initializes a new instance of the class that uses a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that caused the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + Gets a description of the error. + A string that describes the error. + + + Gets the approximate context where the error occurred, if available. + A string that describes the approximate context where the error occurred, if available. + + + Gets the approximate line number where the error occurred. + An integer that describes the line number where the error occurred. + + + Gets the approximate column number where the error occurred. + An integer that describes the column number where the error occurred. + + + + Thrown to indicate that a command tree is invalid. + + + + + Initializes a new instance of the class with a default message. + + + + + Initializes a new instance of the class with the specified message. + + The exception message. + + + + Initializes a new instance of the class with the specified message and inner exception. + + The exception message. + + The exception that is the cause of this . + + + + + Mapping exception class. Note that this class has state - so if you change even + its internals, it can be a breaking change + + + + + Initializes a new instance of . + + + + + Initializes a new instance of with a specialized error message. + + The message that describes the error. + + + + Initializes a new instance of that uses a specified error message and a reference to the inner exception. + + The message that describes the error. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Class for representing a collection of mapping items in Edm space. + + + + + Base class for the type created at design time to store the generated views. + + + + Returns the key/value pair at the specified index, which contains the view and its key. + The key/value pair at index , which contains the view and its key. + The index of the view. + + + + Gets or sets the name of . + + The container name. + + + + Gets or sets in storage schema. + + Container name. + + + Hash value. + Hash value. + + + Hash value of views. + Hash value. + + + Gets or sets view count. + View count. + + + + Attribute to mark the assemblies that contain the generated views type. + + + + + Initializes a new instance of the class. + + The view type. + + + Gets the T:System.Type of the view. + The T:System.Type of the view. + + + + Represents a complex type mapping for a function import result. + + + + + Specifies a function import structural type mapping. + + + + + Gets the property mappings for the result type of a function import. + + + + + Initializes a new FunctionImportComplexTypeMapping instance. + + The return type. + The property mappings for the result type of a function import. + + + + Ges the return type. + + + + + Represents a function import entity type mapping. + + + + + Initializes a new FunctionImportEntityTypeMapping instance. + + The entity types at the base of + the type hierarchies to be mapped. + The entity types to be mapped. + The property mappings for the result types of a function import. + The mapping conditions. + + + + Gets the entity types being mapped. + + + + + Gets the entity types at the base of the hierarchies being mapped. + + + + + Gets the mapping conditions. + + + + + Represents a mapping condition for a function import result. + + + + + + + + Gets the name of the column used to evaluate the condition. + + + + + Represents a mapping condition for the result of a function import + evaluated by checking null or not null. + + + + + Initializes a new FunctionImportEntityTypeMappingConditionIsNull instance. + + The name of the column used to evaluate the condition. + Flag that indicates whether a null or not null check is performed. + + + + Gets a flag that indicates whether a null or not null check is performed. + + + + + Represents a mapping condition for the result of a function import, + evaluated by comparison with a specified value. + + + + + Initializes a new FunctionImportEntityTypeMappingConditionValue instance. + + The name of the column used to evaluate the condition. + The value to compare with. + + + + Gets the value used for comparison. + + + + + Represents a mapping from a model function import to a store composable or non-composable function. + + + + + Gets model function (or source of the mapping) + + + + + Gets store function (or target of the mapping) + + + + + Represents a mapping from a model function import to a store composable function. + + + + + Initializes a new FunctionImportMappingComposable instance. + + The model function import. + The store composable function. + The result mapping for the function import. + The parent container mapping. + + + + Gets the result mapping for the function import. + + + + + Represents a mapping from a model function import to a store non-composable function. + + + + + Initializes a new FunctionImportMappingNonComposable instance. + + The model function import. + The store non-composable function. + The function import result mappings. + The parent container mapping. + + + + Gets the function import result mappings. + + + + + Base class for mapping a property of a function import return type. + + + + + Maps a function import return type property to a table column. + + + + + Initializes a new FunctionImportReturnTypeScalarPropertyMapping instance. + + The mapped property name. + The mapped column name. + + + + Gets the mapped property name. + + + + + Gets the mapped column name. + + + + + Represents the base item class for all the mapping metadata + + + + + Represents the base item class for all the metadata + + + + + Describes modification function mappings for an association set. + + + + + Initalizes a new AssociationSetModificationFunctionMapping instance. + + An association set. + A delete function mapping. + An insert function mapping. + + + + + + + Gets the association set. + + + + + Gets the delete function mapping. + + + + + Gets the insert function mapping. + + + + + Describes modification function mappings for an entity type within an entity set. + + + + + Initializes a new EntityTypeModificationFunctionMapping instance. + + An entity type. + A delete function mapping. + An insert function mapping. + An updated function mapping. + + + + + + + Gets the entity type. + + + + + Gets the delete function mapping. + + + + + Gets the insert function mapping. + + + + + Gets hte update function mapping. + + + + + Describes the location of a member within an entity or association type structure. + + + + + Initializes a new ModificationFunctionMemberPath instance. + + Gets the members in the path from the leaf (the member being bound) + to the root of the structure. + Gets the association set to which we are navigating + via this member. If the value is null, this is not a navigation member path. + + + + + + + Gets the members in the path from the leaf (the member being bound) + to the Root of the structure. + + + + + Gets the association set to which we are navigating via this member. If the value + is null, this is not a navigation member path. + + + + + Binds a modification function parameter to a member of the entity or association being modified. + + + + + Initializes a new ModificationFunctionParameterBinding instance. + + The parameter taking the value. + The path to the entity or association member defining the value. + A flag indicating whether the current or original member value is being bound. + + + + + + + Gets the parameter taking the value. + + + + + Gets the path to the entity or association member defining the value. + + + + + Gets a flag indicating whether the current or original + member value is being bound. + + + + + Defines a binding from a named result set column to a member taking the value. + + + + + Initializes a new ModificationFunctionResultBinding instance. + + The name of the column to bind from the function result set. + The property to be set on the entity. + + + + + + + Gets the name of the column to bind from the function result set. + + + + + Gets the property to be set on the entity. + + + + + Represents the Mapping metadata for an AssociationSet in CS space. + + + For Example if conceptually you could represent the CS MSL file as following + --Mapping + --EntityContainerMapping ( CNorthwind-->SNorthwind ) + --EntitySetMapping + --EntityTypeMapping + --MappingFragment + --EntityTypeMapping + --MappingFragment + --AssociationSetMapping + --AssociationTypeMapping + --MappingFragment + This class represents the metadata for the AssociationSetMapping elements in the + above example. And it is possible to access the AssociationTypeMap underneath it. + There will be only one TypeMap under AssociationSetMap. + + + + + Represents the Mapping metadata for an Extent in CS space. + + + For Example if conceptually you could represent the CS MSL file as following + --Mapping + --EntityContainerMapping ( CNorthwind-->SNorthwind ) + --EntitySetMapping + --EntityTypeMapping + --MappingFragment + --EntityTypeMapping + --MappingFragment + --AssociationSetMapping + --AssociationTypeMapping + --MappingFragment + This class represents the metadata for all the extent map elements in the + above example namely EntitySetMapping, AssociationSetMapping and CompositionSetMapping. + The EntitySetBaseMapping elements that are children of the EntityContainerMapping element + can be accessed through the properties on this type. + + + + + Gets the parent container mapping. + + + + + Gets or sets the query view associated with this mapping. + + + + + Initializes a new AssociationSetMapping instance. + + The association set to be mapped. + The store entity set to be mapped. + The parent container mapping. + + + + Adds a property mapping condition. + + The condition to add. + + + + Removes a property mapping condition. + + The property mapping condition to remove. + + + + Gets the association set that is mapped. + + + + + Gets the contained association type mapping. + + + + + Gets or sets the corresponding function mapping. Can be null. + + + + + Gets the store entity set that is mapped. + + + + + Gets or sets the source end property mapping. + + + + + Gets or sets the target end property mapping. + + + + + Gets the property mapping conditions. + + + + + Represents the Mapping metadata for an association type map in CS space. + + + For Example if conceptually you could represent the CS MSL file as following + --Mapping + --EntityContainerMapping ( CNorthwind-->SNorthwind ) + --EntitySetMapping + --EntityTypeMapping + --MappingFragment + --EntityKey + --ScalarPropertyMap + --ScalarPropertyMap + --EntityTypeMapping + --MappingFragment + --EntityKey + --ScalarPropertyMap + --ComplexPropertyMap + --ComplexTypeMap + --ScalarPropertyMap + --ScalarProperyMap + --ScalarPropertyMap + --AssociationSetMapping + --AssociationTypeMapping + --MappingFragment + --EndPropertyMap + --ScalarPropertyMap + --ScalarProperyMap + --EndPropertyMap + --ScalarPropertyMap + This class represents the metadata for all association Type map elements in the + above example. Users can access the table mapping fragments under the + association type mapping through this class. + + + + + Represents the Mapping metadata for a type map in CS space. + + + For Example if conceptually you could represent the CS MSL file as following + --Mapping + --EntityContainerMapping ( CNorthwind-->SNorthwind ) + --EntitySetMapping + --EntityTypeMapping + --MappingFragment + --EntityKey + --ScalarPropertyMap + --ScalarPropertyMap + --EntityTypeMapping + --MappingFragment + --EntityKey + --ScalarPropertyMap + --ComplexPropertyMap + --ScalarPropertyMap + --ScalarProperyMap + --ScalarPropertyMap + --AssociationSetMapping + --AssociationTypeMapping + --MappingFragment + --EndPropertyMap + --ScalarPropertyMap + --ScalarProperyMap + --EndPropertyMap + --ScalarPropertyMap + This class represents the metadata for all the Type map elements in the + above example namely EntityTypeMapping, AssociationTypeMapping and CompositionTypeMapping. + The TypeMapping elements contain TableMappingFragments which in turn contain the property maps. + + + + + Creates an AssociationTypeMapping instance. + + The AssociationSetMapping that + the contains this AssociationTypeMapping. + + + + Gets the AssociationSetMapping that contains this AssociationTypeMapping. + + + + + Gets the association type being mapped. + + + + + Gets the single mapping fragment. + + + + + Mapping metadata for Complex properties. + + + For Example if conceptually you could represent the CS MSL file as following + --Mapping + --EntityContainerMapping ( CNorthwind-->SNorthwind ) + --EntitySetMapping + --EntityTypeMapping + --MappingFragment + --EntityKey + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --EntityTypeMapping + --MappingFragment + --EntityKey + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ComplexPropertyMap + --ComplexTypeMapping + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ScalarProperyMap ( CMemberMetadata-->SMemberMetadata ) + --DiscriminatorProperyMap ( constant value-->SMemberMetadata ) + --ComplexTypeMapping + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ScalarProperyMap ( CMemberMetadata-->SMemberMetadata ) + --DiscriminatorProperyMap ( constant value-->SMemberMetadata ) + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --AssociationSetMapping + --AssociationTypeMapping + --MappingFragment + --EndPropertyMap + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ScalarProperyMap ( CMemberMetadata-->SMemberMetadata ) + --EndPropertyMap + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + This class represents the metadata for all the complex property map elements in the + above example. ComplexPropertyMaps contain ComplexTypeMaps which define mapping based + on the type of the ComplexProperty in case of inheritance. + + + + + Construct a new Complex Property mapping object + + The MemberMetadata object that represents this Complex member + + + + Adds a type mapping corresponding to a nested complex type. + + The complex type mapping to be added. + + + + Removes a type mapping corresponding to a nested complex type. + + The complex type mapping to be removed. + + + + Gets a read only collections of type mappings corresponding to the + nested complex types. + + + + + Mapping metadata for Complex Types. + + + + + Creates a ComplexTypeMapping instance. + + The ComplexType being mapped. + + + + Adds a property mapping. + + The property mapping to be added. + + + + Removes a property mapping. + + The property mapping to be removed. + + + + Adds a property mapping condition. + + The property mapping condition to be added. + + + + Removes a property mapping condition. + + The property mapping condition to be removed. + + + + Gets the ComplexType being mapped. + + + + + Gets a read-only collection of property mappings. + + + + + Gets a read-only collection of property mapping conditions. + + + + + Mapping metadata for End property of an association. + + + For Example if conceptually you could represent the CS MSL file as following + --Mapping + --EntityContainerMapping ( CNorthwind-->SNorthwind ) + --EntitySetMapping + --EntityTypeMapping + --MappingFragment + --EntityKey + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --EntityTypeMapping + --MappingFragment + --EntityKey + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ComplexPropertyMap + --ComplexTypeMapping + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ScalarProperyMap ( CMemberMetadata-->SMemberMetadata ) + --DiscriminatorProperyMap ( constant value-->SMemberMetadata ) + --ComplexTypeMapping + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ScalarProperyMap ( CMemberMetadata-->SMemberMetadata ) + --DiscriminatorProperyMap ( constant value-->SMemberMetadata ) + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --AssociationSetMapping + --AssociationTypeMapping + --MappingFragment + --EndPropertyMap + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ScalarProperyMap ( CMemberMetadata-->SMemberMetadata ) + --EndPropertyMap + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + This class represents the metadata for all the end property map elements in the + above example. EndPropertyMaps provide mapping for each end of the association. + + + + + Creates an association end property mapping. + + An AssociationEndMember that specifies + the association end to be mapped. + + + + Adds a child property-column mapping. + + A ScalarPropertyMapping that specifies + the property-column mapping to be added. + + + + Removes a child property-column mapping. + + A ScalarPropertyMapping that specifies + the property-column mapping to be removed. + + + + Gets an AssociationEndMember that specifies the mapped association end. + + + + + Gets a ReadOnlyCollection of ScalarPropertyMapping that specifies the children + of this association end property mapping. + + + + + Represents the Mapping metadata for the EntityContainer map in CS space. + Only one EntityContainerMapping element is allowed in the MSL file for CS mapping. + + + For Example if conceptually you could represent the CS MSL file as following + ---Mapping + --EntityContainerMapping ( CNorthwind-->SNorthwind ) + --EntitySetMapping + --AssociationSetMapping + The type represents the metadata for EntityContainerMapping element in the above example. + The EntitySetBaseMapping elements that are children of the EntityContainerMapping element + can be accessed through the properties on this type. + + + We currently assume that an Entity Container on the C side + is mapped to a single Entity Container in the S - space. + + + + + Initializes a new EntityContainerMapping instance. + + The conceptual entity container to be mapped. + The store entity container to be mapped. + The parent mapping item collection. + Flag indicating whether to generate update views. + + + + Adds an entity set mapping. + + The entity set mapping to add. + + + + Removes an association set mapping. + + The association set mapping to remove. + + + + Adds an association set mapping. + + The association set mapping to add. + + + + Removes an association set mapping. + + The association set mapping to remove. + + + + Adds a function import mapping. + + The function import mapping to add. + + + + Removes a function import mapping. + + The function import mapping to remove. + + + + Gets the parent mapping item collection. + + + + + Gets the type kind for this item + + + + + Gets the conceptual entity container. + + + + + Gets the store entity container. + + + + + Gets the entity set mappings. + + + + + Gets the association set mappings. + + + + + Gets the function import mappings. + + + + + Gets a flag that indicates whether to generate the update views or not. + + + + + Represents the Mapping metadata for an EnitytSet in CS space. + + + For Example if conceptually you could represent the CS MSL file as following + --Mapping + --EntityContainerMapping ( CNorthwind-->SNorthwind ) + --EntitySetMapping + --EntityTypeMapping + --MappingFragment + --EntityTypeMapping + --MappingFragment + --AssociationSetMapping + --AssociationTypeMapping + --MappingFragment + This class represents the metadata for the EntitySetMapping elements in the + above example. And it is possible to access the EntityTypeMaps underneath it. + + + + + Initialiazes a new EntitySetMapping instance. + + The entity set to be mapped. + The parent container mapping. + + + + Adds a type mapping. + + The type mapping to add. + + + + Removes a type mapping. + + The type mapping to remove. + + + + Adds a function mapping. + + The function mapping to add. + + + + Removes a function mapping. + + The function mapping to remove. + + + + Gets the entity set that is mapped. + + + + + Gets the contained entity type mappings. + + + + + Gets the corresponding function mappings. + + + + + Mapping metadata for Entity type. + If an EntitySet represents entities of more than one type, than we will have + more than one EntityTypeMapping for an EntitySet( For ex : if + PersonSet Entity extent represents entities of types Person and Customer, + than we will have two EntityType Mappings under mapping for PersonSet). + + + For Example if conceptually you could represent the CS MSL file as following + --Mapping + --EntityContainerMapping ( CNorthwind-->SNorthwind ) + --EntitySetMapping + --EntityTypeMapping + --MappingFragment + --EntityKey + --ScalarPropertyMap + --ScalarPropertyMap + --EntityTypeMapping + --MappingFragment + --EntityKey + --ScalarPropertyMap + --ComplexPropertyMap + --ScalarPropertyMap + --ScalarProperyMap + --ScalarPropertyMap + --AssociationSetMapping + --AssociationTypeMapping + --MappingFragment + --EndPropertyMap + --ScalarPropertyMap + --ScalarProperyMap + --EndPropertyMap + --ScalarPropertyMap + This class represents the metadata for all entity Type map elements in the + above example. Users can access the table mapping fragments under the + entity type mapping through this class. + + + + + Creates an EntityTypeMapping instance. + + The EntitySetMapping that contains this EntityTypeMapping. + + + + Adds an entity type to the mapping. + + The EntityType to be added. + + + + Removes an entity type from the mapping. + + The EntityType to be removed. + + + + Adds an entity type hierarchy to the mapping. + The hierarchy is represented by the specified root entity type. + + The root EntityType of the hierarchy to be added. + + + + Removes an entity type hierarchy from the mapping. + The hierarchy is represented by the specified root entity type. + + The root EntityType of the hierarchy to be removed. + + + + Adds a mapping fragment. + + The mapping fragment to be added. + + + + Removes a mapping fragment. + + The mapping fragment to be removed. + + + + Gets the EntitySetMapping that contains this EntityTypeMapping. + + + + + Gets the single EntityType being mapped. Throws exception in case of hierarchy type mapping. + + + + + Gets a flag that indicates whether this is a type hierarchy mapping. + + + + + Gets a read-only collection of mapping fragments. + + + + + Gets the mapped entity types. + + + + + Gets the mapped base types for a hierarchy mapping. + + + + + Represents the metadata for mapping fragment. + A set of mapping fragments makes up the Set mappings( EntitySet, AssociationSet or CompositionSet ) + Each MappingFragment provides mapping for those properties of a type that map to a single table. + + + For Example if conceptually you could represent the CS MSL file as following + --Mapping + --EntityContainerMapping ( CNorthwind-->SNorthwind ) + --EntitySetMapping + --EntityTypeMapping + --MappingFragment + --EntityKey + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --EntityTypeMapping + --MappingFragment + --EntityKey + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ComplexPropertyMap + --ComplexTypeMapping + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ScalarProperyMap ( CMemberMetadata-->SMemberMetadata ) + --DiscriminatorProperyMap ( constant value-->SMemberMetadata ) + --ComplexTypeMapping + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ScalarProperyMap ( CMemberMetadata-->SMemberMetadata ) + --DiscriminatorProperyMap ( constant value-->SMemberMetadata ) + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --AssociationSetMapping + --AssociationTypeMapping + --MappingFragment + --EndPropertyMap + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ScalarProperyMap ( CMemberMetadata-->SMemberMetadata ) + --EndPropertyMap + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + This class represents the metadata for all the mapping fragment elements in the + above example. Users can access all the top level constructs of + MappingFragment element like EntityKey map, Property Maps, Discriminator + property through this mapping fragment class. + + + + + Creates a MappingFragment instance. + + The EntitySet corresponding to the table of view being mapped. + The TypeMapping that contains this MappingFragment. + Flag that indicates whether to include 'DISTINCT' when generating queries. + + + + Adds a property mapping. + + The property mapping to be added. + + + + Removes a property mapping. + + The property mapping to be removed. + + + + Adds a property mapping condition. + + The property mapping condition to be added. + + + + Removes a property mapping condition. + + The property mapping condition to be removed. + + + + Gets the EntitySet corresponding to the table or view being mapped. + + + + + Gets the TypeMapping that contains this MappingFragment. + + + + + Gets a flag that indicates whether to include 'DISTINCT' when generating queries. + + + + + Gets a read-only collection of property mappings. + + + + + Gets a read-only collection of property mapping conditions. + + + + + Represents a collection of items in Storage Mapping (CS Mapping) space. + + + + Initializes a new instance of the class using the specified , and a collection of string indicating the metadata file paths. + The that this mapping is to use. + The that this mapping is to use. + The file paths that this mapping is to use. + + + Initializes a new instance of the class using the specified , and XML readers. + The that this mapping is to use. + The that this mapping is to use. + The XML readers that this mapping is to use. + + + + Computes a hash value for the container mapping specified by the names of the mapped containers. + + The name of a container in the conceptual model. + The name of a container in the store model. + A string that specifies the computed hash value. + + + + Computes a hash value for the single container mapping in the collection. + + A string that specifies the computed hash value. + + + + Creates a dictionary of (extent, generated view) for a container mapping specified by + the names of the mapped containers. + + The name of a container in the conceptual model. + The name of a container in the store model. + A list that accumulates potential errors. + + A dictionary of (, ) that specifies the generated views. + + + + + Creates a dictionary of (extent, generated view) for the single container mapping + in the collection. + + A list that accumulates potential errors. + + A dictionary of (, ) that specifies the generated views. + + + + + Factory method that creates a . + + + The edm metadata collection to map. Must not be null. + + + The store metadata collection to map. Must not be null. + + + MSL artifacts to load. Must not be null. + + + Paths to MSL artifacts. Used in error messages. Can be null in which case + the base Uri of the XmlReader will be used as a path. + + + The collection of errors encountered while loading. + + + instance if no errors encountered. Otherwise null. + + + + + Gets or sets a for creating instances + that are used to retrieve pre-generated mapping views. + + + + Gets the version of this represents. + The version of this represents. + + + + Describes modification function binding for change processing of entities or associations. + + + + + Initializes a new ModificationFunctionMapping instance. + + The entity or association set. + The entity or association type. + The metadata of function to which we should bind. + Bindings for function parameters. + The output parameter producing number of rows affected. + Bindings for the results of function evaluation + + + + + + + Gets output parameter producing number of rows affected. May be null. + + + + + Gets Metadata of function to which we should bind. + + + + + Gets bindings for function parameters. + + + + + Gets bindings for the results of function evaluation. + + + + + Mapping metadata for scalar properties. + + + For Example if conceptually you could represent the CS MSL file as following + --Mapping + --EntityContainerMapping ( CNorthwind-->SNorthwind ) + --EntitySetMapping + --EntityTypeMapping + --MappingFragment + --EntityKey + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --EntityTypeMapping + --MappingFragment + --EntityKey + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ComplexPropertyMap + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ScalarProperyMap ( CMemberMetadata-->SMemberMetadata ) + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --AssociationSetMapping + --AssociationTypeMapping + --MappingFragment + --EndPropertyMap + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + --ScalarProperyMap ( CMemberMetadata-->SMemberMetadata ) + --EndPropertyMap + --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) + This class represents the metadata for all the scalar property map elements in the + above example. + + + + + Creates a mapping between a simple property and a column. + + The property to be mapped. + The column to be mapped. + + + + Gets an EdmProperty that specifies the mapped column. + + + + + metadata exception class + + + + + Initializes a new instance of the class with a default message. + + + + + Initializes a new instance of the class with the specified message. + + The exception message. + + + + Initializes a new instance of the class with the specified message and inner exception. + + The exception message. + + The exception that is the cause of this . + + + + + DataSpace + + + + + OSpace indicates the item in the clr space + + + + + CSpace indicates the item in the CSpace - edm primitive types + + types defined in csdl + + + + + SSpace indicates the item in the SSpace + + + + + Mapping between OSpace and CSpace + + + + + Mapping between CSpace and SSpace + + + + + This class encapsulates the error information for a generic EDM error. + + + + Gets the error message. + The error message. + + + + Class for representing a collection of items in Edm space. + + + + + Initializes a new instance of the class by using the collection of the XMLReader objects where the conceptual schema definition language (CSDL) files exist. + + The collection of the XMLReader objects where the conceptual schema definition language (CSDL) files exist. + + + Initializes a new instance of the class. + The entity data model. + + + + Initializes a new instance of the class by using the paths where the conceptual schema definition language (CSDL) files exist. + + The paths where the conceptual schema definition language (CSDL) files exist. + + + + Returns a collection of the objects. + + + A ReadOnlyCollection object that represents a collection of the + + objects. + + + + + Returns a collection of the objects with the specified conceptual model version. + + + A ReadOnlyCollection object that represents a collection of the + + objects. + + The conceptual model version. + + + + Factory method that creates an . + + + CSDL artifacts to load. Must not be null. + + + Paths to CSDL artifacts. Used in error messages. Can be null in which case + the base Uri of the XmlReader will be used as a path. + + + The collection of errors encountered while loading. + + + instance if no errors encountered. Otherwise null. + + + + Gets the conceptual model version for this collection. + The conceptual model version for this collection. + + + + This class encapsulates the error information for a schema error that was encountered. + + + + + Constructs a EdmSchemaError object. + + The explanation of the error. + The code associated with this error. + The severity of the error. + + + Returns the error message. + The error message. + + + Gets the error code. + The error code. + + + Gets the severity level of the error. + + One of the values. The default is + + . + + + + Gets the line number where the error occurred. + The line number where the error occurred. + + + Gets the column where the error occurred. + The column where the error occurred. + + + Gets the location of the schema that contains the error. This string also includes the name of the schema at the end. + The location of the schema that contains the error. + + + Gets the name of the schema that contains the error. + The name of the schema that contains the error. + + + Gets a string representation of the stack trace at the time the error occurred. + A string representation of the stack trace at the time the error occurred. + + + + Defines the different severities of errors that can occur when validating an Entity Framework model. + + + + + A warning that does not prevent the model from being used. + + + + + An error that prevents the model from being used. + + + + + Represents a end of a Association Type + + + + + Initializes a new instance of the RelationshipEndMember class + + + + + Represents the edm member class + + + + Returns the name of this member. + The name of this member. + + + + Gets or sets the name of the property. Setting this from a store-space model-convention will change the name of the database + column for this property. In the conceptual model, this should align with the corresponding property from the entity class + and should not be changed. + + The name of this member. + + + Gets the type on which this member is declared. + + A object that represents the type on which this member is declared. + + + + + Gets the instance of the class that contains both the type of the member and facets for the type. + + + A object that contains both the type of the member and facets for the type. + + + + + Tells whether this member is marked as a Computed member in the EDM definition + + + + + Tells whether this member's Store generated pattern is marked as Identity in the EDM definition + + + + Access the EntityType of the EndMember in an association. + The EntityType of the EndMember in an association. + + + Gets the operational behavior of this relationship end member. + + One of the values. The default is + + . + + + + Gets the multiplicity of this relationship end member. + + One of the values. + + + + + Creates a read-only AssociationEndMember instance. + + The name of the association end member. + The reference type for the end. + The multiplicity of the end. + Flag that indicates the delete behavior of the end. + Metadata properties to be associated with the instance. + The newly created AssociationEndMember instance. + The specified name is null or empty. + The specified reference type is null. + + + + Gets the built-in type kind for this . + + + A object that represents the built-in type kind for this + + . + + + + + Class for representing an Association set + + + + + Class for representing a relationship set + + + + + Class for representing a entity set + + + + Returns the name of the current entity or relationship set. + The name of the current entity or relationship set. + + + + Gets the built-in type kind for this . + + + A object that represents the built-in type kind for this + + . + + + + + Gets escaped provider specific SQL describing this entity set. + + + + + Gets or sets the name of the current entity or relationship set. + If this property is changed from store-space, the mapping layer must also be updated to reflect the new name. + To change the table name of a store space use the Table property. + + The name of the current entity or relationship set. + Thrown if the setter is called when EntitySetBase instance is in ReadOnly state + + + Gets the entity container of the current entity or relationship set. + + An object that represents the entity container of the current entity or relationship set. + + Thrown if the setter is called when the EntitySetBase instance or the EntityContainer passed into the setter is in ReadOnly state + + + + Gets the entity type of this . + + + An object that represents the entity type of this + + . + + Thrown if the setter is called when EntitySetBase instance is in ReadOnly state + + + + Gets or sets the database table name for this entity set. + + if value passed into setter is null + Thrown if the setter is called when EntitySetBase instance is in ReadOnly state + + + + Gets or sets the database schema for this entity set. + + if value passed into setter is null + Thrown if the setter is called when EntitySetBase instance is in ReadOnly state + + + + Gets the relationship type of this . + + + An object that represents the relationship type of this + + . + + + + + Gets the built-in type kind for this . + + + A object that represents the built-in type kind for this + + . + + + + + Creates a read-only AssociationSet instance from the specified parameters. + + The name of the association set. + The association type of the elements in the association set. + The entity set for the source association set end. + The entity set for the target association set end. + Metadata properties to be associated with the instance. + The newly created AssociationSet instance. + The specified name is null or empty. + The specified association type is null. + + The entity type of one of the ends of the specified + association type does not match the entity type of the corresponding entity set end. + + + + + Gets the association related to this . + + + An object that represents the association related to this + + . + + + + + Gets the ends of this . + + + A collection of type that contains the ends of this + + . + + + + + Gets the built-in type kind for this . + + + A object that represents built-in type kind for this + + . + + + + + Class representing a AssociationSet End + + + + + Returns the name of the End role for this . + + + The name of the End role for this . + + + + + Gets the built-in type kind for this . + + + A object that represents the built-in type kind for this + + . + + + + + Gets the parent association set of this . + + + An object that represents the parent association set of this + + . + + Thrown if Setter is called when the AssociationSetEnd instance is in ReadOnly state + + + + Gets the End member that this object corresponds to. + + + An object that represents the End member that this + + object corresponds to. + + Thrown if Setter is called when the AssociationSetEnd instance is in ReadOnly state + + + + Gets the name of the End for this . + + + The name of the End for this . + + + + + Gets the name of the End role for this . + + + The name of the End role for this . + + Thrown if Setter is called when the AssociationSetEnd instance is in ReadOnly state + + + Gets the entity set referenced by this End role. + + An object that represents the entity set referred by this End role. + + + + + Describes an association/relationship between two entities in the conceptual model or a foreign key relationship + between two tables in the store model. In the conceptual model the dependant class may or may not define a foreign key property. + If a foreign key is defined the property will be true and the property will contain details of the foreign keys + + + + + Represents the Relationship type + + + + + Represents the Entity Type + + + + + Represents the Structural Type + + + + + Base EdmType class for all the model types + + + + Returns the full name of this type. + The full name of this type. + + + + Returns an instance of the whose element type is this type. + + + The object whose element type is this type. + + + + Gets the name of this type. + The name of this type. + + + Gets the namespace of this type. + The namespace of this type. + + + Gets a value indicating whether this type is abstract or not. + true if this type is abstract; otherwise, false. + Thrown if the setter is called on instance that is in ReadOnly state + + + Gets the base type of this type. + The base type of this type. + Thrown if the setter is called on instance that is in ReadOnly state + Thrown if the value passed in for setter will create a loop in the inheritance chain + + + Gets the full name of this type. + The full name of this type. + + + + Adds a member to this type + + The member to add + + + Removes a member from this type. + The member to remove. + + + Gets the list of members on this type. + + A collection of type that contains a set of members on this type. + + + + + Adds the specified property to the list of keys for the current entity. + + The property to add. + if member argument is null + Thrown if the EntityType has a base type of another EntityTypeBase. In this case KeyMembers should be added to the base type + If the EntityType instance is in ReadOnly state + + + Removes the specified key member from the collection. + The key member to remove. + + + Gets the list of all the key members for the current entity or relationship type. + + A object that represents the list of key members for the current entity or relationship type. + + + + Gets the list of all the key properties for this entity type. + The list of all the key properties for this entity type. + + + Gets the list of ends for this relationship type. + + A collection of type that contains the list of Ends for this relationship type. + + + + + Creates a read-only AssociationType instance from the specified parameters. + + The name of the association type. + The namespace of the association type. + Flag that indicates a foreign key (FK) relationship. + The data space for the association type. + The source association end member. + The target association end member. + A referential constraint. + Metadata properties to be associated with the instance. + The newly created AssociationType instance. + The specified name is null or empty. + The specified namespace is null or empty. + + + + Gets the built-in type kind for this . + + + A object that represents the built-in type kind for this + + . + + + + + Gets the list of ends for this . + + + A collection of type that contains the list of ends for this + + . + + + + Gets or sets the referential constraint. + The referential constraint. + + + + Gets the list of constraints for this . + + + A collection of type that contains the list of constraints for this + + . + + + + Gets the Boolean property value that specifies whether the column is a foreign key. + A Boolean value that specifies whether the column is a foreign key. If true, the column is a foreign key. If false (default), the column is not a foreign key. + + + + Represents the structure of an . In the conceptual-model this represents the shape and structure + of an entity. In the store model this represents the structure of a table. To change the Schema and Table name use EntitySet. + + + + + Returns a object that references this + + . + + + A object that references this + + . + + + + + The factory method for constructing the EntityType object. + + The name of the entity type. + The namespace of the entity type. + The dataspace in which the EntityType belongs to. + Name of key members for the type. + Members of the entity type (primitive and navigation properties). + Metadata properties to be associated with the instance. + The EntityType object. + Thrown if either name, namespace arguments are null. + The newly created EntityType will be read only. + + + + The factory method for constructing the EntityType object. + + The name of the entity type. + The namespace of the entity type. + The dataspace in which the EntityType belongs to. + The base type. + Name of key members for the type. + Members of the entity type (primitive and navigation properties). + Metadata properties to be associated with the instance. + The EntityType object. + Thrown if either name, namespace arguments are null. + The newly created EntityType will be read only. + + + + Adds the specified navigation property to the members of this type. + The navigation property is added regardless of the read-only flag. + + The navigation property to be added. + + + + Gets the built-in type kind for this . + + + A object that represents the built-in type kind for this + + . + + + + Gets the declared navigation properties associated with the entity type. + The declared navigation properties associated with the entity type. + + + + Gets the navigation properties of this . + + + A collection of type that contains the list of navigation properties on this + + . + + + + Gets the list of declared properties for the entity type. + The declared properties for the entity type. + + + Gets the collection of declared members for the entity type. + The collection of declared members for the entity type. + + + + Gets the list of properties for this . + + + A collection of type that contains the list of properties for this + + . + + + + + Represents an enumeration type. + + + + + Class representing a simple type + + + + + Creates a read-only EnumType instance. + + The name of the enumeration type. + The namespace of the enumeration type. + The underlying type of the enumeration type. + Indicates whether the enumeration type can be treated as a bit field; that is, a set of flags. + The members of the enumeration type. + Metadata properties to be associated with the enumeration type. + The newly created EnumType instance. + underlyingType is null. + + name is null or empty. + -or- + namespaceName is null or empty. + -or- + underlyingType is not a supported underlying type. + -or- + The specified members do not have unique names. + -or- + The value of a specified member is not in the range of the underlying type. + + + + Returns the kind of the type + + + Gets a collection of enumeration members for this enumeration type. + + + Gets a value indicating whether the enum type is defined as flags (i.e. can be treated as a bit field) + + + Gets the underlying type for this enumeration type. + + + + Specifies the kinds of item attributes in the conceptual model. + + + + + An enumeration member indicating that an item attribute is System + + + + + An enumeration member indicating that an item attribute is Extended. + + + + + List of all the built in types + + + + + Association Type Kind + + + + + AssociationSetEnd Kind + + + + + AssociationSet Kind + + + + + Association Type Kind + + + + + EntitySetBase Kind + + + + + Entity Type Base Kind + + + + + Collection Type Kind + + + + + Collection Kind + + + + + Complex Type Kind + + + + + Documentation Kind + + + + + DeleteAction Type Kind + + + + + Edm Type Kind + + + + + Entity Container Kind + + + + + Entity Set Kind + + + + + Entity Type Kind + + + + + Enumeration Type Kind + + + + + Enum Member Kind + + + + + Facet Kind + + + + + EdmFunction Kind + + + + + Function Parameter Kind + + + + + Global Item Type Kind + + + + + Metadata Property Kind + + + + + Navigation Property Kind + + + + + Metadata Item Type Kind + + + + + EdmMember Type Kind + + + + + Parameter Mode Kind + + + + + Primitive Type Kind + + + + + Primitive Type Kind Kind + + + + + EdmProperty Type Kind + + + + + ProviderManifest Type Kind + + + + + Referential Constraint Type Kind + + + + + Ref Type Kind + + + + + RelationshipEnd Type Kind + + + + + Relationship Multiplicity Type Kind + + + + + Relationship Set Type Kind + + + + + Relationship Type + + + + + Row Type Kind + + + + + Simple Type Kind + + + + + Structural Type Kind + + + + + Type Information Kind + + + + + Represents the Edm Collection Type + + + + + Gets the built-in type kind for this . + + + A object that represents the built-in type kind for this + + . + + + + + Gets the instance of the class that contains the type of the element that this current + + object includes and facets for that type. + + + The instance of the class that contains the type of the element that this current + + object includes and facets for that type. + + + + + Represents the Edm Complex Type. This can be used to configure complex types + from a conceptual-space model-based convention. Complex types are not supported in the store model. + + + + + Creates a new instance of the type. + + The name of the complex type. + The namespace of the complex type. + The dataspace to which the complex type belongs to. + Members of the complex type. + Metadata properties to be associated with the instance. + Thrown if either name, namespace or members argument is null. + + A new instance a the type. + + + The newly created will be read only. + + + + + Gets the built-in type kind for this . + + + A object that represents the built-in type kind for this + + . + + + + + Gets the list of properties for this . + + + A collection of type that contains the list of properties for this + + . + + + + + Class representing the Documentation associated with an item + + + + + Initializes a new Documentation instance. + + A summary string. + A long description string. + + + + Returns the summary for this . + + + The summary for this . + + + + + Gets the built-in type kind for this . + + + A object that represents the built-in type kind for this + + . + + + + + Gets the summary for this . + + + The summary for this . + + + + + Gets the long description for this . + + + The long description for this . + + + + + Gets a value indicating whether this object contains only a null or an empty + + and a + + . + + + true if this object contains only a null or an empty + + and a + + ; otherwise, false. + + + + + Class for representing a function + + + + + Adds a parameter to this function. + + The parameter to be added. + + + + The factory method for constructing the object. + + The name of the function. + The namespace of the function. + The namespace the function belongs to. + Additional function attributes and properties. + Metadata properties that will be added to the function. Can be null. + + A new, read-only instance of the type. + + + + + Gets the built-in type kind for this . + + + One of the enumeration values of the enumeration. + + + + Returns the full name (namespace plus name) of this type. + The full name of the type. + + + + Gets the parameters of this . + + + A collection of type that contains the parameters of this + + . + + + + + Gets the return parameter of this . + + + A object that represents the return parameter of this + + . + + + + + Gets the return parameters of this . + + + A collection of type that represents the return parameters of this + + . + + + + Gets the store function name attribute of this function. + + + Gets the parameter type semantics attribute of this function. + + + Gets the aggregate attribute of this function. + + + + Gets a value indicating whether built in attribute is present on this function. + + + true if the attribute is present; otherwise, false. + + + + + Gets a value indicating whether this instance is from the provider manifest. + + + true if this instance is from the provider manifest; otherwise, false. + + + + + Gets a value indicating whether the is a niladic function (a function that accepts no arguments). + + + true if the function is niladic; otherwise, false. + + + + Gets whether this instance is mapped to a function or to a stored procedure. + true if this instance is mapped to a function; false if this instance is mapped to a stored procedure. + + + Gets a query in the language that is used by the database management system or storage model. + + A string value in the syntax used by the database management system or storage model that contains the query or update statement of the + + . + + + + Gets or sets the schema associated with the function. + The schema associated with the function. + + + + In conceptual-space, EdmProperty represents a property on an Entity. + In store-space, EdmProperty represents a column in a table. + + + + Creates a new primitive property. + The newly created property. + The name of the property. + The type of the property. + + + Creates a new enum property. + The newly created property. + The name of the property. + The type of the property. + + + Creates a new complex property. + The newly created property. + The name of the property. + The type of the property. + + + + Creates a new instance of EdmProperty type. + + Name of the property. + + Property + + A new instance of EdmProperty type + + + Sets the metadata properties. + The metadata properties to be set. + + + + Gets the built-in type kind for this . + + + A object that represents the built-in type kind for this + + . + + + + + Gets a value indicating whether this can have a null value. + + + Nullability in the conceptual model and store model is a simple indication of whether or not + the property is considered nullable. Nullability in the object model is more complex. + When using convention based mapping (as usually happens with POCO entities), a property in the + object model is considered nullable if and only if the underlying CLR type is nullable and + the property is not part of the primary key. + When using attribute based mapping (usually used with entities that derive from the EntityObject + base class), a property is considered nullable if the IsNullable flag is set to true in the + attribute. This flag can + be set to true even if the underlying type is not nullable, and can be set to false even if the + underlying type is nullable. The latter case happens as part of default code generation when + a non-nullable property in the conceptual model is mapped to a nullable CLR type such as a string. + In such a case, the Entity Framework treats the property as non-nullable even though the CLR would + allow null to be set. + There is no good reason to set a non-nullable CLR type as nullable in the object model and this + should not be done even though the attribute allows it. + + + true if this can have a null value; otherwise, false. + + Thrown if the setter is called when the EdmProperty instance is in ReadOnly state + + + Gets the type name of the property. + The type name of the property. + + + + Gets the default value for this . + + + The default value for this . + + Thrown if the setter is called when the EdmProperty instance is in ReadOnly state + + + Gets whether the property is a collection type property. + true if the property is a collection type property; otherwise, false. + + + Gets whether this property is a complex type property. + true if this property is a complex type property; otherwise, false. + + + Gets whether this property is a primitive type. + true if this property is a primitive type; otherwise, false. + + + Gets whether this property is an enumeration type property. + true if this property is an enumeration type property; otherwise, false. + + + Gets whether this property is an underlying primitive type. + true if this property is an underlying primitive type; otherwise, false. + + + Gets the complex type information for this property. + The complex type information for this property. + + + Gets the primitive type information for this property. + The primitive type information for this property. + + + Gets the enumeration type information for this property. + The enumeration type information for this property. + + + Gets the underlying primitive type information for this property. + The underlying primitive type information for this property. + + + Gets or sets the concurrency mode for the property. + The concurrency mode for the property. + + + Gets or sets the database generation method for the database column associated with this property + The store generated pattern for the property. + + + Gets or sets the kind of collection for this model. + The kind of collection for this model. + + + Gets whether the maximum length facet is constant for the database provider. + true if the facet is constant; otherwise, false. + + + Gets or sets the maximum length of the property. + The maximum length of the property. + + + Gets or sets whether this property uses the maximum length supported by the provider. + true if this property uses the maximum length supported by the provider; otherwise, false. + + + Gets whether the fixed length facet is constant for the database provider. + true if the facet is constant; otherwise, false. + + + Gets or sets whether the length of this property is fixed. + true if the length of this property is fixed; otherwise, false. + + + Gets whether the Unicode facet is constant for the database provider. + true if the facet is constant; otherwise, false. + + + Gets or sets whether this property is a Unicode property. + true if this property is a Unicode property; otherwise, false. + + + Gets whether the precision facet is constant for the database provider. + true if the facet is constant; otherwise, false. + + + Gets or sets the precision of this property. + The precision of this property. + + + Gets whether the scale facet is constant for the database provider. + true if the facet is constant; otherwise, false. + + + Gets or sets the scale of this property. + The scale of this property. + + + + Class for representing an entity container + + + + + Creates an entity container with the specified name and data space. + + The entity container name. + The entity container data space. + Thrown if the name argument is null. + Thrown if the name argument is empty string. + + + + Returns an object by using the specified name for the entity set. + + + An object that represents the entity set that has the specified name. + + The name of the entity set that is searched for. + true to perform the case-insensitive search; otherwise, false. + + + + Returns an object by using the specified name for the entity set. + + true if there is an entity set that matches the search criteria; otherwise, false. + The name of the entity set that is searched for. + true to perform the case-insensitive search; otherwise, false. + + When this method returns, contains an object. If there is no entity set, this output parameter contains null. + + + + + Returns a object by using the specified name for the relationship set. + + + An object that represents the relationship set that has the specified name. + + The name of the relationship set that is searched for. + true to perform the case-insensitive search; otherwise, false. + + + + Returns a object by using the specified name for the relationship set. + + true if there is a relationship set that matches the search criteria; otherwise, false. + The name of the relationship set that is searched for. + true to perform the case-insensitive search; otherwise, false. + + When this method returns, contains a object. + + + + + Returns the name of this . + + + The name of this . + + + + + Adds the specified entity set to the container. + + The entity set to add. + + + Removes a specific entity set from the container. + The entity set to remove. + + + + Adds a function import to the container. + + The function import to add. + + + + The factory method for constructing the EntityContainer object. + + The name of the entity container to be created. + DataSpace in which this entity container belongs to. + Entity sets that will be included in the new container. Can be null. + Functions that will be included in the new container. Can be null. + Metadata properties to be associated with the instance. + The EntityContainer object. + Thrown if the name argument is null or empty string. + The newly created EntityContainer will be read only. + + + + Gets the built-in type kind for this . + + + A object that represents the built-in type kind for this + + . + + + + + Gets the name of this . + + + The name of this . + + + + + Gets a list of entity sets and association sets that this + + includes. + + + A object that contains a list of entity sets and association sets that this + + includes. + + + + Gets the association sets for this entity container. + The association sets for this entity container . + + + Gets the entity sets for this entity container. + The entity sets for this entity container . + + + + Specifies a collection of elements. Each function contains the details of a stored procedure that exists in the database or equivalent CommandText that is mapped to an entity and its properties. + + + A that contains + + elements. + + + + + Represents a particular usage of a structure defined in EntityType. In the conceptual-model, this represents a set that can + query and persist entities. In the store-model it represents a table. + From a store-space model-convention it can be used to configure + table name with property and table schema with property. + + + + + The factory method for constructing the EntitySet object. + + The name of the EntitySet. + The db schema. Can be null. + The db table. Can be null. + + The provider specific query that should be used to retrieve data for this EntitySet. Can be null. + + The entity type of the entities that this entity set type contains. + + Metadata properties that will be added to the newly created EntitySet. Can be null. + + The EntitySet object. + Thrown if the name argument is null or empty string. + The newly created EntitySet will be read only. + + + + Gets the built-in type kind for this . + + + A object that represents the built-in type kind for this + + . + + + + + Gets the entity type of this . + + + An object that represents the entity type of this + + . + + + + + Represents an enumeration member. + + + + Overriding System.Object.ToString to provide better String representation for this type. + The name of this enumeration member. + + + + Creates a read-only EnumMember instance. + + The name of the enumeration member. + The value of the enumeration member. + Metadata properties to be associated with the enumeration member. + The newly created EnumMember instance. + name is null or empty. + + + + Creates a read-only EnumMember instance. + + The name of the enumeration member. + The value of the enumeration member. + Metadata properties to be associated with the enumeration member. + The newly created EnumMember instance. + name is null or empty. + + + + Creates a read-only EnumMember instance. + + The name of the enumeration member. + The value of the enumeration member. + Metadata properties to be associated with the enumeration member. + The newly created EnumMember instance. + name is null or empty. + + + + Creates a read-only EnumMember instance. + + The name of the enumeration member. + The value of the enumeration member. + Metadata properties to be associated with the enumeration member. + The newly created EnumMember instance. + name is null or empty. + + + + Creates a read-only EnumMember instance. + + The name of the enumeration member. + The value of the enumeration member. + Metadata properties to be associated with the enumeration member. + The newly created EnumMember instance. + name is null or empty. + + + Gets the kind of this type. + + + Gets the name of this enumeration member. + + + Gets the value of this enumeration member. + + + + Class for representing a Facet object + This object is Immutable (not just set to readonly) and + some parts of the system are depending on that behavior + + + + + Returns the name of this . + + + The name of this . + + + + + Gets the built-in type kind for this . + + + A object that represents the built-in type kind for this + + . + + + + + Gets the description of this . + + + The object that represents the description of this + + . + + + + + Gets the name of this . + + + The name of this . + + + + + Gets the type of this . + + + The object that represents the type of this + + . + + + + + Gets the value of this . + + + The value of this . + + Thrown if the Facet instance is in ReadOnly state + + + Gets a value indicating whether the value of the facet is unbounded. + true if the value of the facet is unbounded; otherwise, false. + + + + Class for representing a FacetDescription object + + + + Returns the name of this facet. + The name of this facet. + + + Gets the name of this facet. + The name of this facet. + + + Gets the type of this facet. + + An object that represents the type of this facet. + + + + Gets the minimum value for this facet. + The minimum value for this facet. + + + Gets the maximum value for this facet. + The maximum value for this facet. + + + Gets the default value of a facet with this facet description. + The default value of a facet with this facet description. + + + Gets a value indicating whether the value of this facet is a constant. + true if this facet is a constant; otherwise, false. + + + Gets a value indicating whether this facet is a required facet. + true if this facet is a required facet; otherwise, false. + + + + Class representing a function parameter + + + + + Returns the name of this . + + + The name of this . + + + + + The factory method for constructing the object. + + The name of the parameter. + The EdmType of the parameter. + + The of the parameter. + + + A new, read-only instance of the type. + + + + + Gets the built-in type kind for this . + + + A object that represents the built-in type kind for this + + . + + + + + Gets the mode of this . + + + One of the values. + + Thrown if the FunctionParameter instance is in ReadOnly state + + + + Gets the name of this . + + + The name of this . + + + + + Gets the instance of the class that contains both the type of the parameter and facets for the type. + + + A object that contains both the type of the parameter and facets for the type. + + + + Gets the type name of this parameter. + The type name of this parameter. + + + Gets whether the max length facet is constant for the database provider. + true if the facet is constant; otherwise, false. + + + Gets the maximum length of the parameter. + The maximum length of the parameter. + + + Gets whether the parameter uses the maximum length supported by the database provider. + true if parameter uses the maximum length supported by the database provider; otherwise, false. + + + Gets whether the precision facet is constant for the database provider. + true if the facet is constant; otherwise, false. + + + Gets the precision value of the parameter. + The precision value of the parameter. + + + Gets whether the scale facet is constant for the database provider. + true if the facet is constant; otherwise, false. + + + Gets the scale value of the parameter. + The scale value of the parameter. + + + + Gets the on which this parameter is declared. + + + A object that represents the function on which this parameter is declared. + + + + + Class representing a metadata attribute for an item + + + + + The factory method for constructing the MetadataProperty object. + + The name of the metadata property. + The type usage of the metadata property. + The value of the metadata property. + The MetadataProperty object. + + Thrown is null. + + The newly created MetadataProperty will be read only. + + + + Creates a metadata annotation having the specified name and value. + + The annotation name. + The annotation value. + A MetadataProperty instance representing the created annotation. + + + + Gets the built-in type kind for this . + + + A object that represents the built-in type kind for this + + . + + + + + Gets the name of this . + + + The name of this . + + + + + Gets the value of this . + + + The value of this . + + Thrown if the MetadataProperty instance is in readonly state + + + + Gets the instance of the class that contains both the type of this + + and facets for the type. + + + A object that contains both the type of this + + and facets for the type. + + Thrown if the MetadataProperty instance is in readonly state + + + + Gets the value of this . + + + The value of this . + + + + + Gets a boolean that indicates whether the metadata property is an annotation. + + + + + Represent the edm navigation property class + + + + + Where the given navigation property is on the dependent end of a referential constraint, + returns the foreign key properties. Otherwise, returns an empty set. We will return the members in the order + of the principal end key properties. + + A collection of the foreign key properties. + + + + Creates a NavigationProperty instance from the specified parameters. + + The name of the navigation property. + Specifies the navigation property type and its facets. + The relationship type for the navigation. + The source end member in the navigation. + The target end member in the navigation. + The metadata properties of the navigation property. + The newly created NavigationProperty instance. + + + + Gets the built-in type kind for this . + + + A object that represents the built-in type kind for this + + . + + + + Gets the relationship type that this navigation property operates on. + The relationship type that this navigation property operates on. + Thrown if the NavigationProperty instance is in ReadOnly state + + + Gets the "to" relationship end member of this navigation. + The "to" relationship end member of this navigation. + Thrown if the NavigationProperty instance is in ReadOnly state + + + Gets the "from" relationship end member in this navigation. + The "from" relationship end member in this navigation. + Thrown if the NavigationProperty instance is in ReadOnly state + + + + Represents the list of possible actions for delete operation + + + + + no action + + + + + Cascade to other ends + + + + + The enumeration defining the mode of a parameter + + + + + In parameter + + + + + Out parameter + + + + + Both in and out parameter + + + + + Return Parameter + + + + + Class representing a primitive type + + + + + Returns the equivalent of this + + . + + + For example if this instance is nvarchar and it's + base type is Edm String then the return type is Edm String. + If the type is actually already a model type then the + return type is "this". + + + An object that is an equivalent of this + + . + + + + Returns the list of primitive types. + + A collection of type that contains the list of primitive types. + + + + + Returns the equivalent of a + + . + + + An object that is an equivalent of a specified + + . + + + A value of type . + + + + + Gets the built-in type kind for this . + + + A object that represents the built-in type kind for this + + . + + + + + Gets a enumeration value that indicates a primitive type of this + + . + + + A enumeration value that indicates a primitive type of this + + . + + + + + Gets the list of facet descriptions for this . + + + A collection of type that contains the list of facet descriptions for this + + . + + + + + Returns an equivalent common language runtime (CLR) type of this + + . Note that the + + property always returns a non-nullable type value. + + + A object that represents an equivalent common language runtime (CLR) type of this + + . + + + + + Primitive Types as defined by EDM + + + + + Binary Type Kind + + + + + Boolean Type Kind + + + + + Byte Type Kind + + + + + DateTime Type Kind + + + + + Decimal Type Kind + + + + + Double Type Kind + + + + + Guid Type Kind + + + + + Single Type Kind + + + + + SByte Type Kind + + + + + Int16 Type Kind + + + + + Int32 Type Kind + + + + + Int64 Type Kind + + + + + String Type Kind + + + + + Time Type Kind + + + + + DateTimeOffset Type Kind + + + + + Geometry Type Kind + + + + + Geography Type Kind + + + + + Geometric point type kind + + + + + Geometric linestring type kind + + + + + Geometric polygon type kind + + + + + Geometric multi-point type kind + + + + + Geometric multi-linestring type kind + + + + + Geometric multi-polygon type kind + + + + + Geometric collection type kind + + + + + Geographic point type kind + + + + + Geographic linestring type kind + + + + + Geographic polygon type kind + + + + + Geographic multi-point type kind + + + + + Geographic multi-linestring type kind + + + + + Geographic multi-polygon type kind + + + + + Geographic collection type kind + + + + + This class represents a referential constraint between two entities specifying the "to" and "from" ends of the relationship. + + + + + Constructs a new constraint on the relationship + + role from which the relationship originates + role to which the relationship is linked/targeted to + properties on entity type of to role which take part in the constraint + properties on entity type of from role which take part in the constraint + Argument Null exception if any of the arguments is null + + + + Returns the combination of the names of the + + and the + + . + + + The combination of the names of the + + and the + + . + + + + + Gets the built-in type kind for this . + + + A object that represents the built-in type kind for this + + . + + + + + Gets the "from role" that takes part in this + + . + + + A object that represents the "from role" that takes part in this + + . + + Thrown if value passed into setter is null + Thrown if the ReferentialConstraint instance is in ReadOnly state + + + + Gets the "to role" that takes part in this . + + + A object that represents the "to role" that takes part in this + + . + + Thrown if value passed into setter is null + Thrown if the ReferentialConstraint instance is in ReadOnly state + + + + Gets the list of properties for the "from role" on which this + + is defined. + + + A collection of type that contains the list of properties for "from role" on which this + + is defined. + + + + + Gets the list of properties for the "to role" on which this + + is defined. + + + A collection of type that contains the list of properties for the "to role" on which this + + is defined. + + + + + Class representing a ref type + + + + + + + + + + + Gets the built-in type kind for this . + + + A object that represents the built-in type kind for this + + . + + + + + Gets the entity type referenced by this . + + + An object that represents the entity type referenced by this + + . + + + + + Represents the multiplicity information about the end of a relationship type + + + + + Lower Bound is Zero and Upper Bound is One + + + + + Both lower bound and upper bound is one + + + + + Lower bound is zero and upper bound is null + + + + + Represents the Edm Row Type + + + + + The factory method for constructing the object. + + Properties of the row type object. + Metadata properties that will be added to the function. Can be null. + + A new, read-only instance of the object. + + + + + Gets the built-in type kind for this . + + + A object that represents the built-in type kind for this + + . + + + + + Gets the list of properties on this . + + + A collection of type that contains the list of properties on this + + . + + + + Gets a collection of the properties defined by the current type. + A collection of the properties defined by the current type. + + + + Class representing a type information for an item + + + + + Factory method for creating a TypeUsage with specified EdmType and facets + + EdmType for which to create a type usage + facets to be copied into the new TypeUsage + new TypeUsage instance + + + + Creates a object with the specified conceptual model type. + + + A object with the default facet values for the specified + + . + + + A for which the + + object is created. + + + + + Creates a object to describe a string type by using the specified facet values. + + + A object describing a string type by using the specified facet values. + + + A for which the + + object is created. + + true to set the character-encoding standard of the string type to Unicode; otherwise, false. + true to set the character-encoding standard of the string type to Unicode; otherwise, false. + true to set the length of the string type to fixed; otherwise, false. + + + + Creates a object to describe a string type by using the specified facet values and unbounded MaxLength. + + + A object describing a string type by using the specified facet values and unbounded MaxLength. + + + A for which the + + object is created. + + true to set the character-encoding standard of the string type to Unicode; otherwise, false. + true to set the length of the string type to fixed; otherwise, false + + + + Creates a object to describe a binary type by using the specified facet values. + + + A object describing a binary type by using the specified facet values. + + + A for which the + + object is created. + + true to set the length of the binary type to fixed; otherwise, false. + The maximum length of the binary type. + + + + Creates a object to describe a binary type by using the specified facet values. + + + A object describing a binary type by using the specified facet values. + + + A for which the + + object is created. + + true to set the length of the binary type to fixed; otherwise, false. + + + + Creates a object of the type that the parameters describe. + + + A object. + + + The simple type that defines the units of measurement of the DateTime object. + + + The degree of granularity of the DateTimeOffset in fractions of a second, based on the number of decimal places supported. For example a precision of 3 means the granularity supported is milliseconds. + + + + + Creates a object of the type that the parameters describe. + + + A object. + + The simple type that defines the units of measurement of the offset. + + The degree of granularity of the DateTimeOffset in fractions of a second, based on the number of decimal places supported. For example a precision of 3 means the granularity supported is milliseconds. + + + + + Creates a object of the type that the parameters describe. + + + A object. + + + The simple type that defines the units of measurement of the DateTime object. + + + The degree of granularity of the DateTimeOffset in fractions of a second, based on the number of decimal places supported. For example a precision of 3 means the granularity supported is milliseconds. + + + + + Creates a object to describe a decimal type by using the specified facet values. + + + A object describing a decimal type by using the specified facet values. + + + A for which the + + object is created. + + + The precision of the decimal type as type . + + + The scale of the decimal type as type . + + + + + Creates a object to describe a decimal type with unbounded precision and scale facet values. + + + A object describing a decimal type with unbounded precision and scale facet values. + + + A for which the + + object is created. + + + + + Checks whether this is a subtype of the specified + + . + + + true if this is a subtype of the specified + + ; otherwise, false. + + + The object to be checked. + + + + + Returns the full name of the type described by this . + + + The full name of the type described by this as string. + + + + + Gets the built-in type kind for this . + + + A object that represents the built-in type kind for this + + . + + + + + Gets the type information described by this . + + + An object that represents the type information described by this + + . + + + + + Gets the list of facets for the type that is described by this + + . + + + A collection of type that contains the list of facets for the type that is described by this + + . + + + + + Returns a Model type usage for a provider type + + Model (CSpace) type usage + + + + Do not perform any extension check + + + + + Check the extension against a specific value + + + + + Check the extension against the set of acceptable extensions + + + + + Runtime Metadata Workspace + + + + + Initializes a new instance of the class. + + + + + Constructs a with loaders for all item collections () + needed by EF except the o/c mapping which will be created automatically based on the given o-space and c-space + loaders. The item collection delegates are executed lazily when a given collection is used for the first + time. It is acceptable to pass a delegate that returns null if the collection will never be used, but this + is rarely done, and any attempt by EF to use the collection in such cases will result in an exception. + + Delegate to return the c-space (CSDL) item collection. + Delegate to return the s-space (SSDL) item collection. + Delegate to return the c/s mapping (MSL) item collection. + Delegate to return the o-space item collection. + + + + Constructs a with loaders for all item collections () + that come from traditional EDMX mapping. Default o-space and o/c mapping collections will be used. + The item collection delegates are executed lazily when a given collection is used for the first + time. It is acceptable to pass a delegate that returns null if the collection will never be used, but this + is rarely done, and any attempt by EF to use the collection in such cases will result in an exception. + + Delegate to return the c-space (CSDL) item collection. + Delegate to return the s-space (SSDL) item collection. + Delegate to return the c/s mapping (MSL) item collection. + + + + Initializes a new instance of the class using the specified paths and assemblies. + + The paths to workspace metadata. + The names of assemblies used to construct workspace. + + + + Creates an configured to use the + + data space. + + The created parser object. + + + + Creates a new bound to this metadata workspace based on the specified query expression. + + + A new with the specified expression as it's + + property. + + + A that defines the query. + + + If + + is null + + + If + + contains metadata that cannot be resolved in this metadata workspace + + + If + + is not structurally valid because it contains unresolvable variable references + + + + + Gets items. + + + The items. + + + The from which to retrieve items. + + + + Registers the item collection with each associated data model. + The output parameter collection that needs to be filled up. + + + Loads metadata from the given assembly. + The assembly from which the metadata will be loaded. + + + Loads metadata from the given assembly. + The assembly from which the metadata will be loaded. + The delegate for logging the load messages. + + + Returns an item by using the specified identity and the data model. + The item that matches the given identity in the specified data model. + The identity of the item. + The conceptual model in which the item is searched. + The type returned by the method. + Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace + + + Returns an item by using the specified identity and the data model. + true if there is an item that matches the search criteria; otherwise, false. + The conceptual model on which the item is searched. + The conceptual model on which the item is searched. + + When this method returns, contains a object. This parameter is passed uninitialized. + + The type returned by the method. + + + Returns an item by using the specified identity and the data model. + The item that matches the given identity in the specified data model. + The identity of the item. + true to perform the case-insensitive search; otherwise, false. + The conceptual model on which the item is searched. + The type returned by the method. + Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace + + + Returns an item by using the specified identity and the data model. + true if there is an item that matches the search criteria; otherwise, false. + The conceptual model on which the item is searched. + true to perform the case-insensitive search; otherwise, false. + The conceptual model on which the item is searched. + + When this method returns, contains a object. This parameter is passed uninitialized. + + The type returned by the method. + + + Gets all the items in the specified data model. + + A collection of type that contains all the items in the specified data model. + + The conceptual model for which the list of items is needed. + The type returned by the method. + Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace + + + + Returns an object by using the specified type name, namespace name, and data model. + + + An object that represents the type that matches the given type name and the namespace name in the specified data model. If there is no matched type, this method returns null. + + The name of the type. + The namespace of the type. + The conceptual model on which the type is searched. + Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace + + + + Returns an object by using the specified type name, namespace name, and data model. + + true if there is a type that matches the search criteria; otherwise, false. + The name of the type. + The namespace of the type. + The conceptual model on which the type is searched. + + When this method returns, contains an object. This parameter is passed uninitialized. + + + + + Returns an object by using the specified type name, namespace name, and data model. + + + An object. + + The name of the type. + The namespace of the type. + true to perform the case-insensitive search; otherwise, false. + The conceptual model on which the type is searched. + Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace + + + + Returns an object by using the specified type name, namespace name, and data model. + + true if there is a type that matches the search criteria; otherwise, false. + The name of the type. + The namespace of the type. + true to perform the case-insensitive search; otherwise, false. + The conceptual model on which the type is searched. + + When this method returns, contains an object. This parameter is passed uninitialized. + + + + + Returns an object by using the specified entity container name and the data model. + + If there is no entity container, this method returns null; otherwise, it returns the first entity container. + The name of the entity container. + The conceptual model on which the entity container is searched. + Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace + + + + Returns an object by using the specified entity container name and the data model. + + true if there is an entity container that matches the search criteria; otherwise, false. + The name of the entity container. + The conceptual model on which the entity container is searched. + + When this method returns, contains an object. If there is no entity container, this output parameter contains null; otherwise, it returns the first entity container. This parameter is passed uninitialized. + + + + + Returns an object by using the specified entity container name and the data model. + + If there is no entity container, this method returns null; otherwise, it returns the first entity container. + The name of the entity container. + true to perform the case-insensitive search; otherwise, false. + The conceptual model on which the entity container is searched. + Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace + + + + Returns an object by using the specified entity container name and the data model. + + true if there is an entity container that matches the search criteria; otherwise, false. + The name of the entity container. + true to perform the case-insensitive search; otherwise, false. + The conceptual model on which the entity container is searched. + + When this method returns, contains an object. If there is no entity container, this output parameter contains null; otherwise, it returns the first entity container. This parameter is passed uninitialized. + + + + Returns all the overloads of the functions by using the specified name, namespace name, and data model. + + A collection of type that contains all the functions that match the specified name in a given namespace and a data model. + + The name of the function. + The namespace of the function. + The conceptual model in which the functions are searched. + Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace + + + Returns all the overloads of the functions by using the specified name, namespace name, and data model. + + A collection of type that contains all the functions that match the specified name in a given namespace and a data model. + + The name of the function. + The namespace of the function. + The conceptual model in which the functions are searched. + true to perform the case-insensitive search; otherwise, false. + Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace + + + Returns the list of primitive types in the specified data model. + + A collection of type that contains all the primitive types in the specified data model. + + The data model for which you need the list of primitive types. + Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace + + + Gets all the items in the specified data model. + + A collection of type that contains all the items in the specified data model. + + The conceptual model for which the list of items is needed. + Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace + + + + Tests the retrieval of . + + true if the retrieval was successful; otherwise, false. + + The from which to attempt retrieval of + + . + + When this method returns, contains the item collection. This parameter is passed uninitialized. + + + + Returns a object that represents the object space type that matches the type supplied by the parameter edmSpaceType . + + + A object that represents the Object space type. If there is no matched type, this method returns null. + + + A object that represents the + + . + + + + + Returns a object via the out parameter objectSpaceType that represents the type that matches the + + supplied by the parameter edmSpaceType . + + true if there is a type that matches the search criteria; otherwise, false. + + A object that represents the + + . + + + When this method returns, contains a object that represents the Object space type. This parameter is passed uninitialized. + + + + + Returns a object that represents the object space type that matches the type supplied by the parameter edmSpaceType . + + + A object that represents the Object space type. If there is no matched type, this method returns null. + + + A object that represents the + + . + + + + + Returns a object via the out parameter objectSpaceType that represents the type that matches the + + supplied by the parameter edmSpaceType . + + true if there is a type that matches the search criteria; otherwise, false. + + A object that represents the + + . + + + When this method returns, contains a object that represents the Object space type. This parameter is passed uninitialized. + + + + + Returns a object that represents the + + that matches the type supplied by the parameter objectSpaceType . + + + A object that represents the + + . If there is no matched type, this method returns null. + + + A that supplies the type in the object space. + + + + + Returns a object via the out parameter edmSpaceType that represents the + + that matches the type supplied by the parameter objectSpaceType . + + true if there is a type that matches the search criteria; otherwise, false. + + A object that represents the object space type. + + + When this method returns, contains a object that represents the + + . This parameter is passed uninitialized. + + + + + Returns a object that represents the + + that matches the type supplied by the parameter objectSpaceType . + + + A object that represents the + + . If there is no matched type, this method returns null. + + + A that supplies the type in the object space. + + + + + Returns a object via the out parameter edmSpaceType that represents the + + that matches the type supplied by the parameter objectSpaceType . + + true on success, false on failure. + + A object that represents the object space type. + + + When this method returns, contains a object that represents the + + . This parameter is passed uninitialized. + + + + Clears all the metadata cache entries. + + + Gets original value members from an entity set and entity type. + The original value members from an entity set and entity type. + The entity set from which to retrieve original values. + The entity type of which to retrieve original values. + + + + Returns members of a given / + + for which original values are needed when modifying an entity. + + + The s for which original value is required. + + + An belonging to the C-Space. + + + An that participates in the given + + . + + true if entities may be updated partially; otherwise, false. + + + + The Max EDM version thats going to be supported by the runtime. + + + + + Class for representing a collection of items for the object layer. + Most of the implementation for actual maintenance of the collection is + done by ItemCollection + + + + + Initializes a new instance of the class. + + + + Loads metadata from the given assembly. + The assembly from which the metadata will be loaded. + + + Loads metadata from the given assembly. + The assembly from which the metadata will be loaded. + The EDM metadata source for the O space metadata. + The delegate to which log messages are sent. + + + Loads metadata from the specified assembly. + The assembly from which the metadata will be loaded. + The EDM metadata source for the O space metadata. + + + Returns a collection of primitive type objects. + A collection of primitive type objects. + + + + Returns the CLR type that corresponds to the supplied by the objectSpaceType parameter. + + The CLR type of the OSpace argument. + + A that represents the object space type. + + + + + Returns a CLR type corresponding to the supplied by the objectSpaceType parameter. + + true if there is a type that matches the search criteria; otherwise, false. + + A that represents the object space type. + + The CLR type. + + + The method returns the underlying CLR type for the specified OSpace type argument. If the DataSpace of the parameter is not OSpace, an ArgumentException is thrown. + The CLR type of the OSpace argument. + The OSpace type to look up. + + + Returns the underlying CLR type for the specified OSpace enum type argument. If the DataSpace of the parameter is not OSpace, the method returns false and sets the out parameter to null. + true on success, false on failure + The OSpace enum type to look up + The CLR enum type of the OSpace argument + + + Returns all the items of the specified type from this item collection. + + A collection of type that contains all items of the specified type. + + The type returned by the method. + + + + The enumeration defining the type semantics used to resolve function overloads. + These flags are defined in the provider manifest per function definition. + + + + + Allow Implicit Conversion between given and formal argument types (default). + + + + + Allow Type Promotion between given and formal argument types. + + + + + Use strict Equivalence only. + + + + + Class for representing a collection of items in Store space. + + + + + Initializes a new instance of the class using the specified XMLReader. + + The XMLReader used to create metadata. + + + Initializes a new instances of the class. + The model of the . + + + + Initializes a new instance of the class using the specified file paths. + + The file paths used to create metadata. + + + + Returns a collection of the objects. + + + A object that represents the collection of the + + objects. + + + + + Factory method that creates a . + + + SSDL artifacts to load. Must not be null. + + + Paths to SSDL artifacts. Used in error messages. Can be null in which case + the base Uri of the XmlReader will be used as a path. + + + Custom resolver. Currently used to resolve DbProviderServices implementation. If null + the default resolver will be used. + + + The collection of errors encountered while loading. + + + instance if no errors encountered. Otherwise null. + + + + Gets the provider factory of the StoreItemCollection. + The provider factory of the StoreItemCollection. + + + Gets the provider manifest of the StoreItemCollection. + The provider manifest of the StoreItemCollection. + + + Gets the manifest token of the StoreItemCollection. + The manifest token of the StoreItemCollection. + + + Gets the invariant name of the StoreItemCollection. + The invariant name of the StoreItemCollection. + + + Gets the version of the store schema for this collection. + The version of the store schema for this collection. + + + + This exception is thrown when a requested object is not found in the store. + + + + + Initializes a new instance of . + + + + + Initializes a new instance of with a specialized error message. + + The message that describes the error. + + + + Initializes a new instance of class that uses a specified error message and a reference to the inner exception. + + The message that describes the error. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Caches an ELinq query + + + + Creates a new delegate that represents the compiled LINQ to Entities query. + + , a generic delegate that represents the compiled LINQ to Entities query. + + The lambda expression to compile. + + A type derived from . + + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg5 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg6 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg7 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg8 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg9 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg10 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg11 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg12 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg13 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg14 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg15 must be a primitive type. + + The type T of the query results returned by executing the delegate returned by the + + method. + + + + Creates a new delegate that represents the compiled LINQ to Entities query. + + , a generic delegate that represents the compiled LINQ to Entities query. + + The lambda expression to compile. + + A type derived from . + + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg5 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg6 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg7 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg8 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg9 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg10 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg11 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg12 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg13 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg14 must be a primitive type. + + The type T of the query results returned by executing the delegate returned by the + + method. + + + + Creates a new delegate that represents the compiled LINQ to Entities query. + + , a generic delegate that represents the compiled LINQ to Entities query. + + The lambda expression to compile. + + A type derived from . + + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg5 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg6 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg7 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg8 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg9 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg10 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg11 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg12 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg13 must be a primitive type. + + The type T of the query results returned by executing the delegate returned by the + + method. + + + + Creates a new delegate that represents the compiled LINQ to Entities query. + + , a generic delegate that represents the compiled LINQ to Entities query. + + The lambda expression to compile. + + A type derived from . + + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg5 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg6 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg7 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg8 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg9 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg10 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg11 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg12 must be a primitive type. + + The type T of the query results returned by executing the delegate returned by the + + method. + + + + Creates a new delegate that represents the compiled LINQ to Entities query. + + , a generic delegate that represents the compiled LINQ to Entities query. + + The lambda expression to compile. + + A type derived from . + + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg5 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg6 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg7 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg8 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg9 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg10 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg11 must be a primitive type. + + The type T of the query results returned by executing the delegate returned by the + + method. + + + + Creates a new delegate that represents the compiled LINQ to Entities query. + + , a generic delegate that represents the compiled LINQ to Entities query. + + The lambda expression to compile. + + A type derived from . + + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg5 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg6 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg7 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg8 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg9 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg10 must be a primitive type. + + The type T of the query results returned by executing the delegate returned by the + + method. + + + + Creates a new delegate that represents the compiled LINQ to Entities query. + + , a generic delegate that represents the compiled LINQ to Entities query. + + The lambda expression to compile. + + A type derived from . + + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg5 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg6 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg7 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg8 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg9 must be a primitive type. + + The type T of the query results returned by executing the delegate returned by the + + method. + + + + Creates a new delegate that represents the compiled LINQ to Entities query. + + , a generic delegate that represents the compiled LINQ to Entities query. + + The lambda expression to compile. + + A type derived from . + + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg5 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg6 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg7 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg8 must be a primitive type. + + The type T of the query results returned by executing the delegate returned by the + + method. + + + + Creates a new delegate that represents the compiled LINQ to Entities query. + + , a generic delegate that represents the compiled LINQ to Entities query. + + The lambda expression to compile. + + A type derived from . + + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg5 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg6 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg7 must be a primitive type. + + The type T of the query results returned by executing the delegate returned by the + + method. + + + + Creates a new delegate that represents the compiled LINQ to Entities query. + + , a generic delegate that represents the compiled LINQ to Entities query. + + The lambda expression to compile. + + A type derived from . + + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg5 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg6 must be a primitive type. + + The type T of the query results returned by executing the delegate returned by the + + method. + + + + Creates a new delegate that represents the compiled LINQ to Entities query. + + , a generic delegate that represents the compiled LINQ to Entities query. + + The lambda expression to compile. + + A type derived from . + + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg5 must be a primitive type. + + The type T of the query results returned by executing the delegate returned by the + + method. + + + + Creates a new delegate that represents the compiled LINQ to Entities query. + + , a generic delegate that represents the compiled LINQ to Entities query. + + The lambda expression to compile. + + A type derived from . + + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type. + + The type T of the query results returned by executing the delegate returned by the + + method. + + + + Creates a new delegate that represents the compiled LINQ to Entities query. + + , a generic delegate that represents the compiled LINQ to Entities query. + + The lambda expression to compile. + + A type derived from . + + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type. + + The type T of the query results returned by executing the delegate returned by the + + method. + + + + Creates a new delegate that represents the compiled LINQ to Entities query. + + , a generic delegate that represents the compiled LINQ to Entities query. + + The lambda expression to compile. + + A type derived from . + + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type. + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type. + + The type T of the query results returned by executing the delegate returned by the + + method. + + + + Creates a new delegate that represents the compiled LINQ to Entities query. + + , a generic delegate that represents the compiled LINQ to Entities query. + + The lambda expression to compile. + + A type derived from . + + Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type. + + The type T of the query results returned by executing the delegate returned by the + + method. + + + + Creates a new delegate that represents the compiled LINQ to Entities query. + + , a generic delegate that represents the compiled LINQ to Entities query. + + The lambda expression to compile. + + A type derived from . + + + The type T of the query results returned by executing the delegate returned by the + + method. + + + + + The values currently assigned to the properties of an entity. + + + + + Provides access to the original values of object data. The DbUpdatableDataRecord implements methods that allow updates to the original values of an object. + + + + Retrieves the field value as a Boolean. + The field value as a Boolean. + The ordinal of the field. + + + Retrieves the field value as a byte. + The field value as a byte. + The ordinal of the field. + + + Retrieves the field value as a byte array. + The number of bytes copied. + The ordinal of the field. + The index at which to start copying data. + The destination buffer where data is copied. + The index in the destination buffer where copying will begin. + The number of bytes to copy. + + + Retrieves the field value as a char. + The field value as a char. + The ordinal of the field. + + + Retrieves the field value as a char array. + The number of characters copied. + The ordinal of the field. + The index at which to start copying data. + The destination buffer where data is copied. + The index in the destination buffer where copying will begin. + The number of characters to copy. + + + + Retrieves the field value as an . + + + The field value as an . + + The ordinal of the field. + + + + Retrieves the field value as a + + + The field value as a . + + The ordinal of the field. + + + Retrieves the name of the field data type. + The name of the field data type. + The ordinal of the field. + + + + Retrieves the field value as a . + + + The field value as a . + + The ordinal of the field. + + + Retrieves the field value as a decimal. + The field value as a decimal. + The ordinal of the field. + + + Retrieves the field value as a double. + The field value as a double. + The ordinal of the field. + + + Retrieves the type of a field. + The field type. + The ordinal of the field. + + + Retrieves the field value as a float. + The field value as a float. + The ordinal of the field. + + + + Retrieves the field value as a . + + + The field value as a . + + The ordinal of the field. + + + + Retrieves the field value as an . + + + The field value as an . + + The ordinal of the field. + + + + Retrieves the field value as an . + + + The field value as an . + + The ordinal of the field. + + + + Retrieves the field value as an . + + + The field value as an . + + The ordinal of the field. + + + Retrieves the name of a field. + The name of the field. + The ordinal of the field. + + + Retrieves the ordinal of a field by using the name of the field. + The ordinal of the field. + The name of the field. + + + Retrieves the field value as a string. + The field value. + The ordinal of the field. + + + Retrieves the value of a field. + The field value. + The ordinal of the field. + + + Retrieves the value of a field. + The field value. + The ordinal of the field. + + + Populates an array of objects with the field values of the current record. + The number of field values returned. + An array of objects to store the field values. + + + + Returns whether the specified field is set to . + + + true if the field is set to ; otherwise false. + + The ordinal of the field. + + + Sets the value of a field in a record. + The ordinal of the field. + The value of the field. + + + Sets the value of a field in a record. + The ordinal of the field. + The value of the field. + + + Sets the value of a field in a record. + The ordinal of the field. + The value of the field. + + + Sets the value of a field in a record. + The ordinal of the field. + The value of the field. + + + Sets the value of a field in a record. + The ordinal of the field. + The value of the field. + + + Sets the value of a field in a record. + The ordinal of the field. + The value of the field. + + + Sets the value of a field in a record. + The ordinal of the field. + The value of the field. + + + Sets the value of a field in a record. + The ordinal of the field. + The value of the field. + + + Sets the value of a field in a record. + The ordinal of the field. + The value of the field. + + + Sets the value of a field in a record. + The ordinal of the field. + The value of the field. + + + Sets the value of a field in a record. + The ordinal of the field. + The value of the field. + + + Sets the value of a field in a record. + The ordinal of the field. + The value of the field. + + + Sets the value of a field in a record. + The ordinal of the field. + The value of the field. + + + Sets the value of a field in a record. + The ordinal of the field. + The value of the field. + + + Sets field values in a record. + The number of the fields that were set. + The values of the field. + + + + Sets a field to the value. + + The ordinal of the field. + + + + Retrieves a field value as a . + + + A field value as a . + + The ordinal of the field. + + + + Retrieves the field value as a . + + + The field value as a . + + The ordinal of the field. + + + Sets the value of a field in a record. + The ordinal of the field. + The value of the field. + + + Gets the number of fields in the record. + An integer value that is the field count. + + + Returns a value that has the given field ordinal. + The value that has the given field ordinal. + The ordinal of the field. + + + Gets a value that has the given field name. + The field value. + The name of the field. + + + Gets data record information. + + A object. + + + + + This is the interface that represent the minimum interface required + to be an entity in ADO.NET. + + + + + This class contains the common methods need for an date object. + + + + + Public constant name used for change tracking + Providing this definition allows users to use this constant instead of + hard-coding the string. This helps to ensure the property name is correct + and allows faster comparisons in places where we are looking for this specific string. + Users can still use the case-sensitive string directly instead of the constant, + it will just be slightly slower on comparison. + Including the dash (-) character around the name ensures that this will not conflict with + a real data property, because -EntityKey- is not a valid identifier name + + + + + Raises the event. + + The name of the changed property. + + + + Raises the event. + + The name of the property changing. + + + Returns the minimum date time value supported by the data source. + + A value that is the minimum date time that is supported by the data source. + + + + Raises an event that is used to report that a property change is pending. + The name of the changing property. + + + Raises an event that is used to report that a property change has occurred. + The name for the changed property. + + + Returns a complex type for the specified property. + + Unlike most of the other helper methods in this class, this one is not static + because it references the SetValidValue for complex objects, which is also not static + because it needs a reference to this. + + A complex type object for the property. + A complex object that inherits from complex object. + The name of the complex property that is the complex object. + Indicates whether the type supports null values. + Indicates whether the type is initialized. + The type of the complex object being requested. + + + Determines whether the specified byte arrays contain identical values. + true if both arrays are of the same length and contain the same byte values or if both arrays are null; otherwise, false. + The first byte array value to compare. + The second byte array to compare. + + + Returns a copy of the current byte value. + + A copy of the current value. + + The current byte array value. + + + + Makes sure the value being set for a property is valid. + + + The value being validated. + + The value passed into the property setter. + Flag indicating if this property is allowed to be null. + The name of the property that is being validated. + If value is null for a non nullable value. + + + + Makes sure the value being set for a property is valid. + + + A value being set. + + The value being set. + Indicates whether the property is nullable. + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + The Boolean value. + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + The Boolean value. + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + + + + Makes sure the value being set for a property is valid. + + + A that is set. + + + The value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The value that is set. + + The value that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + A value being set. + + + The value. + + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + + + Makes sure the Single value being set for a property is valid. + + The value being set. + + + The value. + + The name of the property that is being validated. + + + Makes sure the Single value being set for a property is valid. + + The value being set. + + + The value. + + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + Name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The nullable value being set. + + + The nullable value. + + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + + + Makes sure the UInt16 value being set for a property is valid. + The nullable UInt16 value being set. + The nullable UInt16 value. + The name of the property that is being validated. + + + Makes sure the UInt16 value being set for a property is valid. + The nullable UInt16 value being set. + The nullable UInt16 value. + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + + + Makes sure the UInt32 value being set for a property is valid. + The nullable UInt32 value being set. + The nullable UInt32 value. + The name of the property that is being validated. + + + Makes sure the UInt32 value being set for a property is valid. + The nullable UInt32 value being set. + The nullable UInt32 value. + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + + The value being set. + + + The value. + + + + + Makes sure the value being set for a property is valid. + + The nullable UInt64 value being set. + The nullable UInt64 value. + The name of the property that is being validated. + + + + Makes sure the value being set for a property is valid. + + The nullable UInt64 value being set. + The nullable UInt64 value. + + + Validates that the property is not null, and throws if it is. + The validated property. + The string value to be checked. + Flag indicating if this property is allowed to be null. + The name of the property that is being validated. + The string value is null for a non-nullable string. + + + Validates that the property is not null, and throws if it is. + + The validated value. + + The string value to be checked. + Flag indicating if this property is allowed to be null. + + + Validates that the property is not null, and throws if it is. + + The value being set. + + + The value to be checked. + + Flag indicating if this property is allowed to be null. + Name of the property that is being validated. + The value is null for a non-nullable property. + + + Validates that the property is not null, and throws if it is. + + The value being set. + + + value to be checked. + + Flag indicating if this property is allowed to be null. + The value is null for a non-nullable property. + + + Validates that the property is not null, and throws if it is. + + The value being set. + + + value to be checked. + + Flag indicating if this property is allowed to be null. + The name of the property that is being validated. + The value is null for a non-nullable property. + + + Validates that the property is not null, and throws if it is. + + The value being set. + + + The value to be checked. + + Flag indicating if this property is allowed to be null. + The value is null for a non-nullable property. + + + Sets a complex object for the specified property. + A complex type that derives from complex object. + The original complex object for the property, if any. + The complex object is being set. + The complex property that is being set to the complex object. + The type of the object being replaced. + + + Verifies that a complex object is not null. + The complex object being validated. + The complex object that is being validated. + The complex property on the parent object that is associated with complexObject . + The type of the complex object being verified. + + + + Notification that a property has been changed. + + + The PropertyChanged event can indicate all properties on the + object have changed by using either a null reference + (Nothing in Visual Basic) or String.Empty as the property name + in the PropertyChangedEventArgs. + + + + + Notification that a property is about to be changed. + + + The PropertyChanging event can indicate all properties on the + object are changing by using either a null reference + (Nothing in Visual Basic) or String.Empty as the property name + in the PropertyChangingEventArgs. + + + + Notifies the change tracker that a property change is pending on a complex object. + The name of the changing property. + property is null. + + + Notifies the change tracker that a property of a complex object has changed. + The name of the changed property. + property is null. + + + + Attribute for complex properties + Implied default AttributeUsage properties Inherited=True, AllowMultiple=False, + The metadata system expects this and will only look at the first of each of these attributes, even if there are more. + + + + + Base attribute for properties mapped to store elements. + Implied default AttributeUsage properties Inherited=True, AllowMultiple=False, + The metadata system expects this and will only look at the first of each of these attributes, even if there are more. + + + + + attribute for complex types + + + + + Base attribute for schematized types + + + + The name of the type in the conceptual schema that maps to the class to which this attribute is applied. + + A that is the name. + + + + The namespace name of the entity object type or complex type in the conceptual schema that maps to this type. + + A that is the namespace name. + + + + + Attribute identifying the Edm base class + + + + + Attribute indicating an enum type. + + + + + Attribute identifying the Ends defined for a RelationshipSet + Implied default AttributeUsage properties Inherited=True, AllowMultiple=False, + The metadata system expects this and will only look at the first of each of these attributes, even if there are more. + + + + + Initializes a new instance of the + + class. + + The namespace name of the relationship property. + The name of the relationship. The relationship name is not namespace qualified. + The role name at the other end of the relationship. + + + The namespace name of the navigation property. + + A that is the namespace name. + + + + Gets the unqualified relationship name. + The relationship name. + + + Gets the role name at the other end of the relationship. + The target role name is specified by the Role attribute of the other End element in the association that defines this relationship in the conceptual model. For more information, see Association (EDM). + + + + Defines a relationship between two entity types based on an association in the conceptual model. + + + + + Creates an instance of the class. + + The name of the namespace for the association in which this entity participates. + The name of a relationship in which this entity participates. + Name of the role for the type at one end of the association. + + A value of that indicates the multiplicity at one end of the association, such as one or many. + + The type of the entity at one end of the association. + Name of the role for the type at the other end of the association. + + A value of that indicates the multiplicity at the other end of the association, such as one or many. + + The type of the entity at the other end of the association. + + + + Initializes a new instance of the + + class. + + The name of the namespace for the association in which this entity participates. + The name of a relationship in which this entity participates. + Name of the role for the type at one end of the association. + + A value of that indicates the multiplicity at one end of the association, such as one or many. + + The type of the entity at one end of the association. + Name of the role for the type at the other end of the association. + + A value of that indicates the multiplicity at the other end of the association, such as one or many. + + The type of the entity at the other end of the association. + A value that indicates whether the relationship is based on the foreign key value. + + + The namespace for the relationship. + + A that is the namespace for the relationship. + + + + Name of the relationship. + + A that is the name of a relationship that is defined by this + + . + + + + Name of the role at one end of the relationship. + + A that is the name of the role. + + + + Multiplicity at one end of the relationship. + + A value that indicates the multiplicity. + + + + Type of the entity at one end of the relationship. + + A that is the type of the object at this end of the association. + + + + Name of the role at the other end of the relationship. + + A that is the name of the role. + + + + Multiplicity at the other end of the relationship. + + A value that indicates the multiplicity. + + + + Type of the entity at the other end of the relationship. + + A that is the type of the object t the other end of the association. + + + + Gets a Boolean value that indicates whether the relationship is based on the foreign key value. + true if the relationship is based on the foreign key value; otherwise false. + + + + Attribute for scalar properties in an IEntity. + Implied default AttributeUsage properties Inherited=True, AllowMultiple=False, + The metadata system expects this and will only look at the first of each of these attributes, even if there are more. + + + + Gets or sets the value that indicates whether the property can have a null value. + The value that indicates whether the property can have a null value. + + + Gets or sets the value that indicates whether the property is part of the entity key. + The value that indicates whether the property is part of the entity key. + + + + Attribute for static types + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with a unique value for each model referenced by the assembly. + + + Setting this parameter to a unique value for each model file in a Visual Basic + assembly will prevent the following error: + "'System.Data.Entity.Core.Objects.DataClasses.EdmSchemaAttribute' cannot be specified more than once in this project, even with identical parameter values." + + A string that is a unique GUID value for the model in the assembly. + + + + Collection of entities modeling a particular EDM construct + which can either be all entities of a particular type or + entities participating in a particular relationship. + + The type of entities in this collection. + + + + Base class for EntityCollection and EntityReference + + + + + Represents one end of a relationship. + + + + Loads the related object or objects into this related end with the default merge option. + + + Asynchronously loads the related object or objects into this related end with the default merge option. + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + + + + Loads the related object or objects into the related end with the specified merge option. + + The to use when merging objects into an existing + . + + + + Asynchronously loads the related object or objects into the related end with the specified merge option. + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The to use when merging objects into an existing + . + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + + + + Adds an object to the related end. + + An object to add to the collection. entity must implement + + . + + + + Adds an object to the related end. + An object to add to the collection. + + + Removes an object from the collection of objects at the related end. + + true if entity was successfully removed, false if entity was not part of the + + . + + + The object to remove from the collection. entity must implement + + . + + + + Removes an object from the collection of objects at the related end. + + true if entity was successfully removed; false if entity was not part of the + + . + + An object to remove from the collection. + + + Defines a relationship between two attached objects. + + The object being attached. entity must implement + + . + + + + Defines a relationship between two attached objects. + The object being attached. + + + + Returns an that represents the objects that belong to the related end. + + + An that represents the objects that belong to the related end. + + + + + Returns an that iterates through the collection of related objects. + + + An that iterates through the collection of related objects. + + + + + Gets or sets a value indicating whether the entity (for an or all entities + in the collection (for an have been loaded from the database. + + + Loading the related entities from the database either using lazy-loading, as part of a query, or explicitly + with one of the Load methods will set the IsLoaded flag to true. + IsLoaded can be explicitly set to true to prevent the related entities from being lazy-loaded. + This can be useful if the application has caused a subset of related entities to be loaded + and wants to prevent any other entities from being loaded automatically. + Note that explicit loading using will load all related entities from the database + regardless of whether or not IsLoaded is true. + When any related entity is detached the IsLoaded flag is reset to false indicating that not all related entities + are now loaded. + + + True if all the related entities are loaded or the IsLoaded has been explicitly set to true; otherwise false. + + + + Gets the name of the relationship in which this related end participates. + + The name of the relationship in which this is participating. The relationship name is not namespace qualified. + + + + Gets the role name at the source end of the relationship. + The role name at the source end of the relationship. + + + Gets the role name at the target end of the relationship. + The role name at the target end of the relationship. + + + Returns a reference to the metadata for the related end. + + A object that contains metadata for the end of a relationship. + + + + + Returns an that represents the objects that belong to the related end. + + + An that represents the objects that belong to the related end. + + + + + Loads the related object or objects into the related end with the default merge option. + + + When the source object was retrieved by using a query + and the is not + or the related objects are already loaded + or when the source object is not attached to the + or when the source object is being tracked but is in the + or state + or the + used for + is . + + + + + Asynchronously loads the related object or objects into the related end with the default merge option. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + + + When the source object was retrieved by using a query + and the is not + or the related objects are already loaded + or when the source object is not attached to the + or when the source object is being tracked but is in the + or state + or the + used for + is . + + + + + Loads an object or objects from the related end with the specified merge option. + + + The to use when merging objects into an existing + . + + + When the source object was retrieved by using a query + and the + is not + or the related objects are already loaded + or when the source object is not attached to the + or when the source object is being tracked but is in the + or state + or the + used for + is . + + + + + Asynchronously loads an object or objects from the related end with the specified merge option. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The to use when merging objects into an existing + . + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + + + When the source object was retrieved by using a query + and the + is not + or the related objects are already loaded + or when the source object is not attached to the + or when the source object is being tracked but is in the + or state + or the + used for + is . + + + + + Attaches an entity to the related end. This method works in exactly the same way as Attach(object). + It is maintained for backward compatibility with previous versions of IRelatedEnd. + + The entity to attach to the related end + + Thrown when + + is null. + + Thrown when the entity cannot be related via the current relationship end. + + + + Attaches an entity to the related end. If the related end is already filled + or partially filled, this merges the existing entities with the given entity. The given + entity is not assumed to be the complete set of related entities. + Owner and all entities passed in must be in Unchanged or Modified state. + Deleted elements are allowed only when the state manager is already tracking the relationship + instance. + + The entity to attach to the related end + + Thrown when + + is null. + + Thrown when the entity cannot be related via the current relationship end. + + + + Adds an entity to the related end. This method works in exactly the same way as Add(object). + It is maintained for backward compatibility with previous versions of IRelatedEnd. + + Entity instance to add to the related end + + + + Adds an entity to the related end. If the owner is + attached to a cache then the all the connected ends are + added to the object cache and their corresponding relationships + are also added to the ObjectStateManager. The RelatedEnd of the + relationship is also fixed. + + Entity instance to add to the related end + + + + Removes an entity from the related end. This method works in exactly the same way as Remove(object). + It is maintained for backward compatibility with previous versions of IRelatedEnd. + + Entity instance to remove from the related end + Returns true if the entity was successfully removed, false if the entity was not part of the RelatedEnd. + + + + Removes an entity from the related end. If owner is + attached to a cache, marks relationship for deletion and if + the relationship is composition also marks the entity for deletion. + + Entity instance to remove from the related end + Returns true if the entity was successfully removed, false if the entity was not part of the RelatedEnd. + + + + Returns an that iterates through the collection of related objects. + + + An that iterates through the collection of related objects. + + + + + Used internally to deserialize entity objects along with the + + instances. + + The serialized stream. + + + Occurs when a change is made to a related end. + + + Gets the name of the relationship in which this related end participates. + + The name of the relationship in which this participates. The relationship name is not namespace qualified. + + + + Gets the role name at the source end of the relationship. + + A that is the role name. + + + + Gets the role name at the target end of the relationship. + + A that is the role name. + + + + Gets a reference to the metadata for the related end. + + A object that contains metadata for the end of a relationship. + + + + + + + + Initializes a new instance of the class. + + + + + Returns the collection as an used for data binding. + + + An of entity objects. + + + + Loads related objects into the collection, using the specified merge option. + + Specifies how the objects in this collection should be merged with the objects that might have been returned from previous queries against the same + + . + + + + + + + Defines relationships between an object and a collection of related objects in an object context. + + Loads related entities into the local collection. If the collection is already filled + or partially filled, merges existing entities with the given entities. The given + entities are not assumed to be the complete set of related entities. + Owner and all entities passed in must be in Unchanged or Modified state. We allow + deleted elements only when the state manager is already tracking the relationship + instance. + + Collection of objects in the object context that are related to the source object. + entities collection is null. + + The source object or an object in the entities collection is null or is not in an + + or state.-or-The relationship cannot be defined based on the EDM metadata. This can occur when the association in the conceptual schema does not support a relationship between the two types. + + + + Defines a relationship between two attached objects in an object context. + The object being attached. + When the entity is null. + + When the entity cannot be related to the source object. This can occur when the association in the conceptual schema does not support a relationship between the two types.-or-When either object is null or is not in an + + or state. + + + + Adds an object to the collection. + + An object to add to the collection. entity must implement + + . + + entity is null. + + + Removes an object from the collection and marks the relationship for deletion. + true if item was successfully removed; otherwise, false. + The object to remove from the collection. + entity object is null. + The entity object is not attached to the same object context.-or-The entity object does not have a valid relationship manager. + + + Returns an enumerator that is used to iterate through the objects in the collection. + + An that iterates through the set of values cached by + + . + + + + + Returns an enumerator that is used to iterate through the set of values cached by + + . + + + An that iterates through the set of values cached by + + . + + + + Removes all entities from the collection. + + + Determines whether a specific object exists in the collection. + + true if the object is found in the ; otherwise, false. + + + The object to locate in the . + + + + Copies all the contents of the collection to an array, starting at the specified index of the target array. + The array to copy to. + The zero-based index in the array at which copying begins. + + + Used internally to serialize entity objects. + The streaming context. + + + Used internally to deserialize entity objects. + The streaming context. + + + Returns an object query that, when it is executed, returns the same set of objects that exists in the current collection. + + An that represents the entity collection. + + + When the object is in an state + or when the object is in a + state with a + other than + . + + + + Gets the number of objects that are contained in the collection. + + The number of elements that are contained in the + + . + + + + + Gets a value that indicates whether the + + is read-only. + + Always returns false. + + + + IListSource.ContainsListCollection implementation. Always returns false. + This means that the IList we return is the one which contains our actual data, + it is not a list of collections. + + + + + This is the class is the basis for all perscribed EntityObject classes. + + + + + Interface that defines an entity containing a key. + + + + + Gets or sets the for instances of entity types that implement this interface. + + + If an object is being managed by a change tracker, it is expected that + IEntityChangeTracker methods EntityMemberChanging and EntityMemberChanged will be + used to report changes on EntityKey. This allows the change tracker to validate the + EntityKey's new value and to verify if the change tracker is in a state where it can + allow updates to the EntityKey. + + + The for instances of entity types that implement this interface. + + + + + Minimum interface that a data class must implement in order to be managed by a change tracker. + + + + + Gets or sets the used to report changes. + + + The used to report changes. + + + + + Interface that a data class must implement if exposes relationships + + + + Returns the relationship manager that manages relationships for an instance of an entity type. + + Classes that expose relationships must implement this property + by constructing and setting RelationshipManager in their constructor. + The implementation of this property should use the static method RelationshipManager.Create + to create a new RelationshipManager when needed. Once created, it is expected that this + object will be stored on the entity and will be provided through this property. + + + The for this entity. + + + + + Used by the ObjectStateManager to attach or detach this EntityObject to the cache. + + Reference to the ObjectStateEntry that contains this entity + + + Notifies the change tracker that a property change is pending. + The name of the changing property. + property is null. + + + Notifies the change tracker that a property has changed. + The name of the changed property. + property is null. + + + Gets the entity state of the object. + + The of this object. + + + + Gets or sets the key for this object. + + The for this object. + + + + + Returns the container for the lazily created relationship + navigation property objects, collections and refs. + + + + + This interface is implemented by a change tracker and is used by data classes to report changes + + + + Notifies the change tracker of a pending change to a property of an entity type. + The name of the property that is changing. + + + Notifies the change tracker that a property of an entity type has changed. + The name of the property that has changed. + + + Notifies the change tracker of a pending change to a complex property. + The name of the top-level entity property that is changing. + The complex type that contains the property that is changing. + The name of the property that is changing on complex type. + + + Notifies the change tracker that a property of a complex type has changed. + The name of the complex property of the entity type that has changed. + The complex type that contains the property that changed. + The name of the property that changed on complex type. + + + Gets current state of a tracked object. + + An that is the state of the tracked object.For more information, see Identity Resolution, State Managment, and Change Tracking and Tracking Changes in POCO Entities. + + + + + Models a relationship end with multiplicity 1. + + + + Returns the key for the related object. + + Returns the EntityKey of the target entity associated with this EntityReference. + Is non-null in the following scenarios: + (a) Entities are tracked by a context and an Unchanged or Added client-side relationships exists for this EntityReference's owner with the + same RelationshipName and source role. This relationship could have been created explicitly by the user (e.g. by setting + the EntityReference.Value, setting this property directly, or by calling EntityCollection.Add) or automatically through span queries. + (b) If the EntityKey was non-null before detaching an entity from the context, it will still be non-null after detaching, until any operation + occurs that would set it to null, as described below. + (c) Entities are detached and the EntityKey is explicitly set to non-null by the user. + (d) Entity graph was created using a NoTracking query with full span + Is null in the following scenarios: + (a) Entities are tracked by a context but there is no Unchanged or Added client-side relationship for this EntityReference's owner with the + same RelationshipName and source role. + (b) Entities are tracked by a context and a relationship exists, but the target entity has a temporary key (i.e. it is Added) or the key + is one of the special keys + (c) Entities are detached and the relationship was explicitly created by the user. + + + An that is the key of the related object. + + + + + Models a relationship end with multiplicity 1. + + The type of the entity being referenced. + + + + Creates a new instance of . + + + The default constructor is required for some serialization scenarios. It should not be used to + create new EntityReferences. Use the GetRelatedReference or GetRelatedEnd methods on the RelationshipManager + class instead. + + + + + Loads the related object for this with the specified merge option. + + + Specifies how the object should be returned if it already exists in the + + . + + + The source of the is null + or a query returned more than one related end + or a query returned zero related ends, and one related end was expected. + + + + + + + Creates a many-to-one or one-to-one relationship between two objects in the object context. + The object being attached. + When the entity is null. + When the entity cannot be related to the current related end. This can occur when the association in the conceptual schema does not support a relationship between the two types. + + + Creates an equivalent object query that returns the related object. + + An that returns the related object. + + + When the object is in an state + or when the object is in a + state with a + other than . + + + + This method is used internally to serialize related entity objects. + The serialized stream. + + + This method is used internally to serialize related entity objects. + The serialized stream. + + + + Gets or sets the related object returned by this + + . + + + The object returned by this . + + + + + Identifies the kind of a relationship + + + + + The relationship is an Association + + + + + Container for the lazily created relationship navigation + property objects (collections and refs). + + + + + Creates a new object. + + + Used by data classes that support relationships. If the change tracker + requests the RelationshipManager property and the data class does not + already have a reference to one of these objects, it calls this method + to create one, then saves a reference to that object. On subsequent accesses + to that property, the data class should return the saved reference. + The reason for using a factory method instead of a public constructor is to + emphasize that this is not something you would normally call outside of a data class. + By requiring that these objects are created via this method, developers should + give more thought to the operation, and will generally only use it when + they explicitly need to get an object of this type. It helps define the intended usage. + + + The requested . + + Reference to the entity that is calling this method. + + + + Returns either an or + + of the correct type for the specified target role in a relationship. + + + representing the + + or + + that was retrieved. + + Name of the relationship in which targetRoleName is defined. The relationship name is not namespace qualified. + Target role to use to retrieve the other end of relationshipName . + relationshipName or targetRoleName is null. + The source type does not match the type of the owner. + targetRoleName is invalid or unable to find the relationship type in the metadata. + + + + Takes an existing EntityReference that was created with the default constructor and initializes it using the provided relationship and target role names. + This method is designed to be used during deserialization only, and will throw an exception if the provided EntityReference has already been initialized, + if the relationship manager already contains a relationship with this name and target role, or if the relationship manager is already attached to a ObjectContext.W + + The relationship name. + The role name of the related end. + + The to initialize. + + + The type of the being initialized. + + + When the provided + is already initialized.-or-When the relationship manager is already attached to an + + or when the relationship manager already contains a relationship with this name and target role. + + + + + Takes an existing EntityCollection that was created with the default constructor and initializes it using the provided relationship and target role names. + This method is designed to be used during deserialization only, and will throw an exception if the provided EntityCollection has already been initialized, + or if the relationship manager is already attached to a ObjectContext. + + The relationship name. + The target role name. + An existing EntityCollection. + Type of the entity represented by targetRoleName + + + + Gets an of related objects with the specified relationship name and target role name. + + + The of related objects. + + Name of the relationship to navigate. The relationship name is not namespace qualified. + Name of the target role for the navigation. Indicates the direction of navigation across the relationship. + + The type of the returned . + + + The specified role returned an instead of an + + . + + + + + Gets the for a related object by using the specified combination of relationship name and target role name. + + + The of a related object. + + Name of the relationship to navigate. The relationship name is not namespace qualified. + Name of the target role for the navigation. Indicates the direction of navigation across the relationship. + + The type of the returned . + + + The specified role returned an instead of an + + . + + + + Returns an enumeration of all the related ends managed by the relationship manager. + + An of objects that implement + + . An empty enumeration is returned when the relationships have not yet been populated. + + + + + Called by Object Services to prepare an for binary serialization with a serialized relationship. + + Describes the source and destination of a given serialized stream, and provides an additional caller-defined context. + + + + Used internally to deserialize entity objects along with the + + instances. + + The serialized stream. + + + + Represents either a entity, entity stub or relationship + + + + + Gets the updatable version of original values of the object associated with this + + . + + The updatable original values of object data. + + + Accepts the current values as original values. + + + Marks an entity as deleted. + + + + Returns the names of an object’s properties that have changed since the last time + + was called. + + + An collection of names as string. + + + + Sets the state of the object or relationship to modify. + If State is not Modified or Unchanged + + + Marks the specified property as modified. + The name of the property. + If State is not Modified or Unchanged + + + Rejects any changes made to the property with the given name since the property was last loaded, attached, saved, or changes were accepted. The orginal value of the property is stored and the property will no longer be marked as modified. + The name of the property to change. + + + Uses DetectChanges to determine whether or not the current value of the property with the given name is different from its original value. Note that this may be different from the property being marked as modified since a property which has not changed can still be marked as modified. + + Note that this property always returns the same result as the modified state of the property for change tracking + proxies and entities that derive from the EntityObject base class. This is because original values are not tracked + for these entity types and hence there is no way to know if the current value is really different from the + original value. + + true if the property has changed; otherwise, false. + The name of the property. + + + + Changes state of the entry to the specified value. + + + The value to set for the + + property of the entry. + + + + Sets the current values of the entry to match the property values of a supplied object. + The detached object that has updated values to apply to the object. currentEntity can also be the object’s entity key. + + + Sets the original values of the entry to match the property values of a supplied object. + The detached object that has original values to apply to the object. originalEntity can also be the object’s entity key. + + + + Used to report that a scalar entity property is about to change + The current value of the specified property is cached when this method is called. + + The name of the entity property that is changing + + + + Used to report that a scalar entity property has been changed + The property value that was cached during EntityMemberChanging is now + added to OriginalValues + + The name of the entity property that has changing + + + + Used to report that a complex property is about to change + The current value of the specified property is cached when this method is called. + + The name of the top-level entity property that is changing + The complex object that contains the property that is changing + The name of the property that is changing on complexObject + + + + Used to report that a complex property has been changed + The property value that was cached during EntityMemberChanging is now added to OriginalValues + + The name of the top-level entity property that has changed + The complex object that contains the property that changed + The name of the property that changed on complexObject + + + + Gets the for the + + . + + + The for the + + . + + + + + Gets the for the object or relationship. + + + The for the object or relationship. + + + + + Gets the state of the . + + + The state of the . + + + + Gets the entity object. + The entity object. + + + Gets the entity key. + The entity key. + + + + Gets a value that indicates whether the represents a relationship. + + + true if the represents a relationship; otherwise, false. + + + + Gets the read-only version of original values of the object or relationship. + The read-only version of original values of the relationship set entry or entity. + + + + Gets the current property values of the object or relationship associated with this + + . + + + A that contains the current values of the object or relationship associated with this + + . + + + + + Gets the instance for the object represented by entry. + + + The object. + + The entry is a stub or represents a relationship + + + + Returns the EntityState from the ObjectStateEntry + + + + + Defines behavior for implementations of IQueryable that allow modifications to the membership of the resulting set. + + Type of entities returned from the queryable. + + + Notifies the set that an object that represents a new entity must be added to the set. + + Depending on the implementation, the change to the set may not be visible in an enumeration of the set + until changes to that set have been persisted in some manner. + + The new object to add to the set. + + + Notifies the set that an object that represents an existing entity must be added to the set. + + Depending on the implementation, the change to the set may not be visible in an enumeration of the set + until changes to that set have been persisted in some manner. + + The existing object to add to the set. + + + Notifies the set that an object that represents an existing entity must be deleted from the set. + + Depending on the implementation, the change to the set may not be visible in an enumeration of the set + until changes to that set have been persisted in some manner. + + The existing object to delete from the set. + + + Notifies the set that an object that represents an existing entity must be detached from the set. + + Depending on the implementation, the change to the set may not be visible in an enumeration of the set + until changes to that set have been persisted in some manner. + + The object to detach from the set. + + + + The different ways that new objects loaded from the database can be merged with existing objects already in memory. + + + + + Will only append new (top level-unique) rows. This is the default behavior. + + + + + Same behavior as LoadOption.OverwriteChanges. + + + + + Same behavior as LoadOption.PreserveChanges. + + + + + Will not modify cache. + + + + + ObjectContext is the top-level object that encapsulates a connection between the CLR and the database, + serving as a gateway for Create, Read, Update, and Delete operations. + + + + + Initializes a new instance of the class with the given connection. During construction, the metadata workspace is extracted from the + + object. + + + An that contains references to the model and to the data source connection. + + The connection is null. + The connection is invalid or the metadata workspace is invalid. + + + + Creates an ObjectContext with the given connection and metadata workspace. + + connection to the store + If set to true the connection is disposed when the context is disposed, otherwise the caller must dispose the connection. + + + + Initializes a new instance of the class with the given connection string and default entity container name. + + The connection string, which also provides access to the metadata information. + The connectionString is null. + The connectionString is invalid or the metadata workspace is not valid. + + + + Initializes a new instance of the class with a given connection string and entity container name. + + The connection string, which also provides access to the metadata information. + The name of the default entity container. When the defaultContainerName is set through this method, the property becomes read-only. + The connectionString is null. + The connectionString , defaultContainerName , or metadata workspace is not valid. + + + + Initializes a new instance of the class with a given connection and entity container name. + + + An that contains references to the model and to the data source connection. + + The name of the default entity container. When the defaultContainerName is set through this method, the property becomes read-only. + The connection is null. + The connection , defaultContainerName , or metadata workspace is not valid. + + + Accepts all changes made to objects in the object context. + + + Adds an object to the object context. + Represents the entity set name, which may optionally be qualified by the entity container name. + + The to add. + + The entity parameter is null or the entitySetName does not qualify. + + + Explicitly loads an object related to the supplied object by the specified navigation property and using the default merge option. + The entity for which related objects are to be loaded. + The name of the navigation property that returns the related objects to be loaded. + + The entity is in a , + + or state or the entity is attached to another instance of + + . + + + + Explicitly loads an object that is related to the supplied object by the specified navigation property and using the specified merge option. + The entity for which related objects are to be loaded. + The name of the navigation property that returns the related objects to be loaded. + + The value to use when you load the related objects. + + + The entity is in a , + + or state or the entity is attached to another instance of + + . + + + + Explicitly loads an object that is related to the supplied object by the specified LINQ query and by using the default merge option. + The type of the entity. + The source object for which related objects are to be loaded. + A LINQ expression that defines the related objects to be loaded. + selector does not supply a valid input parameter. + selector is null. + + The entity is in a , + + or state or the entity is attached to another instance of + + . + + + + Explicitly loads an object that is related to the supplied object by the specified LINQ query and by using the specified merge option. + The type of the entity. + The source object for which related objects are to be loaded. + A LINQ expression that defines the related objects to be loaded. + + The value to use when you load the related objects. + + selector does not supply a valid input parameter. + selector is null. + + The entity is in a , + + or state or the entity is attached to another instance of + + . + + + + Applies property changes from a detached object to an object already attached to the object context. + The name of the entity set to which the object belongs. + The detached object that has property updates to apply to the original object. + When entitySetName is null or an empty string or when changed is null. + + When the from entitySetName does not match the + + of the object + + or when the entity is in a state other than + + or + + or the original object is not attached to the context. + + When the type of the changed object is not the same type as the original object. + + + + Copies the scalar values from the supplied object into the object in the + + that has the same key. + + The updated object. + The name of the entity set to which the object belongs. + + The detached object that has property updates to apply to the original object. The entity key of currentEntity must match the + + property of an entry in the + + . + + The entity type of the object. + entitySetName or current is null. + + The from entitySetName does not match the + + of the object + + or the object is not in the + + or it is in a + + state or the entity key of the supplied object is invalid. + + entitySetName is an empty string. + + + + Copies the scalar values from the supplied object into set of original values for the object in the + + that has the same key. + + The updated object. + The name of the entity set to which the object belongs. + + The detached object that has original values to apply to the object. The entity key of originalEntity must match the + + property of an entry in the + + . + + The type of the entity object. + entitySetName or original is null. + + The from entitySetName does not match the + + of the object + + or an + + for the object cannot be found in the + + or the object is in an + + or a + + state or the entity key of the supplied object is invalid or has property changes. + + entitySetName is an empty string. + + + Attaches an object or object graph to the object context in a specific entity set. + Represents the entity set name, which may optionally be qualified by the entity container name. + + The to attach. + + The entity is null. + + Invalid entity set or the object has a temporary key or the object has an + + and the + + does not match with the entity set passed in as an argument of the method or the object does not have an + + and no entity set is provided or any object from the object graph has a temporary + + or any object from the object graph has an invalid + + (for example, values in the key do not match values in the object) or the entity set could not be found from a given entitySetName name and entity container name or any object from the object graph already exists in another state manager. + + + + Attaches an object or object graph to the object context when the object has an entity key. + The object to attach. + The entity is null. + Invalid entity key. + + + Creates the entity key for a specific object, or returns the entity key if it already exists. + + The of the object. + + The fully qualified name of the entity set to which the entity object belongs. + The object for which the entity key is being retrieved. + When either parameter is null. + When entitySetName is empty or when the type of the entity object does not exist in the entity set or when the entitySetName is not fully qualified. + When the entity key cannot be constructed successfully based on the supplied parameters. + + + + Creates a new instance that is used to query, add, modify, and delete objects of the specified entity type. + + + The new instance. + + + Entity type of the requested . + + + The property is not set on the + + or the specified type belongs to more than one entity set. + + + + + Creates a new instance that is used to query, add, modify, and delete objects of the specified type and with the specified entity set name. + + + The new instance. + + + Name of the entity set for the returned . The string must be qualified by the default container name if the + + property is not set on the + + . + + + Entity type of the requested . + + + The from entitySetName does not match the + + of the object + + or the + + property is not set on the + + and the name is not qualified as part of the entitySetName parameter or the specified type belongs to more than one entity set. + + + + + Creates an in the current object context by using the specified query string. + + + An of the specified type. + + The query string to be executed. + Parameters to pass to the query. + + The entity type of the returned . + + The queryString or parameters parameter is null. + + + Marks an object for deletion. + + An object that specifies the entity to delete. The object can be in any state except + + . + + + + Removes the object from the object context. + + Object to be detached. Only the entity is removed; if there are any related objects that are being tracked by the same + + , those will not be detached automatically. + + The entity is null. + + The entity is not associated with this (for example, was newly created and not associated with any context yet, or was obtained through some other context, or was already detached). + + + + + Finalizes an instance of the class. + + + + Releases the resources used by the object context. + + + + Releases the resources used by the object context. + + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Returns an object that has the specified entity key. + + An that is an instance of an entity type. + + The key of the object to be found. + The key parameter is null. + + The object is not found in either the or the data source. + + + + Updates a collection of objects in the object context with data from the database. + + A value that indicates whether + property changes in the object context are overwritten with property values from the database. + + + An collection of objects to refresh. + + collection is null. + refreshMode is not valid. + collection is empty or an object is not attached to the context. + + + Updates an object in the object context with data from the database. + + A value that indicates whether + property changes in the object context are overwritten with property values from the database. + + The object to be refreshed. + entity is null. + refreshMode is not valid. + entity is not attached to the context. + + + Asynchronously updates a collection of objects in the object context with data from the database. + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A value that indicates whether + property changes in the object context are overwritten with property values from the database. + + + An collection of objects to refresh. + + + A task that represents the asynchronous operation. + + collection is null. + refreshMode is not valid. + collection is empty or an object is not attached to the context. + + + Asynchronously updates a collection of objects in the object context with data from the database. + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A value that indicates whether + property changes in the object context are overwritten with property values from the database. + + + An collection of objects to refresh. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + + collection is null. + refreshMode is not valid. + collection is empty or an object is not attached to the context. + + + Asynchronously updates an object in the object context with data from the database. + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A value that indicates whether + property changes in the object context are overwritten with property values from the database. + + The object to be refreshed. + + A task that represents the asynchronous operation. + + entity is null. + refreshMode is not valid. + entity is not attached to the context. + + + Asynchronously updates an object in the object context with data from the database. + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A value that indicates whether + property changes in the object context are overwritten with property values from the database. + + The object to be refreshed. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + + entity is null. + refreshMode is not valid. + entity is not attached to the context. + + + Persists all updates to the database and resets change tracking in the object context. + + The number of state entries written to the underlying database. This can include + state entries for entities and/or relationships. Relationship state entries are created for + many-to-many relationships and relationships where there is no foreign key property + included in the entity class (often referred to as independent associations). + + An optimistic concurrency violation has occurred while saving changes. + + + Asynchronously persists all updates to the database and resets change tracking in the object context. + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A task that represents the asynchronous save operation. + The task result contains the number of state entries written to the underlying database. This can include + state entries for entities and/or relationships. Relationship state entries are created for + many-to-many relationships and relationships where there is no foreign key property + included in the entity class (often referred to as independent associations). + + An optimistic concurrency violation has occurred while saving changes. + + + Asynchronously persists all updates to the database and resets change tracking in the object context. + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous save operation. + The task result contains the number of state entries written to the underlying database. This can include + state entries for entities and/or relationships. Relationship state entries are created for + many-to-many relationships and relationships where there is no foreign key property + included in the entity class (often referred to as independent associations). + + An optimistic concurrency violation has occurred while saving changes. + + + Persists all updates to the database and optionally resets change tracking in the object context. + + This parameter is needed for client-side transaction support. If true, the change tracking on all objects is reset after + + finishes. If false, you must call the + method after . + + + The number of state entries written to the underlying database. This can include + state entries for entities and/or relationships. Relationship state entries are created for + many-to-many relationships and relationships where there is no foreign key property + included in the entity class (often referred to as independent associations). + + An optimistic concurrency violation has occurred while saving changes. + + + Persists all updates to the database and optionally resets change tracking in the object context. + + A value that determines the behavior of the operation. + + + The number of state entries written to the underlying database. This can include + state entries for entities and/or relationships. Relationship state entries are created for + many-to-many relationships and relationships where there is no foreign key property + included in the entity class (often referred to as independent associations). + + An optimistic concurrency violation has occurred while saving changes. + + + Asynchronously persists all updates to the database and optionally resets change tracking in the object context. + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A value that determines the behavior of the operation. + + + A task that represents the asynchronous save operation. + The task result contains the number of state entries written to the underlying database. This can include + state entries for entities and/or relationships. Relationship state entries are created for + many-to-many relationships and relationships where there is no foreign key property + included in the entity class (often referred to as independent associations). + + An optimistic concurrency violation has occurred while saving changes. + + + Asynchronously persists all updates to the database and optionally resets change tracking in the object context. + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A value that determines the behavior of the operation. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous save operation. + The task result contains the number of state entries written to the underlying database. This can include + state entries for entities and/or relationships. Relationship state entries are created for + many-to-many relationships and relationships where there is no foreign key property + included in the entity class (often referred to as independent associations). + + An optimistic concurrency violation has occurred while saving changes. + + + + Ensures that changes are synchronized with changes in all objects that are tracked by the + + . + + + + Returns an object that has the specified entity key. + true if the object was retrieved successfully. false if the key is temporary, the connection is null, or the value is null. + The key of the object to be found. + When this method returns, contains the object. + Incompatible metadata for key . + key is null. + + + + Executes a stored procedure or function that is defined in the data source and mapped in the conceptual model, with the specified parameters. Returns a typed + + . + + + An for the data that is returned by the stored procedure. + + The name of the stored procedure or function. The name can include the container name, such as <Container Name>.<Function Name>. When the default container name is known, only the function name is required. + + An array of objects. If output parameters are used, + their values will not be available until the results have been read completely. This is due to the underlying behavior + of DbDataReader, see http://go.microsoft.com/fwlink/?LinkID=398589 for more details. + + + The entity type of the returned when the function is executed against the data source. This type must implement + + . + + function is null or empty or function is not found. + The entity reader does not support this function or there is a type mismatch on the reader and the function . + + + + Executes the given stored procedure or function that is defined in the data source and expressed in the conceptual model, with the specified parameters, and merge option. Returns a typed + + . + + + An for the data that is returned by the stored procedure. + + The name of the stored procedure or function. The name can include the container name, such as <Container Name>.<Function Name>. When the default container name is known, only the function name is required. + + The to use when executing the query. + + + An array of objects. If output parameters are used, + their values will not be available until the results have been read completely. This is due to the underlying behavior + of DbDataReader, see http://go.microsoft.com/fwlink/?LinkID=398589 for more details. + + + The entity type of the returned when the function is executed against the data source. This type must implement + + . + + function is null or empty or function is not found. + The entity reader does not support this function or there is a type mismatch on the reader and the function . + + + + Executes the given function on the default container. + + Element type for function results. + + Name of function. May include container (e.g. ContainerName.FunctionName) or just function name when DefaultContainerName is known. + + The options for executing this function. + + The parameter values to use for the function. If output parameters are used, their values + will not be available until the results have been read completely. This is due to the underlying + behavior of DbDataReader, see http://go.microsoft.com/fwlink/?LinkID=398589 for more details. + + An object representing the result of executing this function. + If function is null or empty + + If function is invalid (syntax, + does not exist, refers to a function with return type incompatible with T) + + + + Executes a stored procedure or function that is defined in the data source and expressed in the conceptual model; discards any results returned from the function; and returns the number of rows affected by the execution. + The number of rows affected. + The name of the stored procedure or function. The name can include the container name, such as <Container Name>.<Function Name>. When the default container name is known, only the function name is required. + + An array of objects. If output parameters are used, + their values will not be available until the results have been read completely. This is due to the underlying + behavior of DbDataReader, see http://go.microsoft.com/fwlink/?LinkID=398589 for more details. + + function is null or empty or function is not found. + The entity reader does not support this function or there is a type mismatch on the reader and the function . + + + Generates an equivalent type that can be used with the Entity Framework for each type in the supplied enumeration. + + An enumeration of objects that represent custom data classes that map to the conceptual model. + + + + Returns all the existing proxy types. + + An of all the existing proxy types. + + + + Returns the entity type of the POCO entity associated with a proxy object of a specified type. + + The of the associated POCO entity. + + + The of the proxy object. + + + + Creates and returns an instance of the requested type . + An instance of the requested type T , or an instance of a derived type that enables T to be used with the Entity Framework. The returned object is either an instance of the requested type or an instance of a derived type that enables the requested type to be used with the Entity Framework. + Type of object to be returned. + + + + Executes an arbitrary command directly against the data source using the existing connection. + The command is specified using the server's native query language, such as SQL. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.ExecuteStoreCommand("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.ExecuteStoreCommand("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + + If there isn't an existing local transaction a new transaction will be used + to execute the command. + + The command specified in the server's native query language. + The parameter values to use for the query. + The number of rows affected. + + + + Executes an arbitrary command directly against the data source using the existing connection. + The command is specified using the server's native query language, such as SQL. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.ExecuteStoreCommand("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.ExecuteStoreCommand("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + Controls the creation of a transaction for this command. + The command specified in the server's native query language. + The parameter values to use for the query. + The number of rows affected. + + + + Asynchronously executes an arbitrary command directly against the data source using the existing connection. + The command is specified using the server's native query language, such as SQL. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.ExecuteStoreCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.ExecuteStoreCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + If there isn't an existing local transaction a new transaction will be used + to execute the command. + + The command specified in the server's native query language. + The parameter values to use for the query. + + A task that represents the asynchronous operation. + The task result contains the number of rows affected. + + + + + Asynchronously executes an arbitrary command directly against the data source using the existing connection. + The command is specified using the server's native query language, such as SQL. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.ExecuteStoreCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.ExecuteStoreCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + Controls the creation of a transaction for this command. + The command specified in the server's native query language. + The parameter values to use for the query. + + A task that represents the asynchronous operation. + The task result contains the number of rows affected. + + + + + Asynchronously executes an arbitrary command directly against the data source using the existing connection. + The command is specified using the server's native query language, such as SQL. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.ExecuteStoreCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.ExecuteStoreCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + If there isn't an existing local transaction a new transaction will be used + to execute the command. + + The command specified in the server's native query language. + + A to observe while waiting for the task to complete. + + The parameter values to use for the query. + + A task that represents the asynchronous operation. + The task result contains the number of rows affected. + + + + + Asynchronously executes an arbitrary command directly against the data source using the existing connection. + The command is specified using the server's native query language, such as SQL. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.ExecuteStoreCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.ExecuteStoreCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + Controls the creation of a transaction for this command. + The command specified in the server's native query language. + + A to observe while waiting for the task to complete. + + The parameter values to use for the query. + + A task that represents the asynchronous operation. + The task result contains the number of rows affected. + + + + + Executes a query directly against the data source and returns a sequence of typed results. + The query is specified using the server's native query language, such as SQL. + Results are not tracked by the context, use the overload that specifies an entity set name to track results. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.ExecuteStoreQuery<Post>("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.ExecuteStoreQuery<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + The element type of the result sequence. + The query specified in the server's native query language. + + The parameter values to use for the query. If output parameters are used, their values will not be + available until the results have been read completely. This is due to the underlying behavior + of DbDataReader, see http://go.microsoft.com/fwlink/?LinkID=398589 for more details. + + + An enumeration of objects of type . + + + + + Executes a query directly against the data source and returns a sequence of typed results. + The query is specified using the server's native query language, such as SQL. + Results are not tracked by the context, use the overload that specifies an entity set name to track results. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.ExecuteStoreQuery<Post>("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.ExecuteStoreQuery<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + The element type of the result sequence. + The query specified in the server's native query language. + The options for executing this query. + + The parameter values to use for the query. If output parameters are used, their values will not be + available until the results have been read completely. This is due to the underlying behavior of + DbDataReader, see http://go.microsoft.com/fwlink/?LinkID=398589 for more details. + + + An enumeration of objects of type . + + + + + Executes a query directly against the data source and returns a sequence of typed results. + The query is specified using the server's native query language, such as SQL. + If an entity set name is specified, results are tracked by the context. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.ExecuteStoreQuery<Post>("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.ExecuteStoreQuery<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + The element type of the result sequence. + The query specified in the server's native query language. + The entity set of the TResult type. If an entity set name is not provided, the results are not going to be tracked. + + The to use when executing the query. The default is + . + + + The parameter values to use for the query. If output parameters are used, their values will not be + available until the results have been read completely. This is due to the underlying behavior + of DbDataReader, see http://go.microsoft.com/fwlink/?LinkID=398589 for more details. + + + An enumeration of objects of type . + + + + + Executes a query directly against the data source and returns a sequence of typed results. + The query is specified using the server's native query language, such as SQL. + If an entity set name is specified, results are tracked by the context. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.ExecuteStoreQuery<Post>("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.ExecuteStoreQuery<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + The element type of the result sequence. + The query specified in the server's native query language. + The entity set of the TResult type. If an entity set name is not provided, the results are not going to be tracked. + The options for executing this query. + + The parameter values to use for the query. If output parameters are used, their values will not be + available until the results have been read completely. This is due to the underlying behavior + of DbDataReader, see http://go.microsoft.com/fwlink/?LinkID=398589 for more details. + + + An enumeration of objects of type . + + + + + Asynchronously executes a query directly against the data source and returns a sequence of typed results. + The query is specified using the server's native query language, such as SQL. + Results are not tracked by the context, use the overload that specifies an entity set name to track results. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + The element type of the result sequence. + The query specified in the server's native query language. + + The parameter values to use for the query. If output parameters are used, their values will not be + available until the results have been read completely. This is due to the underlying behavior + of DbDataReader, see http://go.microsoft.com/fwlink/?LinkID=398589 for more details. + + + A task that represents the asynchronous operation. + The task result contains an enumeration of objects of type . + + + + + Asynchronously executes a query directly against the data source and returns a sequence of typed results. + The query is specified using the server's native query language, such as SQL. + Results are not tracked by the context, use the overload that specifies an entity set name to track results. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + The element type of the result sequence. + The query specified in the server's native query language. + + A to observe while waiting for the task to complete. + + + The parameter values to use for the query. If output parameters are used, their values will not be + available until the results have been read completely. This is due to the underlying behavior + of DbDataReader, see http://go.microsoft.com/fwlink/?LinkID=398589 for more details. + + + A task that represents the asynchronous operation. + The task result contains an enumeration of objects of type . + + + + + Asynchronously executes a query directly against the data source and returns a sequence of typed results. + The query is specified using the server's native query language, such as SQL. + Results are not tracked by the context, use the overload that specifies an entity set name to track results. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + The element type of the result sequence. + The query specified in the server's native query language. + The options for executing this query. + + The parameter values to use for the query. If output parameters are used, their values will not be + available until the results have been read completely. This is due to the underlying behavior + of DbDataReader, see http://go.microsoft.com/fwlink/?LinkID=398589 for more details. + + + A task that represents the asynchronous operation. + The task result contains an enumeration of objects of type . + + + + + Asynchronously executes a query directly against the data source and returns a sequence of typed results. + The query is specified using the server's native query language, such as SQL. + Results are not tracked by the context, use the overload that specifies an entity set name to track results. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + The element type of the result sequence. + The query specified in the server's native query language. + The options for executing this query. + + A to observe while waiting for the task to complete. + + + The parameter values to use for the query. If output parameters are used, their values will not be + available until the results have been read completely. This is due to the underlying behavior + of DbDataReader, see http://go.microsoft.com/fwlink/?LinkID=398589 for more details. + + + A task that represents the asynchronous operation. + The task result contains an enumeration of objects of type . + + + + + Asynchronously executes a query directly against the data source and returns a sequence of typed results. + The query is specified using the server's native query language, such as SQL. + If an entity set name is specified, results are tracked by the context. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + The element type of the result sequence. + The query specified in the server's native query language. + The entity set of the TResult type. If an entity set name is not provided, the results are not going to be tracked. + The options for executing this query. + + The parameter values to use for the query. If output parameters are used, their values will not be + available until the results have been read completely. This is due to the underlying behavior + of DbDataReader, see http://go.microsoft.com/fwlink/?LinkID=398589 for more details. + + + A task that represents the asynchronous operation. + The task result contains an enumeration of objects of type . + + + + + Asynchronously executes a query directly against the data source and returns a sequence of typed results. + The query is specified using the server's native query language, such as SQL. + If an entity set name is specified, results are tracked by the context. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + The element type of the result sequence. + The query specified in the server's native query language. + The entity set of the TResult type. If an entity set name is not provided, the results are not going to be tracked. + The options for executing this query. + + A to observe while waiting for the task to complete. + + + The parameter values to use for the query. If output parameters are used, their values will not be + available until the results have been read completely. This is due to the underlying behavior + of DbDataReader, see http://go.microsoft.com/fwlink/?LinkID=398589 for more details. + + + A task that represents the asynchronous operation. + The task result contains an enumeration of objects of type . + + + + + Translates a that contains rows of entity data to objects of the requested entity type. + + The entity type. + An enumeration of objects of type TResult . + + The that contains entity data to translate into entity objects. + + When reader is null. + + + + Translates a that contains rows of entity data to objects of the requested entity type, in a specific entity set, and with the specified merge option. + + The entity type. + An enumeration of objects of type TResult . + + The that contains entity data to translate into entity objects. + + The entity set of the TResult type. + + The to use when translated objects are added to the object context. The default is + + . + + When reader is null. + + When the supplied mergeOption is not a valid value. + + When the supplied entitySetName is not a valid entity set for the TResult type. + + + + Creates the database by using the current data source connection and the metadata in the + + . + + + + Deletes the database that is specified as the database in the current data source connection. + + + + Checks if the database that is specified as the database in the current store connection exists on the store. Most of the actual work + is done by the DbProviderServices implementation for the current store connection. + + true if the database exists; otherwise, false. + + + + Generates a data definition language (DDL) script that creates schema objects (tables, primary keys, foreign keys) for the metadata in the + + . The + + loads metadata from store schema definition language (SSDL) files. + + + A DDL script that creates schema objects for the metadata in the + + . + + + + Gets the connection used by the object context. + + A object that is the connection. + + + When the instance has been disposed. + + + + Gets or sets the default container name. + + A that is the default container name. + + + + Gets the metadata workspace used by the object context. + + The object associated with this + + . + + + + Gets the object state manager used by the object context to track object changes. + + The used by this + + . + + + + Gets or sets the timeout value, in seconds, for all object context operations. A null value indicates that the default value of the underlying provider will be used. + + An value that is the timeout value, in seconds. + + The timeout value is less than 0. + + + Gets the LINQ query provider associated with this object context. + + The instance used by this object context. + + + + + Gets the instance that contains options that affect the behavior of the + + . + + + The instance that contains options that affect the behavior of the + + . + + + + + Returns itself. ObjectContext implements to provide a common + interface for and ObjectContext both of which will return the underlying + ObjectContext. + + + + + Gets the transaction handler in use by this context. May be null if no transaction have been started. + + + The transaction handler. + + + + + Returns the being used for this context. + + + + Occurs when changes are saved to the data source. + + + Occurs when a new entity object is created from data in the data source as part of a query or load operation. + + + + Defines options that affect the behavior of the ObjectContext. + + + + + Gets or sets the value that determines whether SQL functions and commands should be always executed in a transaction. + + + This flag determines whether a new transaction will be started when methods such as + and are executed outside of a transaction. + Note that this does not change the behavior of . + + + The default transactional behavior. + + + + Gets or sets a Boolean value that determines whether related objects are loaded automatically when a navigation property is accessed. + true if lazy loading is enabled; otherwise, false. + + + Gets or sets a Boolean value that determines whether proxy instances are created for custom data classes that are persistence ignorant. + true if proxies are created; otherwise, false. The default value is true. + + + Gets or sets a Boolean value that determines whether to use the legacy PreserveChanges behavior. + true if the legacy PreserveChanges behavior should be used; otherwise, false. + + + Gets or sets a Boolean value that determines whether to use the consistent NullReference behavior. + + If this flag is set to false then setting the Value property of the for an + FK relationship to null when it is already null will have no effect. When this flag is set to true, then + setting the value to null will always cause the FK to be nulled and the relationship to be deleted + even if the value is currently null. The default value is false when using ObjectContext and true + when using DbContext. + + true if the consistent NullReference behavior should be used; otherwise, false. + + + Gets or sets a Boolean value that determines whether to use the C# NullComparison behavior. + + This flag determines whether C# behavior should be exhibited when comparing null values in LinqToEntities. + If this flag is set, then any equality comparison between two operands, both of which are potentially + nullable, will be rewritten to show C# null comparison semantics. As an example: + (operand1 = operand2) will be rewritten as + (((operand1 = operand2) AND NOT (operand1 IS NULL OR operand2 IS NULL)) || (operand1 IS NULL && operand2 IS NULL)) + The default value is false when using . + + true if the C# NullComparison behavior should be used; otherwise, false. + + + + EventArgs for the ObjectMaterialized event. + + + + Gets the entity object that was created. + The entity object that was created. + + + + Delegate for the ObjectMaterialized event. + + The ObjectContext responsable for materializing the object. + EventArgs containing a reference to the materialized object. + + + + This class represents a query parameter at the object layer, which consists + of a Name, a Type and a Value. + + + + + Initializes a new instance of the class with the specified name and type. + + The parameter name. This name should not include the "@" parameter marker that is used in the Entity SQL statements, only the actual name. The first character of the expression must be a letter. Any successive characters in the expression must be either letters, numbers, or an underscore (_) character. + The common language runtime (CLR) type of the parameter. + If the value of either argument is null. + If the value of the name argument is invalid. Parameter names must start with a letter and can only contain letters, numbers, and underscores. + + + + Initializes a new instance of the class with the specified name and value. + + The parameter name. This name should not include the "@" parameter marker that is used in Entity SQL statements, only the actual name. The first character of the expression must be a letter. Any successive characters in the expression must be either letters, numbers, or an underscore (_) character. + The initial value (and inherently, the type) of the parameter. + If the value of either argument is null. + If the value of the name argument is not valid. Parameter names must start with a letter and can only contain letters, numbers, and underscores. + + + Gets the parameter name, which can only be set through a constructor. + The parameter name, which can only be set through a constructor. + + + Gets the parameter type. + + The of the parameter. + + + + Gets or sets the parameter value. + The parameter value. + + + + This class represents a collection of query parameters at the object layer. + + + + + Adds the specified to the collection. + + The parameter to add to the collection. + The parameter argument is null. + + The parameter argument already exists in the collection. This behavior differs from that of most collections that allow duplicate entries. -or-Another parameter with the same name as the parameter argument already exists in the collection. Note that the lookup is case-insensitive. This behavior differs from that of most collections, and is more like that of a + + . + + The type of the parameter is not valid. + + + + Deletes all instances from the collection. + + + + + Checks for the existence of a specified in the collection by reference. + + Returns true if the parameter object was found in the collection; otherwise, false. + + The to find in the collection. + + The parameter argument is null. + + + + Determines whether an with the specified name is in the collection. + + Returns true if a parameter with the specified name was found in the collection; otherwise, false. + The name of the parameter to look for in the collection. This name should not include the "@" parameter marker that is used in the Entity SQL statements, only the actual name. + The name parameter is null. + + + Allows the parameters in the collection to be copied into a supplied array, starting with the object at the specified index. + The array into which to copy the parameters. + The index in the array at which to start copying the parameters. + + + + Removes an instance of an from the collection by reference if it exists in the collection. + + Returns true if the parameter object was found and removed from the collection; otherwise, false. + An object to remove from the collection. + The parameter argument is null. + + + + These methods return enumerator instances, which allow the collection to + be iterated through and traversed. + + An object that can be used to iterate through the collection. + + + Returns an untyped enumerator over the collection. + + An instance. + + + + Gets the number of parameters currently in the collection. + + The number of objects that are currently in the collection. + + + + + This collection is read-write - parameters may be added, removed + and [somewhat] modified at will (value only) - provided that the + implementation the collection belongs to has not locked its parameters + because it's command definition has been prepared. + + + + Provides an indexer that allows callers to retrieve parameters by name. + + The instance. + + The name of the parameter to find. This name should not include the "@" parameter marker that is used in the Entity SQL statements, only the actual name. + No parameter with the specified name is found in the collection. + + + + This class implements untyped queries at the object-layer. + + + + Returns the commands to execute against the data source. + A string that represents the commands that the query executes against the data source. + + + Returns information about the result type of the query. + + A value that contains information about the result type of the query. + + + + Executes the untyped object query with the specified merge option. + + The to use when executing the query. + The default is . + + + An that contains a collection of entity objects returned by the query. + + + + + Asynchronously executes the untyped object query with the specified merge option. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The to use when executing the query. + The default is . + + + A task that represents the asynchronous operation. + The task result contains an an + that contains a collection of entity objects returned by the query. + + + + + Asynchronously executes the untyped object query with the specified merge option. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The to use when executing the query. + The default is . + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains an an + that contains a collection of entity objects returned by the query. + + + + + Returns the collection as an used for data binding. + + + An of entity objects. + + + + Returns an enumerator that iterates through a collection. + + An that can be used to iterate through the collection. + + + + + Returns an which when enumerated will execute the given SQL query against the database. + + The query results. + + + Returns the command text for the query. + A string value. + + + Gets the object context associated with this object query. + + The associated with this + + instance. + + + + Gets or sets how objects returned from a query are added to the object context. + + The query . + + + + + Whether the query is streaming or buffering + + + + Gets the parameter collection for this object query. + + The parameter collection for this . + + + + Gets or sets a value that indicates whether the query plan should be cached. + A value that indicates whether the query plan should be cached. + + + + Gets the result element type for this query instance. + + + + + Gets the expression describing this query. For queries built using + LINQ builder patterns, returns a full LINQ expression tree; otherwise, + returns a constant expression wrapping this query. Note that the + default expression is not cached. This allows us to differentiate + between LINQ and Entity-SQL queries. + + + + + Gets the associated with this query instance. + + + + + ObjectQuery implements strongly-typed queries at the object-layer. + Queries are specified using Entity-SQL strings and may be created by calling + the Entity-SQL-based query builder methods declared by ObjectQuery. + + The result type of this ObjectQuery + + + + Creates a new instance using the specified Entity SQL command as the initial query. + + The Entity SQL query. + + The on which to execute the query. + + + + + Creates a new instance using the specified Entity SQL command as the initial query and the specified merge option. + + The Entity SQL query. + + The on which to execute the query. + + + Specifies how the entities that are retrieved through this query should be merged with the entities that have been returned from previous queries against the same + + . + + + + Executes the object query with the specified merge option. + + The to use when executing the query. + The default is . + + + An that contains a collection of entity objects returned by the query. + + + + + Asynchronously executes the object query with the specified merge option. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The to use when executing the query. + The default is . + + + A task that represents the asynchronous operation. + The task result contains an + that contains a collection of entity objects returned by the query. + + + + + Asynchronously executes the object query with the specified merge option. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + The to use when executing the query. + The default is . + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains an + that contains a collection of entity objects returned by the query. + + + + Specifies the related objects to include in the query results. + + A new with the defined query path. + + Dot-separated list of related objects to return in the query results. + path is null. + path is empty. + + + Limits the query to unique results. + + A new instance that is equivalent to the original instance with SELECT DISTINCT applied. + + + + + This query-builder method creates a new query whose results are all of + the results of this query, except those that are also part of the other + query specified. + + A query representing the results to exclude. + a new ObjectQuery instance. + If the query parameter is null. + + + Groups the query results by the specified criteria. + + A new instance of type + + that is equivalent to the original instance with GROUP BY applied. + + The key columns by which to group the results. + The list of selected properties that defines the projection. + Zero or more parameters that are used in this method. + The query parameter is null or an empty string + or the projection parameter is null or an empty string. + + + + This query-builder method creates a new query whose results are those that + are both in this query and the other query specified. + + A query representing the results to intersect with. + a new ObjectQuery instance. + If the query parameter is null. + + + Limits the query to only results of a specific type. + + A new instance that is equivalent to the original instance with OFTYPE applied. + + + The type of the returned when the query is executed with the applied filter. + + The type specified is not valid. + + + Orders the query results by the specified criteria. + + A new instance that is equivalent to the original instance with ORDER BY applied. + + The key columns by which to order the results. + Zero or more parameters that are used in this method. + The keys or parameters parameter is null. + The key is an empty string. + + + Limits the query results to only the properties that are defined in the specified projection. + + A new instance of type + + that is equivalent to the original instance with SELECT applied. + + The list of selected properties that defines the projection. + Zero or more parameters that are used in this method. + projection is null or parameters is null. + The projection is an empty string. + + + Limits the query results to only the property specified in the projection. + + A new instance of a type compatible with the specific projection. The returned + + is equivalent to the original instance with SELECT VALUE applied. + + The projection list. + An optional set of query parameters that should be in scope when parsing. + + The type of the returned by the + + method. + + projection is null or parameters is null. + The projection is an empty string. + + + Orders the query results by the specified criteria and skips a specified number of results. + + A new instance that is equivalent to the original instance with both ORDER BY and SKIP applied. + + The key columns by which to order the results. + The number of results to skip. This must be either a constant or a parameter reference. + An optional set of query parameters that should be in scope when parsing. + Any argument is null. + keys is an empty string or count is an empty string. + + + Limits the query results to a specified number of items. + + A new instance that is equivalent to the original instance with TOP applied. + + The number of items in the results as a string. + An optional set of query parameters that should be in scope when parsing. + count is null. + count is an empty string. + + + + This query-builder method creates a new query whose results are all of + the results of this query, plus all of the results of the other query, + without duplicates (i.e., results are unique). + + A query representing the results to add. + a new ObjectQuery instance. + If the query parameter is null. + + + + This query-builder method creates a new query whose results are all of + the results of this query, plus all of the results of the other query, + including any duplicates (i.e., results are not necessarily unique). + + A query representing the results to add. + a new ObjectQuery instance. + If the query parameter is null. + + + Limits the query to results that match specified filtering criteria. + + A new instance that is equivalent to the original instance with WHERE applied. + + The filter predicate. + Zero or more parameters that are used in this method. + predicate is null or parameters is null. + The predicate is an empty string. + + + + Returns an which when enumerated will execute the given SQL query against the database. + + The query results. + + + + Returns an which when enumerated will execute the given SQL query against the database. + + The query results. + + + Gets or sets the name of this object query. + + A string value that is the name of this . + + The value specified on set is not valid. + + + + This class implements IEnumerable and IDisposable. Instance of this class + is returned from ObjectQuery.Execute method. + + + + + This constructor is intended only for use when creating test doubles that will override members + with mocked or faked behavior. Use of this constructor for other purposes may result in unexpected + behavior including but not limited to throwing . + + + + + + + Returns an enumerator that iterates through the query results. + An enumerator that iterates through the query results. + + + Returns the results in a format useful for data binding. + + An of entity objects. + + + + Performs tasks associated with freeing, releasing, or resetting resources. + + + Releases the resources used by the object result. + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Gets the next result set of a stored procedure. + An ObjectResult that enumerates the values of the next result set. Null, if there are no more, or if the ObjectResult is not the result of a stored procedure call. + The type of the element. + + + + IListSource.ContainsListCollection implementation. Always returns false. + + + + + When overridden in a derived class, gets the type of the generic + + . + + + The type of the generic . + + + + + This class represents the result of the method. + + The type of the result. + + + + This constructor is intended only for use when creating test doubles that will override members + with mocked or faked behavior. Use of this constructor for other purposes may result in unexpected + behavior including but not limited to throwing . + + + + Returns an enumerator that iterates through the query results. + An enumerator that iterates through the query results. + + + + + + Releases the unmanaged resources used by the and optionally releases the managed resources. + true to release managed and unmanaged resources; false to release only unmanaged resources. + + + + Gets the type of the . + + + A that is the type of the . + + + + + Represents a typed entity set that is used to perform create, read, update, and delete operations. + + The type of the entity. + + + Adds an object to the object context in the current entity set. + The object to add. + + + Attaches an object or object graph to the object context in the current entity set. + The object to attach. + + + Marks an object for deletion. + + An object that represents the entity to delete. The object can be in any state except + + . + + + + Removes the object from the object context. + + Object to be detached. Only the entity is removed; if there are any related objects that are being tracked by the same + + , those will not be detached automatically. + + + + + Copies the scalar values from the supplied object into the object in the + + that has the same key. + + The updated object. + + The detached object that has property updates to apply to the original object. The entity key of currentEntity must match the + + property of an entry in the + + . + + + + + Sets the property of an + + to match the property values of a supplied object. + + The updated object. + + The detached object that has property updates to apply to the original object. The entity key of originalEntity must match the + + property of an entry in the + + . + + + + Creates a new entity type object. + The new entity type object, or an instance of a proxy type that corresponds to the entity type. + + + Creates an instance of the specified type. + An instance of the requested type T , or an instance of a proxy type that corresponds to the type T . + Type of object to be returned. + + + + Gets the metadata of the entity set represented by this instance. + + + An object. + + + + + The original values of the properties of an entity when it was retrieved from the database. + + + + + Maintains object state and identity management for entity type instances and relationship instances. + + + + + Initializes a new instance of the class. + + + The , which supplies mapping and metadata information. + + + + + Returns a collection of objects for objects or relationships with the given state. + + + A collection of objects in the given + + . + + + An used to filter the returned + + objects. + + + When state is . + + + + + Changes state of the for a specific object to the specified entityState . + + + The for the supplied entity . + + The object for which the state must be changed. + The new state of the object. + When entity is null. + + When the object is not detached and does not have an entry in the state manager + or when you try to change the state to + from any other + or when state is not a valid value. + + + + Changes the state of the relationship between two entity objects that is specified based on the two related objects and the name of the navigation property. + + The for the relationship that was changed. + + + The object instance or of the source entity at one end of the relationship. + + + The object instance or of the target entity at the other end of the relationship. + + The name of the navigation property on source that returns the specified target . + + The requested of the specified relationship. + + When source or target is null. + + When trying to change the state of the relationship to a state other than + or + when either source or target is in a state + or when you try to change the state of the relationship to a state other than + or + when either source or target is in an state + or when state is not a valid value + + + + Changes the state of the relationship between two entity objects that is specified based on the two related objects and a LINQ expression that defines the navigation property. + + The for the relationship that was changed. + + + The object instance or of the source entity at one end of the relationship. + + + The object instance or of the target entity at the other end of the relationship. + + A LINQ expression that selects the navigation property on source that returns the specified target . + + The requested of the specified relationship. + + The entity type of the source object. + When source , target , or selector is null. + selector is malformed or cannot return a navigation property. + + When you try to change the state of the relationship to a state other than + or + when either source or target is in a + state + or when you try to change the state of the relationship to a state other than + or + when either source or target is in an state + or when state is not a valid value. + + + + Changes the state of the relationship between two entity objects that is specified based on the two related objects and the properties of the relationship. + + The for the relationship that was changed. + + + The object instance or of the source entity at one end of the relationship. + + + The object instance or of the target entity at the other end of the relationship. + + The name of the relationship. + The role name at the target end of the relationship. + + The requested of the specified relationship. + + When source or target is null. + + When you try to change the state of the relationship to a state other than + or + when either source or target is in a state + or when you try to change the state of the relationship to a state other than + or + when either source or target is in an + state + or when state is not a valid value. + + + + + Returns an for the object or relationship entry with the specified key. + + + The corresponding for the given + + . + + + The . + + When key is null. + When the specified key cannot be found in the state manager. + + No entity with the specified exists in the + + . + + + + + Returns an for the specified object. + + + The corresponding for the given + + . + + + The to which the retrieved + + belongs. + + + No entity for the specified exists in the + + . + + + + + Tries to retrieve the corresponding for the specified + + . + + + A Boolean value that is true if there is a corresponding + + for the given object; otherwise, false. + + + The to which the retrieved + + belongs. + + + When this method returns, contains the for the given + + This parameter is passed uninitialized. + + + + + Tries to retrieve the corresponding for the object or relationship with the specified + + . + + + A Boolean value that is true if there is a corresponding + + for the given + + ; otherwise, false. + + + The given . + + + When this method returns, contains an for the given + + This parameter is passed uninitialized. + + A null (Nothing in Visual Basic) value is provided for key . + + + + Returns the that is used by the specified object. + + + The for the specified object. + + + The object for which to return the . + + + The entity does not implement IEntityWithRelationships and is not tracked by this ObjectStateManager + + + + + Returns the that is used by the specified object. + + + true if a instance was returned for the supplied entity ; otherwise false. + + + The object for which to return the . + + + When this method returns, contains the + + for the entity . + + + + + Gets the associated with this state manager. + + + The associated with this + + . + + + + Occurs when entities are added to or removed from the state manager. + + + + A DataContractResolver that knows how to resolve proxy types created for persistent + ignorant classes to their base types. This is used with the DataContractSerializer. + + + + During deserialization, maps any xsi:type information to the actual type of the persistence-ignorant object. + Returns the type that the xsi:type is mapped to. Returns null if no known type was found that matches the xsi:type. + The xsi:type information to map. + The namespace of the xsi:type. + The declared type. + + An instance of . + + + + During serialization, maps actual types to xsi:type information. + true if the type was resolved; otherwise, false. + The actual type of the persistence-ignorant object. + The declared type. + + An instance of . + + When this method returns, contains a list of xsi:type declarations. + When this method returns, contains a list of namespaces used. + + + + Defines the different ways to handle modified properties when refreshing in-memory data from the database. + + + + + For unmodified client objects, same behavior as StoreWins. For modified client + objects, Refresh original values with store value, keeping all values on client + object. The next time an update happens, all the client change units will be + considered modified and require updating. + + + + + Discard all changes on the client and refresh values with store values. + Client original values is updated to match the store. + + + + + Flags used to modify behavior of ObjectContext.SaveChanges() + + + + + Changes are saved without the DetectChanges or the AcceptAllChangesAfterSave methods being called. + + + + + After changes are saved, the AcceptAllChangesAfterSave method is called, which resets change tracking in the ObjectStateManager. + + + + + Before changes are saved, the DetectChanges method is called to synchronize the property values of objects that are attached to the object context with data in the ObjectStateManager. + + + + + This exception is thrown when a update operation violates the concurrency constraint. + + + + + Exception during save changes to store + + + + + Initializes a new instance of . + + + + + Initializes a new instance of with a specialized error message. + + The message that describes the error. + + + + Initializes a new instance of the class that uses a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class that uses a specified error message, a reference to the inner exception, and an enumerable collection of + + objects. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + The collection of objects. + + + + + Initializes a new instance of with serialized data. + + + The that holds the serialized object data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Gets the objects for this + + . + + + A collection of objects comprised of either a single entity and 0 or more relationships, or 0 entities and 1 or more relationships. + + + + + Initializes a new instance of . + + + + + Initializes a new instance of with a specialized error message. + + The message that describes the error. + + + + Initializes a new instance of that uses a specified error message and a reference to the inner exception. + + The message that describes the error. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of that uses a specified error message, a reference to the inner exception, and an enumerable collection of + + objects. + + The message that describes the error. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + The enumerable collection of objects. + + + + + Property constraint exception class. Note that this class has state - so if you change even + its internals, it can be a breaking change + + + + + Initializes a new instance of the class with default message. + + + + + Initializes a new instance of the class with supplied message. + + A localized error message. + + + + Initializes a new instance of the class with supplied message and inner exception. + + A localized error message. + The inner exception. + + + + Initializes a new instance of the class. + + A localized error message. + The name of the property. + + + + Initializes a new instance of the class. + + A localized error message. + The name of the property. + The inner exception. + + + Gets the name of the property that violated the constraint. + The name of the property that violated the constraint. + + + + This exception is thrown when the store provider exhibits a behavior incompatible with the entity client provider + + + + + Initializes a new instance of . + + + + + Initializes a new instance of with a specialized error message. + + The message that describes the error. + + + + Initializes a new instance of that uses a specified error message. + + The message that describes the error. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Provides common language runtime (CLR) methods that expose EDM canonical functions + for use in or LINQ to Entities queries. + + + Note that this class was called EntityFunctions in some previous versions of Entity Framework. + + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate + the standard deviation of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate + the standard deviation of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate + the standard deviation of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate + the standard deviation of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate + the standard deviation of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate + the standard deviation of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate + the standard deviation of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate + the standard deviation of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate + the standard deviation for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate + the standard deviation for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate + the standard deviation for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate + the standard deviation for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate + the standard deviation for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate + the standard deviation for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate + the standard deviation for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate + the standard deviation for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The standard deviation for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate + the variance of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate + the variance of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate + the variance of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate + the variance of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate + the variance of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate + the variance of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate + the variance of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate + the variance of the collection. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate + the variance for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate + the variance for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate + the variance for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate + the variance for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate + the variance for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate + the variance for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate + the variance for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate + the variance for the population. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The collection over which to perform the calculation. + The variance for the population. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Left EDM function to return a given + number of the leftmost characters in a string. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input string. + The number of characters to return + A string containing the number of characters asked for from the left of the input string. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Right EDM function to return a given + number of the rightmost characters in a string. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input string. + The number of characters to return + A string containing the number of characters asked for from the right of the input string. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Reverse EDM function to return a given + string with the order of the characters reversed. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input string. + The input string with the order of the characters reversed. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical GetTotalOffsetMinutes EDM function to + return the number of minutes that the given date/time is offset from UTC. This is generally between +780 + and -780 (+ or - 13 hrs). + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The date/time value to use. + The offset of the input from UTC. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical TruncateTime EDM function to return + the given date with the time portion cleared. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The date/time value to use. + The input date with the time portion cleared. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical TruncateTime EDM function to return + the given date with the time portion cleared. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The date/time value to use. + The input date with the time portion cleared. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical CreateDateTime EDM function to + create a new object. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The year. + The month (1-based). + The day (1-based). + The hours. + The minutes. + The seconds, including fractional parts of the seconds if desired. + The new date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical CreateDateTimeOffset EDM function to + create a new object. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The year. + The month (1-based). + The day (1-based). + The hours. + The minutes. + The seconds, including fractional parts of the seconds if desired. + The time zone offset part of the new date. + The new date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical CreateTime EDM function to + create a new object. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The hours. + The minutes. + The seconds, including fractional parts of the seconds if desired. + The new time span. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddYears EDM function to + add the given number of years to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of years to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddYears EDM function to + add the given number of years to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of years to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddMonths EDM function to + add the given number of months to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of months to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddMonths EDM function to + add the given number of months to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of months to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddDays EDM function to + add the given number of days to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of days to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddDays EDM function to + add the given number of days to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of days to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddHours EDM function to + add the given number of hours to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of hours to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddHours EDM function to + add the given number of hours to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of hours to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddHours EDM function to + add the given number of hours to a time span. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of hours to add. + A resulting time span. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddMinutes EDM function to + add the given number of minutes to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of minutes to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddMinutes EDM function to + add the given number of minutes to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of minutes to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddMinutes EDM function to + add the given number of minutes to a time span. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of minutes to add. + A resulting time span. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddSeconds EDM function to + add the given number of seconds to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of seconds to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddSeconds EDM function to + add the given number of seconds to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of seconds to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddSeconds EDM function to + add the given number of seconds to a time span. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of seconds to add. + A resulting time span. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddMilliseconds EDM function to + add the given number of milliseconds to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of milliseconds to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddMilliseconds EDM function to + add the given number of milliseconds to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of milliseconds to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddMilliseconds EDM function to + add the given number of milliseconds to a time span. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of milliseconds to add. + A resulting time span. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddMicroseconds EDM function to + add the given number of microseconds to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of microseconds to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddMicroseconds EDM function to + add the given number of microseconds to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of microseconds to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddMicroseconds EDM function to + add the given number of microseconds to a time span. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of microseconds to add. + A resulting time span. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddNanoseconds EDM function to + add the given number of nanoseconds to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of nanoseconds to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddNanoseconds EDM function to + add the given number of nanoseconds to a date/time. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of nanoseconds to add. + A resulting date/time. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical AddNanoseconds EDM function to + add the given number of nanoseconds to a time span. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The input date/time. + The number of nanoseconds to add. + A resulting time span. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffYears EDM function to + calculate the number of years between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of years between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffYears EDM function to + calculate the number of years between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of years between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffMonths EDM function to + calculate the number of months between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of months between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffMonths EDM function to + calculate the number of months between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of months between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffDays EDM function to + calculate the number of days between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of days between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffDays EDM function to + calculate the number of days between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of days between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffHours EDM function to + calculate the number of hours between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of hours between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffHours EDM function to + calculate the number of hours between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of hours between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffHours EDM function to + calculate the number of hours between two time spans. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first time span. + The second time span. + The number of hours between the first and second time spans. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffMinutes EDM function to + calculate the number of minutes between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of minutes between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffMinutes EDM function to + calculate the number of minutes between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of minutes between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffMinutes EDM function to + calculate the number of minutes between two time spans. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first time span. + The second time span. + The number of minutes between the first and second time spans. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffSeconds EDM function to + calculate the number of seconds between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of seconds between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffSeconds EDM function to + calculate the number of seconds between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of seconds between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffSeconds EDM function to + calculate the number of seconds between two time spans. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first time span. + The second time span. + The number of seconds between the first and second time spans. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffMilliseconds EDM function to + calculate the number of milliseconds between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of milliseconds between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffMilliseconds EDM function to + calculate the number of milliseconds between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of milliseconds between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffMilliseconds EDM function to + calculate the number of milliseconds between two time spans. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first time span. + The second time span. + The number of milliseconds between the first and second time spans. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffMicroseconds EDM function to + calculate the number of microseconds between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of microseconds between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffMicroseconds EDM function to + calculate the number of microseconds between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of microseconds between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffMicroseconds EDM function to + calculate the number of microseconds between two time spans. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first time span. + The second time span. + The number of microseconds between the first and second time spans. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffNanoseconds EDM function to + calculate the number of nanoseconds between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of nanoseconds between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffNanoseconds EDM function to + calculate the number of nanoseconds between two date/times. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first date/time. + The second date/time. + The number of nanoseconds between the first and second date/times. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical DiffNanoseconds EDM function to + calculate the number of nanoseconds between two time spans. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The first time span. + The second time span. + The number of nanoseconds between the first and second time spans. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Truncate EDM function to + truncate the given value to the number of specified digits. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The value to truncate. + The number of digits to preserve. + The truncated value. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Truncate EDM function to + truncate the given value to the number of specified digits. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The value to truncate. + The number of digits to preserve. + The truncated value. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Like EDM operator to match an expression. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The string to search. + The expression to match against. + True if the searched string matches the expression; otherwise false. + + + + When used as part of a LINQ to Entities query, this method invokes the canonical Like EDM operator to match an expression. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function is translated to a corresponding function in the database. + + The string to search. + The expression to match against. + The string to escape special characters with, must only be a single character. + True if the searched string matches the expression; otherwise false. + + + + When used as part of a LINQ to Entities query, this method acts as an operator that ensures the input + is treated as a Unicode string. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function impacts the way the LINQ query is translated to a query that can be run in the database. + + The input string. + The input string treated as a Unicode string. + + + + When used as part of a LINQ to Entities query, this method acts as an operator that ensures the input + is treated as a non-Unicode string. + + + You cannot call this function directly. This function can only appear within a LINQ to Entities query. + This function impacts the way the LINQ query is translated to a query that can be run in the database. + + The input string. + The input string treated as a non-Unicode string. + + + + Describes the state of an entity. + + + + + The entity is not being tracked by the context. + An entity is in this state immediately after it has been created with the new operator + or with one of the Create methods. + + + + + The entity is being tracked by the context and exists in the database, and its property + values have not changed from the values in the database. + + + + + The entity is being tracked by the context but does not yet exist in the database. + + + + + The entity is being tracked by the context and exists in the database, but has been marked + for deletion from the database the next time SaveChanges is called. + + + + + The entity is being tracked by the context and exists in the database, and some or all of its + property values have been modified. + + + + + Represents information about a database connection. + + + + + Creates a new instance of DbConnectionInfo representing a connection that is specified in the application configuration file. + + The name of the connection string in the application configuration. + + + + Creates a new instance of DbConnectionInfo based on a connection string. + + The connection string to use for the connection. + The name of the provider to use for the connection. Use 'System.Data.SqlClient' for SQL Server. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Instances of this class are used to create DbConnection objects for + SQL Server LocalDb based on a given database name or connection string. + + + An instance of this class can be set on the class or in the + app.config/web.config for the application to cause all DbContexts created with no + connection information or just a database name to use SQL Server LocalDb by default. + This class is immutable since multiple threads may access instances simultaneously + when creating connections. + + + + + Implementations of this interface are used to create DbConnection objects for + a type of database server based on a given database name. + An Instance is set on the class to + cause all DbContexts created with no connection information or just a database + name or connection string to use a certain type of database server by default. + Two implementations of this interface are provided: + is used to create connections to Microsoft SQL Server, including EXPRESS editions. + is used to create connections to Microsoft SQL + Server Compact Editions. + Other implementations for other database servers can be added as needed. + Note that implementations should be thread safe or immutable since they may + be accessed by multiple threads at the same time. + + + + + Creates a connection based on the given database name or connection string. + + The database name or connection string. + An initialized DbConnection. + + + + Creates a new instance of the connection factory for the given version of LocalDb. + For SQL Server 2012 LocalDb use "v11.0". + For SQL Server 2014 and later LocalDb use "mssqllocaldb". + + The LocalDb version to use. + + + + Creates a new instance of the connection factory for the given version of LocalDb. + For SQL Server 2012 LocalDb use "v11.0". + For SQL Server 2014 and later LocalDb use "mssqllocaldb". + + The LocalDb version to use. + The connection string to use for options to the database other than the 'Initial Catalog', 'Data Source', and 'AttachDbFilename'. The 'Initial Catalog' and 'AttachDbFilename' will be prepended to this string based on the database name when CreateConnection is called. The 'Data Source' will be set based on the LocalDbVersion argument. + + + + Creates a connection for SQL Server LocalDb based on the given database name or connection string. + If the given string contains an '=' character then it is treated as a full connection string, + otherwise it is treated as a database name only. + + The database name or connection string. + An initialized DbConnection. + + + + The connection string to use for options to the database other than the 'Initial Catalog', + 'Data Source', and 'AttachDbFilename'. + The 'Initial Catalog' and 'AttachDbFilename' will be prepended to this string based on the + database name when CreateConnection is called. + The 'Data Source' will be set based on the LocalDbVersion argument. + The default is 'Integrated Security=True;'. + + + + + An implementation of that will use Code First Migrations + to update the database to the latest version. + + The type of the context. + The type of the migrations configuration to use during initialization. + + + + Initializes a new instance of the MigrateDatabaseToLatestVersion class that will use + the connection information from a context constructed using the default constructor + or registered factory if applicable + + + + + Initializes a new instance of the MigrateDatabaseToLatestVersion class specifying whether to + use the connection information from the context that triggered initialization to perform the migration. + + + If set to true the initializer is run using the connection information from the context that + triggered initialization. Otherwise, the connection information will be taken from a context constructed + using the default constructor or registered factory if applicable. + + + + + Initializes a new instance of the MigrateDatabaseToLatestVersion class specifying whether to + use the connection information from the context that triggered initialization to perform the migration. + Also allows specifying migrations configuration to use during initialization. + + + If set to true the initializer is run using the connection information from the context that + triggered initialization. Otherwise, the connection information will be taken from a context constructed + using the default constructor or registered factory if applicable. + + Migrations configuration to use during initialization. + + + + Initializes a new instance of the MigrateDatabaseToLatestVersion class that will + use a specific connection string from the configuration file to connect to + the database to perform the migration. + + The name of the connection string to use for migration. + + + + + + + Helper class that is used to configure a column. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Creates a new column definition to store Binary data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Value indicating whether or not the column allows null values. + The maximum allowable length of the array data. + Value indicating whether or not all data should be padded to the maximum length. + Constant value to use as the default value for this column. + SQL expression used as the default value for this column. + Value indicating whether or not this column should be configured as a timestamp. + The name of the column. + Provider specific data type to use for this column. + Custom annotations usually from the Code First model. + The newly constructed column definition. + + + + Creates a new column definition to store Boolean data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Value indicating whether or not the column allows null values. + Constant value to use as the default value for this column. + SQL expression used as the default value for this column. + The name of the column. + Provider specific data type to use for this column. + Custom annotations usually from the Code First model. + The newly constructed column definition. + + + + Creates a new column definition to store Byte data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Value indicating whether or not the column allows null values. + Value indicating whether or not the database will generate values for this column during insert. + Constant value to use as the default value for this column. + SQL expression used as the default value for this column. + The name of the column. + Provider specific data type to use for this column. + Custom annotations usually from the Code First model. + The newly constructed column definition. + + + + Creates a new column definition to store DateTime data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Value indicating whether or not the column allows null values. + The precision of the column. + Constant value to use as the default value for this column. + SQL expression used as the default value for this column. + The name of the column. + Provider specific data type to use for this column. + Custom annotations usually from the Code First model. + The newly constructed column definition. + + + + Creates a new column definition to store Decimal data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Value indicating whether or not the column allows null values. + The numeric precision of the column. + The numeric scale of the column. + Constant value to use as the default value for this column. + SQL expression used as the default value for this column. + The name of the column. + Provider specific data type to use for this column. + Value indicating whether or not the database will generate values for this column during insert. + Custom annotations usually from the Code First model. + The newly constructed column definition. + + + + Creates a new column definition to store Double data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Value indicating whether or not the column allows null values. + Constant value to use as the default value for this column. + SQL expression used as the default value for this column. + The name of the column. + Provider specific data type to use for this column. + Custom annotations usually from the Code First model. + The newly constructed column definition. + + + + Creates a new column definition to store GUID data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Value indicating whether or not the column allows null values. + Value indicating whether or not the database will generate values for this column during insert. + Constant value to use as the default value for this column. + SQL expression used as the default value for this column. + The name of the column. + Provider specific data type to use for this column. + Custom annotations usually from the Code First model. + The newly constructed column definition. + + + + Creates a new column definition to store Single data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Value indicating whether or not the column allows null values. + Constant value to use as the default value for this column. + SQL expression used as the default value for this column. + The name of the column. + Provider specific data type to use for this column. + Custom annotations usually from the Code First model. + The newly constructed column definition. + + + + Creates a new column definition to store Short data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Value indicating whether or not the column allows null values. + Value indicating whether or not the database will generate values for this column during insert. + Constant value to use as the default value for this column. + SQL expression used as the default value for this column. + The name of the column. + Provider specific data type to use for this column. + Custom annotations usually from the Code First model. + The newly constructed column definition. + + + + Creates a new column definition to store Integer data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Value indicating whether or not the column allows null values. + Value indicating whether or not the database will generate values for this column during insert. + Constant value to use as the default value for this column. + SQL expression used as the default value for this column. + The name of the column. + Provider specific data type to use for this column. + Custom annotations usually from the Code First model. + The newly constructed column definition. + + + + Creates a new column definition to store Long data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Value indicating whether or not the column allows null values. + Value indicating whether or not the database will generate values for this column during insert. + Constant value to use as the default value for this column. + SQL expression used as the default value for this column. + The name of the column. + Provider specific data type to use for this column. + Custom annotations usually from the Code First model. + The newly constructed column definition. + + + + Creates a new column definition to store String data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Value indicating whether or not the column allows null values. + The maximum allowable length of the string data. + Value indicating whether or not all data should be padded to the maximum length. + Value indicating whether or not the column supports Unicode content. + Constant value to use as the default value for this column. + SQL expression used as the default value for this column. + The name of the column. + Provider specific data type to use for this column. + Custom annotations usually from the Code First model. + The newly constructed column definition. + + + + Creates a new column definition to store Time data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Value indicating whether or not the column allows null values. + The precision of the column. + Constant value to use as the default value for this column. + SQL expression used as the default value for this column. + The name of the column. + Provider specific data type to use for this column. + Custom annotations usually from the Code First model. + The newly constructed column definition. + + + + Creates a new column definition to store DateTimeOffset data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Value indicating whether or not the column allows null values. + The precision of the column. + Constant value to use as the default value for this column. + SQL expression used as the default value for this column. + The name of the column. + Provider specific data type to use for this column. + Custom annotations usually from the Code First model. + The newly constructed column definition. + + + + Creates a new column definition to store geography data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Value indicating whether or not the column allows null values. + Constant value to use as the default value for this column. + SQL expression used as the default value for this column. + The name of the column. + Provider specific data type to use for this column. + Custom annotations usually from the Code First model. + The newly constructed column definition. + + + + Creates a new column definition to store geometry data. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Value indicating whether or not the column allows null values. + Constant value to use as the default value for this column. + SQL expression used as the default value for this column. + The name of the column. + Provider specific data type to use for this column. + Custom annotations usually from the Code First model. + The newly constructed column definition. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Creates a shallow copy of the current . + + A shallow copy of the current . + + + + Helper class that is used to further configure a table being created from a CreateTable call on + + . + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The type that represents the table's columns. + + + + Initializes a new instance of the TableBuilder class. + + The table creation operation to be further configured. + The migration the table is created in. + + + + Specifies a primary key for the table. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + A lambda expression representing the property to be used as the primary key. C#: t => t.Id VB.Net: Function(t) t.Id If the primary key is made up of multiple properties then specify an anonymous type including the properties. C#: t => new { t.Id1, t.Id2 } VB.Net: Function(t) New With { t.Id1, t.Id2 } + The name of the primary key. If null is supplied, a default name will be generated. + A value indicating whether or not this is a clustered primary key. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + Itself, so that multiple calls can be chained. + + + + Specifies an index to be created on the table. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + A lambda expression representing the property to be indexed. C#: t => t.PropertyOne VB.Net: Function(t) t.PropertyOne If multiple properties are to be indexed then specify an anonymous type including the properties. C#: t => new { t.PropertyOne, t.PropertyTwo } VB.Net: Function(t) New With { t.PropertyOne, t.PropertyTwo } + The name of the index. + A value indicating whether or not this is a unique index. + A value indicating whether or not this is a clustered index. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + Itself, so that multiple calls can be chained. + + + + Specifies a foreign key constraint to be created on the table. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Name of the table that the foreign key constraint targets. + A lambda expression representing the properties of the foreign key. C#: t => t.PropertyOne VB.Net: Function(t) t.PropertyOne If multiple properties make up the foreign key then specify an anonymous type including the properties. C#: t => new { t.PropertyOne, t.PropertyTwo } VB.Net: Function(t) New With { t.PropertyOne, t.PropertyTwo } + A value indicating whether or not cascade delete should be configured on the foreign key constraint. + The name of this foreign key constraint. If no name is supplied, a default name will be calculated. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + Itself, so that multiple calls can be chained. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Creates a shallow copy of the current . + + A shallow copy of the current . + + + + Base class for code-based migrations. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Operations to be performed during the upgrade process. + + + + + Operations to be performed during the downgrade process. + + + + + Adds an operation to create a new stored procedure. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The name of the stored procedure. Schema name is optional, if no schema is specified then dbo is + assumed. + + The body of the stored procedure. + + The additional arguments that may be processed by providers. Use anonymous type syntax + to specify arguments. For example, 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to create a new stored procedure. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The name of the stored procedure. Schema name is optional, if no schema is specified then dbo is + assumed. + + The action that specifies the parameters of the stored procedure. + The body of the stored procedure. + + The additional arguments that may be processed by providers. Use anonymous type syntax + to specify arguments. For example, 'new { SampleArgument = "MyValue" }'. + + + The parameters in this create stored procedure operation. You do not need to specify this + type, it will be inferred from the parameter you supply. + + + + + Adds an operation to alter a stored procedure. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The name of the stored procedure. Schema name is optional, if no schema is specified then dbo is + assumed. + + The body of the stored procedure. + + The additional arguments that may be processed by providers. Use anonymous type syntax + to specify arguments. For example, 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to alter a stored procedure. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The parameters in this alter stored procedure operation. You do not need to specify this + type, it will be inferred from the parameter you supply. + + + The name of the stored procedure. Schema name is optional, if no schema is specified then dbo is + assumed. + + The action that specifies the parameters of the stored procedure. + The body of the stored procedure. + + The additional arguments that may be processed by providers. Use anonymous type syntax + to specify arguments. For example, 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to drop an existing stored procedure with the specified name. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The name of the procedure to drop. Schema name is optional, if no schema is specified then dbo is + assumed. + + + The additional arguments that may be processed by providers. Use anonymous type syntax + to specify arguments. For example, 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to create a new table. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The columns in this create table operation. You do not need to specify this type, it will + be inferred from the columnsAction parameter you supply. + + The name of the table. Schema name is optional, if no schema is specified then dbo is assumed. + + An action that specifies the columns to be included in the table. i.e. t => new { Id = + t.Int(identity: true), Name = t.String() } + + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + An object that allows further configuration of the table creation operation. + + + + Adds an operation to create a new table. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The columns in this create table operation. You do not need to specify this type, it will + be inferred from the columnsAction parameter you supply. + + The name of the table. Schema name is optional, if no schema is specified then dbo is assumed. + + An action that specifies the columns to be included in the table. i.e. t => new { Id = + t.Int(identity: true), Name = t.String() } + + Custom annotations that exist on the table to be created. May be null or empty. + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + An object that allows further configuration of the table creation operation. + + + + Adds an operation to handle changes in the annotations defined on tables. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The columns in this operation. You do not need to specify this type, it will + be inferred from the columnsAction parameter you supply. + + The name of the table. Schema name is optional, if no schema is specified then dbo is assumed. + + An action that specifies the columns to be included in the table. i.e. t => new { Id = + t.Int(identity: true), Name = t.String() } + + The custom annotations on the table that have changed. + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to create a new foreign key constraint. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The table that contains the foreign key column. Schema name is optional, if no schema is + specified then dbo is assumed. + + The foreign key column. + + The table that contains the column this foreign key references. Schema name is optional, + if no schema is specified then dbo is assumed. + + + The column this foreign key references. If no value is supplied the primary key of the + principal table will be referenced. + + + A value indicating if cascade delete should be configured for the foreign key + relationship. If no value is supplied, cascade delete will be off. + + + The name of the foreign key constraint in the database. If no value is supplied a unique name will + be generated. + + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to create a new foreign key constraint. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The table that contains the foreign key columns. Schema name is optional, if no schema is + specified then dbo is assumed. + + The foreign key columns. + + The table that contains the columns this foreign key references. Schema name is optional, + if no schema is specified then dbo is assumed. + + + The columns this foreign key references. If no value is supplied the primary key of the + principal table will be referenced. + + + A value indicating if cascade delete should be configured for the foreign key + relationship. If no value is supplied, cascade delete will be off. + + + The name of the foreign key constraint in the database. If no value is supplied a unique name will + be generated. + + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to drop a foreign key constraint based on its name. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The table that contains the foreign key column. Schema name is optional, if no schema is + specified then dbo is assumed. + + The name of the foreign key constraint in the database. + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to drop a foreign key constraint based on the column it targets. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The table that contains the foreign key column. Schema name is optional, if no schema is + specified then dbo is assumed. + + The foreign key column. + + The table that contains the column this foreign key references. Schema name is optional, + if no schema is specified then dbo is assumed. + + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to drop a foreign key constraint based on the column it targets. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The table that contains the foreign key column. + Schema name is optional, if no schema is specified then dbo is assumed. + + The foreign key column. + + The table that contains the column this foreign key references. + Schema name is optional, if no schema is specified then dbo is assumed. + + The columns this foreign key references. + + Additional arguments that may be processed by providers. + Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to drop a foreign key constraint based on the columns it targets. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The table that contains the foreign key columns. Schema name is optional, if no schema is + specified then dbo is assumed. + + The foreign key columns. + + The table that contains the columns this foreign key references. Schema name is optional, + if no schema is specified then dbo is assumed. + + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to drop a table. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The name of the table to be dropped. Schema name is optional, if no schema is specified then dbo is + assumed. + + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to drop a table. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The name of the table to be dropped. Schema name is optional, if no schema is specified then dbo is + assumed. + + Custom annotations that exist on columns of the table that is being dropped. May be null or empty. + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to drop a table. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The name of the table to be dropped. Schema name is optional, if no schema is specified then dbo is + assumed. + + Custom annotations that exist on the table that is being dropped. May be null or empty. + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to drop a table. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The name of the table to be dropped. Schema name is optional, if no schema is specified then dbo is + assumed. + + Custom annotations that exist on the table that is being dropped. May be null or empty. + Custom annotations that exist on columns of the table that is being dropped. May be null or empty. + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to move a table to a new schema. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The name of the table to be moved. Schema name is optional, if no schema is specified then dbo is + assumed. + + The schema the table is to be moved to. + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to move a stored procedure to a new schema. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The name of the stored procedure to be moved. Schema name is optional, if no schema is specified + then dbo is assumed. + + The schema the stored procedure is to be moved to. + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to rename a table. To change the schema of a table use MoveTable. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The name of the table to be renamed. Schema name is optional, if no schema is specified then dbo is + assumed. + + + The new name for the table. Schema name is optional, if no schema is specified then dbo is + assumed. + + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to rename a stored procedure. To change the schema of a stored procedure use MoveStoredProcedure + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The name of the stored procedure to be renamed. Schema name is optional, if no schema is specified + then dbo is assumed. + + + The new name for the stored procedure. Schema name is optional, if no schema is specified then + dbo is assumed. + + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to rename a column. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The name of the table that contains the column to be renamed. Schema name is optional, if no + schema is specified then dbo is assumed. + + The name of the column to be renamed. + The new name for the column. + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to add a column to an existing table. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The name of the table to add the column to. Schema name is optional, if no schema is specified + then dbo is assumed. + + The name of the column to be added. + + An action that specifies the column to be added. i.e. c => c.Int(nullable: false, + defaultValue: 3) + + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to drop an existing column. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The name of the table to drop the column from. Schema name is optional, if no schema is specified + then dbo is assumed. + + The name of the column to be dropped. + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to drop an existing column. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The name of the table to drop the column from. Schema name is optional, if no schema is specified + then dbo is assumed. + + The name of the column to be dropped. + Custom annotations that exist on the column that is being dropped. May be null or empty. + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to alter the definition of an existing column. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The name of the table the column exists in. Schema name is optional, if no schema is specified + then dbo is assumed. + + The name of the column to be changed. + + An action that specifies the new definition for the column. i.e. c => c.String(nullable: + false, defaultValue: "none") + + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to create a new primary key. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The table that contains the primary key column. Schema name is optional, if no schema is specified + then dbo is assumed. + + The primary key column. + + The name of the primary key in the database. If no value is supplied a unique name will be + generated. + + A value indicating whether or not this is a clustered primary key. + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to create a new primary key based on multiple columns. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The table that contains the primary key columns. Schema name is optional, if no schema is + specified then dbo is assumed. + + The primary key columns. + + The name of the primary key in the database. If no value is supplied a unique name will be + generated. + + A value indicating whether or not this is a clustered primary key. + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to drop an existing primary key that does not have the default name. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The table that contains the primary key column. Schema name is optional, if no schema is specified + then dbo is assumed. + + The name of the primary key to be dropped. + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to drop an existing primary key that was created with the default name. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The table that contains the primary key column. Schema name is optional, if no schema is specified + then dbo is assumed. + + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to create an index on a single column. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The name of the table to create the index on. Schema name is optional, if no schema is specified + then dbo is assumed. + + The name of the column to create the index on. + + A value indicating if this is a unique index. If no value is supplied a non-unique index will be + created. + + + The name to use for the index in the database. If no value is supplied a unique name will be + generated. + + A value indicating whether or not this is a clustered index. + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to create an index on multiple columns. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The name of the table to create the index on. Schema name is optional, if no schema is specified + then dbo is assumed. + + The name of the columns to create the index on. + + A value indicating if this is a unique index. If no value is supplied a non-unique index will be + created. + + + The name to use for the index in the database. If no value is supplied a unique name will be + generated. + + A value indicating whether or not this is a clustered index. + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to drop an index based on its name. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The name of the table to drop the index from. Schema name is optional, if no schema is specified + then dbo is assumed. + + The name of the index to be dropped. + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to drop an index based on the columns it targets. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The name of the table to drop the index from. Schema name is optional, if no schema is specified + then dbo is assumed. + + The name of the column(s) the index targets. + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to rename an index. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The name of the table that contains the index to be renamed. Schema name is optional, if no + schema is specified then dbo is assumed. + + The name of the index to be renamed. + The new name for the index. + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to execute a SQL command or set of SQL commands. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The SQL to be executed. + + A value indicating if the SQL should be executed outside of the transaction being + used for the migration process. If no value is supplied the SQL will be executed within the transaction. + + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to execute a SQL file. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The SQL file to be executed. Relative paths are assumed to be relative to the current AppDomain's BaseDirectory. + + + A value indicating if the SQL should be executed outside of the transaction being + used for the migration process. If no value is supplied the SQL will be executed within the transaction. + + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Adds an operation to execute a SQL resource file. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The manifest resource name of the SQL resource file to be executed. + + The assembly containing the resource file. The calling assembly is assumed if not provided. + + + A value indicating if the SQL should be executed outside of the transaction being + used for the migration process. If no value is supplied the SQL will be executed within the transaction. + + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + + + + + + + + + + + + + + + + + + + Configuration relating to the use of migrations for a given model. + You will typically create a configuration class that derives + from rather than + using this class. + + + + + The default directory that migrations are stored in. + + + + + Initializes a new instance of the DbMigrationsConfiguration class. + + + + + Adds a new SQL generator to be used for a given database provider. + + Name of the database provider to set the SQL generator for. + The SQL generator to be used. + + + + Gets the SQL generator that is set to be used with a given database provider. + + Name of the database provider to get the SQL generator for. + The SQL generator that is set for the database provider. + + + + Adds a new factory for creating instances to be used for a given database provider. + + Name of the database provider to set the SQL generator for. + + A factory for creating instances for a given and + representing the default schema. + + + + + Gets the history context factory that is set to be used with a given database provider. + + Name of the database provider to get thefactory for. + The history context factory that is set for the database provider. + + + + Gets or sets a value indicating if automatic migrations can be used when migrating the database. + + + + + Gets or sets the string used to distinguish migrations belonging to this configuration + from migrations belonging to other configurations using the same database. + This property enables migrations from multiple different models to be applied to a single database. + + + + + Gets or sets a value indicating if data loss is acceptable during automatic migration. + If set to false an exception will be thrown if data loss may occur as part of an automatic migration. + + + + + Gets or sets the derived DbContext representing the model to be migrated. + + + + + Gets or sets the namespace used for code-based migrations. + + + + + Gets or sets the sub-directory that code-based migrations are stored in. + Note that this property must be set to a relative path for a sub-directory under the + Visual Studio project root; it cannot be set to an absolute path. + + + + + Gets or sets the code generator to be used when scaffolding migrations. + + + + + Gets or sets the assembly containing code-based migrations. + + + + + Gets or sets a value to override the connection of the database to be migrated. + + + + + Gets or sets the timeout value used for the individual commands within a + migration. A null value indicates that the default value of the underlying + provider will be used. + + + + + Configuration relating to the use of migrations for a given model. + + The context representing the model that this configuration applies to. + + + + Initializes a new instance of the DbMigrationsConfiguration class. + + + + + Runs after upgrading to the latest migration to allow seed data to be updated. + + + Note that the database may already contain seed data when this method runs. This means that + implementations of this method must check whether or not seed data is present and/or up-to-date + and then only make changes if necessary and in a non-destructive way. The + + can be used to help with this, but for seeding large amounts of data it may be necessary to do less + granular checks if performance is an issue. + If the database + initializer is being used, then this method will be called each time that the initializer runs. + If one of the , , + or initializers is being used, then this method will not be + called and the Seed method defined in the initializer should be used instead. + + Context to be used for updating seed data. + + + + + + + + + + + + + + + + + + + DbMigrator is used to apply existing migrations to a database. + DbMigrator can be used to upgrade and downgrade to any given migration. + To scaffold migrations based on changes to your model use + + + + + Base class for decorators that wrap the core + + + + + Initializes a new instance of the MigratorBase class. + + The migrator that this decorator is wrapping. + + + + Gets a list of the pending migrations that have not been applied to the database. + + List of migration Ids + + + + Updates the target database to the latest migration. + + + + + Updates the target database to a given migration. + + The migration to upgrade/downgrade to. + + + + Gets a list of the migrations that are defined in the assembly. + + List of migration Ids + + + + Gets a list of the migrations that have been applied to the database. + + List of migration Ids + + + + Gets the configuration being used for the migrations process. + + + + + Migration Id representing the state of the database before any migrations are applied. + + + + + Initializes a new instance of the DbMigrator class. + + Configuration to be used for the migration process. + + + + Gets all migrations that are defined in the configured migrations assembly. + + The list of migrations. + + + + Gets all migrations that have been applied to the target database. + + The list of migrations. + + + + Gets all migrations that are defined in the assembly but haven't been applied to the target database. + + The list of migrations. + + + + Updates the target database to a given migration. + + The migration to upgrade/downgrade to. + + + + Gets the configuration that is being used for the migration process. + + + + + A set of extension methods for + + + + + Adds or updates entities by key when SaveChanges is called. Equivalent to an "upsert" operation + from database terminology. + This method can useful when seeding data using Migrations. + + The type of entities to add or update. + The set to which the entities belong. + The entities to add or update. + + When the parameter is a custom or fake IDbSet implementation, this method will + attempt to locate and invoke a public, instance method with the same signature as this extension method. + + + + + Adds or updates entities by a custom identification expression when SaveChanges is called. + Equivalent to an "upsert" operation from database terminology. + This method can useful when seeding data using Migrations. + + The type of entities to add or update. + The set to which the entities belong. + An expression specifying the properties that should be used when determining whether an Add or Update operation should be performed. + The entities to add or update. + + When the parameter is a custom or fake IDbSet implementation, this method will + attempt to locate and invoke a public, instance method with the same signature as this extension method. + + + + + Generates C# code for a code-based migration. + + + + + Base class for providers that generate code for code-based migrations. + + + + + Generates the code that should be added to the users project. + + Unique identifier of the migration. + Operations to be performed by the migration. + Source model to be stored in the migration metadata. + Target model to be stored in the migration metadata. + Namespace that code should be generated in. + Name of the class that should be generated. + The generated code. + + + + Gets the namespaces that must be output as "using" or "Imports" directives to handle + the code generated by the given operations. + + The operations for which code is going to be generated. + An ordered list of namespace names. + + + + Gets the default namespaces that must be output as "using" or "Imports" directives for + any code generated. + + A value indicating if this class is being generated for a code-behind file. + An ordered list of namespace names. + + + + Gets the instances that are being used. + + + + + + + + Generates the primary code file that the user can view and edit. + + Operations to be performed by the migration. + Namespace that code should be generated in. + Name of the class that should be generated. + The generated code. + + + + Generates the code behind file with migration metadata. + + Unique identifier of the migration. + Source model to be stored in the migration metadata. + Target model to be stored in the migration metadata. + Namespace that code should be generated in. + Name of the class that should be generated. + The generated code. + + + + Generates a property to return the source or target model in the code behind file. + + Name of the property. + Value to be returned. + Text writer to add the generated code to. + + + + Generates class attributes. + + Text writer to add the generated code to. + A value indicating if this class is being generated for a code-behind file. + + + + Generates a namespace, using statements and class definition. + + Namespace that code should be generated in. + Name of the class that should be generated. + Text writer to add the generated code to. + Base class for the generated class. + A value indicating if this class is being generated for a code-behind file. + Namespaces for which using directives will be added. If null, then the namespaces returned from GetDefaultNamespaces will be used. + + + + Generates the closing code for a class that was started with WriteClassStart. + + Namespace that code should be generated in. + Text writer to add the generated code to. + + + + Generates code to perform an . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform an . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code for to re-create the given dictionary of annotations for use when passing + these annotations as a parameter of a . call. + + The annotations to generate. + The writer to which generated code should be written. + + + + Generates code for to re-create the given dictionary of annotations for use when passing + these annotations as a parameter of a . call. + + The annotations to generate. + The writer to which generated code should be written. + + + + Generates code for the given annotation value, which may be null. The default behavior is to use an + if one is registered, otherwise call ToString on the annotation value. + + + Note that a can be registered to generate code for custom annotations + without the need to override the entire code generator. + + The name of the annotation for which code is needed. + The annotation value to generate. + The writer to which generated code should be written. + + + Generates code to perform a . + The operation to generate code for. + Text writer to add the generated code to. + + + Generates code to perform a . + The operation to generate code for. + Text writer to add the generated code to. + + + Generates code to specify the definition for a . + The parameter definition to generate code for. + Text writer to add the generated code to. + A value indicating whether to include the column name in the definition. + + + Generates code to perform a . + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code for an . + + The operation for which code should be generated. + The writer to which generated code should be written. + + + + Generates code to perform an as part of a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform an as part of a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a as part of a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to specify a set of column names using a lambda expression. + + The columns to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform an . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform an . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to specify the definition for a . + + The column definition to generate code for. + Text writer to add the generated code to. + A value indicating whether to include the column name in the definition. + + + + Generates code to specify the default value for a column. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to specify the default value for a column. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to specify the default value for a column. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to specify the default value for a column. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to specify the default value for a column. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to specify the default value for a column. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to specify the default value for a column. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to specify the default value for a column. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to specify the default value for a column. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to specify the default value for a column. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to specify the default value for a column. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to specify the default value for a column of unknown data type. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Removes any invalid characters from the name of an database artifact. + + The name to be scrubbed. + The scrubbed name. + + + + Gets the type name to use for a column of the given data type. + + The data type to translate. + The type name to use in the generated migration. + + + + Quotes an identifier using appropriate escaping to allow it to be stored in a string. + + The identifier to be quoted. + The quoted identifier. + + + + Scaffolds code-based migrations to apply pending model changes to the database. + + + + + Initializes a new instance of the MigrationScaffolder class. + + Configuration to be used for scaffolding. + + + + Scaffolds a code based migration to apply any pending model changes to the database. + + The name to use for the scaffolded migration. + The scaffolded migration. + + + + Scaffolds a code based migration to apply any pending model changes to the database. + + The name to use for the scaffolded migration. + Whether or not to include model changes. + The scaffolded migration. + + + + Scaffolds the initial code-based migration corresponding to a previously run database initializer. + + The scaffolded migration. + + + + Gets or sets the namespace used in the migration's generated code. + By default, this is the same as MigrationsNamespace on the migrations + configuration object passed into the constructor. For VB.NET projects, this + will need to be updated to take into account the project's root namespace. + + + + + Represents a code-based migration that has been scaffolded and is ready to be written to a file. + + + + + Gets or sets the unique identifier for this migration. + Typically used for the file name of the generated code. + + + + + Gets or sets the scaffolded migration code that the user can edit. + + + + + Gets or sets the scaffolded migration code that should be stored in a code behind file. + + + + + Gets or sets the programming language used for this migration. + Typically used for the file extension of the generated code. + + + + + Gets or sets the subdirectory in the user's project that this migration should be saved in. + + + + + Gets a dictionary of string resources to add to the migration resource file. + + + + + Gets or sets whether the migration was re-scaffolded. + + + + + Represents an exception that occurred while running an operation in another AppDomain in the + . + + + + + Initializes a new instance of the ToolingException class. + + + + + Initializes a new instance of the class with a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the ToolingException class. + + Error that explains the reason for the exception. + The type of the exception that was thrown. + The stack trace of the exception that was thrown. + + + + Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Gets the type of the exception that was thrown. + + + + + Gets the stack trace of the exception that was thrown. + + + + + Helper class that is used by design time tools to run migrations related + commands that need to interact with an application that is being edited + in Visual Studio. + Because the application is being edited the assemblies need to + be loaded in a separate AppDomain to ensure the latest version + is always loaded. + The App/Web.config file from the startup project is also copied + to ensure that any configuration is applied. + + + + + Initializes a new instance of the ToolingFacade class. + + The name of the assembly that contains the migrations configuration to be used. + The name of the assembly that contains the DbContext to be used. + The namespace qualified name of migrations configuration to be used. + The working directory containing the compiled assemblies. + The path of the config file from the startup project. + The path of the application data directory from the startup project. Typically the App_Data directory for web applications or the working directory for executables. + The connection to the database to be migrated. If null is supplied, the default connection for the context will be used. + + + + Releases all unmanaged resources used by the facade. + + + + + Gets the fully qualified name of all types deriving from . + + All context types found. + + + + Gets the fully qualified name of a type deriving from . + + The name of the context type. If null, the single context type found in the assembly will be returned. + The context type found. + + + + Gets a list of all migrations that have been applied to the database. + + Ids of applied migrations. + + + + Gets a list of all migrations that have not been applied to the database. + + Ids of pending migrations. + + + + Updates the database to the specified migration. + + The Id of the migration to migrate to. If null is supplied, the database will be updated to the latest migration. + Value indicating if data loss during automatic migration is acceptable. + + + + Generates a SQL script to migrate between two migrations. + + The migration to update from. If null is supplied, a script to update the current database will be produced. + The migration to update to. If null is supplied, a script to update to the latest migration will be produced. + Value indicating if data loss during automatic migration is acceptable. + The generated SQL script. + + + + Scaffolds a code-based migration to apply any pending model changes. + + The name for the generated migration. + The programming language of the generated migration. + The root namespace of the project the migration will be added to. + Whether or not to include model changes. + The scaffolded migration. + + + + Scaffolds the initial code-based migration corresponding to a previously run database initializer. + + The programming language of the generated migration. + The root namespace of the project the migration will be added to. + The scaffolded migration. + + + + + + + Releases all resources used by the facade. + + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + + Gets or sets an action to be run to log information. + + + + + Gets or sets an action to be run to log warnings. + + + + + Gets or sets an action to be run to log verbose information. + + + + + Base class for loggers that can be used for the migrations process. + + + + + Logs an informational message. + + The message to be logged. + + + + Logs a warning that the user should be made aware of. + + The message to be logged. + + + + Logs some additional information that should only be presented to the user if they request verbose output. + + The message to be logged. + + + + Generates VB.Net code for a code-based migration. + + + + + + + + Generates the primary code file that the user can view and edit. + + Operations to be performed by the migration. + Namespace that code should be generated in. + Name of the class that should be generated. + The generated code. + + + + Generates the code behind file with migration metadata. + + Unique identifier of the migration. + Source model to be stored in the migration metadata. + Target model to be stored in the migration metadata. + Namespace that code should be generated in. + Name of the class that should be generated. + The generated code. + + + + Generates a property to return the source or target model in the code behind file. + + Name of the property. + Value to be returned. + Text writer to add the generated code to. + + + + Generates class attributes. + + Text writer to add the generated code to. + A value indicating if this class is being generated for a code-behind file. + + + + Generates a namespace, using statements and class definition. + + Namespace that code should be generated in. + Name of the class that should be generated. + Text writer to add the generated code to. + Base class for the generated class. + A value indicating if this class is being generated for a code-behind file. + Namespaces for which Imports directives will be added. If null, then the namespaces returned from GetDefaultNamespaces will be used. + + + + Generates the closing code for a class that was started with WriteClassStart. + + Namespace that code should be generated in. + Text writer to add the generated code to. + + + + Generates code to perform an . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform an . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code for to re-create the given dictionary of annotations for use when passing + these annotations as a parameter of a . call. + + The annotations to generate. + The writer to which generated code should be written. + + + + Generates code for to re-create the given dictionary of annotations for use when passing + these annotations as a parameter of a . call. + + The annotations to generate. + The writer to which generated code should be written. + + + + Generates code for the given annotation value, which may be null. The default behavior is to use an + if one is registered, otherwise call ToString on the annotation value. + + + Note that a can be registered to generate code for custom annotations + without the need to override the entire code generator. + + The name of the annotation for which code is needed. + The annotation value to generate. + The writer to which generated code should be written. + + + Generates code to perform a . + The operation to generate code for. + Text writer to add the generated code to. + + + Generates code to perform a . + The operation to generate code for. + Text writer to add the generated code to. + + + Generates code to perform a . + The parameter model definition to generate code for. + Text writer to add the generated code to. + true to include the column name in the definition; otherwise, false. + + + Generates code to perform a . + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code for an . + + The operation for which code should be generated. + The writer to which generated code should be written. + + + + Generates code to perform an as part of a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform an as part of a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a as part of a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to specify a set of column names using a lambda expression. + + The columns to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform an . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform an . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to specify the definition for a . + + The column definition to generate code for. + Text writer to add the generated code to. + A value indicating whether to include the column name in the definition. + + + + Generates code to specify the default value for a column. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to specify the default value for a column. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to specify the default value for a column. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to specify the default value for a column. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to specify the default value for a column. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to specify the default value for a column. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to specify the default value for a column. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to specify the default value for a column. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to specify the default value for a column. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to specify the default value for a column. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to specify the default value for a column. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to specify the default value for a column of unknown data type. + + The value to be used as the default. + Code representing the default value. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Generates code to perform a . + + The operation to generate code for. + Text writer to add the generated code to. + + + + Removes any invalid characters from the name of an database artifact. + + The name to be scrubbed. + The scrubbed name. + + + + Gets the type name to use for a column of the given data type. + + The data type to translate. + The type name to use in the generated migration. + + + + Quotes an identifier using appropriate escaping to allow it to be stored in a string. + + The identifier to be quoted. + The quoted identifier. + + + + Contains extension methods for the class. + + + + + Configures an awaiter used to await this to avoid + marshalling the continuation + back to the original context, but preserve the current culture and UI culture. + + + The type of the result produced by the associated . + + The task to be awaited on. + An object used to await this task. + + + + Configures an awaiter used to await this to avoid + marshalling the continuation + back to the original context, but preserve the current culture and UI culture. + + The task to be awaited on. + An object used to await this task. + + + + Provides an awaitable object that allows for awaits on that + preserve the culture. + + + The type of the result produced by the associated . + + This type is intended for compiler use only. + + + + Constructs a new instance of the class. + + The task to be awaited on. + + + Gets an awaiter used to await this . + An awaiter instance. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The result of the completed . + The awaiter was not properly initialized. + The task was canceled. + The task completed in a Faulted state. + + + This method is not implemented and should not be called. + The action to invoke when the await operation completes. + + + + Schedules the continuation onto the associated with this + . + + The action to invoke when the await operation completes. + + The argument is null + (Nothing in Visual Basic). + + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + + Gets whether this Task has completed. + + + will return true when the Task is in one of the three + final states: RanToCompletion, + Faulted, or + Canceled. + + + + + Provides an awaitable object that allows for awaits on that + preserve the culture. + + This type is intended for compiler use only. + + + + Constructs a new instance of the class. + + The task to be awaited on. + + + Gets an awaiter used to await this . + An awaiter instance. + This method is intended for compiler user rather than use directly in code. + + + Ends the await on the completed . + The awaiter was not properly initialized. + The task was canceled. + The task completed in a Faulted state. + + + This method is not implemented and should not be called. + The action to invoke when the await operation completes. + + + + Schedules the continuation onto the associated with this + . + + The action to invoke when the await operation completes. + + The argument is null + (Nothing in Visual Basic). + + The awaiter was not properly initialized. + This method is intended for compiler user rather than use directly in code. + + + + Gets whether this Task has completed. + + + will return true when the Task is in one of the three + final states: RanToCompletion, + Faulted, or + Canceled. + + + + + This class is used by Code First Migrations to read and write migration history + from the database. + To customize the definition of the migrations history table you can derive from + this class and override OnModelCreating. Derived instances can either be registered + on a per migrations configuration basis using , + or globally using . + + + + + The default name used for the migrations history table. + + + + + Initializes a new instance of the HistoryContext class. + If you are creating a derived history context you will generally expose a constructor + that accepts these same parameters and passes them to this base constructor. + + + An existing connection to use for the new context. + + + The default schema of the model being migrated. + This schema will be used for the migrations history table unless a different schema is configured in OnModelCreating. + + + + + Applies the default configuration for the migrations history table. If you override + this method it is recommended that you call this base implementation before applying your + custom configuration. + + The builder that defines the model for the context being created. + + + + Gets the key used to locate a model that was previously built for this context. This is used + to avoid processing OnModelCreating and calculating the model every time a new context instance is created. + By default this property returns the default schema. + In most cases you will not need to override this property. However, if your implementation of OnModelCreating + contains conditional logic that results in a different model being built for the same database provider and + default schema you should override this property and calculate an appropriate key. + + + + + Gets the default schema of the model being migrated. + This schema will be used for the migrations history table unless a different schema is configured in OnModelCreating. + + + + + Gets or sets a that can be used to read and write instances. + + + + + This class is used by Code First Migrations to read and write migration history + from the database. + + + + + Gets or sets the Id of the migration this row represents. + + + + + Gets or sets a key representing to which context the row applies. + + + + + Gets or sets the state of the model after this migration was applied. + + + + + Gets or sets the version of Entity Framework that created this entry. + + + + + Represents an error that occurs when an automatic migration would result in data loss. + + + + + Initializes a new instance of the AutomaticDataLossException class. + + + + + Initializes a new instance of the AutomaticDataLossException class. + + The message that describes the error. + + + + Initializes a new instance of the MigrationsException class. + + The message that describes the error. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Represents an error that occurs when there are pending model changes after applying the last migration and automatic migration is disabled. + + + + + Initializes a new instance of the AutomaticMigrationsDisabledException class. + + + + + Initializes a new instance of the AutomaticMigrationsDisabledException class. + + The message that describes the error. + + + + Initializes a new instance of the MigrationsException class. + + The message that describes the error. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Provides additional metadata about a code-based migration. + + + + + Gets the unique identifier for the migration. + + + + + Gets the state of the model before this migration is run. + + + + + Gets the state of the model after this migration is run. + + + + + Decorator to provide logging during migrations operations.. + + + + + Initializes a new instance of the MigratorLoggingDecorator class. + + The migrator that this decorator is wrapping. + The logger to write messages to. + + + + Decorator to produce a SQL script instead of applying changes to the database. + Using this decorator to wrap will prevent + from applying any changes to the target database. + + + + + Initializes a new instance of the MigratorScriptingDecorator class. + + The migrator that this decorator is wrapping. + + + + Produces a script to update the database. + + + The migration to update from. If null is supplied, a script to update the + current database will be produced. + + + The migration to update to. If null is supplied, + a script to update to the latest migration will be produced. + + The generated SQL script. + + + + Represents a column being added to a table. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the AddColumnOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The name of the table the column should be added to. + Details of the column being added. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets the name of the table the column should be added to. + + + + + Gets the details of the column being added. + + + + + Gets an operation that represents dropping the added column. + + + + + + + + Represents a foreign key constraint being added to a table. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Base class for changes that affect foreign key constraints. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the ForeignKeyOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets or sets the name of the table that the foreign key constraint targets. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Gets or sets the name of the table that the foreign key columns exist in. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + The names of the foreign key column(s). + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Gets a value indicating if a specific name has been supplied for this foreign key constraint. + + + + + Gets or sets the name of this foreign key constraint. + If no name is supplied, a default name will be calculated. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the AddForeignKeyOperation class. + The PrincipalTable, PrincipalColumns, DependentTable and DependentColumns properties should also be populated. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets an operation to create an index on the foreign key column(s). + + An operation to add the index. + + + + The names of the column(s) that the foreign key constraint should target. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Gets or sets a value indicating if cascade delete should be configured on the foreign key constraint. + + + + + Gets an operation to drop the foreign key constraint. + + + + + + + + Represents adding a primary key to a table. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Common base class to represent operations affecting primary keys. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Returns the default name for the primary key. + + The target table name. + The default primary key name. + + + + Initializes a new instance of the PrimaryKeyOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets or sets the name of the table that contains the primary key. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Gets the column(s) that make up the primary key. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Gets a value indicating if a specific name has been supplied for this primary key. + + + + + Gets or sets the name of this primary key. + If no name is supplied, a default name will be calculated. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + + + + Gets or sets whether this is a clustered primary key. + + + + + Initializes a new instance of the AddPrimaryKeyOperation class. + The Table and Columns properties should also be populated. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets an operation to drop the primary key. + + + + + Represents altering an existing column. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the AlterColumnOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The name of the table that the column belongs to. + Details of what the column should be altered to. + Value indicating if this change will result in data loss. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Initializes a new instance of the AlterColumnOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The name of the table that the column belongs to. + Details of what the column should be altered to. + Value indicating if this change will result in data loss. + An operation to revert this alteration of the column. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets the name of the table that the column belongs to. + + + + + Gets the new definition for the column. + + + + + Gets an operation that represents reverting the alteration. + The inverse cannot be automatically calculated, + if it was not supplied to the constructor this property will return null. + + + + + + + + Represents information about a column. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the ColumnModel class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The data type for this column. + + + + Initializes a new instance of the ColumnModel class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The data type for this column. + Additional details about the data type. This includes details such as maximum length, nullability etc. + + + + Determines if this column is a narrower data type than another column. + Used to determine if altering the supplied column definition to this definition will result in data loss. + + The column to compare to. + Details of the database provider being used. + True if this column is of a narrower data type. + + + + Gets the CLR type corresponding to the database type of this column. + + + + + Gets the default value for the CLR type corresponding to the database type of this column. + + + + + Gets or sets a value indicating if this column can store null values. + + + + + Gets or sets a value indicating if values for this column will be generated by the database using the identity pattern. + + + + + Gets or sets a value indicating if this property model should be configured as a timestamp. + + + + + Gets or sets the custom annotations that have changed on the column. + + + + + Represents creating a database index. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Common base class for operations affecting indexes. + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Creates a default index name based on the supplied column names. + + The column names used to create a default index name. + A default index name. + + + + Initializes a new instance of the IndexOperation class. + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + Additional arguments that may be processed by providers. Use anonymous type syntax to + specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + + Gets or sets the table the index belongs to. + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Gets the columns that are indexed. + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Gets a value indicating if a specific name has been supplied for this index. + + + + + Gets or sets the name of this index. + If no name is supplied, a default name will be calculated. + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the CreateIndexOperation class. + The Table and Columns properties should also be populated. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets or sets a value indicating if this is a unique index. + + + + + Gets an operation to drop this index. + + + + + + + + Gets or sets whether this is a clustered index. + + + + + Represents creating a table. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the CreateTableOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Name of the table to be created. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Initializes a new instance of the CreateTableOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Name of the table to be created. + Custom annotations that exist on the table to be created. May be null or empty. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets the name of the table to be created. + + + + + Gets the columns to be included in the new table. + + + + + Gets or sets the primary key for the new table. + + + + + Gets custom annotations that exist on the table to be created. + + + + + Gets an operation to drop the table. + + + + + + + + Represents a column being dropped from a table. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the DropColumnOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The name of the table the column should be dropped from. + The name of the column to be dropped. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Initializes a new instance of the DropColumnOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The name of the table the column should be dropped from. + The name of the column to be dropped. + Custom annotations that exist on the column that is being dropped. May be null or empty. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Initializes a new instance of the DropColumnOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The name of the table the column should be dropped from. + The name of the column to be dropped. + The operation that represents reverting the drop operation. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Initializes a new instance of the DropColumnOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The name of the table the column should be dropped from. + The name of the column to be dropped. + Custom annotations that exist on the column that is being dropped. May be null or empty. + The operation that represents reverting the drop operation. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets the name of the table the column should be dropped from. + + + + + Gets the name of the column to be dropped. + + + + + Gets custom annotations that exist on the column that is being dropped. + + + + + Gets an operation that represents reverting dropping the column. + The inverse cannot be automatically calculated, + if it was not supplied to the constructor this property will return null. + + + + + + + + Represents a foreign key constraint being dropped from a table. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the DropForeignKeyOperation class. + The PrincipalTable, DependentTable and DependentColumns properties should also be populated. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Initializes a new instance of the DropForeignKeyOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc.. + + The operation that represents reverting dropping the foreign key constraint. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets an operation to drop the associated index on the foreign key column(s). + + An operation to drop the index. + + + + Gets an operation that represents reverting dropping the foreign key constraint. + The inverse cannot be automatically calculated, + if it was not supplied to the constructor this property will return null. + + + + + + + + Represents dropping an existing index. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the DropIndexOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Initializes a new instance of the DropIndexOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The operation that represents reverting dropping the index. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets an operation that represents reverting dropping the index. + The inverse cannot be automatically calculated, + if it was not supplied to the constructor this property will return null. + + + + + + + + Represents dropping a primary key from a table. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the DropPrimaryKeyOperation class. + The Table and Columns properties should also be populated. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets an operation to add the primary key. + + + + + Used when altering the migrations history table so that the table can be rebuilt rather than just dropping and adding the primary key. + + + The create table operation for the migrations history table. + + + + + Represents dropping an existing table. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the DropTableOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The name of the table to be dropped. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Initializes a new instance of the DropTableOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The name of the table to be dropped. + Custom annotations that exist on the table that is being dropped. May be null or empty. + Custom annotations that exist on columns of the table that is being dropped. May be null or empty. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Initializes a new instance of the DropTableOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The name of the table to be dropped. + An operation that represents reverting dropping the table. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Initializes a new instance of the DropTableOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The name of the table to be dropped. + Custom annotations that exist on the table that is being dropped. May be null or empty. + Custom annotations that exist on columns of the table that is being dropped. May be null or empty. + An operation that represents reverting dropping the table. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets the name of the table to be dropped. + + + + + Gets custom annotations that exist on the table that is being dropped. + + + + + Gets custom annotations that exist on columns of the table that is being dropped. + + + + + Gets an operation that represents reverting dropping the table. + The inverse cannot be automatically calculated, + if it was not supplied to the constructor this property will return null. + + + + + + + + Operation representing DML changes to the migrations history table. + The migrations history table is used to store a log of the migrations that have been applied to the database. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the HistoryOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + A sequence of command trees representing the operations being applied to the history table. + Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + A sequence of commands representing the operations being applied to the history table. + + + + + + + + Represents moving a table from one schema to another. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the MoveTableOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Name of the table to be moved. + Name of the schema to move the table to. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets the name of the table to be moved. + + + + + Gets the name of the schema to move the table to. + + + + + Gets an operation that moves the table back to its original schema. + + + + + + + + Used when altering the migrations history table so that data can be moved to the new table. + + + The context key for the model. + + + + + Gets a value that indicates whether this is a system table. + + + true if the table is a system table; otherwise, false. + + + + + Used when altering the migrations history table so that the table can be rebuilt rather than just dropping and adding the primary key. + + + The create table operation for the migrations history table. + + + + + Represents renaming an existing column. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the RenameColumnOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Name of the table the column belongs to. + Name of the column to be renamed. + New name for the column. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets the name of the table the column belongs to. + + + + + Gets the name of the column to be renamed. + + + + + Gets the new name for the column. + + + + + Gets an operation that reverts the rename. + + + + + + + + Represents renaming an existing table. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the RenameTableOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + Name of the table to be renamed. + New name for the table. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets the name of the table to be renamed. + + + + + Gets the new name for the table. + + + + + Gets an operation that reverts the rename. + + + + + + + + Represents a provider specific SQL statement to be executed directly against the target database. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Initializes a new instance of the SqlOperation class. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + The SQL to be executed. + Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. + + + + Gets the SQL to be executed. + + + + + Gets or sets a value indicating whether this statement should be performed outside of + the transaction scope that is used to make the migration process transactional. + If set to true, this operation will not be rolled back if the migration process fails. + + + + + + + + Common base class for providers that convert provider agnostic migration + operations into database provider specific SQL commands. + + + + + Converts a set of migration operations into database provider specific SQL. + + The operations to be converted. + Token representing the version of the database being targeted. + A list of SQL statements to be executed to perform the migration operations. + + + + Generates the SQL body for a stored procedure. + + The command trees representing the commands for an insert, update or delete operation. + The rows affected parameter name. + The provider manifest token. + The SQL body for the stored procedure. + + + + Determines if a provider specific exception corresponds to a database-level permission denied error. + + The database exception. + true if the supplied exception corresponds to a database-level permission denied error; otherwise false. + + + + Builds the store type usage for the specified using the facets from the specified . + + Name of the store type. + The target property. + A store-specific TypeUsage + + + + Gets or sets the provider manifest. + + + The provider manifest. + + + + + Represents a migration operation that has been translated into a SQL statement. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Gets or sets the SQL to be executed to perform this migration operation. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + + + Gets or sets a value indicating whether this statement should be performed outside of + the transaction scope that is used to make the migration process transactional. + If set to true, this operation will not be rolled back if the migration process fails. + + + + + Gets or sets the batch terminator for the database provider. + + Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources + (such as the end user of an application). If input is accepted from such sources it should be validated + before being passed to these APIs to protect against SQL injection attacks etc. + + + The batch terminator for the database provider. + + + + + Extension methods for . + + + + + Returns an implementation that stays in sync with the given + . + + The element type. + The collection that the binding list will stay in sync with. + The binding list. + + + + Represents data in a geodetic (round earth) coordinate system. + + + + + Creates a new value based on the specified well known binary value. + + + A new DbGeography value as defined by the well known binary value with the default geography coordinate system identifier (SRID)( + + ). + + A byte array that contains a well known binary representation of the geography value. + + + + Creates a new value based on the specified well known binary value and coordinate system identifier (SRID). + + A new DbGeography value as defined by the well known binary value with the specified coordinate system identifier. + A byte array that contains a well known binary representation of the geography value. + The identifier of the coordinate system that the new DbGeography value should use. + + + + Creates a new line value based on the specified well known binary value and coordinate system identifier (SRID). + + A new DbGeography value as defined by the well known binary value with the specified coordinate system identifier. + A byte array that contains a well known binary representation of the geography value. + The identifier of the coordinate system that the new DbGeography value should use. + + + + Creates a new point value based on the specified well known binary value and coordinate system identifier (SRID). + + A new DbGeography value as defined by the well known binary value with the specified coordinate system identifier. + A byte array that contains a well known binary representation of the geography value. + The identifier of the coordinate system that the new DbGeography value should use. + + + + Creates a new polygon value based on the specified well known binary value and coordinate system identifier (SRID). + + A new DbGeography value as defined by the well known binary value with the specified coordinate system identifier. + A byte array that contains a well known binary representation of the geography value. + The identifier of the coordinate system that the new DbGeography value should use. + + + Returns the multiline value from a binary value. + The multiline value from a binary value. + The well-known binary value. + The coordinate system identifier. + + + Returns the multipoint value from a well-known binary value. + The multipoint value from a well-known binary value. + The well-known binary value. + The coordinate system identifier. + + + Returns the multi polygon value from a well-known binary value. + The multi polygon value from a well-known binary value. + The multi polygon well-known binary value. + The coordinate system identifier. + + + + Creates a new collection value based on the specified well known binary value and coordinate system identifier (SRID). + + A new DbGeography value as defined by the well known binary value with the specified coordinate system identifier. + A byte array that contains a well known binary representation of the geography value. + The identifier of the coordinate system that the new DbGeography value should use. + + + + Creates a new value based on the specified Geography Markup Language (GML) value. + + + A new DbGeography value as defined by the GML value with the default geography coordinate system identifier (SRID) ( + + ). + + A string that contains a Geography Markup Language (GML) representation of the geography value. + + + + Creates a new value based on the specified Geography Markup Language (GML) value and coordinate system identifier (SRID). + + A new DbGeography value as defined by the GML value with the specified coordinate system identifier. + A string that contains a Geography Markup Language (GML) representation of the geography value. + The identifier of the coordinate system that the new DbGeography value should use. + + + + Creates a new value based on the specified well known text value. + + + A new DbGeography value as defined by the well known text value with the default geography coordinate system identifier (SRID) ( + + ). + + A string that contains a well known text representation of the geography value. + + + + Creates a new value based on the specified well known text value and coordinate system identifier (SRID). + + A new DbGeography value as defined by the well known text value with the specified coordinate system identifier. + A string that contains a well known text representation of the geography value. + The identifier of the coordinate system that the new DbGeography value should use. + + + + Creates a new line value based on the specified well known text value and coordinate system identifier (SRID). + + A new DbGeography value as defined by the well known text value with the specified coordinate system identifier. + A string that contains a well known text representation of the geography value. + The identifier of the coordinate system that the new DbGeography value should use. + + + + Creates a new point value based on the specified well known text value and coordinate system identifier (SRID). + + A new DbGeography value as defined by the well known text value with the specified coordinate system identifier. + A string that contains a well known text representation of the geography value. + The identifier of the coordinate system that the new DbGeography value should use. + + + + Creates a new polygon value based on the specified well known text value and coordinate system identifier (SRID). + + A new DbGeography value as defined by the well known text value with the specified coordinate system identifier. + A string that contains a well known text representation of the geography value. + The identifier of the coordinate system that the new DbGeography value should use. + + + Returns the multiline value from a well-known text value. + The multiline value from a well-known text value. + The well-known text. + The coordinate system identifier. + + + Returns the multipoint value from a well-known text value. + The multipoint value from a well-known text value. + The well-known text value. + The coordinate system identifier. + + + Returns the multi polygon value from a well-known text value. + The multi polygon value from a well-known text value. + The multi polygon well-known text value. + The coordinate system identifier. + + + + Creates a new collection value based on the specified well known text value and coordinate system identifier (SRID). + + A new DbGeography value as defined by the well known text value with the specified coordinate system identifier. + A string that contains a well known text representation of the geography value. + The identifier of the coordinate system that the new DbGeography value should use. + + + Generates the well known text representation of this DbGeography value. Includes only Longitude and Latitude for points. + A string containing the well known text representation of this DbGeography value. + + + Generates the well known binary representation of this DbGeography value. + The well-known binary representation of this DbGeography value. + + + Generates the Geography Markup Language (GML) representation of this DbGeography value. + A string containing the GML representation of this DbGeography value. + + + Determines whether this DbGeography is spatially equal to the specified DbGeography argument. + true if other is spatially equal to this geography value; otherwise false. + The geography value that should be compared with this geography value for equality. + + + Determines whether this DbGeography is spatially disjoint from the specified DbGeography argument. + true if other is disjoint from this geography value; otherwise false. + The geography value that should be compared with this geography value for disjointness. + + + Determines whether this DbGeography value spatially intersects the specified DbGeography argument. + true if other intersects this geography value; otherwise false. + The geography value that should be compared with this geography value for intersection. + + + Returns a geography object that represents the union of all points whose distance from a geography instance is less than or equal to a specified value. + A geography object that represents the union of all points + The distance. + + + Computes the distance between the closest points in this DbGeography value and another DbGeography value. + A double value that specifies the distance between the two closest points in this geography value and other. + The geography value for which the distance from this value should be computed. + + + Computes the intersection of this DbGeography value and another DbGeography value. + A new DbGeography value representing the intersection between this geography value and other. + The geography value for which the intersection with this value should be computed. + + + Computes the union of this DbGeography value and another DbGeography value. + A new DbGeography value representing the union between this geography value and other. + The geography value for which the union with this value should be computed. + + + Computes the difference of this DbGeography value and another DbGeography value. + A new DbGeography value representing the difference between this geography value and other. + The geography value for which the difference with this value should be computed. + + + Computes the symmetric difference of this DbGeography value and another DbGeography value. + A new DbGeography value representing the symmetric difference between this geography value and other. + The geography value for which the symmetric difference with this value should be computed. + + + Returns an element of this DbGeography value from a specific position, if it represents a geography collection. <param name="index">The position within this geography value from which the element should be taken.</param><returns>The element in this geography value at the specified position, if it represents a collection of other geography values; otherwise null.</returns> + An element of this DbGeography value from a specific position + The index. + + + Returns an element of this DbGeography value from a specific position, if it represents a linestring or linear ring. <param name="index">The position within this geography value from which the element should be taken.</param><returns>The element in this geography value at the specified position, if it represents a linestring or linear ring; otherwise null.</returns> + An element of this DbGeography value from a specific position + The index. + + + Returns a string representation of the geography value. + A string representation of the geography value. + + + Gets the default coordinate system id (SRID) for geography values (WGS 84) + The default coordinate system id (SRID) for geography values (WGS 84) + + + Gets a representation of this DbGeography value that is specific to the underlying provider that constructed it. + A representation of this DbGeography value. + + + + Gets the spatial provider that will be used for operations on this spatial type. + + + + Gets or sets a data contract serializable well known representation of this DbGeography value. + A data contract serializable well known representation of this DbGeography value. + + + Gets the identifier associated with the coordinate system. + The identifier associated with the coordinate system. + + + + Gets the dimension of the given value or, if the value is a collections, the largest element dimension. + + + The dimension of the given value. + + + + Gets the spatial type name of the DBGeography. + The spatial type name of the DBGeography. + + + Gets a nullable Boolean value indicating whether this DbGeography value is empty. + True if this DbGeography value is empty; otherwise, false. + + + Gets the number of elements in this DbGeography value, if it represents a geography collection. <returns>The number of elements in this geography value, if it represents a collection of other geography values; otherwise null.</returns> + The number of elements in this DbGeography value. + + + Gets the Latitude coordinate of this DbGeography value, if it represents a point. <returns>The Latitude coordinate value of this geography value, if it represents a point; otherwise null.</returns> + The Latitude coordinate of this DbGeography value. + + + Gets the Longitude coordinate of this DbGeography value, if it represents a point. <returns>The Longitude coordinate value of this geography value, if it represents a point; otherwise null.</returns> + The Longitude coordinate of this DbGeography value. + + + Gets the elevation (Z coordinate) of this DbGeography value, if it represents a point. <returns>The elevation (Z coordinate) value of this geography value, if it represents a point; otherwise null.</returns> + The elevation (Z coordinate) of this DbGeography value. + + + Gets the M (Measure) coordinate of this DbGeography value, if it represents a point. <returns>The M (Measure) coordinate value of this geography value, if it represents a point; otherwise null.</returns> + The M (Measure) coordinate of this DbGeography value. + + + Gets a nullable double value that indicates the length of this DbGeography value, which may be null if this value does not represent a curve. + A nullable double value that indicates the length of this DbGeography value. + + + Gets a DbGeography value representing the start point of this value, which may be null if this DbGeography value does not represent a curve. + A DbGeography value representing the start point of this value. + + + Gets a DbGeography value representing the start point of this value, which may be null if this DbGeography value does not represent a curve. + A DbGeography value representing the start point of this value. + + + Gets a nullable Boolean value indicating whether this DbGeography value is closed, which may be null if this value does not represent a curve. + True if this DbGeography value is closed; otherwise, false. + + + Gets the number of points in this DbGeography value, if it represents a linestring or linear ring. <returns>The number of elements in this geography value, if it represents a linestring or linear ring; otherwise null.</returns> + The number of points in this DbGeography value. + + + Gets a nullable double value that indicates the area of this DbGeography value, which may be null if this value does not represent a surface. + A nullable double value that indicates the area of this DbGeography value. + + + + A data contract serializable representation of a value. + + + + Gets or sets the coordinate system identifier (SRID) of this value. + + + Gets or sets the well known text representation of this value. + + + Gets or sets the well known binary representation of this value. + + + + Represents geometric shapes. + + + + + Creates a new value based on the specified well known binary value. + + + A new DbGeometry value as defined by the well known binary value with the default geometry coordinate system identifier ( + + ). + + A byte array that contains a well known binary representation of the geometry value. + wellKnownBinary + + + + Creates a new value based on the specified well known binary value and coordinate system identifier (SRID). + + A new DbGeometry value as defined by the well known binary value with the specified coordinate system identifier. + A byte array that contains a well known binary representation of the geometry value. + The identifier of the coordinate system that the new DbGeometry value should use. + wellKnownBinary + coordinateSystemId + + + + Creates a new line value based on the specified well known binary value and coordinate system identifier (SRID). + + A new DbGeometry value as defined by the well known binary value with the specified coordinate system identifier. + A byte array that contains a well known binary representation of the geometry value. + The identifier of the coordinate system that the new DbGeometry value should use. + lineWellKnownBinary + coordinateSystemId + + + + Creates a new point value based on the specified well known binary value and coordinate system identifier (SRID). + + A new DbGeometry value as defined by the well known binary value with the specified coordinate system identifier. + A byte array that contains a well known binary representation of the geometry value. + The identifier of the coordinate system that the new DbGeometry value should use. + pointWellKnownBinary + coordinateSystemId + + + + Creates a new polygon value based on the specified well known binary value and coordinate system identifier (SRID). + + A new DbGeometry value as defined by the well known binary value with the specified coordinate system identifier. + A byte array that contains a well known binary representation of the geometry value. + The identifier of the coordinate system that the new DbGeometry value should use. + polygonWellKnownBinary + coordinateSystemId + + + Returns the multiline value from a binary value. + The multiline value from a binary value. + The well-known binary value. + The coordinate system identifier. + + + Returns the multipoint value from a well-known binary value. + The multipoint value from a well-known binary value. + The well-known binary value. + The coordinate system identifier. + + + Returns the multi polygon value from a well-known binary value. + The multipoint value from a well-known text value. + The multi polygon well-known text value. + The coordinate system identifier. + + + + Creates a new collection value based on the specified well known binary value and coordinate system identifier (SRID). + + A new DbGeometry value as defined by the well known binary value with the specified coordinate system identifier. + A byte array that contains a well known binary representation of the geometry value. + The identifier of the coordinate system that the new DbGeometry value should use. + geometryCollectionWellKnownBinary + coordinateSystemId + + + + Creates a new value based on the specified Geography Markup Language (GML) value. + + + A new DbGeometry value as defined by the GML value with the default geometry coordinate system identifier (SRID) ( + + ). + + A string that contains a Geography Markup Language (GML) representation of the geometry value. + geometryMarkup + + + + Creates a new value based on the specified Geography Markup Language (GML) value and coordinate system identifier (SRID). + + A new DbGeometry value as defined by the GML value with the specified coordinate system identifier. + A string that contains a Geography Markup Language (GML) representation of the geometry value. + The identifier of the coordinate system that the new DbGeometry value should use. + geometryMarkup + coordinateSystemId + + + + Creates a new value based on the specified well known text value. + + + A new DbGeometry value as defined by the well known text value with the default geometry coordinate system identifier (SRID) ( + + ). + + A string that contains a well known text representation of the geometry value. + wellKnownText + + + + Creates a new value based on the specified well known text value and coordinate system identifier (SRID). + + A new DbGeometry value as defined by the well known text value with the specified coordinate system identifier. + A string that contains a well known text representation of the geometry value. + The identifier of the coordinate system that the new DbGeometry value should use. + wellKnownText + coordinateSystemId + + + + Creates a new line value based on the specified well known text value and coordinate system identifier (SRID). + + A new DbGeometry value as defined by the well known text value with the specified coordinate system identifier. + A string that contains a well known text representation of the geometry value. + The identifier of the coordinate system that the new DbGeometry value should use. + lineWellKnownText + coordinateSystemId + + + + Creates a new point value based on the specified well known text value and coordinate system identifier (SRID). + + A new DbGeometry value as defined by the well known text value with the specified coordinate system identifier. + A string that contains a well known text representation of the geometry value. + The identifier of the coordinate system that the new DbGeometry value should use. + pointWellKnownText + coordinateSystemId + + + + Creates a new polygon value based on the specified well known text value and coordinate system identifier (SRID). + + A new DbGeometry value as defined by the well known text value with the specified coordinate system identifier. + A string that contains a well known text representation of the geometry value. + The identifier of the coordinate system that the new DbGeometry value should use. + polygonWellKnownText + coordinateSystemId + + + Returns the multiline value from a well-known text value. + The multiline value from a well-known text value. + The well-known text. + The coordinate system identifier. + + + Returns the multipoint value from a well-known text value. + The multipoint value from a well-known text value. + The well-known text value. + The coordinate system identifier. + + + Returns the multi polygon value from a well-known binary value. + The multi polygon value from a well-known binary value. + The multi polygon well-known text value. + The coordinate system identifier. + + + + Creates a new collection value based on the specified well known text value and coordinate system identifier (SRID). + + A new DbGeometry value as defined by the well known text value with the specified coordinate system identifier. + A string that contains a well known text representation of the geometry value. + The identifier of the coordinate system that the new DbGeometry value should use. + geometryCollectionWellKnownText + coordinateSystemId + + + Generates the well known text representation of this DbGeometry value. Includes only X and Y coordinates for points. + A string containing the well known text representation of this DbGeometry value. + + + Generates the well known binary representation of this DbGeometry value. + The well-known binary representation of this DbGeometry value. + + + Generates the Geography Markup Language (GML) representation of this DbGeometry value. + A string containing the GML representation of this DbGeometry value. + + + Determines whether this DbGeometry is spatially equal to the specified DbGeometry argument. + true if other is spatially equal to this geometry value; otherwise false. + The geometry value that should be compared with this geometry value for equality. + other + + + Determines whether this DbGeometry is spatially disjoint from the specified DbGeometry argument. + true if other is disjoint from this geometry value; otherwise false. + The geometry value that should be compared with this geometry value for disjointness. + other + + + Determines whether this DbGeometry value spatially intersects the specified DbGeometry argument. + true if other intersects this geometry value; otherwise false. + The geometry value that should be compared with this geometry value for intersection. + other + + + Determines whether this DbGeometry value spatially touches the specified DbGeometry argument. + true if other touches this geometry value; otherwise false. + The geometry value that should be compared with this geometry value. + other + + + Determines whether this DbGeometry value spatially crosses the specified DbGeometry argument. + true if other crosses this geometry value; otherwise false. + The geometry value that should be compared with this geometry value. + other + + + Determines whether this DbGeometry value is spatially within the specified DbGeometry argument. + true if this geometry value is within other; otherwise false. + The geometry value that should be compared with this geometry value for containment. + other + + + Determines whether this DbGeometry value spatially contains the specified DbGeometry argument. + true if this geometry value contains other; otherwise false. + The geometry value that should be compared with this geometry value for containment. + other + + + Determines whether this DbGeometry value spatially overlaps the specified DbGeometry argument. + true if this geometry value overlaps other; otherwise false. + The geometry value that should be compared with this geometry value for overlap. + other + + + Determines whether this DbGeometry value spatially relates to the specified DbGeometry argument according to the given Dimensionally Extended Nine-Intersection Model (DE-9IM) intersection pattern. + true if this geometry value relates to other according to the specified intersection pattern matrix; otherwise false. + The geometry value that should be compared with this geometry value for relation. + A string that contains the text representation of the (DE-9IM) intersection pattern that defines the relation. + othermatrix + + + Returns a geometry object that represents the union of all points whose distance from a geometry instance is less than or equal to a specified value. + A geometry object that represents the union of all points. + The distance. + + + Computes the distance between the closest points in this DbGeometry value and another DbGeometry value. + A double value that specifies the distance between the two closest points in this geometry value and other. + The geometry value for which the distance from this value should be computed. + other + + + Computes the intersection of this DbGeometry value and another DbGeometry value. + A new DbGeometry value representing the intersection between this geometry value and other. + The geometry value for which the intersection with this value should be computed. + other + + + Computes the union of this DbGeometry value and another DbGeometry value. + A new DbGeometry value representing the union between this geometry value and other. + The geometry value for which the union with this value should be computed. + other + + + Computes the difference between this DbGeometry value and another DbGeometry value. + A new DbGeometry value representing the difference between this geometry value and other. + The geometry value for which the difference with this value should be computed. + other + + + Computes the symmetric difference between this DbGeometry value and another DbGeometry value. + A new DbGeometry value representing the symmetric difference between this geometry value and other. + The geometry value for which the symmetric difference with this value should be computed. + other + + + Returns an element of this DbGeometry value from a specific position, if it represents a geometry collection. <param name="index">The position within this geometry value from which the element should be taken.</param><returns>The element in this geometry value at the specified position, if it represents a collection of other geometry values; otherwise null.</returns> + An element of this DbGeometry value from a specific position. + The index. + + + Returns an element of this DbGeometry value from a specific position, if it represents a linestring or linear ring. <param name="index">The position within this geometry value from which the element should be taken.</param><returns>The element in this geometry value at the specified position, if it represents a linestring or linear ring; otherwise null.</returns> + An element of this DbGeometry value from a specific position. + The index. + + + Returns an interior ring from this DbGeometry value at a specific position, if it represents a polygon. <param name="index">The position within this geometry value from which the interior ring should be taken.</param><returns>The interior ring in this geometry value at the specified position, if it represents a polygon; otherwise null.</returns> + An interior ring from this DbGeometry value at a specific position. + The index. + + + Returns a string representation of the geometry value. + A string representation of the geometry value. + + + Gets the default coordinate system id (SRID) for geometry values. + The default coordinate system id (SRID) for geometry values. + + + Gets a representation of this DbGeometry value that is specific to the underlying provider that constructed it. + A representation of this DbGeometry value. + + + + Gets the spatial provider that will be used for operations on this spatial type. + + + + Gets or sets a data contract serializable well known representation of this DbGeometry value. + A data contract serializable well known representation of this DbGeometry value. + + + Gets the coordinate system identifier of the DbGeometry object. + The coordinate system identifier of the DbGeometry object. + + + Gets the boundary of the DbGeometry objects. + The boundary of the DbGeometry objects. + + + + Gets the dimension of the given value or, if the value is a collection, the dimension of its largest element. + + + The dimension of the given value. + + + + Gets the envelope (minimum bounding box) of this DbGeometry value, as a geometry value. + The envelope (minimum bounding box) of this DbGeometry value. + + + Gets a spatial type name representation of this DbGeometry value. + A spatial type name representation of this DbGeometry value. + + + Gets a nullable Boolean value indicating whether this DbGeometry value is empty, which may be null if this value does not represent a curve. + True if this DbGeometry value is empty; otherwise, false. + + + Gets a nullable Boolean value indicating whether this DbGeometry value is simple. + True if this DbGeometry value is simple; otherwise, false. + + + Gets a nullable Boolean value indicating whether this DbGeometry value is valid. + True if this DbGeometry value is valid; otherwise, false. + + + Gets the convex hull of this DbGeometry value as another DbGeometry value. + The convex hull of this DbGeometry value as another DbGeometry value. + + + Gets the number of elements in this DbGeometry value, if it represents a geometry collection. <returns>The number of elements in this geometry value, if it represents a collection of other geometry values; otherwise null.</returns> + The number of elements in this DbGeometry value. + + + Gets the X coordinate of this DbGeometry value, if it represents a point. <returns>The X coordinate value of this geometry value, if it represents a point; otherwise null.</returns> + The X coordinate of this DbGeometry value. + + + Gets the Y coordinate of this DbGeometry value, if it represents a point. <returns>The Y coordinate value of this geometry value, if it represents a point; otherwise null.</returns> + The Y coordinate of this DbGeometry value. + + + Gets the elevation (Z coordinate) of this DbGeometry value, if it represents a point. <returns>The elevation (Z coordinate) of this geometry value, if it represents a point; otherwise null.</returns> + The elevation (Z coordinate) of this DbGeometry value. + + + Gets the Measure (M coordinate) of this DbGeometry value, if it represents a point. <returns>The Measure (M coordinate) value of this geometry value, if it represents a point; otherwise null.</returns> + The Measure (M coordinate) of this DbGeometry value. + + + Gets a nullable double value that indicates the length of this DbGeometry value, which may be null if this value does not represent a curve. + The length of this DbGeometry value. + + + Gets a DbGeometry value representing the start point of this value, which may be null if this DbGeometry value does not represent a curve. + A DbGeometry value representing the start point of this value. + + + Gets a DbGeometry value representing the start point of this value, which may be null if this DbGeometry value does not represent a curve. + A DbGeometry value representing the start point of this value. + + + Gets a nullable Boolean value indicating whether this DbGeometry value is closed, which may be null if this value does not represent a curve. + True if this DbGeometry value is closed; otherwise, false. + + + Gets a nullable Boolean value indicating whether this DbGeometry value is a ring, which may be null if this value does not represent a curve. + True if this DbGeometry value is a ring; otherwise, false. + + + Gets the number of points in this DbGeometry value, if it represents a linestring or linear ring. <returns>The number of elements in this geometry value, if it represents a linestring or linear ring; otherwise null.</returns> + The number of points in this DbGeometry value. + + + Gets a nullable double value that indicates the area of this DbGeometry value, which may be null if this value does not represent a surface. + A nullable double value that indicates the area of this DbGeometry value. + + + Gets the DbGeometry value that represents the centroid of this DbGeometry value, which may be null if this value does not represent a surface. + The DbGeometry value that represents the centroid of this DbGeometry value. + + + Gets a point on the surface of this DbGeometry value, which may be null if this value does not represent a surface. + A point on the surface of this DbGeometry value. + + + Gets the DbGeometry value that represents the exterior ring of this DbGeometry value, which may be null if this value does not represent a polygon. + The DbGeometry value that represents the exterior ring of this DbGeometry value. + + + Gets the number of interior rings in this DbGeometry value, if it represents a polygon. <returns>The number of elements in this geometry value, if it represents a polygon; otherwise null.</returns> + The number of interior rings in this DbGeometry value. + + + + A data contract serializable representation of a value. + + + + Gets or sets the coordinate system identifier (SRID) of this value. + + + Gets or sets the well known text representation of this value. + + + Gets or sets the well known binary representation of this value. + + + + A provider-independent service API for geospatial (Geometry/Geography) type support. + + + + + When implemented in derived types, reads an instance of from the column at the specified column ordinal. + + The instance of DbGeography at the specified column value + The ordinal of the column that contains the geography value + + + + Asynchronously reads an instance of from the column at the specified column ordinal. + + + Providers should override with an appropriate implementation. + The default implementation invokes the synchronous method and returns + a completed task, blocking the calling thread. + + The ordinal of the column that contains the geography value. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the instance of at the specified column value. + + + + + When implemented in derived types, reads an instance of from the column at the specified column ordinal. + + The instance of DbGeometry at the specified column value + The ordinal of the data record column that contains the provider-specific geometry data + + + + Asynchronously reads an instance of from the column at the specified column ordinal. + + + Providers should override with an appropriate implementation. + The default implementation invokes the synchronous method and returns + a completed task, blocking the calling thread. + + The ordinal of the data record column that contains the provider-specific geometry data. + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the instance of at the specified column value. + + + + + Returns whether the column at the specified column ordinal is of geography type + + The column ordinal. + + true if the column at the specified column ordinal is of geography type; + false otherwise. + + + + + Returns whether the column at the specified column ordinal is of geometry type + + The column ordinal. + + true if the column at the specified column ordinal is of geometry type; + false otherwise. + + + + + A provider-independent service API for geospatial (Geometry/Geography) type support. + + + + + This method is intended for use by derived implementations of + + after suitable validation of the specified provider value to ensure it is suitable for use with the derived implementation. + + + A new instance that contains the specified providerValue and uses the specified spatialServices as its spatial implementation. + + + The spatial services instance that the returned value will depend on for its implementation of spatial functionality. + + The provider value. + + + + Creates a new value based on a provider-specific value that is compatible with this spatial services implementation. + + + A new value backed by this spatial services implementation and the specified provider value. + + A provider-specific value that this spatial services implementation is capable of interpreting as a geography value. + A new DbGeography value backed by this spatial services implementation and the specified provider value. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Creates a provider-specific value compatible with this spatial services implementation based on the specified well-known + + representation. + + A provider-specific value that encodes the information contained in wellKnownValue in a fashion compatible with this spatial services implementation. + + An instance of that contains the well-known representation of a geography value. + + + + + Creates an instance of that represents the specified + + value using one or both of the standard well-known spatial formats. + + + The well-known representation of geographyValue, as a new + + . + + The geography value. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Creates a new value based on the specified well-known binary value. + + + A new value as defined by the well-known binary value with the default + + coordinate system identifier (SRID) ( + + ). + + A byte array that contains a well-known binary representation of the geography value. + + + + Creates a new value based on the specified well-known binary value and coordinate system identifier (SRID). + + + A new value as defined by the well-known binary value with the specified coordinate system identifier (SRID) ( + + ). + + A byte array that contains a well-known binary representation of the geography value. + + The identifier of the coordinate system that the new value should use. + + + + + Creates a new line value based on the specified well-known binary value and coordinate system identifier (SRID). + + + A new value as defined by the well-known binary value with the specified coordinate system identifier (SRID) ( + + ). + + A byte array that contains a well-known binary representation of the geography value. + + The identifier of the coordinate system that the new value should use. + + + + + Creates a new point value based on the specified well-known binary value and coordinate system identifier (SRID). + + + A new value as defined by the well-known binary value with the specified coordinate system identifier (SRID) ( + + ). + + A byte array that contains a well-known binary representation of the geography value. + + The identifier of the coordinate system that the new value should use. + + + + + Creates a new polygon value based on the specified well-known binary value and coordinate system identifier (SRID). + + + A new value as defined by the well-known binary value with the specified coordinate system identifier (SRID) ( + + ). + + A byte array that contains a well-known binary representation of the geography value. + + The identifier of the coordinate system that the new value should use. + + + + + Creates a new multiline value based on the specified well-known binary value and coordinate system identifier. + + + The new multiline value. + + The well-known binary value. + The coordinate system identifier. + + + + Creates a new multipoint value based on the specified well-known binary value and coordinate system identifier. + + + A new multipoint value. + + The well-known binary value. + The coordinate system identifier. + + + + Creates a new multi polygon value based on the specified well-known binary value and coordinate system identifier. + + + A new multi polygon value. + + The well-known binary value. + The coordinate system identifier. + + + + Creates a new collection value based on the specified well-known binary value and coordinate system identifier (SRID). + + + A new value as defined by the well-known binary value with the specified coordinate system identifier (SRID) ( + + ). + + A byte array that contains a well-known binary representation of the geography value. + + The identifier of the coordinate system that the new value should use. + + + + + Creates a new value based on the specified well-known text value. + + + A new value as defined by the well-known text value with the default + + coordinate system identifier (SRID) ( + + ). + + A string that contains a well-known text representation of the geography value. + + + + Creates a new value based on the specified well-known text value and coordinate system identifier (SRID). + + + A new value as defined by the well-known text value with the specified coordinate system identifier (SRID) ( + + ). + + A string that contains a well-known text representation of the geography value. + + The identifier of the coordinate system that the new value should use. + + + + + Creates a new line value based on the specified well-known text value and coordinate system identifier (SRID). + + + A new value as defined by the well-known text value with the specified coordinate system identifier (SRID) ( + + ). + + A string that contains a well-known text representation of the geography value. + + The identifier of the coordinate system that the new value should use. + + + + + Creates a new point value based on the specified well-known text value and coordinate system identifier (SRID). + + + A new value as defined by the well-known text value with the specified coordinate system identifier (SRID) ( + + ). + + A string that contains a well-known text representation of the geography value. + + The identifier of the coordinate system that the new value should use. + + + + + Creates a new polygon value based on the specified well-known text value and coordinate system identifier (SRID). + + + A new value as defined by the well-known text value with the specified coordinate system identifier (SRID) ( + + ). + + A string that contains a well-known text representation of the geography value. + + The identifier of the coordinate system that the new value should use. + + + + + Creates a new multiline value based on the specified well-known text value and coordinate system identifier. + + + A new multiline value. + + The well-known text value. + The coordinate system identifier. + + + + Creates a new multipoint value based on the specified well-known text value and coordinate system identifier. + + + A new multipoint value. + + The well-known text value. + The coordinate system identifier. + + + + Creates a new multi polygon value based on the specified well-known text value and coordinate system identifier. + + + A new multi polygon value. + + The well-known text value. + The coordinate system identifier. + + + + Creates a new collection value based on the specified well-known text value and coordinate system identifier (SRID). + + + A new value as defined by the well-known text value with the specified coordinate system identifier (SRID) ( + + ). + + A string that contains a well-known text representation of the geography value. + + The identifier of the coordinate system that the new value should use. + + + + + Creates a new value based on the specified Geography Markup Language (GML) value. + + + A new value as defined by the GML value with the default + + coordinate system identifier (SRID) ( + + ). + + A string that contains a Geometry Markup Language (GML) representation of the geography value. + + + + Creates a new value based on the specified Geography Markup Language (GML) value and coordinate system identifier (SRID). + + + A new value as defined by the GML value with the specified coordinate system identifier (SRID). + + A string that contains a Geometry Markup Language (GML) representation of the geography value. + + The identifier of the coordinate system that the new value should use. + + + + + Returns the coordinate system identifier of the given value. + + + The coordinate system identifier of the given value. + + The geography value. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Gets the dimension of the given value or, if the value is a collections, the largest element dimension. + + + The dimension of geographyValue, or the largest element dimension if + + is a collection. + + The geography value for which the dimension value should be retrieved. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a value that indicates the spatial type name of the given + + value. + + + The spatial type name of the given value. + + The geography value. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a nullable Boolean value that whether the given value is empty. + + + True if the given value is empty; otherwise, false. + + The geography value. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Gets the well-known text representation of the given value. This value should include only the Longitude and Latitude of points. + + A string containing the well-known text representation of geographyValue. + The geography value for which the well-known text should be generated. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a text representation of with elevation and measure. + + + A text representation of . + + The geography value. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Gets the well-known binary representation of the given value. + + + The well-known binary representation of the given value. + + The geography value for which the well-known binary should be generated. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Generates the Geography Markup Language (GML) representation of this + + value. + + A string containing the GML representation of this DbGeography value. + The geography value for which the GML should be generated. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Determines whether the two given values are spatially equal. + + true if geographyValue is spatially equal to otherGeography; otherwise false. + The first geography value to compare for equality. + The second geography value to compare for equality. + + + or + + is null. + + + + or + + is not compatible with this spatial services implementation. + + + + + Determines whether the two given values are spatially disjoint. + + true if geographyValue is disjoint from otherGeography; otherwise false. + The first geography value to compare for disjointness. + The second geography value to compare for disjointness. + + + or + + is null. + + + + or + + is not compatible with this spatial services implementation. + + + + + Determines whether the two given values spatially intersect. + + true if geographyValue intersects otherGeography; otherwise false. + The first geography value to compare for intersection. + The second geography value to compare for intersection. + + + or + + is null. + + + + or + + is not compatible with this spatial services implementation. + + + + + Creates a geography value representing all points less than or equal to distance from the given + + value. + + A new DbGeography value representing all points less than or equal to distance from geographyValue. + The geography value. + A double value specifying how far from geographyValue to buffer. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Computes the distance between the closest points in two values. + + A double value that specifies the distance between the two closest points in geographyValue and otherGeography. + The first geography value. + The second geography value. + + + or + + is null. + + + + or + + is not compatible with this spatial services implementation. + + + + + Computes the intersection of two values. + + + A new value representing the intersection of geographyValue and otherGeography. + + The first geography value. + The second geography value. + + + or + + is null. + + + + or + + is not compatible with this spatial services implementation. + + + + + Computes the union of two values. + + + A new value representing the union of geographyValue and otherGeography. + + The first geography value. + The second geography value. + + + or + + is null. + + + + or + + is not compatible with this spatial services implementation. + + + + + Computes the difference of two values. + + A new DbGeography value representing the difference of geographyValue and otherGeography. + The first geography value. + The second geography value. + + + or + + is null. + + + + or + + is not compatible with this spatial services implementation. + + + + + Computes the symmetric difference of two values. + + + A new value representing the symmetric difference of geographyValue and otherGeography. + + The first geography value. + The second geography value. + + + or + + is null. + + + + or + + is not compatible with this spatial services implementation. + + + + + Returns the number of elements in the given value, if it represents a geography collection. + + The number of elements in geographyValue, if it represents a collection of other geography values; otherwise null. + The geography value, which need not represent a geography collection. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns an element of the given value, if it represents a geography collection. + + The element in geographyValue at position index, if it represents a collection of other geography values; otherwise null. + The geography value, which need not represent a geography collection. + The position within the geography value from which the element should be taken. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns the Latitude coordinate of the given value, if it represents a point. + + + The Latitude coordinate of the given value. + + The geography value, which need not represent a point. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns the Longitude coordinate of the given value, if it represents a point. + + + The Longitude coordinate of the given value. + + The geography value, which need not represent a point. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns the elevation (Z coordinate) of the given value, if it represents a point. + + The elevation (Z coordinate) of geographyValue, if it represents a point; otherwise null. + The geography value, which need not represent a point. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns the M (Measure) coordinate of the given value, if it represents a point. + + + The M (Measure) coordinate of the given value. + + The geography value, which need not represent a point. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a nullable double value that indicates the length of the given + + value, which may be null if the value does not represent a curve. + + + The length of the given value. + + The geography value, which need not represent a curve. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a value that represents the start point of the given DbGeography value, which may be null if the value does not represent a curve. + + + The start point of the given value. + + The geography value, which need not represent a curve. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a value that represents the end point of the given DbGeography value, which may be null if the value does not represent a curve. + + The end point of geographyValue, if it represents a curve; otherwise null. + The geography value, which need not represent a curve. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a nullable Boolean value that whether the given value is closed, which may be null if the value does not represent a curve. + + + True if the given value is closed; otherwise, false. + + The geography value, which need not represent a curve. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns the number of points in the given value, if it represents a linestring or linear ring. + + + The number of points in the given value. + + The geography value, which need not represent a linestring or linear ring. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a point element of the given value, if it represents a linestring or linear ring. + + The point in geographyValue at position index, if it represents a linestring or linear ring; otherwise null. + The geography value, which need not represent a linestring or linear ring. + The position within the geography value from which the element should be taken. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a nullable double value that indicates the area of the given + + value, which may be null if the value does not represent a surface. + + + A nullable double value that indicates the area of the given value. + + The geography value, which need not represent a surface. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + This method is intended for use by derived implementations of + + after suitable validation of the specified provider value to ensure it is suitable for use with the derived implementation. + + + A new instance that contains the specified providerValue and uses the specified spatialServices as its spatial implementation. + + + The spatial services instance that the returned value will depend on for its implementation of spatial functionality. + + A provider value. + + + + Creates a provider-specific value compatible with this spatial services implementation based on the specified well-known + + representation. + + A provider-specific value that encodes the information contained in wellKnownValue in a fashion compatible with this spatial services implementation. + + An instance of that contains the well-known representation of a geometry value. + + + + + Creates an instance of that represents the specified + + value using one or both of the standard well-known spatial formats. + + + The well-known representation of geometryValue, as a new + + . + + The geometry value. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Creates a new value based on a provider-specific value that is compatible with this spatial services implementation. + + + A new value backed by this spatial services implementation and the specified provider value. + + A provider-specific value that this spatial services implementation is capable of interpreting as a geometry value. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Creates a new value based on the specified well-known binary value. + + + A new value as defined by the well-known binary value with the default + + coordinate system identifier (SRID) ( + + ). + + A byte array that contains a well-known binary representation of the geometry value. + + + + Creates a new value based on the specified well-known binary value and coordinate system identifier (SRID). + + + A new value as defined by the well-known binary value with the specified coordinate system identifier (SRID) ( + + ). + + A byte array that contains a well-known binary representation of the geometry value. + + The identifier of the coordinate system that the new value should use. + + + + + Creates a new line value based on the specified well-known binary value and coordinate system identifier (SRID). + + + A new value as defined by the well-known binary value with the specified coordinate system identifier (SRID) ( + + ). + + A byte array that contains a well-known binary representation of the geometry value. + + The identifier of the coordinate system that the new value should use. + + + + + Creates a new point value based on the specified well-known binary value and coordinate system identifier (SRID). + + + A new value as defined by the well-known binary value with the specified coordinate system identifier (SRID) ( + + ). + + A byte array that contains a well-known binary representation of the geometry value. + + The identifier of the coordinate system that the new value should use. + + + + + Creates a new polygon value based on the specified well-known binary value and coordinate system identifier (SRID). + + + A new value as defined by the well-known binary value with the specified coordinate system identifier (SRID) ( + + ). + + A byte array that contains a well-known binary representation of the geometry value. + + The identifier of the coordinate system that the new value should use. + + + + + Creates a new multiline value based on the specified well-known binary value and coordinate system identifier. + + + The new multiline value + + The well-known binary value. + The coordinate system identifier. + + + + Creates a new multipoint value based on the specified well-known binary value and coordinate system identifier. + + + A new multipoint value. + + The well-known binary value. + The coordinate system identifier. + + + + Creates a new multi polygon value based on the specified well-known binary value and coordinate system identifier. + + + A new multi polygon value. + + The well-known binary value. + The coordinate system identifier. + + + + Creates a new collection value based on the specified well-known binary value and coordinate system identifier (SRID). + + + A new value as defined by the well-known binary value with the specified coordinate system identifier (SRID) ( + + ). + + A byte array that contains a well-known binary representation of the geometry value. + + The identifier of the coordinate system that the new value should use. + + + + + Creates a new value based on the specified well-known text value. + + + A new value as defined by the well-known text value with the default + + coordinate system identifier (SRID) ( + + ). + + A string that contains a well-known text representation of the geometry value. + + + + Creates a new value based on the specified well-known text value and coordinate system identifier (SRID). + + + A new value as defined by the well-known text value with the specified coordinate system identifier (SRID) ( + + ). + + A string that contains a well-known text representation of the geometry value. + + The identifier of the coordinate system that the new value should use. + + + + + Creates a new line value based on the specified well-known text value and coordinate system identifier (SRID). + + + A new value as defined by the well-known text value with the specified coordinate system identifier (SRID) ( + + ). + + A string that contains a well-known text representation of the geometry value. + + The identifier of the coordinate system that the new value should use. + + + + + Creates a new point value based on the specified well-known text value and coordinate system identifier (SRID). + + + A new value as defined by the well-known text value with the specified coordinate system identifier (SRID) ( + + ). + + A string that contains a well-known text representation of the geometry value. + + The identifier of the coordinate system that the new value should use. + + + + + Creates a new polygon value based on the specified well-known text value and coordinate system identifier (SRID). + + + A new value as defined by the well-known text value with the specified coordinate system identifier (SRID) ( + + ). + + A string that contains a well-known text representation of the geometry value. + + The identifier of the coordinate system that the new value should use. + + + + + Creates a new multiline value based on the specified well-known text value and coordinate system identifier. + + + A new multiline value + + The well-known text value. + The coordinate system identifier. + + + + Creates a new multipoint value based on the specified well-known text value and coordinate system identifier. + + + A new multipoint value. + + The well-known text value. + The coordinate system identifier. + + + + Creates a new multi polygon value based on the specified well-known text value and coordinate system identifier. + + + A new multi polygon value. + + The well-known text value. + The coordinate system identifier. + + + + Creates a new collection value based on the specified well-known text value and coordinate system identifier (SRID). + + + A new value as defined by the well-known text value with the specified coordinate system identifier (SRID) ( + + ). + + A string that contains a well-known text representation of the geometry value. + + The identifier of the coordinate system that the new value should use. + + + + + Creates a new value based on the specified Geography Markup Language (GML) value. + + + A new value as defined by the GML value with the default + + coordinate system identifier (SRID) ( + + ). + + A string that contains a Geography Markup Language (GML) representation of the geometry value. + + + + Creates a new value based on the specified Geography Markup Language (GML) value and coordinate system identifier (SRID). + + + A new value as defined by the GML value with the specified coordinate system identifier (SRID). + + A string that contains a Geography Markup Language (GML) representation of the geometry value. + + The identifier of the coordinate system that the new value should use. + + + + + Returns the coordinate system identifier of the given value. + + + The coordinate system identifier of the given value. + + The geometry value. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a nullable double value that indicates the boundary of the given + + value. + + + The boundary of the given value. + + The geometry value. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Gets the dimension of the given value or, if the value is a collections, the largest element dimension. + + + The dimension of geometryValue, or the largest element dimension if + + is a collection. + + The geometry value for which the dimension value should be retrieved. + + + + Gets the envelope (minimum bounding box) of the given value, as a geometry value. + + + The envelope of geometryValue, as a value. + + The geometry value for which the envelope value should be retrieved. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a value that indicates the spatial type name of the given + + value. + + + The spatial type name of the given value. + + The geometry value. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a nullable Boolean value that whether the given value is empty. + + + True if the given value is empty; otherwise, false. + + The geometry value. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a nullable Boolean value that whether the given value is simple. + + + True if the given value is simple; otherwise, false. + + The geometry value. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a nullable Boolean value that whether the given value is valid. + + + True if the given value is valid; otherwise, false. + + The geometry value. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Gets the well-known text representation of the given value, including only X and Y coordinates for points. + + A string containing the well-known text representation of geometryValue. + The geometry value for which the well-known text should be generated. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a text representation of with elevation and measure. + + + A text representation of with elevation and measure. + + The geometry value. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Gets the well-known binary representation of the given value. + + + The well-known binary representation of the given value. + + The geometry value for which the well-known binary should be generated. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Generates the Geography Markup Language (GML) representation of this + + value. + + A string containing the GML representation of this DbGeometry value. + The geometry value for which the GML should be generated. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Determines whether the two given values are spatially equal. + + true if geometryValue is spatially equal to otherGeometry; otherwise false. + The first geometry value to compare for equality. + The second geometry value to compare for equality. + + + or + + is null. + + + + or + + is not compatible with this spatial services implementation. + + + + + Determines whether the two given values are spatially disjoint. + + true if geometryValue is disjoint from otherGeometry; otherwise false. + The first geometry value to compare for disjointness. + The second geometry value to compare for disjointness. + + + or + + is null. + + + + or + + is not compatible with this spatial services implementation. + + + + + Determines whether the two given values spatially intersect. + + true if geometryValue intersects otherGeometry; otherwise false. + The first geometry value to compare for intersection. + The second geometry value to compare for intersection. + + + or + + is null. + + + + or + + is not compatible with this spatial services implementation. + + + + + Determines whether the two given values spatially touch. + + true if geometryValue touches otherGeometry; otherwise false. + The first geometry value. + The second geometry value. + + + or + + is null. + + + + or + + is not compatible with this spatial services implementation. + + + + + Determines whether the two given values spatially cross. + + true if geometryValue crosses otherGeometry; otherwise false. + The first geometry value. + The second geometry value. + + + or + + is null. + + + + or + + is not compatible with this spatial services implementation. + + + + + Determines whether one value is spatially within the other. + + true if geometryValue is within otherGeometry; otherwise false. + The first geometry value. + The second geometry value. + + + or + + is null. + + + + or + + is not compatible with this spatial services implementation. + + + + + Determines whether one value spatially contains the other. + + true if geometryValue contains otherGeometry; otherwise false. + The first geometry value. + The second geometry value. + + + or + + is null. + + + + or + + is not compatible with this spatial services implementation. + + + + + Determines whether the two given values spatially overlap. + + true if geometryValue overlaps otherGeometry; otherwise false. + The first geometry value. + The second geometry value. + + + or + + is null. + + + + or + + is not compatible with this spatial services implementation. + + + + + Determines whether the two given values are spatially related according to the given Dimensionally Extended Nine-Intersection Model (DE-9IM) intersection pattern. + + true if this geometryValue value relates to otherGeometry according to the specified intersection pattern matrix; otherwise false. + The first geometry value. + The geometry value that should be compared with the first geometry value for relation. + A string that contains the text representation of the (DE-9IM) intersection pattern that defines the relation. + + + , + + or + + is null. + + + + or + + is not compatible with this spatial services implementation. + + + + + Creates a geometry value representing all points less than or equal to distance from the given + + value. + + A new DbGeometry value representing all points less than or equal to distance from geometryValue. + The geometry value. + A double value specifying how far from geometryValue to buffer. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Computes the distance between the closest points in two values. + + A double value that specifies the distance between the two closest points in geometryValue and otherGeometry. + The first geometry value. + The second geometry value. + + + or + + is null. + + + + or + + is not compatible with this spatial services implementation. + + + + + Returns a nullable double value that indicates the convex hull of the given + + value. + + + The convex hull of the given value. + + The geometry value. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Computes the intersection of two values. + + + A new value representing the intersection of geometryValue and otherGeometry. + + The first geometry value. + The second geometry value. + + + or + + is null. + + + + or + + is not compatible with this spatial services implementation. + + + + + Computes the union of two values. + + + A new value representing the union of geometryValue and otherGeometry. + + The first geometry value. + The second geometry value. + + + or + + is null. + + + + or + + is not compatible with this spatial services implementation. + + + + + Computes the difference between two values. + + A new DbGeometry value representing the difference between geometryValue and otherGeometry. + The first geometry value. + The second geometry value. + + + or + + is null. + + + + or + + is not compatible with this spatial services implementation. + + + + + Computes the symmetric difference between two values. + + + A new value representing the symmetric difference between geometryValue and otherGeometry. + + The first geometry value. + The second geometry value. + + + or + + is null. + + + + or + + is not compatible with this spatial services implementation. + + + + + Returns the number of elements in the given value, if it represents a geometry collection. + + The number of elements in geometryValue, if it represents a collection of other geometry values; otherwise null. + The geometry value, which need not represent a geometry collection. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns an element of the given value, if it represents a geometry collection. + + The element in geometryValue at position index, if it represents a collection of other geometry values; otherwise null. + The geometry value, which need not represent a geometry collection. + The position within the geometry value from which the element should be taken. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns the X coordinate of the given value, if it represents a point. + + + The X coordinate of the given value. + + The geometry value, which need not represent a point. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns the Y coordinate of the given value, if it represents a point. + + + The Y coordinate of the given value. + + The geometry value, which need not represent a point. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns the elevation (Z) of the given value, if it represents a point. + + The elevation (Z) of geometryValue, if it represents a point; otherwise null. + The geometry value, which need not represent a point. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns the M (Measure) coordinate of the given value, if it represents a point. + + + The M (Measure) coordinate of the given value. + + The geometry value, which need not represent a point. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a nullable double value that indicates the length of the given + + value, which may be null if the value does not represent a curve. + + + The length of the given value. + + The geometry value, which need not represent a curve. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a value that represents the start point of the given DbGeometry value, which may be null if the value does not represent a curve. + + + The start point of the given value. + + The geometry value, which need not represent a curve. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a value that represents the end point of the given DbGeometry value, which may be null if the value does not represent a curve. + + The end point of geometryValue, if it represents a curve; otherwise null. + The geometry value, which need not represent a curve. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a nullable Boolean value that whether the given value is closed, which may be null if the value does not represent a curve. + + + True if the given value is closed; otherwise, false. + + The geometry value, which need not represent a curve. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a nullable Boolean value that whether the given value is a ring, which may be null if the value does not represent a curve. + + + True if the given value is a ring; otherwise, false. + + The geometry value, which need not represent a curve. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns the number of points in the given value, if it represents a linestring or linear ring. + + + The number of points in the given value. + + The geometry value, which need not represent a linestring or linear ring. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a point element of the given value, if it represents a linestring or linear ring. + + The point in geometryValue at position index, if it represents a linestring or linear ring; otherwise null. + The geometry value, which need not represent a linestring or linear ring. + The position within the geometry value from which the element should be taken. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a nullable double value that indicates the area of the given + + value, which may be null if the value does not represent a surface. + + + A nullable double value that indicates the area of the given value. + + The geometry value, which need not represent a surface. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a value that represents the centroid of the given DbGeometry value, which may be null if the value does not represent a surface. + + The centroid of geometryValue, if it represents a surface; otherwise null. + The geometry value, which need not represent a surface. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a value that represents a point on the surface of the given DbGeometry value, which may be null if the value does not represent a surface. + + + A value that represents a point on the surface of the given DbGeometry value. + + The geometry value, which need not represent a surface. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns a value that represents the exterior ring of the given DbGeometry value, which may be null if the value does not represent a polygon. + + A DbGeometry value representing the exterior ring on geometryValue, if it represents a polygon; otherwise null. + The geometry value, which need not represent a polygon. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns the number of interior rings in the given value, if it represents a polygon. + + The number of elements in geometryValue, if it represents a polygon; otherwise null. + The geometry value, which need not represent a polygon. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Returns an interior ring from the given value, if it represents a polygon. + + The interior ring in geometryValue at position index, if it represents a polygon; otherwise null. + The geometry value, which need not represent a polygon. + The position within the geometry value from which the element should be taken. + + + is null. + + + + is not compatible with this spatial services implementation. + + + + + Gets the default services for the . + + The default services. + + + + Override this property to allow the spatial provider to fail fast when native types or other + resources needed for the spatial provider to function correctly are not available. + The default value is true which means that EF will continue with the assumption + that the provider has the necessary types/resources rather than failing fast. + + + + + The same as but works in partial trust and adds explicit caching of + generated indentation string and also recognizes writing a string that contains just \r\n or \n as a write-line to ensure + we indent the next line properly. + + + + + Specifies the default tab string. This field is constant. + + + + + Specifies the culture what will be used by the underlying TextWriter. This static property is read-only. + Note that any writer passed to one of the constructors of must use this + same culture. The culture is . + + + + + Initializes a new instance of the IndentedTextWriter class using the specified text writer and default tab string. + Note that the writer passed to this constructor must use the specified by the + property. + + + The to use for output. + + + + + Initializes a new instance of the IndentedTextWriter class using the specified text writer and tab string. + Note that the writer passed to this constructor must use the specified by the + property. + + + The to use for output. + + The tab string to use for indentation. + + + + Closes the document being written to. + + + + + Flushes the stream. + + + + + Outputs the tab string once for each level of indentation according to the + + property. + + + + + Builds a string representing the current indentation level for a new line. + + + Does NOT check if tabs are currently pending, just returns a string that would be + useful in replacing embedded newline characters. + + An empty string, or a string that contains .Indent level's worth of specified tab-string. + + + + Writes the specified string to the text stream. + + The string to write. + + + + Writes the text representation of a Boolean value to the text stream. + + The Boolean value to write. + + + + Writes a character to the text stream. + + The character to write. + + + + Writes a character array to the text stream. + + The character array to write. + + + + Writes a subarray of characters to the text stream. + + The character array to write data from. + Starting index in the buffer. + The number of characters to write. + + + + Writes the text representation of a Double to the text stream. + + The double to write. + + + + Writes the text representation of a Single to the text stream. + + The single to write. + + + + Writes the text representation of an integer to the text stream. + + The integer to write. + + + + Writes the text representation of an 8-byte integer to the text stream. + + The 8-byte integer to write. + + + + Writes the text representation of an object to the text stream. + + The object to write. + + + + Writes out a formatted string, using the same semantics as specified. + + The formatting string. + The object to write into the formatted string. + + + + Writes out a formatted string, using the same semantics as specified. + + The formatting string to use. + The first object to write into the formatted string. + The second object to write into the formatted string. + + + + Writes out a formatted string, using the same semantics as specified. + + The formatting string to use. + The argument array to output. + + + + Writes the specified string to a line without tabs. + + The string to write. + + + + Writes the specified string, followed by a line terminator, to the text stream. + + The string to write. + + + + Writes a line terminator. + + + + + Writes the text representation of a Boolean, followed by a line terminator, to the text stream. + + The Boolean to write. + + + + Writes a character, followed by a line terminator, to the text stream. + + The character to write. + + + + Writes a character array, followed by a line terminator, to the text stream. + + The character array to write. + + + + Writes a subarray of characters, followed by a line terminator, to the text stream. + + The character array to write data from. + Starting index in the buffer. + The number of characters to write. + + + + Writes the text representation of a Double, followed by a line terminator, to the text stream. + + The double to write. + + + + Writes the text representation of a Single, followed by a line terminator, to the text stream. + + The single to write. + + + + Writes the text representation of an integer, followed by a line terminator, to the text stream. + + The integer to write. + + + + Writes the text representation of an 8-byte integer, followed by a line terminator, to the text stream. + + The 8-byte integer to write. + + + + Writes the text representation of an object, followed by a line terminator, to the text stream. + + The object to write. + + + + Writes out a formatted string, followed by a line terminator, using the same semantics as specified. + + The formatting string. + The object to write into the formatted string. + + + + Writes out a formatted string, followed by a line terminator, using the same semantics as specified. + + The formatting string to use. + The first object to write into the formatted string. + The second object to write into the formatted string. + + + + Writes out a formatted string, followed by a line terminator, using the same semantics as specified. + + The formatting string to use. + The argument array to output. + + + + Writes the text representation of a UInt32, followed by a line terminator, to the text stream. + + A UInt32 to output. + + + + Gets the encoding for the text writer to use. + + + An that indicates the encoding for the text writer to use. + + + + + Gets or sets the new line character to use. + + The new line character to use. + + + + Gets or sets the number of spaces to indent. + + The number of spaces to indent. + + + + Gets the to use. + + + The to use. + + + + + Convention to apply column ordering specified via + + or the API. This convention throws if a duplicate configured column order + is detected. + + + + + Convention to apply column ordering specified via + + or the API. + + + + + + + + Validates the ordering configuration supplied for columns. + This base implementation is a no-op. + + The name of the table that the columns belong to. + The definition of the table. + + + + Validates the ordering configuration supplied for columns to ensure + that the same ordinal was not supplied for two columns. + + The name of the table that the columns belong to. + The definition of the table. + + + + Represents a conceptual or store model. This class can be used to access information about the shape of the model + and the way the that it has been configured. + + + + + Adds an association type to the model. + + The AssociationType instance to be added. + + + + Adds a complex type to the model. + + The ComplexType instance to be added. + + + + Adds an entity type to the model. + + The EntityType instance to be added. + + + + Adds an enumeration type to the model. + + The EnumType instance to be added. + + + + Adds a function to the model. + + The EdmFunction instance to be added. + + + + Removes an association type from the model. + + The AssociationType instance to be removed. + + + + Removes a complex type from the model. + + The ComplexType instance to be removed. + + + + Removes an entity type from the model. + + The EntityType instance to be removed. + + + + Removes an enumeration type from the model. + + The EnumType instance to be removed. + + + + Removes a function from the model. + + The EdmFunction instance to be removed. + + + Gets the built-in type kind for this type. + + A object that represents the built-in type kind for this type. + + + + + Gets the data space associated with the model, which indicates whether + it is a conceptual model (DataSpace.CSpace) or a store model (DataSpace.SSpace). + + + + + Gets the association types in the model. + + + + + Gets the complex types in the model. + + + + + Gets the entity types in the model. + + + + + Gets the enum types in the model. + + + + + Gets the functions in the model. + + + + + Gets the container that stores entity and association sets, and function imports. + + + + Gets the global items associated with the model. + The global items associated with the model. + + + + An implementation of IDatabaseInitializer that will recreate and optionally re-seed the + database only if the database does not exist. + To seed the database, create a derived class and override the Seed method. + + The type of the context. + + + Initializes a new instance of the class. + + + + Executes the strategy to initialize the database for the given context. + + The context. + + + + A method that should be overridden to actually add data to the context for seeding. + The default implementation does nothing. + + The context to seed. + + + + An instance of this class is obtained from an object and can be used + to manage the actual database backing a DbContext or connection. + This includes creating, deleting, and checking for the existence of a database. + Note that deletion and checking for existence of a database can be performed using just a + connection (i.e. without a full context) by using the static methods of this class. + + + + + Enables the user to pass in a database transaction created outside of the object + if you want the Entity Framework to execute commands within that external transaction. + Alternatively, pass in null to clear the framework's knowledge of that transaction. + + the external transaction + Thrown if the transaction is already completed + + Thrown if the connection associated with the object is already enlisted in a + + transaction + + + Thrown if the connection associated with the object is already participating in a transaction + + Thrown if the connection associated with the transaction does not match the Entity Framework's connection + + + + Begins a transaction on the underlying store connection + + + a object wrapping access to the underlying store's transaction object + + + + + Begins a transaction on the underlying store connection using the specified isolation level + + The database isolation level with which the underlying store transaction will be created + + a object wrapping access to the underlying store's transaction object + + + + + Sets the database initializer to use for the given context type. The database initializer is called when a + the given type is used to access a database for the first time. + The default strategy for Code First contexts is an instance of . + + The type of the context. + The initializer to use, or null to disable initialization for the given context type. + + + + Runs the the registered on this context. + If "force" is set to true, then the initializer is run regardless of whether or not it + has been run before. This can be useful if a database is deleted while an app is running + and needs to be reinitialized. + If "force" is set to false, then the initializer is only run if it has not already been + run for this context, model, and connection in this app domain. This method is typically + used when it is necessary to ensure that the database has been created and seeded + before starting some operation where doing so lazily will cause issues, such as when the + operation is part of a transaction. + + + If set to true the initializer is run even if it has already been run. + + + + + Checks whether or not the database is compatible with the the current Code First model. + + + Model compatibility currently uses the following rules. + If the context was created using either the Model First or Database First approach then the + model is assumed to be compatible with the database and this method returns true. + For Code First the model is considered compatible if the model is stored in the database + in the Migrations history table and that model has no differences from the current model as + determined by Migrations model differ. + If the model is not stored in the database but an EF 4.1/4.2 model hash is found instead, + then this is used to check for compatibility. + + + If set to true then an exception will be thrown if no model metadata is found in the database. If set to false then this method will return true if metadata is not found. + + True if the model hash in the context and the database match; false otherwise. + + + + Creates a new database on the database server for the model defined in the backing context. + Note that calling this method before the database initialization strategy has run will disable + executing that strategy. + + + + + Creates a new database on the database server for the model defined in the backing context, but only + if a database with the same name does not already exist on the server. + + True if the database did not exist and was created; false otherwise. + + + + Checks whether or not the database exists on the server. + + True if the database exists; false otherwise. + + + + Deletes the database on the database server if it exists, otherwise does nothing. + Calling this method from outside of an initializer will mark the database as having + not been initialized. This means that if an attempt is made to use the database again + after it has been deleted, then any initializer set will run again and, usually, will + try to create the database again automatically. + + True if the database did exist and was deleted; false otherwise. + + + + Checks whether or not the database exists on the server. + The connection to the database is created using the given database name or connection string + in the same way as is described in the documentation for the class. + + The database name or a connection string to the database. + True if the database exists; false otherwise. + + + + Deletes the database on the database server if it exists, otherwise does nothing. + The connection to the database is created using the given database name or connection string + in the same way as is described in the documentation for the class. + + The database name or a connection string to the database. + True if the database did exist and was deleted; false otherwise. + + + + Checks whether or not the database exists on the server. + + An existing connection to the database. + True if the database exists; false otherwise. + + + + Deletes the database on the database server if it exists, otherwise does nothing. + + An existing connection to the database. + True if the database did exist and was deleted; false otherwise. + + + + Creates a raw SQL query that will return elements of the given generic type. + The type can be any type that has properties that match the names of the columns returned + from the query, or can be a simple primitive type. The type does not have to be an + entity type. The results of this query are never tracked by the context even if the + type of object returned is an entity type. Use the + method to return entities that are tracked by the context. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.Database.SqlQuery<Post>("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.Database.SqlQuery<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + The type of object returned by the query. + The SQL query string. + + The parameters to apply to the SQL query string. If output parameters are used, their values will + not be available until the results have been read completely. This is due to the underlying behavior + of DbDataReader, see http://go.microsoft.com/fwlink/?LinkID=398589 for more details. + + + A object that will execute the query when it is enumerated. + + + + + Creates a raw SQL query that will return elements of the given type. + The type can be any type that has properties that match the names of the columns returned + from the query, or can be a simple primitive type. The type does not have to be an + entity type. The results of this query are never tracked by the context even if the + type of object returned is an entity type. Use the + method to return entities that are tracked by the context. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.Database.SqlQuery(typeof(Post), "SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.Database.SqlQuery(typeof(Post), "SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + The type of object returned by the query. + The SQL query string. + + The parameters to apply to the SQL query string. If output parameters are used, their values + will not be available until the results have been read completely. This is due to the underlying + behavior of DbDataReader, see http://go.microsoft.com/fwlink/?LinkID=398589 for more details. + + + A object that will execute the query when it is enumerated. + + + + + Executes the given DDL/DML command against the database. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.Database.ExecuteSqlCommand("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.Database.ExecuteSqlCommand("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + + If there isn't an existing local or ambient transaction a new transaction will be used + to execute the command. + + The command string. + The parameters to apply to the command string. + The result returned by the database after executing the command. + + + + Executes the given DDL/DML command against the database. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.Database.ExecuteSqlCommand("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.Database.ExecuteSqlCommand("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + Controls the creation of a transaction for this command. + The command string. + The parameters to apply to the command string. + The result returned by the database after executing the command. + + + + Asynchronously executes the given DDL/DML command against the database. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.Database.ExecuteSqlCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.Database.ExecuteSqlCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + If there isn't an existing local transaction a new transaction will be used + to execute the command. + + The command string. + The parameters to apply to the command string. + + A task that represents the asynchronous operation. + The task result contains the result returned by the database after executing the command. + + + + + Asynchronously executes the given DDL/DML command against the database. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.Database.ExecuteSqlCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.Database.ExecuteSqlCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + Controls the creation of a transaction for this command. + The command string. + The parameters to apply to the command string. + + A task that represents the asynchronous operation. + The task result contains the result returned by the database after executing the command. + + + + + Asynchronously executes the given DDL/DML command against the database. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.Database.ExecuteSqlCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.Database.ExecuteSqlCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + If there isn't an existing local transaction a new transaction will be used + to execute the command. + + The command string. + + A to observe while waiting for the task to complete. + + The parameters to apply to the command string. + + A task that represents the asynchronous operation. + The task result contains the result returned by the database after executing the command. + + + + + Asynchronously executes the given DDL/DML command against the database. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.Database.ExecuteSqlCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.Database.ExecuteSqlCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + Controls the creation of a transaction for this command. + The command string. + + A to observe while waiting for the task to complete. + + The parameters to apply to the command string. + + A task that represents the asynchronous operation. + The task result contains the result returned by the database after executing the command. + + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Gets the transaction the underlying store connection is enlisted in. May be null. + + + + + Returns the connection being used by this context. This may cause the + connection to be created if it does not already exist. + + Thrown if the context has been disposed. + + + + The connection factory to use when creating a from just + a database name or a connection string. + + + This is used when just a database name or connection string is given to or when + the no database name or connection is given to DbContext in which case the name of + the context class is passed to this factory in order to generate a DbConnection. + By default, the instance to use is read from the application's .config + file from the "EntityFramework DefaultConnectionFactory" entry in appSettings. If no entry is found in + the config file then is used. Setting this property in code + always overrides whatever value is found in the config file. + + + + + Gets or sets the timeout value, in seconds, for all context operations. + The default value is null, where null indicates that the default value of the underlying + provider will be used. + + + The timeout, in seconds, or null to use the provider default. + + + + + Set this property to log the SQL generated by the to the given + delegate. For example, to log to the console, set this property to . + + + The format of the log text can be changed by creating a new formatter that derives from + and setting it with . + For more low-level control over logging/interception see and + . + + + + + DbModelBuilder is used to map CLR classes to a database schema. + This code centric approach to building an Entity Data Model (EDM) model is known as 'Code First'. + + + DbModelBuilder is typically used to configure a model by overriding + DbContext.OnModelCreating(DbModelBuilder) + . + You can also use DbModelBuilder independently of DbContext to build a model and then construct a + or . + The recommended approach, however, is to use OnModelCreating in as + the workflow is more intuitive and takes care of common tasks, such as caching the created model. + Types that form your model are registered with DbModelBuilder and optional configuration can be + performed by applying data annotations to your classes and/or using the fluent style DbModelBuilder + API. + When the Build method is called a set of conventions are run to discover the initial model. + These conventions will automatically discover aspects of the model, such as primary keys, and + will also process any data annotations that were specified on your classes. Finally + any configuration that was performed using the DbModelBuilder API is applied. + Configuration done via the DbModelBuilder API takes precedence over data annotations which + in turn take precedence over the default conventions. + + + + + Initializes a new instance of the class. + The process of discovering the initial model will use the set of conventions included + in the most recent version of the Entity Framework installed on your machine. + + + Upgrading to newer versions of the Entity Framework may cause breaking changes + in your application because new conventions may cause the initial model to be + configured differently. There is an alternate constructor that allows a specific + version of conventions to be specified. + + + + + Initializes a new instance of the class that will use + a specific set of conventions to discover the initial model. + + The version of conventions to be used. + + + + Excludes a type from the model. This is used to remove types from the model that were added + by convention during initial model discovery. + + The type to be excluded. + The same DbModelBuilder instance so that multiple calls can be chained. + + + + Configures the default database schema name. This default database schema name is used + for database objects that do not have an explicitly configured schema name. + + The name of the default database schema. + The same DbModelBuilder instance so that multiple calls can be chained. + + + + Excludes the specified type(s) from the model. This is used to remove types from the model that were added + by convention during initial model discovery. + + The types to be excluded from the model. + The same DbModelBuilder instance so that multiple calls can be chained. + + + + Registers an entity type as part of the model and returns an object that can be used to + configure the entity. This method can be called multiple times for the same entity to + perform multiple lines of configuration. + + The type to be registered or configured. + The configuration object for the specified entity type. + + + + Registers an entity type as part of the model. + + The type to be registered. + + This method is provided as a convenience to allow entity types to be registered dynamically + without the need to use MakeGenericMethod in order to call the normal generic Entity method. + This method does not allow further configuration of the entity type using the fluent APIs since + these APIs make extensive use of generic type parameters. + + + + + Registers a type as a complex type in the model and returns an object that can be used to + configure the complex type. This method can be called multiple times for the same type to + perform multiple lines of configuration. + + The type to be registered or configured. + The configuration object for the specified complex type. + + + + Begins configuration of a lightweight convention that applies to all entities and complex types in + the model. + + A configuration object for the convention. + + + + Begins configuration of a lightweight convention that applies to all entities and complex types + in the model that inherit from or implement the type specified by the generic argument. + This method does not register types as part of the model. + + The type of the entities or complex types that this convention will apply to. + A configuration object for the convention. + + + + Begins configuration of a lightweight convention that applies to all properties + in the model. + + A configuration object for the convention. + + + + Begins configuration of a lightweight convention that applies to all primitive + properties of the specified type in the model. + + The type of the properties that the convention will apply to. + A configuration object for the convention. + + The convention will apply to both nullable and non-nullable properties of the + specified type. + + + + + Creates a based on the configuration performed using this builder. + The connection is used to determine the database provider being used as this + affects the database layer of the generated model. + + Connection to use to determine provider information. + The model that was built. + + + + Creates a based on the configuration performed using this builder. + Provider information must be specified because this affects the database layer of the generated model. + For SqlClient the invariant name is 'System.Data.SqlClient' and the manifest token is the version year (i.e. '2005', '2008' etc.) + + The database provider that the model will be used with. + The model that was built. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Provides access to the settings of this DbModelBuilder that deal with conventions. + + + + + Gets the for this DbModelBuilder. + The registrar allows derived entity and complex type configurations to be registered with this builder. + + + + + A value from this enumeration can be provided directly to the + class or can be used in the applied to + a class derived from . The value used defines which version of + the DbContext and DbModelBuilder conventions should be used when building a model from + code--also known as "Code First". + + + Using DbModelBuilderVersion.Latest ensures that all the latest functionality is available + when upgrading to a new release of the Entity Framework. However, it may result in an + application behaving differently with the new release than it did with a previous release. + This can be avoided by using a specific version of the conventions, but if a version + other than the latest is set then not all the latest functionality will be available. + + + + + Indicates that the latest version of the and + conventions should be used. + + + + + Indicates that the version of the and + conventions shipped with Entity Framework v4.1 + should be used. + + + + + Indicates that the version of the and + conventions shipped with Entity Framework v5.0 + when targeting .Net Framework 4 should be used. + + + + + Indicates that the version of the and + conventions shipped with Entity Framework v5.0 + should be used. + + + + + Indicates that the version of the and + conventions shipped with Entity Framework v6.0 + should be used. + + + + + This attribute can be applied to a class derived from to set which + version of the DbContext and conventions should be used when building + a model from code--also known as "Code First". See the + enumeration for details about DbModelBuilder versions. + + + If the attribute is missing from DbContextthen DbContext will always use the latest + version of the conventions. This is equivalent to using DbModelBuilderVersion.Latest. + + + + + Initializes a new instance of the class. + + + The conventions version to use. + + + + + Gets the conventions version. + + + The conventions version. + + + + + A non-generic version of which can be used when the type of entity + is not known at build time. + + + + + Represents a non-generic LINQ to Entities query against a DbContext. + + + + + Throws an exception indicating that binding directly to a store query is not supported. + Instead populate a DbSet with data, for example by using the Load extension method, and + then bind to local data. For WPF bind to DbSet.Local. For Windows Forms bind to + DbSet.Local.ToBindingList(). + + Never returns; always throws. + + + + Returns an which when enumerated will execute the query against the database. + + The query results. + + + + Returns an which when enumerated will execute the query against the database. + + The query results. + + + + Specifies the related objects to include in the query results. + + + Paths are all-inclusive. For example, if an include call indicates Include("Orders.OrderLines"), not only will + OrderLines be included, but also Orders. When you call the Include method, the query path is only valid on + the returned instance of the DbQuery<T>. Other instances of DbQuery<T> and the object context itself are not affected. + Because the Include method returns the query object, you can call this method multiple times on an DbQuery<T> to + specify multiple paths for the query. + + The dot-separated list of related objects to return in the query results. + + A new DbQuery<T> with the defined query path. + + + + + Returns a new query where the entities returned will not be cached in the . + + A new query with NoTracking applied. + + + + Returns a new query that will stream the results instead of buffering. + + A new query with AsStreaming applied. + + + + Returns the equivalent generic object. + + The type of element for which the query was created. + The generic set object. + + + + Returns a representation of the underlying query. + + The query string. + + + + + + + + + + + + + Returns false. + + + false . + + + + + The IQueryable element type. + + + + + The IQueryable LINQ Expression. + + + + + The IQueryable provider. + + + + + Gets a representation of the underlying query. + + + + + Creates an instance of a when called from the constructor of a derived + type that will be used as a test double for DbSets. Methods and properties that will be used by the + test double must be implemented by the test double except AsNoTracking, AsStreaming, an Include where + the default implementation is a no-op. + + + + + Finds an entity with the given primary key values. + If an entity with the given primary key values exists in the context, then it is + returned immediately without making a request to the store. Otherwise, a request + is made to the store for an entity with the given primary key values and this entity, + if found, is attached to the context and returned. If no entity is found in the + context or the store, then null is returned. + + + The ordering of composite key values is as defined in the EDM, which is in turn as defined in + the designer, by the Code First fluent API, or by the DataMember attribute. + + The values of the primary key for the entity to be found. + The entity found, or null. + Thrown if multiple entities exist in the context with the primary key values given. + Thrown if the type of entity is not part of the data model for this context. + Thrown if the types of the key values do not match the types of the key values for the entity type to be found. + Thrown if the context has been disposed. + + + + Asynchronously finds an entity with the given primary key values. + If an entity with the given primary key values exists in the context, then it is + returned immediately without making a request to the store. Otherwise, a request + is made to the store for an entity with the given primary key values and this entity, + if found, is attached to the context and returned. If no entity is found in the + context or the store, then null is returned. + + + The ordering of composite key values is as defined in the EDM, which is in turn as defined in + the designer, by the Code First fluent API, or by the DataMember attribute. + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + The values of the primary key for the entity to be found. + A task that represents the asynchronous find operation. The task result contains the entity found, or null. + Thrown if multiple entities exist in the context with the primary key values given. + Thrown if the type of entity is not part of the data model for this context. + Thrown if the types of the key values do not match the types of the key values for the entity type to be found. + Thrown if the context has been disposed. + + + + Asynchronously finds an entity with the given primary key values. + If an entity with the given primary key values exists in the context, then it is + returned immediately without making a request to the store. Otherwise, a request + is made to the store for an entity with the given primary key values and this entity, + if found, is attached to the context and returned. If no entity is found in the + context or the store, then null is returned. + + + The ordering of composite key values is as defined in the EDM, which is in turn as defined in + the designer, by the Code First fluent API, or by the DataMember attribute. + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + The values of the primary key for the entity to be found. + A task that represents the asynchronous find operation. The task result contains the entity found, or null. + Thrown if multiple entities exist in the context with the primary key values given. + Thrown if the type of entity is not part of the data model for this context. + Thrown if the types of the key values do not match the types of the key values for the entity type to be found. + Thrown if the context has been disposed. + + + + Attaches the given entity to the context underlying the set. That is, the entity is placed + into the context in the Unchanged state, just as if it had been read from the database. + + The entity to attach. + The entity. + + Attach is used to repopulate a context with an entity that is known to already exist in the database. + SaveChanges will therefore not attempt to insert an attached entity into the database because + it is assumed to already be there. + Note that entities that are already in the context in some other state will have their state set + to Unchanged. Attach is a no-op if the entity is already in the context in the Unchanged state. + + + + + Adds the given entity to the context underlying the set in the Added state such that it will + be inserted into the database when SaveChanges is called. + + The entity to add. + The entity. + + Note that entities that are already in the context in some other state will have their state set + to Added. Add is a no-op if the entity is already in the context in the Added state. + + + + + Adds the given collection of entities into context underlying the set with each entity being put into + the Added state such that it will be inserted into the database when SaveChanges is called. + + The collection of entities to add. + + The collection of entities. + + + Note that if is set to true (which is + the default), then DetectChanges will be called once before adding any entities and will not be called + again. This means that in some situations AddRange may perform significantly better than calling + Add multiple times would do. + Note that entities that are already in the context in some other state will have their state set to + Added. AddRange is a no-op for entities that are already in the context in the Added state. + + + + + Marks the given entity as Deleted such that it will be deleted from the database when SaveChanges + is called. Note that the entity must exist in the context in some other state before this method + is called. + + The entity to remove. + The entity. + + Note that if the entity exists in the context in the Added state, then this method + will cause it to be detached from the context. This is because an Added entity is assumed not to + exist in the database such that trying to delete it does not make sense. + + + + + Removes the given collection of entities from the context underlying the set with each entity being put into + the Deleted state such that it will be deleted from the database when SaveChanges is called. + + The collection of entities to delete. + + The collection of entities. + + + Note that if is set to true (which is + the default), then DetectChanges will be called once before delete any entities and will not be called + again. This means that in some situations RemoveRange may perform significantly better than calling + Remove multiple times would do. + Note that if any entity exists in the context in the Added state, then this method + will cause it to be detached from the context. This is because an Added entity is assumed not to + exist in the database such that trying to delete it does not make sense. + + + + + Creates a new instance of an entity for the type of this set. + Note that this instance is NOT added or attached to the set. + The instance returned will be a proxy if the underlying context is configured to create + proxies and the entity type meets the requirements for creating a proxy. + + The entity instance, which may be a proxy. + + + + Creates a new instance of an entity for the type of this set or for a type derived + from the type of this set. + Note that this instance is NOT added or attached to the set. + The instance returned will be a proxy if the underlying context is configured to create + proxies and the entity type meets the requirements for creating a proxy. + + The type of entity to create. + The entity instance, which may be a proxy. + + + + Returns the equivalent generic object. + + The type of entity for which the set was created. + The generic set object. + + + + Creates a raw SQL query that will return entities in this set. By default, the + entities returned are tracked by the context; this can be changed by calling + AsNoTracking on the returned. + Note that the entities returned are always of the type for this set and never of + a derived type. If the table or tables queried may contain data for other entity + types, then the SQL query must be written appropriately to ensure that only entities of + the correct type are returned. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.Set(typeof(Blog)).SqlQuery("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.Set(typeof(Blog)).SqlQuery("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + The SQL query string. + + The parameters to apply to the SQL query string. If output parameters are used, their values + will not be available until the results have been read completely. This is due to the underlying + behavior of DbDataReader, see http://go.microsoft.com/fwlink/?LinkID=398589 for more details. + + + A object that will execute the query when it is enumerated. + + + + + + + + + + + + + + Gets an that represents a local view of all Added, Unchanged, + and Modified entities in this set. This local view will stay in sync as entities are added or + removed from the context. Likewise, entities added to or removed from the local view will automatically + be added to or removed from the context. + + + This property can be used for data binding by populating the set with data, for example by using the Load + extension method, and then binding to the local data through this property. For WPF bind to this property + directly. For Windows Forms bind to the result of calling ToBindingList on this property + + The local view. + + + + A DbSet represents the collection of all entities in the context, or that can be queried from the + database, of a given type. DbSet objects are created from a DbContext using the DbContext.Set method. + + + Note that DbSet does not support MEST (Multiple Entity Sets per Type) meaning that there is always a + one-to-one correlation between a type and a set. + + The type that defines the set. + + + + Represents a LINQ to Entities query against a DbContext. + + The type of entity to query for. + + + + Specifies the related objects to include in the query results. + + + Paths are all-inclusive. For example, if an include call indicates Include("Orders.OrderLines"), not only will + OrderLines be included, but also Orders. When you call the Include method, the query path is only valid on + the returned instance of the DbQuery<T>. Other instances of DbQuery<T> and the object context itself are not affected. + Because the Include method returns the query object, you can call this method multiple times on an DbQuery<T> to + specify multiple paths for the query. + + The dot-separated list of related objects to return in the query results. + + A new with the defined query path. + + + + + Returns a new query where the entities returned will not be cached in the . + + A new query with NoTracking applied. + + + + Returns a new query that will stream the results instead of buffering. + + A new query with AsStreaming applied. + + + + Throws an exception indicating that binding directly to a store query is not supported. + Instead populate a DbSet with data, for example by using the Load extension method, and + then bind to local data. For WPF bind to DbSet.Local. For Windows Forms bind to + DbSet.Local.ToBindingList(). + + Never returns; always throws. + + + + Returns an which when enumerated will execute the query against the database. + + The query results. + + + + Returns an which when enumerated will execute the query against the database. + + The query results. + + + + Returns an which when enumerated will execute the query against the database. + + The query results. + + + + Returns an which when enumerated will execute the query against the database. + + The query results. + + + + Returns a representation of the underlying query. + + The query string. + + + + Returns a new instance of the non-generic class for this query. + + The query. + A non-generic version. + + + + + + + + + + + + + Returns false. + + + false . + + + + + The IQueryable element type. + + + + + The IQueryable LINQ Expression. + + + + + The IQueryable provider. + + + + + Gets a representation of the underlying query. + + + + + An represents the collection of all entities in the context, or that + can be queried from the database, of a given type. is a concrete + implementation of IDbSet. + + + was originally intended to allow creation of test doubles (mocks or + fakes) for . However, this approach has issues in that adding new members + to an interface breaks existing code that already implements the interface without the new members. + Therefore, starting with EF6, no new members will be added to this interface and it is recommended + that be used as the base class for test doubles. + + The type that defines the set. + + + + Finds an entity with the given primary key values. + If an entity with the given primary key values exists in the context, then it is + returned immediately without making a request to the store. Otherwise, a request + is made to the store for an entity with the given primary key values and this entity, + if found, is attached to the context and returned. If no entity is found in the + context or the store, then null is returned. + + + The ordering of composite key values is as defined in the EDM, which is in turn as defined in + the designer, by the Code First fluent API, or by the DataMember attribute. + + The values of the primary key for the entity to be found. + The entity found, or null. + + + + Adds the given entity to the context underlying the set in the Added state such that it will + be inserted into the database when SaveChanges is called. + + The entity to add. + The entity. + + Note that entities that are already in the context in some other state will have their state set + to Added. Add is a no-op if the entity is already in the context in the Added state. + + + + + Marks the given entity as Deleted such that it will be deleted from the database when SaveChanges + is called. Note that the entity must exist in the context in some other state before this method + is called. + + The entity to remove. + The entity. + + Note that if the entity exists in the context in the Added state, then this method + will cause it to be detached from the context. This is because an Added entity is assumed not to + exist in the database such that trying to delete it does not make sense. + + + + + Attaches the given entity to the context underlying the set. That is, the entity is placed + into the context in the Unchanged state, just as if it had been read from the database. + + The entity to attach. + The entity. + + Attach is used to repopulate a context with an entity that is known to already exist in the database. + SaveChanges will therefore not attempt to insert an attached entity into the database because + it is assumed to already be there. + Note that entities that are already in the context in some other state will have their state set + to Unchanged. Attach is a no-op if the entity is already in the context in the Unchanged state. + + + + + Creates a new instance of an entity for the type of this set. + Note that this instance is NOT added or attached to the set. + The instance returned will be a proxy if the underlying context is configured to create + proxies and the entity type meets the requirements for creating a proxy. + + The entity instance, which may be a proxy. + + + + Creates a new instance of an entity for the type of this set or for a type derived + from the type of this set. + Note that this instance is NOT added or attached to the set. + The instance returned will be a proxy if the underlying context is configured to create + proxies and the entity type meets the requirements for creating a proxy. + + The type of entity to create. + The entity instance, which may be a proxy. + + + + Gets an that represents a local view of all Added, Unchanged, + and Modified entities in this set. This local view will stay in sync as entities are added or + removed from the context. Likewise, entities added to or removed from the local view will automatically + be added to or removed from the context. + + + This property can be used for data binding by populating the set with data, for example by using the Load + extension method, and then binding to the local data through this property. For WPF bind to this property + directly. For Windows Forms bind to the result of calling ToBindingList on this property + + The local view. + + + + Creates an instance of a when called from the constructor of a derived + type that will be used as a test double for DbSets. Methods and properties that will be used by the + test double must be implemented by the test double except AsNoTracking, AsStreaming, an Include where + the default implementation is a no-op. + + + + + Finds an entity with the given primary key values. + If an entity with the given primary key values exists in the context, then it is + returned immediately without making a request to the store. Otherwise, a request + is made to the store for an entity with the given primary key values and this entity, + if found, is attached to the context and returned. If no entity is found in the + context or the store, then null is returned. + + + The ordering of composite key values is as defined in the EDM, which is in turn as defined in + the designer, by the Code First fluent API, or by the DataMember attribute. + + The values of the primary key for the entity to be found. + The entity found, or null. + Thrown if multiple entities exist in the context with the primary key values given. + Thrown if the type of entity is not part of the data model for this context. + Thrown if the types of the key values do not match the types of the key values for the entity type to be found. + Thrown if the context has been disposed. + + + + Asynchronously finds an entity with the given primary key values. + If an entity with the given primary key values exists in the context, then it is + returned immediately without making a request to the store. Otherwise, a request + is made to the store for an entity with the given primary key values and this entity, + if found, is attached to the context and returned. If no entity is found in the + context or the store, then null is returned. + + + The ordering of composite key values is as defined in the EDM, which is in turn as defined in + the designer, by the Code First fluent API, or by the DataMember attribute. + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + The values of the primary key for the entity to be found. + A task that represents the asynchronous find operation. The task result contains the entity found, or null. + Thrown if multiple entities exist in the context with the primary key values given. + Thrown if the type of entity is not part of the data model for this context. + Thrown if the types of the key values do not match the types of the key values for the entity type to be found. + Thrown if the context has been disposed. + + + + Asynchronously finds an entity with the given primary key values. + If an entity with the given primary key values exists in the context, then it is + returned immediately without making a request to the store. Otherwise, a request + is made to the store for an entity with the given primary key values and this entity, + if found, is attached to the context and returned. If no entity is found in the + context or the store, then null is returned. + + + The ordering of composite key values is as defined in the EDM, which is in turn as defined in + the designer, by the Code First fluent API, or by the DataMember attribute. + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + The values of the primary key for the entity to be found. + A task that represents the asynchronous find operation. The task result contains the entity found, or null. + + + + + + + + + + Adds the given collection of entities into context underlying the set with each entity being put into + the Added state such that it will be inserted into the database when SaveChanges is called. + + The collection of entities to add. + + The collection of entities. + + + Note that if is set to true (which is + the default), then DetectChanges will be called once before adding any entities and will not be called + again. This means that in some situations AddRange may perform significantly better than calling + Add multiple times would do. + Note that entities that are already in the context in some other state will have their state set to + Added. AddRange is a no-op for entities that are already in the context in the Added state. + + + + + + + + Removes the given collection of entities from the context underlying the set with each entity being put into + the Deleted state such that it will be deleted from the database when SaveChanges is called. + + The collection of entities to delete. + + The collection of entities. + + + Note that if is set to true (which is + the default), then DetectChanges will be called once before delete any entities and will not be called + again. This means that in some situations RemoveRange may perform significantly better than calling + Remove multiple times would do. + Note that if any entity exists in the context in the Added state, then this method + will cause it to be detached from the context. This is because an Added entity is assumed not to + exist in the database such that trying to delete it does not make sense. + + + + + + + + + + + Returns the equivalent non-generic object. + + The generic set object. + The non-generic set object. + + + + Creates a raw SQL query that will return entities in this set. By default, the + entities returned are tracked by the context; this can be changed by calling + AsNoTracking on the returned. + Note that the entities returned are always of the type for this set and never of + a derived type. If the table or tables queried may contain data for other entity + types, then the SQL query must be written appropriately to ensure that only entities of + the correct type are returned. + + As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. + context.Blogs.SqlQuery("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor); + Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. + context.Blogs.SqlQuery("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor)); + + The SQL query string. + + The parameters to apply to the SQL query string. If output parameters are used, their values will + not be available until the results have been read completely. This is due to the underlying behavior + of DbDataReader, see http://go.microsoft.com/fwlink/?LinkID=398589 for more details. + + + A object that will execute the query when it is enumerated. + + + + + + + + + + + + + + + + + An implementation of IDatabaseInitializer that will always recreate and optionally re-seed the + database the first time that a context is used in the app domain. + To seed the database, create a derived class and override the Seed method. + + The type of the context. + + + Initializes a new instance of the class. + + + + Executes the strategy to initialize the database for the given context. + + The context. + + + is + null + . + + + + + A method that should be overridden to actually add data to the context for seeding. + The default implementation does nothing. + + The context to seed. + + + + An implementation of IDatabaseInitializer that will DELETE, recreate, and optionally re-seed the + database only if the model has changed since the database was created. + + The type of the context. + + Whether or not the model has changed is determined by the + method. + To seed the database create a derived class and override the Seed method. + + + + Initializes a new instance of the class. + + + + Executes the strategy to initialize the database for the given context. + + The context. + + + is + null + . + + + + + A method that should be overridden to actually add data to the context for seeding. + The default implementation does nothing. + + The context to seed. + + + + Returned by the ChangeTracker method of to provide access to features of + the context that are related to change tracking of entities. + + + + + Gets objects for all the entities tracked by this context. + + The entries. + + + + Gets objects for all the entities of the given type + tracked by this context. + + The type of the entity. + The entries. + + + + Checks if the is tracking any new, deleted, or changed entities or + relationships that will be sent to the database if is called. + + + Functionally, calling this method is equivalent to checking if there are any entities or + relationships in the Added, Updated, or Deleted state. + Note that this method calls unless + has been set to false. + + + True if underlying have changes, else false. + + + + + Detects changes made to the properties and relationships of POCO entities. Note that some types of + entity (such as change tracking proxies and entities that derive from + ) + report changes automatically and a call to DetectChanges is not normally needed for these types of entities. + Also note that normally DetectChanges is called automatically by many of the methods of + and its related classes such that it is rare that this method will need to be called explicitly. + However, it may be desirable, usually for performance reasons, to turn off this automatic calling of + DetectChanges using the AutoDetectChangesEnabled flag from . + + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + A non-generic version of the class. + + + + + This is an abstract base class use to represent a scalar or complex property, or a navigation property + of an entity. Scalar and complex properties use the derived class , + reference navigation properties use the derived class , and collection + navigation properties use the derived class . + + + + + Validates this property. + + + Collection of objects. Never null. If the entity is valid the collection will be empty. + + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Returns the equivalent generic object. + + The type of entity on which the member is declared. + The type of the property. + The equivalent generic object. + + + + Gets the name of the property. + + The property name. + + + + Gets or sets the current value of this property. + + The current value. + + + + The to which this member belongs. + + An entry for the entity that owns this member. + + + + Loads the collection of entities from the database. + Note that entities that already exist in the context are not overwritten with values from the database. + + + + + Asynchronously loads the collection of entities from the database. + Note that entities that already exist in the context are not overwritten with values from the database. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A task that represents the asynchronous operation. + + + + + Asynchronously loads the collection of entities from the database. + Note that entities that already exist in the context are not overwritten with values from the database. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + + + + + Returns the query that would be used to load this collection from the database. + The returned query can be modified using LINQ to perform filtering or operations in the database, such + as counting the number of entities in the collection in the database without actually loading them. + + A query for the collection. + + + + Returns the equivalent generic object. + + The type of entity on which the member is declared. + The type of the collection element. + The equivalent generic object. + + + + Gets the property name. + + The property name. + + + + Gets or sets the current value of the navigation property. The current value is + the entity that the navigation property references. + + The current value. + + + + Gets or sets a value indicating whether all entities of this collection have been loaded from the database. + + + Loading the related entities from the database either using lazy-loading, as part of a query, or explicitly + with one of the Load methods will set the IsLoaded flag to true. + IsLoaded can be explicitly set to true to prevent the related entities of this collection from being lazy-loaded. + This can be useful if the application has caused a subset of related entities to be loaded into this collection + and wants to prevent any other entities from being loaded automatically. + Note that explict loading using one of the Load methods will load all related entities from the database + regardless of whether or not IsLoaded is true. + When any related entity in the collection is detached the IsLoaded flag is reset to false indicating that the + not all related entities are now loaded. + + + true if all the related entities are loaded or the IsLoaded has been explicitly set to true; otherwise, false. + + + + + The to which this navigation property belongs. + + An entry for the entity that owns this navigation property. + + + + Instances of this class are returned from the Collection method of + and allow operations such as loading to + be performed on the an entity's collection navigation properties. + + The type of the entity to which this property belongs. + The type of the element in the collection of entities. + + + + This is an abstract base class use to represent a scalar or complex property, or a navigation property + of an entity. Scalar and complex properties use the derived class , + reference navigation properties use the derived class , and collection + navigation properties use the derived class . + + The type of the entity to which this property belongs. + The type of the property. + + + + Returns a new instance of the non-generic class for + the property represented by this object. + + The object representing the property. + A non-generic version. + + + + Validates this property. + + + Collection of objects. Never null. If the entity is valid the collection will be empty. + + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + Gets the name of the property. + The name of the property. + + + + Gets or sets the current value of this property. + + The current value. + + + + The to which this member belongs. + + An entry for the entity that owns this member. + + + + Loads the collection of entities from the database. + Note that entities that already exist in the context are not overwritten with values from the database. + + + + + Asynchronously loads the collection of entities from the database. + Note that entities that already exist in the context are not overwritten with values from the database. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A task that represents the asynchronous operation. + + + + + Asynchronously loads the collection of entities from the database. + Note that entities that already exist in the context are not overwritten with values from the database. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + + + + + Returns the query that would be used to load this collection from the database. + The returned query can be modified using LINQ to perform filtering or operations in the database, such + as counting the number of entities in the collection in the database without actually loading them. + + A query for the collection. + + + + Returns a new instance of the non-generic class for + the navigation property represented by this object. + + The object representing the navigation property. + A non-generic version. + + + + Gets the property name. + + The property name. + + + + Gets or sets the current value of the navigation property. The current value is + the entity that the navigation property references. + + The current value. + + + + Gets or sets a value indicating whether all entities of this collection have been loaded from the database. + + + Loading the related entities from the database either using lazy-loading, as part of a query, or explicitly + with one of the Load methods will set the IsLoaded flag to true. + IsLoaded can be explicitly set to true to prevent the related entities of this collection from being lazy-loaded. + This can be useful if the application has caused a subset of related entities to be loaded into this collection + and wants to prevent any other entities from being loaded automatically. + Note that explict loading using one of the Load methods will load all related entities from the database + regardless of whether or not IsLoaded is true. + When any related entity in the collection is detached the IsLoaded flag is reset to false indicating that the + not all related entities are now loaded. + + + true if all the related entities are loaded or the IsLoaded has been explicitly set to true; otherwise, false. + + + + + The to which this navigation property belongs. + + An entry for the entity that owns this navigation property. + + + + An immutable representation of an Entity Data Model (EDM) model that can be used to create an + or can be passed to the constructor of a . + For increased performance, instances of this type should be cached and re-used to construct contexts. + + + + + Creates an instance of ObjectContext or class derived from ObjectContext. Note that an instance + of DbContext can be created instead by using the appropriate DbContext constructor. + If a derived ObjectContext is used, then it must have a public constructor with a single + EntityConnection parameter. + The connection passed is used by the ObjectContext created, but is not owned by the context. The caller + must dispose of the connection once the context has been disposed. + + The type of context to create. + An existing connection to a database for use by the context. + The context. + + + + A non-generic version of the class. + + + + + A non-generic version of the class. + + + + + Returns the equivalent generic object. + + The type of entity on which the member is declared. + The type of the property. + The equivalent generic object. + + + + Gets the property name. + + The property name. + + + + Gets or sets the original value of this property. + + The original value. + + + + Gets or sets the current value of this property. + + The current value. + + + + Gets or sets a value indicating whether the value of this property has been modified since + it was loaded from the database. + + + Setting this value to false for a modified property will revert the change by setting the + current value to the original value. If the result is that no properties of the entity are + marked as modified, then the entity will be marked as Unchanged. + Setting this value to false for properties of Added, Unchanged, or Deleted entities + is a no-op. + + + true if this instance is modified; otherwise, false . + + + + + The to which this property belongs. + + An entry for the entity that owns this property. + + + + The of the property for which this is a nested property. + This method will only return a non-null entry for properties of complex objects; it will + return null for properties of the entity itself. + + An entry for the parent complex property, or null if this is an entity property. + + + + Gets an object that represents a nested property of this property. + This method can be used for both scalar or complex properties. + + The name of the nested property. + An object representing the nested property. + + + + Gets an object that represents a nested complex property of this property. + + The name of the nested property. + An object representing the nested property. + + + + Returns the equivalent generic object. + + The type of entity on which the member is declared. + The type of the complex property. + The equivalent generic object. + + + + Instances of this class are returned from the ComplexProperty method of + and allow access to the state of a complex property. + + The type of the entity to which this property belongs. + The type of the property. + + + + Instances of this class are returned from the Property method of + and allow access to the state of the scalar + or complex property. + + The type of the entity to which this property belongs. + The type of the property. + + + + Returns a new instance of the non-generic class for + the property represented by this object. + + The object representing the property. + A non-generic version. + + + + Gets the property name. + + The property name. + + + + Gets or sets the original value of this property. + + The original value. + + + + Gets or sets the current value of this property. + + The current value. + + + + Gets or sets a value indicating whether the value of this property has been modified since + it was loaded from the database. + + + true if this instance is modified; otherwise, false . + + + + + The to which this property belongs. + + An entry for the entity that owns this property. + + + + The of the property for which this is a nested property. + This method will only return a non-null entry for properties of complex objects; it will + return null for properties of the entity itself. + + An entry for the parent complex property, or null if this is an entity property. + + + + Returns a new instance of the non-generic class for + the property represented by this object. + + The object representing the property. + A non-generic version. + + + + Gets an object that represents a nested property of this property. + This method can be used for both scalar or complex properties. + + The name of the nested property. + An object representing the nested property. + + + + Gets an object that represents a nested property of this property. + This method can be used for both scalar or complex properties. + + The type of the nested property. + The name of the nested property. + An object representing the nested property. + + + + Gets an object that represents a nested property of this property. + This method can be used for both scalar or complex properties. + + The type of the nested property. + An expression representing the nested property. + An object representing the nested property. + + + + Gets an object that represents a nested complex property of this property. + + The name of the nested property. + An object representing the nested property. + + + + Gets an object that represents a nested complex property of this property. + + The type of the nested property. + The name of the nested property. + An object representing the nested property. + + + + Gets an object that represents a nested complex property of this property. + + The type of the nested property. + An expression representing the nested property. + An object representing the nested property. + + + + Describes the origin of the database connection string associated with a . + + + + + The connection string was created by convention. + + + + + The connection string was read from external configuration. + + + + + The connection string was explicitly specified at runtime. + + + + + The connection string was overriden by connection information supplied to DbContextInfo. + + + + + Returned by the Configuration method of to provide access to configuration + options for the context. + + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Gets or sets the value that determines whether SQL functions and commands should be always executed in a transaction. + + + This flag determines whether a new transaction will be started when methods such as + are executed outside of a transaction. + Note that this does not change the behavior of . + + + The default transactional behavior. + + + + + Gets or sets a value indicating whether lazy loading of relationships exposed as + navigation properties is enabled. Lazy loading is enabled by default. + + + true if lazy loading is enabled; otherwise, false . + + + + + Gets or sets a value indicating whether or not the framework will create instances of + dynamically generated proxy classes whenever it creates an instance of an entity type. + Note that even if proxy creation is enabled with this flag, proxy instances will only + be created for entity types that meet the requirements for being proxied. + Proxy creation is enabled by default. + + + true if proxy creation is enabled; otherwise, false . + + + + + Gets or sets a value indicating whether database null semantics are exhibited when comparing + two operands, both of which are potentially nullable. The default value is false. + + For example (operand1 == operand2) will be translated as: + + (operand1 = operand2) + + if UseDatabaseNullSemantics is true, respectively + + (((operand1 = operand2) AND (NOT (operand1 IS NULL OR operand2 IS NULL))) OR ((operand1 IS NULL) AND (operand2 IS NULL))) + + if UseDatabaseNullSemantics is false. + + + true if database null comparison behavior is enabled, otherwise false . + + + + + Gets or sets a value indicating whether the + method is called automatically by methods of and related classes. + The default value is true. + + + true if should be called automatically; otherwise, false. + + + + + Gets or sets a value indicating whether tracked entities should be validated automatically when + is invoked. + The default value is true. + + + + + Provides runtime information about a given type. + + + + + Creates a new instance representing a given type. + + + The type deriving from . + + + + + Creates a new instance representing a given targeting a specific database. + + + The type deriving from . + + Connection information for the database to be used. + + + + Creates a new instance representing a given type. An external list of + connection strings can be supplied and will be used during connection string resolution in place + of any connection strings specified in external configuration files. + + + It is preferable to use the constructor that accepts the entire config document instead of using this + constructor. Providing the entire config document allows DefaultConnectionFactroy entries in the config + to be found in addition to explicitly specified connection strings. + + + The type deriving from . + + A collection of connection strings. + + + + Creates a new instance representing a given type. An external config + object (e.g. app.config or web.config) can be supplied and will be used during connection string + resolution. This includes looking for connection strings and DefaultConnectionFactory entries. + + + The type deriving from . + + An object representing the config file. + + + + Creates a new instance representing a given , targeting a specific database. + An external config object (e.g. app.config or web.config) can be supplied and will be used during connection string + resolution. This includes looking for connection strings and DefaultConnectionFactory entries. + + + The type deriving from . + + An object representing the config file. + Connection information for the database to be used. + + + + Creates a new instance representing a given type. A + can be supplied in order to override the default determined provider used when constructing + the underlying EDM model. + + + The type deriving from . + + + A specifying the underlying ADO.NET provider to target. + + + + + Creates a new instance representing a given type. An external config + object (e.g. app.config or web.config) can be supplied and will be used during connection string + resolution. This includes looking for connection strings and DefaultConnectionFactory entries. + A can be supplied in order to override the default determined + provider used when constructing the underlying EDM model. This can be useful to prevent EF from + connecting to discover a manifest token. + + + The type deriving from . + + An object representing the config file. + + A specifying the underlying ADO.NET provider to target. + + + + + If instances of the underlying type can be created, returns + a new instance; otherwise returns null. + + + A instance. + + + + + The concrete type. + + + + + Whether or not instances of the underlying type can be created. + + + + + The connection string used by the underlying type. + + + + + The connection string name used by the underlying type. + + + + + The ADO.NET provider name of the connection used by the underlying type. + + + + + The origin of the connection string used by the underlying type. + + + + + An action to be run on the DbModelBuilder after OnModelCreating has been run on the context. + + + + + A non-generic version of the class. + + + + + Queries the database for copies of the values of the tracked entity as they currently exist in the database. + Note that changing the values in the returned dictionary will not update the values in the database. + If the entity is not found in the database then null is returned. + + The store values. + + + + Asynchronously queries the database for copies of the values of the tracked entity as they currently exist in the database. + Note that changing the values in the returned dictionary will not update the values in the database. + If the entity is not found in the database then null is returned. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A task that represents the asynchronous operation. + The task result contains the store values. + + + + + Asynchronously queries the database for copies of the values of the tracked entity as they currently exist in the database. + Note that changing the values in the returned dictionary will not update the values in the database. + If the entity is not found in the database then null is returned. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the store values. + + + + + Reloads the entity from the database overwriting any property values with values from the database. + The entity will be in the Unchanged state after calling this method. + + + + + Asynchronously reloads the entity from the database overwriting any property values with values from the database. + The entity will be in the Unchanged state after calling this method. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A task that represents the asynchronous operation. + + + + + Asynchronously reloads the entity from the database overwriting any property values with values from the database. + The entity will be in the Unchanged state after calling this method. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + + + + + Gets an object that represents the reference (i.e. non-collection) navigation property from this + entity to another entity. + + The name of the navigation property. + An object representing the navigation property. + + + + Gets an object that represents the collection navigation property from this + entity to a collection of related entities. + + The name of the navigation property. + An object representing the navigation property. + + + + Gets an object that represents a scalar or complex property of this entity. + + The name of the property. + An object representing the property. + + + + Gets an object that represents a complex property of this entity. + + The name of the complex property. + An object representing the complex property. + + + + Gets an object that represents a member of the entity. The runtime type of the returned object will + vary depending on what kind of member is asked for. The currently supported member types and their return + types are: + Reference navigation property: . + Collection navigation property: . + Primitive/scalar property: . + Complex property: . + + The name of the member. + An object representing the member. + + + + Returns a new instance of the generic class for the given + generic type for the tracked entity represented by this object. + Note that the type of the tracked entity must be compatible with the generic type or + an exception will be thrown. + + The type of the entity. + A generic version. + + + + Validates this instance and returns validation result. + + + Entity validation result. Possibly null if + DbContext.ValidateEntity(DbEntityEntry, IDictionary{object,object}) + method is overridden. + + + + + Determines whether the specified is equal to this instance. + Two instances are considered equal if they are both entries for + the same entity on the same . + + + The to compare with this instance. + + + true if the specified is equal to this instance; otherwise, false . + + + + + Determines whether the specified is equal to this instance. + Two instances are considered equal if they are both entries for + the same entity on the same . + + + The to compare with this instance. + + + true if the specified is equal to this instance; otherwise, false . + + + + + Returns a hash code for this instance. + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Gets the entity. + + The entity. + + + + Gets or sets the state of the entity. + + The state. + + + + Gets the current property values for the tracked entity represented by this object. + + The current values. + + + + Gets the original property values for the tracked entity represented by this object. + The original values are usually the entity's property values as they were when last queried from + the database. + + The original values. + + + + Instances of this class provide access to information about and control of entities that + are being tracked by the . Use the Entity or Entities methods of + the context to obtain objects of this type. + + The type of the entity. + + + + Queries the database for copies of the values of the tracked entity as they currently exist in the database. + Note that changing the values in the returned dictionary will not update the values in the database. + If the entity is not found in the database then null is returned. + + The store values. + + + + Asynchronously queries the database for copies of the values of the tracked entity as they currently exist in the database. + Note that changing the values in the returned dictionary will not update the values in the database. + If the entity is not found in the database then null is returned. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A task that represents the asynchronous operation. + The task result contains the store values. + + + + + Asynchronously queries the database for copies of the values of the tracked entity as they currently exist in the database. + Note that changing the values in the returned dictionary will not update the values in the database. + If the entity is not found in the database then null is returned. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + The task result contains the store values. + + + + + Reloads the entity from the database overwriting any property values with values from the database. + The entity will be in the Unchanged state after calling this method. + + + + + Asynchronously reloads the entity from the database overwriting any property values with values from the database. + The entity will be in the Unchanged state after calling this method. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A task that represents the asynchronous operation. + + + + + Asynchronously reloads the entity from the database overwriting any property values with values from the database. + The entity will be in the Unchanged state after calling this method. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + + + + + Gets an object that represents the reference (i.e. non-collection) navigation property from this + entity to another entity. + + The name of the navigation property. + An object representing the navigation property. + + + + Gets an object that represents the reference (i.e. non-collection) navigation property from this + entity to another entity. + + The type of the property. + The name of the navigation property. + An object representing the navigation property. + + + + Gets an object that represents the reference (i.e. non-collection) navigation property from this + entity to another entity. + + The type of the property. + An expression representing the navigation property. + An object representing the navigation property. + + + + Gets an object that represents the collection navigation property from this + entity to a collection of related entities. + + The name of the navigation property. + An object representing the navigation property. + + + + Gets an object that represents the collection navigation property from this + entity to a collection of related entities. + + The type of elements in the collection. + The name of the navigation property. + An object representing the navigation property. + + + + Gets an object that represents the collection navigation property from this + entity to a collection of related entities. + + The type of elements in the collection. + An expression representing the navigation property. + An object representing the navigation property. + + + + Gets an object that represents a scalar or complex property of this entity. + + The name of the property. + An object representing the property. + + + + Gets an object that represents a scalar or complex property of this entity. + + The type of the property. + The name of the property. + An object representing the property. + + + + Gets an object that represents a scalar or complex property of this entity. + + The type of the property. + An expression representing the property. + An object representing the property. + + + + Gets an object that represents a complex property of this entity. + + The name of the complex property. + An object representing the complex property. + + + + Gets an object that represents a complex property of this entity. + + The type of the complex property. + The name of the complex property. + An object representing the complex property. + + + + Gets an object that represents a complex property of this entity. + + The type of the complex property. + An expression representing the complex property. + An object representing the complex property. + + + + Gets an object that represents a member of the entity. The runtime type of the returned object will + vary depending on what kind of member is asked for. The currently supported member types and their return + types are: + Reference navigation property: . + Collection navigation property: . + Primitive/scalar property: . + Complex property: . + + The name of the member. + An object representing the member. + + + + Gets an object that represents a member of the entity. The runtime type of the returned object will + vary depending on what kind of member is asked for. The currently supported member types and their return + types are: + Reference navigation property: . + Collection navigation property: . + Primitive/scalar property: . + Complex property: . + + The type of the member. + The name of the member. + An object representing the member. + + + + Returns a new instance of the non-generic class for + the tracked entity represented by this object. + + The object representing the tracked entity. + A non-generic version. + + + + Validates this instance and returns validation result. + + + Entity validation result. Possibly null if + DbContext.ValidateEntity(DbEntityEntry, IDictionary{object, object}) + method is overridden. + + + + + Determines whether the specified is equal to this instance. + Two instances are considered equal if they are both entries for + the same entity on the same . + + + The to compare with this instance. + + + true if the specified is equal to this instance; otherwise, false . + + + + + Determines whether the specified is equal to this instance. + Two instances are considered equal if they are both entries for + the same entity on the same . + + + The to compare with this instance. + + + true if the specified is equal to this instance; otherwise, false . + + + + + Returns a hash code for this instance. + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Gets the entity. + + The entity. + + + + Gets or sets the state of the entity. + + The state. + + + + Gets the current property values for the tracked entity represented by this object. + + The current values. + + + + Gets the original property values for the tracked entity represented by this object. + The original values are usually the entity's property values as they were when last queried from + the database. + + The original values. + + + + Represents an Entity Data Model (EDM) created by the . + The Compile method can be used to go from this EDM representation to a + which is a compiled snapshot of the model suitable for caching and creation of + or instances. + + + + + Creates a for this mode which is a compiled snapshot + suitable for caching and creation of instances. + + The compiled model. + + + + Gets the provider information. + + + + + Gets the provider manifest. + + + + + Gets the conceptual model. + + + + + Gets the store model. + + + + + Gets the mapping model. + + + + + A collection of all the properties for an underlying entity or complex object. + + + An instance of this class can be converted to an instance of the generic class + using the Cast method. + Complex properties in the underlying entity or complex object are represented in + the property values as nested instances of this class. + + + + + Creates an object of the underlying type for this dictionary and hydrates it with property + values from this dictionary. + + The properties of this dictionary copied into a new object. + + + + Sets the values of this dictionary by reading values out of the given object. + The given object can be of any type. Any property on the object with a name that + matches a property name in the dictionary and can be read will be read. Other + properties will be ignored. This allows, for example, copying of properties from + simple Data Transfer Objects (DTOs). + + The object to read values from. + + + + Creates a new dictionary containing copies of all the properties in this dictionary. + Changes made to the new dictionary will not be reflected in this dictionary and vice versa. + + A clone of this dictionary. + + + + Sets the values of this dictionary by reading values from another dictionary. + The other dictionary must be based on the same type as this dictionary, or a type derived + from the type for this dictionary. + + The dictionary to read values from. + + + + Gets the value of the property just like using the indexed property getter but + typed to the type of the generic parameter. This is useful especially with + nested dictionaries to avoid writing expressions with lots of casts. + + The type of the property. + Name of the property. + The value of the property. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Gets the set of names of all properties in this dictionary as a read-only set. + + The property names. + + + + Gets or sets the value of the property with the specified property name. + The value may be a nested instance of this class. + + The property name. + The value of the property. + + + + Groups a pair of strings that identify a provider and server version together into a single object. + + + Instances of this class act as the key for resolving a for a specific + provider from a . This is typically used when registering spatial services + in or when the spatial services specific to a provider is + resolved by an implementation of . + + + + + Creates a new object for a given provider invariant name and manifest token. + + + A string that identifies that provider. For example, the SQL Server + provider uses the string "System.Data.SqlCient". + + + A string that identifies that version of the database server being used. For example, the SQL Server + provider uses the string "2008" for SQL Server 2008. This cannot be null but may be empty. + The manifest token is sometimes referred to as a version hint. + + + + + + + + + + + A string that identifies that provider. For example, the SQL Server + provider uses the string "System.Data.SqlCient". + + + + + A string that identifies that version of the database server being used. For example, the SQL Server + provider uses the string "2008" for SQL Server 2008. This cannot be null but may be empty. + + + + + A non-generic version of the class. + + + + + Loads the entity from the database. + Note that if the entity already exists in the context, then it will not overwritten with values from the database. + + + + + Asynchronously loads the entity from the database. + Note that if the entity already exists in the context, then it will not overwritten with values from the database. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A task that represents the asynchronous operation. + + + + + Asynchronously loads the entity from the database. + Note that if the entity already exists in the context, then it will not overwritten with values from the database. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + + + + + Returns the query that would be used to load this entity from the database. + The returned query can be modified using LINQ to perform filtering or operations in the database. + + A query for the entity. + + + + Returns the equivalent generic object. + + The type of entity on which the member is declared. + The type of the property. + The equivalent generic object. + + + + Gets the property name. + + The property name. + + + + Gets or sets the current value of the navigation property. The current value is + the entity that the navigation property references. + + The current value. + + + + Gets or sets a value indicating whether the entity has been loaded from the database. + + + Loading the related entity from the database either using lazy-loading, as part of a query, or explicitly + with one of the Load methods will set the IsLoaded flag to true. + IsLoaded can be explicitly set to true to prevent the related entity from being lazy-loaded. + Note that explict loading using one of the Load methods will load the related entity from the database + regardless of whether or not IsLoaded is true. + When a related entity is detached the IsLoaded flag is reset to false indicating that the related entity is + no longer loaded. + + + true if the entity is loaded or the IsLoaded has been explicitly set to true; otherwise, false. + + + + + The to which this navigation property belongs. + + An entry for the entity that owns this navigation property. + + + + Instances of this class are returned from the Reference method of + and allow operations such as loading to + be performed on the an entity's reference navigation properties. + + The type of the entity to which this property belongs. + The type of the property. + + + + Loads the entity from the database. + Note that if the entity already exists in the context, then it will not overwritten with values from the database. + + + + + Asynchronously loads the entity from the database. + Note that if the entity already exists in the context, then it will not overwritten with values from the database. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A task that represents the asynchronous operation. + + + + + Asynchronously loads the entity from the database. + Note that if the entity already exists in the context, then it will not overwritten with values from the database. + + + Multiple active operations on the same context instance are not supported. Use 'await' to ensure + that any asynchronous operations have completed before calling another method on this context. + + + A to observe while waiting for the task to complete. + + + A task that represents the asynchronous operation. + + + + + Returns the query that would be used to load this entity from the database. + The returned query can be modified using LINQ to perform filtering or operations in the database. + + A query for the entity. + + + + Returns a new instance of the non-generic class for + the navigation property represented by this object. + + The object representing the navigation property. + A non-generic version. + + + + Gets the property name. + + The property name. + + + + Gets or sets the current value of the navigation property. The current value is + the entity that the navigation property references. + + The current value. + + + + Gets or sets a value indicating whether the entity has been loaded from the database. + + + Loading the related entity from the database either using lazy-loading, as part of a query, or explicitly + with one of the Load methods will set the IsLoaded flag to true. + IsLoaded can be explicitly set to true to prevent the related entity from being lazy-loaded. + Note that explict loading using one of the Load methods will load the related entity from the database + regardless of whether or not IsLoaded is true. + When a related entity is detached the IsLoaded flag is reset to false indicating that the related entity is + no longer loaded. + + + true if the entity is loaded or the IsLoaded has been explicitly set to true; otherwise, false. + + + + + The to which this navigation property belongs. + + An entry for the entity that owns this navigation property. + + + + Exception thrown by when it was expected that SaveChanges for an entity would + result in a database update but in fact no rows in the database were affected. This usually indicates + that the database has been concurrently updated such that a concurrency token that was expected to match + did not actually match. + Note that state entries referenced by this exception are not serialized due to security and accesses to + the state entries after serialization will return null. + + + + + Exception thrown by when the saving of changes to the database fails. + Note that state entries referenced by this exception are not serialized due to security and accesses to the + state entries after serialization will return null. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exception. + + + + Gets objects that represents the entities that could not + be saved to the database. + + The entries representing the entities that could not be saved. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exception. + + + + Represents an entity used to store metadata about an EDM in the database. + + + + + Attempts to get the model hash calculated by Code First for the given context. + This method will return null if the context is not being used in Code First mode. + + The context. + The hash string. + + + + Gets or sets the ID of the metadata entity, which is currently always 1. + + The id. + + + + Gets or sets the model hash which is used to check whether the model has + changed since the database was created from it. + + The model hash. + + + + Contains methods used to access the Entity Data Model created by Code First in the EDMX form. + These methods are typically used for debugging when there is a need to look at the model that + Code First creates internally. + + + + + Uses Code First with the given context and writes the resulting Entity Data Model to the given + writer in EDMX form. This method can only be used with context instances that use Code First + and create the model internally. The method cannot be used for contexts created using Database + First or Model First, for contexts created using a pre-existing , or + for contexts created using a pre-existing . + + The context. + The writer. + + + + Writes the Entity Data Model represented by the given to the + given writer in EDMX form. + + An object representing the EDM. + The writer. + + + + A factory for creating derived instances. Implement this + interface to enable design-time services for context types that do not have a + public default constructor. + At design-time, derived instances can be created in order to enable specific + design-time experiences such as model rendering, DDL generation etc. To enable design-time instantiation + for derived types that do not have a public, default constructor, implement + this interface. Design-time services will auto-discover implementations of this interface that are in the + same assembly as the derived type. + + The type of the context. + + + + Creates a new instance of a derived type. + + An instance of TContext + + + + This convention causes DbModelBuilder to include metadata about the model + when it builds the model. When creates a model by convention it will + add this convention to the list of those used by the DbModelBuilder. This will then result in + model metadata being written to the database if the DbContext is used to create the database. + This can then be used as a quick check to see if the model has changed since the last time it was + used against the database. + This convention can be removed from the conventions by overriding + the OnModelCreating method on a derived DbContext class. + + + + + This convention uses the name of the derived + class as the container for the conceptual model built by + Code First. + + + + + Applies the convention to the given model. + + The container to apply the convention to. + The model. + + + + This convention uses the namespace of the derived + class as the namespace of the conceptual model built by + Code First. + + + + + Instances of this class are used internally to create constant expressions for + that are inserted into the expression tree to replace references to + and . + + The type of the element. + + + + The public property expected in the LINQ expression tree. + + The query. + + + + Instances of this class are used to create DbConnection objects for + SQL Server Compact Edition based on a given database name or connection string. + + + It is necessary to provide the provider invariant name of the SQL Server Compact + Edition to use when creating an instance of this class. This is because different + versions of SQL Server Compact Editions use different invariant names. + An instance of this class can be set on the class to + cause all DbContexts created with no connection information or just a database + name or connection string to use SQL Server Compact Edition by default. + This class is immutable since multiple threads may access instances simultaneously + when creating connections. + + + + + Creates a new connection factory with empty (default) DatabaseDirectory and BaseConnectionString + properties. + + The provider invariant name that specifies the version of SQL Server Compact Edition that should be used. + + + + Creates a new connection factory with the given DatabaseDirectory and BaseConnectionString properties. + + The provider invariant name that specifies the version of SQL Server Compact Edition that should be used. + The path to prepend to the database name that will form the file name used by SQL Server Compact Edition when it creates or reads the database file. An empty string means that SQL Server Compact Edition will use its default for the database file location. + The connection string to use for options to the database other than the 'Data Source'. The Data Source will be prepended to this string based on the database name when CreateConnection is called. + + + + Creates a connection for SQL Server Compact Edition based on the given database name or connection string. + If the given string contains an '=' character then it is treated as a full connection string, + otherwise it is treated as a database name only. + + The database name or connection string. + An initialized DbConnection. + + + + The path to prepend to the database name that will form the file name used by + SQL Server Compact Edition when it creates or reads the database file. + The default value is "|DataDirectory|", which means the file will be placed + in the designated data directory. + + + + + The connection string to use for options to the database other than the 'Data Source'. + The Data Source will be prepended to this string based on the database name when + CreateConnection is called. + The default is the empty string, which means no other options will be used. + + + + + The provider invariant name that specifies the version of SQL Server Compact Edition + that should be used. + + + + + Instances of this class are used to create DbConnection objects for + SQL Server based on a given database name or connection string. By default, the connection is + made to '.\SQLEXPRESS'. This can be changed by changing the base connection + string when constructing a factory instance. + + + An instance of this class can be set on the class to + cause all DbContexts created with no connection information or just a database + name or connection string to use SQL Server by default. + This class is immutable since multiple threads may access instances simultaneously + when creating connections. + + + + + Creates a new connection factory with a default BaseConnectionString property of + 'Data Source=.\SQLEXPRESS; Integrated Security=True; MultipleActiveResultSets=True;'. + + + + + Creates a new connection factory with the given BaseConnectionString property. + + The connection string to use for options to the database other than the 'Initial Catalog'. The 'Initial Catalog' will be prepended to this string based on the database name when CreateConnection is called. + + + + Creates a connection for SQL Server based on the given database name or connection string. + If the given string contains an '=' character then it is treated as a full connection string, + otherwise it is treated as a database name only. + + The database name or connection string. + An initialized DbConnection. + + + + The connection string to use for options to the database other than the 'Initial Catalog'. + The 'Initial Catalog' will be prepended to this string based on the database name when + CreateConnection is called. + The default is 'Data Source=.\SQLEXPRESS; Integrated Security=True;'. + + + + + This attribute can be applied to either an entire derived class or to + individual or properties on that class. When applied + any discovered or properties will still be included + in the model but will not be automatically initialized. + + + + + Thrown when a context is generated from the templates in Database First or Model + First mode and is then used in Code First mode. + + + Code generated using the T4 templates provided for Database First and Model First use may not work + correctly if used in Code First mode. To use these classes with Code First please add any additional + configuration using attributes or the DbModelBuilder API and then remove the code that throws this + exception. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The object that holds the serialized object data. + The contextual information about the source or destination. + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exception. + + + + Allows configuration to be performed for an complex type in a model. + A ComplexTypeConfiguration can be obtained via the ComplexType method on + or a custom type derived from ComplexTypeConfiguration + can be registered via the Configurations property on . + + The complex type to be configured. + + + + Allows configuration to be performed for a type in a model. + + The type to be configured. + + + + Configures a property that is defined on this type. + + The type of the property being configured. + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is defined on this type. + + The type of the property being configured. + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is defined on this type. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is defined on this type. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is defined on this type. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is defined on this type. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is defined on this type. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is defined on this type. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is defined on this type. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is defined on this type. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is defined on this type. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is defined on this type. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is defined on this type. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is defined on this type. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Initializes a new instance of ComplexTypeConfiguration + + + + + Excludes a property from the model so that it will not be mapped to the database. + + The type of the property to be ignored. + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The same ComplexTypeConfiguration instance so that multiple calls can be chained. + + + + + + + + + + + + + + + + Allows derived configuration classes for entities and complex types to be registered with a + . + + + Derived configuration classes are created by deriving from + or and using a type to be included in the model as the generic + parameter. + Configuration can be performed without creating derived configuration classes via the Entity and ComplexType + methods on . + + + + + Discovers all types that inherit from or + in the given assembly and adds an instance + of each discovered type to this registrar. + + + Note that only types that are abstract or generic type definitions are skipped. Every + type that is discovered and added must provide a parameterless constructor. + + The assembly containing model configurations to add. + The same ConfigurationRegistrar instance so that multiple calls can be chained. + + + + Adds an to the . + Only one can be added for each type in a model. + + The entity type being configured. + The entity type configuration to be added. + The same ConfigurationRegistrar instance so that multiple calls can be chained. + + + + Adds an to the . + Only one can be added for each type in a model. + + The complex type being configured. + The complex type configuration to be added + The same ConfigurationRegistrar instance so that multiple calls can be chained. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Allows the conventions used by a instance to be customized. + The default conventions can be found in the System.Data.Entity.ModelConfiguration.Conventions namespace. + + + + + Discover all conventions in the given assembly and add them to the . + + + This method add all conventions ordered by type name. The order in which conventions are added + can have an impact on how they behave because it governs the order in which they are run. + All conventions found must have a parameterless public constructor. + + The assembly containing conventions to be added. + + + + Enables one or more conventions for the . + + The conventions to be enabled. + + + + Enables a convention for the . + + The type of the convention to be enabled. + + + + Enables a convention for the . This convention + will run after the one specified. + + The type of the convention after which the enabled one will run. + The convention to enable. + + + + Enables a configuration convention for the . This convention + will run before the one specified. + + The type of the convention before which the enabled one will run. + The convention to enable. + + + + Disables one or more conventions for the . + + The conventions to be disabled. + + + + Disables a convention for the . + The default conventions that are available for removal can be found in the + System.Data.Entity.ModelConfiguration.Conventions namespace. + + The type of the convention to be disabled. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Configures the table and column mapping for an entity type or a sub-set of properties from an entity type. + This configuration functionality is available via the Code First Fluent API, see . + + The entity type to be mapped. + + + Initializes a new instance of the class. + + + + Configures the properties that will be included in this mapping fragment. + If this method is not called then all properties that have not yet been + included in a mapping fragment will be configured. + + An anonymous type including the properties to be mapped. + A lambda expression to an anonymous type that contains the properties to be mapped. C#: t => new { t.Id, t.Property1, t.Property2 } VB.Net: Function(t) New With { p.Id, t.Property1, t.Property2 } + + + + Configures a property that is included in this mapping fragment. + + The type of the property being configured. + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is included in this mapping fragment. + + The type of the property being configured. + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is included in this mapping fragment. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is included in this mapping fragment. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is included in this mapping fragment. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is included in this mapping fragment. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is included in this mapping fragment. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is included in this mapping fragment. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is included in this mapping fragment. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is included in this mapping fragment. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is included in this mapping fragment. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is included in this mapping fragment. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is included in this mapping fragment. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Configures a property that is included in this mapping fragment. + + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to configure the property. + + + + Re-maps all properties inherited from base types. + When configuring a derived type to be mapped to a separate table this will cause all properties to + be included in the table rather than just the non-inherited properties. This is known as + Table per Concrete Type (TPC) mapping. + + The same configuration instance so that multiple calls can be chained. + + + + Configures the table name to be mapped to. + + Name of the table. + The same configuration instance so that multiple calls can be chained. + + + + Configures the table name and schema to be mapped to. + + Name of the table. + Schema of the table. + The same configuration instance so that multiple calls can be chained. + + + + Sets an annotation in the model for the table to which this entity is mapped. The annotation + value can later be used when processing the table such as when creating migrations. + + + It will likely be necessary to register a if the type of + the annotation value is anything other than a string. Passing a null value clears any annotation with + the given name on the column that had been previously set. + + The annotation name, which must be a valid C#/EDM identifier. + The annotation value, which may be a string or some other type that + can be serialized with an . + The same configuration instance so that multiple calls can be chained. + + + + Configures the discriminator column used to differentiate between types in an inheritance hierarchy. + + The name of the discriminator column. + A configuration object to further configure the discriminator column and values. + + + + Configures the discriminator condition used to differentiate between types in an inheritance hierarchy. + + The type of the property being used to discriminate between types. + A lambda expression representing the property being used to discriminate between types. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object to further configure the discriminator condition. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Used to configure a column with length facets for an entity type or complex type. This configuration functionality is exposed by the Code First Fluent API, see . + + + + + Configures a primitive column from an entity type. + + + + Configures the primitive column to be optional. + The same instance so that multiple calls can be chained. + + + Configures the primitive column to be required. + The same instance so that multiple calls can be chained. + + + Configures the data type of the primitive column used to store the property. + The same instance so that multiple calls can be chained. + The name of the database provider specific data type. + + + Configures the order of the primitive column used to store the property. This method is also used to specify key ordering when an entity type has a composite key. + The same instance so that multiple calls can be chained. + The order that this column should appear in the database table. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + Configures the column to allow the maximum length supported by the database provider. + The same instance so that multiple calls can be chained. + + + Configures the column to have the specified maximum length. + The same instance so that multiple calls can be chained. + The maximum length for the column. Setting the value to null will remove any maximum length restriction from the column and a default length will be used for the database column. + + + Configures the column to be fixed length. + The same instance so that multiple calls can be chained. + + + Configures the column to be variable length. + The same instance so that multiple calls can be chained. + + + + + + + + + + + + + + + + Configures a condition used to discriminate between types in an inheritance hierarchy based on the values assigned to a property. + This configuration functionality is available via the Code First Fluent API, see . + + + + + Configures the condition to require a value in the property. + Rows that do not have a value assigned to column that this property is stored in are + assumed to be of the base type of this entity type. + + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Configures a database column used to store a string values. + This configuration functionality is available via the Code First Fluent API, see . + + + + + Configures the column to allow the maximum length supported by the database provider. + + The same StringColumnConfiguration instance so that multiple calls can be chained. + + + + Configures the property to have the specified maximum length. + + + The maximum length for the property. Setting 'null' will result in a default length being used for the column. + + The same StringColumnConfiguration instance so that multiple calls can be chained. + + + + Configures the column to be fixed length. + Use HasMaxLength to set the length that the property is fixed to. + + The same StringColumnConfiguration instance so that multiple calls can be chained. + + + + Configures the column to be variable length. + Columns are variable length by default. + + The same StringColumnConfiguration instance so that multiple calls can be chained. + + + + Configures the column to be optional. + + The same StringColumnConfiguration instance so that multiple calls can be chained. + + + + Configures the column to be required. + + The same StringColumnConfiguration instance so that multiple calls can be chained. + + + + Configures the data type of the database column. + + Name of the database provider specific data type. + The same StringColumnConfiguration instance so that multiple calls can be chained. + + + + Configures the order of the database column. + + The order that this column should appear in the database table. + The same StringColumnConfiguration instance so that multiple calls can be chained. + + + + Configures the column to support Unicode string content. + + The same StringColumnConfiguration instance so that multiple calls can be chained. + + + + Configures whether or not the column supports Unicode string content. + + Value indicating if the column supports Unicode string content or not. Specifying 'null' will remove the Unicode facet from the column. Specifying 'null' will cause the same runtime behavior as specifying 'false'. + The same StringColumnConfiguration instance so that multiple calls can be chained. + + + + + + + + + + + + + + + + Configures a discriminator column used to differentiate between types in an inheritance hierarchy. + This configuration functionality is available via the Code First Fluent API, see . + + + + + Configures the discriminator value used to identify the entity type being + configured from other types in the inheritance hierarchy. + + Type of the discriminator value. + The value to be used to identify the entity type. + A configuration object to configure the column used to store discriminator values. + + + + Configures the discriminator value used to identify the entity type being + configured from other types in the inheritance hierarchy. + + Type of the discriminator value. + The value to be used to identify the entity type. + A configuration object to configure the column used to store discriminator values. + + + + Configures the discriminator value used to identify the entity type being + configured from other types in the inheritance hierarchy. + + The value to be used to identify the entity type. + A configuration object to configure the column used to store discriminator values. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Configures a many relationship from an entity type. + + The entity type that the relationship originates from. + The entity type that the relationship targets. + + + + Configures the relationship to be many:many with a navigation property on the other side of the relationship. + + An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to further configure the relationship. + + + + Configures the relationship to be many:many without a navigation property on the other side of the relationship. + + A configuration object that can be used to further configure the relationship. + + + + Configures the relationship to be many:required with a navigation property on the other side of the relationship. + + An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to further configure the relationship. + + + + Configures the relationship to be many:required without a navigation property on the other side of the relationship. + + A configuration object that can be used to further configure the relationship. + + + + Configures the relationship to be many:optional with a navigation property on the other side of the relationship. + + An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to further configure the relationship. + + + + Configures the relationship to be many:optional without a navigation property on the other side of the relationship. + + A configuration object that can be used to further configure the relationship. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Configures an optional relationship from an entity type. + + The entity type that the relationship originates from. + The entity type that the relationship targets. + + + + Configures the relationship to be optional:many with a navigation property on the other side of the relationship. + + An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to further configure the relationship. + + + + Configures the relationship to be optional:many without a navigation property on the other side of the relationship. + + A configuration object that can be used to further configure the relationship. + + + + Configures the relationship to be optional:required with a navigation property on the other side of the relationship. + + An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to further configure the relationship. + + + + Configures the relationship to be optional:required without a navigation property on the other side of the relationship. + + A configuration object that can be used to further configure the relationship. + + + + Configures the relationship to be optional:optional with a navigation property on the other side of the relationship. + The entity type being configured will be the dependent and contain a foreign key to the principal. + The entity type that the relationship targets will be the principal in the relationship. + + An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to further configure the relationship. + + + + Configures the relationship to be optional:optional without a navigation property on the other side of the relationship. + The entity type being configured will be the dependent and contain a foreign key to the principal. + The entity type that the relationship targets will be the principal in the relationship. + + A configuration object that can be used to further configure the relationship. + + + + Configures the relationship to be optional:optional with a navigation property on the other side of the relationship. + The entity type being configured will be the principal in the relationship. + The entity type that the relationship targets will be the dependent and contain a foreign key to the principal. + + A lambda expression representing the navigation property on the other end of the relationship. + A configuration object that can be used to further configure the relationship. + + + + Configures the relationship to be optional:optional without a navigation property on the other side of the relationship. + The entity type being configured will be the principal in the relationship. + The entity type that the relationship targets will be the dependent and contain a foreign key to the principal. + + A configuration object that can be used to further configure the relationship. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Configures an required relationship from an entity type. + + The entity type that the relationship originates from. + The entity type that the relationship targets. + + + + Configures the relationship to be required:many with a navigation property on the other side of the relationship. + + An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to further configure the relationship. + + + + Configures the relationship to be required:many without a navigation property on the other side of the relationship. + + A configuration object that can be used to further configure the relationship. + + + + Configures the relationship to be required:optional with a navigation property on the other side of the relationship. + + An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to further configure the relationship. + + + + Configures the relationship to be required:optional without a navigation property on the other side of the relationship. + + A configuration object that can be used to further configure the relationship. + + + + Configures the relationship to be required:required with a navigation property on the other side of the relationship. + The entity type being configured will be the dependent and contain a foreign key to the principal. + The entity type that the relationship targets will be the principal in the relationship. + + An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to further configure the relationship. + + + + Configures the relationship to be required:required without a navigation property on the other side of the relationship. + The entity type being configured will be the dependent and contain a foreign key to the principal. + The entity type that the relationship targets will be the principal in the relationship. + + A configuration object that can be used to further configure the relationship. + + + + Configures the relationship to be required:required with a navigation property on the other side of the relationship. + The entity type being configured will be the principal in the relationship. + The entity type that the relationship targets will be the dependent and contain a foreign key to the principal. + + An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to further configure the relationship. + + + + Configures the relationship to be required:required without a navigation property on the other side of the relationship. + The entity type being configured will be the principal in the relationship. + The entity type that the relationship targets will be the dependent and contain a foreign key to the principal. + + A configuration object that can be used to further configure the relationship. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Base class for performing configuration of a relationship. + This configuration functionality is available via the Code First Fluent API, see . + + + + + Configures a relationship that can support cascade on delete functionality. + + + + + Configures cascade delete to be on for the relationship. + + + + + Configures whether or not cascade delete is on for the relationship. + + Value indicating if cascade delete is on or not. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Configures a relationship that can support foreign key properties that are exposed in the object model. + This configuration functionality is available via the Code First Fluent API, see . + + The dependent entity type. + + + + Configures a relationship that can only support foreign key properties that are not exposed in the object model. + This configuration functionality is available via the Code First Fluent API, see . + + + + + Configures the relationship to use foreign key property(s) that are not exposed in the object model. + The column(s) and table can be customized by specifying a configuration action. + If an empty configuration action is specified then column name(s) will be generated by convention. + If foreign key properties are exposed in the object model then use the HasForeignKey method. + Not all relationships support exposing foreign key properties in the object model. + + Action that configures the foreign key column(s) and table. + A configuration object that can be used to further configure the relationship. + + + + + + + + + + + + + + + + Configures the relationship to use foreign key property(s) that are exposed in the object model. + If the foreign key property(s) are not exposed in the object model then use the Map method. + + The type of the key. + A lambda expression representing the property to be used as the foreign key. If the foreign key is made up of multiple properties then specify an anonymous type including the properties. When using multiple foreign key properties, the properties must be specified in the same order that the the primary key properties were configured for the principal entity type. + A configuration object that can be used to further configure the relationship. + + + + + + + + + + + + + + + + Configures the table and column mapping of a relationship that does not expose foreign key properties in the object model. + This configuration functionality is available via the Code First Fluent API, see . + + + + + Configures the name of the column(s) for the foreign key. + + The foreign key column names. When using multiple foreign key properties, the properties must be specified in the same order that the the primary key properties were configured for the target entity type. + The same ForeignKeyAssociationMappingConfiguration instance so that multiple calls can be chained. + + + + Sets an annotation in the model for a database column that has been configured with . + The annotation value can later be used when processing the column such as when creating migrations. + + + It will likely be necessary to register a if the type of + the annotation value is anything other than a string. Passing a null value clears any annotation with + the given name on the column that had been previously set. + + The name of the column that was configured with the HasKey method. + The annotation name, which must be a valid C#/EDM identifier. + The annotation value, which may be a string or some other type that + can be serialized with an . + The same ForeignKeyAssociationMappingConfiguration instance so that multiple calls can be chained. + + + + Configures the table name that the foreign key column(s) reside in. + The table that is specified must already be mapped for the entity type. + If you want the foreign key(s) to reside in their own table then use the Map method + on to perform + entity splitting to create the table with just the primary key property. Foreign keys can + then be added to the table via this method. + + Name of the table. + The same ForeignKeyAssociationMappingConfiguration instance so that multiple calls can be chained. + + + + Configures the table name and schema that the foreign key column(s) reside in. + The table that is specified must already be mapped for the entity type. + If you want the foreign key(s) to reside in their own table then use the Map method + on to perform + entity splitting to create the table with just the primary key property. Foreign keys can + then be added to the table via this method. + + Name of the table. + Schema of the table. + The same ForeignKeyAssociationMappingConfiguration instance so that multiple calls can be chained. + + + + + + + + + + + + + + + + + + + Configures the table and column mapping of a many:many relationship. + This configuration functionality is available via the Code First Fluent API, see . + + + + + Configures the join table name for the relationship. + + Name of the table. + The same ManyToManyAssociationMappingConfiguration instance so that multiple calls can be chained. + + + + Configures the join table name and schema for the relationship. + + Name of the table. + Schema of the table. + The same ManyToManyAssociationMappingConfiguration instance so that multiple calls can be chained. + + + + Sets an annotation in the model for the join table. The annotation value can later be used when + processing the table such as when creating migrations. + + + It will likely be necessary to register a if the type of + the annotation value is anything other than a string. Passing a null value clears any annotation with + the given name on the column that had been previously set. + + The annotation name, which must be a valid C#/EDM identifier. + The annotation value, which may be a string or some other type that + can be serialized with an . + The same configuration instance so that multiple calls can be chained. + + + + Configures the name of the column(s) for the left foreign key. + The left foreign key points to the parent entity of the navigation property specified in the HasMany call. + + The foreign key column names. When using multiple foreign key properties, the properties must be specified in the same order that the the primary key properties were configured for the target entity type. + The same ManyToManyAssociationMappingConfiguration instance so that multiple calls can be chained. + + + + Configures the name of the column(s) for the right foreign key. + The right foreign key points to the parent entity of the the navigation property specified in the WithMany call. + + The foreign key column names. When using multiple foreign key properties, the properties must be specified in the same order that the the primary key properties were configured for the target entity type. + The same ManyToManyAssociationMappingConfiguration instance so that multiple calls can be chained. + + + + + + Determines whether the specified object is equal to the current object. + true if the specified object is equal to the current object; otherwise, false. + The object to compare with the current object. + + + + + + + + + + + + + Configures a many:many relationship. + This configuration functionality is available via the Code First Fluent API, see . + + The type of the parent entity of the navigation property specified in the HasMany call. + The type of the parent entity of the navigation property specified in the WithMany call. + + + + Configures the foreign key column(s) and table used to store the relationship. + + Action that configures the foreign key column(s) and table. + The same instance so that multiple calls can be chained. + + + + Configures stored procedures to be used for modifying this relationship. + The default conventions for procedure and parameter names will be used. + + The same instance so that multiple calls can be chained. + + + + Configures stored procedures to be used for modifying this relationship. + + + Configuration to override the default conventions for procedure and parameter names. + + The same instance so that multiple calls can be chained. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Used to configure a property of an entity type or complex type. + This configuration functionality is available via the Code First Fluent API, see . + + + + + Used to configure a property with length facets for an entity type or complex type. + This configuration functionality is available via the Code First Fluent API, see . + + + + + Used to configure a primitive property of an entity type or complex type. + This configuration functionality is available via the Code First Fluent API, see . + + + + + Configures the property to be optional. + The database column used to store this property will be nullable. + + The same PrimitivePropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to be required. + The database column used to store this property will be non-nullable. + + The same PrimitivePropertyConfiguration instance so that multiple calls can be chained. + + + + Configures how values for the property are generated by the database. + + + The pattern used to generate values for the property in the database. + Setting 'null' will cause the default option to be used, which may be 'None', 'Identity', or 'Computed' depending + on the type of the property, its semantics in the model (e.g. primary keys are treated differently), and which + set of conventions are being used. + + The same PrimitivePropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to be used as an optimistic concurrency token. + + The same PrimitivePropertyConfiguration instance so that multiple calls can be chained. + + + + Configures whether or not the property is to be used as an optimistic concurrency token. + + Value indicating if the property is a concurrency token or not. Specifying 'null' will remove the concurrency token facet from the property. Specifying 'null' will cause the same runtime behavior as specifying 'false'. + The same PrimitivePropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the data type of the database column used to store the property. + + Name of the database provider specific data type. + The same PrimitivePropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the name of the database column used to store the property. + + The name of the column. + The same PrimitivePropertyConfiguration instance so that multiple calls can be chained. + + + + Sets an annotation in the model for the database column used to store the property. The annotation + value can later be used when processing the column such as when creating migrations. + + + It will likely be necessary to register a if the type of + the annotation value is anything other than a string. Passing a null value clears any annotation with + the given name on the column that had been previously set. + + The annotation name, which must be a valid C#/EDM identifier. + The annotation value, which may be a string or some other type that + can be serialized with an . + The same PrimitivePropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the name of the parameter used in stored procedures for this property. + + Name of the parameter. + The same PrimitivePropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the order of the database column used to store the property. + This method is also used to specify key ordering when an entity type has a composite key. + + The order that this column should appear in the database table. + The same PrimitivePropertyConfiguration instance so that multiple calls can be chained. + + + + + + + + + + + + + Gets the of the current instance. + + The exact runtime type of the current instance. + + + + Configures the property to allow the maximum length supported by the database provider. + + The same LengthPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to have the specified maximum length. + + The maximum length for the property. Setting 'null' will remove any maximum length restriction from the property and a default length will be used for the database column. + The same LengthPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to be fixed length. + Use HasMaxLength to set the length that the property is fixed to. + + The same LengthPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to be variable length. + Properties are variable length by default. + + The same LengthPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to allow the maximum length supported by the database provider. + + The same BinaryPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to have the specified maximum length. + + The maximum length for the property. Setting 'null' will remove any maximum length restriction from the property. + The same BinaryPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to be fixed length. + Use HasMaxLength to set the length that the property is fixed to. + + The same BinaryPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to be variable length. + properties are variable length by default. + + The same BinaryPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to be optional. + The database column used to store this property will be nullable. + properties are optional by default. + + The same BinaryPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to be required. + The database column used to store this property will be non-nullable. + + The same BinaryPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures how values for the property are generated by the database. + + + The pattern used to generate values for the property in the database. + Setting 'null' will cause the default option to be used, which may be 'None', 'Identity', or 'Computed' depending + on the type of the property, its semantics in the model (e.g. primary keys are treated differently), and which + set of conventions are being used. + + The same BinaryPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to be used as an optimistic concurrency token. + + The same BinaryPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures whether or not the property is to be used as an optimistic concurrency token. + + Value indicating if the property is a concurrency token or not. Specifying 'null' will remove the concurrency token facet from the property. Specifying 'null' will cause the same runtime behavior as specifying 'false'. + The same BinaryPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the name of the database column used to store the property. + + The name of the column. + The same BinaryPropertyConfiguration instance so that multiple calls can be chained. + + + + Sets an annotation in the model for the database column used to store the property. The annotation + value can later be used when processing the column such as when creating migrations. + + + It will likely be necessary to register a if the type of + the annotation value is anything other than a string. Passing a null value clears any annotation with + the given name on the column that had been previously set. + + The annotation name, which must be a valid C#/EDM identifier. + The annotation value, which may be a string or some other type that + can be serialized with an . + The same BinaryPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the data type of the database column used to store the property. + + Name of the database provider specific data type. + The same BinaryPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the order of the database column used to store the property. + This method is also used to specify key ordering when an entity type has a composite key. + + The order that this column should appear in the database table. + The same BinaryPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to be a row version in the database. + The actual data type will vary depending on the database provider being used. + Setting the property to be a row version will automatically configure it to be an + optimistic concurrency token. + + The same BinaryPropertyConfiguration instance so that multiple calls can be chained. + + + + Used to configure a property of an entity type or complex type. + This configuration functionality is available via the Code First Fluent API, see . + + + + + Configures the property to be optional. + The database column used to store this property will be nullable. + + The same DateTimePropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to be required. + The database column used to store this property will be non-nullable. + properties are required by default. + + The same DateTimePropertyConfiguration instance so that multiple calls can be chained. + + + + Configures how values for the property are generated by the database. + + + The pattern used to generate values for the property in the database. + Setting 'null' will cause the default option to be used, which may be 'None', 'Identity', or 'Computed' depending + on the type of the property, its semantics in the model (e.g. primary keys are treated differently), and which + set of conventions are being used. + + The same DateTimePropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to be used as an optimistic concurrency token. + + The same DateTimePropertyConfiguration instance so that multiple calls can be chained. + + + + Configures whether or not the property is to be used as an optimistic concurrency token. + + Value indicating if the property is a concurrency token or not. Specifying 'null' will remove the concurrency token facet from the property. Specifying 'null' will cause the same runtime behavior as specifying 'false'. + The same DateTimePropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the name of the database column used to store the property. + + The name of the column. + The same DateTimePropertyConfiguration instance so that multiple calls can be chained. + + + + Sets an annotation in the model for the database column used to store the property. The annotation + value can later be used when processing the column such as when creating migrations. + + + It will likely be necessary to register a if the type of + the annotation value is anything other than a string. Passing a null value clears any annotation with + the given name on the column that had been previously set. + + The annotation name, which must be a valid C#/EDM identifier. + The annotation value, which may be a string or some other type that + can be serialized with an . + The same DateTimePropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the data type of the database column used to store the property. + + Name of the database provider specific data type. + The same DateTimePropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the order of the database column used to store the property. + This method is also used to specify key ordering when an entity type has a composite key. + + The order that this column should appear in the database table. + The same DateTimePropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the precision of the property. + If the database provider does not support precision for the data type of the column then the value is ignored. + + Precision of the property. + The same DateTimePropertyConfiguration instance so that multiple calls can be chained. + + + + Used to configure a property of an entity type or complex type. + This configuration functionality is available via the Code First Fluent API, see . + + + + + Configures the property to be optional. + The database column used to store this property will be nullable. + + The same DecimalPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to be required. + The database column used to store this property will be non-nullable. + properties are required by default. + + The same DecimalPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures how values for the property are generated by the database. + + + The pattern used to generate values for the property in the database. + Setting 'null' will cause the default option to be used, which may be 'None', 'Identity', or 'Computed' depending + on the type of the property, its semantics in the model (e.g. primary keys are treated differently), and which + set of conventions are being used. + + The same DecimalPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to be used as an optimistic concurrency token. + + The same DecimalPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures whether or not the property is to be used as an optimistic concurrency token. + + Value indicating if the property is a concurrency token or not. Specifying 'null' will remove the concurrency token facet from the property. Specifying 'null' will cause the same runtime behavior as specifying 'false'. + The same DecimalPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the name of the database column used to store the property. + + The name of the column. + The same DecimalPropertyConfiguration instance so that multiple calls can be chained. + + + + Sets an annotation in the model for the database column used to store the property. The annotation + value can later be used when processing the column such as when creating migrations. + + + It will likely be necessary to register a if the type of + the annotation value is anything other than a string. Passing a null value clears any annotation with + the given name on the column that had been previously set. + + The annotation name, which must be a valid C#/EDM identifier. + The annotation value, which may be a string or some other type that + can be serialized with an . + The same DecimalPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the data type of the database column used to store the property. + + Name of the database provider specific data type. + The same DecimalPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the order of the database column used to store the property. + This method is also used to specify key ordering when an entity type has a composite key. + + The order that this column should appear in the database table. + The same DecimalPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the precision and scale of the property. + + The precision of the property. + The scale of the property. + The same DecimalPropertyConfiguration instance so that multiple calls can be chained. + + + + Used to configure a property of an entity type or complex type. + This configuration functionality is available via the Code First Fluent API, see . + + + + + Configures the property to allow the maximum length supported by the database provider. + + The same StringPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to have the specified maximum length. + + The maximum length for the property. Setting 'null' will remove any maximum length restriction from the property and a default length will be used for the database column.. + The same StringPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to be fixed length. + Use HasMaxLength to set the length that the property is fixed to. + + The same StringPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to be variable length. + properties are variable length by default. + + The same StringPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to be optional. + The database column used to store this property will be nullable. + properties are optional by default. + + The same StringPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to be required. + The database column used to store this property will be non-nullable. + + The same StringPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures how values for the property are generated by the database. + + + The pattern used to generate values for the property in the database. + Setting 'null' will cause the default option to be used, which may be 'None', 'Identity', or 'Computed' depending + on the type of the property, its semantics in the model (e.g. primary keys are treated differently), and which + set of conventions are being used. + + The same StringPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to be used as an optimistic concurrency token. + + The same StringPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures whether or not the property is to be used as an optimistic concurrency token. + + Value indicating if the property is a concurrency token or not. Specifying 'null' will remove the concurrency token facet from the property. Specifying 'null' will cause the same runtime behavior as specifying 'false'. + The same StringPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the name of the database column used to store the property. + + The name of the column. + The same StringPropertyConfiguration instance so that multiple calls can be chained. + + + + Sets an annotation in the model for the database column used to store the property. The annotation + value can later be used when processing the column such as when creating migrations. + + + It will likely be necessary to register a if the type of + the annotation value is anything other than a string. Passing a null value clears any annotation with + the given name on the column that had been previously set. + + The annotation name, which must be a valid C#/EDM identifier. + The annotation value, which may be a string or some other type that + can be serialized with an . + The same StringPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the data type of the database column used to store the property. + + Name of the database provider specific data type. + The same StringPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the order of the database column used to store the property. + This method is also used to specify key ordering when an entity type has a composite key. + + The order that this column should appear in the database table. + The same StringPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures the property to support Unicode string content. + + The same StringPropertyConfiguration instance so that multiple calls can be chained. + + + + Configures whether or not the property supports Unicode string content. + + Value indicating if the property supports Unicode string content or not. Specifying 'null' will remove the Unicode facet from the property. Specifying 'null' will cause the same runtime behavior as specifying 'false'. + The same StringPropertyConfiguration instance so that multiple calls can be chained. + + + + Convention to process instances of found on properties in the model + + + + + + + + Convention to process instances of found on properties in the model. + + + + + + + + Convention to process instances of found on properties in the model. + + + + + + + + Convention to process instances of found on foreign key properties in the model. + + + + + + + + Convention to process instances of found on properties in the model. + + + + + + + + Convention to process instances of found on properties in the model. + + + + + Convention to process instances of found on properties in the model. + + + + + + + + Convention to process instances of found on properties in the model. + + + + + + + + Convention to process instances of found on navigation properties in the model. + + + + + Convention to process instances of found on primitive properties in the model. + + + + + + + + Convention to process instances of found on properties in the model. + + + + + + + + Convention to process instances of found on properties in the model. + + + + + + + + Convention to process instances of found on types in the model. + + + + + + + + Convention to process instances of found on types in the model. + + + + + + + + Convention to process instances of found on types in the model. + + + + + + + + Convention to detect navigation properties to be inverses of each other when only one pair + of navigation properties exists between the related types. + + + + + + + + Convention to configure a type as a complex type if it has no primary key, no mapped base type and no navigation properties. + + + + + + + + Convention to add a cascade delete to the join table from both tables involved in a many to many relationship. + + + + + Convention to ensure an invalid/unsupported mapping is not created when mapping inherited properties + + + + + Convention to set the table name to be a pluralized version of the entity type name. + + + + + + + + Convention to set precision to 18 and scale to 2 for decimal properties. + + + + + Initializes a new instance of with the default precision and scale. + + + + + Initializes a new instance of with the specified precision and scale. + + Precision + Scale + + + + + + + Convention to move primary key properties to appear first. + + + + + + + + Convention to distinguish between optional and required relationships based on CLR nullability of the foreign key property. + + + + + + + + Base class for conventions that discover foreign key properties. + + + + + When overriden returns true if should be part of the foreign key. + + The association type being configured. + The dependent end. + The candidate property on the dependent end. + The principal end entity type. + A key property on the principal end that is a candidate target for the foreign key. + true if dependentProperty should be a part of the foreign key; otherwise, false. + + + + + + + Returns true if the convention supports pairs of entity types that have multiple associations defined between them. + + + + + Convention to process instances of found on navigation properties in the model. + + + + + + + + Convention to detect primary key properties. + Recognized naming patterns in order of precedence are: + 1. 'Id' + 2. [type name]Id + Primary key detection is case insensitive. + + + + + Base class for conventions that discover primary key properties. + + + + + + + + When overriden returns the subset of properties that will be part of the primary key. + + The entity type. + The primitive types of the entities + The properties that should be part of the primary key. + + + + + + + Convention to discover foreign key properties whose names are a combination + of the dependent navigation property name and the principal type primary key property name(s). + + + + + + + + + + + Convention to enable cascade delete for any required relationships. + + + + + + + + Convention to configure the primary key(s) of the dependent entity type as foreign key(s) in a one:one relationship. + + + + + + + + Convention to set the entity set name to be a pluralized version of the entity type name. + + + + + + + + Convention to discover foreign key properties whose names match the principal type primary key property name(s). + + + + + + + + Convention to set a maximum length for properties whose type supports length facets. The default value is 128. + + + + + Initializes a new instance of with the default length. + + + + + Initializes a new instance of with the specified length. + + The maximum lenght of properties. + + + + + + + + + + + + + Convention to set a default maximum length of 4000 for properties whose type supports length facets when SqlCe is the provider. + + + + + Initializes a new instance of with the default length. + + + + + Initializes a new instance of with the specified length. + + The default maximum length for properties. + + + + + + + + + + Convention to configure integer primary keys to be identity. + + + + + + + + Convention to discover foreign key properties whose names are a combination + of the principal type name and the principal type primary key property name(s). + + + + + + + + Allows configuration to be performed for an entity type in a model. + An EntityTypeConfiguration can be obtained via the Entity method on + or a custom type derived from EntityTypeConfiguration + can be registered via the Configurations property on . + + The entity type being configured. + + + + Initializes a new instance of EntityTypeConfiguration + + + + + Configures the primary key property(s) for this entity type. + + The type of the key. + A lambda expression representing the property to be used as the primary key. C#: t => t.Id VB.Net: Function(t) t.Id If the primary key is made up of multiple properties then specify an anonymous type including the properties. C#: t => new { t.Id1, t.Id2 } VB.Net: Function(t) New With { t.Id1, t.Id2 } + The same EntityTypeConfiguration instance so that multiple calls can be chained. + + + + Configures the primary key property(s) for this entity type. + + The type of the key. + A lambda expression representing the property to be used as the primary key. C#: t => t.Id VB.Net: Function(t) t.Id If the primary key is made up of multiple properties then specify an anonymous type including the properties. C#: t => new { t.Id1, t.Id2 } VB.Net: Function(t) New With { t.Id1, t.Id2 } + A builder to configure the key. + The same EntityTypeConfiguration instance so that multiple calls can be chained. + + + + Configures index property(s) for this entity type. + + The type of the index. + A lambda expression representing the property to apply an index to. C#: t => t.Id VB.Net: Function(t) t.Id If the index is made up of multiple properties then specify an anonymous type including the properties. C#: t => new { t.Id1, t.Id2 } VB.Net: Function(t) New With { t.Id1, t.Id2 } + The IndexConfiguration instance so that the index can be further configured. + + + + Configures the entity set name to be used for this entity type. + The entity set name can only be configured for the base type in each set. + + The name of the entity set. + The same EntityTypeConfiguration instance so that multiple calls can be chained. + + + + Excludes a property from the model so that it will not be mapped to the database. + + The type of the property to be ignored. + A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + The same EntityTypeConfiguration instance so that multiple calls can be chained. + + + + Configures the table name that this entity type is mapped to. + + The name of the table. + The same EntityTypeConfiguration instance so that multiple calls can be chained. + + + + Configures the table name that this entity type is mapped to. + + The name of the table. + The database schema of the table. + The same EntityTypeConfiguration instance so that multiple calls can be chained. + + + + Sets an annotation in the model for the table to which this entity is mapped. The annotation + value can later be used when processing the table such as when creating migrations. + + + It will likely be necessary to register a if the type of + the annotation value is anything other than a string. Passing a null value clears any annotation with + the given name on the column that had been previously set. + + The annotation name, which must be a valid C#/EDM identifier. + The annotation value, which may be a string or some other type that + can be serialized with an . + The same configuration instance so that multiple calls can be chained. + + + + Configures this type to use stored procedures for insert, update and delete. + The default conventions for procedure and parameter names will be used. + + The same configuration instance so that multiple calls can be chained. + + + + Configures this type to use stored procedures for insert, update and delete. + + + Configuration to override the default conventions for procedure and parameter names. + + The same configuration instance so that multiple calls can be chained. + + + + Allows advanced configuration related to how this entity type is mapped to the database schema. + By default, any configuration will also apply to any type derived from this entity type. + Derived types can be configured via the overload of Map that configures a derived type or + by using an EntityTypeConfiguration for the derived type. + The properties of an entity can be split between multiple tables using multiple Map calls. + Calls to Map are additive, subsequent calls will not override configuration already preformed via Map. + + + An action that performs configuration against an + + . + + The same EntityTypeConfiguration instance so that multiple calls can be chained. + + + + Allows advanced configuration related to how a derived entity type is mapped to the database schema. + Calls to Map are additive, subsequent calls will not override configuration already preformed via Map. + + The derived entity type to be configured. + + An action that performs configuration against an + + . + + The same EntityTypeConfiguration instance so that multiple calls can be chained. + + + + Configures an optional relationship from this entity type. + Instances of the entity type will be able to be saved to the database without this relationship being specified. + The foreign key in the database will be nullable. + + The type of the entity at the other end of the relationship. + A lambda expression representing the navigation property for the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to further configure the relationship. + + + + Configures a required relationship from this entity type. + Instances of the entity type will not be able to be saved to the database unless this relationship is specified. + The foreign key in the database will be non-nullable. + + The type of the entity at the other end of the relationship. + A lambda expression representing the navigation property for the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to further configure the relationship. + + + + Configures a many relationship from this entity type. + + The type of the entity at the other end of the relationship. + A lambda expression representing the navigation property for the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty + A configuration object that can be used to further configure the relationship. + + + + + + + + + + + + + + + + Exception thrown by during model creation when an invalid model is generated. + + + + + Initializes a new instance of ModelValidationException + + + + + Initializes a new instance of ModelValidationException + + The exception message. + + + + Initializes a new instance of ModelValidationException + + The exception message. + The inner exception. + + + Initializes a new instance of class serialization info and streaming context. + The serialization info. + The streaming context. + + + + Exception thrown from when validating entities fails. + + + + + Initializes a new instance of DbEntityValidationException. + + + + + Initializes a new instance of DbEntityValidationException. + + The exception message. + + + + Initializes a new instance of DbEntityValidationException. + + The exception message. + Validation results. + + + + Initializes a new instance of DbEntityValidationException. + + The exception message. + The inner exception. + + + + Initializes a new instance of DbEntityValidationException. + + The exception message. + Validation results. + The inner exception. + + + + Validation results. + + + + + Represents validation results for single entity. + + + + + Creates an instance of class. + + Entity entry the results applies to. Never null. + + List of instances. Never null. Can be empty meaning the entity is valid. + + + + + Gets an instance of the results applies to. + + + + + Gets validation errors. Never null. + + + + + Gets an indicator if the entity is valid. + + + + + Exception thrown from when an exception is thrown from the validation + code. + + + + + Initializes a new instance of DbUnexpectedValidationException. + + + + + Initializes a new instance of DbUnexpectedValidationException. + + The exception message. + + + + Initializes a new instance of DbUnexpectedValidationException. + + The exception message. + The inner exception. + + + + Initializes a new instance of DbUnexpectedValidationException with the specified serialization info and + context. + + The serialization info. + The streaming context. + + + + Validation error. Can be either entity or property level validation error. + + + + + Creates an instance of . + + Name of the invalid property. Can be null. + Validation error message. Can be null. + + + + Gets name of the invalid property. + + + + + Gets validation error message. + + + + diff --git a/北京北汽/SCP/DLL/FineUI.dll b/北京北汽/SCP/DLL/FineUI.dll new file mode 100644 index 0000000..4801bd7 Binary files /dev/null and b/北京北汽/SCP/DLL/FineUI.dll differ diff --git a/北京北汽/SCP/DLL/Interop.grsvr6Lib.dll b/北京北汽/SCP/DLL/Interop.grsvr6Lib.dll new file mode 100644 index 0000000..2886af3 Binary files /dev/null and b/北京北汽/SCP/DLL/Interop.grsvr6Lib.dll differ diff --git a/北京北汽/SCP/DLL/NPOI.OOXML.dll b/北京北汽/SCP/DLL/NPOI.OOXML.dll new file mode 100644 index 0000000..3e5512d Binary files /dev/null and b/北京北汽/SCP/DLL/NPOI.OOXML.dll differ diff --git a/北京北汽/SCP/DLL/NPOI.OpenXml4Net.dll b/北京北汽/SCP/DLL/NPOI.OpenXml4Net.dll new file mode 100644 index 0000000..6ebca8a Binary files /dev/null and b/北京北汽/SCP/DLL/NPOI.OpenXml4Net.dll differ diff --git a/北京北汽/SCP/DLL/NPOI.OpenXmlFormats.dll b/北京北汽/SCP/DLL/NPOI.OpenXmlFormats.dll new file mode 100644 index 0000000..ea3db09 Binary files /dev/null and b/北京北汽/SCP/DLL/NPOI.OpenXmlFormats.dll differ diff --git a/北京北汽/SCP/DLL/NPOI.dll b/北京北汽/SCP/DLL/NPOI.dll new file mode 100644 index 0000000..a18a4c9 Binary files /dev/null and b/北京北汽/SCP/DLL/NPOI.dll differ diff --git a/北京北汽/SCP/DLL/NPOI.xml b/北京北汽/SCP/DLL/NPOI.xml new file mode 100644 index 0000000..e81df50 --- /dev/null +++ b/北京北汽/SCP/DLL/NPOI.xml @@ -0,0 +1,43571 @@ + + + + NPOI + + + + Common abstract class for {@link EscherOptRecord} and + {@link EscherTertiaryOptRecord} + + @author Sergey Vladimirov (vlsergey {at} gmail {dot} com) + @author Glen Stampoultzis + + + + The base abstract record from which all escher records are defined. Subclasses will need + to define methods for serialization/deserialization and for determining the record size. + @author Glen Stampoultzis + + + + + Initializes a new instance of the class. + + + + + Delegates to FillFields(byte[], int, EscherRecordFactory) + + The data. + The f. + + + + + The contract of this method is to deSerialize an escher record including + it's children. + + The byte array containing the Serialized escher + records. + The offset into the byte array. + A factory for creating new escher records. + The number of bytes written. + + + + Reads the 8 byte header information and populates the + options + and + recordId + records. + + the byte array to Read from + the offset to start Reading from + the number of bytes remaining in this record. This + + + + Read the options field from header and return instance part of it. + + the byte array to read from + the offset to start reading from + value of instance part of options field + + + + Serializes to a new byte array. This is done by delegating to + Serialize(int, byte[]); + + the Serialized record. + + + + Serializes to an existing byte array without serialization listener. + This is done by delegating to Serialize(int, byte[], EscherSerializationListener). + + the offset within the data byte array. + the data array to Serialize to. + The number of bytes written. + + + + Serializes the record to an existing byte array. + + the offset within the byte array. + the offset within the byte array + a listener for begin and end serialization events. This. + is useful because the serialization is + hierarchical/recursive and sometimes you need to be able + break into that. + + + + + + Creates a new object that is a copy of the current instance. + + + A new object that is a copy of this instance. + + + + + Returns the indexed child record. + + The index. + + + + + The display methods allows escher variables to print the record names + according to their hierarchy. + + The current indent level. + + + @param tab - each children must be a right of his parent + @return xml representation of this record + + + + Determine whether this is a container record by inspecting the option + field. + + + true if this instance is container record; otherwise, false. + + + + + Gets or sets the options field for this record. All records have one + + The options. + + + + Subclasses should effeciently return the number of bytes required to + Serialize the record. + + number of bytes + + + + Return the current record id. + + The 16 bit record id. + + + + Gets or sets the child records. + + Returns the children of this record. By default this will + be an empty list. EscherCotainerRecord is the only record that may contain children. + + + + Gets the name of the record. + + The name of the record. + + + + Get or set the instance part of the option record. + + + + + Get or set the version part of the option record. + + + + + This class Reads the standard escher header. + + + + + Reads the header. + + The data. + The off set. + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets the options. + + The options. + + + + Gets the record id. + + The record id. + + + + Gets the remaining bytes. + + The remaining bytes. + + + Add a property to this record. + + + The list of properties stored by this record. + + + Records should be sorted by property number before being stored. + + + * Set an escher property. If a property with given propId already + exists it is replaced. + * + * @param value the property to set. + + + Retrieve the string representation of this record. + + + The list of properties stored by this record. + + + The following enum specifies values that indicate special procedural properties that + are used to modify the color components of another color. These values are combined with + those of the {@link SysIndexSource} enum or with a user-specified color. + The first six values are mutually exclusive. + + + An OfficeArtCOLORREF structure entry which also handles color extension opid data + + + @return {@link SysIndexSource} if {@link #hasSysIndexFlag()} is {@code true}, otherwise null + + + Return the {@link SysIndexProcedure} - for invert flag use {@link #getSysIndexInvert()} + @return {@link SysIndexProcedure} if {@link #hasSysIndexFlag()} is {@code true}, otherwise null + + + @return 0 for no invert flag, 1 for {@link SysIndexProcedure#INVERT_AFTER} and + 2 for {@link SysIndexProcedure#INVERT_HIGHBIT_AFTER} + + + @return index of the scheme color or -1 if {@link #hasSchemeIndexFlag()} is {@code false} + + @see NPOI.HSLF.Record.ColorSchemeAtom#getColor(int) + + + @return index of current palette (color) or -1 if {@link #hasPaletteIndexFlag()} is {@code false} + + + "The OfficeArtTertiaryFOPT record specifies a table of OfficeArtRGFOPTE properties, as defined in section 2.3.1." + -- [MS-ODRAW] -- v20110608; Office Drawing Binary File Format + + @author Sergey Vladimirov (vlsergey {at} gmail {dot} com) + + + A version of {@link POIDocument} which allows access to the + HPSF Properties, but no other document contents. + Normally used when you want to read or alter the Document Properties, + without affecting the rest of the file + + + + This holds the common functionality for all POI + Document classes. + Currently, this relates to Document Information Properties + + @author Nick Burch + + + Holds metadata on our document + + + Holds further metadata on our document + + + The directory that our document lives in + + + For our own logging use + + + + Initializes a new instance of the class. + + The dir. + The fs. + + + + Initializes a new instance of the class. + + The fs. + + + Will create whichever of SummaryInformation + and DocumentSummaryInformation (HPSF) properties + are not already part of your document. + This is normally useful when creating a new + document from scratch. + If the information properties are already there, + then nothing will happen. + + + + Find, and Create objects for, the standard + Documment Information Properties (HPSF). + If a given property Set is missing or corrupt, + it will remain null; + + + + + For a given named property entry, either return it or null if + if it wasn't found + + Name of the set. + + + + + Writes out the standard Documment Information Properties (HPSF) + + the POIFSFileSystem to Write the properties into + + + + Writes out the standard Documment Information Properties (HPSF) + + the POIFSFileSystem to Write the properties into. + a list of POIFS entries to Add the property names too. + + + + Writes out a given ProperySet + + the (POIFS Level) name of the property to Write. + the PropertySet to Write out. + the POIFSFileSystem to Write the property into. + + + + Writes the document out to the specified output stream + + The out1. + + + + Copies nodes from one POIFS to the other minus the excepts + + the source POIFS to copy from. + the target POIFS to copy to + a list of Strings specifying what nodes NOT to copy + + + + Copies nodes from one POIFS to the other minus the excepts + + the source POIFS to copy from. + the target POIFS to copy to + a list of Strings specifying what nodes NOT to copy + + + + Checks to see if the String is in the list, used when copying + nodes between one POIFS and another + + The entry. + The list. + + true if [is in list] [the specified entry]; otherwise, false. + + + + + Copies an Entry into a target POIFS directory, recursively + + The entry. + The target. + + + + Fetch the Document Summary Information of the document + + The document summary information. + + + + Fetch the Summary Information of the document + + The summary information. + + + Write out, with any properties changes, but nothing else + + + Checks to see if the specified length seems valid, + given the amount of data available still to read, + and the requirement that the string be NULL-terminated + + + The Character Encoding is not supported. + + @author Asmus Freytag + @since JDK1.1 + + + Constructs an UnsupportedEncodingException without a detail message. + + + Constructs an UnsupportedEncodingException with a detail message. + @param s Describes the reason for the exception. + + + A text extractor for old Excel files, which are too old for + HSSFWorkbook to handle. This includes Excel 95, and very old + (pre-OLE2) Excel files, such as Excel 4 files. +

+ Returns much (but not all) of the textual content of the file, + suitable for indexing by something like Apache Lucene, or used + by Apache Tika, but not really intended for display to the user. +

+
+ + The Biff version, largely corresponding to the Excel version + + + The kind of the file, one of {@link BOFRecord#TYPE_WORKSHEET}, + {@link BOFRecord#TYPE_CHART}, {@link BOFRecord#TYPE_EXCEL_4_MACRO} + or {@link BOFRecord#TYPE_WORKSPACE_FILE} + + + Retrieves the text contents of the file, as best we can + for these old file formats + + + + ATTACHEDLABEL = Text Begin Pos [FontX] [AlRuns] AI [FRAME] [ObjectLink] [DataLabExtContents] [CrtLayout12] [TEXTPROPS] [CRTMLFRT] End + AI = BRAI [SeriesText] + + + + RecordAggregates are groups of of BIFF Records that are typically stored + together and/or updated together. Workbook / Sheet records are typically stored in a sequential + list, which does not provide much structure to coordinate updates. + + @author Josh Micich + + + Common base class of {@link Record} and {@link RecordAggregate} + + @author Josh Micich + + + called by the class that is responsible for writing this sucker. + Subclasses should implement this so that their data is passed back in a + byte array. + + @param offset to begin writing at + @param data byte array containing instance data + @return number of bytes written + + + gives the current serialized size of the record. Should include the sid + and reclength (4 bytes). + + + Visit each of the atomic BIFF records contained in this {@link RecordAggregate} in the order + that they should be written to file. Implementors may or may not return the actual + {@link Record}s being used to manage POI's internal implementation. Callers should not + assume either way, and therefore only attempt to modify those {@link Record}s after cloning + + + Implementors may call non-mutating methods on Record r. + @param r must not be null + + + + AXES = [IVAXIS DVAXIS [SERIESAXIS] / DVAXIS DVAXIS] *3ATTACHEDLABEL [PlotArea FRAME] + + + + + AXISPARENT = AxisParent Begin Pos [AXES] 1*4CRT End + + + + + AXM = YMult StartObject ATTACHEDLABEL EndObject + + + + + AXS = [IFmtRecord] [Tick] [FontX] *4(AxisLine LineFormat) [AreaFormat] + [GELFRAME] *4SHAPEPROPS [TextPropsStream *ContinueFrt12] + + + + + CHARTFOMATS = Chart Begin *2FONTLIST Scl PlotGrowth [FRAME] *SERIESFORMAT *SS ShtProps + *2DFTTEXT AxesUsed 1*2AXISPARENT [CrtLayout12A] [DAT] *ATTACHEDLABEL [CRTMLFRT] + *([DataLabExt StartObject] ATTACHEDLABEL [EndObject]) [TEXTPROPS] *2CRTMLFRT End + + + + + CHARTSHEET = BOF CHARTSHEETCONTENT + CHARTSHEETCONTENT = [WriteProtect] [SheetExt] [WebPub] *HFPicture PAGESETUP PrintSize + [HeaderFooter] [BACKGROUND] *Fbi *Fbi2 [ClrtClient] [PROTECTION] [Palette] [SXViewLink] + [PivotChartBits] [SBaseRef] [MsoDrawingGroup] OBJECTS Units CHARTFOMATS SERIESDATA + *WINDOW *CUSTOMVIEW [CodeName] [CRTMLFRT] EOF + + + + All the records between BOF and EOF + + + + CRT = ChartFormat Begin (Bar / Line / (BopPop [BopPopCustom]) / Pie / Area / Scatter / Radar / + RadarArea / Surf) CrtLink [SeriesList] [Chart3d] [LD] [2DROPBAR] *4(CrtLine LineFormat) + *2DFTTEXT [DataLabExtContents] [SS] *4SHAPEPROPS End + + + + + CRTMLFRT = CrtMlFrt *CrtMlFrtContinue + + + + + DAT = Dat Begin LD End + + + + + DFTTEXT = [DataLabExt StartObject] DefaultText ATTACHEDLABEL [EndObject] + + + + + DROPBAR = DropBar Begin LineFormat AreaFormat [GELFRAME] [SHAPEPROPS] End + + + + + DVAXIS = Axis Begin [ValueRange] [AXM] AXS [CRTMLFRT] End + + + + + FONTLIST = FrtFontList StartObject *(Font [Fbi]) EndObject + + + + + FRAME = Frame Begin LineFormat AreaFormat [GELFRAME] [SHAPEPROPS] End + + + + + GELFRAME = 1*2GelFrame *Continue [PICF] + PICF = Begin PicF End + + + + + IVAXIS = Axis Begin [CatSerRange] AxcExt [CatLab] AXS [CRTMLFRT] End + + + + + LD = Legend Begin Pos ATTACHEDLABEL [FRAME] [CrtLayout12] [TEXTPROPS] [CRTMLFRT] End + + + + + SERIESAXIS = Axis Begin [CatSerRange] AXS [CRTMLFRT] End + + + + + SERIESDATA = Dimensions 3(SIIndex *(Number / BoolErr / Blank / Label)) + + + + + SERIESFORMAT = Series Begin 4AI *SS (SerToCrt / (SerParent (SerAuxTrend / SerAuxErrBar))) + *(LegendException [Begin ATTACHEDLABEL [TEXTPROPS] End]) End + + + + + LegendException [Begin ATTACHEDLABEL [TEXTPROPS] End] + + + + + SHAPEPROPS = ShapePropsStream *ContinueFrt12 + + + + + SS = DataFormat Begin [Chart3DBarShape] [LineFormat AreaFormat PieFormat] [SerFmt] + [GELFRAME] [MarkerFormat] [AttachedLabel] *2SHAPEPROPS [CRTMLFRT] End + + + + + TEXTPROPS = (RichTextStream / TextPropsStream) *ContinueFrt12 + + + + + The AlRuns record specifies Rich Text Formatting within chart + titles (section 2.2.3.3), trendline (section 2.2.3.12), and + data labels (section 2.2.3.11). + + + + Subclasses of this class (the majority of BIFF records) are non-continuable. This allows for + some simplification of serialization logic + + @author Josh Micich + + + Title: Record + Description: All HSSF Records inherit from this class. It + populates the fields common to all records (id, size and data). + Subclasses should be sure to validate the id, + Company: + @author Andrew C. Oliver + @author Marc Johnson (mjohnson at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + instantiates a blank record strictly for ID matching + + + called by the class that is responsible for writing this sucker. + Subclasses should implement this so that their data is passed back in a + byte array. + + @return byte array containing instance data + + + return the non static version of the id for this record. + + + + Write the data content of this BIFF record including the sid and record length. + The subclass must write the exact number of bytes as reported by Record#getRecordSize() + + offset + data + + + + Write the data content of this BIFF record. The 'ushort sid' and 'ushort size' header fields + have already been written by the superclass.
+ + The number of bytes written must equal the record size reported by + {@link Record#getDataSize()} minus four + ( record header consiting of a 'ushort sid' and 'ushort reclength' has already been written + by thye superclass). +
+ + * The series label record defines the type of label associated with the data format record. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a SeriesLabels record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the format flags field for the SeriesLabels record. + + + show actual value of the data point + @return the show actual field value. + + + show value as percentage of total (pie charts only) + @return the show percent field value. + + + show category label/value as percentage (pie charts only) + @return the label as percentage field value. + + + show smooth line + @return the smoothed line field value. + + + Display category label + @return the show label field value. + + + ?? + @return the show bubble sizes field value. + + + + The AxcExt record specifies additional extension properties of a date axis (section 2.2.3.6), + along with a CatSerRange record (section 2.4.39). + + + + + specifies the interval at which the major tick marks are displayed on the axis (section 2.2.3.6), + in the unit defined by duMajor. + + + + + specifies the unit of time to use for catMajor when the axis (section 2.2.3.6) is a date axis (section 2.2.3.6). + If fDateAxis is set to 0, MUST be ignored. + + + + + specifies the interval at which the minor tick marks are displayed on the axis (section 2.2.3.6), + in a unit defined by duMinor. + + + + + specifies the smallest unit of time used by the axis (section 2.2.3.6). + + + + + specifies at which date, as a date in the date system specified by the Date1904 record (section 2.4.77), + in the units defined by duBase, the value axis (section 2.2.3.6) crosses this axis (section 2.2.3.6). + + + + + specifies whether MinimumDate is calculated automatically. + + + + + specifies whether MaximumDate is calculated automatically. + + + + * The number of axes used on a chart. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a AxisUsed record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the num axis field for the AxisUsed record. + + + + The axis (section 2.2.3.6) line itself. + + + + + The major gridlines along the axis + + + + + The minor gridlines along the axis + + + + + The walls or floor of a 3-D chart + + + + + The AxisLine record specifies which part of the axis (section 2.2.3.6) is + specified by the LineFormat record (section 2.4.156) that follows. + + Excel Binary File Format (.xls) Structure Specification + + + + Constructs a AxisLineFormat record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + + + + + + + The BopPopCustom record specifies which data points in the series are contained + in the secondary bar/pie instead of the primary pie. MUST follow a BopPop record + that has its split field set to Custom (0x0003). + + + author: Antony liu (antony.apollo at gmail.com) + + + + + this record only used for record that has name and not implemented. + + + + + The BopPop record specifies that the chart group is a bar of pie chart group or + a pie of pie chart group and specifies the chart group attributes. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The BRAI record specifies a reference to data in a sheet (1) that is used by a part of a series, + legend entry, trendline or error bars. + + + + + A ChartParsedFormula structure that specifies the formula (section 2.2.2) that specifies the reference. + + + + Constructs a LinkedData record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + + specifies the part of the series, trendline, or error bars the referenced data specifies. + + + + + specifies the number format to use for the data. + + + + + specifies the properties of a category (3) axis, a date axis, or a series axis. + + + + Constructs a CategorySeriesAxis record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + + specifies where the value axis crosses this axis, based on the following table. + If fMaxCross is set to 1, the value this field MUST be ignored. + Category (3) axis This field specifies the category (3) at which the value axis crosses. + For example, if this field is 2, the value axis crosses this axis at the second category (3) + on this axis. MUST be greater than or equal to 1 and less than or equal to 31999. + Series axis MUST be 0. + Date axis catCross MUST be equal to the value given by the following formula: + catCross = catCrossDate – catMin + 1 + Where catCrossDate is the catCrossDate field of the AxcExt record + and catMin is the catMin field of the AxcExt record. + + + + + specifies the interval between axis labels on this axis. MUST be greater than or equal to 1 and + less than or equal to 31999. MUST be ignored for a date axis. + + + + + specifies the interval at which major tick marks and minor tick marks are displayed on the axis. + Major tick marks and minor tick marks that would have been visible are hidden unless they are + located at a multiple of this field. + + + + + specifies whether the value axis crosses this axis between major tick marks. MUST be a value from to following table: + 0 The value axis crosses this axis on a major tick mark. + 1 The value axis crosses this axis between major tick marks. + + + + + specifies whether the value axis crosses this axis at the last category (3), the last series, + or the maximum date. MUST be a value from the following table: + 0 The value axis crosses this axis at the value specified by catCross. + 1 The value axis crosses this axis at the last category (3), the last series, or the maximum date. + + + + + specifies whether the axis is displayed in reverse order. MUST be a value from the following table: + 0 The axis is displayed in order. + 1 The axis is display in reverse order. + + + + + the shape of the base of the data points in a bar or column chart group. + MUST be a value from the following table + 0x00 The base of the data point is a rectangle. + 0x01 The base of the data point is an ellipse. + + + + + how the data points in a bar or column chart group taper from base to tip. + MUST be a value from the following + 0x00 The data points of the bar or column chart group do not taper. + The shape at the maximum value of the data point is the same as the shape at the base.: + 0x01 The data points of the bar or column chart group taper to a point at the maximum value of each data point. + 0x02 The data points of the bar or column chart group taper towards a projected point at the position of + the maximum value of all of the data points in the chart group, but are clipped at the value of each data point. + + + + + The CrtLine record specifies the presence of drop lines, high-low lines, series lines + or leader lines on the chart group. This record is followed by a LineFormat record + which specifies the format of the lines. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The CrtMlFrtContinue record specifies additional data for a CrtMlFrt record, as specified in the CrtMlFrt record. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The DataLabExtContents record specifies the contents of an extended data label. + + + + DATALABEXT - Chart Data Label Extension (0x086A)
+ + @author Patrick Cheng +
+ + + specifies the text elements that are formatted using the position and appearance information + specified by the Text record immediately following this record. + + + + + Format all Text records in the chart group where fShowPercent is equal to 0 or fShowValue is equal to 0. + + + + + Format all Text records in the chart group where fShowPercent is equal to 1 or fShowValue is equal to 1. + + + + + Format all Text records in the chart where the value of fScaled of the associated FontInfo structure is equal to 0. + + + + + Format all Text records in the chart where the value of fScaled of the associated FontInfo structure is equal to 1. + + + + + specifies the text elements that are formatted using the information specified by + the Text record immediately following this record. + + + + Constructs a DefaultDataLabelTextProperties record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + + specifies the text elements that are formatted using the position and appearance + information specified by the Text record immediately following this record. + + + + + The DropBar record specifies the attributes of the up bars or the down bars between multiple + series of a line chart group and specifies the beginning of a collection of records as + defined by the Chart Sheet Substream ABNF. The first of these collections in the line chart + group specifies the attributes of the up bars. The second specifies the attributes of the + down bars. If this record exists, then the chart group type MUST be line and the field cSer + in the record SeriesList MUST be greater than 1. + + + author: Antony liu (antony.apollo at gmail.com) + + + + ENDBLOCK - Chart Future Record Type End Block (0x0853)
+ + @author Patrick Cheng +
+ + + The Fbi2 record specifies the font information at the time the scalable font is added to the chart. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The Fbi record specifies the font information at the time the scalable font is added to the chart. + + + + Constructs a FontBasis record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the x Basis field for the FontBasis record. + + + Get the y Basis field for the FontBasis record. + + + Get the height basis field for the FontBasis record. + + + Get the scale field for the FontBasis record. + + + Get the index to font table field for the FontBasis record. + + + + The FontX record specifies the font for a given text element. + The Font record referenced by iFont can exist in this chart sheet substream or the workbook. + + + + Constructs a FontIndex record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + + specifies the font to use for subsequent records. + This font can either be the default font of the chart, part of the collection of Font records following + the FrtFontList record, or part of the collection of Font records in the globals substream. + If iFont is 0x0000, this record specifies the default font of the chart. + If iFont is less than or equal to the number of Font records in the globals substream, + iFont is a one-based index to a Font record in the globals substream. + Otherwise iFont is a one-based index into the collection of Font records in this chart sheet substream + where the index is equal to iFont – n, where n is the number of Font records in the globals substream. + + + + + The FrtFontList record specifies font information used on the chart and specifies the + beginning of a collection of Font records as defined by the Chart Sheet Substream ABNF. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + specifies the properties of a fill pattern for parts of a chart. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The IFmtRecord record specifies the number format to use for the text on an axis. + + + + Constructs a NumberFormatIndex record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the format index field for the NumberFormatIndex record. + + + + The LegendException record specifies information about a legend entry which was + changed from the default legend entry settings, and specifies the beginning of + a collection of records as defined by the Chart Sheet Substream ABNF. + The collection of records specifies legend entry formatting. On a chart where + the legend contains legend entries for the series and trendlines, as defined + in the legend overview, there MUST be zero instances or one instance of this + record in the sequence of records that conform to the SERIESFORMAT rule. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The PicF record specifies the layout of a picture that is attached to a picture-filled chart element. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The RadarArea record specifies that the chart group is a filled radar chart group and specifies the chart group attributes. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The Radar record specifies that the chart group is a radar chart group and specifies the chart group attributes. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The RichTextStream record specifies additional text properties for the text in + the entire chart, text in the current legend, text in the current legend entry, + or text in the attached label. These text properties are a superset of the + properties stored in the Text, Font, FontX, BRAI, and ObjectLink records based + on the following table, as specified by the Chart Sheet Substream ABNF. In each + case, the associated Font record is specified by the associated FontX record. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The Scatter record specifies that the chart group is a scatter chart group or + a bubble chart group, and specifies the chart group attributes. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The SerAuxErrBar record specifies properties of an error bar. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The SerAuxTrend record specifies a trendline. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The SerFmt record specifies properties of the associated data points, data markers, + or lines of the series. The associated data points, data markers, or lines of the + series are specified by the preceding DataFormat record. If this record is not + present in the sequence of records that conforms to the SS rule of the Chart Sheet + Substream ABNF, then the properties of the associated data points, data markers, + or lines of the series are specified by the default values of the fields of this record. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The SerParent record specifies the series to which the current trendline or error bar corresponds. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The SerToCrt record specifies the chart group for the current series. + + + + Constructs a SeriesChartGroupIndex record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the chart Group index field for the SeriesChartGroupIndex record. + + + + The ShapePropsStream record specifies the shape formatting properties for chart elements. + These shape formatting properties are a superset of the properties stored in the LineFormat, + AreaFormat, MarkerFormat, and GelFrame records. They are stored in the rgb field, which is an + XML stream (section 2.1.7.22), as defined in [ECMA-376] Part 4, section 5.7.2.198. + + + author: Antony liu (antony.apollo at gmail.com) + + + + * Describes a chart sheet properties record. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + specifies properties of a chart as defined by the Chart Sheet Substream ABNF + + + + Constructs a SheetProperties record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the flags field for the SheetProperties record. + + + Get the empty field for the SheetProperties record. + + @return One of + EMPTY_NOT_PLOTTED + EMPTY_ZERO + EMPTY_INTERPOLATED + + specifies how the empty cells are plotted be a value from the following table: + 0x00 Empty cells are not plotted. + 0x01 Empty cells are plotted as zero. + 0x02 Empty cells are plotted as interpolated. + + + + + whether series are automatically allocated for the chart. + + + + + whether to plot visible cells only. + + + + + whether to size the chart with the window. + + + + + If fAlwaysAutoPlotArea is 1, then this field MUST be 1. + If fAlwaysAutoPlotArea is 0, then this field MUST be ignored. + + + + + specifies whether the default plot area dimension (2) is used. + 0 Use the default plot area dimension (2) regardless of the Pos record information. + 1 Use the plot area dimension (2) of the Pos record; and fManPlotArea MUST be 1. + + + + STARTBLOCK - Chart Future Record Type Start Block (0x0852)
+ + @author Patrick Cheng +
+ + + The Surf record specifies that the chart group is a surface chart group and specifies the chart group attributes. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The RichTextStream record specifies additional text properties for the text + in the entire chart, text in the current legend, text in the current legend + entry, or text in the attached label. These text properties are a superset + of the properties stored in the Text, Font, FontX, BRAI, and ObjectLink records + based on the following table, as specified by the Chart Sheet Substream ABNF. + In each case, the associated Font record is specified by the associated FontX record. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The YMult record specifies properties of the value multiplier for a value axis and + that specifies the beginning of a collection of records as defined by the Chart Sheet + substream ABNF. The collection of records specifies a display units label. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The ContinueFrt12 record specifies a continuation of the data in a preceding Future Record + Type record that has data longer than 8,224 bytes. Such records are split into several records. + The first section of the data appears in the base record and subsequent sections appear in + one or more ContinueFrt12 records that appear after the base record. The preceding base record + MUST contain a FrtRefHeader or a FrtHeader field. + + + author: Antony liu (antony.apollo at gmail.com) + + + + DConRef records specify a range in a workbook (internal or external) that serves as a data source + for pivot tables or data consolidation. + + Represents a DConRef Structure + [MS-XLS s. + 2.4.86], and the contained DConFile structure + + [MS-XLS s. 2.5.69]. This in turn contains a XLUnicodeStringNoCch + + [MS-XLS s. 2.5.296]. + +
+                     _______________________________
+                    |          DConRef              |
+            (bytes) +-+-+-+-+-+-+-+-+-+-+...+-+-+-+-+
+                    |    ref    |cch|  stFile   | un|
+                    +-+-+-+-+-+-+-+-+-+-+...+-+-+-+-+
+                                          |
+                                 _________|_____________________
+                                |DConFile / XLUnicodeStringNoCch|
+                                +-+-+-+-+-+-+-+-+-+-+-+...+-+-+-+
+                         (bits) |h|   reserved  |      rgb      |
+                                +-+-+-+-+-+-+-+-+-+-+-+...+-+-+-+
+             
+ Where +
    +
  • DConFile.h = 0x00 if the characters inrgb are single byte, and + DConFile.h = 0x01 if they are double byte.
    + If they are double byte, then
    +
      +
    • If it exists, the length of DConRef.un = 2. Otherwise it is 1.
    • +
    • The length of DConFile.rgb = (2 * DConRef.cch). Otherwise it is equal to + DConRef.cch
    • . +
    +
  • +
  • DConRef.rgb starts with 0x01 if it is an external reference, + and with 0x02 if it is a self-reference.
  • +
+ + At the moment this class is read-only. + + @author Niklas Rehfeld +
+ + The id of the record type, + sid = {@value} + + + A RefU structure specifying the range of cells if this record is part of an SXTBL. + + [MS XLS s.2.5.211] + + + A RefU structure specifying the range of cells if this record is part of an SXTBL. + + [MS XLS s.2.5.211] + + + A RefU structure specifying the range of cells if this record is part of an SXTBL. + + [MS XLS s.2.5.211] + + + A RefU structure specifying the range of cells if this record is part of an SXTBL. + + [MS XLS s.2.5.211] + + + the number of chars in the link + + + the type of characters (single or double byte) + + + The link's path string. This is the rgb field of a + XLUnicodeStringNoCch. Therefore it will contain at least one leading special + character (0x01 or 0x02) and probably other ones.

+ @see + DConFile [MS-XLS s. 2.5.77] and + + VirtualPath [MS-XLS s. 2.5.69] +

+ + + unused bits at the end, must be set to 0. + + + Read constructor. + + @param data byte array containing a DConRef Record, including the header. + + + Read Constructor. + + @param inStream RecordInputStream containing a DConRefRecord structure. + + + + @return raw path byte array. + + + @return The first column of the range. + + + @return The first row of the range. + + + @return The last column of the range. + + + @return The last row of the range. + + + @return the link's path, with the special characters stripped/replaced. May be null. + See MS-XLS 2.5.277 (VirtualPath) + + + Checks if the data source in this reference record is external to this sheet or internal. + + @return true iff this is an external reference. + + + The FtCf structure specifies the clipboard format of the picture-type Obj record Containing this FtCf. + + + Subrecords are part of the OBJ class. + + + Wether this record terminates the sub-record stream. + There are two cases when this method must be overridden and return true + - EndSubRecord (sid = 0x00) + - LbsDataSubRecord (sid = 0x12) + + @return whether this record is the last in the sub-record stream + + + Specifies the format of the picture is an enhanced metafile. + + + Specifies the format of the picture is a bitmap. + + + Specifies the picture is in an unspecified format that is + neither and enhanced metafile nor a bitmap. + + + Construct a new FtPioGrbitSubRecord and + fill its data with the default values + + + Convert this record to string. + Used by BiffViewer and other utilities. + + + Serialize the record data into the supplied array of bytes + + @param out the stream to serialize into + + + @return id of this record. + + + This structure appears as part of an Obj record that represents image display properties. + + + A bit that specifies whether the picture's aspect ratio is preserved when rendered in + different views (Normal view, Page Break Preview view, Page Layout view and printing). + + + A bit that specifies whether the pictFmla field of the Obj record that Contains + this FtPioGrbit specifies a DDE reference. + + + A bit that specifies whether this object is expected to be updated on print to + reflect the values in the cell associated with the object. + + + A bit that specifies whether the picture is displayed as an icon. + + + A bit that specifies whether this object is an ActiveX control. + It MUST NOT be the case that both fCtl and fDde are equal to 1. + + + A bit that specifies whether the object data are stored in an + embedding storage (= 0) or in the controls stream (ctls) (= 1). + + + A bit that specifies whether this is a camera picture. + + + A bit that specifies whether this picture's size has been explicitly Set. + 0 = picture size has been explicitly Set, 1 = has not been Set + + + A bit that specifies whether the OLE server for the object is called + to load the object's data automatically when the parent workbook is opened. + + + Construct a new FtPioGrbitSubRecord and + fill its data with the default values + + + Use one of the bitmasks MANUAL_ADVANCE_BIT ... CURSOR_VISIBLE_BIT + @param bitmask + @param enabled + + + Convert this record to string. + Used by BiffViewer and other utilities. + + + Serialize the record data into the supplied array of bytes + + @param out the stream to serialize into + + + @return id of this record. + + + Base class for all old (Biff 2 - Biff 4) cell value records + (implementors of {@link CellValueRecordInterface}). + Subclasses are expected to manage the cell data values (of various types). + + + Append specific debug info (used by {@link #ToString()} for the value + Contained in this record. Trailing new-line should not be Appended + (superclass does that). + + + Get the index to the ExtendedFormat, for non-Biff2 + + @see NPOI.HSSF.Record.ExtendedFormatRecord + @return index to the XF record + + + Is this a Biff2 record, or newer? + + + Gets the debug info BIFF record type name (used by {@link #ToString()}. + + + Formula Record (0x0006 / 0x0206 / 0x0406) - holds a formula in + encoded form, along with the value if a number + + + Get the calculated value of the formula + + @return calculated value + + + Get the option flags + + @return bitmask + + + @return the formula tokens. never null + + + Biff2 - Biff 4 Label Record (0x0004 / 0x0204) - read only support for + strings stored directly in the cell, from the older file formats that + didn't use {@link LabelSSTRecord} + + + @param in the RecordInputstream to read the record from + + + Not supported + + + Get the number of characters this string Contains + @return number of characters + + + Get the String of the cell + + + Title: Bound Sheet Record (aka BundleSheet) (0x0085) for BIFF 5
+ Description: Defines a sheet within a workbook. Basically stores the sheet name + and tells where the Beginning of file record is within the HSSF + file. +
+ + Get the offset in bytes of the Beginning of File Marker within the HSSF Stream part of the POIFS file + + @return offset in bytes + + + Get the sheetname for this sheet. (this appears in the tabs at the bottom) + @return sheetname the name of the sheet + + + Biff2 - Biff 4 Label Record (0x0007 / 0x0207) - read only support for + formula string results. + + + @param in the RecordInputstream to read the record from + + + @return The string represented by this record. + + +

+ Represents a simple shape such as a line, rectangle or oval. + @author Glen Stampoultzis (glens at apache.org) + +
+ + + An abstract shape. + + Note: Microsoft Excel seems to sometimes disallow + higher y1 than y2 or higher x1 than x2 in the anchor, you might need to + reverse them and draw shapes vertically or horizontally flipped! + + + + creates shapes from existing file + @param spContainer + @param objRecord + + + + Create a new shape with the specified parent and anchor. + + The parent. + The anchor. + + + + Sets the color applied to the lines of this shape + + The red. + The green. + The blue. + + + + Sets the color used to fill this shape. + + The red. + The green. + The blue. + + + + Gets the parent shape. + + The parent. + + + + Gets or sets the anchor that is used by this shape. + + The anchor. + + + + The color applied to the lines of this shape. + + The color of the line style. + + + + Gets or sets the color used to fill this shape. + + The color of the fill. + + + + Gets or sets with width of the line in EMUs. 12700 = 1 pt. + + The width of the line. + + + + Gets or sets One of the constants in LINESTYLE_* + + The line style. + + + + Gets or sets a value indicating whether this instance is no fill. + + + true if this shape Is not filled with a color; otherwise, false. + + + + + whether this shape is vertically flipped. + + + + + whether this shape is horizontally flipped. + + + + + get or set the rotation, in degrees, that is applied to a shape. + Negative values specify rotation in the counterclockwise direction. + Rotation occurs around the center of the shape. + The default value for this property is 0x00000000 + + + + + Count of all children and their childrens children. + + The count of all children. + + + + Initializes a new instance of the class. + + The parent. + The anchor. + + + + Gets the shape type. + + One of the OBJECT_TYPE_* constants. + @see #OBJECT_TYPE_LINE + @see #OBJECT_TYPE_OVAL + @see #OBJECT_TYPE_RECTANGLE + @see #OBJECT_TYPE_PICTURE + @see #OBJECT_TYPE_COMMENT + + + + Get or set the rich text string used by this object. + + + + @author Evgeniy Berlog + date: 05.06.12 + + + build shape tree from escher container + @param container root escher container from which escher records must be taken + @param agg - EscherAggregate + @param out - shape container to which shapes must be added + @param root - node to create HSSFObjectData shapes + + + Copies an Entry into a target POIFS directory, recursively + + + Copies all the nodes from one POIFS Directory to another + + @param sourceRoot + is the source Directory to copy from + @param targetRoot + is the target Directory to copy to + + + Copies nodes from one Directory to the other minus the excepts + + @param filteredSource The filtering source Directory to copy from + @param filteredTarget The filtering target Directory to copy to + + + Copies nodes from one Directory to the other minus the excepts + + @param sourceRoot + is the source Directory to copy from + @param targetRoot + is the target Directory to copy to + @param excepts + is a list of Strings specifying what nodes NOT to copy + @deprecated use {@link FilteringDirectoryNode} instead + + + Copies all nodes from one POIFS to the other + + @param source + is the source POIFS to copy from + @param target + is the target POIFS to copy to + + + Copies nodes from one POIFS to the other, minus the excepts. + This delegates the filtering work to {@link FilteringDirectoryNode}, + so excepts can be of the form "NodeToExclude" or + "FilteringDirectory/ExcludedChildNode" + + @param source is the source POIFS to copy from + @param target is the target POIFS to copy to + @param excepts is a list of Entry Names to be excluded from the copy + + + Checks to see if the two Directories hold the same contents. + For this to be true, they must have entries with the same names, + no entries in one but not the other, and the size+contents + of each entry must match, and they must share names. + To exclude certain parts of the Directory from being checked, + use a {@link FilteringDirectoryNode} + + + Checks to see if two Documents have the same name + and the same contents. (Their parent directories are + not checked) + + + + A DirectoryEntry filter, which exposes another DirectoryEntry less certain parts. + This is typically used when copying or comparing Filesystems. + + + + + This interface defines methods specific to Directory objects + managed by a Filesystem instance. + @author Marc Johnson (mjohnson at apache dot org) + + + + + This interface provides access to an object managed by a Filesystem + instance. Entry objects are further divided into DocumentEntry and + DirectoryEntry instances. + @author Marc Johnson (mjohnson at apache dot org) + + + + + Delete this Entry. ThIs operation should succeed, but there are + special circumstances when it will not: + If this Entry Is the root of the Entry tree, it cannot be + deleted, as there Is no way to Create another one. + If this Entry Is a directory, it cannot be deleted unless it Is + empty. + + true if the Entry was successfully deleted, else false + + + + Rename this Entry. ThIs operation will fail if: + There Is a sibling Entry (i.e., an Entry whose parent Is the + same as this Entry's parent) with the same name. + ThIs Entry Is the root of the Entry tree. Its name Is dictated + by the Filesystem and many not be Changed. + + the new name for this Entry + true if the operation succeeded, else false + + + + Get the name of the Entry + + The name. + + + + Is this a DirectoryEntry? + + + true if the Entry Is a DirectoryEntry; otherwise, false. + + + + + Is this a DocumentEntry? + + + true if the Entry Is a DocumentEntry; otherwise, false. + + + + + Get this Entry's parent (the DirectoryEntry that owns this + Entry). All Entry objects, except the root Entry, has a parent. + + this Entry's parent; null iff this Is the root Entry + This property is moved to EntryNode + + + + get a specified Entry by name + + the name of the Entry to obtain. + the specified Entry, if it is directly contained in + this DirectoryEntry + + + + Create a new DocumentEntry + + the name of the new DocumentEntry + the Stream from which to Create the new DocumentEntry + the new DocumentEntry + + + + Create a new DocumentEntry; the data will be provided later + + the name of the new DocumentEntry + the size of the new DocumentEntry + BeforeWriting event handler + the new DocumentEntry + + + + Create a new DirectoryEntry + + the name of the new DirectoryEntry + the name of the new DirectoryEntry + + + + Checks if entry with specified name present + + entry name + true if have + + + + get an iterator of the Entry instances contained directly in + this instance (in other words, children only; no grandchildren + etc.) + + The entries.never null, but hasNext() may return false + immediately (i.e., this DirectoryEntry is empty). All + objects retrieved by next() are guaranteed to be + implementations of Entry. + + + + get the names of all the Entries contained directly in this + instance (in other words, names of children only; no grandchildren etc). + + the names of all the entries that may be retrieved with + getEntry(String), which may be empty (if this DirectoryEntry is empty + + + + + is this DirectoryEntry empty? + + true if this instance contains no Entry instances; otherwise, false. + + + + find out how many Entry instances are contained directly within + this DirectoryEntry + + number of immediately (no grandchildren etc.) contained + Entry instances + + + + Gets or sets the storage ClassID. + + The storage ClassID. + + + + Creates a filter round the specified directory, which will exclude entries such as + "MyNode" and "MyDir/IgnoreNode". The excludes can stretch into children, if they contain a /. + + The Directory to filter + The Entries to exclude + + + This class provides methods to write a DocumentEntry managed by a + {@link NPOIFSFileSystem} instance. + + + the Document's size + + + have we been closed? + + + the actual Document + + + and its Property + + + our buffer, when null we're into normal blocks + + + our main block stream, when we're into normal blocks + + + Create an OutputStream from the specified DocumentEntry. + The specified entry will be emptied. + + @param document the DocumentEntry to be written + + + Create an OutputStream to create the specified new Entry + + @param parent Where to create the Entry + @param name Name of the new entry + + + This exception is thrown when we try to open a file that doesn't + seem to actually be an OLE2 file After all + + + Copies an Entry into a target POIFS directory, recursively + + + Copies nodes from one POIFS to the other minus the excepts + + @param source + is the source POIFS to copy from + @param target + is the target POIFS to copy to + @param excepts + is a list of Strings specifying what nodes NOT to copy + + + Copies nodes from one POIFS to the other minus the excepts + + @param source + is the source POIFS to copy from + @param target + is the target POIFS to copy to + @param excepts + is a list of Strings specifying what nodes NOT to copy + + + Evaluator for formula arguments. + + @author jfaenomoto@gmail.com + + + Evaluate a generic {@link ValueEval} argument to a double value that represents a date in POI. + + @param arg {@link ValueEval} an argument. + @param srcCellRow number cell row. + @param srcCellCol number cell column. + @return a double representing a date in POI. + @throws EvaluationException exception upon argument evaluation. + + + Evaluate a generic {@link ValueEval} argument to an array of double values that represents dates in POI. + + @param arg {@link ValueEval} an argument. + @param srcCellRow number cell row. + @param srcCellCol number cell column. + @return an array of doubles representing dates in POI. + @throws EvaluationException exception upon argument evaluation. + + + Evaluate a generic {@link ValueEval} argument to a double value. + + @param arg {@link ValueEval} an argument. + @param srcCellRow number cell row. + @param srcCellCol number cell column. + @return a double value. + @throws EvaluationException exception upon argument evaluation. + + + Parser for java dates. + + @author jfaenomoto@gmail.com + + + Parses a date from a string. + + @param strVal a string with a date pattern. + @return a date parsed from argument. + @throws EvaluationException exception upon parsing. + + + @param month 1-based + + + For most Excel functions, involving references ((cell, area), (2d, 3d)), the references are + passed in as arguments, and the exact location remains fixed. However, a select few Excel + functions have the ability to access cells that were not part of any reference passed as an + argument.
+ Two important functions with this feature are INDIRECT and OFFSet

+ + In POI, the HSSFFormulaEvaluator Evaluates every cell in each reference argument before + calling the function. This means that functions using fixed references do not need access to + the rest of the workbook to execute. Hence the Evaluate() method on the common + interface Function does not take a workbook parameter. + + This interface recognises the requirement of some functions to freely Create and Evaluate + references beyond those passed in as arguments. + + @author Josh Micich + + + @param args the pre-Evaluated arguments for this function. args is never null, + nor are any of its elements. + @param ec primarily used to identify the source cell Containing the formula being Evaluated. + may also be used to dynamically create reference evals. + @return never null. Possibly an instance of ErrorEval in the case of + a specified Excel error (Exceptions are never thrown to represent Excel errors). + + + Implementation of Excel 'Analysis ToolPak' function NETWORKDAYS()
+ Returns the number of workdays given a starting and an ending date, considering an interval of holidays. A workday is any non + saturday/sunday date. +

+ Syntax
+ NETWORKDAYS(startDate, endDate, holidays) +

+ + @author jfaenomoto@gmail.com + + + Constructor. + + @param anEvaluator an injected {@link ArgumentsEvaluator}. + + + Evaluate for NETWORKDAYS. Given two dates and a optional date or interval of holidays, determines how many working days are there + between those dates. + + @return {@link ValueEval} for the number of days between two dates. + + + An exception thrown by implementors of {@link FormulaEvaluator} when + attempting to evaluate a formula which requires a function that POI + does not (yet) support. + + + A calculator for workdays, considering dates as excel representations. + + @author jfaenomoto@gmail.com + + + Constructor. + + + Calculate how many workdays are there between a start and an end date, as excel representations, considering a range of holidays. + + @param start start date. + @param end end date. + @param holidays an array of holidays. + @return number of workdays between start and end dates, including both dates. + + + Calculate the workday past x workdays from a starting date, considering a range of holidays. + + @param start start date. + @param workdays number of workdays to be past from starting date. + @param holidays an array of holidays. + @return date past x workdays. + + + Calculates how many days of week past between a start and an end date. + + @param start start date. + @param end end date. + @param dayOfWeek a day of week as represented by {@link Calendar} constants. + @return how many days of week past in this interval. + + + Calculates how many holidays in a list are workdays, considering an interval of dates. + + @param start start date. + @param end end date. + @param holidays an array of holidays. + @return number of holidays that occur in workdays, between start and end dates. + + + @param aDate a given date. + @return true if date is weekend, false otherwise. + + + @param aDate a given date. + @param holidays an array of holidays. + @return true if date is a holiday, false otherwise. + + + @param aDate a given date. + @param holidays an array of holidays. + @return 1 is not a workday, 0 otherwise. + + + @param start start date. + @param end end date. + @param aDate a date to be analyzed. + @return true if aDate is between start and end dates, false otherwise. + + + Implementation of Excel 'Analysis ToolPak' function WORKDAY()
+ Returns the date past a number of workdays beginning at a start date, considering an interval of holidays. A workday is any non + saturday/sunday date. +

+ Syntax
+ WORKDAY(startDate, days, holidays) +

+ + @author jfaenomoto@gmail.com + + + Evaluate for WORKDAY. Given a date, a number of days and a optional date or interval of holidays, determines which date it is past + number of parametrized workdays. + + @return {@link ValueEval} with date as its value. + + +

Some utils for Converting from and to any base

+ + @author cedric dot walter @ gmail dot com +
+ + Implementation for Excel Bin2Dec() function.

+

+ Syntax:
Bin2Dec (number)
+

+ Converts a binary number to decimal. +

+ Number is the binary number you want to convert. Number cannot contain more than 10 characters (10 bits). + The most significant bit of number is the sign bit. The remaining 9 bits are magnitude bits. + Negative numbers are represented using two's-complement notation. +

+ Remark + If number is not a valid binary number, or if number contains more than 10 characters (10 bits), + BIN2DEC returns the #NUM! error value. + + @author cedric dot walter @ gmail dot com + + + Convenience base class for functions that must take exactly one argument. + + @author Josh Micich + + + Implemented by all functions that can be called with one argument + + @author Josh Micich + + +

+ Function serves as a marker interface. + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > +
+ + + Evaluates the specified args. + + the evaluated function arguments. Empty values are represented with BlankEval or MissingArgEval + row index of the cell containing the formula under evaluation + column index of the cell containing the formula under evaluation + + + + see {@link Function#Evaluate(ValueEval[], int, int)} + + + Implementation for Excel CODE () function.

+

+ Syntax:
CODE (text )
+

+ Returns a numeric code for the first character in a text string. The returned code corresponds to the character set used by your computer. +

+ text The text for which you want the code of the first character. + + @author cedric dot walter @ gmail dot com + + + Implementation for Excel COMPLEX () function.

+

+ Syntax:
COMPLEX (real_num,i_num,suffix )
+

+ Converts real and imaginary coefficients into a complex number of the form x + yi or x + yj. +

+

+ All complex number functions accept "i" and "j" for suffix, but neither "I" nor "J". + Using uppercase results in the #VALUE! error value. All functions that accept two + or more complex numbers require that all suffixes match. +

+ real_num The real coefficient of the complex number. + If this argument is nonnumeric, this function returns the #VALUE! error value. +

+

+ i_num The imaginary coefficient of the complex number. + If this argument is nonnumeric, this function returns the #VALUE! error value. +

+

+ suffix The suffix for the imaginary component of the complex number. +

    +
  • If omitted, suffix is assumed to be "i".
  • +
  • If suffix is neither "i" nor "j", COMPLEX returns the #VALUE! error value.
  • +
+ + @author cedric dot walter @ gmail dot com +
+ + Convenience base class for any function which must take two or three + arguments + + @author Josh Micich + + + Implemented by all functions that can be called with two arguments + + @author Josh Micich + + + see {@link Function#Evaluate(ValueEval[], int, int)} + + + Implemented by all functions that can be called with three arguments + + @author Josh Micich + + + see {@link Function#Evaluate(ValueEval[], int, int)} + + + Implementation for the function COUNTIFS +

+ Syntax: COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]) +

+
+ + Implementation for Excel Bin2Dec() function.

+

+ Syntax:
Bin2Dec (number,[places] )
+

+ Converts a decimal number to binary. +

+ The DEC2BIN function syntax has the following arguments: +

    +
  • Number Required. The decimal integer you want to Convert. If number is negative, valid place values are ignored and DEC2BIN returns a 10-character (10-bit) binary number in which the most significant bit is the sign bit. The remaining 9 bits are magnitude bits. Negative numbers are represented using two's-complement notation.
  • +
  • Places Optional. The number of characters to use. If places is omitted, DEC2BIN uses the minimum number of characters necessary. Places is useful for pAdding the return value with leading 0s (zeros).
  • +
+

+ Remarks +

    +
  • If number < -512 or if number > 511, DEC2BIN returns the #NUM! error value.
  • +
  • If number is nonnumeric, DEC2BIN returns the #VALUE! error value.
  • +
  • If DEC2BIN requires more than places characters, it returns the #NUM! error value.
  • +
  • If places is not an integer, it is tRuncated.
  • +
  • If places is nonnumeric, DEC2BIN returns the #VALUE! error value.
  • +
  • If places is zero or negative, DEC2BIN returns the #NUM! error value.
  • +
+ + @author cedric dot walter @ gmail dot com +
+ + Convenience base class for any function which must take two or three + arguments + + @author Josh Micich + + + Implementation for Excel DELTA() function.

+

+ Syntax:
DEC2HEX (number,places )
+

+ Converts a decimal number to hexadecimal. + + The decimal integer you want to Convert. If number is negative, places is ignored + and this function returns a 10-character (40-bit) hexadecimal number in which the + most significant bit is the sign bit. The remaining 39 bits are magnitude bits. + Negative numbers are represented using two's-complement notation. + +

    +
  • If number < -549,755,813,888 or if number > 549,755,813,887, this function returns the #NUM! error value.
  • +
  • If number is nonnumeric, this function returns the #VALUE! error value.
  • +
+ +

places

+ + The number of characters to use. The places argument is useful for pAdding the + return value with leading 0s (zeros). + +
    +
  • If this argument is omitted, this function uses the minimum number of characters necessary.
  • +
  • If this function requires more than places characters, it returns the #NUM! error value.
  • +
  • If this argument is nonnumeric, this function returns the #VALUE! error value.
  • +
  • If this argument is negative, this function returns the #NUM! error value.
  • +
  • If this argument Contains a decimal value, this function ignores the numbers to the right side of the decimal point.
  • +
+ + @author cedric dot walter @ gmail dot com +
+ + Implementation for Excel DELTA() function.

+

+ Syntax:
DELTA (number1,number2 )
+

+ Tests whether two values are Equal. Returns 1 if number1 = number2; returns 0 otherwise. + Use this function to filter a Set of values. For example, by summing several DELTA functions + you calculate the count of equal pairs. This function is also known as the Kronecker Delta function. + +

    +
  • If number1 is nonnumeric, DELTA returns the #VALUE! error value.
  • +
  • If number2 is nonnumeric, DELTA returns the #VALUE! error value.
  • +
+ + @author cedric dot walter @ gmail dot com +
+ + Convenience base class for functions that must take exactly two arguments. + + @author Josh Micich + + + Implementation of the DGet function: + Finds the value of a column in an area with given conditions. + + TODO: + - wildcards ? and * in string conditions + - functions as conditions + + + Interface specifying how an algorithm to be used by {@link DStarRunner} should look like. + Each implementing class should correspond to one of the D* functions. + + + Reset the state of this algorithm. + This is called before each run through a database. + + + Process a match that is found during a run through a database. + @param eval ValueEval of the cell in the matching row. References will already be Resolved. + @return Whether we should continue iterating through the database. + + + Return a result ValueEval that will be the result of the calculation. + This is always called at the end of a run through the database. + @return a ValueEval + + + Implementation of the DMin function: + Finds the minimum value of a column in an area with given conditions. + + TODO: + - wildcards ? and * in string conditions + - functions as conditions + + + This class performs a D* calculation. It takes an {@link IDStarAlgorithm} object and + uses it for calculating the result value. Iterating a database and Checking the + entries against the Set of conditions is done here. + + + Resolve reference(-chains) until we have a normal value. + + @param field a ValueEval which can be a RefEval. + @return a ValueEval which is guaranteed not to be a RefEval + @If a multi-sheet reference was found along the way. + + + Returns the first column index that matches the given name. The name can either be + a string or an integer, when it's an integer, then the respective column + (1 based index) is returned. + @param nameValueEval + @param db + @return the first column index that matches the given name (or int) + @ + + + For a given database returns the column number for a column heading. + + @param db Database. + @param name Column heading. + @return Corresponding column number. + @If it's not possible to turn all headings into strings. + + + Checks a row in a database against a condition database. + + @param db Database. + @param row The row in the database to Check. + @param cdb The condition database to use for Checking. + @return Whether the row matches the conditions. + @If references could not be Resolved or comparison + operators and operands didn't match. + + + Test a value against a simple (< > <= >= = starts-with) condition string. + + @param value The value to Check. + @param condition The condition to check for. + @return Whether the condition holds. + @If comparison operator and operands don't match. + + + Test whether a value matches a numeric condition. + @param valueEval Value to Check. + @param op Comparator to use. + @param condition Value to check against. + @return whether the condition holds. + @If it's impossible to turn the condition into a number. + + + Takes a ValueEval and tries to retrieve a String value from it. + It tries to resolve references if there are any. + + @param value ValueEval to retrieve the string from. + @return String corresponding to the given ValueEval. + @If it's not possible to retrieve a String value. + + + Implementation for the Excel EOMONTH() function.

+

+ EOMONTH() returns the date of the last day of a month..

+

+ Syntax:
+ EOMONTH(start_date,months)

+

+ start_date is the starting date of the calculation + months is the number of months to be Added to start_date, + to give a new date. For this new date, EOMONTH returns the date of + the last day of the month. months may be positive (in the future), + zero or negative (in the past). + + + Implementation for the ERROR.TYPE() Excel function. +

+ Syntax:
+ ERROR.TYPE(errorValue)

+

+ Returns a number corresponding to the error type of the supplied argument.

+

+ + + + + + + + + + +
errorValueReturn Value
#NULL!1
#DIV/0!2
#VALUE!3
#REF!4
#NAME?5
#NUM!6
#N/A!7
everything else#N/A!
+ + Note - the results of ERROR.TYPE() are different to the constants defined in + ErrorConstants. +

+ + @author Josh Micich +
+ + Implementation for Excel FACTDOUBLE() function.

+

+ Syntax:
FACTDOUBLE (number)
+

+ Returns the double factorial of a number. +

+ Number is the value for which to return the double factorial. If number is not an integer, it is truncated. +

+ Remarks +

    +
  • If number is nonnumeric, FACTDOUBLE returns the #VALUE! error value.
  • +
  • If number is negative, FACTDOUBLE returns the #NUM! error value.
  • +
+ Use a cache for more speed of previously calculated factorial + + @author cedric dot walter @ gmail dot com +
+ + Implementation of the financial functions pmt, fv, ppmt, ipmt. + + @author Mike Argyriou micharg@gmail.com + + + Emulates Excel/Calc's PMT(interest_rate, number_payments, PV, FV, Type) + function, which calculates the payments for a loan or the future value of an investment + + @param r + - periodic interest rate represented as a decimal. + @param nper + - number of total payments / periods. + @param pv + - present value -- borrowed or invested principal. + @param fv + - future value of loan or annuity. + @param type + - when payment is made: beginning of period is 1; end, 0. + @return double representing periodic payment amount. + + + Overloaded pmt() call omitting type, which defaults to 0. + + @see #pmt(double, int, double, double, int) + + + Overloaded pmt() call omitting fv and type, which both default to 0. + + @see #pmt(double, int, double, double, int) + + + Emulates Excel/Calc's IPMT(interest_rate, period, number_payments, PV, + FV, Type) function, which calculates the portion of the payment at a + given period that is the interest on previous balance. + + @param r + - periodic interest rate represented as a decimal. + @param per + - period (payment number) to check value at. + @param nper + - number of total payments / periods. + @param pv + - present value -- borrowed or invested principal. + @param fv + - future value of loan or annuity. + @param type + - when payment is made: beginning of period is 1; end, 0. + @return double representing interest portion of payment. + + @see #pmt(double, int, double, double, int) + @see #fv(double, int, double, double, int) + + + Emulates Excel/Calc's PPMT(interest_rate, period, number_payments, PV, + FV, Type) function, which calculates the portion of the payment at a + given period that will apply to principal. + + @param r + - periodic interest rate represented as a decimal. + @param per + - period (payment number) to check value at. + @param nper + - number of total payments / periods. + @param pv + - present value -- borrowed or invested principal. + @param fv + - future value of loan or annuity. + @param type + - when payment is made: beginning of period is 1; end, 0. + @return double representing principal portion of payment. + + @see #pmt(double, int, double, double, int) + @see #ipmt(double, int, int, double, double, bool) + + + Emulates Excel/Calc's FV(interest_rate, number_payments, payment, PV, + Type) function, which calculates future value or principal at period N. + + @param r + - periodic interest rate represented as a decimal. + @param nper + - number of total payments / periods. + @param pmt + - periodic payment amount. + @param pv + - present value -- borrowed or invested principal. + @param type + - when payment is made: beginning of period is 1; end, 0. + @return double representing future principal value. + + + Overloaded fv() call omitting type, which defaults to 0. + + @see #fv(double, int, double, double, int) + + + Implementation for Excel HEX2DEC() function.

+

+ Syntax:
HEX2DEC (number)
+

+ Converts a hexadecimal number to decimal. +

+ Number is the hexadecimal number you want to Convert. Number cannot contain more than 10 characters (40 bits). + The most significant bit of number is the sign bit. + The remaining 39 bits are magnitude bits. Negative numbers are represented using two's-complement notation. + Remark + If number is not a valid hexadecimal number, HEX2DEC returns the #NUM! error value. + + @author cedric dot walter @ gmail dot com + + + Implementation of Excel HYPERLINK function.

+ + In Excel this function has special behaviour - it causes the displayed cell value to behave like + a hyperlink in the GUI. From an evaluation perspective however, it is very simple.

+ + Syntax:
+ HYPERLINK(link_location, friendly_name)

+ + link_location The URL of the hyperlink
+ friendly_name (optional) the value to display

+ + Returns last argument. Leaves type unchanged (does not convert to {@link org.apache.poi.ss.formula.eval.StringEval}). + + @author Wayne Clingingsmith + + + Implementation for Excel IMAGINARY() function.

+

+ Syntax:
IMAGINARY (Inumber)
+

+ Returns the imaginary coefficient of a complex number in x + yi or x + yj text format. +

+ Inumber is a complex number for which you want the imaginary coefficient. +

+ Remarks +

    +
  • Use COMPLEX to convert real and imaginary coefficients into a complex number.
  • +
+ + @author cedric dot walter @ gmail dot com +
+ + Implementation for Excel ImReal() function.

+

+ Syntax:
ImReal (Inumber)
+

+ Returns the real coefficient of a complex number in x + yi or x + yj text format. +

+ Inumber A complex number for which you want the real coefficient. +

+ Remarks +

    +
  • If inumber is not in the form x + yi or x + yj, this function returns the #NUM! error value.
  • +
  • Use COMPLEX to convert real and imaginary coefficients into a complex number.
  • +
+ + @author cedric dot walter @ gmail dot com +
+ + Implementation of Excel function INTERCEPT()

+ + Calculates the INTERCEPT of the linear regression line that is used to predict y values from x values
+ (http://introcs.cs.princeton.edu/java/97data/LinearRegression.java.html) + Syntax:
+ INTERCEPT(arrayX, arrayY)

+ + + @author Johan Karlsteen + + + @author Amol S. Deshmukh < amolweb at yahoo dot com > + + + + Base class for linear regression functions. + + Calculates the linear regression line that is used to predict y values from x values
+ (http://introcs.cs.princeton.edu/java/97data/LinearRegression.java.html) + Syntax:
+ INTERCEPT(arrayX, arrayY)

+ or + SLOPE(arrayX, arrayY)

+ + + @author Johan Karlsteen + + + Represents a single row or column within an AreaEval. + + + Calculates Modified internal rate of return. Syntax is MIRR(cash_flow_values, finance_rate, reinvest_rate) + +

Returns the modified internal rate of return for a series of periodic cash flows. MIRR considers both the cost + of the investment and the interest received on reinvestment of cash.

+ + Values is an array or a reference to cells that contain numbers. These numbers represent a series of payments (negative values) and income (positive values) occurring at regular periods. +
    +
  • Values must contain at least one positive value and one negative value to calculate the modified internal rate of return. Otherwise, MIRR returns the #DIV/0! error value.
  • +
  • If an array or reference argument Contains text, logical values, or empty cells, those values are ignored; however, cells with the value zero are included.
  • +
+ + Finance_rate is the interest rate you pay on the money used in the cash flows. + Reinvest_rate is the interest rate you receive on the cash flows as you reinvest them. + + @author Carlos Delgado (carlos dot del dot est at gmail dot com) + @author Cédric Walter (cedric dot walter at gmail dot com) + + @see Wikipedia on MIRR + @see Excel MIRR + @see {@link Irr} +
+ + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + This Is the base class for all excel function evaluator + classes that take variable number of operands, and + where the order of operands does not matter + + + Collects values from a single argument + + + Returns a double array that contains values for the numeric cells + from among the list of operands. Blanks and Blank equivalent cells + are ignored. Error operands or cells containing operands of type + that are considered invalid and would result in #VALUE! error in + excel cause this function to return null. + + @return never null + + + Ensures that a two dimensional array has all sub-arrays present and the same Length + @return false if any sub-array Is missing, or Is of different Length + + + Maximum number of operands accepted by this function. + Subclasses may override to Change default value. + + + Whether to count nested subtotals. + + +

Implementation for Excel Oct2Dec() function.

+

+ Converts an octal number to decimal. +

+

+ Syntax:
Oct2Dec (number ) +

+

+ Number is the octal number you want to Convert. Number may not contain more than 10 octal characters (30 bits). + The most significant bit of number is the sign bit. The remaining 29 bits are magnitude bits. + Negative numbers are represented using two's-complement notation.. +

+ If number is not a valid octal number, OCT2DEC returns the #NUM! error value. + + @author cedric dot walter @ gmail dot com + + + Compute the interest portion of a payment. + + @author Mike Argyriou micharg@gmail.com + + +

Implementation for Excel QUOTIENT () function.

+

+ Syntax:
QUOTIENT(Numerator,Denominator)
+

+

+ Numerator is the dividend. + Denominator is the divisor. + + Returns the integer portion of a division. Use this function when you want to discard the remainder of a division. +

+ + If either enumerator/denominator is non numeric, QUOTIENT returns the #VALUE! error value. + If denominator is Equals to zero, QUOTIENT returns the #DIV/0! error value. + + @author cedric dot walter @ gmail dot com +
+ + * Returns the rank of a number in a list of numbers. The rank of a number is its size relative to other values in a list. + + * Syntax: + * RANK(number,ref,order) + * Number is the number whose rank you want to find. + * Ref is an array of, or a reference to, a list of numbers. Nonnumeric values in ref are ignored. + * Order is a number specifying how to rank number. + + * If order is 0 (zero) or omitted, Microsoft Excel ranks number as if ref were a list sorted in descending order. + * If order is any nonzero value, Microsoft Excel ranks number as if ref were a list sorted in ascending order. + * + * @author Rubin Wang + + + Implements the Excel Rate function + + + Excel does not support infinities and NaNs, rather, it gives a #NUM! error in these cases + + @throws EvaluationException (#NUM!) if result is NaN or Infinity + + + Implementation for Excel REPT () function.

+

+ Syntax:
REPT (text,number_times )
+

+ Repeats text a given number of times. Use REPT to fill a cell with a number of instances of a text string. + + text : text The text that you want to repeat. + number_times: A positive number specifying the number of times to repeat text. + + If number_times is 0 (zero), REPT returns "" (empty text). + If this argument contains a decimal value, this function ignores the numbers to the right side of the decimal point. + + The result of the REPT function cannot be longer than 32,767 characters, or REPT returns #VALUE!. + + @author cedric dot walter @ gmail dot com + + + Implementation for Excel WeekNum() function.

+

+ Syntax:
WeekNum (Serial_num,Return_type)
+

+ Returns a number that indicates where the week falls numerically within a year. +

+

+ Serial_num is a date within the week. Dates should be entered by using the DATE function, + or as results of other formulas or functions. For example, use DATE(2008,5,23) + for the 23rd day of May, 2008. Problems can occur if dates are entered as text. + Return_type is a number that determines on which day the week begins. The default is 1. + 1 Week begins on Sunday. Weekdays are numbered 1 through 7. + 2 Week begins on Monday. Weekdays are numbered 1 through 7. + + @author cedric dot walter @ gmail dot com + + + Classic conversion. + + @param number + @return + + + Use conversion rule to factor some parts and make them more concise + + @param result + @param form + @return + + + Implementation of Excel function SLOPE()

+ + Calculates the SLOPE of the linear regression line that is used to predict y values from x values
+ (http://introcs.cs.princeton.edu/java/97data/LinearRegression.java.html) + Syntax:
+ SLOPE(arrayX, arrayY)

+ + + @author Johan Karlsteen + + + Implementation for the Excel function SUMIFS
+

+ Syntax :
+ SUMIFS ( sum_range, criteria_range1, criteria1, + [criteria_range2, criteria2], ...)
+

    +
  • sum_range Required. One or more cells to sum, including numbers or names, ranges, + or cell references that contain numbers. Blank and text values are ignored.
  • +
  • criteria1_range Required. The first range in which + to evaluate the associated criteria.
  • +
  • criteria1 Required. The criteria in the form of a number, expression, + cell reference, or text that define which cells in the criteria_range1 + argument will be added
  • +
  • criteria_range2, criteria2, ... Optional. Additional ranges and their associated criteria. + Up to 127 range/criteria pairs are allowed.
  • +
+

+ + @author Yegor Kozlov +
+ + Verify that each criteriaRanges argument contains the same number of rows and columns + as the sumRange argument + + @throws EvaluationException if + + + + @param ranges criteria ranges, each range must be of the same dimensions as aeSum + @param predicates array of predicates, a predicate for each value in ranges + @param aeSum the range to sum + + @return the computed value + + + + Implementation of the PROPER function: + Normalizes all words (separated by non-word characters) by + making the first letter upper and the rest lower case. + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + @author Manda Wilson < wilson at c bio dot msk cc dot org > + + An implementation of the TRIM function: + + Removes leading and trailing spaces from value if evaluated operand value is string. + + + + + + An implementation of the MID function + + MID returns a specific number of + characters from a text string, starting at the specified position. + + Syntax: MID(text, start_num, num_chars) + + + + @author Torstein Tauno Svendsen (torstei@officenet.no) + + Implementation of the FIND() function. + + Syntax: FIND(Find_text, within_text, start_num) + + FIND returns the character position of the first (case sensitive) occurrence of + Find_text inside within_text. The third parameter, + start_num, is optional (default=1) and specifies where to start searching + from. Character positions are 1-based. + + + + + Implementation of the FIND() function. SEARCH is a case-insensitive version of FIND() + + Syntax: SEARCH(Find_text, within_text, start_num) + + + + + Implementation for the Excel function WEEKDAY + + @author Thies Wellpott + + + * Perform WEEKDAY(date, returnOption) function. + * Note: Parameter texts are from German EXCEL-2010 help. + * Parameters in args[]: + * args[0] serialDate + * EXCEL-date value + * Standardmaessig ist der 1. Januar 1900 die fortlaufende Zahl 1 und + * der 1. Januar 2008 die fortlaufende Zahl 39.448, da dieser Tag nach 39.448 Tagen + * auf den 01.01.1900 folgt. + * @return Option (optional) + * Bestimmt den Rueckgabewert: + 1 oder nicht angegeben Zahl 1 (Sonntag) bis 7 (Samstag). Verhaelt sich wie fruehere Microsoft Excel-Versionen. + 2 Zahl 1 (Montag) bis 7 (Sonntag). + 3 Zahl 0 (Montag) bis 6 (Sonntag). + 11 Die Zahlen 1 (Montag) bis 7 (Sonntag) + 12 Die Zahlen 1 (Dienstag) bis 7 (Montag) + 13 Die Zahlen 1 (Mittwoch) bis 7 (Dienstag) + 14 Die Zahlen 1 (Donnerstag) bis 7 (Mittwoch) + 15 Die Zahlen 1 (Freitag) bis 7 (Donnerstag) + 16 Die Zahlen 1 (Samstag) bis 7 (Freitag) + 17 Die Zahlen 1 (Sonntag) bis 7 (Samstag) + + + Implementation for Excel WeekNum() function.

+

+ Syntax:
WeekNum (Serial_num,Return_type)
+

+ Returns a number that indicates where the week falls numerically within a year. +

+

+ Serial_num is a date within the week. Dates should be entered by using the DATE function, + or as results of other formulas or functions. For example, use DATE(2008,5,23) + for the 23rd day of May, 2008. Problems can occur if dates are entered as text. + Return_type is a number that determines on which day the week begins. The default is 1. + 1 Week begins on Sunday. Weekdays are numbered 1 through 7. + 2 Week begins on Monday. Weekdays are numbered 1 through 7. + + @author cedric dot walter @ gmail dot com + + +

Title: XSSF Area 3D Reference (Sheet + Area)

+

Description: Defined an area in an external or different sheet.

+

REFERENCE:

+ +

This is XSSF only, as it stores the sheet / book references + in String form. The HSSF equivalent using indexes is {@link Area3DPtg}

+
+ + Specifies a rectangular area of cells A1:A4 for instance. + @author andy + @author Jason Height (jheight at chariot dot net dot au) + + + @author Josh Micich + + + Ptg represents a syntactic token in a formula. 'PTG' is an acronym for + 'parse thing'. Originally, the name referred to the single + byte identifier at the start of the token, but in POI, Ptg encapsulates + the whole formula token (initial byte + value data). + + + Ptgs are logically arranged in a tree representing the structure of the + Parsed formula. However, in BIFF files Ptgs are written/Read in + Reverse-Polish Notation order. The RPN ordering also simplifies formula + evaluation logic, so POI mostly accesses Ptgs in the same way. + + @author andy + @author avik + @author Jason Height (jheight at chariot dot net dot au) + + + Reads size bytes of the input stream, to Create an array of Ptgs. + Extra data (beyond size) may be Read if and ArrayPtgs are present. + + + @return a distinct copy of this Ptg if the class is mutable, or the same instance + if the class is immutable. + + + This method will return the same result as {@link #getEncodedSizeWithoutArrayData(Ptg[])} + if there are no array tokens present. + @return the full size taken to encode the specified Ptgs + + + Used to calculate value that should be encoded at the start of the encoded Ptg token array; + @return the size of the encoded Ptg tokens not including any trailing array data. + + + Writes the ptgs to the data buffer, starting at the specified offset. + +
+ The 2 byte encode Length field is not written by this method. + @return number of bytes written +
+ + Write this Ptg to a byte array + + + return a string representation of this token alone + + + Overridden toString method to Ensure object hash is not printed. + This helps Get rid of gratuitous diffs when comparing two dumps + Subclasses may output more relevant information by overriding this method + + + + @return the encoded Length of this Ptg, including the initial Ptg type identifier byte. + + + @return false if this token is classified as 'reference', 'value', or 'array' + + + @return the 'operand class' (REF/VALUE/ARRAY) for this Ptg + + + Debug / diagnostic method to get this token's 'operand class' type. + @return 'R' for 'reference', 'V' for 'value', 'A' for 'array' and '.' for base tokens + + + All Operand Ptgs are classifed ('relative', 'value', 'array') + + + Common interface for AreaPtg and Area3DPtg, and their + child classes. + + + @return the first row in the area + + + @return last row in the range (x2 in x1,y1-x2,y2) + + + @return the first column number in the area. + + + @return lastcolumn in the area + + + TODO - (May-2008) fix subclasses of AreaPtg 'AreaN~' which are used in shared formulas. + see similar comment in ReferencePtg + + + zero based, Unsigned 16 bit + + + zero based, Unsigned 16 bit + + + zero based, Unsigned 8 bit + + + zero based, Unsigned 8 bit + + + Set the last column irrespective of the bitmasks + + + @return the first row in the area + + + @return last row in the range (x2 in x1,y1-x2,y2) + + + @return the first column number in the area. + + + @return whether or not the first row is a relative reference or not. + + + @return Isrelative first column to relative or not + + + @return lastcolumn in the area + + + @return last column and bitmask (the raw field) + + + @return last row relative or not + + + @return lastcol relative or not + + + An XSSF only special kind of Ptg, which stores a range of + sheet / book references in string form. + + + An XSSF only special kind of Ptg, which stores the sheet / book + reference in string form. + + + An XSSF only representation of a reference to a deleted area + + + A Name, be that a Named Range or a Function / User Defined + Function, Addressed in the HSSF External Sheet style. + +

This is XSSF only, as it stores the sheet / book references + in String form. The HSSF equivalent using indexes is {@link NameXPtg}

+
+ +

Title: XSSF 3D Reference

+

Description: Defines a cell in an external or different sheet.

+

REFERENCE:

+ +

This is XSSF only, as it stores the sheet / book references + in String form. The HSSF equivalent using indexes is {@link Ref3DPtg}

+
+ + ReferencePtgBase - handles references (such as A1, A2, IA4) + @author Andrew C. Oliver (acoliver@apache.org) + @author Jason Height (jheight at chariot dot net dot au) + + + The row index - zero based Unsigned 16 bit value + + + Field 2 + - lower 8 bits is the zero based Unsigned byte column index + - bit 16 - IsRowRelative + - bit 15 - IsColumnRelative + + + Takes in a String representation of a cell reference and Fills out the + numeric fields. + + + Returns the row number as a short, which will be + wrapped (negative) for values between 32769 and 65535 + + + Returns the row number as an int, between 0 and 65535 + + + Evaluator for returning cells or sheets for a range of sheets + + + Optional Extension to the likes of {@link AreaEval} and + {@link NPOI.SS.Formula.Eval.AreaEvalBase}, + which allows for looking up 3D (sheet+row+column) Evaluations + + + Common interface of {@link AreaEval} and {@link org.apache.poi.ss.formula.eval.AreaEvalBase}, + for 2D (row+column) evaluations + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @param rowIndex relative row index (zero based) + @param columnIndex relative column index (zero based) + @return element at the specified row and column position + + + @param rowIndex relative row index (zero based) + @return a single row {@link TwoDEval} + + + @param columnIndex relative column index (zero based) + @return a single column {@link TwoDEval} + + + @return true if the cell at row and col is a subtotal + + + @return true if the area has just a single row, this also includes + the trivial case when the area has just a single cell. + + + @return true if the area has just a single column, this also includes + the trivial case when the area has just a single cell. + + + @param sheetIndex sheet index (zero based) + @param rowIndex relative row index (zero based) + @param columnIndex relative column index (zero based) + @return element at the specified row and column position + + + A UDFFinder that can retrieve functions both by name and by fake index. + + @author Yegor Kozlov + + + Collects Add-in libraries and VB macro functions toGether into one UDF Finder + + @author PUdalau + + + Common interface for "Add-in" libraries and user defined function libraries. + + @author PUdalau + + + Returns executor by specified name. Returns null if the function name is unknown. + + @param name Name of function. + @return Function executor. + + + + Returns executor by specified name. + + Name of function. + Function executor. null if not found + + + + Add a new toolpack + + + + + Provides access to a {@link WorkbookEvaluator}, eg for use with + {@link CollaboratingWorkbooksEnvironment} + + For POI internal use only + + + Provide the underlying WorkbookEvaluator + + + + + Manages the all the records associated with a chart sub-stream.
+ Includes the Initial {@link BOFRecord} and {@link EOFRecord}. + + @author Josh Micich +
+ + All the records between BOF and EOF + + + Groups the sheet protection records for a worksheet. +

+ + See OOO excelfileformat.pdf sec 4.18.2 'Sheet Protection in a Workbook + (BIFF5-BIFF8)' + + @author Josh Micich + + + Creates an empty WorksheetProtectionBlock + + + @return true if the specified Record sid is one belonging to + the 'Page Settings Block'. + + + This method Reads {@link WorksheetProtectionBlock} records from the supplied RecordStream + until the first non-WorksheetProtectionBlock record is encountered. As each record is Read, + it is incorporated into this WorksheetProtectionBlock. +

+ As per the OOO documentation, the protection block records can be expected to be written + toGether (with no intervening records), but earlier versions of POI (prior to Jun 2009) + didn't do this. Workbooks with sheet protection Created by those earlier POI versions + seemed to be valid (Excel opens them OK). So PO allows continues to support Reading of files + with non continuous worksheet protection blocks. + +

+ Note - when POI Writes out this WorksheetProtectionBlock, the records will always be + written in one consolidated block (in the standard ordering) regardless of how scattered the + records were when they were originally Read. + + +

+ protect a spreadsheet with a password (not encrypted, just sets protect flags and the password.) + + password to set;Pass null to remove all protection + shouldProtectObjects are protected + shouldProtectScenarios are protected +
+ + + Creates an ObjectProtect record with protect set to false. + + + + + + Creates a ScenarioProtect record with protect set to false. + + + + + + Creates a Password record with password set to 0x0000. + + + + + + the ProtectRecord. If one is not contained in the sheet, then one is created. + + + + + the PasswordRecord. If one is not Contained in the sheet, then one is Created. + + + + + The Chart3d record specifies that the plot area of the chart group is rendered in a 3-D scene + and also specifies the attributes of the 3-D plot area. The preceding chart group type MUST be + of type bar, pie, line, area, or surface. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + A signed integer that specifies the clockwise rotation, in degrees, of the 3-D plot area + around a vertical line through the center of the 3-D plot area. MUST be greater than or + equal to 0 and MUST be less than or equal to 360. + + + + + A signed integer that specifies the rotation, in degrees, of the 3-D plot area around + a horizontal line through the center of the 3-D plot area.MUST be greater than or equal + to -90 and MUST be less than or equal to 90. + + + + + A signed integer that specifies the field of view angle for the 3-D plot area. + MUST be greater than or equal to zero and less than 200. + + + + + If fNotPieChart is 0, then this is an unsigned integer that specifies the thickness of the pie for a pie chart group. + If fNotPieChart is 1, then this is a signed integer that specifies the height of the 3-D plot area as a percentage of its width. + + + + + A signed integer that specifies the depth of the 3-D plot area as a percentage of its width. + MUST be greater than or equal to 1 and less than or equal to 2000. + + + + + An unsigned integer that specifies the width of the gap between the series and the front and + back edges of the 3-D plot area as a percentage of the data point depth divided by 2. + If fCluster is not 1 and chart group type is not a bar then pcGap also specifies distance + between adjacent series as a percentage of the data point depth. MUST be less than or equal to 500. + + + + + A bit that specifies whether the 3-D plot area is rendered with a vanishing point. + If fNotPieChart is 0 the value MUST be 0. If fNotPieChart is 1 then the value + MUST be a value from the following + true Perspective vanishing point applied based on value of pcDist. + false No vanishing point applied. + + + + + specifies whether data points are clustered together in a bar chart group. + If chart group type is not bar or pie, value MUST be ignored. If chart group type is pie, + value MUST be 0. If chart group type is bar, then the value MUST be a value from the following + true Data points are clustered. + false Data points are not clustered. + + + + + A bit that specifies whether the height of the 3-D plot area is automatically determined. + If fNotPieChart is 0 then this MUST be 0. If fNotPieChart is 1 then the value MUST be a value from the following table: + false The value of pcHeight is used to determine the height of the 3-D plot area + true The height of the 3-D plot area is automatically determined + + + + + A bit that specifies whether the chart group type is pie. MUST be a value from the following : + false Chart group type MUST be pie. + true Chart group type MUST not be pie. + + + + + Whether the walls are rendered in 2-D. If fPerspective is 1 then this MUST be ignored. + If the chart group type is not bar, area or pie this MUST be ignored. + If the chart group is of type bar and fCluster is 0, then this MUST be ignored. + If the chart group type is pie this MUST be 0 and MUST be ignored. + If the chart group type is bar or area, then the value MUST be a value from the following + false Chart walls and floor are rendered in 3D. + true Chart walls are rendered in 2D and the chart floor is not rendered. + + + + + The CrtLayout12A record specifies layout information for a plot area. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + specifies the type of plot area for the layout target. + false Outer plot area - The bounding rectangle that includes the axis labels, axis titles, data table (2) and plot area of the chart. + true Inner plot area – The rectangle bounded by the chart axes. + + + + + specifies the checksum + + + + + specifies the horizontal offset of the plot area’s upper-left corner, relative to the upper-left corner of the chart area + + + + + specifies the vertical offset of the plot area’s upper-left corner, relative to the upper-left corner of the chart area + + + + + specifies the width of the plot area + + + + + specifies the height of the plot area + + + + + A CrtLayout12Mode structure that specifies the meaning of x. + + + + + A CrtLayout12Mode structure that specifies the meaning of y. + + + + + A CrtLayout12Mode structure that specifies the meaning of dx. + + + + + A CrtLayout12Mode structure that specifies the meaning of dy. + + + + + An Xnum (section 2.5.342) value that specifies a horizontal offset. The meaning is determined by wXMode. + + + + + An Xnum value that specifies a vertical offset. The meaning is determined by wYMode. + + + + + An Xnum value that specifies a width or an horizontal offset. The meaning is determined by wWidthMode. + + + + + An Xnum value that specifies a height or an vertical offset. The meaning is determined by wHeightMode. + + + + + The CrtLayout12Mode specifies a layout mode. Each layout mode specifies a different + meaning of the x, y, dx, and dy fields of CrtLayout12 and CrtLayout12A. + + + + + Position and dimension (2) are determined by the application. x, y, dx and dy MUST be ignored. + + + + + x and y specify the offset of the top left corner, relative to its default position, + as a fraction of the chart area. MUST be greater than or equal to -1.0 and MUST be + less than or equal to 1.0. dx and dy specify the width and height, as a fraction of + the chart area, MUST be greater than or equal to 0.0, and MUST be less than or equal to 1.0. + + + + + x and y specify the offset of the upper-left corner; dx and dy specify the offset of the bottom-right corner. + x, y, dx and dy are specified relative to the upper-left corner of the chart area as a fraction of the chart area. + x, y, dx and dy MUST be greater than or equal to 0.0, and MUST be less than or equal to 1.0. + + + + + The CrtLayout12 record specifies the layout information for attached label, when contained + in the sequence of records that conforms to the ATTACHEDLABEL rule, + or legend, when contained in the sequence of records that conforms to the LD rule. + + + + + automatic layout type of the legend. + MUST be ignored when this record is in the sequence of records that conforms to the ATTACHEDLABEL rule. + MUST be a value from the following table: + 0x0 Align to the bottom + 0x1 Align to top right corner + 0x2 Align to the top + 0x3 Align to the right + 0x4 Align to the left + + + + + specifies the checksum of the values in the order as follows, + + + + + A CrtLayout12Mode structure that specifies the meaning of x. + + + + + A CrtLayout12Mode structure that specifies the meaning of y. + + + + + A CrtLayout12Mode structure that specifies the meaning of dx. + + + + + A CrtLayout12Mode structure that specifies the meaning of dy. + + + + + An Xnum (section 2.5.342) value that specifies a horizontal offset. The meaning is determined by wXMode. + + + + + An Xnum value that specifies a vertical offset. The meaning is determined by wYMode. + + + + + An Xnum value that specifies a width or an horizontal offset. The meaning is determined by wWidthMode. + + + + + An Xnum value that specifies a height or an vertical offset. The meaning is determined by wHeightMode. + + + + + The CrtMlFrt record specifies additional properties for chart elements, as specified by + the Chart Sheet Substream ABNF. These properties complement the record to which they + correspond, and are stored as a structure chain defined in XmlTkChain. An application + can ignore this record without loss of functionality, except for the additional properties. + If this record is longer than 8224 bytes, it MUST be split into several records. The first + section of the data appears in this record and subsequent sections appear in one or more + CrtMlFrtContinue records that follow this record. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + specifies the color, size, and shape of the associated data markers that appear on line, radar, + and scatter chart groups. The associated data markers are specified by the preceding DataFormat record. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + the border color of the data marker. + + + + + the interior color of the data marker. + + + + + the type of data marker. + + + + + whether the data marker is automatically generated. + false The data marker is not automatically generated. + true The data marker type, size, and color are automatically generated and the values are set accordingly in this record. + + + + + whether to show the data marker interior. + false The data marker interior is shown. + true The data marker interior is not shown. + + + + + whether to show the data marker border. + false The data marker border is shown. + true The data marker border is not shown. + + + + + the border color of the data marker. + + + + + the interior color of the data marker. + + + + + specifies the size in twips of the data marker. + + + + + The PieFormat record specifies the distance of a data point or data points in a series from the center of one of the following: + The plot area for a doughnut or pie chart group. + The primary pie in a pie of pie or bar of pie chart group. + The secondary bar/pie of a pie of pie chart group. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + A signed integer that specifies the distance of a data point or data points in a series from the center of one of the following: + The plot area for a doughnut or pie chart group. + The primary pie in a pie of pie or bar of pie chart group. + The secondary bar/pie of a pie of pie chart group. + + + + + The Pie record specifies that the chart group is a pie chart group or + a doughnut chart group, and specifies the chart group attributes. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + An unsigned integer that specifies the starting angle of the first data point, + clockwise from the top of the circle. MUST be less than or equal to 360. + + + + + An unsigned integer that specifies the size of the center hole in a doughnut chart group + as a percentage of the plot area size. MUST be a value from the following table: + 0 Pie chart group. + 10 to 90 Doughnut chart group. + + + + + A bit that specifies whether one data point or more data points in the chart group have shadows. + + + + + A bit that specifies whether the leader lines to the data labels are shown. + + + + FeatFormulaErr2 (Formula Evaluation Shared Feature) common record part + + This record part specifies Formula Evaluation & Error Ignoring data + for a sheet, stored as part of a Shared Feature. It can be found in + records such as {@link FeatRecord}. + For the full meanings of the flags, see pages 669 and 670 + of the Excel binary file format documentation. + + + Common Interface for all Shared Features + + + What errors we should ignore + + + Title: FeatProtection (Protection Shared Feature) common record part + + This record part specifies Protection data for a sheet, stored + as part of a Shared Feature. It can be found in records such + as {@link FeatRecord} + + + 0 means no password. Otherwise indicates the + password verifier algorithm (same kind as + {@link PasswordRecord} and + {@link PasswordRev4Record}) + + + Title: FeatSmartTag (Smart Tag Shared Feature) common record part + + This record part specifies Smart Tag data for a sheet, stored as part + of a Shared Feature. It can be found in records such as {@link FeatRecord}. + It is made up of a hash, and a Set of Factoid Data that Makes up + the smart tags. + For more details, see page 669 of the Excel binary file + format documentation. + + + Title: FtrHeader (Future Record Header) common record part + + This record part specifies a header for a Ftr (Future) + style record, which includes extra attributes above and + beyond those of a traditional record. + + + This MUST match the type on the Containing record + + + This is a FrtFlags + + + MUST be 8 bytes and all zero + + + Title: Unicode String

+ Description: Unicode String - just standard fields that are in several records. + It is considered more desirable then repeating it in all of them.

+ This is often called a XLUnicodeRichExtendedString in MS documentation.

+ REFERENCE: PG 264 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)

+ REFERENCE: PG 951 Excel Binary File Format (.xls) Structure Specification v20091214 + + + Our handling of Equals is inconsistent with CompareTo. The trouble is because we don't truely understand + rich text fields yet it's difficult to make a sound comparison. + + @param o The object to Compare. + @return true if the object is actually Equal. + + + construct a unicode string record and fill its fields, ID is ignored + @param in the RecordInputstream to read the record from + + + Adds a font run to the formatted string. + + If a font run exists at the current charcter location, then it is + Replaced with the font run to be Added. + + + Swaps all use in the string of one font index + for use of a different font index. + Normally only called when fonts have been + Removed / re-ordered + + + unlike the real records we return the same as "getString()" rather than debug info + @see #getDebugInfo() + @return String value of the record + + + return a character representation of the fields of this record + + + @return String of output for biffviewer etc. + + + + Serialises out the String. There are special rules + about where we can and can't split onto + Continue records. + + + get the number of characters in the string, + as an un-wrapped int + + @return number of characters + + + Get the option flags which among other things return if this is a 16-bit or + 8 bit string + + @return optionflags bitmask + + + + @return the actual string this Contains as a java String object + + + Returns our size, excluding our + 4 byte header + + + A decorated {@link RecordInputStream} that can read primitive data types + (short, int, long, etc.) spanned across a {@link ContinueRecord } boundary. + +

+ Most records construct themselves from {@link RecordInputStream}. + This class assumes that a {@link ContinueRecord} record break always occurs at the type boundary, + however, it is not always so. +

+ Two attachments to Bugzilla 50779 + demonstrate that a CONTINUE break can appear right in between two bytes of a unicode character + or between two bytes of a short. The problematic portion of the data is + in a Asian Phonetic Settings Block (ExtRst) of a UnicodeString. +

+ {@link RecordInputStream} greedily requests the bytes to be read and stumbles on such files with a + "Not enough data (1) to read requested (2) bytes" exception. The ContinuableRecordInput + class circumvents this "type boundary" rule and Reads data byte-by-byte rolling over CONTINUE if necessary. +

+ +

+ YK: For now (March 2011) this class is only used to read + @link NPOI.HSSF.Record.Common.UnicodeString.ExtRst} blocks of a UnicodeString. + +

+ + @author Yegor Kozlov +
+ + + @author Josh Micich + + + Title: FeatHdr (Feature Header) Record + + This record specifies common information for Shared Features, and + specifies the beginning of a collection of records to define them. + The collection of data (Globals Substream ABNF, macro sheet substream + ABNF or worksheet substream ABNF) specifies Shared Feature data. + + + Specifies the enhanced protection type. Used to protect a + shared workbook by restricting access to some areas of it + + + Specifies that formula errors should be ignored + + + Specifies the smart tag type. Recognises certain + types of entries (proper names, dates/times etc) and + flags them for action + + + Specifies the shared list type. Used for a table + within a sheet + + + 0x00000000 = rgbHdrData not present + 0xffffffff = rgbHdrData present + + + We need a BOFRecord to make sense of this... + + + Title: Feat (Feature) Record + + This record specifies Shared Features data. It is normally paired + up with a {@link FeatHdrRecord}. + + + See SHAREDFEATURES_* on {@link FeatHdrRecord} + + + Only matters if type is ISFFEC2 + + + Contents depends on isf_sharedFeatureType : + ISFPROTECTION -> FeatProtection + ISFFEC2 -> FeatFormulaErr2 + ISFFACTOID -> FeatSmartTag + + + Construct a new FtCblsSubRecord and + fill its data with the default values + + + Convert this record to string. + Used by BiffViewer and other utilities. + + + Serialize the record data into the supplied array of bytes + + @param out the stream to serialize into + + + @return id of this record. + + + + + + + + + The xtHeader.drType field MUST be equal to 0x07. + + + + + The xtHeader.drType field MUST be equal to 0x02. + + + + + The xtHeader.drType field MUST be equal to 0x03. + + + + + The xtHeader.drType field MUST be equal to 0x04. + + + + + The xtHeader.drType field MUST be equal to 0x01. + + + + + The xtHeader.drType field MUST be equal to 0x05. + + + + + An array of Unicode characters. The size of the array, in characters, is specified + by the cchValue field. The size of the field, in bytes, MUST equal the result of + the following formula:cchValue * 2. + + + + + The chartStyle.xtHeader.xmlTkTag MUST be equal to 0x0003. + + + + + The nInterval.xtHeader.xmlTkTag field MUST be equal to 0x0052. + + + + + @author Josh Micich + + + @return data validation type of this constraint + @see ValidationType + + + @return the operator used for this constraint + @see OperatorType + + get or set then comparison operator for this constraint + + + + + get or set the formula for expression 1. May be null + + + + + get or set the formula for expression 2. May be null + + + + Creates a list constraint + + + Creates a number based data validation constraint. The text values entered for expr1 and expr2 + can be either standard Excel formulas or formatted number values. If the expression starts + with '=' it is Parsed as a formula, otherwise it is Parsed as a formatted number. + + @param validationType one of {@link NPOI.SS.UserModel.DataValidationConstraint.ValidationType#ANY}, + {@link NPOI.SS.UserModel.DataValidationConstraint.ValidationType#DECIMAL}, + {@link NPOI.SS.UserModel.DataValidationConstraint.ValidationType#INTEGER}, + {@link NPOI.SS.UserModel.DataValidationConstraint.ValidationType#TEXT_LENGTH} + @param comparisonOperator any constant from {@link NPOI.SS.UserModel.DataValidationConstraint.OperatorType} enum + @param expr1 date formula (when first char is '=') or formatted number value + @param expr2 date formula (when first char is '=') or formatted number value + + + Creates a time based data validation constraint. The text values entered for expr1 and expr2 + can be either standard Excel formulas or formatted time values. If the expression starts + with '=' it is Parsed as a formula, otherwise it is Parsed as a formatted time. To parse + formatted times, two formats are supported: "HH:MM" or "HH:MM:SS". This is contrary to + Excel which uses the default time format from the OS. + + @param comparisonOperator constant from {@link NPOI.SS.UserModel.DataValidationConstraint.OperatorType} enum + @param expr1 date formula (when first char is '=') or formatted time value + @param expr2 date formula (when first char is '=') or formatted time value + + + Creates a date based data validation constraint. The text values entered for expr1 and expr2 + can be either standard Excel formulas or formatted date values. If the expression starts + with '=' it is Parsed as a formula, otherwise it is Parsed as a formatted date (Excel uses + the same convention). To parse formatted dates, a date format needs to be specified. This + is contrary to Excel which uses the default short date format from the OS. + + @param comparisonOperator constant from {@link NPOI.SS.UserModel.DataValidationConstraint.OperatorType} enum + @param expr1 date formula (when first char is '=') or formatted date value + @param expr2 date formula (when first char is '=') or formatted date value + @param dateFormat ignored if both expr1 and expr2 are formulas. Default value is "YYYY/MM/DD" + otherwise any other valid argument for SimpleDateFormat can be used + @see SimpleDateFormat + + + Distinguishes formula expressions from simple value expressions. This logic is only + required by a few factory methods in this class that create data validation constraints + from more or less the same parameters that would have been entered in the Excel UI. The + data validation dialog box uses the convention that formulas begin with '='. Other methods + in this class follow the POI convention (formulas and values are distinct), so the '=' + convention is not used there. + + @param textExpr a formula or value expression + @return all text After '=' if textExpr begins with '='. Otherwise null if textExpr does not begin with '=' + + + @return null if numberStr is null + + + @return null if timeStr is null + + + @param dateFormat pass null for default YYYYMMDD + @return null if timeStr is null + + + @return both Parsed formulas (for expression 1 and 2). + + + @return The Parsed token array representing the formula or value specified. + Empty array if both formula and value are null + + + Convenience method + @return true if this constraint is a 'list' validation + + + Convenience method + @return true if this constraint is a 'list' validation with explicit values + + + @return the numeric value for expression 1. May be null + + + @return the numeric value for expression 2. May be null + + + HSSFDataFormatter contains methods for formatting the value stored in an + HSSFCell. This can be useful for reports and GUI presentations when you + need to display data exactly as it appears in Excel. Supported formats + include currency, SSN, percentages, decimals, dates, phone numbers, zip + codes, etc. + + Internally, formats will be implemented using subclasses of + such as and . Therefore the + formats used by this class must obey the same pattern rules as these Format + subclasses. This means that only legal number pattern characters ("0", "#", + ".", "," etc.) may appear in number formats. Other characters can be + inserted before or after the number pattern to form a + prefix or suffix. + + For example the Excel pattern "$#,##0.00 "USD"_);($#,##0.00 "USD")" + will be correctly formatted as "$1,000.00 USD" or "($1,000.00 USD)". + However the pattern "00-00-00" is incorrectly formatted by + DecimalFormat as "000000--". For Excel formats that are not compatible with + DecimalFormat, you can provide your own custom {@link Format} implementation + via HSSFDataFormatter.AddFormat(String,Format). The following + custom formats are already provided by this class: + +
+             
  • SSN "000-00-0000"
  • +
  • Phone Number "(###) ###-####"
  • +
  • Zip plus 4 "00000-0000"
  • +
+
+ + If the Excel format pattern cannot be parsed successfully, then a default + format will be used. The default number format will mimic the Excel General + format: "#" for whole numbers and "#.##########" for decimal numbers. You + can override the default format pattern with + HSSFDataFormatter.DefaultNumberFormat=(Format). Note: the + default format will only be used when a Format cannot be created from the + cell's data format string. + + @author James May (james dot may at fmr dot com) +
+ + HSSFDataFormatter contains methods for Formatting the value stored in an + Cell. This can be useful for reports and GUI presentations when you + need to display data exactly as it appears in Excel. Supported Formats + include currency, SSN, percentages, decimals, dates, phone numbers, zip + codes, etc. + + Internally, Formats will be implemented using subclasses of + such as and . Therefore the + Formats used by this class must obey the same pattern rules as these FormatBase + subclasses. This means that only legal number pattern characters ("0", "#", + ".", "," etc.) may appear in number formats. Other characters can be + inserted before or after the number pattern to form a + prefix or suffix. + + + For example the Excel pattern "$#,##0.00 "USD"_);($#,##0.00 "USD")" + will be correctly Formatted as "$1,000.00 USD" or "($1,000.00 USD)". + However the pattern "00-00-00" is incorrectly Formatted by + DecimalFormat as "000000--". For Excel Formats that are not compatible with + DecimalFormat, you can provide your own custom {@link FormatBase} implementation + via HSSFDataFormatter.AddFormat(String,FormatBase). The following + custom Formats are already provided by this class: + +
+             
  • SSN "000-00-0000"
  • +
  • Phone Number "(###) ###-####"
  • +
  • Zip plus 4 "00000-0000"
  • +
+
+ + If the Excel FormatBase pattern cannot be Parsed successfully, then a default + FormatBase will be used. The default number FormatBase will mimic the Excel General + FormatBase: "#" for whole numbers and "#.##########" for decimal numbers. You + can override the default FormatBase pattern with + HSSFDataFormatter.setDefaultNumberFormat(FormatBase). Note: the + default FormatBase will only be used when a FormatBase cannot be Created from the + cell's data FormatBase string. + + @author James May (james dot may at fmr dot com) + +
+ + Pattern to find a number FormatBase: "0" or "#" + + + Pattern to find days of week as text "ddd...." + + + Pattern to find "AM/PM" marker + + + A regex to find patterns like [$$-1009] and [$�-452]. + Note that we don't currently process these into locales + + + A regex to identify a fraction pattern. + This requires that replaceAll("\\?", "#") has already been called + + + A regex to strip junk out of fraction formats + + + * Cells formatted with a date or time format and which contain invalid date or time values + * show 255 pound signs ("#"). + + + General FormatBase for whole numbers. + + + General FormatBase for decimal numbers. + + + A default FormatBase to use when a number pattern cannot be Parsed. + + + Creates a formatter using the {@link Locale#getDefault() default locale}. + + + Constructor + + + Creates a formatter using the given locale. + + @param emulateCsv whether to emulate CSV output. + + + Return a FormatBase for the given cell if one exists, otherwise try to + Create one. This method will return null if the any of the + following is true: +
    +
  • the cell's style is null
  • +
  • the style's data FormatBase string is null or empty
  • +
  • the FormatBase string cannot be recognized as either a number or date
  • +
+ + @param cell The cell to retrieve a FormatBase for + @return A FormatBase for the FormatBase String +
+ + Create and return a FormatBase based on the FormatBase string from a cell's + style. If the pattern cannot be Parsed, return a default pattern. + + @param cell The Excel cell + @return A FormatBase representing the excel FormatBase. May return null. + + + Return true if the double value represents a whole number + @param d the double value to check + @return true if d is a whole number + + + Returns a default FormatBase for a cell. + @param cell The cell + @return a default FormatBase + + + Returns the Formatted value of an Excel date as a String based + on the cell's DataFormat. i.e. "Thursday, January 02, 2003" + , "01/02/2003" , "02-Jan" , etc. + + @param cell The cell + @return a Formatted date string + + + Returns the Formatted value of an Excel number as a String + based on the cell's DataFormat. Supported Formats include + currency, percents, decimals, phone number, SSN, etc.: + "61.54%", "$100.00", "(800) 555-1234". + + @param cell The cell + @return a Formatted number string + + + Formats the given raw cell value, based on the supplied + FormatBase index and string, according to excel style rules. + @see #FormatCellValue(Cell) + + + Performs Excel-style date formatting, using the + supplied Date and format + + + Formats the given raw cell value, based on the supplied + format index and string, according to excel style rules. + @see #formatCellValue(Cell) + + + + Returns the Formatted value of a cell as a String regardless + of the cell type. If the Excel FormatBase pattern cannot be Parsed then the + cell value will be Formatted using a default FormatBase. + + When passed a null or blank cell, this method will return an empty + String (""). Formulas in formula type cells will not be evaluated. + + + @param cell The cell + @return the Formatted cell value as a String + + + + Returns the Formatted value of a cell as a String regardless + of the cell type. If the Excel FormatBase pattern cannot be Parsed then the + cell value will be Formatted using a default FormatBase. + + When passed a null or blank cell, this method will return an empty + String (""). Formula cells will be evaluated using the given + {@link HSSFFormulaEvaluator} if the evaluator is non-null. If the + evaluator is null, then the formula String will be returned. The caller + is responsible for setting the currentRow on the evaluator + + + @param cell The cell (can be null) + @param evaluator The HSSFFormulaEvaluator (can be null) + @return a string value of the cell + + + + Sets a default number FormatBase to be used when the Excel FormatBase cannot be + Parsed successfully. Note: This is a fall back for when an error + occurs while parsing an Excel number FormatBase pattern. This will not + affect cells with the General FormatBase. + + + The value that will be passed to the FormatBase's FormatBase method (specified + by java.text.FormatBase#FormatBase) will be a double value from a + numeric cell. Therefore the code in the FormatBase method should expect a + Number value. + + + @param FormatBase A FormatBase instance to be used as a default + @see java.text.FormatBase#FormatBase + + + Adds a new FormatBase to the available formats. + + The value that will be passed to the FormatBase's FormatBase method (specified + by java.text.FormatBase#FormatBase) will be a double value from a + numeric cell. Therefore the code in the FormatBase method should expect a + Number value. + + @param excelformatStr The data FormatBase string + @param FormatBase A FormatBase instance + + + Creates a formatter using the given locale. + + + Creates a formatter using the {@link Locale#getDefault() default locale}. + + + Utility class for creating data validation cells + + @author Dragos Buleandra (dragos.buleandra@trade2b.ro) + + + Sets the title and text for the prompt box . Prompt box is displayed when + the user selects a cell which belongs to this validation object . In + order for a prompt box to be displayed you should also use method + SetShowPromptBox( bool show ) + + @param title The prompt box's title + @param text The prompt box's text + + + Sets the title and text for the error box . Error box is displayed when + the user enters an invalid value int o a cell which belongs to this + validation object . In order for an error box to be displayed you should + also use method SetShowErrorBox( bool show ) + + @param title The error box's title + @param text The error box's text + + + + get or set the error style for error box + + + + + Setting this allows an empty object as a valid value. Retrieve the settings for empty cells allowed. + @return True if this object should treats empty as valid value , false otherwise + + true if this object should treats empty as valid value, false otherwise + + + + Useful for list validation objects . + Useful only list validation objects . This method always returns false if the object isn't a list validation object + + + + Sets the behaviour when a cell which belongs to this object is selected + + true if an prompt box should be displayed , false otherwise + + + Sets the behaviour when an invalid value is entered + + true if an error box should be displayed , false otherwise + + + @return Prompt box's title or null + + + @return Prompt box's text or null + + + @return Error box's title or null + + + @return Error box's text or null + + + Constructor which Initializes the cell range on which this object will be + applied + @param constraint + + + @author Radhakrishnan J + + + + @author Radhakrishnan J + + + + Contains methods for dealing with Excel dates. + + @author Michael Harhen + @author Glen Stampoultzis (glens at apache.org) + @author Dan Sherman (dsherman at isisph.com) + @author Hack Kampbjorn (hak at 2mba.dk) + @author Alex Jacoby (ajacoby at gmail.com) + @author Pavel Krupets (pkrupets at palmtreebusiness dot com) + + + + Contains methods for dealing with Excel dates. + @author Michael Harhen + @author Glen Stampoultzis (glens at apache.org) + @author Dan Sherman (dsherman at Isisph.com) + @author Hack Kampbjorn (hak at 2mba.dk) + @author Alex Jacoby (ajacoby at gmail.com) + @author Pavel Krupets (pkrupets at palmtreebusiness dot com) + @author Thies Wellpott + + + + The following patterns are used in {@link #isADateFormat(int, String)} + + + + Given a Calendar, return the number of days since 1899/12/31. + + the date + if set to true [use1904windowing]. + number of days since 1899/12/31 + + + + Given a Date, Converts it into a double representing its internal Excel representation, + which Is the number of days since 1/1/1900. Fractional days represent hours, minutes, and seconds. + + Excel representation of Date (-1 if error - test for error by Checking for less than 0.1) + the Date + + + + Gets the excel date. + + The year. + The month. + The day. + The hour. + The minute. + The second. + Should 1900 or 1904 date windowing be used? + + + + + Given a Date, Converts it into a double representing its internal Excel representation, + which Is the number of days since 1/1/1900. Fractional days represent hours, minutes, and seconds. + + The date. + Should 1900 or 1904 date windowing be used? + Excel representation of Date (-1 if error - test for error by Checking for less than 0.1) + + + + Given an Excel date with using 1900 date windowing, and converts it to a java.util.Date. + Excel Dates and Times are stored without any timezone + information. If you know (through other means) that your file + uses a different TimeZone to the system default, you can use + this version of the getJavaDate() method to handle it. + + The Excel date. + null if date is not a valid Excel date + + + Given an Excel date with either 1900 or 1904 date windowing, + Converts it to a Date. + + NOTE: If the default TimeZone in Java uses Daylight + Saving Time then the conversion back to an Excel date may not give + the same value, that Is the comparison + excelDate == GetExcelDate(GetJavaDate(excelDate,false)) + Is not always true. For example if default timezone Is + Europe/Copenhagen, on 2004-03-28 the minute after + 01:59 CET Is 03:00 CEST, if the excel date represents a time between + 02:00 and 03:00 then it Is Converted to past 03:00 summer time + + @param date The Excel date. + @param use1904windowing true if date uses 1904 windowing, + or false if using 1900 date windowing. + @return Java representation of the date, or null if date Is not a valid Excel date + @see TimeZone + + + Given an Excel date with either 1900 or 1904 date windowing, + converts it to a java.util.Date. + + Excel Dates and Times are stored without any timezone + information. If you know (through other means) that your file + uses a different TimeZone to the system default, you can use + this version of the getJavaDate() method to handle it. + + @param date The Excel date. + @param tz The TimeZone to evaluate the date in + @param use1904windowing true if date uses 1904 windowing, + or false if using 1900 date windowing. + @return Java representation of the date, or null if date is not a valid Excel date + + + Given an Excel date with either 1900 or 1904 date windowing, + converts it to a java.util.Date. + + Excel Dates and Times are stored without any timezone + information. If you know (through other means) that your file + uses a different TimeZone to the system default, you can use + this version of the getJavaDate() method to handle it. + + @param date The Excel date. + @param tz The TimeZone to evaluate the date in + @param use1904windowing true if date uses 1904 windowing, + or false if using 1900 date windowing. + @param roundSeconds round to closest second + @return Java representation of the date, or null if date is not a valid Excel date + + + Get EXCEL date as Java Calendar with given time zone. + @param date The Excel date. + @param use1904windowing true if date uses 1904 windowing, + or false if using 1900 date windowing. + @param timeZone The TimeZone to evaluate the date in + @return Java representation of the date, or null if date is not a valid Excel date + + + + Get EXCEL date as Java Calendar (with default time zone). This is like GetJavaDate(double, boolean) but returns a Calendar object. + + The Excel date. + true if date uses 1904 windowing, or false if using 1900 date windowing. + + null if date is not a valid Excel date + + + + Converts a string of format "HH:MM" or "HH:MM:SS" to its (Excel) numeric equivalent + + The time STR. + a double between 0 and 1 representing the fraction of the day + + + + Converts the time internal. + + The time STR. + + + + + Given a format ID and its format String, will Check to see if the + format represents a date format or not. + Firstly, it will Check to see if the format ID corresponds to an + internal excel date format (eg most US date formats) + If not, it will Check to see if the format string only Contains + date formatting Chars (ymd-/), which covers most + non US date formats. + + The index of the format, eg from ExtendedFormatRecord.GetFormatIndex + The format string, eg from FormatRecord.GetFormatString + + true if [is A date format] [the specified format index]; otherwise, false. + + + + + Converts a string of format "YYYY/MM/DD" to its (Excel) numeric equivalent + + The date STR. + a double representing the (integer) number of days since the start of the Excel epoch + + + + Parses the YYYYMMDD date internal. + + The time string. + + + + + Parses the int. + + The string value. + Name of the field. + The range max. + + + + + Parses the int. + + The STR val. + Name of the field. + The lower limit. + The upper limit. + + + + + Given a format ID this will Check whether the format represents an internal excel date format or not. + + The format. + + + + Check if a cell Contains a date + Since dates are stored internally in Excel as double values + we infer it Is a date if it Is formatted as such. + + The cell. + + + + Check if a cell contains a date, Checking only for internal excel date formats. + As Excel stores a great many of its dates in "non-internal" date formats, you will not normally want to use this method. + + The cell. + + + + Given a double, Checks if it Is a valid Excel date. + + the double value. + + true if [is valid excel date] [the specified value]; otherwise, false. + + + + Utility for delaying the concatenation of multiple byte arrays. Doing this up-front + causes significantly more copying, which for a large number of byte arrays can cost + a large amount of time. + + + Clears the array (sets the concatenated length back to zero. + + + Concatenates an array onto the end of our array. + This is a relatively fast operation. + + @param array the array to concatenate. + @throws ArgumentException if {@code array} is {@code null}. + + + Gets the concatenated contents as a single byte array. + + This is a slower operation, but the concatenated array is stored off as a single + array again so that subsequent calls will not perform Additional copying. + + @return the byte array. Returns {@code null} if no data has been placed into it. + + + Base class of all the exceptions that POI throws in the event + that it's given a file that isn't supported + + + + Generates escher records when provided the byte array containing those records. + @author Glen Stampoultzis + @author Nick Burch (nick at torchbox . com) + + + + + The escher record factory interface allows for the creation of escher + records from a pointer into a data array. + @author Glen Stampoultzis (glens at apache.org) + + + + + Create a new escher record from the data provided. Does not attempt + to Fill the contents of the record however. + + The data. + The off set. + + + + + Initializes a new instance of the class. + + + + + Generates an escher record including the any children contained under that record. + An exception is thrown if the record could not be generated. + + The byte array containing the records + The starting offset into the byte array + The generated escher record + + + + Converts from a list of classes into a map that Contains the record id as the key and + the Constructor in the value part of the map. It does this by using reflection to look up + the RECORD_ID field then using reflection again to find a reference to the constructor. + + The records to convert + The map containing the id/constructor pairs. + + + + Escher array properties are the most wierd construction ever invented + with all sorts of special cases. I'm hopeful I've got them all. + @author Glen Stampoultzis (glens at superlinksoftware.com) + + + + + A complex property differs from a simple property in that the data can not fit inside a 32 bit + integer. See the specification for more detailed information regarding exactly what is + stored here. + @author Glen Stampoultzis + + + + + This is the abstract base class for all escher properties. + @see EscherOptRecord + @author Glen Stampoultzis (glens at apache.org) + + + + + Initializes a new instance of the class. + + The id is distinct from the actual property number. The id includes the property number the blip id + flag and an indicator whether the property is complex or not. + + + + Initializes a new instance of the class.The three parameters are combined to form a property + id. + + The property number. + if set to true [is complex]. + if set to true [is blip id]. + + + + Escher properties consist of a simple fixed Length part and a complex variable Length part. + The fixed Length part is Serialized first. + + The data. + The pos. + + + + + Escher properties consist of a simple fixed Length part and a complex variable Length part. + The fixed Length part is Serialized first. + + The data. + The pos. + + + + + Gets the id. + + The id. + + + + Gets the property number. + + The property number. + + + + Gets a value indicating whether this instance is complex. + + + true if this instance is complex; otherwise, false. + + + + + Gets a value indicating whether this instance is blip id. + + + true if this instance is blip id; otherwise, false. + + + + + Gets the name. + + The name. + + + + Most properties are just 6 bytes in Length. Override this if we're + dealing with complex properties. + + The size of the property. + + + + Create a complex property using the property id and a byte array containing the complex + data value. + + The id consists of the property number, a flag indicating whether this is a blip id and a flag + indicating that this is a complex property. + The value of this property. + + + + Create a complex property using the property number, a flag to indicate whether this is a + blip reference and the complex property data. + + The property number. + Whether this is a blip id. Should be false. + The value of this complex property. + + + + Serializes the simple part of this property. ie the first 6 bytes. + + + + + + + + Serializes the complex part of this property + + The data array to Serialize to + The offset within data to start serializing to. + The number of bytes Serialized. + + + + Determine whether this property is equal to another property. + + The object to compare to. + True if the objects are equal. + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets the complex data. + + The complex data. + + + + Caclulates the number of bytes required to Serialize this property. + + Number of bytes + + + The size of the header that goes at the + start of the array, before the data + + + Normally, the size recorded in the simple data (for the complex + data) includes the size of the header. + There are a few cases when it doesn't though... + + + When Reading a property from data stream remeber if the complex part is empty and Set this flag. + + + + Gets the element. + + The index. + + + + + Sets the element. + + The index. + The element. + + + + Retrieves the string representation for this property. + + + + + + We have this method because the way in which arrays in escher works + is screwed for seemly arbitary reasons. While most properties are + fairly consistent and have a predictable array size, escher arrays + have special cases. + + The data array containing the escher array information + The offset into the array to start Reading from. + the number of bytes used by this complex property. + + + + Serializes the simple part of this property. ie the first 6 bytes. + Needs special code to handle the case when the size doesn't + include the size of the header block + + + + + + + + Sometimes the element size is stored as a negative number. We + negate it and shift it to Get the real value. + + The size of elements. + + + + + @author Glen Stampoultzis + @version $Id: EscherBitmapBlip.java 569827 2007-08-26 15:26:29Z yegor $ + + + + + @author Glen Stampoultzis + @version $Id: EscherBlipRecord.java 569827 2007-08-26 15:26:29Z yegor $ + + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into + May be null since this is not a container record. + The number of bytes Read from the byte array. + + + + Serializes the record to an existing byte array. + + the offset within the byte array + the data array to Serialize to + a listener for begin and end serialization events. + the number of bytes written. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + The short name for this record + + + + + + Gets or sets the picture data. + + The picture data. + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into + May be null since this is not a container record. + The number of bytes Read from the byte array. + + + + Serializes the record to an existing byte array. + + the offset within the byte array + the data array to Serialize to + a listener for begin and end serialization events. + the number of bytes written. + + + + Toes the string. + + + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + Gets or sets the UID. + + The UID. + + + + Gets or sets the marker. + + The marker. + + + + Represents a bool property. The actual utility of this property is in doubt because many + of the properties marked as bool seem to actually contain special values. In other words + they're not true bools. + @author Glen Stampoultzis + + + + + A simple property is of fixed Length and as a property number in Addition + to a 32-bit value. Properties that can't be stored in only 32-bits are + stored as EscherComplexProperty objects. + @author Glen Stampoultzis (glens at apache.org) + + + + + The id is distinct from the actual property number. The id includes the property number the blip id + flag and an indicator whether the property is complex or not. + + The id. + The property value. + + + + Constructs a new escher property. The three parameters are combined to form a property + id. + + The property number. + if set to true [is complex]. + if set to true [is blip id]. + The property value. + + + + Serialize the simple part of the escher record. + + The data. + The off set. + the number of bytes Serialized. + + + + Escher properties consist of a simple fixed Length part and a complex variable Length part. + The fixed Length part is Serialized first. + + + + + + + + Returns true if one escher property is equal to another. + + The o. + + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Return the 32 bit value of this property. + + The property value. + + + + Create an instance of an escher bool property. + + The property number (or id) + The 32 bit value of this bool property + + + + Whether this bool property is true + + true if this instance is true; otherwise, false. + + + + Whether this bool property is false + + true if this instance is false; otherwise, false. + + + + The BSE record is related closely to the EscherBlipRecord and stores + extra information about the blip. A blip record is actually stored inside + the BSE record even though the BSE record isn't actually a container record. + @author Glen Stampoultzis + @see EscherBlipRecord + + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into data + May be null since this is not a container record. + The number of bytes Read from the byte array. + + + + This method Serializes this escher record into a byte array. + + The offset into + data to start writing the record data to + The byte array to Serialize to. + a listener for begin and end serialization events. + The number of bytes written. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Retrieve the string representation given a blip id. + + The b. + + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + The short name for this record + + + + + + Gets or sets the expected blip type under windows (failure to match this blip type will result in + Excel converting to this format). + + The blip type win32. + + + + Gets or sets the expected blip type under MacOS (failure to match this blip type will result in + Excel converting to this format). + + The blip type mac OS. + + + + Gets or sets 16 byte MD4 checksum. + + The UID. + + + + Gets or sets the tag. (Unused) + + The tag. + + + + Gets or sets Blip size in stream.. + + The size. + + + + Gets or sets the reference count of this blip. + + The ref. + + + + Gets or sets the offset in the delay stream.. + + The offset. + + + + Defines the way this blip is used. + + The usage. + + + + Gets or sets the blip name. + + The name. + + + + Gets or sets the unused2. + + The unused2. + + + + Gets or sets the unused3. + + The unused3. + + + + Gets or sets the blip record. + + The blip record. + + + + Gets or sets any remaining data in this record. + + The remaining data. + + + + The escher child achor record is used to specify the position of a shape under an + existing group. The first level of shape records use a EscherClientAnchor record instead. + @author Glen Stampoultzis + + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into data + May be null since this is not a container record. + The number of bytes Read from the byte array. + + + + This method Serializes this escher record into a byte array. + + The offset into data to start writing the record data to. + The byte array to Serialize to. + a listener for begin and end serialization events. + The number of bytes written. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + The record id for the EscherChildAnchorRecord. + + + + + + The short name for this record + + + + + + Gets or sets offset within the parent coordinate space for the top left point. + + The DX1. + + + + Gets or sets the offset within the parent coordinate space for the top left point. + + The dy1. + + + + Gets or sets the offset within the parent coordinate space for the bottom right point. + + The DX2. + + + + Gets or sets the offset within the parent coordinate space for the bottom right point. + + The dy2. + + + + The escher client anchor specifies which rows and cells the shape is bound to as well as + the offsets within those cells. Each cell is 1024 units wide by 256 units long regardless + of the actual size of the cell. The EscherClientAnchorRecord only applies to the top-most + shapes. Shapes contained in groups are bound using the EscherChildAnchorRecords. + @author Glen Stampoultzis + + + + bit[0] - fMove (1 bit): A bit that specifies whether the shape will be kept intact when the cells are moved. + bit[1] - fSize (1 bit): A bit that specifies whether the shape will be kept intact when the cells are resized. If fMove is 1, the value MUST be 1. + bit[2-4] - reserved, MUST be 0 and MUST be ignored + bit[5-15]- Undefined and MUST be ignored. + + it can take values: 0, 2, 3 + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into data + May be null since this is not a container record. + The number of bytes Read from the byte array. + + + + This method Serializes this escher record into a byte array. + + The offset into data to start writing the record data to. + The byte array to Serialize to. + a listener for begin and end serialization events. + The number of bytes written. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + The record id for this record. + + + + + + The short name for this record + + + + + + Gets or sets the flag. + + 0 = Move and size with Cells, 2 = Move but don't size with cells, 3 = Don't move or size with cells. + + + + Gets or sets The column number for the top-left position. 0 based. + + The col1. + + + + Gets or sets The x offset within the top-left cell. Range is from 0 to 1023. + + The DX1. + + + + Gets or sets The row number for the top-left corner of the shape. + + The row1. + + + + Gets or sets The y offset within the top-left corner of the current shape. + + The dy1. + + + + Gets or sets The column of the bottom right corner of this shape. + + The col2. + + + + Gets or sets The x offset withing the cell for the bottom-right corner of this shape. + + The DX2. + + + + Gets or sets The row number for the bottom-right corner of the current shape. + + The row2. + + + + Gets or sets The y offset withing the cell for the bottom-right corner of this shape. + + The dy2. + + + + Gets or sets the remaining data. + + The remaining data. + + + + The EscherClientDataRecord is used to store client specific data about the position of a + shape within a container. + @author Glen Stampoultzis + + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into data + May be null since this is not a container record. + The number of bytes Read from the byte array. + + + This method Serializes this escher record into a byte array. + + @param offset The offset into data to start writing the record data to. + @param data The byte array to Serialize to. + @param listener A listener to retrieve start and end callbacks. Use a NullEscherSerailizationListener to ignore these events. + @return The number of bytes written. + @see NullEscherSerializationListener + + + Returns the string representation of this record. + + + Returns the number of bytes that are required to Serialize this record. + + @return Number of bytes + + + Returns the identifier of this record. + + + The short name for this record + + + Any data recording this record. + + + + Escher container records store other escher records as children. + The container records themselves never store any information beyond + the standard header used by all escher records. This one record is + used to represent many different types of records. + @author Glen Stampoultzis + + + + in case if document contains any charts we have such document structure: + BOF + ... + DrawingRecord + ... + ObjRecord|TxtObjRecord + ... + EOF + ... + BOF(Chart begin) + ... + DrawingRecord + ... + ObjRecord|TxtObjRecord + ... + EOF + So, when we call EscherAggregate.createAggregate() we have not all needed data. + When we got warning "WARNING: " + bytesRemaining + " bytes remaining but no space left" + we should save value of bytesRemaining + and add it to container size when we serialize it + + + + The contract of this method is to deSerialize an escher record including + it's children. + + The byte array containing the Serialized escher + records. + The offset into the byte array. + A factory for creating new escher records + The number of bytes written. + + + + Serializes to an existing byte array without serialization listener. + This is done by delegating to Serialize(int, byte[], EscherSerializationListener). + + the offset within the data byte array. + the data array to Serialize to. + a listener for begin and end serialization events. + The number of bytes written. + + + + Do any of our (top level) children have the + given recordId? + + The record id. + + true if [has child of type] [the specified record id]; otherwise, false. + + + + + The display methods allows escher variables to print the record names + according to their hierarchy. + + The current indent level. + + + + Adds the child record. + + The record. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets the child by id. + + The record id. + + + + + Recursively find records with the specified record ID + + + list to store found records + + + + Subclasses should effeciently return the number of bytes required to + Serialize the record. + + number of bytes + + + + Returns a list of all the child (escher) records + of the container. + + + + + + Returns all of our children which are also + EscherContainers (may be 0, 1, or vary rarely + 2 or 3) + + The child containers. + + + + Subclasses should return the short name for this escher record. + + + + + + This record defines the drawing groups used for a particular sheet. + + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into data + May be null since this is not a container record. + The number of bytes Read from the byte array. + + + + This method Serializes this escher record into a byte array. + + The offset into data to start writing the record data to. + The byte array to Serialize to. + a listener for begin and end serialization events. + The number of bytes written. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Adds the cluster. + + The dg id. + The num shaped used. + + + + Adds the cluster. + + id of the drawing group (stored in the record options) + initial value of the numShapedUsed field + if set to true if true then sort clusters by drawing group id.( + In Excel the clusters are sorted but in PPT they are not). + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + Return the current record id. + + The 16 bit record id. + + + + The short name for this record + + + + + + Gets or sets the shape id max. + + The shape id max. + + + + Gets the Number of id clusters + 1 + + The num id clusters. + + + + Gets or sets the num shapes saved. + + The num shapes saved. + + + + Gets or sets the drawings saved. + + The drawings saved. + + + + Gets or sets the max drawing group id. + + The max drawing group id. + + + + Gets or sets the file id clusters. + + The file id clusters. + + + + This record simply holds the number of shapes in the drawing group and the + last shape id used for this drawing group. + @author Glen Stampoultzis + + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into data + May be null since this is not a container record. + The number of bytes Read from the byte array. + + + + This method Serializes this escher record into a byte array. + + The offset into data to start writing the record data to. + The byte array to Serialize to. + The number of bytes written. + a listener for begin and end serialization events. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Increments the shape count. + + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + Return the current record id. + + The 16 bit record id. + + + + The short name for this record + + + + + + Gets or sets The number of shapes in this drawing group. + + The num shapes. + + + + Gets or sets The last shape id used in this drawing group. + + The last MSOSPID. + + + + Gets the drawing group id for this record. This is encoded in the + instance part of the option record. + + The drawing group id. + + + + Used to dump the contents of escher records to a PrintStream. + @author Glen Stampoultzis (glens at apache.org) + + + + + Decodes the escher stream from a byte array and dumps the results to + a print stream. + + The data array containing the escher records. + The starting offset within the data array. + The number of bytes to Read. + + + + This version of dump is a translation from the open office escher dump routine. + + The number of bytes to Read + An input stream to Read from. + + + + Returns a property name given a property id. This is used only by the + old escher dump routine. + + The property number for the name + A descriptive name. + + + + Returns the blip description given a blip id. + + blip id + A description. + + + + Straight conversion from OO. Converts a type of float. + + The N32. + + + + + Dumps out a hex value by Reading from a input stream. + + How many bytes this hex value consists of. + The stream to Read the hex value from. + + + + Dumps the specified record size. + + Size of the record. + The data. + + + + @author Daniel Noll + + + + BLIP signatures as defined in the escher spec + + + The primary UID is only saved to disk if (blip_instance ^ blip_signature == 1) + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into + May be null since this is not a container record. + + The number of bytes Read from the byte array. + + + + + Serializes the record to an existing byte array. + + the offset within the byte array + the data array to Serialize to + a listener for begin and end serialization events. + the number of bytes written. + + + + Decompresses the provided data, returning the inflated result. + + the deflated picture data. + the inflated picture data. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + Gets or sets the UID. + + The UID. + + + + Gets or sets the primary UID. + + The primary UID. + + + + Gets or sets the size of the uncompressed. + + The size of the uncompressed. + + + + Gets or sets the bounds. + + The bounds. + + + + Gets or sets the size EMU. + + The size EMU. + + + + Gets or sets the size of the compressed. + + The size of the compressed. + + + + Gets or sets a value indicating whether this instance is compressed. + + + true if this instance is compressed; otherwise, false. + + + + + Return the blip signature + + the blip signature + + + + The opt record is used to store property values for a shape. It is the key to determining + the attributes of a shape. Properties can be of two types: simple or complex. Simple types + are fixed Length. Complex properties are variable Length. + @author Glen Stampoultzis + + + + + Automatically recalculate the correct option + + + + + + The short name for this record + + + + + + @author Daniel Noll + + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into + May be null since this is not a container record. + + The number of bytes Read from the byte array. + + + + + Serializes the record to an existing byte array. + + the offset within the byte array + the data array to Serialize to + a listener for begin and end serialization events. + the number of bytes written. + + + + Decompresses the provided data, returning the inflated result. + + the deflated picture data. + the inflated picture data. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + Gets or sets the UID. + + The UID. + + + + Gets or sets the size of the uncompressed. + + The size of the uncompressed. + + + + Gets or sets the bounds. + + The bounds. + + + + Gets or sets the size EMU. + + The size EMU. + + + + Gets or sets the size of the compressed. + + The size of the compressed. + + + + Gets a value indicating whether this instance is compressed. + + + true if this instance is compressed; otherwise, false. + + + + + Provides a list of all known escher properties including the description and + type. + @author Glen Stampoultzis (glens at apache.org) + + + + + Inits the props. + + + + + Adds the prop. + + The s. + The data. + + + + Gets the data. + + Name of the prop. + The type. + + + + + Gets the data. + + Name of the prop. + + + + + Gets the name of the property. + + The property id. + + + + + Gets the type of the property. + + The property id. + + + + + Generates a property given a reference into the byte array storing that property. + @author Glen Stampoultzis + + + + + Create new properties from a byte array. + + The byte array containing the property + The starting offset into the byte array + The new properties + + + + + This class stores the type and description of an escher property. + @author Glen Stampoultzis (glens at apache.org) + + + + + Initializes a new instance of the class. + + The description of the escher property. + + + + Initializes a new instance of the class. + + The description of the escher property. + The type of the property. + + + + Gets the description. + + The description. + + + + Gets the type. + + The type. + + + + A color property. + @author Glen Stampoultzis (glens at apache.org) + + + + + Initializes a new instance of the class. + + The property number. + Color of the RGB. + + + + Gets the color of the RGB. + + The color of the RGB. + + + + Gets the red. + + The red. + + + + Gets the green. + + The green. + + + + Gets the blue. + + The blue. + + + Interface for listening to escher serialization events. + + @author Glen Stampoultzis (glens at apache.org) + + + Fired before a given escher record is Serialized. + + @param offset The position in the data array at which the record will be Serialized. + @param recordId The id of the record about to be Serialized. + + + Fired after a record has been Serialized. + + @param offset The position of the end of the Serialized record + 1 + @param recordId The id of the record about to be Serialized + @param size The number of bytes written for this record. If it is a container + record then this will include the size of any included records. + + + + Defines the constants for the various possible shape paths. + @author Glen Stampoultzis (glens at apache.org) + + + + + Initializes a new instance of the class. + + The property number. + The shape path. + + + + The spgr record defines information about a shape group. Groups in escher + are simply another form of shape that you can't physically see. + @author Glen Stampoultzis (glens at apache.org) + + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into data + May be null since this is not a container record. + The number of bytes Read from the byte array. + + + + This method Serializes this escher record into a byte array + + The offset into data + to start writing the record data to. + The byte array to Serialize to. + a listener for begin and end serialization events. + The number of bytes written. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + Return the current record id. + + The 16 bit identifier of this shape group record. + + + + The short name for this record + + + + + + Gets or sets the starting top-left coordinate of child records. + + The rect x1. + + + + Gets or sets the starting bottom-right coordinate of child records. + + The rect x2. + + + + Gets or sets the starting top-left coordinate of child records. + + The rect y1. + + + + Gets or sets the starting bottom-right coordinate of child records. + + The rect y2. + + + + A list of the most recently used colours for the drawings contained in + this document. + @author Glen Stampoultzis (glens at apache.org) + + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into data + May be null since this is not a container record. + The number of bytes Read from the byte array. + + + + This method Serializes this escher record into a byte array + + The offset into data + to start writing the record data to. + The byte array to Serialize to. + a listener for begin and end serialization events. + The number of bytes written. + + + + Returns a that represents the current . + + + A that represents the current . + + @return a string representation of this record. + + + + Returns the number of bytes that are required to Serialize this record. + + number of bytes + + + + Return the current record id. + + the 16 bit identifer for this record. + + + + Gets the short name for this record + + The name of the record. + + + + Gets or sets the color1. + + The color1. + + + + Gets or sets the color2. + + The color2. + + + + Gets or sets the color3. + + The color3. + + + + Gets or sets the color4. + + The color4. + + + + ToGether the the EscherOptRecord this record defines some of the basic + properties of a shape. + @author Glen Stampoultzis (glens at apache.org) + + + + + The contract of this method is to deSerialize an escher record including + it's children. + + The byte array containing the Serialized escher + records. + The offset into the byte array. + A factory for creating new escher records + The number of bytes written. + + + + Serializes to an existing byte array without serialization listener. + This is done by delegating to Serialize(int, byte[], EscherSerializationListener). + + the offset within the data byte array. + the data array to Serialize to. + a listener for begin and end serialization events. + The number of bytes written. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Converts the shape flags into a more descriptive name. + + The flags. + + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + @return the 16 bit identifier for this record. + + + + + + The short name for this record + + + + + + Gets or sets A number that identifies this shape + + The shape id. + + + + The flags that apply to this shape. + + The flags. + + + + Get or set shape type. Must be one of MSOSPT values (see [MS-ODRAW] for details). + + + + + Holds data from the parent application. Most commonly used to store + text in the format of the parent application, rather than in + Escher format. We don't attempt to understand the contents, since + they will be in the parent's format, not Escher format. + @author Glen Stampoultzis (glens at apache.org) + @author Nick Burch (nick at torchbox dot com) + + + + The data for this record not including the the 8 byte header + + + This method deserializes the record from a byte array. + + @param data The byte array containing the escher record information + @param offset The starting offset into data. + @param recordFactory May be null since this is not a container record. + @return The number of bytes Read from the byte array. + + + + Writes this record and any contained records to the supplied byte + + + + a listener for begin and end serialization events. + the number of bytes written. + + + + Sets the extra data (in the parent application's format) to be + contained by the record. Used when the parent application changes + the contents. + + The b. + The start. + The length. + + + + Sets the data. + + The b. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Returns any extra data associated with this record. In practice excel + does not seem to put anything here, but with PowerPoint this will + contain the bytes that make up a TextHeaderAtom followed by a + TextBytesAtom/TextCharsAtom + + The data. + + + + Returns the number of bytes that are required to serialize this record. + + Number of bytes + + + + The short name for this record + + + + + + This record is used whenever a escher record is encountered that + we do not explicitly support. + @author Glen Stampoultzis (glens at apache.org) + + + + The data for this record not including the the 8 byte header + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into data + May be null since this is not a container record. + The number of bytes Read from the byte array. + + + + Writes this record and any contained records to the supplied byte + array. + + + + a listener for begin and end serialization events. + the number of bytes written. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Adds the child record. + + The child record. + + + + Gets the data. + + The data. + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + Returns the children of this record. By default this will + be an empty list. EscherCotainerRecord is the only record + that may contain children. + + + + + + The short name for this record + + + + + + Defines constants of general use. + @author Rainer Klute klute@rainer-klute.de + @since 2004-06-20 + + + + + Allow accessing the Initial value. + + + + Codepage 037, a special case + + + Codepage for SJIS + + + Codepage for GBK, aka MS936 + + + Codepage for MS949 + + + Codepage for UTF-16 + + + Codepage for UTF-16 big-endian + + + Codepage for Windows 1250 + + + Codepage for Windows 1251 + + + Codepage for Windows 1252 + + + Codepage for Windows 1253 + + + Codepage for Windows 1254 + + + Codepage for Windows 1255 + + + Codepage for Windows 1256 + + + Codepage for Windows 1257 + + + Codepage for Windows 1258 + + + Codepage for Johab + + + Codepage for Macintosh Roman (Java: MacRoman) + + + Codepage for Macintosh Japan (Java: unknown - use SJIS, cp942 or + cp943) + + + Codepage for Macintosh Chinese Traditional (Java: unknown - use Big5, + MS950, or cp937) + + + Codepage for Macintosh Korean (Java: unknown - use EUC_KR or + cp949) + + + Codepage for Macintosh Arabic (Java: MacArabic) + + + Codepage for Macintosh Hebrew (Java: MacHebrew) + + + Codepage for Macintosh Greek (Java: MacGreek) + + + Codepage for Macintosh Cyrillic (Java: MacCyrillic) + + + Codepage for Macintosh Chinese Simplified (Java: unknown - use + EUC_CN, ISO2022_CN_GB, MS936 or cp935) + + + Codepage for Macintosh Romanian (Java: MacRomania) + + + Codepage for Macintosh Ukrainian (Java: MacUkraine) + + + Codepage for Macintosh Thai (Java: MacThai) + + + Codepage for Macintosh Central Europe (Latin-2) + (Java: MacCentralEurope) + + + Codepage for Macintosh Iceland (Java: MacIceland) + + + Codepage for Macintosh Turkish (Java: MacTurkish) + + + Codepage for Macintosh Croatian (Java: MacCroatian) + + + Codepage for US-ASCII + + + Codepage for KOI8-R + + + Codepage for ISO-8859-1 + + + Codepage for ISO-8859-2 + + + Codepage for ISO-8859-3 + + + Codepage for ISO-8859-4 + + + Codepage for ISO-8859-5 + + + Codepage for ISO-8859-6 + + + Codepage for ISO-8859-7 + + + Codepage for ISO-8859-8 + + + Codepage for ISO-8859-9 + + + Codepage for ISO-2022-JP + + + Another codepage for ISO-2022-JP + + + Yet another codepage for ISO-2022-JP + + + Codepage for ISO-2022-KR + + + Codepage for EUC-JP + + + Codepage for EUC-KR + + + Codepage for GB2312 + + + Codepage for GB18030 + + + Another codepage for US-ASCII + + + Codepage for UTF-8 + + + Codepage for Unicode + + + + Maintains the instances of {@link CustomProperty} that belong To a + {@link DocumentSummaryInformation}. The class maintains the names of the + custom properties in a dictionary. It implements the {@link Map} interface + and by this provides a simplified view on custom properties: A property's + name is the key that maps To a typed value. This implementation hides + property IDs from the developer and regards the property names as keys To + typed values. + While this class provides a simple API To custom properties, it ignores + the fact that not names, but IDs are the real keys To properties. Under the + hood this class maintains a 1:1 relationship between IDs and names. Therefore + you should not use this class To process property Sets with several IDs + mapping To the same name or with properties without a name: the result will + contain only a subSet of the original properties. If you really need To deal + such property Sets, use HPSF's low-level access methods. + An application can call the {@link #isPure} method To check whether a + property Set parsed by {@link CustomProperties} is still pure (i.e. + unmodified) or whether one or more properties have been dropped. + This class is not thRead-safe; concurrent access To instances of this + class must be syncronized. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2006-02-09 + + + + Maps property IDs To property names. + + + Maps property names To property IDs. + + + Tells whether this object is pure or not. + + + + Puts a {@link CustomProperty} into this map. It is assumed that the + {@link CustomProperty} alReady has a valid ID. Otherwise use + {@link #Put(CustomProperty)}. + + The name. + The custom property. + + + + Returns a set of all the names of our + custom properties. Equivalent to + {@link #nameSet()} + + + Returns a set of all the names of our + custom properties + + + Returns a set of all the IDs of our + custom properties + + + + Puts a {@link CustomProperty} that has not yet a valid ID into this + map. The method will allocate a suitable ID for the custom property: +
    +
  • If there is alReady a property with the same name, take the ID + of that property.
  • +
  • Otherwise Find the highest ID and use its value plus one.
  • +
+
+ The custom property. + If the was alReady a property with the same name, the +
+ + + Removes a custom property. + + The name of the custom property To Remove + The Removed property or + null + if the specified property was not found. + + + + Adds a named string property. + + The property's name. + The property's value. + the property that was stored under the specified name before, or + null + if there was no such property before. + + + + Adds a named long property + + The property's name. + The property's value. + the property that was stored under the specified name before, or + null + if there was no such property before. + + + + Adds a named double property. + + The property's name. + The property's value. + the property that was stored under the specified name before, or + null + if there was no such property before. + + + + Adds a named integer property. + + The property's name. + The property's value. + the property that was stored under the specified name before, or + null + if there was no such property before. + + + + Adds a named bool property. + + The property's name. + The property's value. + the property that was stored under the specified name before, or + null + if there was no such property before. + + + + Adds a named date property. + + The property's name. + The property's value. + the property that was stored under the specified name before, or + null + if there was no such property before. + + + Checks against both String Name and Long ID + + + Checks against both the property, and its values. + + + + Gets the with the specified name. + + the value or + null + if a value with the specified + name is not found in the custom properties. + + + + Gets the dictionary which Contains IDs and names of the named custom + properties. + + The dictionary. + + + + Gets or sets the codepage. + + The codepage. + + + + Tells whether this {@link CustomProperties} instance is pure or one or + more properties of the underlying low-level property Set has been + dropped. + + true if this instance is pure; otherwise, false. + + + + This class represents custum properties in the document summary + information stream. The difference To normal properties is that custom + properties have an optional name. If the name is not null it + will be maintained in the section's dictionary. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2006-02-09 + + + + + Adds writing capability To the {@link Property} class. + Please be aware that this class' functionality will be merged into the + {@link Property} class at a later time, so the API will Change. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2003-08-03 + + + + + A property in a {@link Section} of a {@link PropertySet}. + The property's ID gives the property a meaning + in the context of its {@link Section}. Each {@link Section} spans + its own name space of property IDs. + The property's type determines how its + value is interpreted. For example, if the type Is + {@link Variant#VT_LPSTR} (byte string), the value consists of a + DWord telling how many bytes the string Contains. The bytes follow + immediately, including any null bytes that terminate the + string. The type {@link Variant#VT_I4} denotes a four-byte integer + value, {@link Variant#VT_FILETIME} some DateTime and time (of a + file). + Please note that not all {@link Variant} types yet. This might Change + over time but largely depends on your feedback so that the POI team knows + which variant types are really needed. So please feel free To submit error + reports or patches for the types you need. + Microsoft documentation: + + Property Set Display Name Dictionary + . + @author Rainer Klute + <klute@rainer-klute.de> + @author Drew Varner (Drew.Varner InAndAround sc.edu) + @see Section + @see Variant + @since 2002-02-09 + + + + The property's ID. + + + The property's type. + + + The property's value. + + + + Initializes a new instance of the class. + + the property's ID. + the property's type, see {@link Variant}. + the property's value. Only certain types are allowed, see + {@link Variant}. + + + + Initializes a new instance of the class. + + The property's ID. + The bytes the property Set stream consists of. + The property's type/value pair's offset in the + section. + The property's type/value pair's Length in bytes. + The section's and thus the property's + codepage. It is needed only when Reading string values + + + + Initializes a new instance of the class. + + + + + Reads the dictionary. + + The byte array containing the bytes making out the dictionary. + At this offset within src the dictionary starts. + The dictionary Contains at most this many bytes. + The codepage of the string values. + The dictonary + + + + Compares two properties. + Please beware that a property with + ID == 0 is a special case: It does not have a type, and its value is the + section's dictionary. Another special case are strings: Two properties + may have the different types Variant.VT_LPSTR and Variant.VT_LPWSTR; + + The o. + + + + + Typeses the are equal. + + The t1. + The t2. + + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a that represents the current . + + + A that represents the current . + + + + Returns the property's ID. + + @return The ID value + + + Returns the property's type. + + @return The type value + + + + Gets the property's value. + + The property's value + + + + Gets the property's size in bytes. This is always a multiple of + 4. + + the property's size in bytes + + + + Creates an empty property. It must be Filled using the Set method To + be usable. + + + + + Initializes a new instance of the class. + + The property To copy. + + + + Writes the property To an output stream. + + The output stream To Write To. + The codepage To use for writing non-wide strings + the number of bytes written To the stream + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + the property To copy + + + + Initializes a new instance of the class. + + This property's attributes are copied To the new custom + property. + The new custom property's name. + + + + Compares two custom properties for equality. The method returns + true if all attributes of the two custom properties are + equal. + + The custom property To Compare with. + true + if both custom properties are equal, else + false + + + + + + @see Object#GetHashCode() + + + + Gets or sets the property's name. + + the property's name. + + + + Convenience class representing a DocumentSummary Information stream in a + Microsoft Office document. + @author Rainer Klute + klute@rainer-klute.de + @author Drew Varner (Drew.Varner cloSeto sc.edu) + @author robert_flaherty@hyperion.com + @since 2002-02-09 + + + + + Abstract superclass for the convenience classes {@link + SummaryInformation} and {@link DocumentSummaryInformation}. + The motivation behind this class is quite nasty if you look + behind the scenes, but it serves the application programmer well by + providing him with the easy-to-use {@link SummaryInformation} and + {@link DocumentSummaryInformation} classes. When parsing the data a + property Set stream consists of (possibly coming from an {@link + java.io.Stream}) we want To Read and process each byte only + once. Since we don't know in advance which kind of property Set we + have, we can expect only the most general {@link + PropertySet}. Creating a special subclass should be as easy as + calling the special subclass' constructor and pass the general + {@link PropertySet} in. To make things easy internally, the special + class just holds a reference To the general {@link PropertySet} and + delegates all method calls To it. + A cleaner implementation would have been like this: The {@link + PropertySetFactory} parses the stream data into some internal + object first. Then it Finds out whether the stream is a {@link + SummaryInformation}, a {@link DocumentSummaryInformation} or a + general {@link PropertySet}. However, the current implementation + went the other way round historically: the convenience classes came + only late To my mind. + @author Rainer Klute + klute@rainer-klute.de + @since 2002-02-09 + + + + + Adds writing support To the {@link PropertySet} class. + Please be aware that this class' functionality will be merged into the + {@link PropertySet} class at a later time, so the API will Change. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2003-02-19 + + + + + Represents a property Set in the Horrible Property Set Format + (HPSF). These are usually metadata of a Microsoft Office + document. + An application that wants To access these metadata should Create + an instance of this class or one of its subclasses by calling the + factory method {@link PropertySetFactory#Create} and then retrieve + the information its needs by calling appropriate methods. + {@link PropertySetFactory#Create} does its work by calling one + of the constructors {@link PropertySet#PropertySet(InputStream)} or + {@link PropertySet#PropertySet(byte[])}. If the constructor's + argument is not in the Horrible Property Set Format, i.e. not a + property Set stream, or if any other error occurs, an appropriate + exception is thrown. + A {@link PropertySet} has a list of {@link Section}s, and each + {@link Section} has a {@link Property} array. Use {@link + #GetSections} To retrieve the {@link Section}s, then call {@link + Section#GetProperties} for each {@link Section} To Get hold of the + {@link Property} arrays. Since the vast majority of {@link + PropertySet}s Contains only a single {@link Section}, the + convenience method {@link #GetProperties} returns the properties of + a {@link PropertySet}'s {@link Section} (throwing a {@link + NoSingleSectionException} if the {@link PropertySet} Contains more + (or less) than exactly one {@link Section}). + @author Rainer Klute + <klute@rainer-klute.de> + @author Drew Varner (Drew.Varner hanginIn sc.edu) + @since 2002-02-09 + + + + If the OS version field holds this value the property Set stream Was + Created on a 16-bit Windows system. + + + If the OS version field holds this value the property Set stream Was + Created on a Macintosh system. + + + If the OS version field holds this value the property Set stream Was + Created on a 32-bit Windows system. + + + The "byteOrder" field must equal this value. + + + Specifies this {@link PropertySet}'s byte order. See the + HPFS documentation for details! + + + The "format" field must equal this value. + + + Specifies this {@link PropertySet}'s format. See the HPFS + documentation for details! + + + Specifies the version of the operating system that Created + this {@link PropertySet}. See the HPFS documentation for + details! + + + Specifies this {@link PropertySet}'s "classID" field. See + the HPFS documentation for details! + + + The sections in this {@link PropertySet}. + + + + Creates an empty (uninitialized) {@link PropertySet} + Please note: For the time being this + constructor is protected since it is used for internal purposes + only, but expect it To become public once the property Set's + writing functionality is implemented. + + + + + Creates a {@link PropertySet} instance from an {@link + InputStream} in the Horrible Property Set Format. + The constructor Reads the first few bytes from the stream + and determines whether it is really a property Set stream. If + it Is, it parses the rest of the stream. If it is not, it + Resets the stream To its beginning in order To let other + components mess around with the data and throws an + exception. + + Holds the data making out the property Set + stream. + + + + Creates a {@link PropertySet} instance from a byte array + that represents a stream in the Horrible Property Set + Format. + + The byte array holding the stream data. + The offset in stream where the stream data begin. + If the stream data begin with the first byte in the + array, the offset is 0. + The Length of the stream data. + + + + Creates a {@link PropertySet} instance from a byte array + that represents a stream in the Horrible Property Set + Format. + + The byte array holding the stream data. The + complete byte array contents is the stream data. + + + + Checks whether an {@link InputStream} is in the Horrible + Property Set Format. + + The {@link InputStream} To check. In order To + perform the check, the method Reads the first bytes from the + stream. After Reading, the stream is Reset To the position it + had before Reading. The {@link InputStream} must support the + {@link InputStream#mark} method. + + true if the stream is a property Set + stream; otherwise, false. + + + + + Checks whether a byte array is in the Horrible Property Set + Format. + + The byte array To check. + The offset in the byte array. + The significant number of bytes in the byte + array. Only this number of bytes will be checked. + + true if the byte array is a property Set + stream; otherwise, false. + + + + + Initializes this {@link PropertySet} instance from a byte + array. The method assumes that it has been checked alReady that + the byte array indeed represents a property Set stream. It does + no more checks on its own. + + Byte array containing the property Set stream + The property Set stream starts at this offset + Length of the property Set stream. + + + + Convenience method returning the value of the property with + the specified ID. If the property is not available, + null is returned and a subsequent call To {@link + #WasNull} will return true . + + The property ID + The property value + + + + Convenience method returning the value of a bool property + with the specified ID. If the property is not available, + false is returned. A subsequent call To {@link + #WasNull} will return true To let the caller + distinguish that case from a real property value of + false. + + The property ID + The property value + + + + Convenience method returning the value of the numeric + property with the specified ID. If the property is not + available, 0 is returned. A subsequent call To {@link #WasNull} + will return true To let the caller distinguish + that case from a real property value of 0. + + The property ID + The propertyIntValue value + + + + Returns true if the PropertySet is equal + To the specified parameter, else false. + + the object To Compare this + PropertySet + with + true + if the objects are equal, + false + if not + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets or sets the property Set stream's low-level "byte order" + field. It is always 0xFFFE + + The property Set stream's low-level "byte order" field.. + + + + Gets or sets the property Set stream's low-level "format" + field. It is always 0x0000 + + The property Set stream's low-level "format" field. + + + + Returns the property Set stream's low-level "OS version" + field. + + The property Set stream's low-level "OS version" field. + + + + Gets or sets the property Set stream's low-level "class ID" + + The property Set stream's low-level "class ID" field. + + + + Returns the number of {@link Section}s in the property + Set. + + The number of {@link Section}s in the property Set. + + + + Returns the {@link Section}s in the property Set. + + {@link Section}s in the property Set. + + + + Checks whether this {@link PropertySet} represents a Summary + Information. + + + true Checks whether this {@link PropertySet} represents a Summary + Information; otherwise, false. + + + + + Gets a value indicating whether this instance is document summary information. + + + true if this instance is document summary information; otherwise, false. + + Checks whether this {@link PropertySet} is a Document + Summary Information. + @return + true + if this {@link PropertySet} + represents a Document Summary Information, else + false + + + + Convenience method returning the {@link Property} array + contained in this property Set. It is a shortcut for Getting + the {@link PropertySet}'s {@link Section}s list and then + Getting the {@link Property} array from the first {@link + Section}. + + The properties of the only {@link Section} of this + {@link PropertySet}. + + + + Checks whether the property which the last call To {@link + #GetPropertyIntValue} or {@link #GetProperty} tried To access + Was available or not. This information might be important for + callers of {@link #GetPropertyIntValue} since the latter + returns 0 if the property does not exist. Using {@link + #WasNull}, the caller can distiguish this case from a + property's real value of 0. + + true if the last call To {@link + #GetPropertyIntValue} or {@link #GetProperty} tried To access a + property that Was not available; otherwise, false. + + + + Gets the first section. + + The first section. + + + + If the {@link PropertySet} has only a single section this + method returns it. + + The singleSection value + + + + Initializes a new instance of the class. + Its primary task is To initialize the immutable field with their proper + values. It also Sets fields that might Change To reasonable defaults. + + + + + Initializes a new instance of the class. + All nested elements, i.e.Sections and Property instances, will be their + mutable counterparts in the new MutablePropertySet. + + The property Set To copy + + + The Length of the property Set stream header. + + + + Removes all sections from this property Set. + + + + + Adds a section To this property Set. + + section The {@link Section} To Add. It will be Appended + after any sections that are alReady present in the property Set + and thus become the last section. + + + + Writes the property Set To an output stream. + + the output stream To Write the section To + + + + Returns the contents of this property set stream as an input stream. + The latter can be used for example to write the property set into a POIFS + document. The input stream represents a snapshot of the property set. + If the latter is modified while the input stream is still being + read, the modifications will not be reflected in the input stream but in + the {@link MutablePropertySet} only. + + the contents of this property set stream + + + + Writes a property Set To a document in a POI filesystem directory + + The directory in the POI filesystem To Write the document To. + The document's name. If there is alReady a document with the + same name in the directory the latter will be overwritten. + + + + Gets or sets the "byteOrder" property. + + the byteOrder value To Set + + + + Gets or sets the "format" property. + + the format value To Set + + + + Gets or sets the "osVersion" property + + the osVersion value To Set. + + + + Gets or sets the property Set stream's low-level "class ID" + + The property Set stream's low-level "class ID" field. + + + The "real" property Set SpecialPropertySet + delegates To. + + + + Initializes a new instance of the class. + + The property Set To be encapsulated by the SpecialPropertySet + + + + Initializes a new instance of the class. + + The mutable property Set To be encapsulated by the SpecialPropertySet + + + + Adds a section To this property set. + + The {@link Section} To Add. It will be Appended + after any sections that are alReady present in the property Set + and thus become the last section. + + + + Removes all sections from this property Set. + + + + + Writes a property Set To a document in a POI filesystem directory. + + The directory in the POI filesystem To Write the document To + The document's name. If there is alReady a document with the + same name in the directory the latter will be overwritten. + + + + Writes the property Set To an output stream. + + the output stream To Write the section To + + + + Returns true if the PropertySet is equal + To the specified parameter, else false. + + the object To Compare this + PropertySet + with + + true + if the objects are equal, + false + if not + + + + + Convenience method returning the value of the property with + the specified ID. If the property is not available, + null is returned and a subsequent call To {@link + #WasNull} will return true . + + The property ID + The property value + + + + Convenience method returning the value of a bool property + with the specified ID. If the property is not available, + false is returned. A subsequent call To {@link + #WasNull} will return true To let the caller + distinguish that case from a real property value of + false. + + The property ID + The property value + + + + Convenience method returning the value of the numeric + property with the specified ID. If the property is not + available, 0 is returned. A subsequent call To {@link #WasNull} + will return true To let the caller distinguish + that case from a real property value of 0. + + The property ID + The propertyIntValue value + + + Fetches the property with the given ID, then does its + best to return it as a String + @return The property as a String, or null if unavailable + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a that represents the current . + + + A that represents the current . + + + + The id to name mapping of the properties + in this set. + + + + gets or sets the "byteOrder" property. + + the byteOrder value To Set + + + + gets or sets the "format" property + + the format value To Set + + + + gets or sets the property Set stream's low-level "class ID" + field. + + The property Set stream's low-level "class ID" field + + + + Returns the number of {@link Section}s in the property + Set. + + The number of {@link Section}s in the property Set. + + + + Checks whether this {@link PropertySet} represents a Summary + Information. + + + true Checks whether this {@link PropertySet} represents a Summary + Information; otherwise, false. + + + + + Gets a value indicating whether this instance is document summary information. + + + true if this instance is document summary information; otherwise, false. + + Checks whether this {@link PropertySet} is a Document + Summary Information. + @return + true + if this {@link PropertySet} + represents a Document Summary Information, else + false + + + + Gets the PropertySet's first section. + + The {@link PropertySet}'s first section. + + + + gets or sets the "osVersion" property + + the osVersion value To Set + + + + Convenience method returning the {@link Property} array + contained in this property Set. It is a shortcut for Getting + the {@link PropertySet}'s {@link Section}s list and then + Getting the {@link Property} array from the first {@link + Section}. + + + The properties of the only {@link Section} of this + {@link PropertySet}. + + + + + Checks whether the property which the last call To {@link + #GetPropertyIntValue} or {@link #GetProperty} tried To access + Was available or not. This information might be important for + callers of {@link #GetPropertyIntValue} since the latter + returns 0 if the property does not exist. Using {@link + #WasNull}, the caller can distiguish this case from a + property's real value of 0. + + + true if the last call To {@link + #GetPropertyIntValue} or {@link #GetProperty} tried To access a + property that Was not available; otherwise, false. + + + + The document name a document summary information stream + usually has in a POIFS filesystem. + + + + Initializes a new instance of the class. + + A property Set which should be Created from a + document summary information stream. + + + + Removes the category. + + + + + Removes the presentation format. + + + + + Removes the byte count. + + + + + Removes the line count. + + + + + Removes the par count. + + + + + Removes the slide count. + + + + + Removes the note count. + + + + + Removes the hidden count. + + + + + Removes the MMClip count. + + + + + Removes the scale. + + + + + Removes the heading pair. + + + + + Removes the doc parts. + + + + + Removes the manager. + + + + + Removes the company. + + + + + Removes the links dirty. + + + + + Creates section 2 if it is not alReady present. + + + + + Removes the custom properties. + + + + + Gets or sets the category. + + The category value + + + + Gets or sets the presentation format (or null). + + The presentation format value + + + + Gets or sets the byte count or 0 if the {@link + DocumentSummaryInformation} does not contain a byte count. + + The byteCount value + + + + Gets or sets the line count or 0 if the {@link + DocumentSummaryInformation} does not contain a line count. + + The line count value. + + + + Gets or sets the par count or 0 if the {@link + DocumentSummaryInformation} does not contain a par count. + + The par count value + + + + Gets or sets the slide count or 0 if the {@link + DocumentSummaryInformation} does not contain a slide count. + + The slide count value + + + + Gets or sets the note count or 0 if the {@link + DocumentSummaryInformation} does not contain a note count + + The note count value + + + + Gets or sets the hidden count or 0 if the {@link + DocumentSummaryInformation} does not contain a hidden + count. + + The hidden count value. + + + + Returns the mmclip count or 0 if the {@link + DocumentSummaryInformation} does not contain a mmclip + count. + + The mmclip count value. + + + + Gets or sets a value indicating whether this is scale. + + true if cropping is desired; otherwise, false. + + + + Gets or sets the heading pair (or null) + + The heading pair value. + + + + Gets or sets the doc parts. + + The doc parts value + + + + Gets or sets the manager (or null). + + The manager value + + + + Gets or sets the company (or null). + + The company value + + + + Gets or sets a value indicating whether [links dirty]. + + true if the custom links are dirty.; otherwise, false. + + + + Gets or sets the custom properties. + + The custom properties. + + + + Extracts all of the HPSF properties, both + build in and custom, returning them in + textual form. + + + + + Common Parent for Text Extractors + of POI Documents. + You will typically find the implementation of + a given format's text extractor under + org.apache.poi.[format].extractor . + + @see org.apache.poi.hssf.extractor.ExcelExtractor + @see org.apache.poi.hslf.extractor.PowerPointExtractor + @see org.apache.poi.hdgf.extractor.VisioTextExtractor + @see org.apache.poi.hwpf.extractor.WordExtractor + + + The POIDocument that's open + + + + Creates a new text extractor for the given document + + The document. + + + + Creates a new text extractor, using the same + document as another text extractor. Normally + only used by properties extractors. + + The other extractor. + + + + Retrieves all the text from the document. + How cells, paragraphs etc are separated in the text + is implementation specific - see the javadocs for + a specific project for details. + + All the text from the document. + + + + Returns another text extractor, which is able to + output the textual content of the document + metadata / properties, such as author and title. + + The metadata text extractor. + + + + Gets the properties text. + + The ps. + + + + + Gets the document summary information text. + + The document summary information text. + + + + Gets the summary information text. + + The summary information text. + + + + Return the text of all the properties defined in + the document. + + All the text from the document. + + + + Returns another text extractor, which is able to + output the textual content of the document + metadata / properties, such as author and title. + + The metadata text extractor. + + + + This exception is the superclass of all other checked exceptions thrown + in this package. It supports a nested "reason" throwable, i.e. an exception + that caused this one To be thrown. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2002-02-09 + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message string. + + + + Initializes a new instance of the class. + + The reason, i.e. a throwable that indirectly + caused this exception. + + + + Initializes a new instance of the class. + + The message string. + The reason, i.e. a throwable that indirectly + caused this exception. + + + + Returns the {@link Exception} that caused this exception To + be thrown or null if there was no such {@link + Exception}. + + The reason. + + + + This exception is the superclass of all other unchecked + exceptions thrown in this package. It supports a nested "reason" + throwable, i.e. an exception that caused this one To be thrown. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2002-02-09 + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message string. + + + + Initializes a new instance of the class. + + The reason, i.e. a throwable that indirectly + caused this exception. + + + + Initializes a new instance of the class. + + The message string. + The reason, i.e. a throwable that indirectly + caused this exception. + + + + This exception is thrown when there is an illegal value Set in a + {@link PropertySet}. For example, a {@link Variant#VT_BOOL} must + have a value of -1 (true) or 0 (false). + Any other value would trigger this exception. It supports a nested + "reason" throwable, i.e. an exception that caused this one To be + thrown. + @author Drew Varner(Drew.Varner atDomain sc.edu) + @since 2002-05-26 + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The exception's message string + + + + Initializes a new instance of the class. + + This exception's underlying reason + + + + Initializes a new instance of the class. + + The exception's message string + This exception's underlying reason + + + + This exception is thrown if HPSF encounters a variant type that is illegal + in the current context. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2004-06-21 + + + + + This exception is thrown if HPSF encounters a problem with a variant type. + Concrete subclasses specifiy the problem further. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2004-06-21 + + + + + Initializes a new instance of the class. + + The variant type causing the problem + The value who's variant type causes the problem + A message text describing the problem + + + + Gets the offending variant type + + the offending variant type. + + + + Returns the value who's variant type caused the problem. + + the value who's variant type caused the problem. + + + + Initializes a new instance of the class. + + The unsupported variant type + The value + A message string + + + + Initializes a new instance of the class. + + The unsupported variant type + The value. + + + + This exception is thrown if an {@link java.io.InputStream} does + not support the {@link java.io.InputStream#mark} operation. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2002-02-09 + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The exception's message string. + + + + Initializes a new instance of the class. + + This exception's underlying reason. + + + + Initializes a new instance of the class. + + The exception's message string + This exception's underlying reason + + + + This exception is thrown if one of the {@link PropertySet}'s + convenience methods does not Find a required {@link Section}. + The constructors of this class are analogous To those of its + superclass and documented there. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2006-02-08 + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The exception's message string + + + + Initializes a new instance of the class. + + This exception's underlying reason. + + + + Initializes a new instance of the class. + + The exception's message string + This exception's underlying reason + + + + Adds writing capability To the {@link Section} class. + Please be aware that this class' functionality will be merged into the + {@link Section} class at a later time, so the API will Change. + @since 2002-02-20 + + + + + Represents a section in a {@link PropertySet}. + @author Rainer Klute + <klute@rainer-klute.de> + @author Drew Varner (Drew.Varner allUpIn sc.edu) + @since 2002-02-09 + + + + Maps property IDs To section-private PID strings. These + strings can be found in the property with ID 0. + + + The section's format ID, {@link #GetFormatID}. + + + + Creates an empty and uninitialized {@link Section}. + + + + + Creates a {@link Section} instance from a byte array. + + Contains the complete property Set stream. + The position in the stream that points To the + section's format ID. + + + Returns the value of the property with the specified ID. If + the property is not available, null is returned + and a subsequent call To {@link #wasNull} will return + true. + + @param id The property's ID + + @return The property's value + + + Returns the value of the numeric property with the specified + ID. If the property is not available, 0 is returned. A + subsequent call To {@link #wasNull} will return + true To let the caller distinguish that case from + a real property value of 0. + + @param id The property's ID + + @return The property's value + + + Returns the value of the bool property with the specified + ID. If the property is not available, false Is + returned. A subsequent call To {@link #wasNull} will return + true To let the caller distinguish that case from + a real property value of false. + + @param id The property's ID + + @return The property's value + + + This member is true if the last call To {@link + #GetPropertyIntValue} or {@link #GetProperty} tried To access a + property that was not available, else false. + + + + Returns the PID string associated with a property ID. The ID + is first looked up in the {@link Section}'s private + dictionary. If it is not found there, the method calls {@link + SectionIDMap#GetPIDString}. + + The property ID. + The property ID's string value + + + Checks whether this section is equal To another object. The result Is + false if one of the the following conditions holds: + +
    + +
  • The other object is not a {@link Section}.
  • + +
  • The format IDs of the two sections are not equal.
  • + +
  • The sections have a different number of properties. However, + properties with ID 1 (codepage) are not counted.
  • + +
  • The other object is not a {@link Section}.
  • + +
  • The properties have different values. The order of the properties + is irrelevant.
  • + +
+ + @param o The object To Compare this section with + @return true if the objects are equal, false if + not +
+ + + Removes a field from a property array. The resulting array Is + compactified and returned. + + The property array. + The index of the field To be Removed. + the compactified array. + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Returns the format ID. The format ID is the "type" of the + section. For example, if the format ID of the first {@link + Section} Contains the bytes specified by + org.apache.poi.hpsf.wellknown.SectionIDMap.SUMMARY_INFORMATION_ID + the section (and thus the property Set) is a SummaryInformation. + + The format ID. + + + + Gets the offset of the section in the stream. + + The offset of the section in the stream + + + + Returns the section's size in bytes. + + The section's size in bytes. + + + + Returns the number of properties in this section. + + The number of properties in this section. + + + + Returns this section's properties. + + This section's properties. + + + + Checks whether the property which the last call To {@link + #GetPropertyIntValue} or {@link #GetProperty} tried To access + was available or not. This information might be important for + callers of {@link #GetPropertyIntValue} since the latter + returns 0 if the property does not exist. Using {@link + #wasNull} the caller can distiguish this case from a property's + real value of 0. + + true if the last call To {@link + #GetPropertyIntValue} or {@link #GetProperty} tried To access a + property that was not available; otherwise, false. + + + + Gets the section's dictionary. A dictionary allows an application To + use human-Readable property names instead of numeric property IDs. It + Contains mappings from property IDs To their associated string + values. The dictionary is stored as the property with ID 0. The codepage + for the strings in the dictionary is defined by property with ID 1. + + the dictionary or null + if the section does not have + a dictionary. + + + + Gets the section's codepage, if any. + + The section's codepage if one is defined, else -1. + + + Represents an entry in the property list and holds a property's ID and + its offset from the section's beginning. + + + Compares this {@link PropertyListEntry} with another one by their + offsets. A {@link PropertyListEntry} is "smaller" than another one if + its offset from the section's begin is smaller. + + @see Comparable#CompareTo(java.lang.Object) + + + If the "dirty" flag is true, the section's size must be + (re-)calculated before the section is written. + + + List To assemble the properties. Unfortunately a wrong + decision has been taken when specifying the "properties" field + as an Property[]. It should have been a {@link java.util.List}. + + + Contains the bytes making out the section. This byte array is + established when the section's size is calculated and can be reused + later. It is valid only if the "dirty" flag is false. + + + + Initializes a new instance of the class. + + + + + Constructs a MutableSection by doing a deep copy of an + existing Section. All nested Property + instances, will be their mutable counterparts in the new + MutableSection. + + The section Set To copy + + + + Sets the section's format ID. + + The section's format ID + + + + Sets the section's format ID. + + The section's format ID as a byte array. It components + are in big-endian format. + + + + Sets this section's properties. Any former values are overwritten. + + This section's new properties. + + + + Sets the string value of the property with the specified ID. + + The property's ID + The property's value. It will be written as a Unicode + string. + + + + Sets the int value of the property with the specified ID. + + The property's ID + The property's value. + + + + Sets the long value of the property with the specified ID. + + The property's ID + The property's value. + + + + Sets the bool value of the property with the specified ID. + + The property's ID + The property's value. + + + + Sets the value and the variant type of the property with the + specified ID. If a property with this ID is not yet present in + the section, it will be Added. An alReady present property with + the specified ID will be overwritten. A default mapping will be + used To choose the property's type. + + The property's ID. + The property's variant type. + The property's value. + + + + Sets the property. + + The property To be Set. + + + + Removes the property. + + The ID of the property To be Removed + + + + Sets the value of the bool property with the specified + ID. + + The property's ID + The property's value + + + + Calculates the section's size. It is the sum of the Lengths of the + section's header (8), the properties list (16 times the number of + properties) and the properties themselves. + + the section's Length in bytes. + + + + Writes this section into an output stream. + Internally this is done by writing into three byte array output + streams: one for the properties, one for the property list and one for + the section as such. The two former are Appended To the latter when they + have received all their data. + + The stream To Write into. + The number of bytes written, i.e. the section's size. + + + + Writes the section's dictionary + + The output stream To Write To. + The dictionary. + The codepage to be used to Write the dictionary items. + The number of bytes written + + see MSDN KB: http://msdn.microsoft.com/en-us/library/aa380065(VS.85).aspx + + + + + Ensures the properties. + + + + + Gets a property. + + The ID of the property To Get + The property or null if there is no such property + + + + Sets the property. + + The property ID. + The property's value. The value's class must be one of those + supported by HPSF. + + + + Removes all properties from the section including 0 (dictionary) and + 1 (codepage). + + + + + Returns the section's size in bytes. + + The section's size in bytes. + + + + OverWrites the base class' method To cope with a redundancy: + the property count is maintained in a separate member variable, but + shouldn't. + + The number of properties in this section. + + + + Returns this section's properties. + + This section's properties. + + + + Sets the section's dictionary. All keys in the dictionary must be + {@link java.lang.long} instances, all values must be + {@link java.lang.String}s. This method overWrites the properties with IDs + 0 and 1 since they are reserved for the dictionary and the dictionary's + codepage. Setting these properties explicitly might have surprising + effects. An application should never do this but always use this + method. + + + the dictionary + + + + + Gets the section's codepage, if any. + + The section's codepage if one is defined, else -1. + + + + This exception is thrown if a {@link MutablePropertySet} is To be written + but does not have a formatID Set (see {@link + MutableSection#SetFormatID(ClassID)} or + {@link org.apache.poi.hpsf.MutableSection#SetFormatID(byte[])}. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2002-09-03 + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The exception's message string + + + + Initializes a new instance of the class. + + This exception's underlying reason + + + + Initializes a new instance of the class. + + The exception's message string + This exception's underlying reason + + + + This exception is thrown if a format error in a property Set stream Is + detected or when the input data do not constitute a property Set stream. + The constructors of this class are analogous To those of its superclass + and are documented there. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2002-02-09 + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The exception's message string + + + + Initializes a new instance of the class. + + This exception's underlying reason + + + + Initializes a new instance of the class. + + The exception's message string + This exception's underlying reason + + + + This exception is thrown if one of the {@link PropertySet}'s + convenience methods that require a single {@link Section} is called + and the {@link PropertySet} does not contain exactly one {@link + Section}. + The constructors of this class are analogous To those of its + superclass and documented there. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2002-02-09 + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The exception's message string + + + + Initializes a new instance of the class. + + This exception's underlying reason + + + + Initializes a new instance of the class. + + The exception's message string + This exception's underlying reason + + + + Factory class To Create instances of {@link SummaryInformation}, + {@link DocumentSummaryInformation} and {@link PropertySet}. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2002-02-09 + + + +

Creates the most specific {@link PropertySet} from an entry + in the specified POIFS Directory. This is preferrably a {@link + DocumentSummaryInformation} or a {@link SummaryInformation}. If + the specified entry does not contain a property Set stream, an + exception is thrown. If no entry is found with the given name, + an exception is thrown.

+ + @param dir The directory to find the PropertySet in + @param name The name of the entry Containing the PropertySet + @return The Created {@link PropertySet}. + @if there is no entry with that name + @if the stream does not + contain a property Set. + @if some I/O problem occurs. + @exception EncoderFallbackException if the specified codepage is not + supported. +
+ + + Creates the most specific {@link PropertySet} from an {@link + InputStream}. This is preferrably a {@link + DocumentSummaryInformation} or a {@link SummaryInformation}. If + the specified {@link InputStream} does not contain a property + Set stream, an exception is thrown and the {@link InputStream} + is repositioned at its beginning. + + Contains the property set stream's data. + The Created {@link PropertySet}. + + + + Creates a new summary information + + the new summary information. + + + + Creates a new document summary information. + + the new document summary information. + + + + This exception is thrown when HPSF tries To Read a (yet) unsupported + variant type. + @see WritingNotSupportedException + @see UnsupportedVariantTypeException + @author Rainer Klute + <klute@rainer-klute.de> + @since 2003-08-08 + + + + + This exception is thrown if HPSF encounters a variant type that isn't + supported yet. Although a variant type is unsupported the value can still be + retrieved using the {@link VariantTypeException#GetValue} method. + Obviously this class should disappear some day. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2003-08-05 + + + + + Initializes a new instance of the class. + + The unsupported variant type + The value who's variant type is not yet supported + + + + Initializes a new instance of the class. + + The unsupported variant type + The value who's variant type is not yet supported + + + + Convenience class representing a Summary Information stream in a + Microsoft Office document. + @author Rainer Klute + <klute@rainer-klute.de> + @see DocumentSummaryInformation + @since 2002-02-09 + + + + The document name a summary information stream usually has in a POIFS + filesystem. + + + + Initializes a new instance of the class. + + A property Set which should be Created from a summary + information stream. + + + + Removes the title. + + + + + Removes the subject. + + + + + Removes the author. + + + + + Removes the keywords. + + + + + Removes the comments. + + + + + Removes the template. + + + + + Removes the last author. + + + + + Removes the rev number. + + + + + Removes the edit time. + + + + + Removes the last printed. + + + + + Removes the create date time. + + + + + Removes the last save date time. + + + + + Removes the page count. + + + + + Removes the word count. + + + + + Removes the char count. + + + + + Removes the thumbnail. + + + + + Removes the name of the application. + + + + + Removes the security code. + + + + + Gets or sets the title. + + The title. + + + + Gets or sets the subject. + + The subject. + + + + Gets or sets the author. + + The author. + + + + Gets or sets the keywords. + + The keywords. + + + + Gets or sets the comments. + + The comments. + + + + Gets or sets the template. + + The template. + + + + Gets or sets the last author. + + The last author. + + + + Gets or sets the rev number. + + The rev number. + + + + Returns the Total time spent in editing the document (or 0). + + The Total time spent in editing the document or 0 if the {@link + SummaryInformation} does not contain this information. + + + + Gets or sets the last printed time + + The last printed time + Returns the last printed time (or null). + + + + Gets or sets the create date time. + + The create date time. + + + + Gets or sets the last save date time. + + The last save date time. + + + + Gets or sets the page count or 0 if the {@link SummaryInformation} does + not contain a page count. + + The page count or 0 if the {@link SummaryInformation} does not + contain a page count. + + + + Gets or sets the word count or 0 if the {@link SummaryInformation} does + not contain a word count. + + The word count. + + + + Gets or sets the character count or 0 if the {@link SummaryInformation} + does not contain a char count. + + The character count. + + + + Gets or sets the thumbnail (or null) when this + method is implemented. Please note that the return type is likely To + Change! + Hint To developers: Drew Varner <Drew.Varner + -at- sc.edu> said that this is an image in WMF or Clipboard (BMP?) + format. However, we won't do any conversion into any image type but + instead just return a byte array. + + The thumbnail. + + + + Gets or sets the name of the application. + + The name of the application. + + + + Gets or sets a security code which is one of the following values: +
    +
  • 0 if the {@link SummaryInformation} does not contain a + security field or if there is no security on the document. Use + {@link PropertySet#wasNull()} To distinguish between the two + cases!
  • +
  • 1 if the document is password protected
  • +
  • 2 if the document is Read-only recommended
  • +
  • 4 if the document is Read-only enforced
  • +
  • 8 if the document is locked for annotations
  • +
+
+ The security code +
+ + + Class To manipulate data in the Clipboard Variant (Variant#VT_CF VT_CF) format. + @author Drew Varner (Drew.Varner inOrAround sc.edu) + @since 2002-04-29 + + + + + OffSet in bytes where the Clipboard Format Tag starts in the byte[] returned by SummaryInformation#GetThumbnail() + + + + + OffSet in bytes where the Clipboard Format starts in the byte[] returned by SummaryInformation#GetThumbnail() + + This is only valid if the Clipboard Format Tag is CFTAG_WINDOWS + + + + OffSet in bytes where the Windows Metafile (WMF) image data starts in the byte[] returned by SummaryInformation#GetThumbnail() + There is only WMF data at this point in the + byte[] if the Clipboard Format Tag is + CFTAG_WINDOWS and the Clipboard Format is + CF_METAFILEPICT. + + Note: The byte[] that starts at + OFFSet_WMFDATA and ends at + GetThumbnail().Length - 1 forms a complete WMF + image. It can be saved To disk with a .wmf file + type and Read using a WMF-capable image viewer. + + + + Clipboard Format Tag - Windows clipboard format + + A DWORD indicating a built-in Windows clipboard format value + + + + Clipboard Format Tag - Macintosh clipboard format + + A DWORD indicating a Macintosh clipboard format value + + + + Clipboard Format Tag - Format ID + + A GUID containing a format identifier (FMTID). This is rarely used. + + + + Clipboard Format Tag - No Data + + A DWORD indicating No data. This is rarely used. + + + + Clipboard Format - Windows metafile format. This is the recommended way To store thumbnails in Property Streams. + + Note:This is not the same format used in + regular WMF images. The clipboard version of this format has an + extra clipboard-specific header. + + + + Clipboard Format - Device Independent Bitmap + + + + + Clipboard Format - Enhanced Windows metafile format + + + + + Clipboard Format - Bitmap + + see msdn.microsoft.com/library/en-us/dnw98bk/html/clipboardoperations.asp + + + A byte[] To hold a thumbnail image in ( + Variant#VT_CF VT_CF) format. + + + + Default Constructor. If you use it then one you'll have To Add + the thumbnail byte[] from {@link + SummaryInformation#GetThumbnail()} To do any useful + manipulations, otherwise you'll Get a + NullPointerException. + + + + + Initializes a new instance of the class. + + The thumbnail data. + + + + Returns an int representing the Clipboard + Format + Will throw an exception if the Thumbnail's Clipboard Format + Tag is not {@link Thumbnail#CFTAG_WINDOWS CFTAG_WINDOWS}. + Possible return values are: +
    +
  • {@link #CF_METAFILEPICT CF_METAFILEPICT}
  • +
  • {@link #CF_DIB CF_DIB}
  • +
  • {@link #CF_ENHMETAFILE CF_ENHMETAFILE}
  • +
  • {@link #CF_BITMAP CF_BITMAP}
  • +
+
+ a flag indicating the Clipboard Format +
+ + + Returns the Thumbnail as a byte[] of WMF data + if the Thumbnail's Clipboard Format Tag is {@link + #CFTAG_WINDOWS CFTAG_WINDOWS} and its Clipboard Format is + {@link #CF_METAFILEPICT CF_METAFILEPICT} + This + byte[] is in the traditional WMF file, not the + clipboard-specific version with special headers. + See http://www.wvware.com/caolan/ora-wmf.html + for more information on the WMF image format. + @return A WMF image of the Thumbnail + @throws HPSFException if the Thumbnail isn't CFTAG_WINDOWS and + CF_METAFILEPICT + + + + + + Gets or sets the thumbnail as a byte[] in {@link + Variant#VT_CF VT_CF} format. + + The thumbnail value + + + + Returns an int representing the Clipboard + Format Tag + Possible return values are: +
    +
  • {@link #CFTAG_WINDOWS CFTAG_WINDOWS}
  • +
  • {@link #CFTAG_MACINTOSH CFTAG_MACINTOSH}
  • +
  • {@link #CFTAG_FMTID CFTAG_FMTID}
  • +
  • {@link #CFTAG_NODATA CFTAG_NODATA}
  • +
+
+ A flag indicating the Clipboard Format Tag +
+ + + Class for writing little-endian data and more. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2003-02-20 + + + + + Writes a two-byte value (short) To an output stream. + + The stream To Write To.. + The number of bytes that have been written. + + + + Writes a four-byte value To an output stream. + + @param out The stream To Write To. + @param n The value To Write. + @exception IOException if an I/O error occurs + @return The number of bytes written To the output stream. + + + Writes a four-byte value To an output stream. + + @param out The stream To Write To. + @param n The value To Write. + @exception IOException if an I/O error occurs + @return The number of bytes written To the output stream. + + + Writes a eight-byte value To an output stream. + + @param out The stream To Write To. + @param n The value To Write. + @exception IOException if an I/O error occurs + @return The number of bytes written To the output stream. + + + Writes an unsigned two-byte value To an output stream. + + @param out The stream To Write To + @param n The value To Write + @exception IOException if an I/O error occurs + + + Writes an unsigned four-byte value To an output stream. + + @param out The stream To Write To. + @param n The value To Write. + @return The number of bytes that have been written To the output stream. + @exception IOException if an I/O error occurs + + + Writes a 16-byte {@link ClassID} To an output stream. + + @param out The stream To Write To + @param n The value To Write + @return The number of bytes written + @exception IOException if an I/O error occurs + + + Writes an array of {@link Property} instances To an output stream + according To the Horrible Property Format. + + @param out The stream To Write To + @param properties The array To Write To the stream + @param codepage The codepage number To use for writing strings + @exception IOException if an I/O error occurs + @throws UnsupportedVariantTypeException if HPSF does not support some + variant type. + + + Writes a double value value To an output stream. + + @param out The stream To Write To. + @param n The value To Write. + @exception IOException if an I/O error occurs + @return The number of bytes written To the output stream. + + + + This exception is thrown if a certain type of property Set Is + expected (e.g. a Document Summary Information) but the provided + property Set is not of that type. + The constructors of this class are analogous To those of its + superclass and documented there. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2002-02-09 + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message string. + + + + Initializes a new instance of the class. + + The reason, i.e. a throwable that indirectly + caused this exception. + + + + Initializes a new instance of the class. + + The message string. + The reason, i.e. a throwable that indirectly + caused this exception. + + + + Provides various static utility methods. + @author Rainer Klute (klute@rainer-klute.de) + @since 2002-02-09 + + + + + Copies a part of a byte array into another byte array. + + The source byte array. + OffSet in the source byte array. + The number of bytes To Copy. + The destination byte array. + OffSet in the destination byte array. + + + + Concatenates the contents of several byte arrays into a + single one. + + The byte arrays To be conCatened. + A new byte array containing the conCatenated byte arrays. + + + + Copies bytes from a source byte array into a new byte + array. + + Copy from this byte array. + Start Copying here. + Copy this many bytes. + The new byte array. Its Length is number of copied bytes. + + + The difference between the Windows epoch (1601-01-01 + 00:00:00) and the Unix epoch (1970-01-01 00:00:00) in + milliseconds: 11644473600000L. (Use your favorite spReadsheet + program To verify the correctness of this value. By the way, + did you notice that you can tell from the epochs which + operating system is the modern one? :-)) + + + + Converts a Windows FILETIME into a {@link DateTime}. The Windows + FILETIME structure holds a DateTime and time associated with a + file. The structure identifies a 64-bit integer specifying the + number of 100-nanosecond intervals which have passed since + January 1, 1601. This 64-bit value is split into the two double + words stored in the structure. + + The higher double word of the FILETIME structure. + The lower double word of the FILETIME structure. + The Windows FILETIME as a {@link DateTime}. + + + + Converts a Windows FILETIME into a {@link DateTime}. The Windows + FILETIME structure holds a DateTime and time associated with a + file. The structure identifies a 64-bit integer specifying the + number of 100-nanosecond intervals which have passed since + January 1, 1601. + + The filetime To Convert. + The Windows FILETIME as a {@link DateTime}. + + + + Converts a {@link DateTime} into a filetime. + + The DateTime To be Converted + The filetime + + + + Compares To object arrays with regarding the objects' order. For + example, [1, 2, 3] and [2, 1, 3] are equal. + + The first object array. + The second object array. + true + if the object arrays are equal, + false + if they are not. + + + + Internals the equals. + + The c1. + The c2. + + + + + Pads a byte array with 0x00 bytes so that its Length is a multiple of + 4. + + The byte array To pad. + The padded byte array. + + + + Pads a character array with 0x0000 characters so that its Length is a + multiple of 4. + + The character array To pad. + The padded character array. + + + + Pads a string with 0x0000 characters so that its Length is a + multiple of 4. + + The string To pad. + The padded string as a character array. + + + + The Variant types as defined by Microsoft's COM. I + found this information in + http://www.marin.clara.net/COM/variant_type_definitions.htm. + In the variant types descriptions the following shortcuts are + used: [V] - may appear in a VARIANT, + [T] - may appear in a TYPEDESC, + [P] - may appear in an OLE property Set, + [S] - may appear in a Safe Array. + @author Rainer Klute (klute@rainer-klute.de) + @since 2002-02-09 + + + + [V][P] Nothing, i.e. not a single byte of data. + + + [V][P] SQL style Null. + + + [V][T][P][S] 2 byte signed int. + + + [V][T][P][S] 4 byte signed int. + + + [V][T][P][S] 4 byte real. + + + [V][T][P][S] 8 byte real. + + + [V][T][P][S] currency. How long is this? How is it To be + interpreted? + + + [V][T][P][S] DateTime. How long is this? How is it To be + interpreted? + + + [V][T][P][S] OLE Automation string. How long is this? How is it + To be interpreted? + + + [V][T][P][S] IDispatch *. How long is this? How is it To be + interpreted? + + + [V][T][S] SCODE. How + long is this? How is it To be interpreted? + + + [V][T][P][S] True=-1, False=0. + + + [V][T][P][S] VARIANT *. How long is this? How is it To be + interpreted? + + + [V][T][S] IUnknown *. How long is this? How is it To be + interpreted? + + + [V][T][S] 16 byte fixed point. + + + [T] signed char. + + + [V][T][P][S] unsigned char. + + + [T][P] unsigned short. + + + [T][P] unsigned int. + + + [T][P] signed 64-bit int. + + + [T][P] unsigned 64-bit int. + + + [T] signed machine int. + + + [T] unsigned machine int. + + + [T] C style void. + + + [T] Standard return type. How long is this? How is it To be + interpreted? + + + [T] pointer type. How long is this? How is it To be + interpreted? + + + [T] (use VT_ARRAY in VARIANT). + + + [T] C style array. How long is this? How is it To be + interpreted? + + + [T] user defined type. How long is this? How is it To be + interpreted? + + + [T][P] null terminated string. + + + [T][P] wide (Unicode) null terminated string. + + + [P] FILETIME. The FILETIME structure holds a DateTime and time + associated with a file. The structure identifies a 64-bit + integer specifying the number of 100-nanosecond intervals which + have passed since January 1, 1601. This 64-bit value is split + into the two dwords stored in the structure. + + + [P] Length prefixed bytes. + + + [P] Name of the stream follows. + + + [P] Name of the storage follows. + + + [P] Stream Contains an object. How long is this? How is it + To be interpreted? + + + [P] Storage Contains an object. How long is this? How is it + To be interpreted? + + + [P] Blob Contains an object. How long is this? How is it To be + interpreted? + + + [P] Clipboard format. How long is this? How is it To be + interpreted? + + + [P] A Class ID. + + It consists of a 32 bit unsigned integer indicating the size + of the structure, a 32 bit signed integer indicating (Clipboard + Format Tag) indicating the type of data that it Contains, and + then a byte array containing the data. + + The valid Clipboard Format Tags are: + +
    +
  • {@link Thumbnail#CFTAG_WINDOWS}
  • +
  • {@link Thumbnail#CFTAG_MACINTOSH}
  • +
  • {@link Thumbnail#CFTAG_NODATA}
  • +
  • {@link Thumbnail#CFTAG_FMTID}
  • +
+ +
typedef struct tagCLIPDATA {
+             // cbSize is the size of the buffer pointed To
+             // by pClipData, plus sizeof(ulClipFmt)
+             ULONG              cbSize;
+             long               ulClipFmt;
+             BYTE*              pClipData;
+             } CLIPDATA;
+ + See + msdn.microsoft.com/library/en-us/com/stgrstrc_0uwk.asp. +
+ + "MUST be a VersionedStream. The storage representing the (non-simple) + property set MUST have a stream element with the name in the StreamName + field." -- [MS-OLEPS] -- v20110920; Object Linking and Embedding (OLE) + Property Set Data Structures; page 24 / 63 + + + [P] simple counted array. How long is this? How is it To be + interpreted? + + + [V] SAFEARRAY*. How + long is this? How is it To be interpreted? + + + [V] void* for local use. How long is this? How is it To be + interpreted? + + + FIXME (3): Document this! + + + FIXME (3): Document this! + + + FIXME (3): Document this! + + + FIXME (3): Document this! + + + Denotes a variant type with a Length that is unknown To HPSF yet. + + + Denotes a variant type with a variable Length. + + + Denotes a variant type with a Length of 0 bytes. + + + Denotes a variant type with a Length of 2 bytes. + + + Denotes a variant type with a Length of 4 bytes. + + + Denotes a variant type with a Length of 8 bytes. + + + Maps the numbers denoting the variant types To their corresponding + variant type names. + + + + Returns the variant type name associated with a variant type + number. + + The variant type number. + The variant type name or the string "unknown variant type" + + + + Returns a variant type's Length. + + The variant type number. + The Length of the variant type's data in bytes. If the Length Is + variable, i.e. the Length of a string, -1 is returned. If HPSF does not + know the Length, -2 is returned. The latter usually indicates an + unsupported variant type. + + + + Supports Reading and writing of variant data. + FIXME (3): + Reading and writing should be made more + uniform than it is now. The following items should be resolved: + Reading requires a Length parameter that is 4 byte greater than the + actual data, because the variant type field is included. + Reading Reads from a byte array while writing Writes To an byte array + output stream. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2003-08-08 + + + + Keeps a list of the variant types an "unsupported" message has alReady + been issued for. + + + + Writes a warning To System.err that a variant type Is + unsupported by HPSF. Such a warning is written only once for each variant + type. Log messages can be turned on or off by + + The exception To log + + + HPSF is able To Read these {@link Variant} types. + + + + Checks whether HPSF supports the specified variant type. Unsupported + types should be implemented included in the {@link #SUPPORTED_TYPES} + array. + + the variant type To check + + true if HPFS supports this type,otherwise, false. + + + + + Reads a variant type from a byte array + + The byte array + The offset in the byte array where the variant starts + The Length of the variant including the variant type field + The variant type To Read + The codepage To use for non-wide strings + A Java object that corresponds best To the variant field. For + example, a VT_I4 is returned as a {@link long}, a VT_LPSTR as a + {@link String}. + + +

Turns a codepage number into the equivalent character encoding's + name.

+ + @param codepage The codepage number + + @return The character encoding's name. If the codepage number is 65001, + the encoding name is "UTF-8". All other positive numbers are mapped to + "cp" followed by the number, e.g. if the codepage number is 1252 the + returned character encoding name will be "cp1252". + + @exception UnsupportedEncodingException if the specified codepage is + less than zero. +
+ + + Writes a variant value To an output stream. This method ensures that + always a multiple of 4 bytes is written. + If the codepage is UTF-16, which is encouraged, strings + must always be written as {@link Variant#VT_LPWSTR} + strings, not as {@link Variant#VT_LPSTR} strings. This method ensure this + by Converting strings appropriately, if needed. + + The stream To Write the value To. + The variant's type. + The variant's value. + The codepage To use To Write non-wide strings + The number of entities that have been written. In many cases an + "entity" is a byte but this is not always the case. + + + + Checks whether logging of unsupported variant types warning is turned + on or off. + + + true if logging is turned on; otherwise, false. + + + + + This is a dictionary which maps property ID values To property + ID strings. + The methods {@link #GetSummaryInformationProperties} and {@link + #GetDocumentSummaryInformationProperties} return singleton {@link + PropertyIDMap}s. An application that wants To extend these maps + should treat them as unmodifiable, copy them and modifiy the + copies. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2002-02-09 + + + + ID of the property that denotes the document's title + + + ID of the property that denotes the document's subject + + + ID of the property that denotes the document's author + + + ID of the property that denotes the document's keywords + + + ID of the property that denotes the document's comments + + + ID of the property that denotes the document's template + + + ID of the property that denotes the document's last author + + + ID of the property that denotes the document's revision number + + + ID of the property that denotes the document's edit time + + + ID of the property that denotes the DateTime and time the document was + last printed + + + ID of the property that denotes the DateTime and time the document was + Created. + + + ID of the property that denotes the DateTime and time the document was + saved + + + ID of the property that denotes the number of pages in the + document + + + ID of the property that denotes the number of words in the + document + + + ID of the property that denotes the number of characters in the + document + + + ID of the property that denotes the document's thumbnail + + + ID of the property that denotes the application that Created the + document + + + ID of the property that denotes whether Read/Write access To the + document is allowed or whether is should be opened as Read-only. It can + have the following values: + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0No restriction
2Read-only recommended
4Read-only enforced
+
+ + The entry is a dictionary. + + + The entry denotes a code page. + + + The entry is a string denoting the category the file belongs + To, e.g. review, memo, etc. This is useful To Find documents of + same type. + + + TarGet format for power point presentation, e.g. 35mm, + printer, video etc. + + + Number of bytes. + + + Number of lines. + + + Number of paragraphs. + + + Number of slides in a power point presentation. + + + Number of slides with notes. + + + Number of hidden slides. + + + Number of multimedia clips, e.g. sound or video. + + + This entry is Set To -1 when scaling of the thumbnail Is + desired. Otherwise the thumbnail should be cropped. + + + This entry denotes an internally used property. It is a + vector of variants consisting of pairs of a string (VT_LPSTR) + and a number (VT_I4). The string is a heading name, and the + number tells how many document parts are under that + heading. + + + This entry Contains the names of document parts (word: names + of the documents in the master document, excel: sheet names, + power point: slide titles, binder: document names). + + + This entry Contains the name of the project manager. + + + This entry Contains the company name. + + + If this entry is -1 the links are dirty and should be + re-evaluated. + + + The highest well-known property ID. Applications are free To use higher values for custom purposes. + + + Contains the summary information property ID values and + associated strings. See the overall HPSF documentation for + details! + + + Contains the summary information property ID values and + associated strings. See the overall HPSF documentation for + details! + + + + Initializes a new instance of the class. + + initialCapacity The initial capacity as defined for + {@link HashMap} + The load factor as defined for {@link HashMap} + + + + Initializes a new instance of the class. + + The instance To be Created is backed by this map. + + + + Puts a ID string for an ID into the {@link + PropertyIDMap}. + + The ID string. + The id string. + As specified by the {@link java.util.Map} interface, this method + returns the previous value associated with the specified id + + + + Gets the ID string for an ID from the {@link + PropertyIDMap}. + + The ID. + The ID string associated with id + + + + Gets the Summary Information properties singleton + + + + + + Gets the Document Summary Information properties + singleton. + + The Document Summary Information properties singleton. + + + + Maps section format IDs To {@link PropertyIDMap}s. It Is + initialized with two well-known section format IDs: those of the + \005SummaryInformation stream and the + \005DocumentSummaryInformation stream. + If you have a section format ID you can use it as a key To query + this map. If you Get a {@link PropertyIDMap} returned your section + is well-known and you can query the {@link PropertyIDMap} for PID + strings. If you Get back null you are on your own. + This {@link java.util.Map} expects the byte arrays of section format IDs + as keys. A key maps To a {@link PropertyIDMap} describing the + property IDs in sections with the specified section format ID. + @author Rainer Klute (klute@rainer-klute.de) + @since 2002-02-09 + + + + A property without a known name is described by this string. + + + The SummaryInformation's section's format ID. + + + The DocumentSummaryInformation's first and second sections' format + ID. + + + The default section ID map. It maps section format IDs To + {@link PropertyIDMap}s. + + + + Returns the singleton instance of the default {@link + SectionIDMap}. + + The instance value + + + + Returns the property ID string that is associated with a + given property ID in a section format ID's namespace. + + Each section format ID has its own name + space of property ID strings and thus must be specified. + The property ID + The well-known property ID string associated with the + property ID pid in the name space spanned by sectionFormatID If the pid + sectionFormatID combination is not well-known, the + string "[undefined]" is returned. + + + + + Returns the {@link PropertyIDMap} for a given section format + ID. + + The section format ID. + the property ID map + + + + Returns the {@link PropertyIDMap} for a given section format + ID. + + A section format ID as a + byte[] + the property ID map + + + + Associates a section format ID with a {@link + PropertyIDMap}. + + the section format ID + The property ID map. + + + + + Puts the specified key. + + This parameter remains undocumented since the method Is + deprecated. + This parameter remains undocumented since the method Is + deprecated. + The return value remains undocumented since the method Is + deprecated. + + + + This exception is thrown when trying To Write a (yet) unsupported variant + type. + @see ReadingNotSupportedException + @see UnsupportedVariantTypeException + @author Rainer Klute + <klute@rainer-klute.de> + @since 2003-08-08 + + + + + Initializes a new instance of the class. + + The unsupported variant type. + The value + + + An ERFListener Is registered with the EventRecordFactory. + An ERFListener listens for Records coming from the stream + via the EventRecordFactory + + @see EventRecordFactory + @author Andrew C. Oliver acoliver@apache.org + + + Process a Record. This method Is called by the + EventRecordFactory when a record Is returned. + @return bool specifying whether the effort was a success. + + + Event-based record factory. As opposed to RecordFactory + this refactored version throws record events as it comes + accross the records. I throws the "lazily" one record behind + to ensure that ContinueRecords are Processed first. + + @author Andrew C. Oliver (acoliver@apache.org) - probably to blame for the bugs (so yank his chain on the list) + @author Marc Johnson (mjohnson at apache dot org) - methods taken from RecordFactory + @author Glen Stampoultzis (glens at apache.org) - methods taken from RecordFactory + @author Csaba Nagy (ncsaba at yahoo dot com) + + + Create an EventRecordFactory + @param abortable specifies whether the return from the listener + handler functions are obeyed. False means they are ignored. True + means the event loop exits on error. + + + sends the record event to all registered listeners. + @param record the record to be thrown. + @return false to abort. This aborts + out of the event loop should the listener return false + + + Create an array of records from an input stream + + @param in the InputStream from which the records will be + obtained + + @exception RecordFormatException on error Processing the + InputStream + + + Interface for use with the HSSFRequest and HSSFEventFactory. Users should Create + a listener supporting this interface and register it with the HSSFRequest (associating + it with Record SID's). + + @see org.apache.poi.hssf.eventusermodel.HSSFEventFactory + @see org.apache.poi.hssf.eventusermodel.HSSFRequest + @see org.apache.poi.hssf.eventusermodel.HSSFUserException + + @author Carey Sublette (careysub@earthling.net) + + + + + Interface for use with the HSSFRequest and HSSFEventFactory. Users should Create + a listener supporting this interface and register it with the HSSFRequest (associating + it with Record SID's). + @author acoliver@apache.org + + + + + Process an HSSF Record. Called when a record occurs in an HSSF file. + + The record. + + + This method, inherited from HSSFListener Is implemented as a stub. + It Is never called by HSSFEventFActory or HSSFRequest. + + + + Process an HSSF Record. Called when a record occurs in an HSSF file. + Provides two options for halting the Processing of the HSSF file. + + The return value provides a means of non-error termination with a + user-defined result code. A value of zero must be returned to + continue Processing, any other value will halt Processing by + HSSFEventFactory with the code being passed back by + its abortable Process events methods. + + Error termination can be done by throwing the HSSFUserException. + + Note that HSSFEventFactory will not call the inherited Process + + @return result code of zero for continued Processing. + + @throws HSSFUserException User code can throw this to abort + file Processing by HSSFEventFactory and return diagnostic information. + + + A dummy record to indicate that we've now had the last + cell record for this row. + + + Returns the (0 based) number of the row we are + currently working on. + + + Returns the (0 based) number of the last column + seen for this row. You should have alReady been + called with that record. + This Is -1 in the case of there being no columns + for the row. + + + A dummy record for when we're missing a cell in a row, + but still want to trigger something + + + A dummy record for when we're missing a row, but still + want to trigger something + + + + When working with the EventUserModel, if you want to + Process formulas, you need an instance of + Workbook to pass to a HSSFWorkbook, + to finally give to HSSFFormulaParser, + and this will build you stub ones. + Since you're working with the EventUserModel, you + wouldn't want to Get a full Workbook and + HSSFWorkbook, as they would eat too much memory. + Instead, you should collect a few key records as they + go past, then call this once you have them to build a + stub Workbook, and from that a stub + HSSFWorkbook, to use with the HSSFFormulaParser. + The records you should collect are: + ExternSheetRecord + BoundSheetRecord + You should probably also collect SSTRecord, + but it's not required to pass this in. + To help, this class includes a HSSFListener wrapper + that will do the collecting for you. + + + + + Creates a stub Workbook from the supplied records, + suitable for use with the {@link HSSFFormulaParser} + + The ExternSheetRecords in your file + The BoundSheetRecords in your file + TThe SSTRecord in your file. + A stub Workbook suitable for use with HSSFFormulaParser + + + + Creates a stub workbook from the supplied records, + suitable for use with the HSSFFormulaParser + + The ExternSheetRecords in your file + A stub Workbook suitable for use with HSSFFormulaParser + A stub Workbook suitable for use with {@link HSSFFormulaParser} + + + + A wrapping HSSFListener which will collect + BoundSheetRecords and {@link ExternSheetRecord}s as + they go past, so you can Create a Stub {@link Workbook} from + them once required. + + + + + Initializes a new instance of the class. + + The child listener. + + + + Gets the bound sheet records. + + + + + + Gets the extern sheet records. + + + + + + Gets the SST record. + + + + + + Gets the stub HSSF workbook. + + + + + + Gets the stub workbook. + + + + + + Process this record ourselves, and then + pass it on to our child listener + + The record. + + + + Process the record ourselves, but do not + pass it on to the child Listener. + + The record. + + + A proxy HSSFListener that keeps track of the document + formatting records, and provides an easy way to look + up the format strings used by cells from their ids. + + + Process this record ourselves, and then + pass it on to our child listener + + + Process the record ourselves, but do not + pass it on to the child Listener. + @param record + + + Formats the given numeric of date Cell's contents + as a String, in as close as we can to the way + that Excel would do so. + Uses the various format records to manage this. + + TODO - move this to a central class in such a + way that hssf.usermodel can make use of it too + + + Returns the format string, eg $##.##, for the + given number format index. + + + Returns the format string, eg $##.##, used + by your cell + + + Returns the index of the format string, used by your cell, + or -1 if none found + + + + Low level event based HSSF Reader. Pass either a DocumentInputStream to + Process events along with a request object or pass a POIFS POIFSFileSystem to + ProcessWorkbookEvents along with a request. + This will cause your file to be Processed a record at a time. Each record with + a static id matching one that you have registed in your HSSFRequest will be passed + to your associated HSSFListener. + @author Andrew C. Oliver (acoliver at apache dot org) + @author Carey Sublette (careysub@earthling.net) + + + + + Creates a new instance of HSSFEventFactory + + + + + Processes a file into essentially record events. + + an Instance of HSSFRequest which has your registered listeners + a POIFS filesystem containing your workbook + + + + Processes a file into essentially record events. + + an Instance of HSSFRequest which has your registered listeners + a POIFS filesystem containing your workbook + numeric user-specified result code. + + + + Processes a DocumentInputStream into essentially Record events. + If an + AbortableHSSFListener + causes a halt to Processing during this call + the method will return just as with + abortableProcessEvents + , but no + user code or + HSSFUserException + will be passed back. + + an Instance of HSSFRequest which has your registered listeners + a DocumentInputStream obtained from POIFS's POIFSFileSystem object + + + + Processes a DocumentInputStream into essentially Record events. + + an Instance of HSSFRequest which has your registered listeners + a DocumentInputStream obtained from POIFS's POIFSFileSystem object + numeric user-specified result code. + + + + Processes a DocumentInputStream into essentially Record events. + + an Instance of HSSFRequest which has your registered listeners + a DocumentInputStream obtained from POIFS's POIFSFileSystem object + numeric user-specified result code. + + + + A stream based way to Get at complete records, with + as low a memory footprint as possible. + This handles Reading from a RecordInputStream, turning + the data into full records, Processing continue records + etc. + Most users should use HSSFEventFactory + HSSFListener and have new records pushed to + them, but this does allow for a "pull" style of coding. + + + + Have we run out of records on the stream? + + + Have we returned all the records there are? + + + Sometimes we end up with a bunch of + records. When we do, these should + be returned before the next normal + record Processing occurs (i.e. before + we Check for continue records and + return rec) + + + The next record to return, which may need to have its + continue records passed to it before we do + + + The most recent record that we gave to the user + + + The most recent DrawingRecord seen + + + + Returns the next (complete) record from the + stream, or null if there are no more. + + + + + + If there are any "bonus" records, that should + be returned before Processing new ones, + grabs the next and returns it. + If not, returns null; + + + + + + Returns the next available record, or null if + this pass didn't return a record that's + suitable for returning (eg was a continue record). + + + + + + An HSSFRequest object should be constructed registering an instance or multiple + instances of HSSFListener with each Record.sid you wish to listen for. + @author Andrew C. Oliver (acoliver at apache dot org) + @author Carey Sublette (careysub@earthling.net) + + + + + Creates a new instance of HSSFRequest + + + + + Add an event listener for a particular record type. The trick Is you have to know + what the records are for or just start with our examples and build on them. Alternatively, + you CAN call AddListenerForAllRecords and you'll recieve ALL record events in one listener, + but if you like to squeeze every last byte of efficiency out of life you my not like this. + (its sure as heck what I plan to do) + + for the event + identifier for the record type this Is the .sid static member on the individual records + + + + This Is the equivilent of calling AddListener(myListener, sid) for EVERY + record in the org.apache.poi.hssf.record package. This Is for lazy + people like me. You can call this more than once with more than one listener, but + that seems like a bad thing to do from a practice-perspective Unless you have a + compelling reason to do so (like maybe you send the event two places or log it or + something?). + + a single listener to associate with ALL records + + + + Called by HSSFEventFactory, passes the Record to each listener associated with + a record.sid. + Exception and return value Added 2002-04-19 by Carey Sublette + + The record. + numeric user-specified result code. If zero continue Processing. + + + + This exception Is provided as a way for API users to throw + exceptions from their event handling code. By doing so they + abort file Processing by the HSSFEventFactory and by + catching it from outside the HSSFEventFactory.ProcessEvents + method they can diagnose the cause for the abort. + The HSSFUserException supports a nested "reason" + throwable, i.e. an exception that caused this one to be thrown. + The HSSF package does not itself throw any of these + exceptions. + + + @author Rainer Klute (klute@rainer-klute.de) + @author Carey Sublette (careysub@earthling.net) + + + + + Creates a new HSSFUserException + + + + + Creates a new HSSFUserException with a message + string. + + The MSG. + + + + Creates a new HSSFUserException with a reason. + + The reason. + + + + Creates a new HSSFUserException with a message string + and a reason. + + The MSG. + The reason. + + + + A HSSFListener which tracks rows and columns, and will + trigger your HSSFListener for all rows and cells, + even the ones that aren't actually stored in the file. + This allows your code to have a more "Excel" like + view of the data in the file, and not have to worry + (as much) about if a particular row/cell Is in the + file, or was skipped from being written as it was + blank. + + + + + Constructs a new MissingRecordAwareHSSFListener, which + will fire ProcessRecord on the supplied child + HSSFListener for all Records, and missing records. + + The HSSFListener to pass records on to + + + + Process an HSSF Record. Called when a record occurs in an HSSF file. + + + + + + A text extractor for Excel files, that is based + on the hssf eventusermodel api. + It will typically use less memory than + ExcelExtractor, but may not provide + the same richness of formatting. + Returns the textual content of the file, suitable for + indexing by something like Lucene, but not really + intended for display to the user. + + + + + Common Parent for OLE2 based Text Extractors + of POI Documents, such as .doc, .xls + You will typically find the implementation of + a given format's text extractor under NPOI.Format.Extractor + + + @see org.apache.poi.hssf.extractor.ExcelExtractor + @see org.apache.poi.hslf.extractor.PowerPointExtractor + @see org.apache.poi.hdgf.extractor.VisioTextExtractor + @see org.apache.poi.hwpf.extractor.WordExtractor + + + + + Creates a new text extractor for the given document + + + + + + Returns the document information metadata for the document + + The doc summary information. + + + + Returns the summary information metadata for the document + + The summary information. + + + + Returns an HPSF powered text extractor for the + document properties metadata, such as title and author. + + + + + + Triggers the extraction. + + + + + + Would return the document information metadata for the document, + if we supported it + + The doc summary information. + + + + Would return the summary information metadata for the document, + if we supported it + + The summary information. + + + + Should sheet names be included? Default is true + + if set to true [include sheet names]. + + + + Should we return the formula itself, and not + the result it produces? Default is false + + if set to true [formulas not results]. + + + + Retreives the text contents of the file + + All the text from the document. + + + + Process an HSSF Record. Called when a record occurs in an HSSF file. + + + + + + Formats a number or date cell, be that a real number, or the + answer to a formula + + The cell. + The value. + + + + + A text extractor for Excel files. + Returns the textual content of the file, suitable for + indexing by something like Lucene, but not really + intended for display to the user. + + + + Common interface for Excel text extractors, covering + HSSF and XSSF + + + Retreives the text contents of the file + + + + Initializes a new instance of the class. + + The wb. + + + + Initializes a new instance of the class. + + The fs. + + + + Extracts the header footer. + + The header or footer + + + + + Should header and footer be included? Default is true + + + + + Should sheet names be included? Default is true + + if set to true [include sheet names]. + + + + Should we return the formula itself, and not + the result it produces? Default is false + + if set to true [formulas not results]. + + + + Should cell comments be included? Default is false + + if set to true [include cell comments]. + + + + Should blank cells be output? Default is to only + output cells that are present in the file and are + non-blank. + + if set to true [include blank cells]. + + + + Retreives the text contents of the file + + All the text from the document. + + + + An abstract shape Is the lowlevel model for a shape. + @author Glen Stampoultzis (glens at apache.org) + + + + + Create a new shape object used to Create the escher records. + + The simple shape this Is based on. + The shape id. + + + + + Creates an escher anchor record from a HSSFAnchor. + + The high level anchor to Convert. + An escher anchor record. + + + + Add standard properties to the opt record. These properties effect + all records. + + The user model shape. + The opt record to Add the properties to. + The number of options Added. + + + + Generate id for the CommonObjectDataSubRecord that stands behind this shape + + shape id as generated by drawing manager + object id that will be assigned to the Obj record + + + + The shape container and it's children that can represent this + shape. + + The sp container. + + + + The object record that Is associated with this shape. + + The obj record. + + + Creates the low evel records for a combobox. + + @param hssfShape The highlevel shape. + @param shapeId The shape id to use for this shape. + + + Creates the low level OBJ record for this shape. + + + Generates the escher shape records for this shape. + + + + Represents a cell comment. + This class Converts highlevel model data from HSSFComment + to low-level records. + @author Yegor Kozlov + + + + + Represents an textbox shape and Converts between the highlevel records + and lowlevel records for an oval. + @author Glen Stampoultzis (glens at apache.org) + + + + + Creates the low evel records for a textbox. + + The highlevel shape. + The shape id to use for this shape. + + + + Creates the lowerlevel OBJ records for this shape. + + The HSSF shape. + The shape id. + + + + + Creates the lowerlevel escher records for this shape. + + The HSSF shape. + The shape id. + + + + + Textboxes also have an extra TXO record associated with them that most + other shapes dont have. + + The HSSF shape. + The shape id. + + + + + The shape container and it's children that can represent this + shape. + + + + + + The object record that is associated with this shape. + + + + + + The TextObject record that is associated with this shape. + + + + + + Gets the EscherTextbox record. + + The EscherTextbox record. + + + + Creates the low-level records for a comment. + + The highlevel shape. + The shape id to use for this shape. + + + + Creates the low level NoteRecord + which holds the comment attributes. + + The shape. + The shape id. + + + + + Sets standard escher options for a comment. + This method is responsible for Setting default background, + shading and other comment properties. + + The highlevel shape. + The escher records holding the proerties + The number of escher options added + + + + Gets the NoteRecord holding the comment attributes + + The NoteRecord + + + + Creates the anchor. + + The user anchor. + + + + Provides utilities to manage drawing Groups. + + @author Glen Stampoultzis (glens at apache.org) + + + Allocates new shape id for the new drawing Group id. + + @return a new shape id. + + + + Provides utilities to manage drawing Groups. + + + Glen Stampoultzis (glens at apache.org) + + + + + Clears the cached list of drawing Groups + + + + + Allocates new shape id for the new drawing Group id. + + + a new shape id. + + + + Allocates new shape id for the new drawing group id. + + + + a new shape id. + + + + Finds the next available (1 based) drawing Group id + + + + + HSSF wrapper for the {@link FormulaParser} and {@link FormulaRenderer} + + @author Josh Micich + + + Convenience method for parsing cell formulas. see {@link #parse(String, HSSFWorkbook, int)} + + + @param formulaType a constant from {@link FormulaType} + @return the parsed formula tokens + + + @param formula the formula to parse + @param workbook the parent workbook + @param formulaType a constant from {@link FormulaType} + @param sheetIndex the 0-based index of the sheet this formula belongs to. + The sheet index is required to resolve sheet-level names. -1 means that + the scope of the name will be ignored and the parser will match named ranges only by name + + @return the parsed formula tokens + + + Static method to convert an array of {@link Ptg}s in RPN order + to a human readable string format in infix mode. + @param book used for defined names and 3D references + @param ptgs must not be null + @return a human readable String + + + + Represents a line shape and Creates all the line specific low level records. + @author Glen Stampoultzis (glens at apache.org) + + + + + Creates the line shape from the highlevel user shape. All low level + records are Created at this point. + + The user model shape + The identifier to use for this shape. + + + + Creates the lowerlevel escher records for this shape. + + The HSSF shape. + The shape id. + + + + + Creates the low level OBJ record for this shape. + + The HSSF shape. + The shape id. + + + + + The shape container and it's children that can represent this + shape. + + + + + + The object record that is associated with this shape. + + + + + Link Table (OOO pdf reference: 4.10.3 )

+ + The main data of all types of references is stored in the Link Table inside the Workbook Globals + Substream (4.2.5). The Link Table itself is optional and occurs only, if there are any + references in the document. +

+ + In BIFF8 the Link Table consists of +

    +
  • zero or more EXTERNALBOOK Blocks

    + each consisting of +

      +
    • exactly one EXTERNALBOOK (0x01AE) record
    • +
    • zero or more EXTERNALNAME (0x0023) records
    • +
    • zero or more CRN Blocks

      + each consisting of +

        +
      • exactly one XCT (0x0059)record
      • +
      • zero or more CRN (0x005A) records (documentation says one or more)
      • +
      +
    • +
    +
  • +
  • zero or one EXTERNSHEET (0x0017) record
  • +
  • zero or more DEFINEDNAME (0x0018) records
  • +
+ + + @author Josh Micich +
+ + @param extRefIndex as from a {@link Ref3DPtg} or {@link Area3DPtg} + @return -1 if the reference is to an external book + + + @param extRefIndex as from a {@link Ref3DPtg} or {@link Area3DPtg} + @return -1 if the reference is to an external book + + + Finds the external name definition for the given name, + optionally restricted by externsheet index, and returns + (if found) as a NameXPtg. + @param sheetRefIndex The Extern Sheet Index to look for, or -1 if any + + + Register an external name in this workbook + + @param name the name to register + @return a NameXPtg describing this name + + + copied from Workbook + + + Changes an external referenced file to another file. + A formular in Excel which refers a cell in another file is saved in two parts: + The referenced file is stored in an reference table. the row/cell information is saved separate. + This method invokation will only change the reference in the lookup-table itself. + @param oldUrl The old URL to search for and which is to be replaced + @param newUrl The URL replacement + @return true if the oldUrl was found and replaced with newUrl. Otherwise false + + + TODO - would not be required if calling code used RecordStream or similar + + + Create a new block for registering add-in functions + + @see org.apache.poi.hssf.model.LinkTable#addNameXPtg(String) + + + Create a new block for external references. + + + Create a new block for internal references. It is called when constructing a new LinkTable. + + @see org.apache.poi.hssf.model.LinkTable#LinkTable(int, WorkbookRecordList) + + + Performs case-insensitive search + @return -1 if not found + + + Represents a syntactic element from a formula by encapsulating the corresponding Ptg + token. Each ParseNode may have child ParseNodes in the case when the wrapped + Ptg is non-atomic. + + @author Josh Micich + + + + Collects the array of Ptg + tokens for the specified tree. + + The root node. + + + + + The IF() function Gets marked up with two or three tAttr tokens. + Similar logic will be required for CHOOSE() when it is supported + See excelfileformat.pdf sec 3.10.5 "tAttr (19H) + + The temp. + + + + Represents a picture shape and Creates all specific low level records. + @author Glen Stampoultzis (glens at apache.org) + + + + + Creates the line shape from the highlevel user shape. All low level + records are Created at this point. + + The user model shape. + The identifier to use for this shape. + + + + Creates the lowerlevel escher records for this shape. + + The HSSF shape. + The shape id. + + + + + Creates the low level OBJ record for this shape. + + The HSSFShape. + The shape id. + + + + + The shape container and it's children that can represent this + shape. + + + + + + The object record that is associated with this shape. + + + + + + Creates the low evel records for an polygon. + + The highlevel shape. + The shape id to use for this shape. + + + + Creates the lowerlevel escher records for this shape. + + The HSSF shape. + The shape id. + + + + + Creates the lowerlevel OBJ records for this shape. + + The HSSF shape. + The shape id. + + + + + The shape container and it's children that can represent this + shape. + + + + + + The object record that is associated with this shape. + + + + + Finds correct insert positions for records in workbook streams

+ + See OOO excelfileformat.pdf sec. 4.2.5 'Record Order in a BIFF8 Workbook Stream' + + @author Josh Micich + + + Adds the specified new record in the correct place in sheet records list + + + +

+ Finds the index where the protection block should be inserted + + the records for this sheet + + + + BOF + o INDEX + o Calculation Settings Block + o PRINTHEADERS + o PRINTGRIDLINES + o GRIDSET + o GUTS + o DEFAULTROWHEIGHT + o SHEETPR + o Page Settings Block + o Worksheet Protection Block + o DEFCOLWIDTH + oo COLINFO + o SORT + + DIMENSION + +
+ + + These records may occur between the 'Worksheet Protection Block' and DIMENSION: + + + + + o DEFCOLWIDTH + oo COLINFO + o SORT + + + + + Find correct position to add new CFHeader record + + + + + + Finds the index where the sheet validations header record should be inserted + @param records the records for this sheet + + + WINDOW2 + o SCL + o PANE + oo SELECTION + o STANDARDWIDTH + oo MERGEDCELLS + o LABELRANGES + o PHONETICPR + o Conditional Formatting Table + o Hyperlink Table + o Data Validity Table + o SHEETLAYOUT + o SHEETPROTECTION + o RANGEPROTECTION + + EOF + + + DIMENSIONS record is always present + + + + if the specified record ID terminates a sequence of Row block records + It is assumed that at least one row or cell value record has been found prior to the current + record + + + + + + + Whether the specified record id normally appears in the row blocks section of the sheet records + + + + + + + Simplifies iteration over a sequence of Record objects. + @author Josh Micich + + + + + Determines whether this instance has next. + + + true if this instance has next; otherwise, false. + + + + + Gets the next record + + + + + + Peeks the next sid. + + -1 if at end of records + + + + Peeks the next class. + + the class of the next Record.return null if this stream Is exhausted. + + + Segregates the 'Row Blocks' section of a single sheet into plain row/cell records and + shared formula records. + + @author Josh Micich + + + Also collects any loose MergeCellRecords and puts them in the supplied + mergedCellsTable + + + Some unconventional apps place {@link MergeCellsRecord}s within the row block. They + actually should be in the {@link MergedCellsTable} which is much later (see bug 45699). + @return any loose MergeCellsRecords found + + + @return a {@link RecordStream} containing all the non-{@link SharedFormulaRecord} + non-{@link ArrayRecord} and non-{@link TableRecord} Records. + + + + Low level model implementation of a Sheet (one workbook Contains many sheets) + This file Contains the low level binary records starting at the sheets BOF and + ending with the sheets EOF. Use HSSFSheet for a high level representation. + + The structures of the highlevel API use references to this to perform most of their + operations. Its probably Unwise to use these low level structures directly Unless you + really know what you're doing. I recommend you Read the Microsoft Excel 97 Developer's + Kit (Microsoft Press) and the documentation at http://sc.openoffice.org/excelfileformat.pdf + before even attempting to use this. + + + @author Andrew C. Oliver (acoliver at apache dot org) + @author Glen Stampoultzis (glens at apache.org) + @author Shawn Laubach (slaubach at apache dot org) Gridlines, Headers, Footers, PrintSetup, and Setting Default Column Styles + @author Jason Height (jheight at chariot dot net dot au) Clone support. DBCell and Index Record writing support + @author Brian Sanders (kestrel at burdell dot org) Active Cell support + @author Jean-Pierre Paris (jean-pierre.paris at m4x dot org) (Just a little) + + + + java object always present, but if empty no BIFF records are written + + + the DimensionsRecord is always present + + + Add an UncalcedRecord if not true indicating formulas have not been calculated + + + + Clones the low level records of this sheet and returns the new sheet instance. + This method is implemented by Adding methods for deep cloning to all records that + can be Added to a sheet. The Record object does not implement Cloneable. + When Adding a new record, implement a public Clone method if and only if the record + belongs to a sheet. + + + + + + get the NEXT value record (from LOC). The first record that is a value record + (starting at LOC) will be returned. + This method is "loc" sensitive. Meaning you need to set LOC to where you + want it to start searching. If you don't know do this: setLoc(getDimsLoc). + When adding several rows you can just start at the last one by leaving loc + at what this sets it to. For this method, set loc to dimsloc to start with, + subsequent calls will return values in (physical) sequence or NULL when you get to the end. + + the next value record or NULL if there are no more + + + + Creates the sheet. + + The stream. + + + + + Initializes a new instance of the class. + + The stream. + + + + Creates a sheet with all the usual records minus values and the "index" + record (not required). Sets the location pointer to where the first value + records should go. Use this to Create a sheet from "scratch". + + Sheet object with all values Set to defaults + + + + Adds the merged region. + + the row index From + The column index From. + The row index To + The column To. + + + + + Removes the merged region. + + The index. + + + + Gets the merged region at. + + The index. + + + + + Per an earlier reported bug in working with Andy Khan's excel Read library. This + Sets the values in the sheet's DimensionsRecord object to be correct. Excel doesn't + really care, but we want to play nice with other libraries. + + The first row. + The first column. + The last row. + The last column. + + + + Create a row record. (does not Add it to the records contained in this sheet) + + row number + RowRecord Created for the passed in row number + + + + Create a LABELSST Record (does not Add it to the records contained in this sheet) + + the row the LabelSST Is a member of + the column the LabelSST defines + the index of the string within the SST (use workbook AddSSTString method) + LabelSSTRecord newly Created containing your SST Index, row,col. + + + + Create a NUMBER Record (does not Add it to the records contained in this sheet) + + the row the NumberRecord is a member of + the column the NumberRecord defines + value for the number record + NumberRecord for that row, col containing that value as Added to the sheet + + + + Create a BLANK record (does not Add it to the records contained in this sheet) + + the row the BlankRecord is a member of + the column the BlankRecord is a member of + + + + + Adds a value record to the sheet's contained binary records + (i.e. LabelSSTRecord or NumberRecord). + This method is "loc" sensitive. Meaning you need to Set LOC to where you + want it to start searching. If you don't know do this: SetLoc(GetDimsLoc). + When Adding several rows you can just start at the last one by leaving loc + at what this Sets it to. + + the row to Add the cell value to + the cell value record itself. + + + + Remove a value record from the records array. + This method is not loc sensitive, it Resets loc to = dimsloc so no worries. + + the row of the value record you wish to Remove + a record supporting the CellValueRecordInterface. + + + + Replace a value record from the records array. + This method is not loc sensitive, it Resets loc to = dimsloc so no worries. + + a record supporting the CellValueRecordInterface. this will Replace + the cell value with the same row and column. If there Isn't one, one will + be Added. + + + + Adds a row record to the sheet + This method is "loc" sensitive. Meaning you need to Set LOC to where you + want it to start searching. If you don't know do this: SetLoc(GetDimsLoc). + When Adding several rows you can just start at the last one by leaving loc + at what this Sets it to. + + the row record to be Added + + + + Removes a row record + This method is not loc sensitive, it Resets loc to = dimsloc so no worries. + + the row record to Remove + + + + Get the NEXT (from LOC) RowRecord where rownumber matches the given rownum. + The first record that is a Row record (starting at LOC) that has the + same rownum as the given rownum will be returned. + This method is "loc" sensitive. Meaning you need to Set LOC to where you + want it to start searching. If you don't know do this: SetLoc(GetDimsLoc). + When Adding several rows you can just start at the last one by leaving loc + at what this Sets it to. For this method, Set loc to dimsloc to start with. + subsequent calls will return rows in (physical) sequence or NULL when you Get to the end. + + which row to return (careful with LOC) + RowRecord representing the next row record or NULL if there are no more + + + + Creates the BOF record + + record containing a BOFRecord + + + + Creates the Index record - not currently used + + record containing a IndexRecord + + + + Creates the CalcMode record and Sets it to 1 (automatic formula caculation) + + record containing a CalcModeRecord + + + + Creates the CalcCount record and Sets it to 0x64 (default number of iterations) + + record containing a CalcCountRecord + + + + Creates the RefMode record and Sets it to A1 Mode (default reference mode) + + record containing a RefModeRecord + + + + Creates the Iteration record and Sets it to false (don't iteratively calculate formulas) + + record containing a IterationRecord + + + + Creates the Delta record and Sets it to 0.0010 (default accuracy) + + record containing a DeltaRecord + + + + Creates the SaveRecalc record and Sets it to true (recalculate before saving) + + record containing a SaveRecalcRecord + + + + Creates the PrintHeaders record and Sets it to false (we don't Create headers yet so why print them) + + record containing a PrintHeadersRecord + + + + Creates the PrintGridlines record and Sets it to false (that makes for ugly sheets). As far as I can + tell this does the same thing as the GridsetRecord + + record containing a PrintGridlinesRecord + + + + Creates the GridSet record and Sets it to true (user has mucked with the gridlines) + + record containing a GridsetRecord + + + + Creates the Guts record and Sets leftrow/topcol guttter and rowlevelmax/collevelmax to 0 + + record containing a GutsRecordRecord + + + + Creates the DefaultRowHeight Record and Sets its options to 0 and rowheight to 0xff + + + + record containing a DefaultRowHeightRecord + + + Creates the WSBoolRecord and Sets its values to defaults + @see org.apache.poi.hssf.record.WSBoolRecord + @see org.apache.poi.hssf.record.Record + @return record containing a WSBoolRecord + + + Creates the HCenter Record and Sets it to false (don't horizontally center) + @see org.apache.poi.hssf.record.HCenterRecord + @see org.apache.poi.hssf.record.Record + @return record containing a HCenterRecord + + + Creates the VCenter Record and Sets it to false (don't horizontally center) + @see org.apache.poi.hssf.record.VCenterRecord + @see org.apache.poi.hssf.record.Record + @return record containing a VCenterRecord + + + Creates the PrintSetup Record and Sets it to defaults and marks it invalid + @see org.apache.poi.hssf.record.PrintSetupRecord + @see org.apache.poi.hssf.record.Record + @return record containing a PrintSetupRecord + + + Creates the DefaultColWidth Record and Sets it to 8 + @see org.apache.poi.hssf.record.DefaultColWidthRecord + @see org.apache.poi.hssf.record.Record + @return record containing a DefaultColWidthRecord + + + Get the width of a given column in Units of 1/256th of a Char width + @param column index + @see org.apache.poi.hssf.record.DefaultColWidthRecord + @see org.apache.poi.hssf.record.ColumnInfoRecord + @see #SetColumnWidth(short,short) + @return column width in Units of 1/256th of a Char width + + + Get the index to the ExtendedFormatRecord "associated" with + the column at specified 0-based index. (In this case, an + ExtendedFormatRecord index is actually associated with a + ColumnInfoRecord which spans 1 or more columns) +
+ Returns the index to the default ExtendedFormatRecord (0xF) + if no ColumnInfoRecord exists that includes the column + index specified. + @param column + @return index of ExtendedFormatRecord associated with + ColumnInfoRecord that includes the column index or the + index of the default ExtendedFormatRecord (0xF) +
+ + Set the width for a given column in 1/256th of a Char width Units + @param column - the column number + @param width (in Units of 1/256th of a Char width) + + + Get the hidden property for a given column. + @param column index + @see org.apache.poi.hssf.record.DefaultColWidthRecord + @see org.apache.poi.hssf.record.ColumnInfoRecord + @see #SetColumnHidden(short,bool) + @return whether the column is hidden or not. + + + Get the hidden property for a given column. + @param column - the column number + @param hidden - whether the column is hidden or not + + + Creates an outline Group for the specified columns. + @param fromColumn Group from this column (inclusive) + @param toColumn Group to this column (inclusive) + @param indent if true the Group will be indented by one level, + if false indenting will be Removed by one level. + + + Creates the Dimensions Record and Sets it to bogus values (you should Set this yourself + or let the high level API do it for you) + @see org.apache.poi.hssf.record.DimensionsRecord + @see org.apache.poi.hssf.record.Record + @return record containing a DimensionsRecord + + + Creates the WindowTwo Record and Sets it to: + options = 0x6b6 + toprow = 0 + leftcol = 0 + headercolor = 0x40 + pagebreakzoom = 0x0 + normalzoom = 0x0 + @see org.apache.poi.hssf.record.WindowTwoRecord + @see org.apache.poi.hssf.record.Record + @return record containing a WindowTwoRecord + + + + Creates the Selection record and Sets it to nothing selected + + record containing a SelectionRecord + + + + Sets the active cell. + + The row. + The column. + + + + Sets the active cell range. + + The firstrow. + The lastrow. + The firstcolumn. + The lastcolumn. + + + + Sets the active cell range. + + The cellranges. + The index of the active range. + The active row in the active range + The active column in the active range + + + + Creates the EOF record + + record containing a EOFRecord + + + + Returns the first occurance of a record matching a particular sid. + + The sid. + + + + + Sets the SCL record or Creates it in the correct place if it does not + already exist. + + The record to set. + + + Finds the first occurance of a record matching a particular sid and + returns it's position. + @param sid the sid to search for + @return the record position of the matching record or -1 if no match + is made. + + + Sets whether the sheet is selected + @param sel True to select the sheet, false otherwise. + + + Creates a split (freezepane). Any existing freezepane or split pane Is overwritten. + @param colSplit Horizonatal position of split. + @param rowSplit Vertical position of split. + @param topRow Top row visible in bottom pane + @param leftmostColumn Left column visible in right pane. + + + Creates a split pane. Any existing freezepane or split pane is overwritten. + @param xSplitPos Horizonatal position of split (in 1/20th of a point). + @param ySplitPos Vertical position of split (in 1/20th of a point). + @param topRow Top row visible in bottom pane + @param leftmostColumn Left column visible in right pane. + @param activePane Active pane. One of: PANE_LOWER_RIGHT, + PANE_UPPER_RIGHT, PANE_LOWER_LEFT, PANE_UPPER_LEFT + @see #PANE_LOWER_LEFT + @see #PANE_LOWER_RIGHT + @see #PANE_UPPER_LEFT + @see #PANE_UPPER_RIGHT + + + creates a Password record with password set to 00. + + + creates a Protect record with protect set to false. + + + Creates an ObjectProtect record with protect Set to false. + @see org.apache.poi.hssf.record.ObjectProtectRecord + @see org.apache.poi.hssf.record.Record + @return an ObjectProtectRecord + + + Creates a ScenarioProtect record with protect Set to false. + @see org.apache.poi.hssf.record.ScenarioProtectRecord + @see org.apache.poi.hssf.record.Record + @return a ScenarioProtectRecord + + + + Finds the DrawingRecord for our sheet, and attaches it to the DrawingManager (which knows about + the overall DrawingGroup for our workbook). + If requested, will Create a new DrawRecord if none currently exist + + The DrawingManager2 for our workbook + Should one be Created if missing? + location of EscherAggregate record. if no EscherAggregate record is found return -1 + + + Perform any work necessary before the sheet is about to be Serialized. + For instance the escher aggregates size needs to be calculated before + serialization so that the dgg record (which occurs first) can be written. + + + Shifts all the page breaks in the range "count" number of rows/columns + @param breaks The page record to be Shifted + @param start Starting "main" value to Shift breaks + @param stop Ending "main" value to Shift breaks + @param count number of Units (rows/columns) to Shift by + + + Shifts the horizontal page breaks for the indicated count + @param startingRow + @param endingRow + @param count + + + Shifts the vertical page breaks for the indicated count + @param startingCol + @param endingCol + @param count + + + Updates formulas in cells and conditional formats due to moving of cells + @param externSheetIndex the externSheet index of this sheet + + + 'initial sheet records' are between INDEX and the 'Row Blocks' + @param bofRecordIndex index of record after which INDEX record is to be placed + @return count of bytes from end of INDEX record to first ROW record. + + + Get the {@link NoteRecord}s (related to cell comments) for this sheet + @return never null, typically empty array + + + + Gets the column infos. + + The column infos. + + + + Gets the number of merged regions. + + The number merged regions. + + + + Gets the number of conditional formattings. + + The number of conditional formattings. + + + + Gets or Sets the preoffset when using DBCELL records (currently Unused) - this Is + the position of this sheet within the whole file. + + the offset of the sheet's BOF within the file. + + + + Get the NEXT RowRecord (from LOC). The first record that is a Row record + (starting at LOC) will be returned. + This method is "loc" sensitive. Meaning you need to Set LOC to where you + want it to start searching. If you don't know do this: SetLoc(GetDimsLoc). + When Adding several rows you can just start at the last one by leaving loc + at what this Sets it to. For this method, Set loc to dimsloc to start with. + subsequent calls will return rows in (physical) sequence or NULL when you Get to the end. + + RowRecord representing the next row record or NULL if there are no more + + + + Gets the page settings. + + + + + Get the default column width for the sheet (if the columns do not define their own width) + @return default column width + + + Get the default row height for the sheet (if the rows do not define their own height) + @return default row height + + + + Gets or sets the top row. + + The top row. + + + + Gets or sets the left col. + + The left col. + + + + Returns the active row + + the active row index + @see org.apache.poi.hssf.record.SelectionRecord + + + + Gets the active cell col. + + the active column index + @see org.apache.poi.hssf.record.SelectionRecord + + + + Gets the gridset record for this sheet. + + The gridset record. + + + + Gets or sets the header. + + the HeaderRecord. + + + + Gets or sets a value indicating whether this instance is auto tab color. + + + true if this instance is auto tab color; otherwise, false. + + + + + Gets or sets the footer. + + FooterRecord for the sheet. + + + Returns the PrintSetupRecord. + @return PrintSetupRecord for the sheet. + + + @return true if gridlines are printed + + + Returns the PrintGridlinesRecord. + @return PrintGridlinesRecord for the sheet. + + + Returns the information regarding the currently configured pane (split or freeze). + @return null if no pane configured, or the pane information. + + + Returns if gridlines are Displayed. + @return whether gridlines are Displayed + + + Returns if formulas are Displayed. + @return whether formulas are Displayed + + + Returns if RowColHeadings are Displayed. + @return whether RowColHeadings are Displayed + + + @return whether an Uncalced record must be Inserted or not at generation + + + A common exception thrown by our binary format Parsers + (especially HSSF and DDF), when they hit invalid + format or data when Processing a record. + + + + Creates the low evel records for an oval. + + The highlevel shape. + The shape id to use for this shape. + + + + Creates the lowerlevel escher records for this shape. + + The HSSF shape. + The shape id. + + + + + Creates the lowerlevel OBJ records for this shape. + + The HSSF shape. + The shape id. + + + + + The shape container and it's children that can represent this + shape. + + + + + + The object record that is associated with this shape. + + + + + Low level model implementation of a Workbook. Provides creational methods + for Settings and objects contained in the workbook object. + + This file Contains the low level binary records starting at the workbook's BOF and + ending with the workbook's EOF. Use HSSFWorkbook for a high level representation. + + The structures of the highlevel API use references to this to perform most of their + operations. Its probably Unwise to use these low level structures directly Unless you + really know what you're doing. I recommend you Read the Microsoft Excel 97 Developer's + Kit (Microsoft Press) and the documentation at http://sc.openoffice.org/excelfileformat.pdf + before even attempting to use this. + + + @author Luc Girardin (luc dot girardin at macrofocus dot com) + @author Sergei Kozello (sergeikozello at mail.ru) + @author Shawn Laubach (slaubach at apache dot org) (Data Formats) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Brian Sanders (bsanders at risklabs dot com) - custom palette + @author Dan Sherman (dsherman at Isisph.com) + @author Glen Stampoultzis (glens at apache.org) + @see org.apache.poi.hssf.usermodel.HSSFWorkbook + @version 1.0-pre + + + Excel silently truncates long sheet names to 31 chars. + This constant is used to ensure uniqueness in the first 31 chars + + + constant used to Set the "codepage" wherever "codepage" is Set in records + (which is duplciated in more than one record) + + + this Contains the Worksheet record objects + + + this Contains a reference to the SSTRecord so that new stings can be Added + to it. + + + holds the "boundsheet" records (aka bundlesheet) so that they can have their + reference to their "BOF" marker + + + Creates new Workbook with no intitialization --useless right now + @see #CreateWorkbook(List) + + + Read support for low level + API. Pass in an array of Record objects, A Workbook + object is constructed and passed back with all of its initialization Set + to the passed in records and references to those records held. Unlike Sheet + workbook does not use an offset (its assumed to be 0) since its first in a file. + If you need an offset then construct a new array with a 0 offset or Write your + own ;-p. + + @param recs an array of Record objects + @return Workbook object + + + gets the name comment record + @param nameRecord name record who's comment is required. + @return name comment record or null if there isn't one for the given name. + + + Creates an empty workbook object with three blank sheets and all the empty + fields. Use this to Create a workbook from scratch. + + + Retrieves the Builtin NameRecord that matches the name and index + There shouldn't be too many names to make the sequential search too slow + @param name byte representation of the builtin name to match + @param sheetIndex Index to match + @return null if no builtin NameRecord matches + + + Removes the specified Builtin NameRecord that matches the name and index + @param name byte representation of the builtin to match + @param sheetIndex zero-based sheet reference + + + Gets the font record at the given index in the font table. Remember + "There is No Four" (someone at M$ must have gone to Rocky Horror one too + many times) + + @param idx the index to look at (0 or greater but NOT 4) + @return FontRecord located at the given index + + + Creates a new font record and Adds it to the "font table". This causes the + boundsheets to move down one, extended formats to move down (so this function moves + those pointers as well) + + @return FontRecord that was just Created + + + Check if the cloned sheet has drawings. If yes, then allocate a new drawing group ID and + re-generate shape IDs + + @param sheet the cloned sheet + + + Sets the BOF for a given sheet + + @param sheetnum the number of the sheet to Set the positing of the bof for + @param pos the actual bof position + + + Sets the name for a given sheet. If the boundsheet record doesn't exist and + its only one more than we have, go ahead and Create it. If its > 1 more than + we have, except + + @param sheetnum the sheet number (0 based) + @param sheetname the name for the sheet + + + Determines whether a workbook Contains the provided sheet name. + + @param name the name to test (case insensitive match) + @param excludeSheetIdx the sheet to exclude from the Check or -1 to include all sheets in the Check. + @return true if the sheet Contains the name, false otherwise. + + + Sets the name for a given sheet forcing the encoding. This is STILL A BAD IDEA. + Poi now automatically detects Unicode + + @deprecated 3-Jan-06 Simply use SetSheetNam e(int sheetnum, String sheetname) + @param sheetnum the sheet number (0 based) + @param sheetname the name for the sheet + + + Sets the order of appearance for a given sheet. + + @param sheetname the name of the sheet to reorder + @param pos the position that we want to Insert the sheet into (0 based) + + + Gets the name for a given sheet. + + @param sheetnum the sheet number (0 based) + @return sheetname the name for the sheet + + + Gets the hidden flag for a given sheet. + + @param sheetnum the sheet number (0 based) + @return True if sheet is hidden + + + Gets the hidden flag for a given sheet. + Note that a sheet could instead be + set to be very hidden, which is different + ({@link #isSheetVeryHidden(int)}) + + @param sheetnum the sheet number (0 based) + @return True if sheet is hidden + + + Hide or Unhide a sheet + + @param sheetnum The sheet number + @param hidden True to mark the sheet as hidden, false otherwise + + + Hide or unhide a sheet. + 0 = not hidden + 1 = hidden + 2 = very hidden. + + @param sheetnum The sheet number + @param hidden 0 for not hidden, 1 for hidden, 2 for very hidden + + + Get the sheet's index + @param name sheet name + @return sheet index or -1 if it was not found. + + + if we're trying to Address one more sheet than we have, go ahead and Add it! if we're + trying to Address >1 more than we have throw an exception! + + + + make the tabid record look like the current situation. + + number of bytes written in the TabIdRecord + + + Retrieves the index of the given font + + + Returns the StyleRecord for the given + xfIndex, or null if that ExtendedFormat doesn't + have a Style set. + + + Gets the ExtendedFormatRecord at the given 0-based index + + @param index of the Extended format record (0-based) + @return ExtendedFormatRecord at the given index + + + Creates a new Cell-type Extneded Format Record and Adds it to the end of + ExtendedFormatRecords collection + + @return ExtendedFormatRecord that was Created + + + Adds a string to the SST table and returns its index (if its a duplicate + just returns its index and update the counts) ASSUMES compressed Unicode + (meaning 8bit) + + @param string the string to be Added to the SSTRecord + + @return index of the string within the SSTRecord + + + given an index into the SST table, this function returns the corresponding String value + @return String containing the SST String + + + use this function to Add a Shared String Table to an existing sheet (say + generated by a different java api) without an sst.... + @see #CreateSST() + @see org.apache.poi.hssf.record.SSTRecord + + + Serializes all records int the worksheet section into a big byte array. Use + this to Write the Workbook out. + @param offset of the data to be written + @param data array of bytes to Write this to + + + Perform any work necessary before the workbook is about to be serialized. + + Include in it ant code that modifies the workbook record stream and affects its size. + + + Creates the BOF record + @see org.apache.poi.hssf.record.BOFRecord + @see org.apache.poi.hssf.record.Record + @return record containing a BOFRecord + + + Creates the InterfaceHdr record + @see org.apache.poi.hssf.record.InterfaceHdrRecord + @see org.apache.poi.hssf.record.Record + @return record containing a InterfaceHdrRecord + + + Creates an MMS record + @see org.apache.poi.hssf.record.MMSRecord + @see org.apache.poi.hssf.record.Record + @return record containing a MMSRecord + + + Creates the InterfaceEnd record + @see org.apache.poi.hssf.record.InterfaceEndRecord + @see org.apache.poi.hssf.record.Record + @return record containing a InterfaceEndRecord + + + Creates the WriteAccess record containing the logged in user's name + @see org.apache.poi.hssf.record.WriteAccessRecord + @see org.apache.poi.hssf.record.Record + @return record containing a WriteAccessRecord + + + Creates the Codepage record containing the constant stored in CODEPAGE + @see org.apache.poi.hssf.record.CodepageRecord + @see org.apache.poi.hssf.record.Record + @return record containing a CodepageRecord + + + Creates the DSF record containing a 0 since HSSF can't even Create Dual Stream Files + @see org.apache.poi.hssf.record.DSFRecord + @see org.apache.poi.hssf.record.Record + @return record containing a DSFRecord + + + Creates the TabId record containing an array of 0,1,2. This release of HSSF + always has the default three sheets, no less, no more. + @see org.apache.poi.hssf.record.TabIdRecord + @see org.apache.poi.hssf.record.Record + @return record containing a TabIdRecord + + + Creates the FnGroupCount record containing the Magic number constant of 14. + @see org.apache.poi.hssf.record.FnGroupCountRecord + @see org.apache.poi.hssf.record.Record + @return record containing a FnGroupCountRecord + + + Creates the WindowProtect record with protect Set to false. + @see org.apache.poi.hssf.record.WindowProtectRecord + @see org.apache.poi.hssf.record.Record + @return record containing a WindowProtectRecord + + + Creates the Protect record with protect Set to false. + @see org.apache.poi.hssf.record.ProtectRecord + @see org.apache.poi.hssf.record.Record + @return record containing a ProtectRecord + + + Creates the Password record with password Set to 0. + @see org.apache.poi.hssf.record.PasswordRecord + @see org.apache.poi.hssf.record.Record + @return record containing a PasswordRecord + + + Creates the ProtectionRev4 record with protect Set to false. + @see org.apache.poi.hssf.record.ProtectionRev4Record + @see org.apache.poi.hssf.record.Record + @return record containing a ProtectionRev4Record + + + Creates the PasswordRev4 record with password Set to 0. + @see org.apache.poi.hssf.record.PasswordRev4Record + @see org.apache.poi.hssf.record.Record + @return record containing a PasswordRev4Record + + + Creates the WindowOne record with the following magic values: + horizontal hold - 0x168 + vertical hold - 0x10e + width - 0x3a5c + height - 0x23be + options - 0x38 + selected tab - 0 + Displayed tab - 0 + num selected tab- 0 + tab width ratio - 0x258 + @see org.apache.poi.hssf.record.WindowOneRecord + @see org.apache.poi.hssf.record.Record + @return record containing a WindowOneRecord + + + Creates the Backup record with backup Set to 0. (loose the data, who cares) + @see org.apache.poi.hssf.record.BackupRecord + @see org.apache.poi.hssf.record.Record + @return record containing a BackupRecord + + + Creates the HideObj record with hide object Set to 0. (don't hide) + @see org.apache.poi.hssf.record.HideObjRecord + @see org.apache.poi.hssf.record.Record + @return record containing a HideObjRecord + + + Creates the DateWindow1904 record with windowing Set to 0. (don't window) + @see org.apache.poi.hssf.record.DateWindow1904Record + @see org.apache.poi.hssf.record.Record + @return record containing a DateWindow1904Record + + + Creates the Precision record with precision Set to true. (full precision) + @see org.apache.poi.hssf.record.PrecisionRecord + @see org.apache.poi.hssf.record.Record + @return record containing a PrecisionRecord + + + Creates the RefreshAll record with refreshAll Set to true. (refresh all calcs) + @see org.apache.poi.hssf.record.RefreshAllRecord + @see org.apache.poi.hssf.record.Record + @return record containing a RefreshAllRecord + + + Creates the BookBool record with saveLinkValues Set to 0. (don't save link values) + @see org.apache.poi.hssf.record.BookBoolRecord + @see org.apache.poi.hssf.record.Record + @return record containing a BookBoolRecord + + + Creates a Font record with the following magic values: + fontheight = 0xc8 + attributes = 0x0 + color palette index = 0x7fff + bold weight = 0x190 + Font Name Length = 5 + Font Name = Arial + + @see org.apache.poi.hssf.record.FontRecord + @see org.apache.poi.hssf.record.Record + @return record containing a FontRecord + + + Creates an ExtendedFormatRecord object + @param id the number of the extended format record to Create (meaning its position in + a file as MS Excel would Create it.) + + @return record containing an ExtendedFormatRecord + @see org.apache.poi.hssf.record.ExtendedFormatRecord + @see org.apache.poi.hssf.record.Record + + + Creates an default cell type ExtendedFormatRecord object. + @return ExtendedFormatRecord with intial defaults (cell-type) + + + Creates a new StyleRecord, for the given Extended + Format index, and adds it onto the end of the + records collection + + + Creates a StyleRecord object + @param id the number of the style record to Create (meaning its position in + a file as MS Excel would Create it. + @return record containing a StyleRecord + @see org.apache.poi.hssf.record.StyleRecord + @see org.apache.poi.hssf.record.Record + + + Creates a palette record initialized to the default palette + @return a PaletteRecord instance populated with the default colors + @see org.apache.poi.hssf.record.PaletteRecord + + + Creates the UseSelFS object with the use natural language flag Set to 0 (false) + @return record containing a UseSelFSRecord + @see org.apache.poi.hssf.record.UseSelFSRecord + @see org.apache.poi.hssf.record.Record + + + Create a "bound sheet" or "bundlesheet" (depending who you ask) record + Always Sets the sheet's bof to 0. You'll need to Set that yourself. + @param id either sheet 0,1 or 2. + @return record containing a BoundSheetRecord + @see org.apache.poi.hssf.record.BoundSheetRecord + @see org.apache.poi.hssf.record.Record + + + Creates the Country record with the default country Set to 1 + and current country Set to 7 in case of russian locale ("ru_RU") and 1 otherwise + @return record containing a CountryRecord + @see org.apache.poi.hssf.record.CountryRecord + @see org.apache.poi.hssf.record.Record + + + Creates the ExtendedSST record with numstrings per bucket Set to 0x8. HSSF + doesn't yet know what to do with this thing, but we Create it with nothing in + it hardly just to make Excel happy and our sheets look like Excel's + + @return record containing an ExtSSTRecord + @see org.apache.poi.hssf.record.ExtSSTRecord + @see org.apache.poi.hssf.record.Record + + + Finds the first sheet name by his extern sheet index + @param externSheetIndex extern sheet index + @return first sheet name. + + + Finds the (first) sheet index for a particular external sheet number. + @param externSheetNumber The external sheet number to convert + @return The index to the sheet found. + + + Finds the last sheet index for a particular external sheet number, + which may be the same as the first (except for multi-sheet references) + @param externSheetNumber The external sheet number to convert + @return The index to the sheet found. + + + Returns the extern sheet number for specific sheet number. + If this sheet doesn't exist in extern sheet, add it + @param sheetNumber local sheet number + @return index to extern sheet + + + Returns the extern sheet number for specific range of sheets. + If this sheet range doesn't exist in extern sheet, add it + @param firstSheetNumber first local sheet number + @param lastSheetNumber last local sheet number + @return index to extern sheet + + + + @param name the name of an external function, typically a name of a UDF + @param sheetRefIndex the sheet ref index, or -1 if not known + @param udf locator of user-defiend functions to resolve names of VBA and Add-In functions + @return the external name or null + + + Gets the name record + @param index name index + @return name record + + + Creates new name + @return new name record + + + Creates new name + @return new name record + + + Generates a NameRecord to represent a built-in region + @return a new NameRecord Unless the index is invalid + + + Removes the name + @param namenum name index + + + If a {@link NameCommentRecord} is added or the name it references + is renamed, then this will update the lookup cache for it. + + + Returns a format index that matches the passed in format. It does not tie into HSSFDataFormat. + @param format the format string + @param CreateIfNotFound Creates a new format if format not found + @return the format id of a format that matches or -1 if none found and CreateIfNotFound + + + Creates a FormatRecord, Inserts it, and returns the index code. + @param format the format string + @return the index code of the format record. + @see org.apache.poi.hssf.record.FormatRecord + @see org.apache.poi.hssf.record.Record + + + Creates a FormatRecord object + @param id the number of the format record to create (meaning its position in + a file as M$ Excel would create it.) + + + Returns the first occurance of a record matching a particular sid. + + + Returns the index of a record matching a particular sid. + @param sid The sid of the record to match + @return The index of -1 if no match made. + + + Returns the next occurance of a record matching a particular sid. + + + Finds the primary drawing Group, if one already exists + + + Creates a primary drawing Group record. If it already + exists then it's modified. + + + Removes the given font record from the + file's list. This will make all + subsequent font indicies drop by one, + so you'll need to update those yourself! + + + Removes the given ExtendedFormatRecord record from the + file's list. This will make all + subsequent font indicies drop by one, + so you'll need to update those yourself! + + + + Removes ExtendedFormatRecord record with given index from the file's list. This will make all + subsequent font indicies drop by one,so you'll need to update those yourself! + + index of the Extended format record (0-based) + + + protect a workbook with a password (not encypted, just Sets Writeprotect + flags and the password. + @param password to Set + + + Removes the Write protect flag + + + @param reFindex Index to REF entry in EXTERNSHEET record in the Link Table + @param definedNameIndex zero-based to DEFINEDNAME or EXTERNALNAME record + @return the string representation of the defined or external name + + + Updates named ranges due to moving of cells + + + Changes an external referenced file to another file. + A formular in Excel which refers a cell in another file is saved in two parts: + The referenced file is stored in an reference table. the row/cell information is saved separate. + This method invokation will only change the reference in the lookup-table itself. + @param oldUrl The old URL to search for and which is to be replaced + @param newUrl The URL replacement + @return true if the oldUrl was found and replaced with newUrl. Otherwise false + + + Gets the number of font records + + @return number of font records in the "font table" + + + Returns the position of the backup record. + + + returns the number of boundsheet objects contained in this workbook. + + @return number of BoundSheet records + + + Get the number of ExtendedFormat records contained in this workbook. + + @return int count of ExtendedFormat records + + + lazy initialization + Note - creating the link table causes creation of 1 EXTERNALBOOK and 1 EXTERNALSHEET record + + + Gets the total number of names + @return number of names + + + Returns the list of FormatRecords in the workbook. + @return ArrayList of FormatRecords in the notebook + + + Whether date windowing is based on 1/2/1904 or 1/1/1900. + Some versions of Excel (Mac) can save workbooks using 1904 date windowing. + + @return true if using 1904 date windowing + + + Returns the custom palette in use for this workbook; if a custom palette record + does not exist, then it is Created. + + + is the workbook protected with a password (not encrypted)? + + + Get or create RecalcIdRecord + + @see org.apache.poi.hssf.usermodel.HSSFWorkbook#setForceFormulaRecalculation(boolean) + + + + List for records in Workbook + + + + + Adds the specified pos. + + The pos. + The r. + + + + Removes the specified record. + + The record. + + + + Removes the specified position. + + The position. + + + + Gets or sets the records. + + The records. + + + + Gets the count. + + The count. + + + + Gets the at the specified index. + + + + + + Gets or sets the protpos. + + The protpos. + + + + Gets or sets the bspos. + + The bspos. + + + + Gets or sets the tabpos. + + The tabpos. + + + + Gets or sets the fontpos. + + The fontpos. + + + + Gets or sets the xfpos. + + The xfpos. + + + + Gets or sets the backuppos. + + The backuppos. + + + + Gets or sets the palettepos. + + The palettepos. + + + + Gets or sets the namepos. + + The namepos. + + + + Gets or sets the supbookpos. + + The supbookpos. + + + + Gets or sets the externsheet pos. + + The externsheet pos. + + + The escher container record is used to hold escher records. It is abstract and + must be subclassed for maximum benefit. + + @author Glen Stampoultzis (glens at apache.org) + @author Michael Zalewski (zalewski at optonline.net) + + + Constructs a Bar record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Clone the current record, via a call to serialise + it, and another to Create a new record from the + bytes. + May only be used for classes which don't have + internal counts / ids in them. For those which + do, a full record-aware serialise is needed, which + allocates new ids / counts as needed. + + + If we have a EscherContainerRecord as one of our + children (and most top level escher holders do), + then return that. + + + Descends into all our children, returning the + first EscherRecord with the given id, or null + if none found + + + Big drawing Group records are split but it's easier to deal with them + as a whole Group so we need to join them toGether. + + + Convert raw data to escher records. + + + Size of record (including 4 byte header) + + + + + + CFRecordsAggregate - aggregates Conditional Formatting records CFHeaderRecord + and number of up to three CFRuleRecord records toGether to simplify + access to them. + @author Dmitriy Kumshayev + + + Excel allows up to 3 conditional formating rules + + + List of CFRuleRecord objects + + + + Create CFRecordsAggregate from a list of CF Records + + list of Record objects + + + + Create CFRecordsAggregate from a list of CF Records + + list of Record objects + position of CFHeaderRecord object in the list of Record objects + + + + Create a deep Clone of the record + + + + + called by the class that is responsible for writing this sucker. + Subclasses should implement this so that their data is passed back in a + byte array. + + The offset to begin writing at + The data byte array containing instance data + number of bytes written + + + @return false if this whole {@link CFHeaderRecord} / {@link CFRuleRecord}s should be deleted + + + @return sum of sizes of all aggregated records + + + + @author Glen Stampoultzis + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The rs. + + + Performs a deep Clone of the record + + + + Inserts a column into the aggregate (at the end of the list). + + The column. + + + + Inserts a column into the aggregate (at the position specified + by index + + The index. + The columninfo. + + + + called by the class that is responsible for writing this sucker. + Subclasses should implement this so that their data is passed back in a + byte array. + + offset to begin writing at + byte array containing instance data + number of bytes written + + + + Visit each of the atomic BIFF records contained in this {@link RecordAggregate} in the order + that they should be written to file. Implementors may or may not return the actual + Records being used to manage POI's internal implementation. Callers should not + assume either way, and therefore only attempt to modify those Records after cloning + + + + + + Finds the start of column outline group. + + The idx. + + + + + Finds the end of column outline group. + + The idx. + + + + + Gets the col info. + + The idx. + + + + + Determines whether [is column group collapsed] [the specified idx]. + + The idx. + + true if [is column group collapsed] [the specified idx]; otherwise, false. + + + + + Determines whether [is column group hidden by parent] [the specified idx]. + + The idx. + + true if [is column group hidden by parent] [the specified idx]; otherwise, false. + + + + + Collapses the column. + + The column number. + + + + Expands the column. + + The column number. + + + Sets all non null fields into the ci parameter. + + + + Attempts to merge the col info record at the specified index + with either or both of its neighbours + + The col info ix. + + + merges two column info records (if they are adjacent and have the same formatting, etc) + @return false if the two column records could not be merged + + + + Sets all adjacent columns of the same outline level to the specified hidden status. + + the col info index of the start of the outline group. + The level. + The hidden. + the column index of the last column in the outline group + + + + Sets the column. + + The target column ix. + Index of the xf. + The width. + The level. + The hidden. + The collapsed. + + + Sets all non null fields into the ci parameter. + + + + Collapses the col info records. + + The column index. + + + + Creates an outline Group for the specified columns. + + Group from this column (inclusive) + Group to this column (inclusive) + if true the Group will be indented by one level;if false indenting will be Removed by one level. + + + + Finds the ColumnInfoRecord + which contains the specified columnIndex + + index of the column (not the index of the ColumnInfoRecord) + /// null + if no column info found for the specified column + + + + It's an aggregate... just made something up + + + + Gets the num columns. + + The num columns. + + + + Gets the size of the record. + + The size of the record. + + + + Gets the max outline level. + + The max outline level. + + + Holds all the conditional formatting for a workbook sheet.

+ + See OOO exelfileformat.pdf sec 4.12 'Conditional Formatting Table' + + @author Josh Micich + + + Creates an empty ConditionalFormattingTable + + + @return index of the newly added CF header aggregate + + + Manages the all the records associated with a 'Custom View Settings' sub-stream.
+ Includes the Initial USERSVIEWBEGIN(0x01AA) and USERSVIEWEND(0x01AB). + + @author Josh Micich +
+ + All the records between BOF and EOF + + +

+ Manages the DVALRecord and DVRecords for a single sheet + See OOO excelfileformat.pdf section 4.14 + @author Josh Micich + +
+ + The list of data validations for the current sheet. + Note - this may be empty (contrary to OOO documentation) + + + + The formula record aggregate is used to join toGether the formula record and it's + (optional) string record and (optional) Shared Formula Record (template Reads, excel optimization). + @author Glen Stampoultzis (glens at apache.org) + + + + The cell value record interface Is implemented by all classes of type Record that + contain cell values. It allows the containing sheet to move through them and Compare + them. + + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + + @see org.apache.poi.hssf.model.Sheet + @see org.apache.poi.hssf.record.Record + @see org.apache.poi.hssf.record.RecordFactory + + + Get the row this cell occurs on + + @return the row + + + Get the column this cell defines within the row + + @return the column + + + caches the calculated result of the formula + + + + Initializes a new instance of the class. + + The formula rec. + The string rec. + The SVM. + + + Should be called by any code which is either deleting this formula cell, or changing + its type. This method gives the aggregate a chance to unlink any shared formula + that may be involved with this cell formula. + + + + called by the class that is responsible for writing this sucker. + Subclasses should implement this so that their data is passed back in a + byte array. + + offset to begin writing at + byte array containing instance data. + number of bytes written + + + + Visit each of the atomic BIFF records contained in this {@link RecordAggregate} in the order + that they should be written to file. Implementors may or may not return the actual + {@link Record}s being used to manage POI's internal implementation. Callers should not + assume either way, and therefore only attempt to modify those {@link Record}s after cloning + + + + + + Sometimes the shared formula flag "seems" to be erroneously set (because the corresponding + SharedFormulaRecord does not exist). Normally this would leave no way of determining + the Ptg tokens for the formula. However as it turns out in these + cases, Excel encodes the unshared Ptg tokens in the right place (inside the FormulaRecord). + So the the only thing that needs to be done is to ignore the erroneous + shared formula flag. + + This method may also be used for setting breakpoints to help diagnose issues regarding the + abnormally-set 'shared formula' flags. + + The formula. + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + + The parameter is null. + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Sets the cached string result. + + The value. + + + + Sets the cached boolean result. + + if set to true [value]. + + + + Sets the cached error result. + + The error code. + + + Also checks for a related shared formula and unlinks it if found + + + Removes an array formula + @return the range of the array formula containing the specified cell. Never null + + + + Get the current Serialized size of the record. Should include the sid and recLength (4 bytes). + + The size of the record. + + + + return the non static version of the id for this record. + + The sid. + + + + Gets or sets the formula record. + + The formula record. + + + + Gets or sets the string record. + + The string record. + + + + Gets the string value. + + The string value. + + + + @author Josh Micich + + + + Creates an empty aggregate + + + + Reads zero or more consecutive {@link MergeCellsRecord}s + @param rs + + + Groups the page settings records for a worksheet.

+ + See OOO excelfileformat.pdf sec 4.4 'Page Settings Block' + + @author Josh Micich + + + Creates a PageSettingsBlock with default settings + + + @return true if the specified Record sid is one belonging to the + 'Page Settings Block'. + + + Sets a page break at the indicated column + + + + Removes a page break at the indicated column + + + + Creates the HCenter Record and sets it to false (don't horizontally center) + + + Creates the VCenter Record and sets it to false (don't horizontally center) + + + Creates the PrintSetup Record and sets it to defaults and marks it invalid + @see org.apache.poi.hssf.record.PrintSetupRecord + @see org.apache.poi.hssf.record.Record + @return record containing a PrintSetupRecord + + + Gets the size of the margin in inches. + @param margin which margin to Get + @return the size of the margin + + + Sets the size of the margin in inches. + @param margin which margin to Get + @param size the size of the margin + + + Shifts all the page breaks in the range "count" number of rows/columns + @param breaks The page record to be shifted + @param start Starting "main" value to shift breaks + @param stop Ending "main" value to shift breaks + @param count number of units (rows/columns) to shift by + + + Sets a page break at the indicated row + @param row + + + Removes a page break at the indicated row + @param row + + + Queries if the specified row has a page break + @param row + @return true if the specified row has a page break + + + Queries if the specified column has a page break + + @return true if the specified column has a page break + + + Shifts the horizontal page breaks for the indicated count + @param startingRow + @param endingRow + @param count + + + Shifts the vertical page breaks for the indicated count + @param startingCol + @param endingCol + @param count + + +

+ HEADERFOOTER is new in 2007. Some apps seem to have scattered this record long after + the PageSettingsBlock where it belongs. + + +
+ + + This method reads PageSettingsBlock records from the supplied RecordStream until the first non-PageSettingsBlock record is encountered. + As each record is read, it is incorporated into this PageSettingsBlock. + + + + + Returns the HeaderRecord. + @return HeaderRecord for the sheet. + + + Returns the FooterRecord. + @return FooterRecord for the sheet. + + + Returns the PrintSetupRecord. + @return PrintSetupRecord for the sheet. + + + @return all the horizontal page breaks, never null + + + @return the number of row page breaks + + + @return all the column page breaks, never null + + + @return the number of column page breaks + + + holds any continue records found after the PLS record.
+ This would not be required if PLS was properly interpreted. + Currently, PLS is an {@link UnknownRecord} and does not automatically + include any trailing {@link ContinueRecord}s. +
+ + A wrapper for {@link RecordVisitor} which accumulates the sizes of all + records visited. + + + + @author andy + @author Jason Height (jheight at chariot dot net dot au) + + + Creates a new instance of ValueRecordsAggregate + + + @param rs record stream with all {@link SharedFormulaRecord} + {@link ArrayRecord}, {@link TableRecord} {@link MergeCellsRecord} Records removed + + + Handles UnknownRecords which appear within the row/cell records + + + Returns the number of physical rows within a block + + + Returns the physical row number of the first row in a block + + + Returns the physical row number of the end row in a block + + + Create a row record. + + @param row number + @return RowRecord Created for the passed in row number + @see org.apache.poi.hssf.record.RowRecord + + + Returns the number of row blocks. +

The row blocks are goupings of rows that contain the DBCell record + after them + + +

+ Manages various auxiliary records while constructing a RowRecordsAggregate + @author Josh Micich + +
+ + cached for optimization purposes + + + @param firstCells + @param recs list of sheet records (possibly Contains records for other parts of the Excel file) + @param startIx index of first row/cell record for current sheet + @param endIx one past index of last row/cell record for current sheet. It is important + that this code does not inadvertently collect SharedFormulaRecords from any other + sheet (which could happen if endIx is chosen poorly). (see bug 44449) + + + @param firstCell as extracted from the {@link ExpPtg} from the cell's formula. + @return never null + + + Gets the {@link SharedValueRecordBase} record if it should be encoded immediately after the + formula record Contained in the specified {@link FormulaRecordAggregate} agg. Note - the + shared value record always appears after the first formula record in the group. For arrays + and tables the first formula is always the in the top left cell. However, since shared + formula groups can be sparse and/or overlap, the first formula may not actually be in the + top left cell. + + @return the SHRFMLA, TABLE or ARRAY record for the formula cell, if it is the first cell of + a table or array region. null if the formula cell is not shared/array/table, + or if the specified formula is not the the first in the group. + + + Converts all {@link FormulaRecord}s handled by sharedFormulaRecord + to plain unshared formulas + + + Add specified Array Record. + + + Removes the {@link ArrayRecord} for the cell group containing the specified cell. + The caller should clear (set blank) all cells in the returned range. + @return the range of the array formula which was just removed. Never null. + + + @return the shared ArrayRecord identified by (firstRow, firstColumn). never null. + + + Coordinates of the first cell having a formula that uses this shared formula. + This is often but not always the top left cell in the range covered by + {@link #_sfr} + + + Note - the 'first cell' of a shared formula group is not always the top-left cell + of the enclosing range. + @return true if the specified coordinates correspond to the 'first cell' + of this shared formula group. + + + + Aggregate value records toGether. Things are easier to handle that way. + + @author andy + @author Glen Stampoultzis (glens at apache.org) + @author Jason Height (jheight at chariot dot net dot au) + + + Creates a new instance of ValueRecordsAggregate + + + Sometimes the shared formula flag "seems" to be erroneously Set, in which case there is no + call to SharedFormulaRecord.ConvertSharedFormulaRecord and hence the + ParsedExpression field of this FormulaRecord will not Get updated.
+ As it turns out, this is not a problem, because in these circumstances, the existing value + for ParsedExpression is perfectly OK.

+ + This method may also be used for Setting breakpoints to help diagnose Issues regarding the + abnormally-Set 'shared formula' flags. + (see TestValueRecordsAggregate.testSpuriousSharedFormulaFlag()).

+ + The method currently does nothing but do not delete it without Finding a nice home for this + comment. + + + Tallies a count of the size of the cell records + that are attached to the rows in the range specified. + + + Returns true if the row has cells attached to it + + + Serializes the cells that are allocated to a certain row range + + + ARRAY (0x0221)

+ + Treated in a similar way to SharedFormulaRecord + + @author Josh Micich + + + Common base class for {@link SharedFormulaRecord}, {@link ArrayRecord} and + {@link TableRecord} which are have similarities. + + @author Josh Micich + + + reads only the range (1 {@link CellRangeAddress8Bit}) from the stream + + + @return true if (rowIx, colIx) is within the range ({@link #Range}) + of this shared value object. + + + @return true if (rowIx, colIx) describes the first cell in this shared value + object's range ({@link #Range}) + + +

+ DOPER Structure for AutoFilter record + + author: Tony Qu +
+ + + get or set the RK record + + + + + Gets or sets Length of the string (the string is stored in the rgch field that follows the DOPER structures) + + + + + Whether the bBoolErr field contains a Boolean value + + + + + Whether the bBoolErr field contains a Error value + + + + + Get or sets the boolean value + + + + + Get or sets the boolean value + + + + Title: Backup Record + Description: bool specifying whether + the GUI should store a backup of the file. + REFERENCE: PG 287 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a BackupRecord and Sets its fields appropriately + @param in the RecordInputstream to Read the record from + + + Get the backup flag + + @return short 0/1 (off/on) + + + Read an unsigned short from the stream without decrypting + + + Read an unsigned short from the stream without decrypting + + + Title: Blank cell record + Description: Represents a column in a row with no value but with styling. + REFERENCE: PG 287 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Creates a new instance of BlankRecord + + + Constructs a BlankRecord and Sets its fields appropriately + @param in the RecordInputstream to Read the record from + + + called by the class that is responsible for writing this sucker. + Subclasses should implement this so that their data is passed back in a + byte array. + + @return byte array containing instance data + + + Get the row this cell occurs on + + @return the row + + + Get the column this cell defines within the row + + @return the column + + + Set the index of the extended format record to style this cell with + + @param xf - the 0-based index of the extended format + @see org.apache.poi.hssf.record.ExtendedFormatRecord + + + return the non static version of the id for this record. + + + Title: Beginning Of File + Description: Somewhat of a misnomer, its used for the beginning of a Set of + records that have a particular pupose or subject. + Used in sheets and workbooks. + REFERENCE: PG 289 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + for BIFF8 files the BOF is 0x809. For earlier versions see + {@link #biff2_sid} {@link #biff3_sid} {@link #biff4_sid} + {@link #biff5_sid} + + + suggested default (0x06 - BIFF8) + + + suggested default 0x10d3 + + + suggested default 0x07CC (1996) + + + suggested default for a normal sheet (0x41) + + + Constructs an empty BOFRecord with no fields Set. + + + Constructs a BOFRecord and Sets its fields appropriately + @param in the RecordInputstream to Read the record from + + + Version number - for BIFF8 should be 0x06 + @see #VERSION + @param version version to be Set + + + Set the history bit mask (not very useful) + @see #HISTORY_MASK + @param bitmask bitmask to Set for the history + + + Set the minimum version required to Read this file + + @see #VERSION + @param version version to Set + + + type of object this marks + @see #TYPE_WORKBOOK + @see #TYPE_VB_MODULE + @see #TYPE_WORKSHEET + @see #TYPE_CHART + @see #TYPE_EXCEL_4_MACRO + @see #TYPE_WORKSPACE_FILE + @return short type of object + + + Get the build that wrote this file + @see #BUILD + @return short build number of the generator of this file + + + Year of the build that wrote this file + @see #BUILD_YEAR + @return short build year of the generator of this file + + + Title: Save External Links record (BookBool) + Description: Contains a flag specifying whether the Gui should save externally + linked values from other workbooks. + REFERENCE: PG 289 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a BookBoolRecord and Sets its fields appropriately + @param in the RecordInputstream to Read the record from + + + Get the save ext links flag + + @return short 0/1 (off/on) + + + Creates new BoolErrRecord. + REFERENCE: PG ??? Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Michael P. Harhen + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Append specific debug info (used by {@link #toString()} for the value + contained in this record. Trailing new-line should not be Appended + (superclass does that). + + + writes out the value data for this cell record + + + get the index to the ExtendedFormat + + @see org.apache.poi.hssf.record.ExtendedFormatRecord + @return index to the XF record + + + Gets the debug info BIFF record type name (used by {@link #toString()}. + + + @return the size (in bytes) of the value data for this cell record + + + If true, this record represents an error cell value, otherwise this record represents a boolean cell value + + + Creates new BoolErrRecord + + + Constructs a BoolErr record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Set the bool value for the cell + + @param value representing the bool value + + + Set the error value for the cell + + @param value error representing the error value + this value can only be 0,7,15,23,29,36 or 42 + see bugzilla bug 16560 for an explanation + + + Get the value for the cell + + @return bool representing the bool value + + + Get the error value for the cell + + @return byte representing the error value + + + Indicates whether the call holds a boolean value + + @return boolean true if the cell holds a boolean value + + + Indicates whether the call holds an error value + + @return bool true if the cell holds an error value + + + Record for the bottom margin. + NOTE: This source was automatically generated. + + @author Shawn Laubach (slaubach at apache dot org) + + + The margin interface Is a parent used to define left, right, top and bottom margins. + This allows much of the code to be generic when it comes to handling margins. + NOTE: This source wass automatically generated. + + @author Shawn Laubach (slaubach at apache dot org) + + + Get the margin field for the Margin. + + + Constructs a BottomMargin record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Get the margin field for the BottomMargin record. + + + Title: Bound Sheet Record (aka BundleSheet) + Description: Defines a sheet within a workbook. Basically stores the sheetname + and tells where the Beginning of file record Is within the HSSF + file. + REFERENCE: PG 291 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Sergei Kozello (sergeikozello at mail.ru) + + + Constructs a BoundSheetRecord and Sets its fields appropriately + + @param in the RecordInputstream to Read the record from + + + Converts a List of {@link BoundSheetRecord}s to an array and sorts by the position of their + BOFs. + + + Get the offset in bytes of the Beginning of File Marker within the HSSF Stream part of the POIFS file + + @return offset in bytes + + + Is the sheet very hidden? Different from (normal) hidden + + + Get the sheetname for this sheet. (this appears in the tabs at the bottom) + @return sheetname the name of the sheet + + + Title: Calc Count Record + Description: Specifies the maximum times the gui should perform a formula + recalculation. For instance: in the case a formula includes + cells that are themselves a result of a formula and a value + Changes. This Is essentially a failsafe against an infinate + loop in the event the formulas are not independant. + REFERENCE: PG 292 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + @see org.apache.poi.hssf.record.CalcModeRecord + + + Constructs a CalcCountRecord and Sets its fields appropriately + @param in the RecordInputstream to Read the record from + + + + Get the number of iterations to perform + @return iterations + + + Title: Calc Mode Record + Description: Tells the gui whether to calculate formulas + automatically, manually or automatically + except for tables. + REFERENCE: PG 292 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + @see org.apache.poi.hssf.record.CalcCountRecord + + + manually calculate formulas (0) + + + automatically calculate formulas (1) + + + automatically calculate formulas except for tables (-1) + + + Constructs a CalcModeRecord and Sets its fields appropriately + @param in the RecordInputstream to Read the record from + + + Set the calc mode flag for formulas + + @see #MANUAL + @see #AUTOMATIC + @see #AUTOMATIC_EXCEPT_TABLES + + @param calcmode one of the three flags above + + + Get the calc mode flag for formulas + + @see #MANUAL + @see #AUTOMATIC + @see #AUTOMATIC_EXCEPT_TABLES + + @return calcmode one of the three flags above + + + Conditional Formatting Header record (CFHEADER) + + @author Dmitriy Kumshayev + + + Creates new CFHeaderRecord + + + Conditional Formatting Rule Record. + @author Dmitriy Kumshayev + + + Creates new CFRuleRecord + + + Creates a new comparison operation rule + + + Creates a new comparison operation rule + + + Creates a new comparison operation rule + + + @param ptgs may be null + @return encoded size of the formula + + + called by the class that Is responsible for writing this sucker. + Subclasses should implement this so that their data Is passed back in a + byte array. + + @param offset to begin writing at + @param data byte array containing instance data + @return number of bytes written + + + TODO - Parse conditional format formulas properly i.e. produce tRefN and tAreaN instead of tRef and tArea + this call will produce the wrong results if the formula Contains any cell references + One approach might be to apply the inverse of SharedFormulaRecord.ConvertSharedFormulas(Stack, int, int) + Note - two extra parameters (rowIx &colIx) will be required. They probably come from one of the Region objects. + + @return null if formula was null. + + + TODO - parse conditional format formulas properly i.e. produce tRefN and tAreaN instead of tRef and tArea + this call will produce the wrong results if the formula contains any cell references + One approach might be to apply the inverse of SharedFormulaRecord.convertSharedFormulas(Stack, int, int) + Note - two extra parameters (rowIx & colIx) will be required. They probably come from one of the Region objects. + + @return null if formula was null. + + + get the stack of the 1st expression as a list + + @return list of tokens (casts stack to a list and returns it!) + this method can return null is we are unable to create Ptgs from + existing excel file + callers should check for null! + + + get the stack of the 2nd expression as a list + + @return list of tokens (casts stack to a list and returns it!) + this method can return null is we are unable to create Ptgs from + existing excel file + callers should check for null! + + + Get the option flags + + @return bit mask + + + Border Formatting Block of the Conditional Formatting Rule Record. + + @author Dmitriy Kumshayev + + + Creates new FontFormatting + + + + Get the type of border to use for the left border of the cell + + + + + Get the type of border to use for the right border of the cell + + + + + Get the type of border to use for the top border of the cell + + + + + Get the type of border to use for the bottom border of the cell + + + + + Get the type of border to use for the diagonal border of the cell + + + + + Get the color to use for the left border + + + + + Get the color to use for the right border + + + + + Get the color to use for the top border + + + + + Get the color to use for the bottom border + + + + + Get the color to use for the diagonal border + + + + + true if forward diagonal is on + + + + + true if backward diagonal Is on + + + + + @author Dmitriy Kumshayev + + + first range is within the second range + + + first range encloses or is equal to the second + + + Intersect this range with the specified range. + + @param crB - the specified range + @return code which reflects how the specified range is related to this range.
+ Possible return codes are: + NO_INTERSECTION - the specified range is outside of this range;
+ OVERLAP - both ranges partially overlap;
+ INSIDE - the specified range is inside of this one
+ ENCLOSES - the specified range encloses (possibly exactly the same as) this range
+
+ + Do all possible cell merges between cells of the list so that: + if a cell range is completely inside of another cell range, it s removed from the list + if two cells have a shared border, merge them into one bigger cell range + @param cellRangeList + @return updated List of cell ranges + + + @return the new range(s) to replace the supplied ones. null if no merge is possible + + + ** + + + Check if the specified range is located inside of this cell range. + + @param crB + @return true if this cell range Contains the argument range inside if it's area + + + Check if the specified cell range has a shared border with the current range. + + @return true if the ranges have a complete shared border (i.e. + the two ranges toher make a simple rectangular region. + + + Create an enclosing CellRange for the two cell ranges. + + @return enclosing CellRange + + + @return true if a < b + + + @return true if a <= b + + + @return true if a > b + + + @return true if a >= b + + + Font Formatting Block of the Conditional Formatting Rule Record. + + @author Dmitriy Kumshayev + + + Normal boldness (not bold) + + + Bold boldness (bold) + + + Creates new FontFormatting + + + Gets the height of the font in 1/20th point Units + + @return fontheight (in points/20); or -1 if not modified + + + Get whether the font Is to be italics or not + + @return italics - whether the font Is italics or not + @see #GetAttributes() + + + Get whether the font Is to be stricken out or not + + @return strike - whether the font Is stricken out or not + @see #GetAttributes() + + + + Get or set the font weight for this font (100-1000dec or 0x64-0x3e8). + Default Is 0x190 for normal and 0x2bc for bold + + + + + Get or set whether the font weight is set to bold or not + + + + Get the type of base or subscript for the font + + @return base or subscript option + @see org.apache.poi.hssf.usermodel.HSSFFontFormatting#SS_NONE + @see org.apache.poi.hssf.usermodel.HSSFFontFormatting#SS_SUPER + @see org.apache.poi.hssf.usermodel.HSSFFontFormatting#SS_SUB + + + Get the type of Underlining for the font + + @return font Underlining type + + + Pattern Formatting Block of the Conditional Formatting Rule Record. + + @author Dmitriy Kumshayev + + + Creates new FontFormatting + + + Get the Fill pattern + @return Fill pattern + + + Get the background Fill color + @see org.apache.poi.hssf.usermodel.HSSFPalette#GetColor(short) + @return Fill color + + + Get the foreground Fill color + @see org.apache.poi.hssf.usermodel.HSSFPalette#GetColor(short) + @return Fill color + + + * The area format record is used to define the colours and patterns for an area. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a AreaFormat record and s its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + the foreground color field for the AreaFormat record. + + + the background color field for the AreaFormat record. + + + the pattern field for the AreaFormat record. + + + the format flags field for the AreaFormat record. + + + the forecolor index field for the AreaFormat record. + + + the backcolor index field for the AreaFormat record. + + + automatic formatting + @return the automatic field value. + + + swap foreground and background colours when data is negative + @return the invert field value. + + + * The area record is used to define a area chart. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a Area record and s its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + the format flags field for the Area record. + + + series is stacked + @return the stacked field value. + + + results Displayed as percentages + @return the Display as percentage field value. + + + Display a shadow for the chart + @return the shadow field value. + + + * The axis size and location + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a AxisParent record and s its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + the axis type field for the AxisParent record. + + @return One of + AXIS_TYPE_MAIN + AXIS_TYPE_SECONDARY + + + the x field for the AxisParent record. + + + the y field for the AxisParent record. + + + the width field for the AxisParent record. + + + the height field for the AxisParent record. + + + * The axis record defines the type of an axis. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a Axis record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the axis type field for the Axis record. + + @return One of + AXIS_TYPE_CATEGORY_OR_X_AXIS + AXIS_TYPE_VALUE_AXIS + AXIS_TYPE_SERIES_AXIS + + + Get the reserved1 field for the Axis record. + + + Get the reserved2 field for the Axis record. + + + Get the reserved3 field for the Axis record. + + + Get the reserved4 field for the Axis record. + + + * The bar record is used to define a bar chart. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a Bar record and s its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + the bar space field for the Bar record. + + + the category space field for the Bar record. + + + the format flags field for the Bar record. + + + true to Display horizontal bar charts, false for vertical + @return the horizontal field value. + + + stack Displayed values + @return the stacked field value. + + + Display chart values as a percentage + @return the Display as percentage field value. + + + Display a shadow for the chart + @return the shadow field value. + + + The begin record defines the start of a block of records for a (grpahing + data object. This record is matched with a corresponding EndRecord. + + @see EndRecord + + @author Glen Stampoultzis (glens at apache.org) + + + Constructs a BeginRecord record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + CATLAB - Category Labels (0x0856)
+ + @author Patrick Cheng +
+ + ENDBLOCK - Chart Future Record Type End Block (0x0853)
+ + @author Patrick Cheng +
+ + ENDOBJECT - Chart Future Record Type End Object (0x0855)
+ + @author Patrick Cheng +
+ + Class ChartFormatRecord + + + @author Glen Stampoultzis (glens at apache.org) + @version %I%, %G% + + + Constructs a ChartFormatRecord record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + + The ChartFrtInfo record specifies the versions of the application that originally created and last saved the file. + + + + * The chart record is used to define the location and size of a chart. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a Chart record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the x field for the Chart record. + + + Get the y field for the Chart record. + + + Get the width field for the Chart record. + + + Get the height field for the Chart record. + + + STARTBLOCK - Chart Future Record Type Start Block (0x0852)
+ + @author Patrick Cheng +
+ + STARTOBJECT - Chart Future Record Type Start Object (0x0854)
+ + @author Patrick Cheng +
+ + + The CrtLink record is written but unused. + + + + * The data format record is used to index into a series. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a DataFormat record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the point number field for the DataFormat record. + + + Get the series index field for the DataFormat record. + + + Get the series number field for the DataFormat record. + + + Get the format flags field for the DataFormat record. + + + Set true to use excel 4 colors. + @return the use excel 4 colors field value. + + + DATALABEXT - Chart Data Label Extension (0x086A)
+ + @author Patrick Cheng +
+ + * The dat record is used to store options for the chart. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a Dat record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Sets the horizontal border field value. + has a horizontal border + + + has a horizontal border + @return the horizontal border field value. + + + Sets the vertical border field value. + has vertical border + + + has vertical border + @return the vertical border field value. + + + Sets the border field value. + data table has a border + + + data table has a border + @return the border field value. + + + Sets the show series key field value. + shows the series key + + + shows the series key + @return the show series key field value. + + + Size of record (exluding 4 byte header) + + + Get the options field for the Dat record. + + + The end record defines the end of a block of records for a (Graphing) + data object. This record is matched with a corresponding BeginRecord. + + @see BeginRecord + + @author Glen Stampoultzis (glens at apache.org) + + + Constructs a EndRecord record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + * The font basis record stores various font metrics. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a FontBasis record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the x Basis field for the FontBasis record. + + + Get the y Basis field for the FontBasis record. + + + Get the height basis field for the FontBasis record. + + + Get the scale field for the FontBasis record. + + + Get the index to font table field for the FontBasis record. + + + * The frame record indicates whether there is a border around the Displayed text of a chart. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a Frame record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the border type field for the Frame record. + + @return One of + BORDER_TYPE_REGULAR + BORDER_TYPE_SHADOW + + + Get the options field for the Frame record. + + + excel calculates the size automatically if true + @return the auto size field value. + + + excel calculates the position automatically + @return the auto position field value. + + + * Defines a legend for a chart. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Andrew C. Oliver (acoliver at apache.org) + + + Constructs a Legend record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the x axis upper left field for the Legend record. + + + Get the y axis upper left field for the Legend record. + + + Get the x size field for the Legend record. + + + Get the y size field for the Legend record. + + + Get the type field for the Legend record. + + @return One of + TYPE_BOTTOM + TYPE_CORNER + TYPE_TOP + TYPE_RIGHT + TYPE_LEFT + TYPE_UNDOCKED + + + Get the spacing field for the Legend record. + + @return One of + SPACING_CLOSE + SPACING_MEDIUM + SPACING_OPEN + + + Get the options field for the Legend record. + + + automatic positioning (1=docked) + @return the auto position field value. + + + excel 5 only (true) + @return the auto series field value. + + + position of legend on the x axis is automatic + @return the auto x positioning field value. + + + position of legend on the y axis is automatic + @return the auto y positioning field value. + + + vertical or horizontal legend (1 or 0 respectively). Always 0 if not automatic. + @return the vertical field value. + + + 1 if chart Contains data table + @return the data table field value. + + + * Describes a line format record. The line format record controls how a line on a chart appears. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a LineFormat record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the line color field for the LineFormat record. + + + Get the line pattern field for the LineFormat record. + + @return One of + LINE_PATTERN_SOLID + LINE_PATTERN_DASH + LINE_PATTERN_DOT + LINE_PATTERN_DASH_DOT + LINE_PATTERN_DASH_DOT_DOT + LINE_PATTERN_NONE + LINE_PATTERN_DARK_GRAY_PATTERN + LINE_PATTERN_MEDIUM_GRAY_PATTERN + LINE_PATTERN_LIGHT_GRAY_PATTERN + + + Get the weight field for the LineFormat record. + specifies the thickness of the line. + @return One of + WEIGHT_HAIRLINE + WEIGHT_NARROW + WEIGHT_MEDIUM + WEIGHT_WIDE + + + Get the format field for the LineFormat record. + + + Get the colour palette index field for the LineFormat record. + + + automatic format + @return the auto field value. + + + draw tick marks + @return the draw ticks field value. + + + book marks this as reserved = 0 but it seems to do something + @return the Unknown field value. + + + * The number format index record indexes format table. This applies to an axis. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a NumberFormatIndex record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the format index field for the NumberFormatIndex record. + + + * Links text to an object on the chart or identifies it as the title. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Andrew C. Oliver (acoliver at apache.org) + + + Constructs a ObjectLink record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the anchor id field for the ObjectLink record. + + @return One of + ANCHOR_ID_CHART_TITLE + ANCHOR_ID_Y_AXIS + ANCHOR_ID_X_AXIS + ANCHOR_ID_SERIES_OR_POINT + ANCHOR_ID_Z_AXIS + + + Get the link 1 field for the ObjectLink record. + + + Get the link 2 field for the ObjectLink record. + + + * preceeds and identifies a frame as belonging to the plot area. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Andrew C. Oliver (acoliver at apache.org) + + + Constructs a PlotArea record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + * The plot growth record specifies the scaling factors used when a font is scaled. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a PlotGrowth record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the horizontalScale field for the PlotGrowth record. + + + Get the verticalScale field for the PlotGrowth record. + + + + pecifies positioning mode for position information saved in a Pos record. + + + + + Relative position to the chart, in points. + + + + + Absolute width and height in points. It can only be applied to the mdBotRt field of Pos. + + + + + Owner of Pos determines how to interpret the position data. + + + + + Offset to default position, in 1/1000th of the plot area size. + + + + + Relative position to the chart, in SPRC. + + + + + specifies the size and position for a legend, an attached label, or the plot area, as specified by the primary axis group. + + + + + specifies the positioning mode for the upper-left corner of a legend, an attached label, or the plot area. + + + + + specifies the positioning mode for the lower-right corner of a legend, an attached label, or the plot area + + + + + specifies a position. The meaning is specified in the earlier table showing the valid combinations mdTopLt and mdBotRt by type. + + + + + specifies a width. The meaning is specified in the earlier table showing the valid combinations mdTopLt and mdBotRt by type. + + + + + specifies a position. The meaning is specified in the earlier table showing the valid combinations mdTopLt and mdBotRt by type. + + + + + specifies a height. The meaning is specified in the earlier table showing the valid combinations mdTopLt and mdBotRt by type. + + + + * The series chart Group index record stores the index to the CHARTFORMAT record (0 based). + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a SeriesChartGroupIndex record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the chart Group index field for the SeriesChartGroupIndex record. + + + * links a series to its position in the series list. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Andrew C. Oliver (acoliver at apache.org) + + + Constructs a SeriesIndex record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the index field for the SeriesIndex record. + + + * The series label record defines the type of label associated with the data format record. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a SeriesLabels record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the format flags field for the SeriesLabels record. + + + show actual value of the data point + @return the show actual field value. + + + show value as percentage of total (pie charts only) + @return the show percent field value. + + + show category label/value as percentage (pie charts only) + @return the label as percentage field value. + + + show smooth line + @return the smoothed line field value. + + + Display category label + @return the show label field value. + + + ?? + @return the show bubble sizes field value. + + + * The series list record defines the series Displayed as an overlay to the main chart record. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a SeriesList record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the series numbers field for the SeriesList record. + + + * The series record describes the overall data for a series. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a Series record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the category data type field for the Series record. + + @return One of + CATEGORY_DATA_TYPE_DATES + CATEGORY_DATA_TYPE_NUMERIC + CATEGORY_DATA_TYPE_SEQUENCE + CATEGORY_DATA_TYPE_TEXT + + + Get the values data type field for the Series record. + + @return One of + VALUES_DATA_TYPE_DATES + VALUES_DATA_TYPE_NUMERIC + VALUES_DATA_TYPE_SEQUENCE + VALUES_DATA_TYPE_TEXT + + + Get the num categories field for the Series record. + + + Get the num values field for the Series record. + + + Get the bubble series type field for the Series record. + + @return One of + BUBBLE_SERIES_TYPE_DATES + BUBBLE_SERIES_TYPE_NUMERIC + BUBBLE_SERIES_TYPE_SEQUENCE + BUBBLE_SERIES_TYPE_TEXT + + + Get the num bubble values field for the Series record. + + + * Defines a series name + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Andrew C. Oliver (acoliver at apache.org) + + + the actual text cannot be longer than 255 characters + + + Constructs a SeriesText record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the id field for the SeriesText record. + + + Get the text field for the SeriesText record. + + + * Indicates the chart-group index for a series. The order probably defines the mapping. So the 0th record probably means the 0th series. The only field in this of course defines which chart Group the 0th series (for instance) would map to. Confusing? Well thats because it Is. (p 522 BCG) + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Andrew C. Oliver (acoliver at apache.org) + + + Constructs a SeriesToChartGroup record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the chart Group index field for the SeriesToChartGroup record. + + + + Section [2.4.324]. The Text record specifies the properties of an attached label and specifies the beginning of + a collection of records as defined by the chart sheet substream ABNF. This collection of records specifies an attached label. + + + + + Left-alignment if iReadingOrder specifies left-to-right reading order; otherwise, right-alignment + + + + + Center-alignment + + + + + Right-alignment if iReadingOrder specifies left-to-right reading order; otherwise, left-alignment + + + + + Justify-alignment + + + + + distributed alignment + + + + + distributed alignment + + + + + Transparent background + + + + + Opaque background + + + + Constructs a Text record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the horizontal alignment field for the Text record. + + @return One of + HORIZONTAL_ALIGNMENT_LEFT + HORIZONTAL_ALIGNMENT_CENTER + HORIZONTAL_ALIGNMENT_BOTTOM + HORIZONTAL_ALIGNMENT_JUSTIFY + + + Get the vertical alignment field for the Text record. + + @return One of + VERTICAL_ALIGNMENT_TOP + VERTICAL_ALIGNMENT_CENTER + VERTICAL_ALIGNMENT_BOTTOM + VERTICAL_ALIGNMENT_JUSTIFY + + + Get the Display mode field for the Text record. + + @return One of + DISPLAY_MODE_TRANSPARENT + DISPLAY_MODE_OPAQUE + + + Get the rgbColor field for the Text record. + + + Get the x field for the Text record. + + + Get the y field for the Text record. + + + Set the width field for the Text record. + + + Get the height field for the Text record. + + + Get the options1 field for the Text record. + + + Get the index of color value field for the Text record. + + + Get the options2 field for the Text record. + + + Get the text rotation field for the Text record. + + + true = automaticly selected colour, false = user-selected + @return the auto color field value. + + + true = draw legend + @return the show key field value. + + + false = text is category label + @return the show value field value. + + + + @return the auto generated text field value. + + + + @return the generated field value. + + + + @return the auto label deleted field value. + + + + @return the auto background field value. + + + + @return the show category label as percentage field value. + + + + @return the show value as percentage field value. + + + + @return the show bubble sizes field value. + + + + @return the show label field value. + + + + @return the data label placement field value. + + + * The Tick record defines how tick marks and label positioning/formatting + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Andrew C. Oliver(acoliver at apache.org) + + + Constructs a Tick record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the major tick type field for the Tick record. + + + Get the minor tick type field for the Tick record. + + + Get the label position field for the Tick record. + + + Get the background field for the Tick record. + + + Get the label color rgb field for the Tick record. + + + Get the zero 1 field for the Tick record. + + + Get the zero 2 field for the Tick record. + + + Get the options field for the Tick record. + + + Get the tick color field for the Tick record. + + + Get the zero 3 field for the Tick record. + + + use the quote Unquote automatic color for text + @return the auto text color field value. + + + use the quote Unquote automatic color for text background + @return the auto text background field value. + + + rotate text (0=none, 1=normal, 2=90 degrees counterclockwise, 3=90 degrees clockwise) + @return the rotation field value. + + + automatically rotate the text + @return the autorotate field value. + + + * The Units record describes Units. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a Units record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the Units field for the Units record. + + + * The value range record defines the range of the value axis. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a ValueRange record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the minimum axis value field for the ValueRange record. + + + Get the maximum axis value field for the ValueRange record. + + + Get the major increment field for the ValueRange record. + + + Get the minor increment field for the ValueRange record. + + + Get the category axis cross field for the ValueRange record. + + + Get the options field for the ValueRange record. + + + automatic minimum value selected + @return the automatic minimum field value. + + + automatic maximum value selected + @return the automatic maximum field value. + + + automatic major Unit selected + @return the automatic major field value. + + + automatic minor Unit selected + @return the automatic minor field value. + + + category crossing point is automatically selected + @return the automatic category crossing field value. + + + use logarithmic scale + @return the logarithmic scale field value. + + + values are reverses in graph + @return the values in reverse field value. + + + category axis to cross at maximum value + @return the cross category axis at maximum field value. + + + reserved, must equal 1 (excel dev. guide says otherwise) + @return the reserved field value. + + + Title: Codepage Record +

Description: the default characterset. for the workbook

+

REFERENCE: PG 293 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)

+

Use {@link CodePageUtil} to turn these values into Java code pages + to encode/decode strings.

+ @version 2.0-pre +
+ + Excel 97+ (Biff 8) should always store strings as UTF-16LE or + compressed versions of that. As such, this should always be + 0x4b0 = UTF_16, except for files coming from older versions. + + + Constructs a CodepageRecord and Sets its fields appropriately + @param in the RecordInputstream to Read the record from + + + Get the codepage for this workbook + + @see #CODEPAGE + @return codepage - the codepage to Set + + + Title: COLINFO Record

+ Description: Defines with width and formatting for a range of columns

+ REFERENCE: PG 293 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)

+ @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a ColumnInfo record and Sets its fields appropriately + @param in the RecordInputstream to Read the record from + + + @return true if the format, options and column width match + + + Get the first column this record defines formatting info for + @return the first column index (0-based) + + + Get the last column this record defines formatting info for + @return the last column index (0-based) + + + Get the columns' width in 1/256 of a Char width + @return column width + + + Get the columns' default format info + @return the extended format index + @see org.apache.poi.hssf.record.ExtendedFormatRecord + + + Get the options bitfield - use the bitSetters instead + @return the bitfield raw value + + + Get whether or not these cells are hidden + @return whether the cells are hidden. + @see #SetOptions(short) + + + Get the outline level for the cells + @see #SetOptions(short) + @return outline level for the cells + + + Get whether the cells are collapsed + @return wether the cells are collapsed + @see #SetOptions(short) + + + Class POIFSWriterEvent + + @author Marc Johnson (mjohnson at apache dot org) + @version %I%, %G% + + + namespace scoped constructor + + @param stream the DocumentOutputStream, freshly opened + @param path the path of the document + @param documentName the name of the document + @param limit the limit, in bytes, that can be written to the + stream + + + @return the DocumentOutputStream, freshly opened + + + @return the document's path + + + @return the document's name + + + @return the limit on writing, in bytes + + +

+ EventArgs for POIFSWriter + author: Tony Qu + +
+ + + Initializes a new instance of the class. + + the POIFSDocumentWriter, freshly opened + the path of the document + the name of the document + the limit, in bytes, that can be written to the stream + + + + Gets the limit on writing, in bytes + + The limit. + + + + Gets the document's name + + The name. + + + + Gets the document's path + + The path. + + + + the POIFSDocumentWriter, freshly opened + + The stream. + + + Interface POIFSWriterListener + + @author Marc Johnson (mjohnson at apache dot org) + @version %I%, %G% + + + Process a POIFSWriterEvent that this listener had registered + for + + @param event the POIFSWriterEvent + + + + This abstract class describes a way to read, store, chain + and free a series of blocks (be they Big or Small ones) + + + + + Returns the size of the blocks managed through the block store. + + + + + + Load the block at the given offset. + + + + + + + Extends the file if required to hold blocks up to + the specified offset, and return the block from there. + + + + + + + Returns the BATBlock that handles the specified offset, + and the relative index within it + + + + + + + Works out what block follows the specified one. + + + + + + + Changes the record of what block follows the specified one. + + + + + + + Finds a free block, and returns its offset. + This method will extend the file/stream if needed, and if doing + so, allocate new FAT blocks to address the extra space. + + + + + + Creates a Detector for loops in the chain + + + + + + Used to detect if a chain has a loop in it, so + we can bail out with an error rather than + spinning away for ever... + + + + This class provides methods to read a DocumentEntry managed by a + {@link POIFSFileSystem} or {@link NPOIFSFileSystem} instance. + It Creates the appropriate one, and delegates, allowing us to + work transparently with the two. + + + returned by read operations if we're at end of document + + + For use by downstream implementations + + + Create an InputStream from the specified DocumentEntry + + @param document the DocumentEntry to be read + + @exception IOException if the DocumentEntry cannot be opened (like, maybe it has + been deleted?) + + + Create an InputStream from the specified Document + + @param document the Document to be read + + + Create an InputStream from the specified Document + + @param document the Document to be read + + + Tests if this input stream supports the mark and reset methods. + + @return true always + + + Repositions this stream to the position at the time the mark() method was + last called on this input stream. If mark() has not been called this + method repositions the stream to its beginning. + + + This class provides a wrapper over an OutputStream so that Document + Writers can't accidently go over their size limits + + @author Marc Johnson (mjohnson at apache dot org) + + + Create a DocumentOutputStream + + @param stream the OutputStream to which the data is actually + read + @param limit the maximum number of bytes that can be written + + + Writes the specified byte to this output stream. The general + contract for write is that one byte is written to the output + stream. The byte to be written is the eight low-order bits of + the argument b. The 24 high-order bits of b are ignored. + + @param b the byte. + @exception IOException if an I/O error occurs. In particular, + an IOException may be thrown if the + output stream has been closed, or if the + Writer tries to write too much data. + + + Writes b.Length bytes from the specified byte array + to this output stream. + + @param b the data. + @exception IOException if an I/O error occurs. + + + + Writes len bytes from the specified byte array starting at + offset off to this output stream. The general contract for + Write(b, off, len) is that some of the bytes in the array b are + written to the output stream in order; element b[off] is the + first byte written and b[off+len-1] is the last byte written by + this operation. + + the data. + the start offset in the data. + the number of bytes to Write. + + + + Flushes this output stream and forces any buffered output bytes to be written out + + + + Closes this output stream and releases any system resources + associated with this stream. The general contract of close is + that it closes the output stream. A closed stream cannot + perform output operations and cannot be reopened. + + @exception IOException if an I/O error occurs. + + + write the rest of the document's data (fill in at the end) + + @param totalLimit the actual number of bytes the corresponding + document must fill + @param fill the byte to fill remaining space with + + @exception IOException on I/O error + + + This class provides methods to read a DocumentEntry managed by a + {@link NPOIFSFileSystem} instance. + + + current offset into the Document + + + current block count + + + current marked offset into the Document (used by mark and Reset) + + + and the block count for it + + + the Document's size + + + have we been closed? + + + the actual Document + + + Create an InputStream from the specified DocumentEntry + + @param document the DocumentEntry to be read + + @exception IOException if the DocumentEntry cannot be opened (like, maybe it has + been deleted?) + + + Create an InputStream from the specified Document + + @param document the Document to be read + + + Repositions this stream to the position at the time the mark() method was + last called on this input stream. If mark() has not been called this + method repositions the stream to its beginning. + + + This class manages a document in the NIO POIFS filesystem. + This is the {@link NPOIFSFileSystem} version. + + + + Interface for a drill-down viewable object. Such an object has + content that may or may not be displayed, at the discretion of the + viewer. The content is returned to the viewer as an array or as an + Iterator, and the object provides a clue as to which technique the + viewer should use to get its content. + A POIFSViewable object is also expected to provide a short + description of itself, that can be used by a viewer when the + viewable object is collapsed. + @author Marc Johnson (mjohnson at apache dot org) + + + + + Provides a short description of the object to be used when a + POIFSViewable object has not provided its contents. + + true if [prefer array]; otherwise, false. + + + + Gets the short description. + + The short description. + + + + Get an array of objects, some of which may implement POIFSViewable + + The viewable array. + + + + Give viewers a hint as to whether to call ViewableArray or ViewableIterator + + The viewable iterator. + + + Constructor for an existing Document + + + Constructor for an existing Document + + + Constructor for a new Document + + @param name the name of the POIFSDocument + @param stream the InputStream we read data from + + + Frees the underlying stream and property + + + Get an array of objects, some of which may implement POIFSViewable + + @return an array of Object; may not be null, but may be empty + + + Get an Iterator of objects, some of which may implement POIFSViewable + + @return an Iterator; may not be null, but may have an empty back end + store + + + Provides a short description of the object, to be used when a + POIFSViewable object has not provided its contents. + + @return short description + + + @return size of the document + + + @return the instance's DocumentProperty + + + This is the main class of the POIFS system; it manages the entire + life cycle of the filesystem. + This is the new NIO version + + + Convenience method for clients that want to avoid the auto-close behaviour of the constructor. + + + What big block size the file uses. Most files + use 512 bytes, but a few use 4096 + + + Constructor, intended for writing + + +

Creates a POIFSFileSystem from a File. This uses less memory than + creating from an InputStream.

+ +

Note that with this constructor, you will need to call {@link #close()} + when you're done to have the underlying file closed, as the file is + kept open during normal operation to read the data out.

+ + @param file the File from which to read or read/write the data + @param readOnly whether the POIFileSystem will only be used in read-only mode + + @exception IOException on errors reading, or on invalid data +
+ + *

Creates a POIFSFileSystem from an open FileChannel. This uses + * less memory than creating from an InputStream. The stream will + * be used in read-only mode.

+ * + *

Note that with this constructor, you will need to call {@link #close()} + * when you're done to have the underlying Channel closed, as the channel is + * kept open during normal operation to read the data out.

+ * + * @param channel the FileChannel from which to read the data + * + * @exception IOException on errors reading, or on invalid data +
+ +

Creates a POIFSFileSystem from an open FileChannel. This uses + less memory than creating from an InputStream.

+ +

Note that with this constructor, you will need to call {@link #close()} + when you're done to have the underlying Channel closed, as the channel is + kept open during normal operation to read the data out.

+ + @param channel the FileChannel from which to read or read/write the data + @param readOnly whether the POIFileSystem will only be used in read-only mode + + @exception IOException on errors reading, or on invalid data +
+ + Create a POIFSFileSystem from an InputStream. Normally the stream is read until + EOF. The stream is always closed.

+ + Some streams are usable After reaching EOF (typically those that return true + for markSupported()). In the unlikely case that the caller has such a stream + and needs to use it After this constructor completes, a work around is to wrap the + stream in order to trap the close() call. A convenience method ( + CreateNonClosingInputStream()) has been provided for this purpose: +

+             InputStream wrappedStream = POIFSFileSystem.CreateNonClosingInputStream(is);
+             HSSFWorkbook wb = new HSSFWorkbook(wrappedStream);
+             is.Reset();
+             doSomethingElse(is);
+             
+ Note also the special case of MemoryStream for which the close() + method does nothing. +
+             MemoryStream bais = ...
+             HSSFWorkbook wb = new HSSFWorkbook(bais); // calls bais.Close() !
+             bais.Reset(); // no problem
+             doSomethingElse(bais);
+             
+ + @param stream the InputStream from which to read the data + + @exception IOException on errors Reading, or on invalid data +
+ + @param stream the stream to be closed + @param success false if an exception is currently being thrown in the calling method + + + Checks that the supplied InputStream (which MUST + support mark and reset, or be a PushbackInputStream) + has a POIFS (OLE2) header at the start of it. + If your InputStream does not support mark / reset, + then wrap it in a PushBackInputStream, then be + sure to always use that, and not the original! + @param inp An InputStream which supports either mark/reset, or is a PushbackInputStream + + + Checks if the supplied first 8 bytes of a stream / file + has a POIFS (OLE2) header. + + + Read and process the PropertiesTable and the + FAT / XFAT blocks, so that we're Ready to + work with the file + + + Load the block at the given offset. + + + Load the block at the given offset, + extending the file if needed + + + Returns the BATBlock that handles the specified offset, + and the relative index within it + + + Works out what block follows the specified one. + + + Changes the record of what block follows the specified one. + + + Finds a free block, and returns its offset. + This method will extend the file if needed, and if doing + so, allocate new FAT blocks to Address the extra space. + + + Returns the MiniStore, which performs a similar low + level function to this, except for the small blocks. + + + add a new POIFSDocument to the FileSytem + + @param document the POIFSDocument being Added + + + add a new DirectoryProperty to the FileSystem + + @param directory the DirectoryProperty being Added + + + Create a new document to be Added to the root directory + + @param stream the InputStream from which the document's data + will be obtained + @param name the name of the new POIFSDocument + + @return the new DocumentEntry + + @exception IOException on error creating the new POIFSDocument + + + create a new DocumentEntry in the root entry; the data will be + provided later + + @param name the name of the new DocumentEntry + @param size the size of the new DocumentEntry + @param Writer the Writer of the new DocumentEntry + + @return the new DocumentEntry + + @exception IOException + + + create a new DirectoryEntry in the root directory + + @param name the name of the new DirectoryEntry + + @return the new DirectoryEntry + + @exception IOException on name duplication + + + Write the filesystem out to the open file. Will thrown an + {@link ArgumentException} if opened from an + {@link InputStream}. + + @exception IOException thrown on errors writing to the stream + + + Write the filesystem out + + @param stream the OutputStream to which the filesystem will be + written + + @exception IOException thrown on errors writing to the stream + + + Has our in-memory objects write their state + to their backing blocks + + + Closes the FileSystem, freeing any underlying files, streams + and buffers. After this, you will be unable to read or + write from the FileSystem. + + + open a document in the root entry's list of entries + + @param documentName the name of the document to be opened + + @return a newly opened DocumentInputStream + + @exception IOException if the document does not exist or the + name is that of a DirectoryEntry + + + remove an entry + + @param entry to be Removed + + + Get an array of objects, some of which may implement + POIFSViewable + + @return an array of Object; may not be null, but may be empty + + + Get an Iterator of objects, some of which may implement + POIFSViewable + + @return an Iterator; may not be null, but may have an empty + back end store + + + Provides a short description of the object, to be used when a + POIFSViewable object has not provided its contents. + + @return short description + + + @return The Big Block size, normally 512 bytes, sometimes 4096 bytes + + + @return The Big Block size, normally 512 bytes, sometimes 4096 bytes + + + For unit Testing only! Returns the underlying + properties table + + + Get the root entry + + @return the root entry + + + This class handles the MiniStream (small block store) + in the NIO case for {@link NPOIFSFileSystem} + + + Load the block at the given offset. + + + Load the block, extending the underlying stream if needed + + + Returns the BATBlock that handles the specified offset, + and the relative index within it + + + Works out what block follows the specified one. + + + Changes the record of what block follows the specified one. + + + Finds a free block, and returns its offset. + This method will extend the file if needed, and if doing + so, allocate new FAT blocks to Address the extra space. + + + Writes the SBATs to their backing blocks + + + This handles Reading and writing a stream within a + {@link NPOIFSFileSystem}. It can supply an iterator + to read blocks, and way to write out to existing and + new blocks. + Most users will want a higher level version of this, + which deals with properties to track which stream + this is. + This only works on big block streams, it doesn't + handle small block ones. + This uses the new NIO code + + TODO Implement a streaming write method, and append + + + Constructor for an existing stream. It's up to you + to know how to Get the start block (eg from a + {@link HeaderBlock} or a {@link Property}) + + + Constructor for a new stream. A start block won't + be allocated until you begin writing to it. + + + What block does this stream start at? + Will be {@link POIFSConstants#END_OF_CHAIN} for a + new stream that hasn't been written to yet. + + + Returns an iterator that'll supply one {@link ByteBuffer} + per block in the stream. + + + Updates the contents of the stream to the new + Set of bytes. + Note - if this is property based, you'll still + need to update the size in the property yourself + + + Frees all blocks in the stream + + + This class provides methods to read a DocumentEntry managed by a + {@link POIFSFileSystem} instance. + + @author Marc Johnson (mjohnson at apache dot org) + + + current offset into the Document + + + current marked offset into the Document (used by mark and Reset) + + + the Document's size + + + have we been closed? + + + the actual Document + + + the data block Containing the current stream pointer + + + Create an InputStream from the specified DocumentEntry + + @param document the DocumentEntry to be read + + @exception IOException if the DocumentEntry cannot be opened (like, maybe it has + been deleted?) + + + Create an InputStream from the specified Document + + @param document the Document to be read + + + Repositions this stream to the position at the time the mark() method was + last called on this input stream. If mark() has not been called this + method repositions the stream to its beginning. + + + + This class manages a document in the POIFS filesystem. + @author Marc Johnson (mjohnson at apache dot org) + + + + + This interface defines behaviors for objects managed by the Block + Allocation Table (BAT). + @author Marc Johnson (mjohnson at apache dot org) + + + + + Gets the number of BigBlock's this instance uses + + count of BigBlock instances + + + + Sets the start block for this instance + + index into the array of BigBlock instances making up the the filesystem + + + + An interface for persisting block storage of POIFS components. + @author Marc Johnson (mjohnson at apache dot org) + + + + + Writes the blocks. + + The stream. + + + + Initializes a new instance of the class. + + the name of the POIFSDocument + the InputStream we read data from + + + + Constructor from small blocks + + the name of the POIFSDocument + the small blocks making up the POIFSDocument + the actual length of the POIFSDocument + + + + read data from the internal stores + + the buffer to write to + the offset into our storage to read from + + + + Writes the blocks. + + The stream. + + + + Gets the number of BigBlock's this instance uses + + count of BigBlock instances + + + + Gets the document property. + + The document property. + + + + Provides a short description of the object to be used when a + POIFSViewable object has not provided its contents. + + true if [prefer array]; otherwise, false. + + + + Gets the short description. + + The short description. + + + + Gets the size. + + The size. + + + + Gets the small blocks. + + The small blocks. + + + + Sets the start block for this instance + + + index into the array of BigBlock instances making up the the filesystem + + + + + Get an array of objects, some of which may implement POIFSViewable + + The viewable array. + + + + Give viewers a hint as to whether to call ViewableArray or ViewableIterator + + The viewable iterator. + + + + A POIFS backed by a byte array. + + + + + Common definition of how we read and write bytes + + + + + Close the underlying stream + + + + + Copies the contents to the specified Stream + + + + + + A POIFS DataSource backed by a File + TODO - Return the ByteBuffers in such a way that in RW mode, + changes to the buffer end up on the disk (will fix the HPSF TestWrite + currently failing unit test when done) + + + + + Reads a sequence of bytes from this FileStream starting at the given file position. + + + The file position at which the transfer is to begin; + + + + + Writes a sequence of bytes to this FileStream from the given Stream, + starting at the given file position. + + The Stream from which bytes are to be transferred + The file position at which the transfer is to begin; + must be non-negative + + + Prepare to be written + + + + The block containing the archive header + @author Marc Johnson (mjohnson at apache dot org) + + + + + Constants used in reading/writing the Header block + @author Marc Johnson (mjohnson at apache dot org) + + + + What big block Size the file uses. Most files + use 512 bytes, but a few use 4096 + + + Number of small block allocation table blocks (int) + (Number of MiniFAT Sectors in Microsoft parlance) + + + + create a new HeaderBlockReader from an Stream + + the source Stream + + + + Alerts the short read. + + The read. + The expected size. + + + + Get start of Property Table + + the index of the first block of the Property Table + + + + Gets start of small block allocation table + + The SBAT start. + + + + Gets number of BAT blocks + + The BAT count. + + + + Gets the BAT array. + + The BAT array. + + + + Gets the XBAT count. + + The XBAT count. + @return XBAT count + + + + Gets the index of the XBAT. + + The index of the XBAT. + + + + Gets The Big Block Size, normally 512 bytes, sometimes 4096 bytes + + The size of the big block. + @return + + + Formats a date value. + + @author Ken Arnold, Industrious Media LLC + + + This is the abstract supertype for the various cell formatters. + + @author Ken Arnold, Industrious Media LLC + + + The original specified format. + + + This is the locale used to Get a consistent format result from which to + work. + + + Creates a new formatter object, storing the format in {@link #format}. + + @param format The format. + + + Format a value according the format string. + + @param toAppendTo The buffer to append to. + @param value The value to format. + + + Format a value according to the type, in the most basic way. + + @param toAppendTo The buffer to append to. + @param value The value to format. + + + Formats the value, returning the resulting string. + + @param value The value to format. + + @return The value, formatted. + + + Formats the value in the most basic way, returning the resulting string. + + @param value The value to format. + + @return The value, formatted. + + + Returns the input string, surrounded by quotes. + + @param str The string to quote. + + @return The input string, surrounded by quotes. + + + Creates a new date formatter with the given specification. + + @param format The format. + + + {@inheritDoc} + + + {@inheritDoc} +

+ For a date, this is "mm/d/y". + + + Objects of this class represent a single part of a cell format expression. + Each cell can have up to four of these for positive, zero, negative, and text + values. +

+ Each format part can contain a color, a condition, and will always contain a + format specification. For example "[Red][>=10]#" has a color + ([Red]), a condition (>=10) and a format specification + (#). +

+ This class also Contains patterns for matching the subparts of format + specification. These are used internally, but are made public in case other + code has use for them. + + @author Ken Arnold, Industrious Media LLC + + + Pattern for the color part of a cell format part. + + + Pattern for the condition part of a cell format part. + + + Pattern for the format specification part of a cell format part. + + + Pattern for an entire cell single part. + + + Within {@link #FORMAT_PAT}, the group number for the matched color. + + + Within {@link #FORMAT_PAT}, the group number for the operator in the + condition. + + + Within {@link #FORMAT_PAT}, the group number for the value in the + condition. + + + Within {@link #FORMAT_PAT}, the group number for the format + specification. + + + Create an object to represent a format part. + + @param desc The string to Parse. + + + Returns true if this format part applies to the given value. If + the value is a number and this is part has a condition, returns + true only if the number passes the condition. Otherwise, this + allways return true. + + @param valueObject The value to Evaluate. + + @return true if this format part applies to the given value. + + + Returns the number of the first group that is the same as the marker + string. The search starts with group 1. + + @param pat The pattern to use. + @param str The string to match against the pattern. + @param marker The marker value to find the group of. + + @return The matching group number. + + @throws ArgumentException No group matches the marker. + + + Returns the color specification from the matcher, or null if + there is none. + + @param m The matcher for the format part. + + @return The color specification or null. + + + Returns the condition specification from the matcher, or null if + there is none. + + @param m The matcher for the format part. + + @return The condition specification or null. + + + Returns the CellFormatType object implied by the format specification for + the format part. + + @param matcher The matcher for the format part. + + @return The CellFormatType. + + + Returns the formatter object implied by the format specification for the + format part. + + @param matcher The matcher for the format part. + + @return The formatter. + + + Returns the type of format. + + @param fdesc The format specification + + @return The type of format. + + + Returns a version of the original string that has any special characters + quoted (or escaped) as appropriate for the cell format type. The format + type object is queried to see what is special. + + @param repl The original string. + @param type The format type representation object. + + @return A version of the string with any special characters Replaced. + + @see CellFormatType#isSpecial(char) + + + Apply this format part to the given value. This returns a {@link + CellFormatResult} object with the results. + + @param value The value to apply this format part to. + + @return A {@link CellFormatResult} object Containing the results of + Applying the format to the value. + + + Apply this format part to the given value, Applying the result to the + given label. + + @param label The label + @param value The value to apply this format part to. + + @return true if the + + + Expands a character. This is only partly done, because we don't have the + correct info. In Excel, this would be expanded to fill the rest of the + cell, but we don't know, in general, what the "rest of the cell" is1. + + @param part The character to be repeated is the second character in this + string. + + @return The character repeated three times. + + + Returns the string from the group, or "" if the group is + null. + + @param m The matcher. + @param g The group number. + + @return The group or "". + + + Returns the CellFormatType object implied by the format specification for + the format part. + + @return The CellFormatType. + + + Returns true if this format part has a condition. + + @return true if this format part has a condition. + + + This class : printing out an elapsed time format. + + @author Ken Arnold, Industrious Media LLC + + + Creates a elapsed time formatter. + + @param pattern The pattern to Parse. + + + {@inheritDoc} + + + {@inheritDoc} +

+ For a date, this is "mm/d/y". + + + Format a value according to the standard Excel behavior. This "standard" is + not explicitly documented by Microsoft, so the behavior is determined by + experimentation; see the tests. + + An Excel format has up to four parts, Separated by semicolons. Each part + specifies what to do with particular kinds of values, depending on the number + of parts given: + + - One part (example: [Green]#.##) + If the value is a number, display according to this one part (example: green text, + with up to two decimal points). If the value is text, display it as is. + + - Two parts (example: [Green]#.##;[Red]#.##) + If the value is a positive number or zero, display according to the first part (example: green + text, with up to two decimal points); if it is a negative number, display + according to the second part (example: red text, with up to two decimal + points). If the value is text, display it as is. + + - Three parts (example: [Green]#.##;[Black]#.##;[Red]#.##) + If the value is a positive number, display according to the first part (example: green text, with up to + two decimal points); if it is zero, display according to the second part + (example: black text, with up to two decimal points); if it is a negative + number, display according to the third part (example: red text, with up to + two decimal points). If the value is text, display it as is. + + - Four parts (example: [Green]#.##;[Black]#.##;[Red]#.##;[@]) + If the value is a positive number, display according to the first part (example: green text, + with up to two decimal points); if it is zero, display according to the + second part (example: black text, with up to two decimal points); if it is a + negative number, display according to the third part (example: red text, with + up to two decimal points). If the value is text, display according to the + fourth part (example: text in the cell's usual color, with the text value + surround by brackets). + + In Addition to these, there is a general format that is used when no format + is specified. This formatting is presented by the {@link #GENERAL_FORMAT} + object. + + @author Ken Arnold, Industrious Media LLC + + + Maps a format string to its Parsed version for efficiencies sake. + + + Returns a {@link CellFormat} that applies the given format. Two calls + with the same format may or may not return the same object. + + @param format The format. + + @return A {@link CellFormat} that applies the given format. + + + Creates a new object. + + @param format The format. + + + Returns the result of Applying the format to the given value. If the + value is a number (a type of {@link Number} object), the correct number + format type is chosen; otherwise it is considered a text object. + + @param value The value + + @return The result, in a {@link CellFormatResult}. + + + Returns the result of applying the format to the given date. + + @param date The date. + @param numericValue The numeric value for the date. + + @return The result, in a {@link CellFormatResult}. + + + Fetches the appropriate value from the cell, and returns the result of + Applying it to the appropriate format. For formula cells, the computed + value is what is used. + + @param c The cell. + + @return The result, in a {@link CellFormatResult}. + + + Uses the result of Applying this format to the value, Setting the text + and color of a label before returning the result. + + @param label The label to apply to. + @param value The value to Process. + + @return The result, in a {@link CellFormatResult}. + + + Uses the result of applying this format to the given date, setting the text + and color of a label before returning the result. + + @param label The label to apply to. + @param date The date. + @param numericValue The numeric value for the date. + + @return The result, in a {@link CellFormatResult}. + + + Fetches the appropriate value from the cell, and uses the result, Setting + the text and color of a label before returning the result. + + @param label The label to apply to. + @param c The cell. + + @return The result, in a {@link CellFormatResult}. + + + Returns the {@link CellFormatPart} that applies to the value. Result + depends on how many parts the cell format has, the cell value and any + conditions. The value must be a {@link Number}. + + @param value The value. + @return The {@link CellFormatPart} that applies to the value. + + + Returns the ultimate cell type, following the results of formulas. If + the cell is a {@link Cell#CELL_TYPE_FORMULA}, this returns the result of + {@link Cell#getCachedFormulaResultType()}. Otherwise this returns the + result of {@link Cell#getCellType()}. + + @param cell The cell. + + @return The ultimate type of this cell. + + + Returns true if the other object is a {@link CellFormat} object + with the same format. + + @param obj The other object. + + @return true if the two objects are Equal. + + + Returns a hash code for the format. + + @return A hash code for the format. + + + Format a value as it would be were no format specified. This is also + used when the format specified is General. + + + This object represents a condition in a cell format. + + @author Ken Arnold, Industrious Media LLC + + + Returns an instance of a condition object. + + @param opString The operator as a string. One of "<", + "<=", ">", ">=", + "=", "==", "!=", or + "<>". + @param constStr The constant (such as "12"). + + @return A condition object for the given condition. + + + Returns true if the given value passes the constraint's test. + + @param value The value to compare against. + + @return true if the given value passes the constraint's test. + + + This object Contains the result of Applying a cell format or cell format part + to a value. + + @author Ken Arnold, Industrious Media LLC + @see CellFormatPart#Apply(Object) + @see CellFormat#Apply(Object) + + + Creates a new format result object. + + @param applies The value for {@link #applies}. + @param text The value for {@link #text}. + @param textColor The value for {@link #textColor}. + + + This is true if no condition was given that applied to the + value, or if the condition is satisfied. If a condition is relevant, and + when applied the value fails the test, this is false. + + + The resulting text. This will never be null. + + + The color the format Sets, or null if the format Sets no color. + This will always be null if {@link #applies} is false. + + + The different kinds of formats that the formatter understands. + + @author Ken Arnold, Industrious Media LLC + + + The general (default) format; also used for "General". + + + A numeric format. + + + A date format. + + + An elapsed time format. + + + A text format. + + + Returns true if the format is special and needs to be quoted. + + @param ch The character to test. + + @return true if the format is special and needs to be quoted. + + + Returns a new formatter of the appropriate type, for the given pattern. + The pattern must be appropriate for the type. + + @param pattern The pattern to use. + + @return A new formatter of the appropriate type, for the given pattern. + + + A formatter for the default "General" cell format. + + @author Ken Arnold, Industrious Media LLC + + + Creates a new general formatter. + + + The general style is not quite the same as any other, or any combination + of others. + + @param toAppendTo The buffer to append to. + @param value The value to format. + + + Equivalent to {@link #formatValue(StringBuilder,Object)}. {@inheritDoc}. + + + This class : printing out a value using a number format. + + @author Ken Arnold, Industrious Media LLC + + + Creates a new cell number formatter. + + @param format The format to Parse. + + + {@inheritDoc} + + + {@inheritDoc} +

+ For a number, this is "#" for integer values, and "#.#" + for floating-point values. + + +

+ The CellNumberFormatter.simpleValue() method uses the SIMPLE_NUMBER + CellFormatter defined here. The CellFormat.GENERAL_FORMAT CellFormat + no longer uses the SIMPLE_NUMBER CellFormatter. + Note that the simpleValue()/SIMPLE_NUMBER CellFormatter format + ("#" for integer values, and "#.#" for floating-point values) is + different from the 'General' format for numbers ("#" for integer + values and "#.#########" for floating-point values). + +
+ + This class is used to mark where the special characters in the format + are, as opposed to the other characters that are simply printed. + + + This class represents a single modification to a result string. The way + this works is complicated, but so is numeric formatting. In general, for + most formats, we use a DecimalFormat object that will Put the string out + in a known format, usually with all possible leading and trailing zeros. + We then walk through the result and the orginal format, and note any + modifications that need to be made. Finally, we go through and apply + them all, dealing with overlapping modifications. + + + This class : printing out text. + + @author Ken Arnold, Industrious Media LLC + + + {@inheritDoc} + + + {@inheritDoc} +

+ For text, this is just printing the text. + + + Implementation of Excel 'Analysis ToolPak' function EDATE()
+ + Adds a specified number of months to the specified date.

+ + Syntax
+ EDATE(date, number) + +

+ + @author Tomas Herceg + + + To support Constant Values (2.5.7) as required by the CRN record. + This class is also used for two dimensional arrays which are encoded by + EXTERNALNAME (5.39) records and Array tokens.

+ + @author Josh Micich + + + @return encoded size without the 'type' code byte + + +

+ Represents a constant error code value as encoded in a constant values array. + This class is a type-safe wrapper for a 16-bit int value performing a similar job to + ErrorEval + + @author Josh Micich +
+ + + Initializes a new instance of the class. + + The error code. + + + + Values the of. + + The error code. + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets the error code. + + The error code. + + + + Gets the text. + + The text. + + + Title: Continue Record - Helper class used primarily for SST Records + Description: handles overflow for prior record in the input + stream; content Is tailored to that prior record + @author Marc Johnson (mjohnson at apache dot org) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Csaba Nagy (ncsaba at yahoo dot com) + @version 2.0-pre + + + default constructor + + + Main constructor -- kinda dummy because we don't validate or fill fields + + @param in the RecordInputstream to Read the record from + + + Writes the full encoding of a Continue record without making an instance + + + @param initialDataByte (optional - often used for unicode flag). + If supplied, this will be written before srcData + @return the total number of bytes written + + + Debugging toString + + @return string representation + + + Clone this record. + + + Get the data for continuation + @return byte array containing all of the continued data + + + Common superclass of all records that can produce {@link ContinueRecord}s while being Serialized. + + @author Josh Micich + + + Serializes this record's content to the supplied data output.
+ The standard BIFF header (ushort sid, ushort size) has been handled by the superclass, so + only BIFF data should be written by this method. Simple data types can be written with the + standard {@link LittleEndianOutput} methods. Methods from {@link ContinuableRecordOutput} + can be used to Serialize strings (with {@link ContinueRecord}s being written as required). + If necessary, implementors can explicitly start {@link ContinueRecord}s (regardless of the + amount of remaining space). + + @param out a data output stream +
+ + @return the total Length of the encoded record(s) + (Note - if any {@link ContinueRecord} is required, this result includes the + size of those too) + + + An augmented {@link LittleEndianOutput} used for serialization of {@link ContinuableRecord}s. + This class keeps track of how much remaining space is available in the current BIFF record and + can start new {@link ContinueRecord}s as required. + + @author Josh Micich + + + + @author Josh Micich + + + Terminates the last record (also updates its 'ushort size' field) + + + Terminates the current record and starts a new {@link ContinueRecord} (regardless + of how much space is still available in the current record). + + + Writes the 'optionFlags' byte and encoded character data of a unicode string. This includes: +
    +
  • byte optionFlags
  • +
  • encoded character data (in "ISO-8859-1" or "UTF-16LE" encoding)
  • +
+ + Notes: +
    +
  • The value of the 'is16bitEncoded' flag is determined by the actual character data + of text
  • +
  • The string options flag is never separated (by a {@link ContinueRecord}) from the + first chunk of character data it refers to.
  • +
  • The 'ushort Length' field is assumed to have been explicitly written earlier. Hence, + there may be an intervening {@link ContinueRecord}
  • +
+
+ + Writes a unicode string complete with header and character data. This includes: +
    +
  • ushort Length
  • +
  • byte optionFlags
  • +
  • ushort numberOfRichTextRuns (optional)
  • +
  • ushort extendedDataSize (optional)
  • +
  • encoded character data (in "ISO-8859-1" or "UTF-16LE" encoding)
  • +
+ + The following bits of the 'optionFlags' byte will be set as appropriate: + + + + + +
MaskDescription
0x01is16bitEncoded
0x04hasExtendedData
0x08isRichText
+ Notes: +
    +
  • The value of the 'is16bitEncoded' flag is determined by the actual character data + of text
  • +
  • The string header fields are never separated (by a {@link ContinueRecord}) from the + first chunk of character data (i.e. the first character is always encoded in the same + record as the string header).
  • +
+
+ + ** + + + @return total number of bytes written so far (including all BIFF headers) + + + @return number of remaining bytes of space in current record + + + + Implementors of this interface allow client code to 'delay' writing to a certain section of a + data output stream.
+ A typical application is for writing BIFF records when the size is not known until well after + the header has been written. The client code can call + to reserve two bytes of the output for the 'ushort size' header field. The delayed output can + be written at any stage. +
+ @author Josh Micich +
+ + + Creates an output stream intended for outputting a sequence of size bytes. + + + + + + Allows the writing of BIFF records when the 'ushort size' header field is not known in advance. + When the client is finished writing data, it calls {@link #terminate()}, at which point this + class updates the 'ushort size' with its value. + + @author Josh Micich + + + for writing the 'ushort size' field once its value is known + + + Finishes writing the current record and updates 'ushort size' field.
+ After this method is called, only {@link #getTotalSize()} may be called. +
+ + includes 4 byte header + + + Title: Country Record (aka WIN.INI country) + Description: used for localization. Currently HSSF always Sets this to 1 + and it seems to work fine even in Germany. (es geht's auch fuer Deutschland) + + REFERENCE: PG 298 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a CountryRecord and Sets its fields appropriately + @param in the RecordInputstream to Read the record from + + + Gets the default country + + @return country ID (1 = US) + + + Gets the current country + + @return country ID (1 = US) + + + XCT ?CRN Count + + REFERENCE: 5.114 + + @author Josh Micich + + + return the non static version of the id for this record. + + + Title: CRN + Description: This record stores the contents of an external cell or cell range + REFERENCE: 5.23 + + @author josh micich + + + return the non static version of the id for this record. + + + + @author Josh Micich + + + Reads an unsigned short value without decrypting + + + Reads an unsigned short value without decrypting + + + Create using the default password and a specified docId + @param docId 16 bytes + + + @return true if the keyDigest is compatible with the specified saltData and saltHash + + + The {@link RC4} instance needs to be Changed every 1024 bytes. + @param keyBlockNo used to seed the newly Created {@link RC4} + + + Stores the BIFF8 encryption/decryption password for the current thread. This has been done + using a {@link ThreadLocal} in order to avoid further overloading the various public APIs + (e.g. {@link HSSFWorkbook}) that need this functionality. + + + @return the BIFF8 encryption/decryption password for the current thread. + null if it is currently unSet. + + + Used for both encrypting and decrypting BIFF8 streams. The internal + {@link RC4} instance is renewed (re-keyed) every 1024 bytes. + + @author Josh Micich + + + This field is used to keep track of when to change the {@link RC4} + instance. The change occurs every 1024 bytes. Every byte passed over is + counted. + + + TODO: Additionally, the lbPlyPos (position_of_BOF) field of the BoundSheet8 record MUST NOT be encrypted. + + @return true if record type specified by sid is never encrypted + + + Used when BIFF header fields (sid, size) are being Read. The internal + {@link RC4} instance must step even when unencrypted bytes are read + + + Simple implementation of the alleged RC4 algorithm. + + Inspired by wikipedia's RC4 article + + @author Josh Micich + + + Populates this fields data from the byte array passed in1. + @param in the RecordInputstream to Read the record from + + + Appends the string representation of this field to the supplied + StringBuilder. + + @param str The string buffer to Append to. + + + Converts this field to it's byte array form. + @param offset The offset into the byte array to start writing to. + @param data The data array to Write to. + @return The number of bytes written. + + + @return The size of this field in bytes. This operation Is not valid + Until after the call to FillField() + + + Title: Date Window 1904 Flag record + Description: Flag specifying whether 1904 date windowing Is used. + (tick toc tick toc...BOOM!) + REFERENCE: PG 280 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a DateWindow1904 record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Gets whether or not to use 1904 date windowing (which means you'll be screwed in 2004) + @return window flag - 0/1 (false,true) + + + Title: DBCell Record + Description: Used by Excel and other MS apps to quickly Find rows in the sheets. + REFERENCE: PG 299/440 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height + @version 2.0-pre + + + Constructs a DBCellRecord and Sets its fields appropriately + @param in the RecordInputstream to Read the record from + + + offset from the start of this DBCellRecord to the start of the first cell in + the next DBCell block. + + + return the cell offset in the array + + @param index of the cell offset to retrieve + @return celloffset from the celloffset array + + + @returns the size of the Group of DBCellRecords needed to encode + the specified number of blocks and rows + + + Gets offset from the start of this DBCellRecord to the start of the first cell in + the next DBCell block. + + @return rowoffset to the start of the first cell in the next DBCell block + + + Get the number of cell offsets in the celloffset array + + @return number of cell offsets + + + Title: Default Column Width Record + Description: Specifies the default width for columns that have no specific + width Set. + REFERENCE: PG 302 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + The default column width is 8 characters + + + Constructs a DefaultColumnWidth record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the default column width + @return defaultwidth for columns + + + Title: Default Row Height Record + Description: Row height for rows with Undefined or not explicitly defined + heights. + REFERENCE: PG 301 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + The default row height for empty rows is 255 twips (255 / 20 == 12.75 points) + + + + Constructs a DefaultRowHeight record and Sets its fields appropriately. + + the RecordInputstream to Read the record from + + + + Get the default row height + + + + Title: Delta Record + Description: controls the accuracy of the calculations + REFERENCE: PG 303 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs a Delta record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the maximum Change + @return maxChange - maximum rounding error + + + Title: Dimensions Record + Description: provides the minumum and maximum bounds + of a sheet. + REFERENCE: PG 303 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs a Dimensions record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the first row number for the sheet + @return row - first row on the sheet + + + Get the last row number for the sheet + @return row - last row on the sheet + + + Get the first column number for the sheet + @return column - first column on the sheet + + + Get the last col number for the sheet + @return column - last column on the sheet + + + Process the bytes into escher records. + (Not done by default in case we break things, + Unless you Set the "poi.deSerialize.escher" + system property) + + + Size of record (including 4 byte headers for all sections) + + + DrawingRecord (0x00EC)

+ + + + Cloning of drawing records must be executed through HSSFPatriarch, because all id's must be changed + @return cloned drawing records + + + This Is purely for the biff viewer. During normal operations we don't want + to be seeing this. + + + Title: double Stream Flag Record + Description: tells if this Is a double stream file. (always no for HSSF generated files) + double Stream files contain both BIFF8 and BIFF7 workbooks. + REFERENCE: PG 305 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a DBCellRecord and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Title: DATAVALIDATIONS Record + Description: used in data validation ; + This record Is the list header of all data validation records (0x01BE) in the current sheet. + @author Dragos Buleandra (dragos.buleandra@trade2b.ro) + + + Options of the DVAL + + + Horizontal position of the dialog + + + Vertical position of the dialog + + + Object ID of the drop down arrow object for list boxes ; + in our case this will be always FFFF , Until + MSODrawingGroup and MSODrawing records are implemented + + + Number of following DV Records + + + Constructs a DVAL record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + @return the field_1_options + + + @return the Horizontal position of the dialog + + + @return the the Vertical position of the dialog + + + Get Object ID of the drop down arrow object for list boxes + + + Get number of following DV records + + + Title: DATAVALIDATION Record (0x01BE)

+ Description: This record stores data validation Settings and a list of cell ranges + which contain these Settings. The data validation Settings of a sheet + are stored in a sequential list of DV records. This list Is followed by + DVAL record(s) + @author Dragos Buleandra (dragos.buleandra@trade2b.ro) + @version 2.0-pre + + + Option flags + + + Title of the prompt box + + + Title of the error box + + + Text of the prompt box + + + Text of the error box + + + Not used - Excel seems to always write 0x3FE0 + + + Formula data for first condition (RPN token array without size field) + + + Not used - Excel seems to always write 0x0000 + + + Formula data for second condition (RPN token array without size field) + + + Cell range address list with all affected ranges + + + Option flags field + @see org.apache.poi.hssf.util.HSSFDataValidation utility class + + + Constructs a DV record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + When entered via the UI, Excel translates empty string into "\0" + While it is possible to encode the title/text as empty string (Excel doesn't exactly crash), + the resulting tool-tip text / message box looks wrong. It is best to do the same as the + Excel UI and encode 'not present' as "\0". + + + Clones the object. Uses serialisation, as the + contents are somewhat complex + + + Get the condition data type + @return the condition data type + @see org.apache.poi.hssf.util.HSSFDataValidation utility class + + + Get the condition error style + @return the condition error style + @see org.apache.poi.hssf.util.HSSFDataValidation utility class + + + return true if in list validations the string list Is explicitly given in the formula, false otherwise + @return true if in list validations the string list Is explicitly given in the formula, false otherwise + @see org.apache.poi.hssf.util.HSSFDataValidation utility class + + + return true if empty values are allowed in cells, false otherwise + @return if empty values are allowed in cells, false otherwise + @see org.apache.poi.hssf.util.HSSFDataValidation utility class + + + @return true if drop down arrow should be suppressed when list validation is + used, false otherwise + + + return true if a prompt window should appear when cell Is selected, false otherwise + @return if a prompt window should appear when cell Is selected, false otherwise + @see org.apache.poi.hssf.util.HSSFDataValidation utility class + + + return true if an error window should appear when an invalid value Is entered in the cell, false otherwise + @return if an error window should appear when an invalid value Is entered in the cell, false otherwise + @see org.apache.poi.hssf.util.HSSFDataValidation utility class + + + Get the condition operator + @return the condition operator + @see org.apache.poi.hssf.util.HSSFDataValidation utility class + + + Gets the option flags field. + @return options - the option flags field + + + End Of File record. + + Description: Marks the end of records belonging to a particular object in the + HSSF File + REFERENCE: PG 307 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs a EOFRecord record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + This class Is used to aggregate the MSODRAWING and OBJ record + combinations. This Is necessary due to the bizare way in which + these records are Serialized. What happens Is that you Get a + combination of MSODRAWING -> OBJ -> MSODRAWING -> OBJ records + but the escher records are Serialized _across_ the MSODRAWING + records. + + It Gets even worse when you start looking at TXO records. + + So what we do with this class Is aggregate lazily. That Is + we don't aggregate the MSODRAWING -> OBJ records Unless we + need to modify them. + + At first document contains 4 types of records which belong to drawing layer. + There are can be such sequence of record: +

+ DrawingRecord + ContinueRecord + ... + ContinueRecord + ObjRecord | TextObjectRecord + ..... + ContinueRecord + ... + ContinueRecord + ObjRecord | TextObjectRecord + NoteRecord + ... + NoteRecord +

+ To work with shapes we have to read data from Drawing and Continue records into single array of bytes and + build escher(office art) records tree from this array. + Each shape in drawing layer matches corresponding ObjRecord + Each textbox matches corresponding TextObjectRecord +

+ ObjRecord contains information about shape. Thus each ObjRecord corresponds EscherContainerRecord(SPGR) +

+ EscherAggrefate contains also NoteRecords + NoteRecords must be serial + + @author Glen Stampoultzis (glens at apache.org) + + + Maps shape container objects to their OBJ records + + + list of "tail" records that need to be Serialized after all drawing Group records + + + Calculates the string representation of this record. This Is + simply a dump of all the records. + + + Calculates the xml representation of this record. This is + simply a dump of all the records. + @param tab - string which must be added before each line (used by default '\t') + @return xml representation of the all aggregated records + + + @param sid - record sid we want to check if it belongs to drawing layer + @return true if record is instance of DrawingRecord or ContinueRecord or ObjRecord or TextObjRecord + + + Collapses the drawing records into an aggregate. + read Drawing, Obj, TxtObj, Note and Continue records into single byte array, + create Escher tree from byte array, create map <EscherRecord, Record> + + @param records - list of all records inside sheet + @param locFirstDrawingRecord - location of the first DrawingRecord inside sheet + @return new EscherAggregate create from all aggregated records which belong to drawing layer + + + Serializes this aggregate to a byte array. Since this Is an aggregate + record it will effectively Serialize the aggregated records. + + @param offset The offset into the start of the array. + @param data The byte array to Serialize to. + @return The number of bytes Serialized. + + + @param drawingData - escher records saved into single byte array + @param writtenEscherBytes - count of bytes already saved into drawing records (we should know it to decide create + drawing or continue record) + @param pos current position of data array + @param data - array of bytes where drawing records must be serialized + @param i - number of shape, saved into data array + @return offset of data array after serialization + + + How many bytes do the raw escher records contain. + + @param records List of escher records + @return the number of bytes + + + @param records list of records to look into + @param loc - location of the record which sid must be returned + @return sid of the record with selected location + + + create base tree with such structure: + EscherDgContainer + -EscherSpgrContainer + --EscherSpContainer + ---EscherSpRecord + ---EscherSpgrRecord + ---EscherSpRecord + -EscherDgRecord + + id of DgRecord and SpRecord are empty and must be set later by HSSFPatriarch + + + Unused since this Is an aggregate record. Use CreateAggregate(). + + @see #CreateAggregate + + + Converts the Records into UserModel + objects on the bound HSSFPatriarch + + +

+ Associates an escher record to an OBJ record or a TXO record. + + ClientData or Textbox record + Obj or TextObj record +
+ + + Remove echerRecord and associated to it Obj or TextObj record + + clientData or textbox record to be removed + + + @param obj - ObjRecord with id == NoteRecord.id + @return null if note record is not found else returns note record with id == obj.id + + + @return Returns the current sid. + + + @return record size, including header size of obj, text, note, drawing, continue records + + + @return unmodifiable copy of tail records. We need to access them when building shapes. + Every HSSFComment shape has a link to a NoteRecord from the tailRec collection. + + + Title: Extended Format Record + Description: Probably one of the more complex records. There are two breeds: + Style and Cell. + + It should be noted that fields in the extended format record are + somewhat arbitrary. Almost all of the fields are bit-level, but + we name them as best as possible by functional Group. In some + places this Is better than others. + + + REFERENCE: PG 426 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructor ExtendedFormatRecord + + + + + Constructs an ExtendedFormat record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Clones all the style information from another + ExtendedFormatRecord, onto this one. This + will then hold all the same style options. + + If The source ExtendedFormatRecord comes from + a different Workbook, you will need to sort + out the font and format indicies yourself! + + + Will consider two different records with the same + contents as Equals, as the various indexes + that matter are embedded in the records + + + + Get the index to the FONT record (which font to use 0 based) + + + + + Get the index to the Format record (which FORMAT to use 0-based) + + + + + Gets the options bitmask - you can also use corresponding option bit Getters + (see other methods that reference this one) + + + + + Get whether the cell Is locked or not + + + + + Get whether the cell Is hidden or not + + + + + Get whether the cell Is a cell or style XFRecord + + + + + Get some old holdover from lotus 123. Who cares, its all over for Lotus. + RIP Lotus. + + + + + for cell XF types this Is the parent style (usually 0/normal). For + style this should be NULL. + + + + + Get the alignment options bitmask. See corresponding bitGetter methods + that reference this one. + + + + + Get the horizontal alignment of the cell. + + + + + Get whether to wrap the text in the cell + + + + + Get the vertical alignment of text in the cell + + + + + Docs just say this Is for far east versions.. (I'm guessing it + justifies for right-to-left Read languages) + + + + + Get the degree of rotation. (I've not actually seen this used anywhere) + + + + + Get the indent options bitmask (see corresponding bit Getters that reference + this field) + + + + + Get indention (not sure of the Units, think its spaces) + + + + + Get whether to shrink the text to fit + + + + + Get whether to merge cells + + + + + Get the Reading order for far east versions (0 - Context, 1 - Left to right, + 2 - right to left) - We could use some help with support for the far east. + + + + + Get whether or not to use the format in this XF instead of the parent XF. + + + + + Get whether or not to use the font in this XF instead of the parent XF. + + + + + Get whether or not to use the alignment in this XF instead of the parent XF. + + + + + Get whether or not to use the border in this XF instead of the parent XF. + + + + + Get whether or not to use the pattern in this XF instead of the parent XF. + (foregrount/background) + + + + + Get whether or not to use the locking/hidden in this XF instead of the parent XF. + + + + + Get the border options bitmask (see the corresponding bit Getter methods + that reference back to this one) + + + + + Get the borderline style for the left border + + + + + Get the borderline style for the right border + + + + + Get the borderline style for the top border + + + + + Get the borderline style for the bottom border + + + + + Get the palette options bitmask (see the individual bit Getter methods that + reference this one) + + + + + Get the palette index for the left border color + + + + + Get the palette index for the right border color + + + + + Get the Additional palette options bitmask (see individual bit Getter methods + that reference this method) + + + + + Get the palette index for the top border + + + + + Get the palette index for the bottom border + + + + + Get for diagonal borders + + + + + Get the diagonal border line style + + + + + Not sure what this Is for (maybe Fill lines?) 1 = down, 2 = up, 3 = both, 0 for none.. + + + + + Get the Additional Fill pattern + + + + + Get the Fill palette options bitmask (see indivdual bit Getters that + reference this method) + + + + + Get the foreground palette color index + + + + + Get the background palette color index + + + + EXTERNALNAME

+ + @author Josh Micich + + + 'rgoper' / 'Last received results of the DDE link' + (seems to be only applicable to DDE links)
+ Logically this is a 2-D array, which has been flattened into 1-D array here. +
+ + (logical) number of columns in the {@link #_ddeValues} array + + + (logical) number of rows in the {@link #_ddeValues} array + + + Convenience Function to determine if the name Is a built-in name + + + For OLE and DDE, links can be either 'automatic' or 'manual' + + + only for OLE and DDE + + + DDE links only. If true, this denotes the 'StdDocumentName' + + + @return the standard String representation of this name + + + index to External Book Block (which starts with a EXTERNALBOOK record) + + + a Constructor for making new sub record + + + @param in the RecordInputstream to Read the record from + + + called by the class that is responsible for writing this sucker. + Subclasses should implement this so that their data is passed back in a + byte array. + + @param offset to begin writing at + @param data byte array containing instance data + @return number of bytes written + + + Title: Extern Sheet + Description: A List of Inndexes to SupBook + REFERENCE: + @author Libin Roman (Vista Portal LDT. Developer) + @version 1.0-pre + + + Constructs a Extern Sheet record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Add a zero-based reference to a {@link org.apache.poi.hssf.record.SupBookRecord}. +

+ If the type of the SupBook record is same-sheet referencing, Add-In referencing, + DDE data source referencing, or OLE data source referencing, + then no scope is specified and this value MUST be -2. Otherwise, + the scope must be set as follows: +

    +
  1. -2 Workbook-level reference that applies to the entire workbook.
  2. +
  3. -1 Sheet-level reference.
  4. +
  5. >=0 Sheet-level reference. This specifies the first sheet in the reference. +

    + If the SupBook type is unused or external workbook referencing, + then this value specifies the zero-based index of an external sheet name, + see {@link org.apache.poi.hssf.record.SupBookRecord#getSheetNames()}. + This referenced string specifies the name of the first sheet within the external workbook that is in scope. + This sheet MUST be a worksheet or macro sheet. +

    +

    + If the supporting link type is self-referencing, then this value specifies the zero-based index of a + {@link org.apache.poi.hssf.record.BoundSheetRecord} record in the workbook stream that specifies + the first sheet within the scope of this reference. This sheet MUST be a worksheet or a macro sheet. +

    +
  6. +

+ + @param firstSheetIndex the scope, must be -2 for add-in references + @param lastSheetIndex the scope, must be -2 for add-in references + @return index of newly added ref +
+ + Adds REF struct (ExternSheetSubRecord) + @param rec REF struct + + + Returns the index of the SupBookRecord for this index + + + @return -1 if not found + + + Returns the first sheet that the reference applies to, or + -1 if the referenced sheet can't be found, or -2 if the + reference is workbook scoped. + + + Returns the last sheet that the reference applies to, or + -1 if the referenced sheet can't be found, or -2 if the + reference is workbook scoped. + For a single sheet reference, the first and last should be + the same. + + + called by the class that Is responsible for writing this sucker. + Subclasses should implement this so that their data Is passed back in a + byte array. + + @param offset to begin writing at + @param data byte array containing instance data + @return number of bytes written + + + returns the number of REF Records, which is in model + @return number of REF records + + + @return number of REF structures + + + return the non static version of the id for this record. + + + Title: A sub Record for Extern Sheet + Description: Defines a named range within a workbook. + REFERENCE: + @author Libin Roman (Vista Portal LDT. Developer) + @version 1.0-pre + + + a Constractor for making new sub record + + + Constructs a Extern Sheet Sub Record record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Sets the Index to the sup book + @param index sup book index + + + Gets the index to sup book + @return sup book index + + + Sets the index to first sheet in supbook + @param index index to first sheet + + + Gets the index to first sheet from supbook + @return index to first supbook + + + Sets the index to last sheet in supbook + @param index index to last sheet + + + Gets the index to last sheet in supbook + @return index to last supbook + + + called by the class that Is responsible for writing this sucker. + Subclasses should implement this so that their data Is passed back in a + byte array. + + @param offset to begin writing at + @param data byte array containing instance data + @return number of bytes written + + + returns the record size + + + return the non static version of the id for this record. + + + Extended SST table info subrecord + Contains the elements of "info" in the SST's array field + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + @see org.apache.poi.hssf.record.ExtSSTRecord + + + Creates new ExtSSTInfoSubRecord + + + Title: Extended Static String Table + Description: This record Is used for a quick Lookup into the SST record. This + record breaks the SST table into a Set of buckets. The offsets + to these buckets within the SST record are kept as well as the + position relative to the start of the SST record. + REFERENCE: PG 313 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at apache dot org) + @version 2.0-pre + @see org.apache.poi.hssf.record.ExtSSTInfoSubRecord + + + Constructs a EOFRecord record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Given a number of strings (in the sst), returns the size of the extsst record + + + Returns the size of this record + + + Title: File Pass Record + Description: Indicates that the record after this record are encrypted. HSSF does not support encrypted excel workbooks + and the presence of this record will cause Processing to be aborted. + REFERENCE: PG 420 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Jason Height (jheight at chariot dot net dot au) + @version 3.0-pre + + + Title: FILESHARING + Description: stores the encrypted Readonly for a workbook (Write protect) + This functionality Is accessed from the options dialog box available when performing 'Save As'.

+ REFERENCE: PG 314 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)

+ @author Andrew C. Oliver (acoliver at apache dot org) + + + Constructs a FileSharing record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Clone this record. + + + Get the Readonly + + @return short representing if this Is Read only (1 = true) + + + @returns password hashed with hashPassword() (very lame) + + + @returns username of the user that Created the file + + + Title: Function Group Count Record + Description: Number of built in function Groups in the current version of the + SpReadsheet (probably only used on Windoze) + REFERENCE: PG 315 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + suggested default (14 dec) + + + Constructs a FnGroupCount record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the number of built-in functions + + @return number of built-in functions + + + Title: Font Record - descrbes a font in the workbook (index = 0-3,5-infinity - skip 4) + Description: An element in the Font Table + REFERENCE: PG 315 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a Font record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Clones all the font style information from another + FontRecord, onto this one. This + will then hold all the same font style options. + + + Does this FontRecord have all the same font + properties as the supplied FontRecord? + Note that {@link #equals(Object)} will check + for exact objects, while this will check + for exact contents, because normally the + font record's position makes a big + difference too. + + + Only returns two for the same exact object - + creating a second FontRecord with the same + properties won't be considered equal, as + the record's position in the record stream + matters. + + + Set the font to be italics or not + + @param italics - whether the font Is italics or not + @see #SetAttributes(short) + + + Set the font to be stricken out or not + + @param strike - whether the font Is stricken out or not + @see #SetAttributes(short) + + + whether to use the mac outline font style thing (mac only) - Some mac person + should comment this instead of me doing it (since I have no idea) + + @param mac - whether to do that mac font outline thing or not + @see #SetAttributes(short) + + + whether to use the mac shado font style thing (mac only) - Some mac person + should comment this instead of me doing it (since I have no idea) + + @param mac - whether to do that mac font shadow thing or not + @see #SetAttributes(short) + + + Set the type of Underlining for the font + + + Set the font family (TODO) + + @param f family + + + Set the Char Set + + @param charSet - CharSet + + + Set the name of the font + + @param fn - name of the font (i.e. "Arial") + + + Gets the height of the font in 1/20th point Units + + @return fontheight (in points/20) + + + Get the font attributes (see individual bit Getters that reference this method) + + @return attribute - the bitmask + + + Get the font's color palette index + + @return cpi - font color index + + + Get the bold weight for this font (100-1000dec or 0x64-0x3e8). Default Is + 0x190 for normal and 0x2bc for bold + + @return bw - a number between 100-1000 for the fonts "boldness" + + + Get the type of base or subscript for the font + + @return base or subscript option + + + Title: Footer Record + Description: Specifies the footer for a sheet + REFERENCE: PG 317 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Shawn Laubach (slaubach at apache dot org) Modified 3/14/02 + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Common header/footer base class + + @author Josh Micich + + + get the length of the footer string + + @return length of the footer string + + +

+ Initializes a new instance of the class. + + the RecordInputstream to Read the record from +
+ + + Returns a that represents the current . + + + A that represents the current . + + + + + + + return the non static version of the id for this record. + + + Title: Format Record + Description: describes a number format -- those goofy strings like $(#,###) + + REFERENCE: PG 317 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Shawn M. Laubach (slaubach at apache dot org) + @version 2.0-pre + + + Constructs a Format record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the format index code (for built in formats) + + @return the format index code + @see org.apache.poi.hssf.model.Workbook + + + Get the format string + + @return the format string + + + Manages the cached formula result values of other types besides numeric. + Excel encodes the same 8 bytes that would be field_4_value with various NaN + values that are decoded/encoded by this class. + + + deliberately chosen by Excel in order to encode other values within Double NaNs + + + @return null if the double value encoded by valueLongBits + is a normal (non NaN) double value. + + + Formula Record. + REFERENCE: PG 317/444 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Since the NaN support seems sketchy (different constants) we'll store and spit it out directly + + + Creates new FormulaRecord + + + Constructs a Formula record and Sets its fields appropriately. + Note - id must be 0x06 (NOT 0x406 see MSKB #Q184647 for an + "explanation of this bug in the documentation) or an exception + will be throw upon validation + + @param in the RecordInputstream to Read the record from + + + @return true if this {@link FormulaRecord} is followed by a + {@link StringRecord} representing the cached text result of the formula + evaluation. + + + Get the calculated value of the formula + + @return calculated value + + + Get the option flags + + @return bitmask + + + Get the stack as a list + + @return list of tokens (casts stack to a list and returns it!) + this method can return null Is we are Unable to Create Ptgs from + existing excel file + callers should Check for null! + + + Title: GridSet Record. + Description: flag denoting whether the user specified that gridlines are used when + printing. + REFERENCE: PG 320 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + + @author Andrew C. Oliver (acoliver at apache dot org) + @author Glen Stampoultzis (glens at apache.org) + @author Jason Height (jheight at chariot dot net dot au) + + @version 2.0-pre + + + Constructs a GridSet record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether the gridlines are shown during printing. + + @return gridSet - true if gridlines are NOT printed, false if they are. + + + Title: Guts Record + Description: Row/column gutter sizes + REFERENCE: PG 320 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs a Guts record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the size of the gutter that appears at the left of the rows + + @return gutter size in screen Units + + + Get the size of the gutter that appears at the above the columns + + @return gutter size in screen Units + + + Get the maximum outline level for the row gutter. + + @return maximum outline level + + + Get the maximum outline level for the col gutter. + + @return maximum outline level + + + Title: HCenter record + Description: whether to center between horizontal margins + REFERENCE: PG 320 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs an HCenter record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether or not to horizonatally center this sheet. + @return center - t/f + + + The HEADERFOOTER record stores information Added in Office Excel 2007 for headers/footers. + + @author Yegor Kozlov + + + construct a HeaderFooterRecord record. No fields are interpreted and the record will + be Serialized in its original form more or less + @param in the RecordInputstream to read the record from + + + spit the record out AS IS. no interpretation or identification + + + If this header belongs to a specific sheet view , the sheet view?s GUID will be saved here. + + If it is zero, it means the current sheet. Otherwise, this field MUST match the guid field + of the preceding {@link UserSViewBegin} record. + + @return the sheet view's GUID + + + @return whether this record belongs to the current sheet + + + Title: Header Record + Description: Specifies a header for a sheet + REFERENCE: PG 321 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Shawn Laubach (slaubach at apache dot org) Modified 3/14/02 + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs an Header record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Title: Hide Object Record + Description: flag defines whether to hide placeholders and object + REFERENCE: PG 321 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs an HideObj record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Set hide object options + + @param hide options + @see #HIDE_ALL + @see #SHOW_PLACEHOLDERS + @see #SHOW_ALL + + + Get hide object options + + @return hide options + @see #HIDE_ALL + @see #SHOW_PLACEHOLDERS + @see #SHOW_ALL + + + HorizontalPageBreak record that stores page breaks at rows + + This class Is just used so that SID Compares work properly in the RecordFactory + @see PageBreakRecord + @author Danny Mui (dmui at apache dot org) + + + Record that Contains the functionality page _breaks (horizontal and vertical) + + The other two classes just specifically Set the SIDS for record creation. + + REFERENCE: Microsoft Excel SDK page 322 and 420 + + @see HorizontalPageBreakRecord + @see VerticalPageBreakRecord + @author Danny Mui (dmui at apache dot org) + + + Adds the page break at the specified parameters + @param main Depending on sid, will determine row or column to put page break (zero-based) + @param subFrom No user-interface to Set (defaults to minumum, 0) + @param subTo No user-interface to Set + + + Removes the break indicated by the parameter + @param main (zero-based) + + + Retrieves the region at the row/column indicated + @param main FIXME: Document this! + @return The Break or null if no break exists at the row/col specified. + + + Since both records store 2byte integers (short), no point in + differentiating it in the records. + + The subs (rows or columns, don't seem to be able to Set but excel Sets + them automatically) + + + + + + @param in the RecordInputstream to Read the record from + + + The HyperlinkRecord wraps an HLINK-record + from the Excel-97 format. + Supports only external links for now (eg http://) + + @author Mark Hissink Muller mark@hissinkmuller.nl + @author Yegor Kozlov (yegor at apache dot org) + + + Link flags + + + Tail of a URL link + + + Tail of a file link + + + cell range of this hyperlink + + + 16-byte GUID + + + Some sort of options for file links. + + + Link options. Can include any of HLINK_* flags. + + + Test label + + + Moniker. Makes sense only for URL and file links + + + in 8:3 DOS format No Unicode string header, + always 8-bit characters, zero-terminated + + + Link + + + Text describing a place in document. In Excel UI, this is appended to the + address, (after a '#' delimiter).
+ This field is optional. If present, the {@link #HLINK_PLACE} must be set. +
+ + Remaining bytes + + + Create a new hyperlink + + + Read hyperlink from input stream + + @param in the stream to Read from + + + + Initialize a new url link + + + + + Initialize a new file link + + + + + Initialize a new document link + + + + Return the column of the first cell that Contains the hyperlink + + @return the 0-based column of the first cell that Contains the hyperlink + + + Set the column of the last cell that Contains the hyperlink + + @return the 0-based column of the last cell that Contains the hyperlink + + + Return the row of the first cell that Contains the hyperlink + + @return the 0-based row of the first cell that Contains the hyperlink + + + Return the row of the last cell that Contains the hyperlink + + @return the 0-based row of the last cell that Contains the hyperlink + + + Returns a 16-byte guid identifier. Seems to always equal {@link STD_MONIKER} + + @return 16-byte guid identifier + + + Returns a 16-byte moniker. + + @return 16-byte moniker + + + Return text label for this hyperlink + + @return text to Display + + + Hypelink Address. Depending on the hyperlink type it can be URL, e-mail, patrh to a file, etc. + + @return the Address of this hyperlink + + + Link options. Must be a combination of HLINK_* constants. + + + Label options + + + Options for a file link + + + Title: Index Record + Description: Occurs right after BOF, tells you where the DBCELL records are for a sheet + Important for locating cells + NOT USED IN THIS RELEASE + REFERENCE: PG 323 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs an Index record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Returns the size of an INdexRecord when it needs to index the specified number of blocks + + + + Title: Interface End Record + Description: Shows where the Interface Records end (MMS) + (has no fields) + REFERENCE: PG 324 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs an InterfaceEnd record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + + for test TestInterfaceEndRecord.TestCreate() + + + + + Title: Interface Header Record + Description: Defines the beginning of Interface records (MMS) + REFERENCE: PG 324 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + suggested (and probably correct) default + + + Constructs an Codepage record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Title: Iteration Record + Description: Tells whether to iterate over forumla calculations or not + (if a formula Is dependant upon another formula's result) + (odd feature for something that can only have 32 elements in + a formula!) + REFERENCE: PG 325 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs an Iteration record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether or not to iterate for calculations + + @return whether iterative calculations are turned off or on + + + Label Record - Read only support for strings stored directly in the cell.. Don't + use this (except to Read), use LabelSST instead + REFERENCE: PG 325 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + + @see org.apache.poi.hssf.record.LabelSSTRecord + + + Creates new LabelRecord + + + Constructs an Label record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + THROWS A RUNTIME EXCEPTION.. USE LABELSSTRecords. YOU HAVE NO REASON to use LABELRecord!! + + + Get the number of Chars this string Contains + @return number of Chars + + + Is this Uncompressed Unicode (16bit)? Or just 8-bit compressed? + @return IsUnicode - True for 16bit- false for 8bit + + + Get the value + + @return the text string + @see #GetStringLength + + + Title: Label SST Record + Description: Refers to a string in the shared string table and Is a column + value. + REFERENCE: PG 325 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs an LabelSST record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the index to the string in the SSTRecord + + @return index of string in the SST Table + @see org.apache.poi.hssf.record.SSTRecord + + + Record for the left margin. + NOTE: This source was automatically generated. + @author Shawn Laubach (slaubach at apache dot org) + + + Constructs a LeftMargin record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Get the margin field for the LeftMargin record. + + + Not implemented yet. May commit it anyway just so people can see + where I'm heading. + + @author Glen Stampoultzis (glens at apache.org) + + + Title: Merged Cells Record + + Description: Optional record defining a square area of cells to "merged" into + one cell. + REFERENCE: NONE (UNDOCUMENTED PRESENTLY) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + sometimes the regions array is shared with other MergedCellsRecords + + + Constructs a MergedCellsRecord and Sets its fields appropriately + @param in the RecordInputstream to Read the record from + + + @return MergedRegion at the given index representing the area that is Merged (r1,c1 - r2,c2) + + + Get the number of merged areas. If this drops down to 0 you should just go + ahead and delete the record. + @return number of areas + + + Title: MMS Record + Description: defines how many Add menu and del menu options are stored + in the file. Should always be Set to 0 for HSSF workbooks + REFERENCE: PG 328 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a MMS record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Set number of Add menu options (Set to 0) + @param am number of Add menu options + + + Set number of del menu options (Set to 0) + @param dm number of del menu options + + + Title: Mulitple Blank cell record + Description: Represents a Set of columns in a row with no value but with styling. + In this release we have Read-only support for this record type. + The RecordFactory Converts this to a Set of BlankRecord objects. + REFERENCE: PG 329 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Glen Stampoultzis (glens at apache.org) + @version 2.0-pre + @see org.apache.poi.hssf.record.BlankRecord + + + Creates new MulBlankRecord + + + Constructs a MulBlank record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + returns the xf index for column (coffset = column - field_2_first_col) + @param coffset the column (coffset = column - field_2_first_col) + @return the XF index for the column + + + Get the row number of the cells this represents + + @return row number + + + starting column (first cell this holds in the row) + @return first column number + + + ending column (last cell this holds in the row) + @return first column number + + + Get the number of columns this Contains (last-first +1) + @return number of columns (last - first +1) + + + Used to store multiple RK numbers on a row. 1 MulRk = Multiple Cell values. + HSSF just Converts this into multiple NUMBER records. Read-ONLY SUPPORT! + REFERENCE: PG 330 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Creates new MulRKRecord + + + Constructs a MulRK record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + returns the xf index for column (coffset = column - field_2_first_col) + @return the XF index for the column + + + returns the rk number for column (coffset = column - field_2_first_col) + @return the value (decoded into a double) + + + starting column (first cell this holds in the row) + @return first column number + + + ending column (last cell this holds in the row) + @return first column number + + + Get the number of columns this Contains (last-first +1) + @return number of columns (last - first +1) + + + Title: NAMECMT Record (0x0894) + Description: Defines a comment associated with a specified name. + REFERENCE: + + @author Andrew Shirley (aks at corefiling.co.uk) + + + @param ris the RecordInputstream to read the record from + + + return the non static version of the id for this record. + + + @return the name of the NameRecord to which this comment applies. + + + @return the text of the comment. + + + Title: Name Record (aka Named Range) + Description: Defines a named range within a workbook. + REFERENCE: + @author Libin Roman (Vista Portal LDT. Developer) + @author Sergei Kozello (sergeikozello at mail.ru) + @author Glen Stampoultzis (glens at apache.org) + @version 1.0-pre + + + + + Included for completeness sake, not implemented + + + Included for completeness sake, not implemented + + + Included for completeness sake, not implemented + + + Included for completeness sake, not implemented + + + Included for completeness sake, not implemented + + + Included for completeness sake, not implemented + + + Included for completeness sake, not implemented + + + Included for completeness sake, not implemented + + + Included for completeness sake, not implemented + + + Included for completeness sake, not implemented + + + One-based extern index of sheet (resolved via LinkTable). Zero if this is a global name + + + the one based sheet number. + + + Creates new NameRecord + + + Constructs a Name record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Constructor to Create a built-in named region + @param builtin Built-in byte representation for the name record, use the public constants + @param index + + + Indicates that the defined name refers to a user-defined function. + This attribute is used when there is an add-in or other code project associated with the file. + + @param function true indicates the name refers to a function. + + + called by the class that Is responsible for writing this sucker. + Subclasses should implement this so that their data Is passed back in a + @param offset to begin writing at + @param data byte array containing instance data + @return number of bytes written + + + @see Object#ToString() + + + Creates a human Readable name for built in types + @return Unknown if the built-in name cannot be translated + + + @return function Group + @see FnGroupCountRecord + + + Gets the option flag + @return option flag + + + returns the keyboard shortcut + @return keyboard shortcut + + + ** + + + @return true if name has a formula (named range or defined value) + + + @return true if name Is hidden + + + @return true if name Is a function + + + @return true if name Is a command + + + @return true if function macro or command macro + + + @return true if array formula or user defined + + + Convenience Function to determine if the name Is a built-in name + + + Gets the name + @return name + + + Gets the Built In Name + @return the built in Name + + + Gets the definition, reference (Formula) + @return definition -- can be null if we cant Parse ptgs + + + Get the custom menu text + @return custom menu text + + + Gets the description text + @return description text + + + Get the help topic text + @return gelp topic text + + + Gets the status bar text + @return status bar text + + + For named ranges, and built-in names + @return the 1-based sheet number. + + + Gets the extern sheet number + @return extern sheet index + + + return the non static version of the id for this record. + + + NOTE: Comment Associated with a Cell (1Ch) + + @author Yegor Kozlov + + + Flag indicating that the comment Is hidden (default) + + + Flag indicating that the comment Is visible + + + Saves padding byte value to reduce delta during round-trip serialization.
+ + The documentation is not clear about how padding should work. In any case + Excel(2007) does something different. +
+ + Construct a new NoteRecord and + Fill its data with the default values + + + Constructs a NoteRecord and Fills its fields + from the supplied RecordInputStream. + + @param in the stream to Read from + + + Serialize the record data into the supplied array of bytes + + @param offset offset in the data + @param data the data to Serialize into + + @return size of the record + + + Convert this record to string. + Used by BiffViewer and other utulities. + + + @return id of this record. + + + Size of record + + + Return the row that Contains the comment + + @return the row that Contains the comment + + + Return the column that Contains the comment + + @return the column that Contains the comment + + + Options flags. + + @return the options flag + @see #NOTE_VISIBLE + @see #NOTE_HIDDEN + + + Object id for OBJ record that Contains the comment + + + Name of the original comment author + + @return the name of the original author of the comment + + + For unit testing only! + + + Contains a numeric cell value. + REFERENCE: PG 334 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Creates new NumberRecord + + + Constructs a Number record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Get the value for the cell + + @return double representing the value + + + Title: Object Protect Record + Description: Protect embedded object with the lamest "security" ever invented. + This record tells "I want to protect my objects" with lame security. It + appears in conjunction with the PASSWORD and PROTECT records as well as its + scenario protect cousin. + REFERENCE: PG 368 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + + + Constructs a Protect record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether the sheet Is protected or not + @return whether to protect the sheet or not + + + The obj record is used to hold various graphic objects and controls. + + @author Glen Stampoultzis (glens at apache.org) + + + used when POI has no idea what is going on + + + Excel seems to tolerate padding to quad or double byte length + + + Constructs a OBJ record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Some XLS files have ObjRecords with nearly 8Kb of excessive padding. These were probably + written by a version of POI (around 3.1) which incorrectly interpreted the second short of + the ftLbs subrecord (0x1FEE) as a length, and read that many bytes as padding (other bugs + helped allow this to occur). + + Excel reads files with this excessive padding OK, truncating the over-sized ObjRecord back + to the its proper size. POI does the same. + + + Size of record (excluding 4 byte header) + + + PaletteRecord - Supports custom palettes. + @author Andrew C. Oliver (acoliver at apache dot org) + @author Brian Sanders (bsanders at risklabs dot com) - custom palette editing + @version 2.0-pre + + + The standard size of an XLS palette + + + The byte index of the first color + + + Constructs a PaletteRecord record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + + Dangerous! Only call this if you intend to replace the colors! + + + + Returns the color value at a given index + + @return the RGB triplet for the color, or null if the specified index + does not exist + + + Sets the color value at a given index + + If the given index Is greater than the current last color index, + then black Is Inserted at every index required to make the palette continuous. + + @param byteIndex the index to Set; if this index Is less than 0x8 or greater than + 0x40, then no modification Is made + + + Creates the default palette as PaletteRecord binary data + + @see org.apache.poi.hssf.model.Workbook#createPalette + + + PColor - element in the list of colors - consider it a "struct" + + + * Describes the frozen and Unfozen panes. + * NOTE: This source Is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a Pane record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Get the x field for the Pane record. + + + Get the y field for the Pane record. + + + Get the top row field for the Pane record. + + + Get the left column field for the Pane record. + + + Get the active pane field for the Pane record. + + @return One of + ACTIVE_PANE_LOWER_RIGHT + ACTIVE_PANE_UPPER_RIGHT + ACTIVE_PANE_LOWER_LEFT + ACTIVE_PANE_UPPER_LEFT + + + Title: Password Record + Description: stores the encrypted password for a sheet or workbook (HSSF doesn't support encryption) + REFERENCE: PG 371 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a Password record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Clone this record. + + + Get the password + + @return short representing the password + + + Title: Protection Revision 4 password Record + Description: Stores the (2 byte??!!) encrypted password for a shared + workbook + REFERENCE: PG 374 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a PasswordRev4 (PROT4REVPASS) record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + set the password + + @param pw representing the password + + + SXDI - Data Item (0x00C5)
+ + @author Patrick Cheng +
+ + SXVDEX - Extended PivotTable View Fields (0x0100)
+ + @author Patrick Cheng +
+ + the value of the cchSubName field when the subName is not present + + + SXPI - Page Item (0x00B6)
+ + @author Patrick Cheng +
+ + Index to the View Item SXVI(0x00B2) record + + + Index to the {@link ViewFieldsRecord} SXVD(0x00B1) record + + + Object ID for the drop-down arrow + + + SXIDSTM - Stream ID (0x00D5)
+ + @author Patrick Cheng +
+ + SXVIEW - View Definition (0x00B0)
+ + @author Patrick Cheng +
+ + SXVD - View Fields (0x00B1)
+ + @author Patrick Cheng +
+ + the value of the cchName field when the name is not present + + + 5 shorts + + + values for the {@link ViewFieldsRecord#sxaxis} field + + + SXVS - View Source (0x00E3)
+ + @author Patrick Cheng +
+ + Title: Precision Record + Description: defines whether to store with full precision or what's Displayed by the gui + (meaning have really screwed up and skewed figures or only think you do!) + REFERENCE: PG 372 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a Precision record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether to use full precision or just skew all you figures all to hell. + + @return fullprecision - or not + + + Title: Print Gridlines Record + Description: whether to print the gridlines when you enjoy you spReadsheet on paper. + REFERENCE: PG 373 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs a PrintGridlines record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether or not to print the gridlines (and make your spReadsheet ugly) + + @return make spReadsheet ugly - Y/N + + + Title: Print Headers Record + Description: Whether or not to print the row/column headers when you + enjoy your spReadsheet in the physical form. + REFERENCE: PG 373 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs a PrintHeaders record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + + Get whether to print the headers - y/n + + true if [print headers]; otherwise, false. + + + Title: Print Setup Record + Description: Stores print Setup options -- bogus for HSSF (and marked as such) + REFERENCE: PG 385 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs a PrintSetup (SetUP) record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Title: Protection Revision 4 Record + Description: describes whether this is a protected shared/tracked workbook + ( HSSF does not support encryption because we don't feel like going to jail ) + REFERENCE: PG 373 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a ProtectionRev4 record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether the this is protected shared/tracked workbook or not + @return whether to protect the workbook or not + + + Title: Protect Record + Description: defines whether a sheet or workbook is protected (HSSF DOES NOT SUPPORT ENCRYPTION) + (kindly ask the US government to stop having arcane stupid encryption laws and we'll support it) + (after all terrorists will all use US-legal encrypton right??) + HSSF now supports the simple "protected" sheets (where they are not encrypted and open office et al + ignore the password record entirely). + REFERENCE: PG 373 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + + + Constructs a Protect record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether the sheet is protected or not + @return whether to protect the sheet or not + + + Title: Recalc Id Record + Description: This record Contains an ID that marks when a worksheet was last + recalculated. It's an optimization Excel uses to determine if it + needs to recalculate the spReadsheet when it's opened. So far, only + the two values 0xC1 0x01 0x00 0x00 0x80 0x38 0x01 0x00 + (do not recalculate) and 0xC1 0x01 0x00 0x00 0x60 0x69 0x01 + 0x00 have been seen. If the field isNeeded Is + Set to false (default), then this record Is swallowed during the + serialization Process + REFERENCE: http://chicago.sourceforge.net/devel/docs/excel/biff8.html + @author Luc Girardin (luc dot girardin at macrofocus dot com) + @version 2.0-pre + @see org.apache.poi.hssf.model.Workbook + + + An unsigned integer that specifies the recalculation engine identifier + of the recalculation engine that performed the last recalculation. + If the value is less than the recalculation engine identifier associated with the application, + the application will recalculate the results of all formulas on + this workbook immediately after loading the file + + + Constructs a RECALCID record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Title: Record Factory + Description: Takes a stream and outputs an array of Record objects. + + @deprecated use {@link org.apache.poi.hssf.eventmodel.EventRecordFactory} instead + @see org.apache.poi.hssf.eventmodel.EventRecordFactory + @author Andrew C. Oliver (acoliver at apache dot org) + @author Marc Johnson (mjohnson at apache dot org) + @author Glen Stampoultzis (glens at apache.org) + @author Csaba Nagy (ncsaba at yahoo dot com) + + + cache of the recordsToMap(); + + + Debug / diagnosis method
+ Gets the POI implementation class for a given sid. Only a subset of the any BIFF + records are actually interpreted by POI. A few others are known but not interpreted + (see {@link UnknownRecord#getBiffName(int)}). + @return the POI implementation class for the specified record sid. + null if the specified record is not interpreted by POI. +
+ + Changes the default capacity (10000) to handle larger files + + + Create an array of records from an input stream + + @param in the InputStream from which the records will be + obtained + + @return an array of Records Created from the InputStream + + @exception RecordFormatException on error Processing the + InputStream + + + Converts a {@link MulBlankRecord} into an equivalent array of {@link BlankRecord}s + + + + RK record is a slightly smaller alternative to NumberRecord + POI likes NumberRecord better + + The rk. + + + + + Converts a MulRKRecord into an equivalent array of NumberRecords + + The MRK. + + + + A "create" method is used instead of the usual constructor if the created record might + be of a different class to the declaring class. + + + A stream based way to get at complete records, with + as low a memory footprint as possible. + This handles Reading from a RecordInputStream, turning + the data into full records, processing continue records + etc. + Most users should use {@link HSSFEventFactory} / + {@link HSSFListener} and have new records pushed to + them, but this does allow for a "pull" style of coding. + + + Temporarily stores a group of {@link Record}s, for future return by {@link #nextRecord()}. + This is used at the start of the workbook stream, and also when the most recently read + underlying record is a {@link MulRKRecord} + + + used to help iterating over the unread records + + + The most recent record that we gave to the user + + + The most recent DrawingRecord seen + + + @param shouldIncludeContinueRecords caller can pass false if loose + {@link ContinueRecord}s should be skipped (this is sometimes useful in event based + processing). + + + Returns the next (complete) record from the + stream, or null if there are no more. + + + @return the next {@link Record} from the multiple record group as expanded from + a recently read {@link MulRKRecord}. null if not present. + + + @return the next available record, or null if + this pass didn't return a record that's + suitable for returning (eg was a continue record). + + + Keeps track of the sizes of the Initial records up to and including {@link FilePassRecord} + Needed for protected files because each byte is encrypted with respect to its absolute + position from the start of the stream. + + + @return last record scanned while looking for encryption info. + This will typically be the first or second record Read. Possibly null + if stream was empty + + + false in some test cases + + + Title: Record Input Stream + Description: Wraps a stream and provides helper methods for the construction of records. + + @author Jason Height (jheight @ apache dot org) + + + Maximum size of a single record (minus the 4 byte header) without a continue + + + Header {@link LittleEndianInput} facet of the wrapped {@link InputStream} + + + Data {@link LittleEndianInput} facet of the wrapped {@link InputStream} + + + the record identifier of the BIFF record currently being read + + + This method will Read a byte from the current record + + + + @return the sid of the next record or {@link #INVALID_SID_VALUE} if at end of stream + + + Moves to the next record in the stream. + + Note: The auto continue flag is Reset to true + + + Reads an 8 bit, signed value + + + Reads a 16 bit, signed value + + + Reads an 8 bit, Unsigned value + + + Reads a 16 bit,un- signed value. + @return + + + given a byte array of 16-bit Unicode Chars, compress to 8-bit and + return a string + + { 0x16, 0x00 } -0x16 + + @param Length the Length of the string + @return the Converted string + @exception ArgumentException if len is too large (i.e., + there is not enough data in string to Create a String of that + Length) + + + Returns the remaining bytes for the current record. + + @return The remaining bytes of the current record. + + + Reads all byte data for the current record, including any + that overlaps into any following continue records. + + @deprecated Best to write a input stream that wraps this one where there Is + special sub record that may overlap continue records. + + + @return sid of next record. Can be called after hasNextRecord() + + + The remaining number of bytes in the current record. + + @return The number of bytes remaining in the current record + + + Returns true iif a Continue record is next in the excel stream _currentDataOffset + + @return True when a ContinueRecord is next. + + + Title: RefMode Record + Description: Describes which reference mode to use + REFERENCE: PG 376 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs a RefMode record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the reference mode to use (HSSF uses/assumes A1) + @return mode to use + @see #USE_A1_MODE + @see #USE_R1C1_MODE + + + Title: Refresh All Record + Description: Flag whether to refresh all external data when loading a sheet. + (which hssf doesn't support anyhow so who really cares?) + REFERENCE: PG 376 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a RefreshAll record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether to refresh all external data when loading a sheet + @return refreshall or not + + + Record for the right margin. * NOTE: This source was automatically generated. * @author Shawn Laubach (slaubach at apache dot org) + + + Constructs a RightMargin record and Sets its fields appropriately. * * @param id id must be 0x27 or an exception * will be throw upon validation * @param size size the size of the data area of the record * @param data data of the record (should not contain sid/len) + + + Get the margin field for the RightMargin record. + + + Title: RK Record + Description: An internal 32 bit number with the two most significant bits + storing the type. This is part of a bizarre scheme to save disk + space and memory (gee look at all the other whole records that + are in the file just "cause"..,far better to waste Processor + cycles on this then leave on of those "valuable" records out). + We support this in Read-ONLY mode. HSSF Converts these to NUMBER records + + + + REFERENCE: PG 376 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + @see org.apache.poi.hssf.record.NumberRecord + + + Constructs a RK record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the type of the number + + @return one of these values: +
    +
  1. RK_IEEE_NUMBER
  2. +
  3. RK_IEEE_NUMBER_TIMES_100
  4. +
  5. RK_INTEGER
  6. +
  7. RK_INTEGER_TIMES_100
  8. +
+
+ + Extract the value of the number + + The mechanism for determining the value is dependent on the two + low order bits of the raw number. If bit 1 is Set, the number + is an integer and can be cast directly as a double, otherwise, + it's apparently the exponent and mantissa of a double (and the + remaining low-order bits of the double's mantissa are 0's). + + If bit 0 is Set, the result of the conversion to a double Is + divided by 100; otherwise, the value is left alone. + + [Insert picture of Screwy Squirrel in full Napoleonic regalia] + + @return the value as a proper double (hey, it could + happen) + + + Title: Row Record + Description: stores the row information for the sheet. + REFERENCE: PG 379 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + The maximum row number that excel can handle (zero based) ie 65536 rows Is + max number of rows. + + + 16 bit options flags + + + Constructs a Row record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the logical row number for this row (0 based index) + @return row - the row number + + + Get the logical col number for the first cell this row (0 based index) + @return col - the col number + + + Get the logical col number for the last cell this row plus one (0 based index) + @return col - the last col number + 1 + + + Get the height of the row + @return height of the row + + + Get whether to optimize or not (Set to 0) + @return optimize (Set to 0) + + + Gets the option bitmask. (use the individual bit Setters that refer to this + method) + @return options - the bitmask + + + Get the outline level of this row + @return ol - the outline level + @see #GetOptionFlags() + + + Get whether or not to colapse this row + @return c - colapse or not + @see #GetOptionFlags() + + + Get whether or not to Display this row with 0 height + @return - z height is zero or not. + @see #GetOptionFlags() + + + Get whether the font and row height are not compatible + @return - f -true if they aren't compatible (damn not logic) + @see #GetOptionFlags() + + + Get whether the row has been formatted (even if its got all blank cells) + @return formatted or not + @see #GetOptionFlags() + + + if the row is formatted then this is the index to the extended format record + @see org.apache.poi.hssf.record.ExtendedFormatRecord + @return index to the XF record or bogus value (undefined) if Isn't formatted + + + bit that specifies whether any cell in the row has a thick top border, or any + cell in the row directly above the current row has a thick bottom border. + @param f has thick top border + + + A bit that specifies whether any cell in the row has a medium or thick + bottom border, or any cell in the row directly below the current row has + a medium or thick top border. + @param f has thick bottom border + + + A bit that specifies whether the phonetic guide feature is enabled for + any cell in this row. + @param f use phoenetic guide + + + Title: Save Recalc Record + Description: defines whether to recalculate before saving (Set to true) + REFERENCE: PG 381 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs an SaveRecalc record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether to recalculate formulas/etc before saving or not + @return recalc - whether to recalculate or not + + + Title: Scenario Protect Record + Description: I have no idea what a Scenario is or why on would want to + protect it with the lamest "security" ever invented. However this record tells + excel "I want to protect my scenarios" (0xAF) with lame security. It appears + in conjunction with the PASSWORD and PROTECT records as well as its object + protect cousin. + REFERENCE: PG 383 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + + + Constructs a Protect record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether the sheet is protected or not + @return whether to protect the sheet or not + + + * Specifies the window's zoom magnification. If this record Isn't present then the windows zoom is 100%. see p384 Excel Dev Kit + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Andrew C. Oliver (acoliver at apache.org) + + + Constructs a SCL record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the numerator field for the SCL record. + + + Get the denominator field for the SCL record. + + + Title: Selection Record + Description: shows the user's selection on the sheet + for Write Set num refs to 0 + + TODO : Fully implement reference subrecords. + REFERENCE: PG 291 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @author Glen Stampoultzis (glens at apache.org) + + + + Constructs a Selection record and Sets its fields appropriately. + + the RecordInputstream to Read the record from + + + + Gets or sets the pane this is for. + + The pane. + + + + Gets or sets the active cell row. + + row number of active cell + + + + Gets or sets the active cell's col + + number of active cell + + + + Gets or sets the active cell's reference number + + ref number of active cell + + + Title: SharedFormulaRecord + Description: Primarily used as an excel optimization so that multiple similar formulas + are not written out too many times. We should recognize this record and + Serialize as Is since this Is used when Reading templates. + + Note: the documentation says that the SID Is BC where biffviewer reports 4BC. The hex dump shows + that the two byte sid representation to be 'BC 04' that Is consistent with the other high byte + record types. + @author Danny Mui at apache dot org + + + @param in the RecordInputstream to Read the record from + + + print a sort of string representation ([SHARED FORMULA RECORD] id = x [/SHARED FORMULA RECORD]) + + + @return the equivalent {@link Ptg} array that the formula would have, were it not shared. + + + Handles the task of deserializing a SST string. The two main entry points are + + @author Glen Stampoultzis (glens at apache.org) + @author Jason Height (jheight at apache.org) + + + This Is the starting point where strings are constructed. Note that + strings may span across multiple continuations. Read the SST record + carefully before beginning to hack. + + + Title: Static String Table Record + + Description: This holds all the strings for LabelSSTRecords. + + REFERENCE: PG 389 Microsoft Excel 97 Developer's Kit (ISBN: + 1-57231-498-2) + + @author Andrew C. Oliver (acoliver at apache dot org) + @author Marc Johnson (mjohnson at apache dot org) + @author Glen Stampoultzis (glens at apache.org) + + @see org.apache.poi.hssf.record.LabelSSTRecord + @see org.apache.poi.hssf.record.ContinueRecord + + + how big can an SST record be? As big as any record can be: 8228 bytes + + + standard record overhead: two shorts (record id plus data space size) + + + SST overhead: the standard record overhead, plus the number of strings and the number of Unique strings -- two ints + + + how much data can we stuff into an SST record? That would be _max minus the standard SST record overhead + + + Union of strings in the SST and EXTSST + + + according to docs ONLY SST + + + Offsets from the beginning of the SST record (even across continuations) + + + Offsets relative the start of the current SST or continue record + + + default constructor + + + Constructs an SST record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Add a string. + + @param string string to be Added + + @return the index of that string in the table + + + Get a particular string by its index + + @param id index into the array of strings + + @return the desired string + + + Return a debugging string representation + + @return string representation + + + @return hashcode + + + @return an iterator of the strings we hold. All instances are + UnicodeStrings + + + called by the class that Is responsible for writing this sucker. + Subclasses should implement this so that their data Is passed back in a + byte array. + + @return size + + + Creates an extended string record based on the current contents of + the current SST record. The offset within the stream to the SST record + Is required because the extended string record points directly to the + strings in the SST record. + + NOTE: THIS FUNCTION MUST ONLY BE CALLED AFTER THE SST RECORD HAS BEEN + SERIALIZED. + + @param sstOffset The offset in the stream to the start of the + SST record. + @return The new SST record. + + + Calculates the size in bytes of the EXTSST record as it would be if the + record was Serialized. + + @return The size of the ExtSST record in bytes. + + + @return number of strings + + + @return number of Unique strings + + + @return sid + + + @return count of the strings we hold. + + + This class handles serialization of SST records. It utilizes the record processor + class write individual records. This has been refactored from the SSTRecord class. + + @author Glen Stampoultzis (glens at apache.org) + + + OffSets from the beginning of the SST record (even across continuations) + + + OffSets relative the start of the current SST or continue record + + + Supports the STRING record structure. + + @author Glen Stampoultzis (glens at apache.org) + + + Constructs a String record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + called by the class that Is responsible for writing this sucker. + Subclasses should implement this so that their data Is passed back in a + byte array. + + @param offset to begin writing at + @param data byte array containing instance data + @return number of bytes written + + + return the non static version of the id for this record. + + + @return The string represented by this record. + + + Title: Style Record + Description: Describes a builtin to the gui or user defined style + REFERENCE: PG 390 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author aviks : string fixes for UserDefined Style + @version 2.0-pre + + + Constructs a Style record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + if this is a builtin style set the number of the built in style + @param builtinStyleId style number (0-7) + + + + Get the actual index of the style extended format record + @see #Index + @return index of the xf record + + + Get the style's name + @return name of the style + @see #NameLength + + + Get the row or column level of the style (if builtin 1||2) + + + * The common object data record is used to store all common preferences for an excel object. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a CommonObjectData record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the object type field for the CommonObjectData record. + + + Get the object id field for the CommonObjectData record. + + + Get the option field for the CommonObjectData record. + + + Get the reserved1 field for the CommonObjectData record. + + + Get the reserved2 field for the CommonObjectData record. + + + Get the reserved3 field for the CommonObjectData record. + + + true if object is locked when sheet has been protected + @return the locked field value. + + + object appears when printed + @return the printable field value. + + + whether object uses an automatic Fill style + @return the autoFill field value. + + + whether object uses an automatic line style + @return the autoline field value. + + + A sub-record within the OBJ record which stores a reference to an object + stored in a Separate entry within the OLE2 compound file. + + @author Daniel Noll + + + either an area or a cell ref + + + Formulas often have a single non-zero trailing byte. + This is in a similar position to he pre-streamId padding + It is unknown if the value is important (it seems to mirror a value a few bytes earlier) + + + + Constructs an EmbeddedObjectRef record and Sets its fields appropriately. + + @param in the record input stream. + + + Gets the stream ID containing the actual data. The data itself + can be found under a top-level directory entry in the OLE2 filesystem + under the name "MBDxxxxxxxx" where xxxxxxxx is + this ID converted into hex (in big endian order, funnily enough.) + + @return the data stream ID. Possibly null + + + * The end data record is used to denote the end of the subrecords. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a End record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + * The Group marker record is used as a position holder for Groups. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a Group marker record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + From [MS-XLS].pdf 2.5.147 FtLbsData: + + An unsigned integer that indirectly specifies whether + some of the data in this structure appear in a subsequent Continue record. + If _cbFContinued is 0x00, all of the fields in this structure except sid and _cbFContinued + MUST NOT exist. If this entire structure is Contained within the same record, + then _cbFContinued MUST be greater than or equal to the size, in bytes, + of this structure, not including the four bytes for the ft and _cbFContinued fields + + + a formula that specifies the range of cell values that are the items in this list. + + + An unsigned integer that specifies the number of items in the list. + + + An unsigned integer that specifies the one-based index of the first selected item in this list. + A value of 0x00 specifies there is no currently selected item. + + + flags that tell what data follows + + + An ObjId that specifies the edit box associated with this list. + A value of 0x00 specifies that there is no edit box associated with this list. + + + An optional LbsDropData that specifies properties for this dropdown control. + This field MUST exist if and only if the Containing Obj?s cmo.ot is equal to 0x14. + + + An optional array of strings where each string specifies an item in the list. + The number of elements in this array, if it exists, MUST be {@link #_cLines} + + + An optional array of bools that specifies + which items in the list are part of a multiple selection + + + @param in the stream to read data from + @param cbFContinued the seconf short in the record header + @param cmoOt the Containing Obj's {@link CommonObjectDataSubRecord#field_1_objectType} + + + + @return a new instance of LbsDataSubRecord to construct auto-filters + @see org.apache.poi.hssf.model.ComboboxShape#createObjRecord(org.apache.poi.hssf.usermodel.HSSFSimpleShape, int) + + + + @return the formula that specifies the range of cell values that are the items in this list. + + + @return the number of items in the list + + + This structure specifies properties of the dropdown list control + + + Combo dropdown control + + + Combo Edit dropdown control + + + Simple dropdown control (just the dropdown button) + + + An unsigned integer that specifies the style of this dropdown. + + + An unsigned integer that specifies the number of lines to be displayed in the dropdown. + + + An unsigned integer that specifies the smallest width in pixels allowed for the dropdown window + + + a string that specifies the current string value in the dropdown + + + Optional, undefined and MUST be ignored. + This field MUST exist if and only if the size of str in bytes is an odd number + + + Represents a NoteStructure (0xD) sub record. + + + The docs say nothing about it. The Length of this record is always 26 bytes. + + + @author Yegor Kozlov + + + Construct a new NoteStructureSubRecord and + Fill its data with the default values + + + Constructs a NoteStructureSubRecord and Sets its fields appropriately. + + + + Convert this record to string. + Used by BiffViewer and other utulities. + + + Serialize the record data into the supplied array of bytes + + @param offset offset in the data + @param data the data to Serialize into + + @return size of the record + + + Size of record + + + @return id of this record. + + + + FtSbs structure + + + + Title: Sup Book (EXTERNALBOOK) + Description: A External Workbook Description (Suplemental Book) + Its only a dummy record for making new ExternSheet Record + REFERENCE: 5.38 + @author Libin Roman (Vista Portal LDT. Developer) + @author Andrew C. Oliver (acoliver@apache.org) + + + + Constructs a Extern Sheet record and Sets its fields appropriately. + + @param id id must be 0x16 or an exception will be throw upon validation + @param size the size of the data area of the record + @param data data of the record (should not contain sid/len) + + + Title: Sheet Tab Index Array Record + Description: Contains an array of sheet id's. Sheets always keep their ID + regardless of what their name Is. + REFERENCE: PG 412 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a TabID record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Set the tab array. (0,1,2). + @param array of tab id's {0,1,2} + + + Get the tab array. (0,1,2). + @return array of tab id's {0,1,2} + + + DATATABLE (0x0236)

+ + TableRecord - The record specifies a data table. + This record Is preceded by a single Formula record that + defines the first cell in the data table, which should + only contain a single Ptg, {@link TblPtg}. + + See p536 of the June 08 binary docs + + + TABLESTYLES (0x088E)
+ + @author Patrick Cheng +
+ + expect tRef, tRef3D, tArea, tArea3D or tName + + + Not clear if needed . Excel seems to be OK if this byte is not present. + Value is often the same as the earlier firstColumn byte. + + + Get the text orientation field for the TextObjectBase record. + + @return a TextOrientation + + + @return the Horizontal text alignment field value. + + + @return the Vertical text alignment field value. + + + Text has been locked + @return the text locked field value. + + + Record for the top margin. + NOTE: This source was automatically generated. + + @author Shawn Laubach (slaubach at apache dot org) + + + Constructs a TopMargin record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Get the margin field for the TopMargin record. + + + Title: Uncalced Record + + If this record occurs in the Worksheet Substream, it indicates that the formulas have not + been recalculated before the document was saved. + + @author Olivier Leprince + + + Default constructor + + + Read constructor + + + Title: Unknown Record (for debugging) + Description: Unknown record just tells you the sid so you can figure out + what records you are missing. Also helps us Read/modify sheets we + don't know all the records to. (HSSF leaves these alone!) + Company: SuperLink Software, Inc. + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @author Glen Stampoultzis (glens at apache.org) + + + @param id id of the record -not Validated, just stored for serialization + @param data the data + + + construct an Unknown record. No fields are interperated and the record will + be Serialized in its original form more or less + @param in the RecordInputstream to Read the record from + + + spit the record out AS IS. no interpretation or identification + + + print a sort of string representation ([UNKNOWN RECORD] id = x [/UNKNOWN RECORD]) + + + These BIFF record types are known but still uninterpreted by POI + + @return the documented name of this BIFF record type, null if unknown to POI + + + @return true if the unknown record id has been observed in POI unit tests + + + Unlike the other Record.Clone methods this Is a shallow Clone + + + The UserSViewBegin record specifies Settings for a custom view associated with the sheet. + This record also marks the start of custom view records, which save custom view Settings. + Records between {@link UserSViewBegin} and {@link UserSViewEnd} contain Settings for the custom view, + not Settings for the sheet itself. + + @author Yegor Kozlov + + + construct an UserSViewBegin record. No fields are interpreted and the record will + be Serialized in its original form more or less + @param in the RecordInputstream to read the record from + + + spit the record out AS IS. no interpretation or identification + + + @return Globally unique identifier for the custom view + + + The UserSViewEnd record marks the end of the Settings for a custom view associated with the sheet + + @author Yegor Kozlov + + + construct an UserSViewEnd record. No fields are interpreted and the record will + be Serialized in its original form more or less + @param in the RecordInputstream to read the record from + + + spit the record out AS IS. no interpretation or identification + + + Title: Use Natural Language Formulas Flag + Description: Tells the GUI if this was written by something that can use + "natural language" formulas. HSSF can't. + REFERENCE: PG 420 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a UseSelFS record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Title: VCenter record + Description: tells whether to center the sheet between vertical margins + REFERENCE: PG 420 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs a VCENTER record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether to center vertically or not + @return vcenter or not + + + VerticalPageBreak record that stores page breaks at columns + + This class Is just used so that SID Compares work properly in the RecordFactory + @see PageBreakRecord + @author Danny Mui (dmui at apache dot org) + + + + + + @param in the RecordInputstream to Read the record from + + + Title: Window1 Record + Description: Stores the attributes of the workbook window. This Is basically + so the gui knows how big to make the window holding the spReadsheet + document. + REFERENCE: PG 421 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a WindowOne record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the horizontal position of the window (in 1/20ths of a point) + @return h - horizontal location + + + Get the vertical position of the window (in 1/20ths of a point) + @return v - vertical location + + + Get the width of the window + @return width + + + Get the height of the window + @return height + + + Get the options bitmask (see bit Setters) + + @return o - the bitmask + + + Get whether the window Is hidden or not + @return Ishidden or not + + + Get whether the window has been iconized or not + @return iconize or not + + + Get whether to Display the horizontal scrollbar or not + @return Display or not + + + Get whether to Display the vertical scrollbar or not + @return Display or not + + + Get whether to Display the tabs or not + @return Display or not + + + @return the index of the currently Displayed sheet + + + deprecated May 2008 + @deprecated - Misleading name - use GetActiveSheetIndex() + + + @return the first visible sheet in the worksheet tab-bar. + I.E. the scroll position of the tab-bar. + + + deprecated May 2008 + @deprecated - Misleading name - use GetFirstVisibleTab() + + + Get the number of selected tabs + @return number of tabs + + + ratio of the width of the tabs to the horizontal scrollbar + @return ratio + + + Title: Window Protect Record + Description: flags whether workbook windows are protected + REFERENCE: PG 424 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a WindowProtect record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Is this window protected or not + + @return protected or not + + + Title: Window Two Record + Description: sheet window Settings + REFERENCE: PG 422 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs a WindowTwo record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the options bitmask or just use the bit Setters. + @return options + + + Get whether the window should Display formulas + @return formulas or not + + + Get whether the window should Display gridlines + @return gridlines or not + + + Get whether the window should Display row and column headings + @return headings or not + + + Get whether the window should freeze panes + @return freeze panes or not + + + Get whether the window should Display zero values + @return zeros or not + + + Get whether the window should Display a default header + @return header or not + + + Is this arabic? + @return arabic or not + + + Get whether the outline symbols are displaed + @return symbols or not + + + freeze Unsplit panes or not + @return freeze or not + + + sheet tab Is selected + @return selected or not + + + Is the sheet currently Displayed in the window + @return Displayed or not + + + deprecated May 2008 + @deprecated use IsActive() + + + was the sheet saved in page break view + @return pagebreaksaved or not + + + Get the top row visible in the window + @return toprow + + + Get the leftmost column Displayed in the window + @return leftmost + + + Get the palette index for the header color + @return color + + + zoom magification in page break view + @return zoom + + + Get the zoom magnification in normal view + @return zoom + + + Get the reserved bits - why would you do this? + @return reserved stuff -probably garbage + + + Title: Write Access Record + Description: Stores the username of that who owns the spReadsheet generator + (on Unix the user's login, on Windoze its the name you typed when + you installed the thing) + REFERENCE: PG 424 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + this record is always padded to a constant length + + + Constructs a WriteAccess record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the username for the user that Created the report. HSSF uses the logged in user. On + natively Created M$ Excel sheet this would be the name you typed in when you installed it + in most cases. + @return username of the user who Is logged in (probably "tomcat" or "apache") + + + Title: Write Protect Record + Description: Indicated that the sheet/workbook Is Write protected. + REFERENCE: PG 425 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @version 3.0-pre + + + Constructs a WriteAccess record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Title: WSBool Record. + Description: stores workbook Settings (aka its a big "everything we didn't + put somewhere else") + REFERENCE: PG 425 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Glen Stampoultzis (gstamp@iprimus.com.au) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs a WSBool record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get first byte (see bit Getters) + + +

+ Whether to show automatic page breaks or not + +
+ + + Whether sheet is a dialog sheet or not + + + + + Get if row summaries appear below detail in the outline + + + + + Get if col summaries appear right of the detail in the outline + + + + + Get the second byte (see bit Getters) + + + + + fit to page option is on + + + + + Whether to display the guts or not + + + + + whether alternate expression evaluation is on + + + + + whether alternative formula entry is on + + + + Has methods for construction of a chart object. + + @author Glen Stampoultzis (glens at apache.org) + + + Creates a bar chart. API needs some work. :) + + NOTE: Does not yet work... checking it in just so others + can take a look. + + + Returns all the charts for the given sheet. + + NOTE: You won't be able to do very much with + these charts yet, as this is very limited support + + + Set value range (basic Axis Options) + @param axisIndex 0 - primary axis, 1 - secondary axis + @param minimum minimum value; Double.NaN - automatic; null - no change + @param maximum maximum value; Double.NaN - automatic; null - no change + @param majorUnit major unit value; Double.NaN - automatic; null - no change + @param minorUnit minor unit value; Double.NaN - automatic; null - no change + + + Get the X offset of the chart + + + Get the Y offset of the chart + + + Get the width of the chart. {@link ChartRecord} + + + Get the height of the chart. {@link ChartRecord} + + + Returns the series of the chart + + + Returns the chart's title, if there is one, + or null if not + + + A series in a chart + + + @return record with data names + + + @return record with data values + + + @return record with data category labels + + + @return record with data secondary category labels + + + @return record with series + + + See {@link SeriesRecord} + + + Returns the series' title, if there is one, + or null if not + + + + Contains raw Excel error codes (as defined in OOO's excelfileformat.pdf (2.5.6) + @author Michael Harhen + + + + #NULL! - Intersection of two cell ranges is empty + + + #DIV/0! - Division by zero + + + #VALUE! - Wrong type of operand + + + #REF! - Illegal or deleted cell reference + + + #NAME? - Wrong function or range name + + + #NUM! - Value range overflow + + + #N/A - Argument or function not available + + + + Gets standard Excel error literal for the specified error code. + @throws ArgumentException if the specified error code is not one of the 7 + standard error codes + + The error code. + + + + + Determines whether [is valid code] [the specified error code]. + + The error code. + + true if the specified error code is a standard Excel error code.; otherwise, false. + + + +

A class describing attributes of the Big Block Size

+
+ + Returns the value that Gets written into the + header. + Is the power of two that corresponds to the + size of the block, eg 512 => 9 + + + + A repository for constants shared by POI classes. + @author Marc Johnson (mjohnson at apache dot org) + + + + Most files use 512 bytes as their big block size + + + Some use 4096 bytes + + + Most files use 512 bytes as their big block size + + + Most files use 512 bytes as their big block size + + + How big a block in the small block stream is. Fixed size + + + How big a single property is + + + The minimum size of a document before it's stored using + Big Blocks (normal streams). Smaller documents go in the + Mini Stream (SBAT / Small Blocks) + + + The highest sector number you're allowed, 0xFFFFFFFA + + + Indicates the sector holds a FAT block (0xFFFFFFFD) + + + Indicates the sector holds a DIFAT block (0xFFFFFFFC) + + + Indicates the sector is the end of a chain (0xFFFFFFFE) + + + Indicates the sector is not used (0xFFFFFFFF) + + + The first 4 bytes of an OOXML file, used in detection + + + + This class contains methods used to inspect POIFSViewable objects + @author Marc Johnson (mjohnson at apache dot org) + + + + + Inspect an object that may be viewable, and drill down if told to + + the object to be viewed + if true and the object implements POIFSViewable, inspect the objects' contents + how far in to indent each string + string to use for indenting + a List of Strings holding the content + + + + Indents the specified indent level. + + how far in to indent each string + string to use for indenting + The data. + + + + + An event-driven Reader for POIFS file systems. Users of this class + first Create an instance of it, then use the RegisterListener + methods to Register POIFSReaderListener instances for specific + documents. Once all the listeners have been Registered, the Read() + method is called, which results in the listeners being notified as + their documents are Read. + @author Marc Johnson (mjohnson at apache dot org) + + + + + Initializes a new instance of the class. + + + + + Read from an InputStream and Process the documents we Get + + the InputStream from which to Read the data + POIFSDocument list + + + Register a POIFSReaderListener for all documents + + @param listener the listener to be registered + + @exception NullPointerException if listener is null + @exception IllegalStateException if read() has already been + called + + + Register a POIFSReaderListener for a document in the root + directory + + @param listener the listener to be registered + @param name the document name + + @exception NullPointerException if listener is null or name is + null or empty + @exception IllegalStateException if read() has already been + called + + + Register a POIFSReaderListener for a document in the specified + directory + + @param listener the listener to be registered + @param path the document path; if null, the root directory is + assumed + @param name the document name + + @exception NullPointerException if listener is null or name is + null or empty + @exception IllegalStateException if read() has already been + called + + + + Processes the properties. + + The small_blocks. + The big_blocks. + The properties. + The path. + + + + Class POIFSReaderEvent + + @author Marc Johnson (mjohnson at apache dot org) + @version %I%, %G% + + + package scoped constructor + + @param stream the DocumentInputStream, freshly opened + @param path the path of the document + @param documentName the name of the document + + + @return the DocumentInputStream, freshly opened + + + @return the document's path + + + @return the document's name + + + + EventArgs for POIFSReader + author: Tony Qu + + + + Interface POIFSReaderListener + + @author Marc Johnson (mjohnson at apache dot org) + @version %I%, %G% + + + Process a POIFSReaderEvent that this listener had Registered + for + + @param event the POIFSReaderEvent + + + A registry for POIFSReaderListeners and the DocumentDescriptors of + the documents those listeners are interested in + + @author Marc Johnson (mjohnson at apache dot org) + @version %I%, %G% + + + Construct the registry + + + Register a POIFSReaderListener for a particular document + + @param listener the listener + @param path the path of the document of interest + @param documentName the name of the document of interest + + + Register for all documents + + @param listener the listener who wants to Get all documents + + + Get am iterator of listeners for a particular document + + @param path the document path + @param name the name of the document + + @return an Iterator POIFSReaderListeners; may be empty + + + Represents a cell being used for forked Evaluation that has had a value Set different from the + corresponding cell in the shared master workbook. + + @author Josh Micich + + + Abstracts a cell for the purpose of formula evaluation. This interface represents both formula + and non-formula cells.
+ + Implementors of this class must implement {@link #HashCode()} and {@link #Equals(Object)} + To provide an identity relationship based on the underlying HSSF or XSSF cell

+ + For POI internal use only + + @author Josh Micich + + + corresponding cell from master workbook + + + Represents a sheet being used for forked Evaluation. Initially, objects of this class contain + only the cells from the master workbook. By calling {@link #getOrCreateUpdatableCell(int, int)}, + the master cell object is logically Replaced with a {@link ForkedEvaluationCell} instance, which + will be used in all subsequent Evaluations. + + @author Josh Micich + + + Abstracts a sheet for the purpose of formula evaluation.
+ + For POI internal use only + + @author Josh Micich +
+ + @return null if there is no cell at the specified coordinates + + + Only cells which have been split are Put in this map. (This has been done to conserve memory). + + + Represents a workbook being used for forked Evaluation. Most operations are delegated to the + shared master workbook, except those that potentially involve cell values that may have been + updated After a call to {@link #getOrCreateUpdatableCell(String, int, int)}. + + @author Josh Micich + + + Abstracts a workbook for the purpose of formula evaluation.
+ + For POI internal use only + + @author Josh Micich +
+ + @return -1 if the specified sheet is from a different book + + + HSSF Only - fetch the external-style sheet details +

Return will have no workbook set if it's actually in our own workbook

+
+ + XSSF Only - fetch the external-style sheet details +

Return will have no workbook set if it's actually in our own workbook

+
+ + HSSF Only - convert an external sheet index to an internal sheet index, + for an external-style reference to one of this workbook's own sheets + + + HSSF Only - fetch the external-style name details + + + XSSF Only - fetch the external-style name details + + + An alternative workbook Evaluator that saves memory in situations where a single workbook is + concurrently and independently Evaluated many times. With standard formula Evaluation, around + 90% of memory consumption is due to loading of the {@link HSSFWorkbook} or {@link NPOI.xssf.usermodel.XSSFWorkbook}. + This class enables a 'master workbook' to be loaded just once and shared between many Evaluation + clients. Each Evaluation client Creates its own {@link ForkedEvaluator} and can Set cell values + that will be used for local Evaluations (and don't disturb Evaluations on other Evaluators). + + @author Josh Micich + + + @deprecated (Sep 2009) (reduce overloading) use {@link #Create(Workbook, IStabilityClassifier, UDFFinder)} + + + @param udfFinder pass null for default (AnalysisToolPak only) + + + Sets the specified cell to the supplied value + @param sheetName the name of the sheet Containing the cell + @param rowIndex zero based + @param columnIndex zero based + + + Copies the values of all updated cells (modified by calls to {@link + #updateCell(String, int, int, ValueEval)}) to the supplied workbook.
+ Typically, the supplied workbook is a writable copy of the 'master workbook', + but at the very least it must contain sheets with the same names. +
+ + If cell Contains a formula, the formula is Evaluated and returned, + else the CellValue simply copies the appropriate cell value from + the cell and also its cell type. This method should be preferred over + EvaluateInCell() when the call should not modify the contents of the + original cell. + + @param sheetName the name of the sheet Containing the cell + @param rowIndex zero based + @param columnIndex zero based + @return null if the supplied cell is null or blank + + + Coordinates several formula Evaluators together so that formulas that involve external + references can be Evaluated. + @param workbookNames the simple file names used to identify the workbooks in formulas + with external links (for example "MyData.xls" as used in a formula "[MyData.xls]Sheet1!A1") + @param Evaluators all Evaluators for the full Set of workbooks required by the formulas. + + + contribute by Pavel Egorov + https://github.com/xoposhiy/npoi/commit/27b34a2389030c7115a666ace65daafda40d61af + Implementation of Excel ISERR() function.

+ + Syntax:
+ ISERR(value)

+ + value The value to be tested

+ + Returns the logical value TRUE if value refers to any error value except + '#N/A'; otherwise, it returns FALSE. + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @param arg any {@link ValueEval}, potentially {@link BlankEval} or {@link ErrorEval}. + + + Encapsulates logic to convert shared formulaa into non shared equivalent + + + Creates a non shared formula from the shared formula counterpart, i.e. + Converts the shared formula into the equivalent {@link org.apache.poi.ss.formula.ptg.Ptg} array that it would have, + were it not shared. + + @param ptgs parsed tokens of the shared formula + @param formulaRow + @param formulaColumn + + +

+ No diagional border + +
+ + + Backward diagional border, from left-top to right-bottom + + + + + Forward diagional border, from right-top to left-bottom + + + + + Both forward and backward diagional border + + + + Returns point value at specified index. + + @param index index to value from + @return point value at specified index. + @throws {@code IndexOutOfBoundsException} if index + parameter not in range {@code 0 <= index <= pointCount} + + + Return number of points contained by data source. + + @return number of points contained by data source + + + Returns {@code true} if charts data source is valid cell range. + + @return {@code true} if charts data source is valid cell range + + + Returns {@code true} if data source points should be treated as numbers. + + @return {@code true} if data source points should be treated as numbers + + + Returns formula representation of the data source. It is only applicable + for data source that is valid cell range. + + @return formula representation of the data source + @throws {@code UnsupportedOperationException} if the data source is not a + reference. + + + Sets the title of the series as a string literal. + + @param title + + + Sets the title of the series as a cell reference. + + @param titleReference + + + @return title as string literal. + + + @return title as cell reference. + + + @return title type. + + + + Data for a Line Chart + + + + + + + A base for all chart data types. + + + @author Roman Kashitsyn + + + + + Fills a chart with data specified by implementation. + + a chart to fill in + chart axis to use + + + @return list of all series. + + + @return data source used for category axis data. + + + @return data source used for value axis. + + + Enum mapping the values of STDataConsolidateFunction + + + the different types of possible underline formatting + + @author Gisella Bronzetti + + + Single-line underlining under each character in the cell. + The underline is drawn through the descenders of + characters such as g and p.. + + + Double-line underlining under each character in the + cell. underlines are drawn through the descenders of + characters such as g and p. + + + Single-line accounting underlining under each + character in the cell. The underline is drawn under the + descenders of characters such as g and p. + + + Double-line accounting underlining under each + character in the cell. The underlines are drawn under + the descenders of characters such as g and p. + + + No underline. + + +

Format class that handles Excel style fractions, such as "# #/#" and "#/###"

+ +

As of this writing, this is still not 100% accurate, but it does a reasonable job + of trying to mimic Excel's fraction calculations. It does not currently + maintain Excel's spacing.

+ +

This class relies on a method lifted nearly verbatim from org.apache.math.fraction. + If further uses for Commons Math are found, we will consider Adding it as a dependency. + For now, we have in-lined the one method to keep things simple.

+
+ + + A substitute class for Format class in Java + + + + Single parameter ctor + @param denomFormatString The format string for the denominator + + + The denominator. + + + The numerator. + + + Create a fraction given a double value and a denominator. + + @param val double value of fraction + @param exactDenom the exact denominator + @return a SimpleFraction with the given values set. + + + Create a fraction given the double value and either the maximum error + allowed or the maximum number of denominator digits. + + @param value the double value to convert to a fraction. + @param maxDenominator maximum denominator value allowed. + + @throws RuntimeException if the continued fraction failed to + converge. + @throws IllegalArgumentException if value > Integer.MAX_VALUE + + + Create a fraction given the double value and either the maximum error + allowed or the maximum number of denominator digits. +

+ References: +

+

+ + Based on org.apache.commons.math.fraction.Fraction from Apache Commons-Math. + YK: The only reason of having this class is to avoid dependency on the Commons-Math jar. + + @param value the double value to convert to a fraction. + @param epsilon maximum error allowed. The resulting fraction is within + epsilon of value, in absolute terms. + @param maxDenominator maximum denominator value allowed. + @param maxIterations maximum number of convergents + @throws RuntimeException if the continued fraction failed to + converge. + @throws IllegalArgumentException if value > Integer.MAX_VALUE +
+ + Create a fraction given a numerator and denominator. + @param numerator + @param denominator maxDenominator The maximum allowed value for denominator + + + Access the denominator. + @return the denominator. + + + Access the numerator. + @return the numerator. + + + + Represents data marker used in charts. + @author Roman Kashitsyn + + + + + constructor + + the sheet where data located. + the range within that sheet. + + + + Formats data marker using canonical format, for example + 'SheetName!$A$1:$A$5'. + + formatted data marker + + + + get or set the sheet marker points to. + + + + + get or set range of the marker. + + + + Convert DateFormat patterns into Excel custom number formats. + For example, to format a date in excel using the "dd MMMM, yyyy" pattern and Japanese + locale, use the following code: + +

+                  // returns "[$-0411]dd MMMM, yyyy;@" where the [$-0411] prefix tells Excel to use the Japanese locale
+                  String excelFormatPattern = DateFormatConverter.convert(Locale.JAPANESE, "dd MMMM, yyyy");
+            
+                  CellStyle cellStyle = workbook.createCellStyle();
+            
+                  DataFormat poiFormat = workbook.createDataFormat();
+                  cellStyle.setDataFormat(poiFormat.getFormat(excelFormatPattern));
+                  cell.setCellValue(new Date());
+                  cell.setCellStyle(cellStyle);  // formats date as '2012\u5e743\u670817\u65e5'
+            
+              
+ + +
+ + @author Yegor Kozlov + + + Return the dimension of this image + + @param is the stream Containing the image data + @param type type of the picture: {@link NPOI.SS.UserModel.Workbook#PICTURE_TYPE_JPEG}, + {@link NPOI.SS.UserModel.Workbook#PICTURE_TYPE_PNG} or {@link NPOI.SS.UserModel.Workbook#PICTURE_TYPE_DIB} + + @return image dimension in pixels + + + The metadata of PNG and JPEG can contain the width of a pixel in millimeters. + Return the the "effective" dpi calculated as 25.4/HorizontalPixelSize + and 25.4/VerticalPixelSize. Where 25.4 is the number of mm in inch. + + @return array of two elements: {horisontalPdi, verticalDpi}. + {96, 96} is the default. + + + Calculate and Set the preferred size (anchor) for this picture. + + @param scaleX the amount by which image width is multiplied relative to the original width. + @param scaleY the amount by which image height is multiplied relative to the original height. + @return the new Dimensions of the scaled picture in EMUs + + + Calculates the dimensions in EMUs for the anchor of the given picture + + @param picture the picture Containing the anchor + @return the dimensions in EMUs + + + Implementation of a BlockingInputStream to provide data to + RawDataBlock that expects data in 512 byte chunks. Useful to read + data from slow (ie, non FileInputStream) sources, for example when + Reading an OLE2 Document over a network. + + Possible extentions: add a timeout. Curently a call to Read(byte[]) on this + class is blocking, so use at your own peril if your underlying stream blocks. + + @author Jens Gerhard + @author aviks - documentation cleanups. + + + We had to revert to byte per byte Reading to keep + with slow network connections on one hand, without + missing the end-of-file. + This is the only method that does its own thing in this class + everything else is delegated to aggregated stream. + THIS IS A BLOCKING BLOCK READ!!! + + + + Returns the number of elements between the current position and the limit. + + The number of elements remaining in this buffer + + + + Tells whether there are any elements between the current position and the limit. + + true if, and only if, there is at least one element remaining in this buffer + + + + Represents a class ID (16 bytes). Unlike other little-endian + type the {@link ClassID} is not just 16 bytes stored in the wrong + order. Instead, it is a double word (4 bytes) followed by two + words (2 bytes each) followed by 8 bytes. + @author Rainer Klute + klute@rainer-klute.de + @version $Id: ClassID.java 489730 2006-12-22 19:18:16Z bayard $ + @since 2002-02-09 + + + + The number of bytes occupied by this object in the byte + stream. + + + The bytes making out the class ID in correct order, + i.e. big-endian. + + + + Creates a and Reads its value from a byte array. + + The byte array to Read from. + The offset of the first byte to Read. + + + + Creates a and initializes its value with 0x00 bytes. + + + +

Creates a {@link ClassID} from a human-readable representation of the Class ID in standard + format "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}".

+ + @param externalForm representation of the Class ID represented by this object. +
+ + + Reads the class ID's value from a byte array by turning little-endian into big-endian. + + The byte array to Read from + The offset within the + A byte array containing the class ID. + + + + Writes the class ID to a byte array in the little-endian format. + + The byte array to Write to. + The offset within the + + + + Checks whether this ClassID is equal to another + object. + + the object to compare this PropertySet with + true if the objects are equal, else + false + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a human-Readable representation of the Class ID in standard + format "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}". + + + A String representation of the Class ID represented by this object.. + + + + + Gets the length. + + The number of bytes occupied by this object in the byte stream. + + + + Gets or sets the bytes making out the class ID. They are returned in correct order, i.e. big-endian. + + the bytes making out the class ID.. + + + + Simple implementation of DirectoryEntry + @author Marc Johnson (mjohnson at apache dot org) + + + + + Abstract implementation of Entry + Extending classes should override isDocument() or isDirectory(), as + appropriate + Extending classes must override isDeleteOK() + @author Marc Johnson (mjohnson at apache dot org) + + + + + Create a DocumentNode. ThIs method Is not public by design; it + Is intended strictly for the internal use of extending classes + + the Property for this Entry + the parent of this entry + + + + Delete this Entry. ThIs operation should succeed, but there are + special circumstances when it will not: + If this Entry Is the root of the Entry tree, it cannot be + deleted, as there Is no way to Create another one. + If this Entry Is a directory, it cannot be deleted unless it Is + empty. + + + true if the Entry was successfully deleted, else false + + + + + Rename this Entry. ThIs operation will fail if: + There Is a sibling Entry (i.e., an Entry whose parent Is the + same as this Entry's parent) with the same name. + ThIs Entry Is the root of the Entry tree. Its name Is dictated + by the Filesystem and many not be Changed. + + the new name for this Entry + + true if the operation succeeded, else false + + + + + grant access to the property + + the property backing this entry + + + + Is this the root of the tree? + + true if this instance is root; otherwise, false. + + + + extensions use this method to verify internal rules regarding + deletion of the underlying store. + + + true if it's ok to Delete the underlying store; otherwise, false. + + + + + Get the name of the Entry + + The name. + Get the name of the Entry + @return name + + + + Is this a DirectoryEntry? + + + true if the Entry Is a DirectoryEntry; otherwise, false. + + + + + Is this a DocumentEntry? + + + true if the Entry Is a DocumentEntry; otherwise, false. + + + + + Get this Entry's parent (the DocumentEntry that owns this + Entry). All Entry objects, except the root Entry, has a parent. + + this Entry's parent; null iff this Is the root Entry + + + + Create a DirectoryNode. This method Is not public by design; it + Is intended strictly for the internal use of this package + + the DirectoryProperty for this DirectoryEntry + the POIFSFileSystem we belong to + the parent of this entry + + + + open a document in the directory's entry's list of entries + + the name of the document to be opened + a newly opened DocumentStream + + + + Create a new DocumentEntry; the data will be provided later + + the name of the new documentEntry + the new DocumentEntry + + + + Change a contained Entry's name + + the original name + the new name + true if the operation succeeded, else false + + + + Deletes the entry. + + the EntryNode to be Deleted + true if the entry was Deleted, else false + + + + get a specified Entry by name + + the name of the Entry to obtain. + + the specified Entry, if it is directly contained in + this DirectoryEntry + + + + + Create a new DirectoryEntry + + the name of the new DirectoryEntry + the name of the new DirectoryEntry + + + + Gets the path. + + this directory's path representation + + + + get an iterator of the Entry instances contained directly in + this instance (in other words, children only; no grandchildren + etc.) + + + The entries.never null, but hasNext() may return false + immediately (i.e., this DirectoryEntry is empty). All + objects retrieved by next() are guaranteed to be + implementations of Entry. + + + + get the names of all the Entries contained directly in this + instance (in other words, names of children only; no grandchildren + etc). + + @return the names of all the entries that may be retrieved with + getEntry(String), which may be empty (if this + DirectoryEntry is empty) + + + + is this DirectoryEntry empty? + + + true if this instance contains no Entry instances; otherwise, false. + + + + + find out how many Entry instances are contained directly within + this DirectoryEntry + + + number of immediately (no grandchildren etc.) contained + Entry instances + + + + + Gets or Sets the storage clsid for the directory entry + + The storage ClassID. + + + + Is this a DirectoryEntry? + + true if the Entry Is a DirectoryEntry, else false + + + + extensions use this method to verify internal rules regarding + deletion of the underlying store. + + true if it's ok to Delete the underlying store, else + false + + + + Get an array of objects, some of which may implement POIFSViewable + + an array of Object; may not be null, but may be empty + + + + Get an Iterator of objects, some of which may implement + POIFSViewable + + an Iterator; may not be null, but may have an empty + back end store + + + + Give viewers a hint as to whether to call GetViewableArray or + GetViewableIterator + + true if a viewer should call GetViewableArray; otherwise, falseif + a viewer should call GetViewableIterator + + + + Provides a short description of the object, to be used when a + POIFSViewable object has not provided its contents. + + The short description. + + + + Class DocumentDescriptor + @author Marc Johnson (mjohnson at apache dot org) + + + + + Initializes a new instance of the class. + + the Document path + the Document name + + + + equality. Two DocumentDescriptor instances are equal if they + have equal paths and names + + the object we're checking equality for + true if the object is equal to this object + + + + Serves as a hash function for a particular type. + + + hashcode + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets the path. + + The path. + + + + Gets the name. + + The name. + + + + This interface defines methods specific to Document objects + managed by a Filesystem instance. + @author Marc Johnson (mjohnson at apache dot org) + + + + + get the size of the document, in bytes + + size in bytes + + + + Simple implementation of DocumentEntry + @author Marc Johnson (mjohnson at apache dot org) + + + + create a DocumentNode. This method Is not public by design; it + Is intended strictly for the internal use of this package + + @param property the DocumentProperty for this DocumentEntry + @param parent the parent of this entry + + + get the POIFSDocument + + @return the internal POIFSDocument + + + get the zize of the document, in bytes + + @return size in bytes + + + Is this a DocumentEntry? + + @return true if the Entry Is a DocumentEntry, else false + + + extensions use this method to verify internal rules regarding + deletion of the underlying store. + + @return true if it's ok to delete the underlying store, else + false + + + Get an array of objects, some of which may implement + POIFSViewable + + @return an array of Object; may not be null, but may be empty + + + Get an Iterator of objects, some of which may implement + POIFSViewable + + @return an Iterator; may not be null, but may have an empty + back end store + + + Give viewers a hint as to whether to call getViewableArray or + getViewableIterator + + @return true if a viewer should call getViewableArray, false if + a viewer should call getViewableIterator + + + Provides a short description of the object, to be used when a + POIFSViewable object has not provided its contents. + + @return short description + + + + This exception is thrown when we try to open a file that's actually + an Office 2007+ XML file, rather than an OLE2 file (which is what + POIFS works with) + + + + Represents an Ole10Native record which is wrapped around certain binary + files being embedded in OLE2 documents. + + @author Rainer Schwarze + + + + Creates an instance of this class from an embedded OLE Object. The OLE Object is expected + to include a stream "{01}Ole10Native" which Contains the actual + data relevant for this class. + + poifs POI Filesystem object + Returns an instance of this class + + + + Creates an instance of this class from an embedded OLE Object. The OLE Object is expected + to include a stream "{01}Ole10Native" which contains the actual + data relevant for this class. + + directory POI Filesystem object + Returns an instance of this class + + + Creates an instance and fills the fields based on ... the fields + + + Creates an instance and Fills the fields based on the data in the given buffer. + + @param data The buffer Containing the Ole10Native record + @param offset The start offset of the record in the buffer + @param plain as of POI 3.11 this parameter is ignored + @throws Ole10NativeException on invalid or unexcepted data format + + + Creates an instance and Fills the fields based on the data in the given buffer. + + @param data The buffer Containing the Ole10Native record + @param offset The start offset of the record in the buffer + @throws Ole10NativeException on invalid or unexcepted data format + + + Have the contents printer out into an OutputStream, used when writing a + file back out to disk (Normally, atom classes will keep their bytes + around, but non atom classes will just request the bytes from their + children, then chuck on their header and return) + + + Returns the value of the totalSize field - the total length of the structure + is totalSize + 4 (value of this field + size of this field). + + @return the totalSize + + + Returns flags1 - currently unknown - usually 0x0002. + + @return the flags1 + + + Returns the label field - usually the name of the file (without directory) but + probably may be any name specified during packaging/embedding the data. + + @return the label + + + Returns the fileName field - usually the name of the file being embedded + including the full path. + + @return the fileName + + + Returns flags2 - currently unknown - mostly 0x0000. + + @return the flags2 + + + Returns unknown1 field - currently unknown. + + @return the unknown1 + + + Returns the command field - usually the name of the file being embedded + including the full path, may be a command specified during embedding the file. + + @return the command + + + Returns the size of the embedded file. If the size is 0 (zero), no data has been + embedded. To be sure, that no data has been embedded, check whether + {@link #getDataBuffer()} returns null. + + @return the dataSize + + + Returns the buffer Containing the embedded file's data, or null + if no data was embedded. Note that an embedding may provide information about + the data, but the actual data is not included. (So label, filename etc. are + available, but this method returns null.) + + @return the dataBuffer + + + Returns the flags3 - currently unknown. + + @return the flags3 + + + the field encoding mode - merely a try-and-error guess ... + + + + the data is stored in parsed format - including label, command, etc. + + + the data is stored raw after the length field + + + the data is stored raw after the length field and the flags1 field + + + + Class POIFSDocumentPath + @author Marc Johnson (mjohnson at apache dot org) + + + + + simple constructor for the path of a document that is in the + root of the POIFSFileSystem. The constructor that takes an + array of Strings can also be used to create such a + POIFSDocumentPath by passing it a null or empty String array + + + + + constructor for the path of a document that is not in the root + of the POIFSFileSystem + + the Strings making up the path to a document. + The Strings must be ordered as they appear in + the directory hierarchy of the the document + -- the first string must be the name of a + directory in the root of the POIFSFileSystem, + and every Nth (for N > 1) string thereafter + must be the name of a directory in the + directory identified by the (N-1)th string. + If the components parameter is null or has + zero length, the POIFSDocumentPath is + appropriate for a document that is in the + root of a POIFSFileSystem + + + + constructor that adds additional subdirectories to an existing + path + + the existing path + the additional subdirectory names to be added + + + + equality. Two POIFSDocumentPath instances are equal if they + have the same number of component Strings, and if each + component String is equal to its coresponding component String + + the object we're checking equality for + true if the object is equal to this object + + + + get the specified component + + which component (0 ... length() - 1) + the nth component; + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets the length. + + the number of components + + + + Returns the path's parent or null if this path + is the root path. + + path of parent, or null if this path is the root path + + + + This class provides methods to read a DocumentEntry managed by a + Filesystem instance. + @author Marc Johnson (mjohnson at apache dot org) + + + + + Create an InputStream from the specified DocumentEntry + + the DocumentEntry to be read + + + + Create an InputStream from the specified Document + + the Document to be read + + + + Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. + + + + + Reads some number of bytes from the input stream and stores + them into the buffer array b. The number of bytes actually read + is returned as an integer. The definition of this method in + java.io.InputStream allows this method to block, but it won't. + If b is null, a NullPointerException is thrown. If the length + of b is zero, then no bytes are read and 0 is returned; + otherwise, there is an attempt to read at least one byte. If no + byte is available because the stream is at end of file, the + value -1 is returned; otherwise, at least one byte is read and + stored into b. + The first byte read is stored into element b[0], the next one + into b[1], and so on. The number of bytes read is, at most, + equal to the length of b. Let k be the number of bytes actually + read; these bytes will be stored in elements b[0] through + b[k-1], leaving elements b[k] through b[b.length-1] unaffected. + If the first byte cannot be read for any reason other than end + of file, then an IOException is thrown. In particular, an + IOException is thrown if the input stream has been closed. + The read(b) method for class InputStream has the same effect as: + + the buffer into which the data is read. + the total number of bytes read into the buffer, or -1 + if there is no more data because the end of the stream + has been reached. + + + + Reads up to len bytes of data from the input stream into an + array of bytes. An attempt is made to read as many as len + bytes, but a smaller number may be read, possibly zero. The + number of bytes actually read is returned as an integer. + The definition of this method in java.io.InputStream allows it + to block, but it won't. + If b is null, a NullPointerException is thrown. + If off is negative, or len is negative, or off+len is greater + than the length of the array b, then an + IndexOutOfBoundsException is thrown. + If len is zero, then no bytes are read and 0 is returned; + otherwise, there is an attempt to read at least one byte. If no + byte is available because the stream is at end of file, the + value -1 is returned; otherwise, at least one byte is read and + stored into b. + The first byte read is stored into element b[off], the next one + into b[off+1], and so on. The number of bytes read is, at most, + equal to len. Let k be the number of bytes actually read; these + bytes will be stored in elements b[off] through b[off+k-1], + leaving elements b[off+k] through b[off+len-1] unaffected. + In every case, elements b[0] through b[off] and elements + b[off+len] through b[b.length-1] are unaffected. + If the first byte cannot be read for any reason other than end + of file, then an IOException is thrown. In particular, an + IOException is thrown if the input stream has been closed. + + the buffer into which the data is read. + the start offset in array b at which the data is + written. + the maximum number of bytes to read. + the total number of bytes read into the buffer, or -1 + if there is no more data because the end of the stream + has been reached. + + + + Reads the next byte of data from the input stream. The value + byte is returned as an int in the range 0 to 255. If no byte is + available because the end of the stream has been reached, the + value -1 is returned. The definition of this method in + java.io.InputStream allows this method to block, but it won't. + + the next byte of data, or -1 if the end of the stream + is reached. + + + + + When overridden in a derived class, sets the position within the current stream. + + A byte offset relative to the parameter. + A value of type indicating the reference point used to obtain the new position. + + The new position within the current stream. + + + An I/O error occurs. + + + The stream does not support seeking, such as if the stream is constructed from a pipe or console output. + + + Methods were called after the stream was closed. + + + + + Skips the specified n. + + The n. + + + + + When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + + An array of bytes. This method copies bytes from to the current stream. + The zero-based byte offset in at which to begin copying bytes to the current stream. + The number of bytes to be written to the current stream. + + The sum of and is greater than the buffer length. + + + is null. + + + or is negative. + + + An I/O error occurs. + + + The stream does not support writing. + + + Methods were called after the stream was closed. + + + + + at the end Of document. + + + + + + Returns the number of bytes that can be read (or skipped over) + from this input stream without blocking by the next caller of a + method for this input stream. The next caller might be the same + thread or or another thread. + + the number of bytes that can be read from this input + stream without blocking. + + + + When overridden in a derived class, gets a value indicating whether the current stream supports reading. + + + true if the stream supports reading; otherwise, false. + + + + + When overridden in a derived class, gets a value indicating whether the current stream supports seeking. + + + true if the stream supports seeking; otherwise, false. + + + + + When overridden in a derived class, gets a value indicating whether the current stream supports writing. + + + true if the stream supports writing; otherwise, false. + + + + + When overridden in a derived class, gets the length in bytes of the stream. + + + + A long value representing the length of the stream in bytes. + + + A class derived from Stream does not support seeking. + + + Methods were called after the stream was closed. + + + + + When overridden in a derived class, gets or sets the position within the current stream. + + + + The current position within the stream. + + + An I/O error occurs. + + + The stream does not support seeking. + + + Methods were called after the stream was closed. + + + + + This class provides a wrapper over an OutputStream so that Document + writers can't accidently go over their size limits + @author Marc Johnson (mjohnson at apache dot org) + + + + + Create a POIFSDocumentWriter + + the OutputStream to which the data is actually + the maximum number of bytes that can be written + + + + Closes this output stream and releases any system resources + associated with this stream. The general contract of close is + that it closes the output stream. A closed stream cannot + perform output operations and cannot be reopened. + + + + + Flushes this output stream and forces any buffered output bytes + to be written out. + + + + + Writes b.length bytes from the specified byte array + to this output stream. + + the data. + + + + Writes len bytes from the specified byte array starting at + offset off to this output stream. The general contract for + write(b, off, len) is that some of the bytes in the array b are + written to the output stream in order; element b[off] is the + first byte written and b[off+len-1] is the last byte written by + this operation. + If b is null, a NullPointerException is thrown. + If off is negative, or len is negative, or off+len is greater + than the length of the array b, then an + IndexOutOfBoundsException is thrown. + + the data. + the start offset in the data. + the number of bytes to write. + + + + Writes the specified byte to this output stream. The general + contract for write is that one byte is written to the output + stream. The byte to be written is the eight low-order bits of + the argument b. The 24 high-order bits of b are ignored. + + the byte. + + + + write the rest of the document's data (fill in at the end) + + the actual number of bytes the corresponding + document must fill + the byte to fill remaining space with + + + + When overridden in a derived class, gets a value indicating whether the current stream supports reading. + + + true if the stream supports reading; otherwise, false. + + + + + When overridden in a derived class, gets a value indicating whether the current stream supports seeking. + + + true if the stream supports seeking; otherwise, false. + + + + + When overridden in a derived class, gets a value indicating whether the current stream supports writing. + + + true if the stream supports writing; otherwise, false. + + + + + When overridden in a derived class, gets the length in bytes of the stream. + + + + A long value representing the length of the stream in bytes. + + + A class derived from Stream does not support seeking. + + + Methods were called after the stream was closed. + + + + + When overridden in a derived class, gets or sets the position within the current stream. + + + + The current position within the stream. + + + An I/O error occurs. + + + The stream does not support seeking. + + + Methods were called after the stream was closed. + + + + + This is the main class of the POIFS system; it manages the entire + life cycle of the filesystem. + @author Marc Johnson (mjohnson at apache dot org) + + + + + Convenience method for clients that want to avoid the auto-Close behaviour of the constructor. + + The stream. + + A convenience method ( + CreateNonClosingInputStream()) has been provided for this purpose: + StreamwrappedStream = POIFSFileSystem.CreateNonClosingInputStream(is); + HSSFWorkbook wb = new HSSFWorkbook(wrappedStream); + is.reset(); + doSomethingElse(is); + + + + + What big block size the file uses. Most files + use 512 bytes, but a few use 4096 + + + + Initializes a new instance of the class. intended for writing + + + + + Create a POIFSFileSystem from an Stream. Normally the stream is Read until + EOF. The stream is always Closed. In the unlikely case that the caller has such a stream and + needs to use it after this constructor completes, a work around is to wrap the + stream in order to trap the Close() call. + + the Streamfrom which to Read the data + + + @param stream the stream to be Closed + @param success false if an exception is currently being thrown in the calling method + + + + Checks that the supplied Stream(which MUST + support mark and reset, or be a PushbackInputStream) + has a POIFS (OLE2) header at the start of it. + If your Streamdoes not support mark / reset, + then wrap it in a PushBackInputStream, then be + sure to always use that, and not the original! + + An Streamwhich supports either mark/reset, or is a PushbackStream + + true if [has POIFS header] [the specified inp]; otherwise, false. + + + + + Create a new document to be Added to the root directory + + the Streamfrom which the document's data will be obtained + the name of the new POIFSDocument + the new DocumentEntry + + + + Create a new DocumentEntry in the root entry; the data will be + provided later + + the name of the new DocumentEntry + the size of the new DocumentEntry + the Writer of the new DocumentEntry + the new DocumentEntry + + + + Create a new DirectoryEntry in the root directory + + the name of the new DirectoryEntry + the new DirectoryEntry + + + open a document in the root entry's list of entries + + @param documentName the name of the document to be opened + + @return a newly opened DocumentInputStream + + @exception IOException if the document does not exist or the + name is that of a DirectoryEntry + + + + Writes the file system. + + the OutputStream to which the filesystem will be + written + + + + Add a new POIFSDocument + + the POIFSDocument being Added + + + + Add a new DirectoryProperty + + The directory. + + + + Removes the specified entry. + + The entry. + + + + Get the root entry + + The root. + + + + Get an array of objects, some of which may implement + POIFSViewable + + an array of Object; may not be null, but may be empty + + + + Get an Iterator of objects, some of which may implement + POIFSViewable + + an Iterator; may not be null, but may have an empty + back end store + + + + Give viewers a hint as to whether to call GetViewableArray or + GetViewableIterator + + true if a viewer should call GetViewableArray, false if + a viewer should call GetViewableIterator + + + + Provides a short description of the object, to be used when a + POIFSViewable object has not provided its contents. + + The short description. + + + + Gets The Big Block size, normally 512 bytes, sometimes 4096 bytes + + The size of the big block. + + + + This interface defines methods for finding and setting sibling + Property instances + @author Marc Johnson (mjohnson at apache dot org) + + + + + Gets or sets the previous child. + + The previous child. + + + + Gets or sets the next child. + + The next child. + + + + Trivial extension of Property for POIFSDocuments + @author Marc Johnson (mjohnson at apache dot org) + + + + + This abstract base class is the ancestor of all classes + implementing POIFS Property behavior. + @author Marc Johnson (mjohnson at apache dot org) + + + + + Initializes a new instance of the class. + + + + + Constructor from byte data + + index number + byte data + offset into byte data + + + + Write the raw data to an OutputStream. + + the OutputStream to which the data Should be + written. + + + + does the length indicate a small document? + + length in bytes + + true if the length Is less than + _big_block_minimum_bytes; otherwise, false. + + + + + Perform whatever activities need to be performed prior to + writing + + + + + Determines whether the specified index Is valid + + value to be checked + + true if the index Is valid; otherwise, false. + + + + + Gets or sets the start block for the document referred to by this + Property. + + the start block index + + + + Based on the currently defined size, Should this property use + small blocks? + + true if the size Is less than _big_block_minimum_bytes + + + + Gets or sets the name of this property + + property name + + + + Gets a value indicating whether this instance is directory. + + + true if a directory type Property; otherwise, false. + + + + + Gets or sets the storage class ID for this property stream. ThIs Is the Class ID + of the COM object which can read and write this property stream + Storage Class ID + + + + Set the property type. Makes no attempt to validate the value. + + the property type (root, file, directory) + + + + Sets the color of the node. + + the node color (red or black) + + + + Sets the child property. + + the child property's index in the Property Table + + + + Get the child property (its index in the Property Table) + + The index of the child. + + + + Gets or sets the size of the document associated with this Property + + the size of the document, in bytes + + + + Gets or sets the index. + + The index. + Get the index for this Property + @return the index of this Property within its Property Table + + + + Gets the index of the next child. + + The index of the next child. + + + + Gets the index of the previous child. + + The index of the previous child. + + + + Gets or sets the previous child. + + the new 'previous' child; may be null, which has + the effect of saying there Is no 'previous' child + + + + Gets or sets the next Child + + the new 'next' child; may be null, which has the + effect of saying there Is no 'next' child + + + + Get an array of objects, some of which may implement + POIFSViewable + + an array of Object; may not be null, but may be empty + + + + Get an Iterator of objects, some of which may implement POIFSViewable + + may not be null, but may have an empty + back end store + + + + Give viewers a hint as to whether to call GetViewableArray or + GetViewableIterator + + true if a viewer Should call GetViewableArray; otherwise, false + if a viewer Should call GetViewableIterator + + + + + Provides a short description of the object, to be used when a + POIFSViewable object has not provided its contents. + + The short description. + + + + Behavior for parent (directory) properties + @author Marc Johnson27591@hotmail.com + + + + + Add a new child to the collection of children + + the new child to be added; must not be null + + + + Get an iterator over the children of this Parent + all elements are instances of Property. + + + + + + Sets the previous child. + + + + + Sets the next child. + + + + + Initializes a new instance of the class. + + the name of the directory + + + + Initializes a new instance of the class. + + index number + byte data + offset into byte data + + + + Change a Property's name + + the Property whose name Is being Changed. + the new name for the Property + true if the name Change could be made, else false + + + + Delete a Property + + the Property being Deleted + true if the Property could be Deleted, else false + + + + Perform whatever activities need to be performed prior to + writing + + + + + Add a new child to the collection of children + + the new child to be added; must not be null + + + + Gets a value indicating whether this instance is directory. + + + true if a directory type Property; otherwise, false. + + + + + Get an iterator over the children of this Parent; all elements + are instances of Property. + + Iterator of children; may refer to an empty collection + + + + Directory Property Comparer + + + + + Object equality, implemented as object identity + + Object we're being Compared to + true if identical, else false + + + + Compare method. Assumes both parameters are non-null + instances of Property. One property is less than another if + its name is shorter than the other property's name. If the + names are the same length, the property whose name comes + before the other property's name, alphabetically, is less + than the other property. + + first object to compare, better be a Property + second object to compare, better be a Property + negative value if o1 smaller than o2, + zero if o1 equals o2, + positive value if o1 bigger than o2. + + + + Trivial extension of Property for POIFSDocuments + @author Marc Johnson (mjohnson at apache dot org) + + + + + Initializes a new instance of the class. + + POIFSDocument name + POIFSDocument size + + + + Initializes a new instance of the class. + + index number + byte data + offset into byte data + + + + Perform whatever activities need to be performed prior to + writing + + + + Update the size of the property's data + + + + Gets or sets the document. + + the associated POIFSDocument + + + + Determines whether this instance is directory. + + + true if this instance is directory; otherwise, false. + + + + + Constants used by Properties namespace + + + + + Convert raw data blocks to an array of Property's + + The blocks to be converted + the converted List of Property objects. May contain + nulls, but will not be null + + + Default constructor + + + reading constructor (used when we've read in a file and we want + to extract the property table from it). Populates the + properties thoroughly + + @param startBlock the first block of the property table + @param blockList the list of blocks + + @exception IOException if anything goes wrong (which should be + a result of the input being NFG) + + + Prepare to be written Leon + + + Write the storage to an Stream + + @param stream the Stream to which the stored data should + be written + + @exception IOException on problems writing to the specified + stream + + + Return the number of BigBlock's this instance uses + + @return count of BigBlock instances + + + + Initializes a new instance of the class. + + index number + byte data + offset into byte data + + + + Gets or sets the size of the document associated with this Property + + the size of the document, in bytes + + + + A block of block allocation table entries. BATBlocks are created + only through a static factory method: createBATBlocks. + @author Marc Johnson (mjohnson at apache dot org) + + + + + Abstract base class of all POIFS block storage classes. All + extensions of BigBlock should write 512 bytes of data when + requested to write their data. + This class has package scope, as there is no reason at this time to + make the class public. + @author Marc Johnson (mjohnson at apache dot org) + + + + + Default implementation of write for extending classes that + contain their data in a simple array of bytes. + + the OutputStream to which the data should be written. + the byte array of to be written. + + + + Write the block's data to an OutputStream + + the OutputStream to which the stored data should be written + + + + Write the storage to an OutputStream + + the OutputStream to which the stored data should be written + + + For a regular fat block, these are 128 / 1024 + next sector values. + For a XFat (DIFat) block, these are 127 / 1023 + next sector values, then a chaining value. + + + Does this BATBlock have any free sectors in it? + + + Where in the file are we? + + + + Create a single instance initialized with default values + + + + Create a single instance initialized (perhaps partially) with entries + + @param entries the array of block allocation table entries + @param start_index the index of the first entry to be written + to the block + @param end_index the index, plus one, of the last entry to be + written to the block (writing is for all index + k, start_index <= k < end_index) + + + Create a single BATBlock from the byte buffer, which must hold at least + one big block of data to be read. + + + ** + + + + Create an array of BATBlocks from an array of int block + allocation table entries + + the poifs bigBlockSize + the array of int entries + the newly created array of BATBlocks + + + + Create an array of XBATBlocks from an array of int block + allocation table entries + + + the array of int entries + the start block of the array of XBAT blocks + the newly created array of BATBlocks + + + + Calculate how many BATBlocks are needed to hold a specified + number of BAT entries. + + the number of entries + the number of BATBlocks needed + + + + Calculate how many XBATBlocks are needed to hold a specified + number of BAT entries. + + the number of entries + the number of XBATBlocks needed + + + Calculates the maximum size of a file which is addressable given the + number of FAT (BAT) sectors specified. (We don't care if those BAT + blocks come from the 109 in the header, or from header + XBATS, it + won't affect the calculation) + + The actual file size will be between [size of fatCount-1 blocks] and + [size of fatCount blocks]. + For 512 byte block sizes, this means we may over-estimate by up to 65kb. + For 4096 byte block sizes, this means we may over-estimate by up to 4mb + + + + Create a single instance initialized (perhaps partially) with entries + + the array of block allocation table entries + the index of the first entry to be written + to the block + the index, plus one, of the last entry to be + written to the block (writing is for all index + k, start_index less than k less than end_index) + + + + + Write the block's data to an Stream + + the Stream to which the stored data should + be written + + + + Gets the entries per block. + + The number of entries per block + + + + Gets the entries per XBAT block. + + number of entries per XBAT block + + + + Gets the XBAT chain offset. + + offset of chain index of XBAT block + + + Does this BATBlock have any free sectors in it, or + is it full? + + + Retrieve where in the file we live + + + + This class manages and creates the Block Allocation Table, which is + basically a set of linked lists of block indices. + Each block of the filesystem has an index. The first block, the + header, is skipped; the first block after the header is index 0, + the next is index 1, and so on. + A block's index is also its index into the Block Allocation + Table. The entry that it finds in the Block Allocation Table is the + index of the next block in the linked list of blocks making up a + file, or it is set to -2: end of list. + + @author Marc Johnson (mjohnson at apache dot org) + + + + + create a BlockAllocationTableReader for an existing filesystem. Side + effect: when this method finishes, the BAT blocks will have + been Removed from the raw block list, and any blocks labeled as + 'unused' in the block allocation table will also have been + Removed from the raw block list. + the poifs bigBlockSize + the number of BAT blocks making up the block allocation table + the array of BAT block indices from the + filesystem's header + the number of XBAT blocks + the index of the first XBAT block + the list of RawDataBlocks + + + + create a BlockAllocationTableReader from an array of raw data blocks + + + the raw data + the list holding the managed blocks + + + + Initializes a new instance of the class. + + + + + walk the entries from a specified point and return the + associated blocks. The associated blocks are Removed from the block list + + the first block in the chain + + the raw data block list + array of ListManagedBlocks, in their correct order + + + + determine whether the block specified by index is used or not + + determine whether the block specified by index is used or not + + true if the specified block is used; otherwise, false. + + + + + return the next block index + + The index of the current block + index of the next block (may be + POIFSConstants.END_OF_CHAIN, indicating end of chain + (duh)) + + + + Convert an array of blocks into a Set of integer indices + + the array of blocks containing the indices + the list of blocks being managed. Unused + blocks will be eliminated from the list + + + + This class manages and creates the Block Allocation Table, which is + basically a set of linked lists of block indices. + Each block of the filesystem has an index. The first block, the + header, is skipped; the first block after the header is index 0, + the next is index 1, and so on. + A block's index is also its index into the Block Allocation + Table. The entry that it finds in the Block Allocation Table is the + index of the next block in the linked list of blocks making up a + file, or it is set to -2: end of list. + * + @author Marc Johnson (mjohnson at apache dot org) + + + + + Initializes a new instance of the class. + + + + + Create the BATBlocks we need + + start block index of BAT blocks + + + + Allocate space for a block of indices + + the number of blocks to allocate space for + the starting index of the blocks + + + + create the BATBlocks + + + + + Write the storage to an OutputStream + + the OutputStream to which the stored data should be written + + + + Sets the start block for this instance + + + index into the array of BigBlock instances making up the the filesystem + + + + + Gets the number of BigBlock's this instance uses + + count of BigBlock instances + + + + Interface for lists of blocks that are mapped by block allocation + tables + @author Marc Johnson (mjohnson at apache dot org) + + + + + remove the specified block from the list + + the index of the specified block; if the index is + out of range, that's ok + + + + Remove and return the specified block from the list + + the index of the specified block + the specified block + + + + get the blocks making up a particular stream in the list. The + blocks are removed from the list. + + the index of the first block in the stream + + the stream as an array of correctly ordered blocks + + + + set the associated BlockAllocationTable + + the associated BlockAllocationTable + + + + Initializes a new instance of the class. + + + + + provide blocks to manage + + blocks to be managed + + + + remove the specified block from the list + + the index of the specified block; if the index is + out of range, that's ok + + + + Remove and return the specified block from the list + + the index of the specified block + the specified block + + + + get the blocks making up a particular stream in the list. The + blocks are removed from the list. + + the index of the first block in the stream + + + the stream as an array of correctly ordered blocks + + + + + set the associated BlockAllocationTable + + the associated BlockAllocationTable + + + Wraps a byte array and provides simple data input access. + Internally, this class maintains a buffer read index, so that for the most part, primitive + data can be read in a data-input-stream-like manner.

+ + Note - the calling class should call the {@link #available()} method to detect end-of-buffer + and Move to the next data block when the current is exhausted. + For optimisation reasons, no error handling is performed in this class. Thus, mistakes in + calling code ran may raise ugly exceptions here, like {@link ArrayIndexOutOfBoundsException}, + etc .

+ + The multi-byte primitive input methods ({@link #readUshortLE()}, {@link #readIntLE()} and + {@link #readLongLE()}) have corresponding 'spanning Read' methods which (when required) perform + a read across the block boundary. These spanning read methods take the previous + {@link DataInputBlock} as a parameter. + Reads of larger amounts of data (into byte array buffers) must be managed by the caller + since these could conceivably involve more than two blocks. + + @author Josh Micich + + + Possibly any size (usually 512K or 64K). Assumed to be at least 8 bytes for all blocks + before the end of the stream. The last block in the stream can be any size except zero. + + + Reads a short which was encoded in little endian format. + + + Reads a short which spans the end of prevBlock and the start of this block. + + + Reads an int which was encoded in little endian format. + + + Reads an int which spans the end of prevBlock and the start of this block. + + + Reads a long which was encoded in little endian format. + + + Reads a long which spans the end of prevBlock and the start of this block. + + + Reads a small amount of data from across the boundary between two blocks. + The {@link #_readIndex} of this (the second) block is updated accordingly. + Note- this method (and other code) assumes that the second {@link DataInputBlock} + always is big enough to complete the read without being exhausted. + + + Reads len bytes from this block into the supplied buffer. + + +

+ create a document block from a raw data block + + The block. +
+ + + Create a single instance initialized with data. + + the InputStream delivering the data. + the poifs bigBlockSize + + + + convert a single long array into an array of DocumentBlock + instances + + the poifs bigBlockSize + the byte array to be converted + the intended size of the array (which may be smaller) + an array of DocumentBlock instances, filled from the + input array + + + + Read data from an array of DocumentBlocks + + the blocks to Read from + the buffer to Write the data into + the offset into the array of blocks to Read from + + + + Write the storage to an OutputStream + + the OutputStream to which the stored data should + be written + + + + Get the number of bytes Read for this block. + + bytes Read into the block + + + + Was this a partially Read block? + + true if the block was only partially filled with data + + + + Gets the fill byte used + + The fill byte. + + + + The block containing the archive header + @author Marc Johnson (mjohnson at apache dot org) + + + + What big block Size the file uses. Most files + use 512 bytes, but a few use 4096 + + + Number of small block allocation table blocks (int) + (Number of MiniFAT Sectors in Microsoft parlance) + + + + create a new HeaderBlockReader from an Stream + + the source Stream + + + + Alerts the short read. + + The read. + expected size to read + + + + Get start of Property Table + + the index of the first block of the Property Table + + + + Gets start of small block allocation table + + The SBAT start. + + + + Gets number of BAT blocks + + The BAT count. + + + + Gets the BAT array. + + The BAT array. + + + + Gets the XBAT count. + + The XBAT count. + @return XBAT count + + + + Gets the index of the XBAT. + + The index of the XBAT. + + + + Gets The Big Block Size, normally 512 bytes, sometimes 4096 bytes + + The size of the big block. + @return + + + + The block containing the archive header + @author Marc Johnson (mjohnson at apache dot org) + + + + + Set BAT block parameters. Assumes that all BAT blocks are + contiguous. Will construct XBAT blocks if necessary and return + the array of newly constructed XBAT blocks. + + count of BAT blocks + index of first BAT block + array of XBAT blocks; may be zero Length, will not be + null + + + + For a given number of BAT blocks, calculate how many XBAT + blocks will be needed + + + number of BAT blocks + number of XBAT blocks needed + + + + Write the block's data to an Stream + + the Stream to which the stored data should + be written + + + + + Set start of Property Table + + the index of the first block of the Property + Table + + + + Set start of small block allocation table + + the index of the first big block of the small + block allocation table + + + + Set count of SBAT blocks + + the number of SBAT blocks + + + + An interface for blocks managed by a list that works with a + BlockAllocationTable to keep block sequences straight + @author Marc Johnson (mjohnson at apache dot org + + + + + Get the data from the block + + the block's data as a byte array + + + + A block of Property instances + @author Marc Johnson (mjohnson at apache dot org) + + + + + Create a single instance initialized with default values + + + the properties to be inserted + the offset into the properties array + + + + Create an array of PropertyBlocks from an array of Property + instances, creating empty Property instances to make up any + shortfall + + + the Property instances to be converted into PropertyBlocks, in a java List + the array of newly created PropertyBlock instances + + + + Write the block's data to an OutputStream + + the OutputStream to which the stored data should be written + + + + A big block created from an InputStream, holding the raw data + @author Marc Johnson (mjohnson at apache dot org + + + + + Constructor RawDataBlock + + the Stream from which the data will be read + + + + Initializes a new instance of the class. + + the Stream from which the data will be read + the size of the POIFS blocks, normally 512 bytes {@link POIFSConstants#BIG_BLOCK_SIZE} + + + + When we read the data, did we hit end of file? + + true if the EoF was hit during this block, or; otherwise, falseif not. If you have a dodgy short last block, then + it's possible to both have data, and also hit EoF... + + + + Did we actually find any data to read? It's possible, + in the event of a short last block, to both have hit + the EoF, but also to have data + + true if this instance has data; otherwise, false. + + + + Get the data from the block + + the block's data as a byte array + + + + A list of RawDataBlocks instances, and methods to manage the list + @author Marc Johnson (mjohnson at apache dot org + + + + + Initializes a new instance of the class. + + the InputStream from which the data will be read + The big block size, either 512 bytes or 4096 bytes + + + + This class implements reading the small document block list from an + existing file + @author Marc Johnson (mjohnson at apache dot org) + + + + + fetch the small document block list from an existing file + + the poifs bigBlockSize + the raw data from which the small block table will be extracted + the root property (which contains the start block and small block table size) + the start block of the SBAT + the small document block list + + + + This class implements reading the small document block list from an + existing file + @author Marc Johnson (mjohnson at apache dot org) + + + + + Initializes a new instance of the class. + + the poifs bigBlockSize + a IList of POIFSDocument instances + the Filesystem's root property + + + + Write the storage to an OutputStream + + the OutputStream to which the stored data should be written + + + + Get the number of SBAT blocks + + number of SBAT big blocks + + + + Gets the SBAT. + + the Small Block Allocation Table + + + + Return the number of BigBlock's this instance uses + + count of BigBlock instances + + + + Sets the start block. + + The start block. + + + + Storage for documents that are too small to use regular + DocumentBlocks for their data + @author Marc Johnson (mjohnson at apache dot org) + + + + + convert a single long array into an array of SmallDocumentBlock + instances + + the poifs bigBlockSize + the byte array to be converted + the intended size of the array (which may be smaller) + an array of SmallDocumentBlock instances, filled from + the array + + + + fill out a List of SmallDocumentBlocks so that it fully occupies + a Set of big blocks + + + the List to be filled out. + number of big blocks the list encompasses + + + + Factory for creating SmallDocumentBlocks from DocumentBlocks + + + the original DocumentBlocks + the total document size + an array of new SmallDocumentBlocks instances + + + + create a list of SmallDocumentBlock's from raw data + + + the raw data containing the SmallDocumentBlock + a List of SmallDocumentBlock's extracted from the input + + + + Read data from an array of SmallDocumentBlocks + + the blocks to Read from. + the buffer to Write the data into. + the offset into the array of blocks to Read from + + + + Calculate the storage size of a Set of SmallDocumentBlocks + + number of SmallDocumentBlocks + total size + + + + Makes the empty small document block. + + + + + + Converts to block count. + + The size. + + + + + Write the storage to an OutputStream + + the OutputStream to which the stored data should + be written + + + + Get the data from the block + + the block's data as a byte array + + + + A list of SmallDocumentBlocks instances, and methods to manage the list + @author Marc Johnson (mjohnson at apache dot org) + + + + + Initializes a new instance of the class. + + a list of SmallDocumentBlock instances + + + + Various utility functions that make working with a cells and rows easier. The various + methods that deal with style's allow you to Create your HSSFCellStyles as you need them. + When you apply a style change to a cell, the code will attempt to see if a style already + exists that meets your needs. If not, then it will Create a new style. This is to prevent + creating too many styles. there is an upper limit in Excel on the number of styles that + can be supported. + @author Eric Pugh epugh@upstate.com + + + + + Get a row from the spreadsheet, and Create it if it doesn't exist. + + The 0 based row number + The sheet that the row is part of. + The row indicated by the rowCounter + + + + Get a specific cell from a row. If the cell doesn't exist, + + The row that the cell is part of + The column index that the cell is in. + The cell indicated by the column. + + + + Creates a cell, gives it a value, and applies a style if provided + + the row to Create the cell in + the column index to Create the cell in + The value of the cell + If the style is not null, then Set + A new HSSFCell + + + + Create a cell, and give it a value. + + the row to Create the cell in + the column index to Create the cell in + The value of the cell + A new HSSFCell. + + + + Translate color palette entries from the source to the destination sheet + + + + + Take a cell, and align it. + + the cell to Set the alignment for + The workbook that is being worked with. + the column alignment to use. + + + + Take a cell, and apply a font to it + + the cell to Set the alignment for + The workbook that is being worked with. + The HSSFFont that you want to Set... + + + This method attempt to find an already existing HSSFCellStyle that matches + what you want the style to be. If it does not find the style, then it + Creates a new one. If it does Create a new one, then it applies the + propertyName and propertyValue to the style. This is necessary because + Excel has an upper limit on the number of Styles that it supports. + + @param workbook The workbook that is being worked with. + @param propertyName The name of the property that is to be + changed. + @param propertyValue The value of the property that is to be + changed. + @param cell The cell that needs it's style changes + @exception NestableException Thrown if an error happens. + + + + Returns a map containing the format properties of the given cell style. + + cell style + map of format properties (String -> Object) + + + + Sets the format properties of the given style based on the given map. + + The cell style + The parent workbook. + The map of format properties (String -> Object). + + + + Utility method that returns the named short value form the given map. + Returns zero if the property does not exist, or is not a {@link Short}. + + The map of named properties (String -> Object) + The property name. + property value, or zero + + + + Utility method that returns the named boolean value form the given map. + Returns false if the property does not exist, or is not a {@link Boolean}. + + map of properties (String -> Object) + The property name. + property value, or false + + + + Utility method that Puts the named short value to the given map. + + The map of properties (String -> Object). + The property name. + The property value. + + + + Utility method that Puts the named boolean value to the given map. + + map of properties (String -> Object) + property name + property value + + + + Looks for text in the cell that should be unicode, like alpha; and provides the + unicode version of it. + + The cell to check for unicode values + transalted to unicode + + + + Various utility functions that make working with a region of cells easier. + @author Eric Pugh epugh@upstate.com + + + + + Sets the left border for a region of cells by manipulating the cell style + of the individual cells on the left + + The new border + The region that should have the border + The sheet that the region is on. + The workbook that the region is on. + + + + Sets the leftBorderColor attribute of the HSSFRegionUtil object + + The color of the border + The region that should have the border + The sheet that the region is on. + The workbook that the region is on. + + + + Sets the borderRight attribute of the HSSFRegionUtil object + + The new border + The region that should have the border + The sheet that the region is on. + The workbook that the region is on. + + + + Sets the rightBorderColor attribute of the HSSFRegionUtil object + + The color of the border + The region that should have the border + The workbook that the region is on. + The sheet that the region is on. + + + + Sets the borderBottom attribute of the HSSFRegionUtil object + + The new border + The region that should have the border + The sheet that the region is on. + The workbook that the region is on. + + + + Sets the bottomBorderColor attribute of the HSSFRegionUtil object + + The color of the border + The region that should have the border + The sheet that the region is on. + The workbook that the region is on. + + + + Sets the borderBottom attribute of the HSSFRegionUtil object + + The new border + The region that should have the border + The sheet that the region is on. + The workbook that the region is on. + + + + Sets the topBorderColor attribute of the HSSFRegionUtil object + + The color of the border + The region that should have the border + The sheet that the region is on. + The workbook that the region is on. + + + + For setting the same property on many cells to the same value + + + + Translates Graphics calls into escher calls. The translation Is lossy so + many features are not supported and some just aren't implemented yet. If + in doubt test the specific calls you wish to make. Graphics calls are + always performed into an EscherGroup so one will need to be Created. + + Important: +
+ One important concept worth considering Is that of font size. One of the + difficulties in Converting Graphics calls into escher Drawing calls Is that + Excel does not have the concept of absolute pixel positions. It measures + it's cell widths in 'Chars' and the cell heights in points. + Unfortunately it's not defined exactly what a type of Char it's + measuring. Presumably this Is due to the fact that the Excel will be + using different fonts on different platforms or even within the same + platform. + + Because of this constraint we've had to calculate the + verticalPointsPerPixel. This the amount the font should be scaled by when + you Issue commands such as DrawString(). A good way to calculate this + Is to use the follow formula: + +
+                  multipler = GroupHeightInPoints / heightOfGroup
+             
+ + The height of the Group Is calculated fairly simply by calculating the + difference between the y coordinates of the bounding box of the shape. The + height of the Group can be calculated by using a convenience called + HSSFClientAnchor.GetAnchorHeightInPoints(). +
+ + @author Glen Stampoultzis (glens at apache.org) +
+ + Construct an escher graphics object. + + @param escherGroup The escher Group to Write the graphics calls into. + @param workbook The workbook we are using. + @param forecolor The foreground color to use as default. + @param verticalPointsPerPixel The font multiplier. (See class description for information on how this works.). + + + Constructs an escher graphics object. + + @param escherGroup The escher Group to Write the graphics calls into. + @param workbook The workbook we are using. + @param foreground The foreground color to use as default. + @param verticalPointsPerPixel The font multiplier. (See class description for information on how this works.). + @param font The font to use. + + + Fills a (closed) polygon, as defined by a pair of arrays, which + hold the x and y coordinates. + + This Draws the polygon, with nPoint line segments. + The first nPoint - 1 line segments are + Drawn between sequential points + (xPoints[i],yPoints[i],xPoints[i+1],yPoints[i+1]). + The line segment Is a closing one, from the last point to + the first (assuming they are different). + + The area inside of the polygon Is defined by using an + even-odd Fill rule (also known as the alternating rule), and + the area inside of it Is Filled. + @param xPoints array of the x coordinates. + @param yPoints array of the y coordinates. + @param nPoints the total number of points in the polygon. + @see java.awt.Graphics#DrawPolygon(int[], int[], int) + + + Instances of this class keep track of multiple dependent cell evaluations due + to recursive calls to HSSFFormulaEvaluator.internalEvaluate(). + The main purpose of this class Is to detect an attempt to evaluate a cell + that Is alReady being evaluated. In other words, it detects circular + references in spReadsheet formulas. + + @author Josh Micich + + + Notifies this evaluation tracker that evaluation of the specified cell Is + about to start.
+ + In the case of a true return code, the caller should + continue evaluation of the specified cell, and also be sure to call + endEvaluate() when complete.
+ + In the case of a false return code, the caller should + return an evaluation result of + ErrorEval.CIRCULAR_REF_ERROR, and not call endEvaluate(). +
+ @return true if the specified cell has not been visited yet in the current + evaluation. false if the specified cell Is alReady being evaluated. +
+ + Notifies this evaluation tracker that the evaluation of the specified + cell Is complete.

+ + Every successful call to startEvaluate must be followed by a + call to endEvaluate (recommended in a finally block) to enable + proper tracking of which cells are being evaluated at any point in time.

+ + Assuming a well behaved client, parameters to this method would not be + required. However, they have been included to assert correct behaviour, + and form more meaningful error messages. + + + Stores the parameters that identify the evaluation of one cell.
+
+ + @return human Readable string for debug purposes + + + This class makes an EvaluationCycleDetector instance available to + each thRead via a ThReadLocal in order to avoid Adding a parameter + to a few protected methods within HSSFFormulaEvaluator. + + @author Josh Micich + + + @return + + +

+ Stores width and height details about a font. + @author Glen Stampoultzis (glens at apache.org) + +
+ + + Construct the font details with the given name and height. + + The font name. + The height of the font. + + + + Gets the name of the font. + + + + + + Gets the height. + + + + + + Adds the char. + + The c. + The width. + + + + Retrieves the width of the specified Char. If the metrics for + a particular Char are not available it defaults to returning the + width for the 'W' Char. + + The character. + + + + + Adds the chars. + + The chars. + The widths. + + + + Builds the font height property. + + Name of the font. + + + + + Builds the font widths property. + + Name of the font. + + + + + Builds the font chars property. + + Name of the font. + + + + + Create an instance of + FontDetails + by loading them from the + provided property object. + + the font name. + the property object holding the details of this + particular font. + a new FontDetails instance. + + + + Gets the width of all Chars in a string. + + The string to measure. + The width of the string for a 10 point font. + + + + Split the given string into an array of strings using the given + delimiter. + + The text. + The separator. + The max. + + + + + Common class for HSSFHeader and HSSFFooter + + + + + Common interface for NPOI.SS.UserModel.Header and NPOI.SS.UserModel.Footer + + + + + Gets or sets the left side of the header or footer. + + The string representing the left side. + + + + Gets or sets the center of the header or footer. + + The string representing the center. + + + + Gets or sets the right side of the header or footer. + + The string representing the right side. + + + + Creates the complete footer string based on the left, center, and middle + strings. + + The parts. + + + + Sets the header footer text. + + the new header footer text (contains mark-up tags). Possibly + empty string never + + + + Returns the string that represents the change in font size. + + the new font size. + The special string to represent a new font size + + + + Returns the string that represents the change in font. + + the new font. + the fonts style, one of regular, italic, bold, italic bold or bold italic. + The special string to represent a new font size + + + + Removes any fields (eg macros, page markers etc) + from the string. + Normally used to make some text suitable for showing + to humans, and the resultant text should not normally + be saved back into the document! + + The text. + + + + @return the internal text representation (combining center, left and right parts). + Possibly empty string if no header or footer is set. Never null. + + + + Get the left side of the header or footer. + + The string representing the left side. + + + + Get the center of the header or footer. + + The string representing the center. + + + + Get the right side of the header or footer. + + The string representing the right side.. + + + + Returns the string representing the current page number + + The special string for page number. + + + + Returns the string representing the number of pages. + + The special string for the number of pages. + + + + Returns the string representing the current date + + The special string for the date + + + + Gets the time. + + The time. + Returns the string representing the current time + @return The special string for the time + + + + Returns the string representing the current file name + + The special string for the file name. + + + + Returns the string representing the current tab (sheet) name + + The special string for tab name. + + + + Returns the string representing the start bold + + The special string for start bold + + + + Returns the string representing the end bold + + The special string for end bold. + + + + Returns the string representing the start underline + + The special string for start underline. + + + + Returns the string representing the end underline + + The special string for end underline. + + + + Returns the string representing the start double underline + + The special string for start double underline. + + + + Returns the string representing the end double underline + + The special string for end double underline. + + + + Are fields currently being Stripped from + the text that this {@link HeaderStories} returns? + Default is false, but can be changed + + true if [are fields stripped]; otherwise, false. + + + + Represents a special field in a header or footer, + eg the page number + + + + The character sequence that marks this field + + + + A special field that normally comes in a pair, eg + turn on underline / turn off underline + + + + + Instance to this class. + + + + + Explicit static constructor to tell C# compiler not to mark type as beforefieldinit. + + + + + Initialize AllFields. + + + + + Accessing the initialized instance. + + + + + An anchor Is what specifics the position of a shape within a client object + or within another containing shape. + @author Glen Stampoultzis (glens at apache.org) + + + + + Initializes a new instance of the class. + + The DX1. + The dy1. + The DX2. + The dy2. + + + + Gets or sets the DX1. + + The DX1. + + + + Gets or sets the dy1. + + The dy1. + + + + Gets or sets the dy2. + + The dy2. + + + + Gets or sets the DX2. + + The DX2. + + + + Gets a value indicating whether this instance is horizontally flipped. + + + true if this instance is horizontally flipped; otherwise, false. + + + + + Gets a value indicating whether this instance is vertically flipped. + + + true if this instance is vertically flipped; otherwise, false. + + + + Represents autofiltering for the specified worksheet. + +

+ Filtering data is a quick and easy way to find and work with a subset of data in a range of cells or table. + For example, you can filter to see only the values that you specify, filter to see the top or bottom values, + or filter to quickly see duplicate values. +

+ + TODO YK: For now (Aug 2010) POI only supports Setting a basic autofilter on a range of cells. + In future, when we support more auto-filter functions like custom criteria, sort, etc. we will add + corresponding methods to this interface. +
+ + High level representation for Border Formatting component + of Conditional Formatting Settings + + @author Dmitriy Kumshayev + + + + @author Dmitriy Kumshayev + @author Yegor Kozlov + + + + High level representation of a cell in a row of a spReadsheet. + Cells can be numeric, formula-based or string-based (text). The cell type + specifies this. String cells cannot conatin numbers and numeric cells cannot + contain strings (at least according to our model). Client apps should do the + conversions themselves. Formula cells have the formula string, as well as + the formula result, which can be numeric or string. + Cells should have their number (0 based) before being Added to a row. Only + cells that have values should be Added. + + + @author Andrew C. Oliver (acoliver at apache dot org) + @author Dan Sherman (dsherman at Isisph.com) + @author Brian Sanders (kestrel at burdell dot org) Active Cell support + @author Yegor Kozlov cell comments support + + + + High level representation of a cell in a row of a spreadsheet. +

+ Cells can be numeric, formula-based or string-based (text). The cell type + specifies this. String cells cannot conatin numbers and numeric cells cannot + contain strings (at least according to our model). Client apps should do the + conversions themselves. Formula cells have the formula string, as well as + the formula result, which can be numeric or string. +

+

+ Cells should have their number (0 based) before being Added to a row. +

+
+ + + Set the cells type (numeric, formula or string) + + + + + + Set a numeric value for the cell + + the numeric value to set this cell to. For formulas we'll set the + precalculated value, for numerics we'll set its value. For other types we will change + the cell to a numeric cell and set its value. + + + + + Set a error value for the cell + + the error value to set this cell to. For formulas we'll set the + precalculated value , for errors we'll set its value. For other types we will change + the cell to an error cell and set its value. + + + + + Converts the supplied date to its equivalent Excel numeric value and Sets that into the cell. + + the numeric value to set this cell to. For formulas we'll set the + precalculated value, for numerics we'll set its value. For other types we will change + the cell to a numerics cell and set its value. + + + + + Set a rich string value for the cell. + + value to set the cell to. For formulas we'll set the formula + string, for String cells we'll set its value. For other types we will + change the cell to a string cell and set its value. + If value is null then we will change the cell to a Blank cell. + + + + + Set a string value for the cell. + + value to set the cell to. For formulas we'll set the formula + string, for String cells we'll set its value. For other types we will + change the cell to a string cell and set its value. + If value is null then we will change the cell to a blank cell. + + + + + Copy the cell to the target index. If the target cell exists, a new cell will be inserted before the existing cell. + + target index + the new copied cell object + + + + Sets formula for this cell. + + the formula to Set, e.g. "SUM(C4:E4)". + + + + Set a bool value for the cell + + + + + + Sets this cell as the active cell for the worksheet + + + + + Removes the comment for this cell, if there is one. + + + + + Removes the hyperlink for this cell, if there is one. + + + + + zero-based column index of a column in a sheet. + + + + + zero-based row index of a row in the sheet that contains this cell + + + + + the sheet this cell belongs to + + + + + the row this cell belongs to + + + + + Set the cells type (numeric, formula or string) + +

If the cell currently contains a value, the value will + be converted to match the new type, if possible. Formatting + is generally lost in the process however.

+

If what you want to do is get a String value for your + numeric cell, stop!. This is not the way to do it. + Instead, for fetching the string value of a numeric or boolean + or date cell, use {@link DataFormatter} instead.

+
+ + + Only valid for formula cells + + + + + Return a formula for the cell + + if the cell type returned by GetCellType() is not CELL_TYPE_FORMULA + + + + Get the value of the cell as a number. + + if the cell type returned by GetCellType() is CELL_TYPE_STRING + if the cell value isn't a parsable double + + + + Get the value of the cell as a date. + + if the cell type returned by GetCellType() is CELL_TYPE_STRING + if the cell value isn't a parsable double + + + + Get the value of the cell RichTextString + + + + + Get the value of the cell as an error code. + + + + + Get the value of the cell as a string + + + + + Get the value of the cell as a bool. + + + + + Return the cell's style. + + + + + comment associated with this cell + + + + + hyperlink associated with this cell + + + + + Only valid for array formula cells + + range of the array formula group that the cell belongs to. + + + + if this cell is part of group of cells having a common array formula. + + + + + Creates new Cell - Should only be called by HSSFRow. This Creates a cell + from scratch. + When the cell is initially Created it is Set to CellType.Blank. Cell types + can be Changed/overwritten by calling SetCellValue with the appropriate + type as a parameter although conversions from one type to another may be + prohibited. + + Workbook record of the workbook containing this cell + Sheet record of the sheet containing this cell + the row of this cell + the column for this cell + + + + Creates new Cell - Should only be called by HSSFRow. This Creates a cell + from scratch. + + Workbook record of the workbook containing this cell + Sheet record of the sheet containing this cell + the row of this cell + the column for this cell + CellType.Numeric, CellType.String, CellType.Formula, CellType.Blank, + CellType.Boolean, CellType.Error + + + + Creates an Cell from a CellValueRecordInterface. HSSFSheet uses this when + reading in cells from an existing sheet. + + Workbook record of the workbook containing this cell + Sheet record of the sheet containing this cell + the Cell Value Record we wish to represent + + + private constructor to prevent blank construction + + + used internally -- given a cell value record, figure out its type + + + + Set the cells type (numeric, formula or string) + + Type of the cell. + + + + Sets the cell type. The SetValue flag indicates whether to bother about + trying to preserve the current value in the new record if one is Created. + The SetCellValue method will call this method with false in SetValue + since it will overWrite the cell value later + + Type of the cell. + if set to true [set value]. + The row. + The col. + Index of the style. + + + + Set a numeric value for the cell + + the numeric value to Set this cell to. For formulas we'll Set the + precalculated value, for numerics we'll Set its value. For other types we + will Change the cell to a numeric cell and Set its value. + + + + Set a date value for the cell. Excel treats dates as numeric so you will need to format the cell as + a date. + + the date value to Set this cell to. For formulas we'll Set the + precalculated value, for numerics we'll Set its value. For other types we + will Change the cell to a numeric cell and Set its value. + + + + Set a string value for the cell. Please note that if you are using + full 16 bit Unicode you should call SetEncoding() first. + + value to Set the cell to. For formulas we'll Set the formula + string, for String cells we'll Set its value. For other types we will + Change the cell to a string cell and Set its value. + If value is null then we will Change the cell to a Blank cell. + + + set a error value for the cell + + @param errorCode the error value to set this cell to. For formulas we'll set the + precalculated value , for errors we'll set + its value. For other types we will change the cell to an error + cell and set its value. + + + + Set a string value for the cell. Please note that if you are using + full 16 bit Unicode you should call SetEncoding() first. + + value to Set the cell to. For formulas we'll Set the formula + string, for String cells we'll Set its value. For other types we will + Change the cell to a string cell and Set its value. + If value is null then we will Change the cell to a Blank cell. + + + Should be called any time that a formula could potentially be deleted. + Does nothing if this cell currently does not hold a formula + + + + Used to help format error messages + + The cell type code. + + + + + Types the mismatch. + + The expected type code. + The actual type code. + if set to true [is formula cell]. + + + + + Checks the type of the formula cached value. + + The expected type code. + The fr. + + + + Set a bool value for the cell + + the bool value to Set this cell to. For formulas we'll Set the + precalculated value, for bools we'll Set its value. For other types we + will Change the cell to a bool cell and Set its value. + + + + Chooses a new bool value for the cell when its type is changing. + Usually the caller is calling SetCellType() with the intention of calling + SetCellValue(bool) straight afterwards. This method only exists to give + the cell a somewhat reasonable value until the SetCellValue() call (if at all). + TODO - perhaps a method like SetCellTypeAndValue(int, Object) should be introduced to avoid this + + + + + Applying a user-defined style (UDS) is special. Excel does not directly reference user-defined styles, but + instead create a 'proxy' ExtendedFormatRecord referencing the UDS as parent. + + The proceudre to apply a UDS is as follows: + + 1. search for a ExtendedFormatRecord with parentIndex == style.getIndex() + and xfType == ExtendedFormatRecord.XF_CELL. + 2. if not found then create a new ExtendedFormatRecord and copy all attributes from the user-defined style + and set the parentIndex to be style.getIndex() + 3. return the index of the ExtendedFormatRecord, this will be assigned to the parent cell record + + @param style the user style to apply + + @return the index of a ExtendedFormatRecord record that will be referenced by the cell + + + + Checks the bounds. + + The cell num. + if the bounds are exceeded. + + + + Sets this cell as the active cell for the worksheet + + + + + Returns a string representation of the cell + This method returns a simple representation, + anthing more complex should be in user code, with + knowledge of the semantics of the sheet being Processed. + Formula cells return the formula string, + rather than the formula result. + Dates are Displayed in dd-MMM-yyyy format + Errors are Displayed as #ERR<errIdx> + + + + + Removes the comment for this cell, if + there is one. + + WARNING - some versions of excel will loose + all comments after performing this action! + + + Updates the cell record's idea of what + column it belongs in (0 based) + @param num the new cell number + + + + Removes the hyperlink for this cell, if there is one. + + + + + The purpose of this method is to validate the cell state prior to modification + + + + + + Called when this cell is modified. + The purpose of this method is to validate the cell state prior to modification. + + + + + the Workbook that this Cell is bound to + + + + + the HSSFRow this cell belongs to + + + + + Get the cells type (numeric, formula or string) + + The type of the cell. + + + + Gets or sets the cell formula. + + The cell formula. + + + + Get the value of the cell as a number. For strings we throw an exception. + For blank cells we return a 0. + + The numeric cell value. + + + + Get the value of the cell as a date. For strings we throw an exception. + For blank cells we return a null. + + The date cell value. + + + + Get the value of the cell as a string - for numeric cells we throw an exception. + For blank cells we return an empty string. + For formulaCells that are not string Formulas, we return empty String + + The string cell value. + + + + Get the value of the cell as a string - for numeric cells we throw an exception. + For blank cells we return an empty string. + For formulaCells that are not string Formulas, we return empty String + + The rich string cell value. + + + + Get the value of the cell as a bool. For strings, numbers, and errors, we throw an exception. + For blank cells we return a false. + + true if [boolean cell value]; otherwise, false. + + + + Get the value of the cell as an error code. For strings, numbers, and bools, we throw an exception. + For blank cells we return a 0. + + The error cell value. + + + + Get the style for the cell. This is a reference to a cell style contained in the workbook + object. + + The cell style. + + + + Should only be used by HSSFSheet and friends. Returns the low level CellValueRecordInterface record + + the cell via the low level api. + + + + Returns comment associated with this cell + + The cell comment associated with this cell. + + + + Gets the index of the column. + + The index of the column. + + + + Gets the (zero based) index of the row containing this cell + + The index of the row. + + + + Get or set hyperlink associated with this cell + If the supplied hyperlink is null on setting, the hyperlink for this cell will be removed. + + The hyperlink associated with this cell or null if not found + + + + Only valid for formula cells + + one of (CellType.Numeric,CellType.String, CellType.Boolean, CellType.Error) depending + on the cached value of the formula + + + + High level representation of the style of a cell in a sheet of a workbook. + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + + + + Get the format string + + + set the font for this style + @param font a font object Created or retreived from the Workbook object + @see Workbook#CreateFont() + @see Workbook#GetFontAt(short) + + + Clones all the style information from another + CellStyle, onto this one. This + CellStyle will then have all the same + properties as the source, but the two may + be edited independently. + Any stylings on this CellStyle will be lost! + + The source CellStyle could be from another + Workbook if you like. This allows you to + copy styles from one Workbook to another. + + However, both of the CellStyles will need + to be of the same type (HSSFCellStyle or + XSSFCellStyle) + + + + the Cell should be auto-sized to shrink to fit if the text is too long + + + + get the index within the Workbook (sequence within the collection of ExtnededFormat objects) + @return unique index number of the underlying record this style represents (probably you don't care + unless you're comparing which one is which) + + + get the index of the format + @see DataFormat + + + Gets the index of the font for this style + @see Workbook#GetFontAt(short) + + + get whether the cell's using this style are to be hidden + @return hidden - whether the cell using this style should be hidden + + + get whether the cell's using this style are to be locked + @return hidden - whether the cell using this style should be locked + + + get the type of horizontal alignment for the cell + @return align - the type of alignment + @see #ALIGN_GENERAL + @see #ALIGN_LEFT + @see #ALIGN_CENTER + @see #ALIGN_RIGHT + @see #ALIGN_FILL + @see #ALIGN_JUSTIFY + @see #ALIGN_CENTER_SELECTION + + + get whether the text should be wrapped + @return wrap text or not + + + get the type of vertical alignment for the cell + @return align the type of alignment + @see #VERTICAL_TOP + @see #VERTICAL_CENTER + @see #VERTICAL_BOTTOM + @see #VERTICAL_JUSTIFY + + + get the degree of rotation for the text in the cell + @return rotation degrees (between -90 and 90 degrees) + + + get the number of spaces to indent the text in the cell + @return indent - number of spaces + + + get the type of border to use for the left border of the cell + @return border type + @see #BORDER_NONE + @see #BORDER_THIN + @see #BORDER_MEDIUM + @see #BORDER_DASHED + @see #BORDER_DOTTED + @see #BORDER_THICK + @see #BORDER_DOUBLE + @see #BORDER_HAIR + @see #BORDER_MEDIUM_DASHED + @see #BORDER_DASH_DOT + @see #BORDER_MEDIUM_DASH_DOT + @see #BORDER_DASH_DOT_DOT + @see #BORDER_MEDIUM_DASH_DOT_DOT + @see #BORDER_SLANTED_DASH_DOT + + + get the type of border to use for the right border of the cell + @return border type + @see #BORDER_NONE + @see #BORDER_THIN + @see #BORDER_MEDIUM + @see #BORDER_DASHED + @see #BORDER_DOTTED + @see #BORDER_THICK + @see #BORDER_DOUBLE + @see #BORDER_HAIR + @see #BORDER_MEDIUM_DASHED + @see #BORDER_DASH_DOT + @see #BORDER_MEDIUM_DASH_DOT + @see #BORDER_DASH_DOT_DOT + @see #BORDER_MEDIUM_DASH_DOT_DOT + @see #BORDER_SLANTED_DASH_DOT + + + get the type of border to use for the top border of the cell + @return border type + @see #BORDER_NONE + @see #BORDER_THIN + @see #BORDER_MEDIUM + @see #BORDER_DASHED + @see #BORDER_DOTTED + @see #BORDER_THICK + @see #BORDER_DOUBLE + @see #BORDER_HAIR + @see #BORDER_MEDIUM_DASHED + @see #BORDER_DASH_DOT + @see #BORDER_MEDIUM_DASH_DOT + @see #BORDER_DASH_DOT_DOT + @see #BORDER_MEDIUM_DASH_DOT_DOT + @see #BORDER_SLANTED_DASH_DOT + + + get the type of border to use for the bottom border of the cell + @return border type + @see #BORDER_NONE + @see #BORDER_THIN + @see #BORDER_MEDIUM + @see #BORDER_DASHED + @see #BORDER_DOTTED + @see #BORDER_THICK + @see #BORDER_DOUBLE + @see #BORDER_HAIR + @see #BORDER_MEDIUM_DASHED + @see #BORDER_DASH_DOT + @see #BORDER_MEDIUM_DASH_DOT + @see #BORDER_DASH_DOT_DOT + @see #BORDER_MEDIUM_DASH_DOT_DOT + @see #BORDER_SLANTED_DASH_DOT + + + get the color to use for the left border + + + get the color to use for the left border + @return the index of the color defInition + + + get the color to use for the top border + @return hhe index of the color defInition + + + get the color to use for the left border + @return the index of the color defInition + + + get the fill pattern (??) - set to 1 to fill with foreground color + @return fill pattern + + + get the background fill color + @return fill color + + + get the foreground fill color + @return fill color + + + + Gets or sets the color to use for the diagional border + + The index of the color definition. + + + + Gets or sets the line type to use for the diagional border + + The line type. + + + + Gets or sets the type of diagional border + . + The border diagional type. + + + Gets the color object representing the current + background fill, resolving indexes using + the supplied workbook. + This will work for both indexed and rgb + defined colors. + + + Gets the color object representing the current + foreground fill, resolving indexes using + the supplied workbook. + This will work for both indexed and rgb + defined colors. + + + + Initializes a new instance of the class. + + The index. + The record. + The workbook. + + + + Initializes a new instance of the class. + + The index. + The record. + The workbook. + + + + Get the contents of the format string, by looking up + the DataFormat against the bound workbook + + + + + + Get the contents of the format string, by looking up the DataFormat against the supplied workbook + + The workbook + the format string or "General" if not found + + + + Get the contents of the format string, by looking up + the DataFormat against the supplied workbook + + The internal workbook. + + + + + Set the font for this style + + a font object Created or retreived from the HSSFWorkbook object + + + + Gets the font for this style + + The parent workbook that this style belongs to. + + + + + Verifies that this style belongs to the supplied Workbook. + Will throw an exception if it belongs to a different one. + This is normally called when trying to assign a style to a + cell, to ensure the cell and the style are from the same + workbook (if they're not, it won't work) + + The workbook. + + + + Checks if the background and foreground Fills are Set correctly when one + or the other is Set to the default color. + Works like the logic table below: + BACKGROUND FOREGROUND + NONE AUTOMATIC + 0x41 0x40 + NONE RED/ANYTHING + 0x40 0xSOMETHING + + + + Clones all the style information from another + HSSFCellStyle, onto this one. This + HSSFCellStyle will then have all the same + properties as the source, but the two may + be edited independently. + Any stylings on this HSSFCellStyle will be lost! + + The source HSSFCellStyle could be from another + HSSFWorkbook if you like. This allows you to + copy styles from one HSSFWorkbook to another. + + + + Clones all the style information from another + HSSFCellStyle, onto this one. This + HSSFCellStyle will then have all the same + properties as the source, but the two may + be edited independently. + Any stylings on this HSSFCellStyle will be lost! + The source HSSFCellStyle could be from another + HSSFWorkbook if you like. This allows you to + copy styles from one HSSFWorkbook to another. + + The source. + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + + The parameter is null. + + + + + Get the index within the HSSFWorkbook (sequence within the collection of ExtnededFormat objects) + + Unique index number of the Underlying record this style represents (probably you don't care + Unless you're comparing which one is which) + + + + Gets the parent style. + + the parent style for this cell style. + In most cases this will be null, but in a few + cases there'll be a fully defined parent. + + + + Get the index of the format + + The data format. + + + + Gets the index of the font for this style. + + The index of the font. + + + + Get whether the cell's using this style are to be hidden + + whether the cell using this style should be hidden + + + + Get whether the cell's using this style are to be locked + + whether the cell using this style should be locked + + + + Get the type of horizontal alignment for the cell + + the type of alignment + + + + Gets or sets a value indicating whether the text should be wrapped + + true if [wrap text]; otherwise, false. + + + + Gets or sets the vertical alignment for the cell. + + the type of alignment + + + + Gets or sets the degree of rotation for the text in the cell + + The rotation degrees (between -90 and 90 degrees). + + + + Gets or sets the number of spaces to indent the text in the cell + + number of spaces + + + + Gets or sets the type of border to use for the left border of the cell + + The border type. + + + + Gets or sets the type of border to use for the right border of the cell + + The border type. + + + + Gets or sets the type of border to use for the top border of the cell + + The border type. + + + + Gets or sets the type of border to use for the bottom border of the cell + + The border type. + + + + Gets or sets the color to use for the left border + + The index of the color definition + + + + Gets or sets the color to use for the left border. + + The index of the color definition + + + + Gets or sets the color to use for the top border + + The index of the color definition. + + + + Gets or sets the color to use for the left border + + The index of the color definition. + + + + Gets or sets the color to use for the diagional border + + The index of the color definition. + + + + Gets or sets the line type to use for the diagional border + + The line type. + + + + Gets or sets the type of diagional border + . + The border diagional type. + + + + Gets or sets whether the cell is shrink-to-fit + + + + Get or set the reading order, for RTL/LTR ordering of + the text. +

0 means Context (Default), 1 means Left To Right, + and 2 means Right to Left

+ + @return order - the reading order (0,1,2) +
+ + + Gets or sets the fill pattern. - Set to 1 to Fill with foreground color + + The fill pattern. + + + + Gets or sets the color of the fill background. + + The color of the fill background. + Set the background Fill color. + + cs.SetFillPattern(HSSFCellStyle.FINE_DOTS ); + cs.SetFillBackgroundColor(new HSSFColor.RED().Index); + optionally a Foreground and background Fill can be applied: + Note: Ensure Foreground color is Set prior to background + cs.SetFillPattern(HSSFCellStyle.FINE_DOTS ); + cs.SetFillForegroundColor(new HSSFColor.BLUE().Index); + cs.SetFillBackgroundColor(new HSSFColor.RED().Index); + or, for the special case of SOLID_Fill: + cs.SetFillPattern(HSSFCellStyle.SOLID_FOREGROUND ); + cs.SetFillForegroundColor(new HSSFColor.RED().Index); + It is necessary to Set the Fill style in order + for the color to be shown in the cell. + + + + + Gets or sets the foreground Fill color + + Fill color. + @see org.apache.poi.hssf.usermodel.HSSFPalette#GetColor(short) + + + Gets the name of the user defined style. + Returns null for built in styles, and + styles where no name has been defined + + + create anchor from existing file + @param escherChildAnchorRecord + + + create anchor from scratch + @param dx1 x coordinate of the left up corner + @param dy1 y coordinate of the left up corner + @param dx2 x coordinate of the right down corner + @param dy2 y coordinate of the right down corner + + + @param dx1 x coordinate of the left up corner + @param dy1 y coordinate of the left up corner + @param dx2 x coordinate of the right down corner + @param dy2 y coordinate of the right down corner + + + + A client anchor Is attached to an excel worksheet. It anchors against a + top-left and buttom-right cell. + @author Glen Stampoultzis (glens at apache.org) + + + + A client anchor is attached to an excel worksheet. It anchors against a + top-left and bottom-right cell. + + @author Yegor Kozlov + + + Returns the column (0 based) of the first cell. + + @return 0-based column of the first cell. + + + Returns the column (0 based) of the second cell. + + @return 0-based column of the second cell. + + + Returns the row (0 based) of the first cell. + + @return 0-based row of the first cell. + + + Returns the row (0 based) of the second cell. + + @return 0-based row of the second cell. + + + Returns the x coordinate within the first cell + + @return the x coordinate within the first cell + + + Returns the y coordinate within the first cell + + @return the y coordinate within the first cell + + + Sets the y coordinate within the second cell + + @return the y coordinate within the second cell + + + Returns the x coordinate within the second cell + + @return the x coordinate within the second cell + + + s the anchor type +

+ 0 = Move and size with Cells, 2 = Move but don't size with cells, 3 = Don't move or size with cells. +

+ @return the anchor type + @see #MOVE_AND_RESIZE + @see #MOVE_DONT_RESIZE + @see #DONT_MOVE_AND_RESIZE +
+ + + Creates a new client anchor and defaults all the anchor positions to 0. + + + + + Creates a new client anchor and Sets the top-left and bottom-right + coordinates of the anchor. + + Note: Microsoft Excel seems to sometimes disallow + higher y1 than y2 or higher x1 than x2 in the anchor, you might need to + reverse them and draw shapes vertically or horizontally flipped! + + the x coordinate within the first cell. + the y coordinate within the first cell. + the x coordinate within the second cell. + the y coordinate within the second cell. + the column (0 based) of the first cell. + the row (0 based) of the first cell. + the column (0 based) of the second cell. + the row (0 based) of the second cell. + + + + Calculates the height of a client anchor in points. + + the sheet the anchor will be attached to + the shape height. + + + + Gets the row height in points. + + The sheet. + The row num. + + + + + Sets the top-left and bottom-right + coordinates of the anchor + + Note: Microsoft Excel seems to sometimes disallow + higher y1 than y2 or higher x1 than x2 in the anchor, you might need to + reverse them and draw shapes vertically or horizontally flipped! + + the column (0 based) of the first cell. + the row (0 based) of the first cell. + the x coordinate within the first cell. + the y coordinate within the first cell. + the column (0 based) of the second cell. + the row (0 based) of the second cell. + the x coordinate within the second cell. + the y coordinate within the second cell. + + + + Checks the range. + + The value. + The min range. + The max range. + Name of the variable. + + + + Gets or sets the col1. + + The col1. + + + + Gets or sets the col2. + + The col2. + + + + Gets or sets the row1. + + The row1. + + + + Gets or sets the row2. + + The row2. + + + + Gets a value indicating whether this instance is horizontally flipped. + + + true if the anchor goes from right to left; otherwise, false. + + + + + Gets a value indicating whether this instance is vertically flipped. + + + true if the anchor goes from bottom to top.; otherwise, false. + + + + + Gets the anchor type + 0 = Move and size with Cells, 2 = Move but don't size with cells, 3 = Don't move or size with cells. + + The type of the anchor. + + + + Represents a cell comment - a sticky note associated with a cell. + @author Yegor Kozlov + + + + + A textbox Is a shape that may hold a rich text string. + @author Glen Stampoultzis (glens at apache.org) + + + + + Construct a new textbox with the given parent and anchor. + + The parent. + One of HSSFClientAnchor or HSSFChildAnchor + + + + Gets or sets the left margin within the textbox. + + The margin left. + + + + Gets or sets the right margin within the textbox. + + The margin right. + + + + Gets or sets the top margin within the textbox + + The top margin. + + + + Gets or sets the bottom margin within the textbox. + + The margin bottom. + + + + Gets or sets the horizontal alignment. + + The horizontal alignment. + + + + Gets or sets the vertical alignment. + + The vertical alignment. + + + Sets whether this comment is visible. + + @return true if the comment is visible, false otherwise + + + Return the row of the cell that Contains the comment + + @return the 0-based row of the cell that Contains the comment + + + Return the column of the cell that Contains the comment + + @return the 0-based column of the cell that Contains the comment + + + Name of the original comment author + + @return the name of the original author of the comment + + + Fetches the rich text string of the comment + + + Return defines position of this anchor in the sheet. + + @return defines position of this anchor in the sheet + + + + Construct a new comment with the given parent and anchor. + + + defines position of this anchor in the sheet + + + + Initializes a new instance of the class. + + The note. + The txo. + + + + Gets or sets a value indicating whether this is visible. + + true if visible; otherwise, false. + Sets whether this comment Is visible. + @return + true + if the comment Is visible, + false + otherwise + + + + Gets or sets the row of the cell that Contains the comment + + the 0-based row of the cell that Contains the comment + + + + Gets or sets the column of the cell that Contains the comment + + the 0-based column of the cell that Contains the comment + + + + Gets or sets the name of the original comment author + + the name of the original author of the comment + + + + Gets the note record. + + the underlying Note record. + + + Do we know which cell this comment belongs to? + + + + HSSFConditionalFormatting class encapsulates all Settings of Conditional Formatting. + The class can be used to make a copy HSSFConditionalFormatting Settings + + + HSSFConditionalFormatting cf = sheet.GetConditionalFormattingAt(index); + newSheet.AddConditionalFormatting(cf); + or to modify existing Conditional Formatting Settings (formatting regions and/or rules). + Use {@link HSSFSheet#GetConditionalFormattingAt(int)} to Get access to an instance of this class. + To Create a new Conditional Formatting Set use the following approach: + + // Define a Conditional Formatting rule, which triggers formatting + // when cell's value Is greater or equal than 100.0 and + // applies patternFormatting defined below. + HSSFConditionalFormattingRule rule = sheet.CreateConditionalFormattingRule( + ComparisonOperator.GE, + "100.0", // 1st formula + null // 2nd formula Is not used for comparison operator GE + ); + // Create pattern with red background + HSSFPatternFormatting patternFmt = rule.cretePatternFormatting(); + patternFormatting.SetFillBackgroundColor(HSSFColor.RED.index); + // Define a region containing first column + Region [] regions = + { + new Region(1,(short)1,-1,(short)1) + }; + // Apply Conditional Formatting rule defined above to the regions + sheet.AddConditionalFormatting(regions, rule); + + @author Dmitriy Kumshayev + + + The ConditionalFormatting class encapsulates all Settings of Conditional Formatting. + + The class can be used + +
    +
  • + to make a copy ConditionalFormatting Settings. +
  • + + + For example: +
    +             ConditionalFormatting cf = sheet.GetConditionalFormattingAt(index);
    +             newSheet.AddConditionalFormatting(cf);
    +             
    + +
  • + or to modify existing Conditional Formatting Settings (formatting regions and/or rules). +
  • +
+ + Use {@link NPOI.HSSF.UserModel.Sheet#getSheetConditionalFormatting()} to Get access to an instance of this class. + + To create a new Conditional Formatting Set use the following approach: + +
+            
+             // Define a Conditional Formatting rule, which triggers formatting
+             // when cell's value is greater or equal than 100.0 and
+             // applies patternFormatting defined below.
+             ConditionalFormattingRule rule = sheet.CreateConditionalFormattingRule(
+                 ComparisonOperator.GE,
+                 "100.0", // 1st formula
+                 null     // 2nd formula is not used for comparison operator GE
+             );
+            
+             // Create pattern with red background
+             PatternFormatting patternFmt = rule.CretePatternFormatting();
+             patternFormatting.FillBackgroundColor(IndexedColor.RED.Index);
+            
+             // Define a region Containing first column
+             Region [] regions =
+             {
+                 new Region(1,(short)1,-1,(short)1)
+             };
+            
+             // Apply Conditional Formatting rule defined above to the regions
+             sheet.AddConditionalFormatting(regions, rule);
+             
+ + @author Dmitriy Kumshayev + @author Yegor Kozlov +
+ + @return array of CellRangeAddresss. Never null + + + Replaces an existing Conditional Formatting rule at position idx. + Excel allows to create up to 3 Conditional Formatting rules. + This method can be useful to modify existing Conditional Formatting rules. + + @param idx position of the rule. Should be between 0 and 2. + @param cfRule - Conditional Formatting rule + + + Add a Conditional Formatting rule. + Excel allows to create up to 3 Conditional Formatting rules. + + @param cfRule - Conditional Formatting rule + + + @return the Conditional Formatting rule at position idx. + + + @return number of Conditional Formatting rules. + + + + Initializes a new instance of the class. + + The workbook. + The cf aggregate. + + + + Gets the array of Regions + + + + + + Gets array of CellRangeAddresses + + + + + + Replaces an existing Conditional Formatting rule at position idx. + Excel allows to Create up to 3 Conditional Formatting rules. + This method can be useful to modify existing Conditional Formatting rules. + + position of the rule. Should be between 0 and 2. + Conditional Formatting rule + + + + Add a Conditional Formatting rule. + Excel allows to Create up to 3 Conditional Formatting rules. + + Conditional Formatting rule + + + + Gets the Conditional Formatting rule at position idx + + The index. + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets the CF records aggregate. + + + + + + Gets the number of Conditional Formatting rules. + + The number of rules. + + + + High level representation of Conditional Formatting Rule. + It allows to specify formula based conditions for the Conditional Formatting + and the formatting Settings such as font, border and pattern. + + @author Dmitriy Kumshayev + + + Represents a description of a conditional formatting rule + + @author Dmitriy Kumshayev + @author Yegor Kozlov + + + Create a new border formatting structure if it does not exist, + otherwise just return existing object. + + @return - border formatting object, never returns null. + + + @return - border formatting object if defined, null otherwise + + + Create a new font formatting structure if it does not exist, + otherwise just return existing object. + + @return - font formatting object, never returns null. + + + @return - font formatting object if defined, null otherwise + + + Create a new pattern formatting structure if it does not exist, + otherwise just return existing object. + + @return - pattern formatting object, never returns null. + + + @return - pattern formatting object if defined, null otherwise + + + Type of conditional formatting rule. +

+ MUST be either {@link #CONDITION_TYPE_CELL_VALUE_IS} or {@link #CONDITION_TYPE_FORMULA} +

+ + @return the type of condition +
+ + The comparison function used when the type of conditional formatting is Set to + {@link #CONDITION_TYPE_CELL_VALUE_IS} +

+ MUST be a constant from {@link ComparisonOperator} +

+ + @return the conditional format operator +
+ + The formula used to Evaluate the first operand for the conditional formatting rule. +

+ If the condition type is {@link #CONDITION_TYPE_CELL_VALUE_IS}, + this field is the first operand of the comparison. + If type is {@link #CONDITION_TYPE_FORMULA}, this formula is used + to determine if the conditional formatting is applied. +

+

+ If comparison type is {@link #CONDITION_TYPE_FORMULA} the formula MUST be a Boolean function +

+ + @return the first formula +
+ + The formula used to Evaluate the second operand of the comparison when + comparison type is {@link #CONDITION_TYPE_CELL_VALUE_IS} and operator + is either {@link ComparisonOperator#BETWEEN} or {@link ComparisonOperator#NOT_BETWEEN} + + @return the second formula + + + @return - font formatting object if defined, null otherwise + + + Create a new font formatting structure if it does not exist, + otherwise just return existing object. + @return - font formatting object, never returns null. + + + @return - border formatting object if defined, null otherwise + + + Create a new border formatting structure if it does not exist, + otherwise just return existing object. + @return - border formatting object, never returns null. + + + @return - pattern formatting object if defined, null otherwise + + + Create a new pattern formatting structure if it does not exist, + otherwise just return existing object. + @return - pattern formatting object, never returns null. + + + @return - the conditiontype for the cfrule + + + @return - the comparisionoperatation for the cfrule + + + An object that handles instantiating concrete + classes of the various instances one needs for + HSSF and XSSF. + Works around a major shortcoming in Java, where we + can't have static methods on interfaces or abstract + classes. + This allows you to get the appropriate class for + a given interface, without you having to worry + about if you're dealing with HSSF or XSSF, despite + Java being quite rubbish. + + + Creates a new RichTextString instance + @param text The text to Initialise the RichTextString with + + + Creates a new DataFormat instance + + + Creates a new Hyperlink, of the given type + + + Creates FormulaEvaluator - an object that Evaluates formula cells. + + @return a FormulaEvaluator instance + + + Creates a HSSFFormulaEvaluator, the object that Evaluates formula cells. + + @return a HSSFFormulaEvaluator instance + + + Creates a HSSFClientAnchor. Use this object to position drawing object in a sheet + + @return a HSSFClientAnchor instance + @see NPOI.SS.usermodel.Drawing + + + get the format index that matches the given format string. + Creates a new format if one is not found. Aliases text to the proper format. + @param format string matching a built in format + @return index of format. + + + get the format string that matches the given format index + @param index of a format + @return string represented at index of format or null if there is not a format at that index + + + The first user-defined format starts at 164. + + + + Construncts a new data formatter. It takes a workbook to have + access to the workbooks format records. + + the workbook the formats are tied to. + + + + Get the format index that matches the given format string + Automatically Converts "text" to excel's format string to represent text. + + The format string matching a built in format. + index of format or -1 if Undefined. + + + + Get the format index that matches the given format + string, creating a new format entry if required. + Aliases text to the proper format as required. + + The format string matching a built in format. + index of format. + + + + Get the format string that matches the given format index + + The index of a format. + string represented at index of format or null if there Is not a format at that index + + + + Get the format string that matches the given format index + + The index of a built in format. + string represented at index of format or null if there Is not a builtin format at that index + + + Ensures that the formats list can hold entries + up to and including the entry with this index + + + + Get the number of builtin and reserved builtinFormats + + number of builtin and reserved builtinFormats + + + + HSSF wrapper for a cell under evaluation + @author Josh Micich + + + + HSSF wrapper for a sheet under evaluation + + @author Josh Micich + + + Internal POI use only + + @author Josh Micich + + + Abstracts a workbook for the purpose of converting formula To text.
+ + For POI internal use only + + @author Josh Micich +
+ + @return null if externSheetIndex refers To a sheet inside the current workbook + + + @return the name of the (first) sheet referred to by the given external sheet index + + + @return the name of the (last) sheet referred to by the given external sheet index + + + Abstracts a workbook for the purpose of formula parsing.
+ + For POI internal use only + + @author Josh Micich +
+ + + named range name matching is case insensitive + + The name. + Index of the sheet. + + + + + Gets the name XPTG. + + The name. + + + + + + Produce the appropriate Ptg for a 3d cell reference + + + + + + + + Produce the appropriate Ptg for a 3d area reference + + + + + + + + Gets the externSheet index for a sheet from this workbook + + Name of the sheet. + + + + + Gets the externSheet index for a sheet from an external workbook + + Name of the workbook, e.g. "BudGet.xls" + a name of a sheet in that workbook + + + + + Returns an enum holding spReadhseet properties specific to an Excel version ( + max column and row numbers, max arguments to a function, etc.) + + + + + Abstracts a name record for formula evaluation.
+ + For POI internal use only + + @author Josh Micich +
+ + + Represents a Font used in a workbook. + @version 1.0-pre + @author Andrew C. Oliver + + + + get the name for the font (i.e. Arial) + @return String representing the name of the font to use + + + get the font height in unit's of 1/20th of a point. Maybe you might want to + use the GetFontHeightInPoints which matches to the familiar 10, 12, 14 etc.. + @return short - height in 1/20ths of a point + @see #GetFontHeightInPoints() + + + get the font height + @return short - height in the familiar unit of measure - points + @see #GetFontHeight() + + + get whether to use italics or not + @return italics or not + + + get whether to use a strikeout horizontal line through the text or not + @return strikeout or not + + + get the color for the font + @return color to use + @see #COLOR_NORMAL + @see #COLOR_RED + @see NPOI.HSSF.usermodel.HSSFPalette#GetColor(short) + + + get normal,super or subscript. + @return offset type to use (none,super,sub) + + + get type of text underlining to use + @return underlining type + + + get character-set to use. + @return character-set + @see #ANSI_CHARSET + @see #DEFAULT_CHARSET + @see #SYMBOL_CHARSET + + + get the index within the XSSFWorkbook (sequence within the collection of Font objects) + + @return unique index number of the underlying record this Font represents (probably you don't care + unless you're comparing which one is which) + + + + Initializes a new instance of the class. + + The index. + The record. + + + + get the color value for the font + + HSSFWorkbook + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + + The parameter is null. + + + + + Get the name for the font (i.e. Arial) + + the name of the font to use + + + + Get the index within the HSSFWorkbook (sequence within the collection of Font objects) + + Unique index number of the Underlying record this Font represents (probably you don't care + Unless you're comparing which one is which) + + + + Get or sets the font height in Unit's of 1/20th of a point. Maybe you might want to + use the GetFontHeightInPoints which matches to the familiar 10, 12, 14 etc.. + + height in 1/20ths of a point. + + + + Gets or sets the font height in points. + + height in the familiar Unit of measure - points. + + + + Gets or sets whether to use italics or not + + true if this instance is italic; otherwise, false. + + + + Get whether to use a strikeout horizontal line through the text or not + + + strikeout or not + + + + + Gets or sets the color for the font. + + The color to use. + + + + Gets or sets the boldness to use + + The boldweight. + + + get or set if the font bold style + + + + Gets or sets normal,base or subscript. + + offset type to use (none,base,sub) + + + + Gets or sets the type of text Underlining to use + + The Underlining type. + + + + Gets or sets the char set to use. + + The char set. + + + High level representation for Font Formatting component + of Conditional Formatting Settings + + @author Dmitriy Kumshayev + + + + High level representation for Font Formatting component + of Conditional Formatting Settings + + @author Dmitriy Kumshayev + @author Yegor Kozlov + + + Set font style options. + + @param italic - if true, Set posture style to italic, otherwise to normal + @param bold if true, Set font weight to bold, otherwise to normal + + + Set font style options to default values (non-italic, non-bold) + + + + get or set the type of super or subscript for the font + + + + + get or set font color index + + + + + get or set the height of the font in 1/20th point units + + + + + get or set the type of underlining for the font + + + + Get whether the font weight is Set to bold or not + + @return bold - whether the font is bold or not + + + @return true if font style was Set to italic + + + @return + @see org.apache.poi.hssf.record.cf.FontFormatting#GetRawRecord() + + + Set font style options. + + @param italic - if true, Set posture style to italic, otherwise to normal + @param bold- if true, Set font weight to bold, otherwise to normal + + + Set font style options to default values (non-italic, non-bold) + + + Get the type of base or subscript for the font + + @return base or subscript option + + + @return font color index + + + Gets the height of the font in 1/20th point Units + + @return fontheight (in points/20); or -1 if not modified + + + Get the font weight for this font (100-1000dec or 0x64-0x3e8). Default Is + 0x190 for normal and 0x2bc for bold + + @return bw - a number between 100-1000 for the fonts "boldness" + + + Get the type of Underlining for the font + + @return font Underlining type + + @see #U_NONE + @see #U_SINGLE + @see #U_DOUBLE + @see #U_SINGLE_ACCOUNTING + @see #U_DOUBLE_ACCOUNTING + + + Get whether the font weight Is Set to bold or not + + @return bold - whether the font Is bold or not + + + @return true if escapement type was modified from default + + + @return true if font cancellation was modified from default + + + @return true if font outline type was modified from default + + + @return true if font shadow type was modified from default + + + @return true if font style was modified from default + + + @return true if font style was Set to italic + + + @return true if font outline Is on + + + @return true if font shadow Is on + + + @return true if font strikeout Is on + + + @return true if font Underline type was modified from default + + + @return true if font weight was modified from default + + + + Class to Read and manipulate the footer. + The footer works by having a left, center, and right side. The total cannot + be more that 255 bytes long. One uses this class by Getting the HSSFFooter + from HSSFSheet and then Getting or Setting the left, center, and right side. + For special things (such as page numbers and date), one can use a the methods + that return the Chars used to represent these. One can also Change the + fonts by using similar methods. + @author Shawn Laubach (slaubach at apache dot org) + + + + + Common defInition of a HSSF or XSSF page footer. + For a list of all the different fields that can be + placed into a footer, such as page number, + bold, underline etc, see + + + + + Initializes a new instance of the class. + + Footer record to create the footer with + + + + Gets the raw footer. + + The raw footer. + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Evaluates formula cells.

+ + For performance reasons, this class keeps a cache of all previously calculated intermediate + cell values. Be sure to call {@link #ClearAllCachedResultValues()} if any workbook cells are Changed between + calls to Evaluate~ methods on this class. + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + @author Josh Micich + + + Should be called whenever there are Changes to input cells in the Evaluated workbook. + Failure to call this method after changing cell values will cause incorrect behaviour + of the Evaluate~ methods of this class + + + Should be called to tell the cell value cache that the specified (value or formula) cell + has Changed. + Failure to call this method after changing cell values will cause incorrect behaviour + of the Evaluate~ methods of this class + + + Should be called to tell the cell value cache that the specified cell has just become a + formula cell, or the formula text has Changed + + + Should be called to tell the cell value cache that the specified (value or formula) cell + has changed. + Failure to call this method after changing cell values will cause incorrect behaviour + of the evaluate~ methods of this class + + + If cell Contains a formula, the formula is Evaluated and returned, + else the CellValue simply copies the appropriate cell value from + the cell and also its cell type. This method should be preferred over + EvaluateInCell() when the call should not modify the contents of the + original cell. + @param cell + + + Loops over all cells in all sheets of the associated workbook. + For cells that contain formulas, their formulas are evaluated, + and the results are saved. These cells remain as formula cells. + For cells that do not contain formulas, no changes are made. + This is a helpful wrapper around looping over all cells, and + calling evaluateFormulaCell on each one. + + + If cell Contains formula, it Evaluates the formula, + and saves the result of the formula. The cell + remains as a formula cell. + Else if cell does not contain formula, this method leaves + the cell unChanged. + Note that the type of the formula result is returned, + so you know what kind of value is also stored with + the formula. +

+            int EvaluatedCellType = Evaluator.evaluateFormulaCell(cell);
+            
+ Be aware that your cell will hold both the formula, + and the result. If you want the cell Replaced with + the result of the formula, use {@link #EvaluateInCell(Cell)} + @param cell The cell to Evaluate + @return The type of the formula result, i.e. -1 if the cell is not a formula, + or one of Cell.CELL_TYPE_NUMERIC, Cell.CELL_TYPE_STRING, Cell.CELL_TYPE_BOOLEAN, Cell.CELL_TYPE_ERROR + Note: the cell's type remains as Cell.CELL_TYPE_FORMULA however. +
+ + If cell Contains formula, it Evaluates the formula, and + Puts the formula result back into the cell, in place + of the old formula. + Else if cell does not contain formula, this method leaves + the cell unChanged. + Note that the same instance of Cell is returned to + allow chained calls like: +
+            int EvaluatedCellType = Evaluator.evaluateInCell(cell).getCellType();
+            
+ Be aware that your cell value will be Changed to hold the + result of the formula. If you simply want the formula + value comPuted for you, use {@link #EvaluateFormulaCell(Cell)} + @param cell +
+ + Sets up the Formula Evaluator to be able to reference and resolve + links to other workbooks, eg [Test.xls]Sheet1!A1. + For a workbook referenced as [Test.xls]Sheet1!A1, you should + supply a map containing the key Test.xls (no square brackets), + and an open FormulaEvaluator onto that Workbook. + @param otherWorkbooks Map of workbook names (no square brackets) to an evaluator on that workbook + + + Whether to ignore missing references to external workbooks and + use cached formula results in the main workbook instead. +
+ In some cases external workbooks referenced by formulas in the main workbook are not available. + With this method you can control how POI handles such missing references: +
    +
  • by default ignoreMissingWorkbooks=false and POI throws + {@link org.apache.poi.ss.formula.CollaboratingWorkbooksEnvironment.WorkbookNotFoundException} + if an external reference cannot be resolved
  • +
  • if ignoreMissingWorkbooks=true then POI uses cached formula result + that already exists in the main workbook
  • +
+ + @param ignore whether to ignore missing references to external workbooks +
+ + * Perform detailed output of formula evaluation for next evaluation only? + * Is for developer use only (also developers using POI for their XLS files). + * Log-Level WARN is for basic info, INFO for detailed information. These quite + * high levels are used because you have to explicitly enable this specific logging. + + * @param value whether to perform detailed output + + + @param stabilityClassifier used to optimise caching performance. Pass null + for the (conservative) assumption that any cell may have its definition changed after + evaluation begins. + + + @param udfFinder pass null for default (AnalysisToolPak only) + + + @param stabilityClassifier used to optimise caching performance. Pass null + for the (conservative) assumption that any cell may have its definition changed after + evaluation begins. + @param udfFinder pass null for default (AnalysisToolPak only) + + + Coordinates several formula evaluators together so that formulas that involve external + references can be evaluated. + @param workbookNames the simple file names used to identify the workbooks in formulas + with external links (for example "MyData.xls" as used in a formula "[MyData.xls]Sheet1!A1") + @param evaluators all evaluators for the full set of workbooks required by the formulas. + + + If cell Contains a formula, the formula is Evaluated and returned, + else the CellValue simply copies the appropriate cell value from + the cell and also its cell type. This method should be preferred over + EvaluateInCell() when the call should not modify the contents of the + original cell. + @param cell + If cell contains a formula, the formula is evaluated and returned, + else the CellValue simply copies the appropriate cell value from + the cell and also its cell type. This method should be preferred over + evaluateInCell() when the call should not modify the contents of the + original cell. + + @param cell may be null signifying that the cell is not present (or blank) + @return null if the supplied cell is null or blank + + + Should be called whenever there are major changes (e.g. moving sheets) to input cells + in the evaluated workbook. If performance is not critical, a single call to this method + may be used instead of many specific calls to the notify~ methods. + + Failure to call this method after changing cell values will cause incorrect behaviour + of the evaluate~ methods of this class + + + Should be called to tell the cell value cache that the specified (value or formula) cell + has changed. + Failure to call this method after changing cell values will cause incorrect behaviour + of the evaluate~ methods of this class + + + Should be called to tell the cell value cache that the specified cell has just been + deleted. + Failure to call this method after changing cell values will cause incorrect behaviour + of the evaluate~ methods of this class + + + Should be called to tell the cell value cache that the specified (value or formula) cell + has changed. + Failure to call this method after changing cell values will cause incorrect behaviour + of the evaluate~ methods of this class + + + If cell Contains formula, it Evaluates the formula, + and saves the result of the formula. The cell + remains as a formula cell. + Else if cell does not contain formula, this method leaves + the cell UnChanged. + Note that the type of the formula result is returned, + so you know what kind of value is also stored with + the formula. +
+            int EvaluatedCellType = evaluator.EvaluateFormulaCell(cell);
+            
+ Be aware that your cell will hold both the formula, + and the result. If you want the cell Replaced with + the result of the formula, use {@link #EvaluateInCell(HSSFCell)} + @param cell The cell to Evaluate + @return The type of the formula result (the cell's type remains as CellType.Formula however) +
+ + Returns a CellValue wrapper around the supplied ValueEval instance. + @param cell + + + If cell Contains formula, it Evaluates the formula, and + puts the formula result back into the cell, in place + of the old formula. + Else if cell does not contain formula, this method leaves + the cell UnChanged. + Note that the same instance of Cell is returned to + allow chained calls like: +
+            int EvaluatedCellType = evaluator.EvaluateInCell(cell).CellType;
+            
+ Be aware that your cell value will be Changed to hold the + result of the formula. If you simply want the formula + value computed for you, use {@link #EvaluateFormulaCell(HSSFCell)} + @param cell +
+ + Loops over all cells in all sheets of the supplied + workbook. + For cells that contain formulas, their formulas are + Evaluated, and the results are saved. These cells + remain as formula cells. + For cells that do not contain formulas, no Changes + are made. + This is a helpful wrapper around looping over all + cells, and calling EvaluateFormulaCell on each one. + + + Loops over all cells in all sheets of the supplied + workbook. + For cells that contain formulas, their formulas are + evaluated, and the results are saved. These cells + remain as formula cells. + For cells that do not contain formulas, no changes + are made. + This is a helpful wrapper around looping over all + cells, and calling evaluateFormulaCell on each one. + + + Whether to ignore missing references to external workbooks and + use cached formula results in the main workbook instead. +

+ In some cases exetrnal workbooks referenced by formulas in the main workbook are not avaiable. + With this method you can control how POI handles such missing references: +

    +
  • by default ignoreMissingWorkbooks=false and POI throws {@link org.apache.poi.ss.formula.CollaboratingWorkbooksEnvironment.WorkbookNotFoundException} + if an external reference cannot be resolved
  • +
  • if ignoreMissingWorkbooks=true then POI uses cached formula result + that already exists in the main workbook
  • +
+

+ @param ignore whether to ignore missing references to external workbooks +
+ + {@inheritDoc} + + + + Class to Read and manipulate the header. + The header works by having a left, center, and right side. The total cannot + be more that 255 bytes long. One uses this class by Getting the HSSFHeader + from HSSFSheet and then Getting or Setting the left, center, and right side. + For special things (such as page numbers and date), one can use a the methods + that return the Chars used to represent these. One can also Change the + fonts by using similar methods. + @author Shawn Laubach (slaubach at apache dot org) + + + + + Common defInition of a HSSF or XSSF page header. + For a list of all the different fields that can be + placed into a header, such as page number, + bold, underline etc, see + + + + + Initializes a new instance of the class. + + Footer record to Create the footer with + + + + Gets the raw footer. + + The raw footer. + + + + Represents an Excel hyperlink. + + @author Yegor Kozlov (yegor at apache dot org) + + + + Represents an Excel hyperlink. + + + + + Hyperlink address. Depending on the hyperlink type it can be URL, e-mail, patrh to a file, etc. + + + + + text label for this hyperlink + + + + + the type of this hyperlink + + + + + the row of the first cell that Contains the hyperlink + + + + + the row of the last cell that Contains the hyperlink + + + + + the column of the first cell that Contains the hyperlink + + + + + the column of the last cell that Contains the hyperlink + + + + Low-level record object that stores the actual hyperlink data + + + If we Create a new hypelrink remember its type + + + + Initializes a new instance of the class. + + The type of hyperlink to Create. + + + + Initializes a new instance of the class. + + The record. + + + + Gets or sets the row of the first cell that Contains the hyperlink + + the 0-based row of the cell that Contains the hyperlink. + + + + Gets or sets the row of the last cell that Contains the hyperlink + + the 0-based row of the last cell that Contains the hyperlink + + + + Gets or sets the column of the first cell that Contains the hyperlink + + the 0-based column of the first cell that Contains the hyperlink + + + + Gets or sets the column of the last cell that Contains the hyperlink + + the 0-based column of the last cell that Contains the hyperlink + + + + Gets or sets Hypelink Address. Depending on the hyperlink type it can be URL, e-mail, patrh to a file, etc. + + the Address of this hyperlink + + + + Gets or sets the text mark. + + The text mark. + + + + Gets or sets the short filename. + + The short filename. + + + + Gets or sets the text label for this hyperlink + + text to Display + + + + Gets the type of this hyperlink + + the type of this hyperlink + + + + High Level Represantion of Named Range + + @author Libin Roman (Vista Portal LDT. Developer) + + + Represents a defined name for a range of cells. + A name is a meaningful shorthand that makes it easier to understand the purpose of a + cell reference, constant or a formula. + + + Indicates that the defined name refers to a user-defined function. + This attribute is used when there is an add-in or other code project associated with the file. + + @param value true indicates the name refers to a function. + + + Get the sheets name which this named range is referenced to + + @return sheet name, which this named range refered to + + + Gets the name of the named range + + @return named range name + + + Returns the formula that the name is defined to refer to. + + @return the reference for this name, null if it has not been set yet. Never empty string + @see #SetRefersToFormula(String) + + + Checks if this name is a function name + + @return true if this name is a function name + + + Checks if this name points to a cell that no longer exists + + @return true if the name refers to a deleted cell, false otherwise + + + Returns the sheet index this name applies to. + + @return the sheet index this name applies to, -1 if this name applies to the entire workbook + + + Returns the comment the user provided when the name was Created. + + @return the user comment for this named range + + + + Creates new HSSFName - called by HSSFWorkbook to Create a sheet from + scratch. + + lowlevel Workbook object associated with the sheet. + the Name Record + + + + + Sets the NameParsedFormula structure that specifies the formula for the defined name. + + the sequence of {@link Ptg}s for the formula. + + + Indicates that the defined name refers to a user-defined function. + This attribute is used when there is an add-in or other code project associated with the file. + + @param value true indicates the name refers to a function. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets or sets the sheets name which this named range is referenced to + + sheet name, which this named range refered to + + + + Gets or sets the name of the named range + + named range name + + + Returns the sheet index this name applies to. + + @return the sheet index this name applies to, -1 if this name applies to the entire workbook + + + + Tests if this name points to a cell that no longer exists + + + true if the name refers to a deleted cell; otherwise, false. + + + + + Gets a value indicating whether this instance is function name. + + + true if this instance is function name; otherwise, false. + + + + Represents binary object (i.e. OLE) data stored in the file. Eg. A GIF, JPEG etc... + + @author Daniel Noll + + + + Represents a escher picture. Eg. A GIF, JPEG etc... + @author Glen Stampoultzis + @author Yegor Kozlov (yegor at apache.org) + + + + Repersents a picture in a SpreadsheetML document + + @author Yegor Kozlov + + + Reset the image to the dimension of the embedded image + + @see #resize(double, double) + + + Resize the image proportionally. + + + + Resize the image. +

+ Please note, that this method works correctly only for workbooks + with the default font size (Arial 10pt for .xls and Calibri 11pt for .xlsx). + If the default font is changed the resized image can be streched vertically or horizontally. +

+

+ resize(1.0,1.0) keeps the original size,
+ resize(0.5,0.5) resize to 50% of the original,
+ resize(2.0,2.0) resizes to 200% of the original.
+ resize({@link Double#MAX_VALUE},{@link Double#MAX_VALUE}) resizes to the dimension of the embedded image. +

+ + @param scaleX the amount by which the image width is multiplied relative to the original width. + @param scaleY the amount by which the image height is multiplied relative to the original height. +
+ + Calculate the preferred size for this picture. + + @return XSSFClientAnchor with the preferred size for this image + + + Calculate the preferred size for this picture. + + @param scaleX the amount by which image width is multiplied relative to the original width. + @param scaleY the amount by which image height is multiplied relative to the original height. + @return ClientAnchor with the preferred size for this image + + + Return the dimension of the embedded image in pixel + + @return image dimension in pixels + + + Return picture data for this picture + + @return picture data for this picture + + + @return the anchor that is used by this picture + + + + Constructs a picture object. + + The parent. + The anchor. + + + + Reset the image to the dimension of the embedded image + + + Please note, that this method works correctly only for workbooks + with default font size (Arial 10pt for .xls). + If the default font is changed the resized image can be streched vertically or horizontally. + + + + + Resize the image proportionally. + + scale + + + + Resize the image +

+ Please note, that this method works correctly only for workbooks + with default font size (Arial 10pt for .xls). + If the default font is changed the resized image can be streched vertically or horizontally. +

+

+ resize(1.0,1.0) keeps the original size,
+ resize(0.5,0.5) resize to 50% of the original,
+ resize(2.0,2.0) resizes to 200% of the original.
+ resize({@link Double#MAX_VALUE},{@link Double#MAX_VALUE}) resizes to the dimension of the embedded image. +

+ + @param scaleX the amount by which the image width is multiplied relative to the original width. + @param scaleY the amount by which the image height is multiplied relative to the original height. +
+ + Calculate the preferred size for this picture. + + @param scale the amount by which image dimensions are multiplied relative to the original size. + @return HSSFClientAnchor with the preferred size for this image + @since POI 3.0.2 + + + + Calculate the preferred size for this picture. + + the amount by which image width is multiplied relative to the original width. + the amount by which image height is multiplied relative to the original height. + HSSFClientAnchor with the preferred size for this image + + + + Calculate the preferred size for this picture. + + HSSFClientAnchor with the preferred size for this image + + + + The metadata of PNG and JPEG can contain the width of a pixel in millimeters. + Return the the "effective" dpi calculated as + 25.4/HorizontalPixelSize + and + 25.4/VerticalPixelSize + . Where 25.4 is the number of mm in inch. + + The image. + the resolution + + + + Return the dimension of the embedded image in pixel + + image dimension + + + + Gets or sets the index of the picture. + + The index of the picture. + + + Return picture data for this shape + + @return picture data for this shape + + + The color applied to the lines of this shape. + + + @return the anchor that is used by this picture. + + + @return the sheet which contains the picture shape + + + Reference to the filesystem root, required for retrieving the object data. + + + Gets the object data. Only call for ones that have + data though. See {@link #hasDirectoryEntry()} + + @return the object data as an OLE2 directory. + @ if there was an error Reading the data. + + + Returns the data portion, for an ObjectData + that doesn't have an associated POIFS Directory + Entry + + + Does this ObjectData have an associated POIFS + Directory Entry? + (Not all do, those that don't have a data portion) + + + Finds the EmbeddedObjectRefSubRecord, or throws an + Exception if there wasn't one + + + Returns the OLE2 Class Name of the object + + + + Excel can Get cranky if you give it files containing too + many (especially duplicate) objects, and this class can + help to avoid those. + In general, it's much better to make sure you don't + duplicate the objects in your code, as this is likely + to be much faster than creating lots and lots of + excel objects+records, only to optimise them down to + many fewer at a later stage. + However, sometimes this is too hard / tricky to do, which + is where the use of this class comes in. + + + + + Goes through the Workbook, optimising the fonts by + removing duplicate ones. + For now, only works on fonts used in HSSFCellStyle + and HSSFRichTextString. Any other font uses + (eg charts, pictures) may well end up broken! + This can be a slow operation, especially if you have + lots of cells, cell styles or rich text strings + + The workbook in which to optimise the fonts + + + + Goes through the Wokrbook, optimising the cell styles + by removing duplicate ones and ones that aren't used. + For best results, optimise the fonts via a call to + OptimiseFonts(HSSFWorkbook) first + + The workbook in which to optimise the cell styles + + + + Represents a workbook color palette. + Internally, the XLS format refers to colors using an offset into the palette + record. Thus, the first color in the palette has the index 0x8, the second + has the index 0x9, etc. through 0x40 + @author Brian Sanders (bsanders at risklabs dot com) + + + + + Retrieves the color at a given index + + the palette index, between 0x8 to 0x40 inclusive. + the color, or null if the index Is not populated + + + + Finds the first occurance of a given color + + the RGB red component, between 0 and 255 inclusive + the RGB green component, between 0 and 255 inclusive + the RGB blue component, between 0 and 255 inclusive + the color, or null if the color does not exist in this palette + + + + Finds the closest matching color in the custom palette. The + method for Finding the distance between the colors Is fairly + primative. + + The red component of the color to match. + The green component of the color to match. + The blue component of the color to match. + The closest color or null if there are no custom + colors currently defined. + + + + Sets the color at the given offset + + the palette index, between 0x8 to 0x40 inclusive + the RGB red component, between 0 and 255 inclusive + the RGB green component, between 0 and 255 inclusive + the RGB blue component, between 0 and 255 inclusive + + + + Adds a new color into an empty color slot. + + The red component + The green component + The blue component + The new custom color. + + + + user custom color + + + + Intends to provide support for the very evil index to triplet Issue and + will likely replace the color constants interface for HSSF 2.0. + This class Contains static inner class members for representing colors. + Each color has an index (for the standard palette in Excel (tm) ), + native (RGB) triplet and string triplet. The string triplet Is as the + color would be represented by Gnumeric. Having (string) this here Is a bit of a + collusion of function between HSSF and the HSSFSerializer but I think its + a reasonable one in this case. + + @author Andrew C. Oliver (acoliver at apache dot org) + @author Brian Sanders (bsanders at risklabs dot com) - full default color palette + + + Creates a new instance of HSSFColor + + + this function returns all colors in a hastable. Its not implemented as a + static member/staticly initialized because that would be dirty in a + server environment as it Is intended. This means you'll eat the time + it takes to Create it once per request but you will not hold onto it + if you have none of those requests. + + @return a hashtable containing all colors keyed by int excel-style palette indexes + + + This function returns all the Colours, stored in a Hashtable that + can be edited. No caching is performed. If you don't need to edit + the table, then call {@link #getIndexHash()} which returns a + statically cached imuatable map of colours. + + + + this function returns all colors in a hastable. Its not implemented as a + static member/staticly initialized because that would be dirty in a + server environment as it Is intended. This means you'll eat the time + it takes to Create it once per request but you will not hold onto it + if you have none of those requests. + + a hashtable containing all colors keyed by String gnumeric-like triplets + + + @return triplet representation like that in Excel + + + @return a hex string exactly like a gnumeric triplet + + + @return index to the standard palette + + + Class BLACK + + + + Class BROWN + + + + Class OLIVE_GREEN + + + + Class DARK_GREEN + + + + Class DARK_TEAL + + + + Class DARK_BLUE + + + + Class INDIGO + + + + Class GREY_80_PERCENT + + + + Class DARK_RED + + + + Class ORANGE + + + + Class DARK_YELLOW + + + + Class GREEN + + + + Class TEAL + + + + Class BLUE + + + + Class BLUE_GREY + + + + Class GREY_50_PERCENT + + + + Class RED + + + + Class LIGHT_ORANGE + + + + Class LIME + + + + Class SEA_GREEN + + + + Class AQUA + + + + Class GREY_40_PERCENT + + + + Class TURQUOISE + + + + Class SKY_BLUE + + + + Class PLUM + + + + Class GREY_25_PERCENT + + + + Class ROSE + + + + Class TAN + + + + Class LIGHT_YELLOW + + + + Class LIGHT_GREEN + + + + Class LIGHT_TURQUOISE + + + + Class PALE_BLUE + + + + Class LAVENDER + + + + Class WHITE + + + + Class CORNFLOWER_BLUE + + + Class LEMON_CHIFFON + + + Class MAROON + + + Class ORCHID + + + Class CORAL + + + Class ROYAL_BLUE + + + Class LIGHT_CORNFLOWER_BLUE + + + Special Default/Normal/Automatic color. + Note: This class Is NOT in the default HashTables returned by HSSFColor. + The index Is a special case which Is interpreted in the various SetXXXColor calls. + + @author Jason + + + + + Initializes a new instance of the class. + + The byte offset. + The colors. + + + + Initializes a new instance of the class. + + The byte offset. + The red. + The green. + The blue. + + + + Gets triplet representation like that in Excel + + + + + + Gets a hex string exactly like a gnumeric triplet + + + + + + Gets the gnumeric part. + + The color. + + + + + Gets index to the standard palette + + + + + + The patriarch is the toplevel container for shapes in a sheet. It does + little other than act as a container for other shapes and Groups. + @author Glen Stampoultzis (glens at apache.org) + + + + + An interface that indicates whether a class can contain children. + @author Glen Stampoultzis (glens at apache.org) + + + + + dd shape to the list of child records + + shape + + + + set coordinates of this group relative to the parent + + x1 + y1 + x2 + y2 + + + remove first level shapes + @param shape to be removed + @return true if shape is removed else return false + + + + Gets Any children contained by this shape. + + The children. + + + + Get the top left x coordinate of this group. + + + + + Get the top left y coordinate of this group. + + + + + Get the bottom right x coordinate of this group. + + + + + Get the bottom right y coordinate of this group. + + + + @author Yegor Kozlov + + + Creates a picture. + @param anchor the client anchor describes how this picture is + attached to the sheet. + @param pictureIndex the index of the picture in the workbook collection + of pictures. + + @return the newly created picture. + + + Creates a comment. + @param anchor the client anchor describes how this comment is attached + to the sheet. + @return the newly created comment. + + + Creates a chart. + @param anchor the client anchor describes how this chart is attached to + the sheet. + @return the newly created chart + + + Creates a new client anchor and sets the top-left and bottom-right + coordinates of the anchor. + + @param dx1 the x coordinate in EMU within the first cell. + @param dy1 the y coordinate in EMU within the first cell. + @param dx2 the x coordinate in EMU within the second cell. + @param dy2 the y coordinate in EMU within the second cell. + @param col1 the column (0 based) of the first cell. + @param row1 the row (0 based) of the first cell. + @param col2 the column (0 based) of the second cell. + @param row2 the row (0 based) of the second cell. + @return the newly created client anchor + + + The EscherAggregate we have been bound to. + (This will handle writing us out into records, + and building up our shapes from the records) + + + + Creates the patriarch. + + the sheet this patriarch is stored in. + The bound aggregate. + + + check if any shapes contain wrong data + At now(13.08.2010) check if patriarch contains 2 or more comments with same coordinates + + + @param shape to be removed + @return true of shape is removed + + + + Creates a new Group record stored Under this patriarch. + + the client anchor describes how this Group is attached + to the sheet. + the newly created Group. + + + + Creates a simple shape. This includes such shapes as lines, rectangles, + and ovals. + Note: Microsoft Excel seems to sometimes disallow + higher y1 than y2 or higher x1 than x2 in the anchor, you might need to + reverse them and draw shapes vertically or horizontally flipped! + + the client anchor describes how this Group is attached + to the sheet. + the newly created shape. + + + + Creates a picture. + + the client anchor describes how this Group is attached + to the sheet. + Index of the picture. + the newly created shape. + + + + CreatePicture + + the client anchor describes how this picture is attached to the sheet. + the index of the picture in the workbook collection of pictures. + return newly created shape + + + Adds a new OLE Package Shape + + @param anchor the client anchor describes how this picture is + attached to the sheet. + @param storageId the storageId returned by {@Link HSSFWorkbook.AddOlePackage} + @param pictureIndex the index of the picture (used as preview image) in the + workbook collection of pictures. + + @return newly Created shape + + + + Creates a polygon + + the client anchor describes how this Group is attached + to the sheet. + the newly Created shape. + + + + Constructs a textbox Under the patriarch. + + the client anchor describes how this Group is attached + to the sheet. + the newly Created textbox. + + + Constructs a cell comment. + + @param anchor the client anchor describes how this comment is attached + to the sheet. + @return the newly created comment. + + + YK: used to create autofilters + + @see org.apache.poi.hssf.usermodel.HSSFSheet#setAutoFilter(int, int, int, int) + + + + Constructs a cell comment. + + the client anchor describes how this comment is attached + to the sheet. + the newly created comment. + + + add a shape to this drawing + + + + Sets the coordinate space of this Group. All children are contrained + to these coordinates. + + The x1. + The y1. + The x2. + The y2. + + + + Does this HSSFPatriarch contain a chart? + (Technically a reference to a chart, since they + Get stored in a different block of records) + FIXME - detect chart in all cases (only seems + to work on some charts so far) + + + true if this instance contains chart; otherwise, false. + + + + + Returns the aggregate escher record we're bound to + + + + + Creates a new client anchor and sets the top-left and bottom-right + coordinates of the anchor. + + @param dx1 the x coordinate in EMU within the first cell. + @param dy1 the y coordinate in EMU within the first cell. + @param dx2 the x coordinate in EMU within the second cell. + @param dy2 the y coordinate in EMU within the second cell. + @param col1 the column (0 based) of the first cell. + @param row1 the row (0 based) of the first cell. + @param col2 the column (0 based) of the second cell. + @param row2 the row (0 based) of the second cell. + @return the newly created client anchor + + + create shape tree from existing escher records tree + + + + Returns a list of all shapes contained by the patriarch. + + The children. + + + + Total count of all children and their children's children. + + The count of all children. + + + + The top left x coordinate of this Group. + + The x1. + + + + The top left y coordinate of this Group. + + The y1. + + + + The bottom right x coordinate of this Group. + + The x2. + + + + The bottom right y coordinate of this Group. + + The y2. + + + + High level representation for Conditional Formatting Settings + @author Dmitriy Kumshayev + + + + @author Yegor Kozlov + + + + Initializes a new instance of the class. + + The cf rule record. + + + + Gets the pattern formatting block. + + The pattern formatting block. + + + + Gets or sets the color of the fill background. + + The color of the fill background. + + + + Gets or sets the color of the fill foreground. + + The color of the fill foreground. + + + + Gets or sets the fill pattern. + + The fill pattern. + + + + Represents binary data stored in the file. Eg. A GIF, JPEG etc... + @author Daniel Noll + + + + Suggests a file extension for this image. + + @return the file extension. + + + Gets the picture data. + + @return the picture data. + + + Returns the mime type for the image + + + @return the POI internal image type, 0 if unknown image type + + @see Workbook#PICTURE_TYPE_DIB + @see Workbook#PICTURE_TYPE_EMF + @see Workbook#PICTURE_TYPE_JPEG + @see Workbook#PICTURE_TYPE_PICT + @see Workbook#PICTURE_TYPE_PNG + @see Workbook#PICTURE_TYPE_WMF + + + Underlying escher blip record containing the bitmap data. + + + + Constructs a picture object. + + the underlying blip record containing the bitmap data. + + + + Suggests a file extension for this image. + + the file extension. + + + + Gets the picture data. + + the picture data. + + + + gets format of the picture. + + The format. + + + Returns the mime type for the image + + + @return the POI internal image type, -1 if not unknown image type + + @see Workbook#PICTURE_TYPE_DIB + @see Workbook#PICTURE_TYPE_EMF + @see Workbook#PICTURE_TYPE_JPEG + @see Workbook#PICTURE_TYPE_PICT + @see Workbook#PICTURE_TYPE_PNG + @see Workbook#PICTURE_TYPE_WMF + + + + @author Glen Stampoultzis (glens at baselinksoftware.com) + + + + Generates the shape records for this shape. + + + Creates the low level OBJ record for this shape. + + + @param xPoints - array of x coordinates + @param yPoints - array of y coordinates + + + Defines the width and height of the points in the polygon + @param width + @param height + + + @return array of x coordinates + + + @return array of y coordinates + + + @return shape width + + + @return shape height + + + + Used to modify the print Setup. + @author Shawn Laubach (slaubach at apache dot org) + + + + Returns the paper size. + @return paper size + + + Returns the scale. + @return scale + + + Returns the page start. + @return page start + + + Returns the number of pages wide to fit sheet in. + @return number of pages wide to fit sheet in + + + Returns the number of pages high to fit the sheet in. + @return number of pages high to fit the sheet in + + + Returns the left to right print order. + @return left to right print order + + + Returns the landscape mode. + @return landscape mode + + + Returns the valid Settings. + @return valid Settings + + + Returns the black and white Setting. + @return black and white Setting + + + Returns the draft mode. + @return draft mode + + + Returns the print notes. + @return print notes + + + Returns the no orientation. + @return no orientation + + + Returns the use page numbers. + @return use page numbers + + + Returns the horizontal resolution. + @return horizontal resolution + + + Returns the vertical resolution. + @return vertical resolution + + + Returns the header margin. + @return header margin + + + Returns the footer margin. + @return footer margin + + + Returns the number of copies. + @return number of copies + + + + Initializes a new instance of the class. + + Takes the low level print Setup record. + + + + Gets or sets the size of the paper. + + The size of the paper. + + + + Gets or sets the scale. + + The scale. + + + + Gets or sets the page start. + + The page start. + + + + Gets or sets the number of pages wide to fit sheet in. + + the number of pages wide to fit sheet in + + + + Gets or sets number of pages high to fit the sheet in + + number of pages high to fit the sheet in. + + + + Gets or sets the bit flags for the options. + + the bit flags for the options. + + + + Gets or sets the left to right print order. + + the left to right print order. + + + + Gets or sets the landscape mode. + + the landscape mode. + + + + Gets or sets the valid Settings. + + the valid Settings. + + + + Gets or sets the black and white Setting. + + black and white Setting + + + + Gets or sets the draft mode. + + the draft mode. + + + + Gets or sets the print notes. + + the print notes. + + + + Gets or sets a value indicating whether [no orientation]. + + true if [no orientation]; otherwise, false. + + + + Gets or sets the use page numbers. + + use page numbers. + + + + Gets or sets the horizontal resolution. + + the horizontal resolution. + + + + Gets or sets the vertical resolution. + + the vertical resolution. + + + + Gets or sets the header margin. + + The header margin. + + + + Gets or sets the footer margin. + + The footer margin. + + + + Gets or sets the number of copies. + + the number of copies. + + + + Rich text Unicode string. These strings can have fonts applied to + arbitary parts of the string. + @author Glen Stampoultzis (glens at apache.org) + @author Jason Height (jheight at apache.org) + + + + Rich text unicode string. These strings can have fonts + applied to arbitary parts of the string. + + @author Glen Stampoultzis (glens at apache.org) + @author Jason Height (jheight at apache.org) + + + Applies a font to the specified characters of a string. + + @param startIndex The start index to apply the font to (inclusive) + @param endIndex The end index to apply the font to (exclusive) + @param fontIndex The font to use. + + + Applies a font to the specified characters of a string. + + @param startIndex The start index to apply the font to (inclusive) + @param endIndex The end index to apply to font to (exclusive) + @param font The index of the font to use. + + + Sets the font of the entire string. + @param font The font to use. + + + Removes any formatting that may have been applied to the string. + + + The index within the string to which the specified formatting run applies. + @param index the index of the formatting run + @return the index within the string. + + + Applies the specified font to the entire string. + + @param fontIndex the font to apply. + + + Returns the plain string representation. + + + @return the number of characters in the font. + + + @return The number of formatting Runs used. + + + + Place holder for indicating that NO_FONT has been applied here + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The string. + + + + Initializes a new instance of the class. + + The workbook. + The record. + + + + This must be called to Setup the internal work book references whenever + a RichTextString Is Added to a cell + + The workbook. + The record. + + + + Called whenever the Unicode string Is modified. When it Is modified + we need to Create a new SST index, so that other LabelSSTRecords will not + be affected by Changes tat we make to this string. + + + + + + Adds to SST if required. + + + + + Applies a font to the specified Chars of a string. + + The start index to apply the font to (inclusive). + The end index to apply the font to (exclusive). + The font to use. + + + + Applies a font to the specified Chars of a string. + + The start index to apply the font to (inclusive). + The end index to apply to font to (exclusive). + The index of the font to use. + + + + Sets the font of the entire string. + + The font to use. + + + + Removes any formatting that may have been applied to the string. + + + + + Returns the font in use at a particular index. + + The index. + The font that's currently being applied at that + index or null if no font Is being applied or the + index Is out of range. + + + + The index within the string to which the specified formatting run applies. + + the index of the formatting run + the index within the string. + + + + Gets the font used in a particular formatting run. + + the index of the formatting run. + the font number used. + + + + Compares one rich text string to another. + + The other rich text string. + + + + + Equalses the specified o. + + The o. + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Applies the specified font to the entire string. + + Index of the font to apply. + + + + Returns the plain string representation. + + The string. + + + + Returns the raw, probably shared Unicode String. + Used when tweaking the styles, eg updating font + positions. + Changes to this string may well effect + other RichTextStrings too! + + The raw unicode string. + + + + Gets or sets the unicode string. + + The unicode string. + + + + Gets the number of Chars in the font.. + + The length. + + + + Gets the number of formatting runs used. There will always be at + least one of font NO_FONT. + + The num formatting runs. + + + + High level representation of a row of a spReadsheet. + Only rows that have cells should be Added to a Sheet. + @author Andrew C. Oliver (acoliver at apache dot org) + @author Glen Stampoultzis (glens at apache.org) + + + + + High level representation of a row of a spreadsheet. + + + + + Use this to create new cells within the row and return it. + + The cell that is returned is a /. + The type can be changed either through calling SetCellValue or SetCellType. + + the column number this cell represents + Cell a high level representation of the created cell. + + ArgumentException if columnIndex < 0 or greater than the maximum number of supported columns + (255 for *.xls, 1048576 for *.xlsx) + + + + + Use this to create new cells within the row and return it. + + The cell that is returned is a /. The type can be changed + either through calling SetCellValue or SetCellType. + + the column number this cell represents + + Cell a high level representation of the created cell. + ArgumentException if columnIndex < 0 or greater than the maximum number of supported columns + (255 for *.xls, 1048576 for *.xlsx) + + + + + Remove the Cell from this row. + + the cell to remove + + + + Get the cell representing a given column (logical cell) 0-based. If you + ask for a cell that is not defined....you get a null. + + 0 based column number + Cell representing that column or null if undefined. + + + + + Returns the cell at the given (0 based) index, with the specified {@link NPOI.SS.usermodel.Row.MissingCellPolicy} + + the cell at the given (0 based) index + ArgumentException if cellnum < 0 or the specified MissingCellPolicy is invalid + + + + + + + Moves the supplied cell to a new column, which + must not already have a cell there! + + The cell to move + The new column number (0 based) + + + + Copy the current row to the target row + + row index of the target row + the new copied row object + + + + Copy the source cell to the target cell. If the target cell exists, the new copied cell will be inserted before the existing one + + index of the source cell + index of the target cell + the new copied cell object + + + + Get row number this row represents + + the row number (0 based) + + + + Get the number of the first cell Contained in this row. + + + short representing the first logical cell in the row, + or -1 if the row does not contain any cells. + + + + + Gets the index of the last cell Contained in this row PLUS ONE. The result also + happens to be the 1-based column number of the last cell. This value can be used as a + standard upper bound when iterating over cells: +
+            short minColIx = row.GetFirstCellNum();
+            short maxColIx = row.GetLastCellNum();
+            for(short colIx=minColIx; colIx<maxColIx; colIx++) {
+            Cell cell = row.GetCell(colIx);
+            if(cell == null) {
+            continue;
+            }
+            //... do something with cell
+            }
+            
+
+ + short representing the last logical cell in the row PLUS ONE, + or -1 if the row does not contain any cells. + +
+ + + Gets the number of defined cells (NOT number of cells in the actual row!). + That is to say if only columns 0,4,5 have values then there would be 3. + + int representing the number of defined cells in the row. + + + + Get whether or not to display this row with 0 height + + zHeight height is zero or not. + + + + Get the row's height measured in twips (1/20th of a point). + If the height is not set, the default worksheet value is returned, + + + row height measured in twips (1/20th of a point) + + + + Returns row height measured in point size. + If the height is not set, the default worksheet value is returned, + + + row height measured in point size + + + + + + Is this row formatted? Most aren't, but some rows + do have whole-row styles. For those that do, you + can get the formatting from + + + + + Returns the Sheet this row belongs to + + the Sheet that owns this row + + + + Returns the whole-row cell styles. Most rows won't + have one of these, so will return null. Call IsFormmated to check first + + The row style. + + + + Get cells in the row + + + + + Returns the rows outline level. Increased as you + put it into more groups (outlines), reduced as + you take it out of them. + + + + + used for collections + + + + reference to low level representation + + + reference to containing low level Workbook + + + reference to containing Sheet + + + + Creates new HSSFRow from scratch. Only HSSFSheet should do this. + + low-level Workbook object containing the sheet that Contains this row + low-level Sheet object that Contains this Row + the row number of this row (0 based) + + + + + Creates an HSSFRow from a low level RowRecord object. Only HSSFSheet should do + this. HSSFSheet uses this when an existing file is Read in. + + low-level Workbook object containing the sheet that Contains this row + low-level Sheet object that Contains this Row + the low level api object this row should represent + + + + + Use this to create new cells within the row and return it. + The cell that is returned is a CELL_TYPE_BLANK (/). + The type can be changed either through calling SetCellValue or SetCellType. + + the column number this cell represents + a high level representation of the created cell. + + + + Use this to create new cells within the row and return it. + The cell that is returned is a CELL_TYPE_BLANK. The type can be changed + either through calling setCellValue or setCellType. + + the column number this cell represents + a high level representation of the created cell. + + + + + Remove the Cell from this row. + + The cell to Remove. + + + + Removes the cell. + + The cell. + if set to true [also remove records]. + + + used internally to refresh the "last cell plus one" when the last cell is removed. + @return 0 when row contains no cells + + + used internally to refresh the "first cell" when the first cell is removed. + @return 0 when row contains no cells (also when first cell is occupied) + + + + Create a high level Cell object from an existing low level record. Should + only be called from HSSFSheet or HSSFRow itself. + + The low level cell to Create the high level representation from + the low level record passed in + + + + Removes all the cells from the row, and their + records too. + + + + + Moves the supplied cell to a new column, which + must not already have a cell there! + + The cell to move + The new column number (0 based) + + + + used internally to Add a cell. + + The cell. + + + + Get the hssfcell representing a given column (logical cell) + 0-based. If you ask for a cell that is not defined, then + you Get a null. + This is the basic call, with no policies applied + + 0 based column number + Cell representing that column or null if Undefined. + + + + Get the hssfcell representing a given column (logical cell) + 0-based. If you ask for a cell that is not defined then + you get a null, unless you have set a different + MissingCellPolicy on the base workbook. + + Short method signature provided to retain binary + compatibility. + + 0 based column number + Cell representing that column or null if undefined. + + + + Get the hssfcell representing a given column (logical cell) + 0-based. If you ask for a cell that is not defined then + you get a null, unless you have set a different + MissingCellPolicy on the base workbook. + + 0 based column number + Cell representing that column or null if undefined. + + + + Get the hssfcell representing a given column (logical cell) + 0-based. If you ask for a cell that is not defined, then + your supplied policy says what to do + + 0 based column number + Policy on blank / missing cells + that column or null if Undefined + policy allows. + + + + used internally to refresh the "first cell" when the first cell is Removed. + + The first cell index. + + + + + Gets the cell enumerator of the physically defined cells. + + + Note that the 4th element might well not be cell 4, as the iterator + will not return Un-defined (null) cells. + Call CellNum on the returned cells to know which cell they are. + + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: + Value + Meaning + Less than zero + This instance is less than . + Zero + This instance is equal to . + Greater than zero + This instance is greater than . + + + is not the same type as this instance. + + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + + The parameter is null. + + + + + Returns a hash code. In this case it is the number of the row. + + + + + true, when the row is invisible. This is the case when the height is zero. + + + + + Get row number this row represents + + the row number (0 based) + + + + Returns the rows outline level. Increased as you + put it into more Groups (outlines), reduced as + you take it out of them. + + The outline level. + + + Returns the HSSFSheet this row belongs to + + @return the HSSFSheet that owns this row + + + + Get the number of the first cell contained in this row. + + the first logical cell in the row, or -1 if the row does not contain any cells. + + + + Gets the index of the last cell contained in this row PLUS ONE + . The result also happens to be the 1-based column number of the last cell. This value can be used as a + standard upper bound when iterating over cells: + + + short representing the last logical cell in the row PLUS ONE, or -1 if the + row does not contain any cells. + + + short minColIx = row.GetFirstCellNum(); + short maxColIx = row.GetLastCellNum(); + for(short colIx=minColIx; colIx<maxColIx; colIx++) { + Cell cell = row.GetCell(colIx); + if(cell == null) { + continue; + } + //... do something with cell + } + + + + + Gets the number of defined cells (NOT number of cells in the actual row!). + That is to say if only columns 0,4,5 have values then there would be 3. + + the number of defined cells in the row. + + + + Gets or sets whether or not to Display this row with 0 height + + height is zero or not. + + + + Get or sets the row's height or ff (-1) for undefined/default-height in twips (1/20th of a point) + + rowheight or 0xff for Undefined (use sheet default) + + + + is this row formatted? Most aren't, but some rows + do have whole-row styles. For those that do, you + can get the formatting from {@link #getRowStyle()} + + + true if this instance is formatted; otherwise, false. + + + + + Returns the whole-row cell styles. Most rows won't + have one of these, so will return null. Call IsFormmated to check first + + The row style. + + + + Get the row's height or ff (-1) for Undefined/default-height in points (20*Height) + + row height or 0xff for Undefined (use sheet default). + + + + Get the lowlevel RowRecord represented by this object - should only be called + by other parts of the high level API + + RowRecord this row represents + + + + Get cells in the row (existing cells only, no blanks) + + + + + A shape Group may contain other shapes. It was no actual form on the + sheet. + @author Glen Stampoultzis (glens at apache.org) + + + + + Create another Group Under this Group. + + the position of the new Group. + the Group + + + + Create a new simple shape Under this Group. + + the position of the shape. + the shape + + + + Create a new textbox Under this Group. + + the position of the shape. + the textbox + + + + Creates a polygon + + the client anchor describes how this Group Is attached + to the sheet. + the newly Created shape. + + + + Creates a picture. + + the client anchor describes how this Group Is attached + to the sheet. + Index of the picture. + the newly Created shape. + + + + Sets the coordinate space of this Group. All children are constrained + to these coordinates. + + The x1. + The y1. + The x2. + The y2. + + + + Return all children contained by this shape. + + + + + + Gets The top left x coordinate of this Group. + + The x1. + + + + Gets The top left y coordinate of this Group. + + The y1. + + + + Gets The bottom right x coordinate of this Group. + + The x2. + + + + Gets the bottom right y coordinate of this Group. + + The y2. + + + + Count of all children and their childrens children. + + + + + + High level representation of a worksheet. + + + @author Andrew C. Oliver (acoliver at apache dot org) + @author Glen Stampoultzis (glens at apache.org) + @author Libin Roman (romal at vistaportal.com) + @author Shawn Laubach (slaubach at apache dot org) (Just a little) + @author Jean-Pierre Paris (jean-pierre.paris at m4x dot org) (Just a little, too) + @author Yegor Kozlov (yegor at apache.org) (Autosizing columns) + + + + + High level representation of a Excel worksheet. + + + Sheets are the central structures within a workbook, and are where a user does most of his spreadsheet work. + The most common type of sheet is the worksheet, which is represented as a grid of cells. Worksheet cells can + contain text, numbers, dates, and formulas. Cells can also be formatted. + + + + + Create a new row within the sheet and return the high level representation + + The row number. + high level Row object representing a row in the sheet + RemoveRow(Row) + + + + Remove a row from this sheet. All cells Contained in the row are Removed as well + + a row to Remove. + + + + Returns the logical row (not physical) 0-based. If you ask for a row that is not + defined you get a null. This is to say row 4 represents the fifth row on a sheet. + + row to get (0-based). + the rownumber or null if its not defined on the sheet + + + + Get the visibility state for a given column + + the column to get (0-based) + the visiblity state of the column + + + + Get the hidden state for a given column + + the column to set (0-based) + hidden - false if the column is visible + + + + Copy the source row to the target row. If the target row exists, the new copied row will be inserted before the existing one + + source index + target index + the new copied row object + + + + Set the width (in units of 1/256th of a character width) + + the column to set (0-based) + the width in units of 1/256th of a character width + + The maximum column width for an individual cell is 255 characters. + This value represents the number of characters that can be displayed + in a cell that is formatted with the standard font. + + + + + get the width (in units of 1/256th of a character width ) + + the column to get (0-based) + the width in units of 1/256th of a character width + + + + get the width in pixel + + + + + Please note, that this method works correctly only for workbooks + with the default font size (Arial 10pt for .xls and Calibri 11pt for .xlsx). + If the default font is changed the column width can be streched + + + + + Returns the CellStyle that applies to the given + (0 based) column, or null if no style has been + set for that column + + The column. + + + + Adds a merged region of cells (hence those cells form one) + + (rowfrom/colfrom-rowto/colto) to merge. + index of this region + + + + Removes a merged region of cells (hence letting them free) + + index of the region to unmerge + + + + Returns the merged region at the specified index + + The index. + + + + Gets the row enumerator. + + + an iterator of the PHYSICAL rows. Meaning the 3rd element may not + be the third row if say for instance the second row is undefined. + Call on each row + if you care which one it is. + + + + + Get the row enumerator + + + + + + Gets the size of the margin in inches. + + which margin to get + the size of the margin + + + + Sets the size of the margin in inches. + + which margin to get + the size of the margin + + + + Sets the protection enabled as well as the password + + to set for protection. Pass null to remove protection + + + + Sets the zoom magnication for the sheet. The zoom is expressed as a + fraction. For example to express a zoom of 75% use 3 for the numerator + and 4 for the denominator. + + The numerator for the zoom magnification. + denominator for the zoom magnification. + + + + Sets desktop window pane display area, when the file is first opened in a viewer. + + the top row to show in desktop window pane + the left column to show in desktop window pane + + + + Sets desktop window pane display area, when the + file is first opened in a viewer. + + the top row to show in desktop window pane + the left column to show in desktop window pane + + + + Shifts rows between startRow and endRow n number of rows. + If you use a negative number, it will shift rows up. + Code ensures that rows don't wrap around. + + Calls shiftRows(startRow, endRow, n, false, false); + + + Additionally shifts merged regions that are completely defined in these + rows (ie. merged 2 cells on a row to be shifted). + + the row to start shifting + the row to end shifting + the number of rows to shift + + + + Shifts rows between startRow and endRow n number of rows. + If you use a negative number, it will shift rows up. + Code ensures that rows don't wrap around + + Additionally shifts merged regions that are completely defined in these + rows (ie. merged 2 cells on a row to be shifted). + + the row to start shifting + the row to end shifting + the number of rows to shift + whether to copy the row height during the shift + whether to set the original row's height to the default + + + + Creates a split (freezepane). Any existing freezepane or split pane is overwritten. + + Horizonatal position of split + Vertical position of split + Top row visible in bottom pane + Left column visible in right pane + + + + Creates a split (freezepane). Any existing freezepane or split pane is overwritten. + + Horizonatal position of split. + Vertical position of split. + + + + Creates a split pane. Any existing freezepane or split pane is overwritten. + + Horizonatal position of split (in 1/20th of a point) + Vertical position of split (in 1/20th of a point) + Left column visible in right pane + Top row visible in bottom pane + Active pane. One of: PANE_LOWER_RIGHT, PANE_UPPER_RIGHT, PANE_LOWER_LEFT, PANE_UPPER_LEFT + @see #PANE_LOWER_LEFT + @see #PANE_LOWER_RIGHT + @see #PANE_UPPER_LEFT + @see #PANE_UPPER_RIGHT + + + + Determines if there is a page break at the indicated row + + The row. + + + + Removes the page break at the indicated row + + The row index. + + + + Sets the active cell. + + The row. + The column. + + + + Sets the active cell range. + + The firstrow. + The lastrow. + The firstcolumn. + The lastcolumn. + + + + Sets the active cell range. + + The cellranges. + The index of the active range. + The active row in the active range + The active column in the active range + + + + Sets a page break at the indicated column + + The column. + + + + Sets the row break. + + The row. + + + + Determines if there is a page break at the indicated column + + The column index. + + + + Removes a page break at the indicated column + + The column. + + + + Expands or collapses a column group. + + One of the columns in the group. + if set to truecollapse group.falseexpand group. + + + + Create an outline for the provided column range. + + beginning of the column range. + end of the column range. + + + + Ungroup a range of columns that were previously groupped + + start column (0-based). + end column (0-based). + + + + Tie a range of rows toGether so that they can be collapsed or expanded + + start row (0-based) + end row (0-based) + + + + Ungroup a range of rows that were previously groupped + + start row (0-based) + end row (0-based) + + + + Set view state of a groupped range of rows + + start row of a groupped range of rows (0-based). + whether to expand/collapse the detail rows. + + + + Sets the default column style for a given column. POI will only apply this style to new cells Added to the sheet. + + the column index + the style to set + + + + Adjusts the column width to fit the contents. + + the column index + + This process can be relatively slow on large sheets, so this should + normally only be called once per column, at the end of your + processing. + + + + + Adjusts the column width to fit the contents. + + the column index. + whether to use the contents of merged cells when + calculating the width of the column. Default is to ignore merged cells. + + This process can be relatively slow on large sheets, so this should + normally only be called once per column, at the end of your + processing. + + + + + Returns cell comment for the specified row and column + + The row. + The column. + + + + Creates the top-level drawing patriarch. + + + + + Sets whether sheet is selected. + + Whether to select the sheet or deselect the sheet. + + + + Sets array formula to specified region for result. + + text representation of the formula + Region of array formula for result + the of cells affected by this change + + + + Remove a Array Formula from this sheet. All cells contained in the Array Formula range are removed as well + + any cell within Array Formula range + the of cells affected by this change + + + + Checks if the provided region is part of the merged regions. + + Region searched in the merged regions + true, when the region is contained in at least one of the merged regions + + + + Create an instance of a DataValidationHelper. + + Instance of a DataValidationHelper + + + + Returns the list of DataValidation in the sheet. + + list of DataValidation in the sheet + + + + Creates a data validation object + + The data validation object settings + + + + Enable filtering for a range of cells + + the range of cells to filter + + + + Copy sheet with a new name + + new sheet name + cloned sheet + + + + Copy sheet with a new name + + new sheet name + whether to copy styles + cloned sheet + + + + Returns the column outline level. Increased as you + put it into more groups (outlines), reduced as + you take it out of them. + + + + + + + Returns the number of physically defined rows (NOT the number of rows in the sheet) + + the number of physically defined rows in this sheet. + + + + Gets the first row on the sheet + + the number of the first logical row on the sheet (0-based). + + + + Gets the last row on the sheet + + last row contained n this sheet (0-based) + + + + whether force formula recalculation. + + + + + Get the default column width for the sheet (if the columns do not define their own width) + in characters + + default column width measured in characters. + + + + Get the default row height for the sheet (if the rows do not define their own height) in + twips (1/20 of a point) + + default row height measured in twips (1/20 of a point) + + + + Get the default row height for the sheet (if the rows do not define their own height) in + points. + + The default row height in points. + + + + Determine whether printed output for this sheet will be horizontally centered. + + + + + Determine whether printed output for this sheet will be vertically centered. + + + + + Returns the number of merged regions + + + + + Gets the flag indicating whether the window should show 0 (zero) in cells Containing zero value. + When false, cells with zero value appear blank instead of showing the number zero. + + whether all zero values on the worksheet are displayed. + + + + Gets or sets a value indicating whether the sheet displays Automatic Page Breaks. + + + + + Get whether to display the guts or not, + + default value is true + + + + Flag indicating whether the Fit to Page print option is enabled. + + + + + Flag indicating whether summary rows appear below detail in an outline, when applying an outline. + + + When true a summary row is inserted below the detailed data being summarized and a + new outline level is established on that row. + + + When false a summary row is inserted above the detailed data being summarized and a new outline level + is established on that row. + + + true if row summaries appear below detail in the outline + + + + Flag indicating whether summary columns appear to the right of detail in an outline, when applying an outline. + + + When true a summary column is inserted to the right of the detailed data being summarized + and a new outline level is established on that column. + + + When false a summary column is inserted to the left of the detailed data being + summarized and a new outline level is established on that column. + + + true if col summaries appear right of the detail in the outline + + + + Gets the flag indicating whether this sheet displays the lines + between rows and columns to make editing and reading easier. + + true if this sheet displays gridlines. + + + + Gets the print Setup object. + + The user model for the print Setup object. + + + + Gets the user model for the default document header. +

+ Note that XSSF offers more kinds of document headers than HSSF does + +

+ the document header. Never null +
+ + + Gets the user model for the default document footer. +

+ Note that XSSF offers more kinds of document footers than HSSF does. +

+ the document footer. Never null +
+ + + Answer whether protection is enabled or disabled + + true => protection enabled; false => protection disabled + + + + Answer whether scenario protection is enabled or disabled + + true => protection enabled; false => protection disabled + + + + Gets or sets the tab color of the _sheet + + + + + Returns the top-level drawing patriach, if there is one. + This will hold any graphics or charts for the _sheet. + WARNING - calling this will trigger a parsing of the + associated escher records. Any that aren't supported + (such as charts and complex drawing types) will almost + certainly be lost or corrupted when written out. Only + use this with simple drawings, otherwise call + HSSFSheet#CreateDrawingPatriarch() and + start from scratch! + + The drawing patriarch. + + + + The top row in the visible view when the sheet is + first viewed after opening it in a viewer + + the rownum (0 based) of the top row. + + + + The left col in the visible view when the sheet is + first viewed after opening it in a viewer + + the rownum (0 based) of the top row + + + + Returns the information regarding the currently configured pane (split or freeze) + + if no pane configured returns null else return the pane information. + + + + Returns if gridlines are displayed + + + + + Returns if formulas are displayed + + + + + Returns if RowColHeadings are displayed. + + + + + Returns if RowColHeadings are displayed. + + + + + Retrieves all the horizontal page breaks + + all the horizontal page breaks, or null if there are no row page breaks + + + + Retrieves all the vertical page breaks + + all the vertical page breaks, or null if there are no column page breaks. + + + + Gets the parent workbook. + + + + + Gets the name of the sheet. + + + + + Gets or sets a value indicating whether this sheet is currently selected. + + + + + The 'Conditional Formatting' facet for this Sheet + + conditional formatting rule for this sheet + + + + Whether the text is displayed in right-to-left mode in the window + + + + + Get or set the repeating rows used when printing the sheet, as found in File->PageSetup->Sheet. +

+ Repeating rows cover a range of contiguous rows, e.g.: +

+            Sheet1!$1:$1
+            Sheet2!$5:$8
+            
+ The {@link CellRangeAddress} returned contains a column part which spans + all columns, and a row part which specifies the contiguous range of + repeating rows. +

+ If the Sheet does not have any repeating rows defined, null is returned. +

+
+ + + Gets or set the repeating columns used when printing the sheet, as found in File->PageSetup->Sheet. +

+ Repeating columns cover a range of contiguous columns, e.g.: +

+            Sheet1!$A:$A
+            Sheet2!$C:$F
+            
+ The {@link CellRangeAddress} returned contains a row part which spans all + rows, and a column part which specifies the contiguous range of + repeating columns. +

+ If the Sheet does not have any repeating columns defined, null is + returned. +

+
+ + Used for compile-time optimization. This is the initial size for the collection of + rows. It is currently Set to 20. If you generate larger sheets you may benefit + by Setting this to a higher number and recompiling a custom edition of HSSFSheet. + + + width of 1px in columns with default width in units of 1/256 of a character width + + + width of 1px in columns with overridden width in units of 1/256 of a character width + + + reference to the low level Sheet object + + + + Creates new HSSFSheet - called by HSSFWorkbook to create a _sheet from + scratch. You should not be calling this from application code (its protected anyhow). + + The HSSF Workbook object associated with the _sheet. + + + + + Creates an HSSFSheet representing the given Sheet object. Should only be + called by HSSFWorkbook when reading in an exisiting file. + + The HSSF Workbook object associated with the _sheet. + lowlevel Sheet object this _sheet will represent + + + + + Clones the _sheet. + + The _workbook. + the cloned sheet + + + + Copy one row to the target row + + index of the source row + index of the target row + + + + used internally to Set the properties given a Sheet object + + The _sheet. + + + + Create a new row within the _sheet and return the high level representation + + The row number. + + @see org.apache.poi.hssf.usermodel.HSSFRow + @see #RemoveRow(HSSFRow) + + + + Used internally to Create a high level Row object from a low level row object. + USed when Reading an existing file + + low level record to represent as a high level Row and Add to _sheet. + HSSFRow high level representation + + + + Remove a row from this _sheet. All cells contained in the row are Removed as well + + the row to Remove. + + + + used internally to refresh the "last row" when the last row is Removed. + + The last row. + + + + + used internally to refresh the "first row" when the first row is Removed. + + The first row. + + + + Add a row to the _sheet + + @param AddLow whether to Add the row to the low level model - false if its already there + + + + Returns the HSSFCellStyle that applies to the given + (0 based) column, or null if no style has been + set for that column + + The column. + + + + + Returns the logical row (not physical) 0-based. If you ask for a row that is not + defined you get a null. This is to say row 4 represents the fifth row on a _sheet. + + Index of the row to get. + the row number or null if its not defined on the _sheet + + + + Creates a data validation object + + The data validation object settings + + + + Get the visibility state for a given column.F:\Gloria\�о�\�ļ���ʽ\NPOI\src\NPOI\HSSF\Util\HSSFDataValidation.cs + + the column to Get (0-based). + the visiblity state of the column. + + + + Get the hidden state for a given column. + + the column to Set (0-based) + the visiblity state of the column; + + + + + Set the width (in Units of 1/256th of a Char width) + + the column to Set (0-based) + the width in Units of 1/256th of a Char width + + + + Get the width (in Units of 1/256th of a Char width ) + + the column to Set (0-based) + the width in Units of 1/256th of a Char width + + + + Adds a merged region of cells (hence those cells form one) + + The region (rowfrom/colfrom-rowto/colto) to merge. + index of this region + + + + adds a merged region of cells (hence those cells form one) + + region (rowfrom/colfrom-rowto/colto) to merge + index of this region + + + + Removes a merged region of cells (hence letting them free) + + index of the region to Unmerge + + + + Gets the row enumerator. + + + an iterator of the PHYSICAL rows. Meaning the 3rd element may not + be the third row if say for instance the second row is undefined. + Call on each row + if you care which one it is. + + + + + Alias for GetRowEnumerator() to allow foreach loops. + + + an iterator of the PHYSICAL rows. Meaning the 3rd element may not + be the third row if say for instance the second row is undefined. + Call on each row + if you care which one it is. + + + + + Sets the active cell. + + The row. + The column. + + + + Sets the active cell range. + + The first row. + The last row. + The first column. + The last column. + + + + Sets the active cell range. + + The cellranges. + The index of the active range. + The active row in the active range + The active column in the active range + + + + Sets whether sheet is selected. + + Whether to select the sheet or deselect the sheet. + + + + Sets the protection enabled as well as the password + + password to set for protection, pass null to remove protection + + + + Sets the zoom magnication for the _sheet. The zoom is expressed as a + fraction. For example to express a zoom of 75% use 3 for the numerator + and 4 for the denominator. + + The numerator for the zoom magnification. + The denominator for the zoom magnification. + + + + Sets the enclosed border of region. + + The region. + Type of the border. + The color. + + + + Sets the right border of region. + + The region. + Type of the border. + The color. + + + + Sets the left border of region. + + The region. + Type of the border. + The color. + + + + Sets the top border of region. + + The region. + Type of the border. + The color. + + + + Sets the bottom border of region. + + The region. + Type of the border. + The color. + + + Sets desktop window pane display area, when the + file is first opened in a viewer. + + @param toprow the top row to show in desktop window pane + @param leftcol the left column to show in desktop window pane + + + + Sets desktop window pane display area, when the + file is first opened in a viewer. + + the top row to show in desktop window pane + the left column to show in desktop window pane + + + + Shifts the merged regions left or right depending on mode + TODO: MODE , this is only row specific + + The start row. + The end row. + The n. + if set to true [is row]. + + + + Shifts rows between startRow and endRow n number of rows. + If you use a negative number, it will Shift rows up. + Code Ensures that rows don't wrap around. + Calls ShiftRows(startRow, endRow, n, false, false); + Additionally Shifts merged regions that are completely defined in these + rows (ie. merged 2 cells on a row to be Shifted). + + the row to start Shifting + the row to end Shifting + the number of rows to Shift + + + + Shifts rows between startRow and endRow n number of rows. + If you use a negative number, it will shift rows up. + Code ensures that rows don't wrap around + Additionally shifts merged regions that are completely defined in these + rows (ie. merged 2 cells on a row to be shifted). + TODO Might want to add bounds checking here + + the row to start shifting + the row to end shifting + the number of rows to shift + whether to copy the row height during the shift + whether to set the original row's height to the default + + + + Shifts rows between startRow and endRow n number of rows. + If you use a negative number, it will Shift rows up. + Code Ensures that rows don't wrap around + Additionally Shifts merged regions that are completely defined in these + rows (ie. merged 2 cells on a row to be Shifted). + TODO Might want to Add bounds Checking here + + the row to start Shifting + the row to end Shifting + the number of rows to Shift + whether to copy the row height during the Shift + whether to Set the original row's height to the default + if set to true [move comments]. + + + + Inserts the chart records. + + The records. + + + + Creates a split (freezepane). Any existing freezepane or split pane is overwritten. + + Horizonatal position of split. + Vertical position of split. + Top row visible in bottom pane + Left column visible in right pane. + + + + Creates a split (freezepane). Any existing freezepane or split pane is overwritten. + + Horizonatal position of split. + Vertical position of split. + + + + Creates a split pane. Any existing freezepane or split pane is overwritten. + + Horizonatal position of split (in 1/20th of a point). + Vertical position of split (in 1/20th of a point). + Left column visible in right pane. + Top row visible in bottom pane. + Active pane. One of: PANE_LOWER_RIGHT,PANE_UPPER_RIGHT, PANE_LOWER_LEFT, PANE_UPPER_LEFT + + + + Gets the size of the margin in inches. + + which margin to get. + the size of the margin + + + + Sets the size of the margin in inches. + + which margin to get. + the size of the margin + + + + Sets a page break at the indicated row + + The row. + + + + Determines if there is a page break at the indicated row + + The row. + + true if [is row broken] [the specified row]; otherwise, false. + + + + + Removes the page break at the indicated row + + The row. + + + + Sets a page break at the indicated column + + The column. + + + + Determines if there is a page break at the indicated column + + The column. + + true if [is column broken] [the specified column]; otherwise, false. + + + + + Removes a page break at the indicated column + + The column. + + + + Runs a bounds Check for row numbers + + The row. + + + + Runs a bounds Check for column numbers + + The column. + + + + Aggregates the drawing records and dumps the escher record hierarchy + to the standard output. + + if set to true [fat]. + + + Creates the top-level drawing patriarch. This will have + the effect of removing any existing drawings on this + sheet. + This may then be used to add graphics or charts + + @return The new patriarch. + + + + Expands or collapses a column Group. + + One of the columns in the Group. + true = collapse Group, false = expand Group. + + + + Create an outline for the provided column range. + + beginning of the column range. + end of the column range. + + + + Ungroups the column. + + From column. + To column. + + + + Groups the row. + + From row. + To row. + + + + Remove a Array Formula from this sheet. All cells contained in the Array Formula range are removed as well + + any cell within Array Formula range + the of cells affected by this change + + + + Also creates cells if they don't exist. + + + + + Sets array formula to specified region for result. + + text representation of the formula + Region of array formula for result + the of cells affected by this change + + + + Ungroups the row. + + From row. + To row. + + + + Sets the row group collapsed. + + The row. + if set to true [collapse]. + + + + Sets the default column style for a given column. POI will only apply this style to new cells Added to the _sheet. + + the column index + the style to set + + + + Adjusts the column width to fit the contents. + This Process can be relatively slow on large sheets, so this should + normally only be called once per column, at the end of your + Processing. + + the column index. + + + + Adjusts the column width to fit the contents. + This Process can be relatively slow on large sheets, so this should + normally only be called once per column, at the end of your + Processing. + You can specify whether the content of merged cells should be considered or ignored. + Default is to ignore merged cells. + + the column index + whether to use the contents of merged cells when calculating the width of the column + + + + Checks if the provided region is part of the merged regions. + + Region searched in the merged regions + true, when the region is contained in at least one of the merged regions + + + + Gets the merged region at the specified index + + The index. + + + + + Convert HSSFFont to Font. + + The font. + + + + + Returns cell comment for the specified row and column + + The row. + The column. + cell comment or null if not found + + + + Create an instance of a DataValidationHelper. + + Instance of a DataValidationHelper + + + + Enable filtering for a range of cells + + the range of cells to filter + + + + Returns the column outline level. Increased as you + put it into more groups (outlines), reduced as + you take it out of them. + + + + + + Gets the flag indicating whether the window should show 0 (zero) in cells containing zero value. + When false, cells with zero value appear blank instead of showing the number zero. + In Excel 2003 this option can be changed in the Options dialog on the View tab. + @return whether all zero values on the worksheet are displayed + + + + Returns the number of phsyically defined rows (NOT the number of rows in the _sheet) + + The physical number of rows. + + + + Gets the first row on the _sheet + + the number of the first logical row on the _sheet + + + + Gets the last row on the _sheet + + last row contained n this _sheet. + + + + Gets or sets the default width of the column. + + The default width of the column. + + + + Get the default row height for the _sheet (if the rows do not define their own height) in + twips (1/20 of a point) + + The default height of the row. + + + + Get the default row height for the _sheet (if the rows do not define their own height) in + points. + + The default row height in points. + + + + Get whether gridlines are printed. + + + true if printed; otherwise, false. + + + + + Whether a record must be Inserted or not at generation to indicate that + formula must be recalculated when _workbook is opened. + + + true if [force formula recalculation]; otherwise, false. + + @return true if an Uncalced record must be Inserted or not at generation + + + + Determine whether printed output for this _sheet will be vertically centered. + + true if [vertically center]; otherwise, false. + + + + Determine whether printed output for this _sheet will be horizontally centered. + + true if [horizontally center]; otherwise, false. + + + + returns the number of merged regions + + The number of merged regions + + + + used internally in the API to Get the low level Sheet record represented by this + Object. + + low level representation of this HSSFSheet. + + + + Gets or sets whether alternate expression evaluation is on + + + true if [alternative expression]; otherwise, false. + + + + + whether alternative formula entry is on + + true alternative formulas or not; otherwise, false. + + + + show automatic page breaks or not + + whether to show auto page breaks + + + + Gets or sets a value indicating whether _sheet is a dialog _sheet + + true if is dialog; otherwise, false. + + + + Gets or sets a value indicating whether to Display the guts or not. + + true if guts or no guts (or glory); otherwise, false. + + + + Gets or sets a value indicating whether fit to page option is on + + true if [fit to page]; otherwise, false. + + + + Get if row summaries appear below detail in the outline + + true if below or not; otherwise, false. + + + + Get if col summaries appear right of the detail in the outline + + true right or not; otherwise, false. + + + + Gets or sets whether gridlines are printed. + + + true Gridlines are printed; otherwise, false. + + + + + Gets the print setup object. + + The user model for the print setup object. + + + + Gets the user model for the document header. + + The Document header. + + + + Gets the user model for the document footer. + + The Document footer. + + + + Gets or sets whether the worksheet is displayed from right to left instead of from left to right. + + true for right to left, false otherwise + poi bug 47970 + + + + Note - this is not the same as whether the _sheet is focused (isActive) + + + true if this _sheet is currently selected; otherwise, false. + + + + + Gets or sets a value indicating if this _sheet is currently focused. + + true if this _sheet is currently focused; otherwise, false. + + + + Answer whether protection is enabled or disabled + + true if protection enabled; otherwise, false. + + + + Gets the hashed password + + The password. + + + + Answer whether object protection is enabled or disabled + + true if protection enabled; otherwise, false. + + + + Answer whether scenario protection is enabled or disabled + + true if protection enabled; otherwise, false. + + + + The top row in the visible view when the _sheet is + first viewed after opening it in a viewer + + the rownum (0 based) of the top row + + + + The left col in the visible view when the _sheet Is + first viewed after opening it in a viewer + + the rownum (0 based) of the top row + + + + Returns the information regarding the currently configured pane (split or freeze). + + null if no pane configured, or the pane information. + + + + Gets or sets if gridlines are Displayed. + + whether gridlines are Displayed + + + + Gets or sets a value indicating whether formulas are displayed. + + whether formulas are Displayed + + + + Gets or sets a value indicating whether RowColHeadings are displayed. + + + whether RowColHeadings are displayed + + + + + Retrieves all the horizontal page breaks + + all the horizontal page breaks, or null if there are no row page breaks + + + + Retrieves all the vertical page breaks + + all the vertical page breaks, or null if there are no column page breaks + + + + Returns the agregate escher records for this _sheet, + it there is one. + WARNING - calling this will trigger a parsing of the + associated escher records. Any that aren't supported + (such as charts and complex drawing types) will almost + certainly be lost or corrupted when written out. + + The drawing escher aggregate. + + + This will hold any graphics or charts for the sheet. + + @return the top-level drawing patriarch, if there is one, else returns null + + + + Gets or sets the tab color of the _sheet + + + + + Gets or sets whether the tab color of _sheet is automatic + + + + + Gets the sheet conditional formatting. + + The sheet conditional formatting. + + + + Get the DVRecords objects that are associated to this _sheet + + a list of DVRecord instances + + + + Provide a reference to the parent workbook. + + + + + Returns the name of this _sheet + + + + + The Conditional Formatting facet of HSSFSheet + @author Dmitriy Kumshayev + + + + The 'Conditional Formatting' facet of Sheet + + @author Dmitriy Kumshayev + @author Yegor Kozlov + @since 3.8 + + + + Add a new Conditional Formatting to the sheet. + + list of rectangular regions to apply conditional formatting rules + the rule to apply + index of the newly Created Conditional Formatting object + + + + Add a new Conditional Formatting consisting of two rules. + + list of rectangular regions to apply conditional formatting rules + the first rule + the second rule + index of the newly Created Conditional Formatting object + + + + Add a new Conditional Formatting Set to the sheet. + + list of rectangular regions to apply conditional formatting rules + Set of up to three conditional formatting rules + index of the newly Created Conditional Formatting object + + + + Adds a copy of a ConditionalFormatting object to the sheet + + the Conditional Formatting to clone + index of the new Conditional Formatting object + + This method could be used to copy ConditionalFormatting object + from one sheet to another. For example: + ConditionalFormatting cf = sheet.GetConditionalFormattingAt(index); + newSheet.AddConditionalFormatting(cf); + + + + A factory method allowing to create a conditional formatting rule + with a cell comparison operator +

+ The Created conditional formatting rule Compares a cell value + to a formula calculated result, using the specified operator. + The type of the Created condition is {@link ConditionalFormattingRule#CONDITION_TYPE_CELL_VALUE_IS} +

+ + @param comparisonOperation - MUST be a constant value from + {@link ComparisonOperator}:

+

    +
  • BETWEEN
  • +
  • NOT_BETWEEN
  • +
  • EQUAL
  • +
  • NOT_EQUAL
  • +
  • GT
  • +
  • LT
  • +
  • GE
  • +
  • LE
  • +
+

+ @param formula1 - formula for the valued, Compared with the cell + @param formula2 - second formula (only used with + {@link ComparisonOperator#BETWEEN}) and {@link ComparisonOperator#NOT_BETWEEN} operations) +
+ + + Create a conditional formatting rule that Compares a cell value to a formula calculated result, using an operator + + MUST be a constant value from ComparisonOperator except BETWEEN and NOT_BETWEEN + the formula to determine if the conditional formatting is applied + a conditional formatting rule + + + + Create a conditional formatting rule based on a Boolean formula. + When the formula result is true, the cell is highlighted. + + the formula to Evaluate. MUST be a Boolean function. + conditional formatting rule + + + + Gets Conditional Formatting object at a particular index + + 0-based index of the Conditional Formatting object to fetch + Conditional Formatting object or null if not found + throws ArgumentException if the index is outside of the allowable range (0 ... numberOfFormats-1) + + + + Removes a Conditional Formatting object by index + + 0-based index of the Conditional Formatting object to remove + throws ArgumentException if the index is outside of the allowable range (0 ... numberOfFormats-1) + + + + get the number of conditional formats in this sheet + + + + + A factory method allowing to Create a conditional formatting rule + with a cell comparison operator + TODO - formulas containing cell references are currently not Parsed properly + + a constant value from HSSFConditionalFormattingRule.ComparisonOperator + formula for the valued, Compared with the cell + second formula (only used with HSSFConditionalFormattingRule#COMPARISON_OPERATOR_BETWEEN + and HSSFConditionalFormattingRule#COMPARISON_OPERATOR_NOT_BETWEEN operations) + + + + + A factory method allowing to Create a conditional formatting rule with a formula. + The formatting rules are applied by Excel when the value of the formula not equal to 0. + TODO - formulas containing cell references are currently not Parsed properly + + formula for the valued, Compared with the cell + + + + + Adds a copy of HSSFConditionalFormatting object to the sheet + This method could be used to copy HSSFConditionalFormatting object + from one sheet to another. + + HSSFConditionalFormatting object + index of the new Conditional Formatting object + + HSSFConditionalFormatting cf = sheet.GetConditionalFormattingAt(index); + newSheet.AddConditionalFormatting(cf); + + + + + Allows to Add a new Conditional Formatting Set to the sheet. + + list of rectangular regions to apply conditional formatting rules + Set of up to three conditional formatting rules + index of the newly Created Conditional Formatting object + + + + Adds the conditional formatting. + + The regions. + The rule1. + + + + + Adds the conditional formatting. + + The regions. + The rule1. + The rule2. + + + + + Gets Conditional Formatting object at a particular index + @param index + of the Conditional Formatting object to fetch + + Conditional Formatting object + + + + + Removes a Conditional Formatting object by index + + index of a Conditional Formatting object to Remove + + + + the number of Conditional Formatting objects of the sheet + + The num conditional formattings. + + + + High level representation of a workbook. This is the first object most users + will construct whether they are reading or writing a workbook. It is also the + top level object for creating new sheets/etc. + + @author Andrew C. Oliver (acoliver at apache dot org) + @author Glen Stampoultzis (glens at apache.org) + @author Shawn Laubach (slaubach at apache dot org) + + + + High level interface of a Excel workbook. This is the first object most users + will construct whether they are reading or writing a workbook. It is also the + top level object for creating new sheets/etc. + This interface is shared between the implementation specific to xls and xlsx. + This way it is possible to access Excel workbooks stored in both formats. + + + + + Sets the order of appearance for a given sheet. + + the name of the sheet to reorder + the position that we want to insert the sheet into (0 based) + + + + Sets the tab whose data is actually seen when the sheet is opened. + This may be different from the "selected sheet" since excel seems to + allow you to show the data of one sheet when another is seen "selected" + in the tabs (at the bottom). + + the index of the sheet to select (0 based) + + + + set the active sheet. The active sheet is is the sheet + which is currently displayed when the workbook is viewed in Excel. + + index of the active sheet (0-based) + + + + Set the sheet name + + sheet number (0 based) + Sheet name + + + + Set the sheet name. + + sheet number (0 based) + sheet name + + + + Returns the index of the sheet by its name + + the sheet name + index of the sheet (0 based) + + + + Returns the index of the given sheet + + the sheet to look up + index of the sheet (0 based) + + + + Sreate an Sheet for this Workbook, Adds it to the sheets and returns + the high level representation. Use this to create new sheets. + + + + + + Create an Sheet for this Workbook, Adds it to the sheets and returns + the high level representation. Use this to create new sheets. + + sheetname to set for the sheet. + Sheet representing the new sheet. + + + + Create an Sheet from an existing sheet in the Workbook. + + + + + + + Get the Sheet object at the given index. + + index of the sheet number (0-based physical & logical) + Sheet at the provided index + + + + Get sheet with the given name + + name of the sheet + Sheet with the name provided or null if it does not exist + + + + Removes sheet at the given index + + + + + + Enumerate sheets + + + + + To set just repeating columns: + workbook.SetRepeatingRowsAndColumns(0,0,1,-1-1); + To set just repeating rows: + workbook.SetRepeatingRowsAndColumns(0,-1,-1,0,4); + To remove all repeating rows and columns for a sheet. + workbook.SetRepeatingRowsAndColumns(0,-1,-1,-1,-1); + + Sets the repeating rows and columns for a sheet (as found in + File->PageSetup->Sheet). This is function is included in the workbook + because it Creates/modifies name records which are stored at the + workbook level. + + 0 based index to sheet. + 0 based start of repeating columns. + 0 based end of repeating columns. + 0 based start of repeating rows. + 0 based end of repeating rows. + + + + Create a new Font and add it to the workbook's font table + + + + + + Finds a font that matches the one with the supplied attributes + + + + + + + + + + the font with the matched attributes or null + + + + Get the font at the given index number + + index number (0-based) + font at the index + + + + Create a new Cell style and add it to the workbook's style table + + the new Cell Style object + + + + Get the cell style object at the given index + + index within the set of styles (0-based) + CellStyle object at the index + + + + Write out this workbook to an OutPutstream. + + the stream you wish to write to + + + + the defined name with the specified name. + + the name of the defined name + the defined name with the specified name. null if not found + + + + the defined name at the specified index + + position of the named range (0-based) + + + + + Creates a new (unInitialised) defined name in this workbook + + new defined name object + + + + Gets the defined name index by name + + the name of the defined name + zero based index of the defined name. + + + + Remove the defined name at the specified index + + named range index (0 based) + + + + Remove a defined name by name + + the name of the defined name + + + + Adds the linking required to allow formulas referencing the specified + external workbook to be added to this one. In order for formulas + such as "[MyOtherWorkbook]Sheet3!$A$5" to be added to the file, + some linking information must first be recorded. Once a given external + workbook has been linked, then formulas using it can added. Each workbook + needs linking only once.
+ This linking only applies for writing formulas. + To link things for evaluation, see {@link FormulaEvaluator#setupReferencedWorkbooks(java.util.Map)} +
+ The name the workbook will be referenced as in formulas + The open workbook to fetch the link required information from + +
+ + + Sets the printarea for the sheet provided + + Zero-based sheet index + Valid name Reference for the Print Area + + + + Sets the printarea for the sheet provided + + Zero-based sheet index (0 = First Sheet) + Column to begin printarea + Column to end the printarea + Row to begin the printarea + Row to end the printarea + + + + Retrieves the reference for the printarea of the specified sheet, + the sheet name is Appended to the reference even if it was not specified. + + Zero-based sheet index + Null if no print area has been defined + + + + Delete the printarea for the sheet specified + + Zero-based sheet index (0 = First Sheet) + + + + Returns the instance of DataFormat for this workbook. + + the DataFormat object + + + + Adds a picture to the workbook. + + The bytes of the picture + The format of the picture. + the index to this picture (1 based). + + + + Gets all pictures from the Workbook. + + the list of pictures (a list of link PictureData objects.) + + + + Return an object that handles instantiating concrete classes of + the various instances one needs for HSSF and XSSF. + + + + + + Check whether a sheet is hidden. + + number of sheet + true if sheet is hidden + + + Check whether a sheet is very hidden. +

+ This is different from the normal hidden status + ({@link #isSheetHidden(int)}) +

+ @param sheetIx sheet index to check + @return true if sheet is very hidden +
+ + Hide or unhide a sheet + + @param sheetIx the sheet index (0-based) + @param hidden True to mark the sheet as hidden, false otherwise + + + Hide or unhide a sheet. +
+             0 = not hidden
+             1 = hidden
+             2 = very hidden.
+            
+ @param sheetIx The sheet number + @param hidden 0 for not hidden, 1 for hidden, 2 for very hidden +
+ + + Register a new toolpack in this workbook. + + the toolpack to register + + + + get the active sheet. The active sheet is is the sheet + which is currently displayed when the workbook is viewed in Excel. + + + + + Gets the first tab that is displayed in the list of tabs in excel. + + + + + Get the number of spreadsheets in the workbook + + + + + Get the number of fonts in the font table + + + + + Get the number of styles the workbook Contains + + + + + the total number of defined names in this workbook + + + + + Retrieves the current policy on what to do when getting missing or blank cells from a row. + + + + + if this workbook is not visible in the GUI + + + + The maximum number of cell styles in a .xls workbook. + The 'official' limit is 4,000, but POI allows a slightly larger number. + This extra delta takes into account built-in styles that are automatically + created for new workbooks + + See http://office.microsoft.com/en-us/excel-help/excel-specifications-and-limits-HP005199291.aspx + + + used for compile-time performance/memory optimization. This determines the + initial capacity for the sheet collection. Its currently Set to 3. + Changing it in this release will decrease performance + since you're never allowed to have more or less than three sheets! + + + @deprecated POI will now properly handle Unicode strings without + forceing an encoding + + + @deprecated POI will now properly handle Unicode strings without + forceing an encoding + + + this Is the reference to the low level Workbook object + + + this holds the HSSFSheet objects attached to this workbook + + + this holds the HSSFName objects attached to this workbook + + + holds whether or not to preserve other nodes in the POIFS. Used + for macros and embedded objects. + + + Used to keep track of the data formatter so that all + CreateDataFormatter calls return the same one for a given + book. This Ensures that updates from one places Is visible + someplace else. + + + this holds the HSSFFont objects attached to this workbook. + We only create these from the low level records as required. + + + + Creates new HSSFWorkbook from scratch (start here!) + + + + Companion to HSSFWorkbook(POIFSFileSystem), this constructs the + POI filesystem around your inputstream, including all nodes. + This calls {@link #HSSFWorkbook(InputStream, boolean)} with + preserve nodes set to true. + + @see #HSSFWorkbook(InputStream, boolean) + @see #HSSFWorkbook(POIFSFileSystem) + @see org.apache.poi.poifs.filesystem.POIFSFileSystem + @exception IOException if the stream cannot be read + + + + given a POI POIFSFileSystem object, Read in its Workbook and populate the high and + low level models. If you're Reading in a workbook...start here. + + the POI filesystem that Contains the Workbook stream. + whether to preseve other nodes, such as + macros. This takes more memory, so only say yes if you + need to. If Set, will store all of the POIFSFileSystem + in memory + + + Normally, the Workbook will be in a POIFS Stream + called "Workbook". However, some weird XLS generators use "WORKBOOK" + + + + given a POI POIFSFileSystem object, and a specific directory + within it, Read in its Workbook and populate the high and + low level models. If you're Reading in a workbook...start here. + + the POI filesystem directory to Process from + the POI filesystem that Contains the Workbook stream. + whether to preseve other nodes, such as + macros. This takes more memory, so only say yes if you + need to. If Set, will store all of the POIFSFileSystem + in memory + + + given a POI POIFSFileSystem object, and a specific directory + within it, read in its Workbook and populate the high and + low level models. If you're reading in a workbook...start here. + + @param directory the POI filesystem directory to process from + @param preserveNodes whether to preseve other nodes, such as + macros. This takes more memory, so only say yes if you + need to. If set, will store all of the POIFSFileSystem + in memory + @see org.apache.poi.poifs.filesystem.POIFSFileSystem + @exception IOException if the stream cannot be read + + + Companion to HSSFWorkbook(POIFSFileSystem), this constructs the POI filesystem around your + inputstream. + + @param s the POI filesystem that Contains the Workbook stream. + @param preserveNodes whether to preseve other nodes, such as + macros. This takes more memory, so only say yes if you + need to. + @see org.apache.poi.poifs.filesystem.POIFSFileSystem + @see #HSSFWorkbook(POIFSFileSystem) + @exception IOException if the stream cannot be Read + + + used internally to Set the workbook properties. + + + + This is basically a kludge to deal with the now obsolete Label records. If + you have to read in a sheet that contains Label records, be aware that the rest + of the API doesn't deal with them, the low level structure only provides Read-only + semi-immutable structures (the Sets are there for interface conformance with NO + impelmentation). In short, you need to call this function passing it a reference + to the Workbook object. All labels will be converted to LabelSST records and their + contained strings will be written to the Shared String tabel (SSTRecord) within + the Workbook. + + The records. + The offset. + + + + Sets the order of appearance for a given sheet. + + the name of the sheet to reorder + the position that we want to Insert the sheet into (0 based) + + + + Validates the index of the sheet. + + The index. + + + Test only. Do not use + + + + Selects a single sheet. This may be different to + the 'active' sheet (which Is the sheet with focus). + + The index. + + + + Sets the selected tabs. + + The indexes. + + + + Sets the tab whose data is actually seen when the sheet is opened. + This may be different from the "selected sheet" since excel seems to + allow you to show the data of one sheet when another Is seen "selected" + in the tabs (at the bottom). + The sheet number(0 based). + + + + + Set the sheet name. + + The sheet number(0 based). + The name. + + + + Get the sheet name + + The sheet index. + Sheet name + + + + Check whether a sheet is hidden + + The sheet index. + + true if sheet is hidden; otherwise, false. + + + + + Check whether a sheet is very hidden. + This is different from the normal + hidden status + + The sheet index. + + true if sheet is very hidden; otherwise, false. + + + + + Hide or Unhide a sheet + + The sheet index + True to mark the sheet as hidden, false otherwise + + + + Hide or unhide a sheet. + + The sheet number + 0 for not hidden, 1 for hidden, 2 for very hidden + + + + Returns the index of the sheet by his name + + the sheet name + index of the sheet (0 based) + + + + Returns the index of the given sheet + + the sheet to look up + index of the sheet (0 based).-1 + if not found + + + + Returns the external sheet index of the sheet + with the given internal index, creating one + if needed. + Used by some of the more obscure formula and + named range things. + + Index of the internal sheet. + + + + + Create an HSSFSheet for this HSSFWorkbook, Adds it to the sheets and returns + the high level representation. Use this to Create new sheets. + + HSSFSheet representing the new sheet. + + + + Create an HSSFSheet from an existing sheet in the HSSFWorkbook. + + the sheet index + HSSFSheet representing the Cloned sheet. + + + + Gets the name of the unique sheet. + + Name of the SRC. + + + + + Create an HSSFSheet for this HSSFWorkbook, Adds it to the sheets and + returns the high level representation. Use this to Create new sheets. + + sheetname to set for the sheet. + HSSFSheet representing the new sheet. + + + + Gets the sheets. + + + + + + Get the HSSFSheet object at the given index. + + index of the sheet number (0-based) + HSSFSheet at the provided index + + + + Get sheet with the given name (case insensitive match) + + name of the sheet + HSSFSheet with the name provided or null if it does not exist + + + + Removes sheet at the given index. + + index of the sheet (0-based) + + Care must be taken if the Removed sheet Is the currently active or only selected sheet in + the workbook. There are a few situations when Excel must have a selection and/or active + sheet. (For example when printing - see Bug 40414). + This method makes sure that if the Removed sheet was active, another sheet will become + active in its place. Furthermore, if the Removed sheet was the only selected sheet, another + sheet will become selected. The newly active/selected sheet will have the same index, or + one less if the Removed sheet was the last in the workbook. + + + + + Sets the repeating rows and columns for a sheet (as found in + File->PageSetup->Sheet). This Is function Is included in the workbook + because it Creates/modifies name records which are stored at the + workbook level. + + 0 based index to sheet. + 0 based start of repeating columns. + 0 based end of repeating columns. + 0 based start of repeating rows. + 0 based end of repeating rows. + + To set just repeating columns: + workbook.SetRepeatingRowsAndColumns(0,0,1,-1-1); + To set just repeating rows: + workbook.SetRepeatingRowsAndColumns(0,-1,-1,0,4); + To remove all repeating rows and columns for a sheet. + workbook.SetRepeatingRowsAndColumns(0,-1,-1,-1,-1); + + + + + Create a new Font and Add it to the workbook's font table + + new font object + + + + Finds a font that matches the one with the supplied attributes + + The bold weight. + The color. + Height of the font. + The name. + if set to true [italic]. + if set to true [strikeout]. + The type offset. + The underline. + + + + + Get the font at the given index number + + The index number + HSSFFont at the index + + + + Reset the fonts cache, causing all new calls + to getFontAt() to create new objects. + Should only be called after deleting fonts, + and that's not something you should normally do + + + + + Create a new Cell style and Add it to the workbook's style table + + the new Cell Style object + + + + Get the cell style object at the given index + + index within the Set of styles + HSSFCellStyle object at the index + + + Closes the underlying {@link NPOIFSFileSystem} from which + the Workbook was read, if any. Has no effect on Workbooks + opened from an InputStream, or newly created ones. + + + + Write out this workbook to an Outputstream. Constructs + a new POI POIFSFileSystem, passes in the workbook binary representation and + Writes it out. + + the java OutputStream you wish to Write the XLS to + + + + Get the bytes of just the HSSF portions of the XLS file. + Use this to construct a POI POIFSFileSystem yourself. + + byte[] array containing the binary representation of this workbook and all contained + sheets, rows, cells, etc. + + + The locator of user-defined functions. + By default includes functions from the Excel Analysis Toolpack + + + Register a new toolpack in this workbook. + + @param toopack the toolpack to register + + + + Gets the Named range + + position of the named range + named range high level + + + + Gets the named range name + + the named range index (0 based) + named range name + + + + TODO - make this less cryptic / move elsewhere + + Index to REF entry in EXTERNSHEET record in the Link Table + zero-based to DEFINEDNAME or EXTERNALNAME record + the string representation of the defined or external name + + + + Sets the printarea for the sheet provided + i.e. Reference = $A$1:$B$2 + + Zero-based sheet index (0 Represents the first sheet to keep consistent with java) + Valid name Reference for the Print Area + + + + Sets the print area. + + Zero-based sheet index (0 = First Sheet) + Column to begin printarea + Column to end the printarea + Row to begin the printarea + Row to end the printarea + + + + Retrieves the reference for the printarea of the specified sheet, the sheet name Is Appended to the reference even if it was not specified. + + Zero-based sheet index (0 Represents the first sheet to keep consistent with java) + String Null if no print area has been defined + + + + Delete the printarea for the sheet specified + + Zero-based sheet index (0 = First Sheet) + + + + Creates a new named range and Add it to the model + + named range high level + + + + Gets the named range index by his name + Note: + Excel named ranges are case-insensitive and + this method performs a case-insensitive search. + + named range name + named range index + + + + As GetNameIndex(String) is not necessarily unique + (name + sheet index is unique), this method is more accurate. + + the name whose index in the list of names of this workbook should be looked up. + an index value >= 0 if the name was found; -1, if the name was not found + + + + Remove the named range by his index + + The named range index (0 based) + + + + Creates the instance of HSSFDataFormat for this workbook. + + the HSSFDataFormat object + + + + Remove the named range by his name + + named range name + + + + As #removeName(String) is not necessarily unique (name + sheet index is unique), + this method is more accurate. + + the name to remove. + + + + Spits out a list of all the drawing records in the workbook. + + if set to true [fat]. + + + + Adds a picture to the workbook. + + The bytes of the picture + The format of the picture. One of + PictureType. + the index to this picture (1 based). + + + + Gets all pictures from the Workbook. + + the list of pictures (a list of HSSFPictureData objects.) + + + + Performs a recursive search for pictures in the given list of escher records. + + the escher records. + the list to populate with the pictures. + + + + Adds the LinkTable records required to allow formulas referencing + the specified external workbook to be added to this one. Allows + formulas such as "[MyOtherWorkbook]Sheet3!$A$5" to be added to the + file, for workbooks not already referenced. + + The name the workbook will be referenced as in formulas + The open workbook to fetch the link required information from + + + + + protect a workbook with a password (not encypted, just Sets Writeprotect + flags and the password. + + password to set + The username. + + + + Removes the Write protect flag + + + + + Gets all embedded OLE2 objects from the Workbook. + + the list of embedded objects (a list of HSSFObjectData objects.) + + + + Gets all embedded OLE2 objects from the Workbook. + + the list of records to search. + the list of embedded objects to populate. + + + + Recursively iterates a shape container to get all embedded objects. + + the parent. + the list of embedded objects to populate. + + + + Support foreach ISheet, e.g. + HSSFWorkbook workbook = new HSSFWorkbook(); + foreach(ISheet sheet in workbook) ... + + Enumeration of all the sheets of this workbook + + + Changes an external referenced file to another file. + A formular in Excel which refers a cell in another file is saved in two parts: + The referenced file is stored in an reference table. the row/cell information is saved separate. + This method invokation will only change the reference in the lookup-table itself. + @param oldUrl The old URL to search for and which is to be replaced + @param newUrl The URL replacement + @return true if the oldUrl was found and replaced with newUrl. Otherwise false + + + + Retrieves the current policy on what to do when + getting missing or blank cells from a row. + The default is to return blank and null cells. + + The missing cell policy. + + + + Gets the tab whose data is actually seen when the sheet is opened. + This may be different from the "selected sheet" since excel seems to + allow you to show the data of one sheet when another Is seen "selected" + in the tabs (at the bottom). + + + + + Gets or sets the first tab that is displayed in the list of tabs + in excel. + + + + + Get the number of spreadsheets in the workbook (this will be three after serialization) + + The number of sheets. + + + + determine whether the Excel GUI will backup the workbook when saving. + + the current Setting for backups. + + + + Get the number of fonts in the font table + + The number of fonts. + + + + Get the number of styles the workbook Contains + + count of cell styles + + + + Gets the workbook. + + The workbook. + + + + Gets the total number of named ranges in the workboko + + The number of named ranges + + + + Is the workbook protected with a password (not encrypted)? + + + true if this instance is write protected; otherwise, false. + + + + + Gets the new UID. + + The new UID. + + + + Whether the application shall perform a full recalculation when the workbook is opened. + + Typically you want to force formula recalculation when you modify cell formulas or values + of a workbook previously created by Excel. When set to true, this flag will tell Excel + that it needs to recalculate all formulas in the workbook the next time the file is opened. + + Note, that recalculation updates cached formula results and, thus, modifies the workbook. + Depending on the version, Excel may prompt you with "Do you want to save the changes in filename?" + on close. + + Value is true if the application will perform a full recalculation of + workbook values when the workbook is opened. + + since 3.8 + + + + + Totals the sizes of all sheet records and eventually serializes them + + + + This class Creates OperationEval instances to help evaluate OperationPtg + formula tokens. + + @author Josh Micich + + + returns the OperationEval concrete impl instance corresponding + to the supplied operationPtg + + + Allows the user to lookup the font metrics for a particular font without + actually having the font on the system. The font details are Loaded + as a resource from the POI jar file (or classpath) and should be contained + in path "/font_metrics.properties". The font widths are for a 10 point + version of the font. Use a multiplier for other sizes. + + @author Glen Stampoultzis (glens at apache.org) + + + The font metrics property file we're using + + + Our cache of font details we've alReady looked up + + + Retrieves the fake font details for a given font. + @param font the font to lookup. + @return the fake font. + + + 4 bytes - little endian + + + 2 bytes - little endian + + + 2 bytes - little endian + + + 8 bytes - serialized as big endian, stored with inverted endianness here + + + Read a GUID in standard text form e.g.
+ 13579BDF-0246-8ACE-0123-456789ABCDEF +
->
+ 0x13579BDF, 0x0246, 0x8ACE 0x0123456789ABCDEF +
+ +

Title: HSSFCellRangeAddress

+

Description: + Implementation of the cell range Address lists,like Is described in + OpenOffice.org's Excel Documentation . + In BIFF8 there Is a common way to store absolute cell range Address + lists in several records (not formulas). A cell range Address list + consists of a field with the number of ranges and the list of the range + Addresses. Each cell range Address (called an AddR structure) Contains + 4 16-bit-values.

+

Copyright: Copyright (c) 2004

+

Company:

+ @author Dragos Buleandra (dragos.buleandra@trade2b.ro) + @version 2.0-pre +
+ + Number of following AddR structures + + + List of AddR structures. Each structure represents a cell range + + + Construct a new HSSFCellRangeAddress object and Sets its fields appropriately . + Even this Isn't an Excel record , I kept the same behavior for reading/writing + the object's data as for a regular record . + + @param in the RecordInputstream to read the record from + + + Add an AddR structure . + @param first_row - the upper left hand corner's row + @param first_col - the upper left hand corner's col + @param last_row - the lower right hand corner's row + @param last_col - the lower right hand corner's col + @return the index of this AddR structure + + + Remove the AddR structure stored at the passed in index + @param index The AddR structure's index + + + return the AddR structure at the given index. + @return AddrStructure representing + + + Get the number of following AddR structures. + The number of this structures Is automatically Set when reading an Excel file + and/or increased when you manually Add a new AddR structure . + This Is the reason there Isn't a Set method for this field . + @return number of AddR structures + + + Get the upper left hand corner column number + @return column number for the upper left hand corner + + + Get the upper left hand corner row number + @return row number for the upper left hand corner + + + Get the lower right hand corner column number + @return column number for the lower right hand corner + + + Get the lower right hand corner row number + @return row number for the lower right hand corner + + + * Title: Range Address + * Description: provides connectivity utilities for ranges + * + * + * REFERENCE: + * @author IgOr KaTz & EuGeNe BuMaGiN (Tal Moshaiov) (VistaPortal LDT.) + @version 1.0 + + + Accepts an external reference from excel. + + i.e. Sheet1!$A$4:$B$9 + @param _url + + + + @return String note: All absolute references are Removed + + + Utility class for helping convert RK numbers. + + @author Andrew C. Oliver (acoliver at apache dot org) + @author Glen Stampoultzis (glens at apache.org) + @author Rolf-J黵gen Moll + + @see org.apache.poi.hssf.record.MulRKRecord + @see org.apache.poi.hssf.record.RKRecord + + + Do the dirty work of decoding; made a private static method to + facilitate testing the algorithm + + + Returns a collection of ATP function names implemented by POI. + + @return an array of supported functions + @since 3.8 beta6 + + + Returns a collection of ATP function names NOT implemented by POI. + + @return an array of not supported functions + @since 3.8 beta6 + + + Register a ATP function in runtime. + + @param name the function name + @param func the functoin to register + @throws ArgumentException if the function is unknown or already registered. + @since 3.8 beta6 + + + Implementation of Excel 'Analysis ToolPak' function MROUND()
+ + Returns a number rounded to the desired multiple.

+ + Syntax
+ MROUND(number, multiple) + +

+ + @author Yegor Kozlov + + + Implementation of Excel 'Analysis ToolPak' function ISEVEN() ISODD()
+ + @author Josh Micich +
+ + * Implementation of Excel 'Analysis ToolPak' function RANDBETWEEN()
+ * + * Returns a random integer number between the numbers you specify.

+ * + * Syntax
+ * RANDBETWEEN(bottom, top)

+ * + * bottom is the smallest integer RANDBETWEEN will return.
+ * top is the largest integer RANDBETWEEN will return.
+ + * @author Brendan Nolan + + + Evaluate for RANDBETWEEN(). Must be given two arguments. Bottom must be greater than top. + Bottom is rounded up and top value is rounded down. After rounding top has to be set greater + than top. + + @see org.apache.poi.ss.formula.functions.FreeRefFunction#evaluate(org.apache.poi.ss.formula.eval.ValueEval[], org.apache.poi.ss.formula.OperationEvaluationContext) + + + Implementation of Excel 'Analysis ToolPak' function YEARFRAC()
+ + Returns the fraction of the year spanned by two dates.

+ + Syntax
+ YEARFRAC(startDate, endDate, basis)

+ + The basis optionally specifies the behaviour of YEARFRAC as follows: + + + + + + + + +
ValueDays per MonthDays per Year
0 (default)30360
1actualactual
2actual360
3actual365
430360
+ + + +

+ Internal calculation methods for Excel 'Analysis ToolPak' function YEARFRAC() + Algorithm inspired by www.dwheeler.com/yearfrac + @author Josh Micich + + + Date Count convention + http://en.wikipedia.org/wiki/Day_count_convention + + + Office Online Help on YEARFRAC + http://office.microsoft.com/en-us/excel/HP052093441033.aspx + +
+ + use UTC time-zone to avoid daylight savings issues + + + the length of normal long months i.e. 31 + + + the length of normal short months i.e. 30 + + + + Calculates YEARFRAC() + + The start date. + The end date. + The basis value. + + + + + Basis 0, 30/360 date convention + + The start date value assumed to be less than or equal to endDateVal. + The end date value assumed to be greater than or equal to startDateVal. + + + + + Basis 1, Actual/Actual date convention + + The start date value assumed to be less than or equal to endDateVal. + The end date value assumed to be greater than or equal to startDateVal. + + + + + Basis 2, Actual/360 date convention + + The start date value assumed to be less than or equal to endDateVal. + The end date value assumed to be greater than or equal to startDateVal. + + + + + Basis 3, Actual/365 date convention + + The start date value assumed to be less than or equal to endDateVal. + The end date value assumed to be greater than or equal to startDateVal. + + + + + Basis 4, European 30/360 date convention + + The start date value assumed to be less than or equal to endDateVal. + The end date value assumed to be greater than or equal to startDateVal. + + + + + Calculates the adjusted. + + The start date. + The end date. + The date1day. + The date2day. + + + + + Determines whether [is last day of month] [the specified date]. + + The date. + + true if [is last day of month] [the specified date]; otherwise, false. + + + + + Gets the last day of month. + + The date. + + + + + Assumes dates are no more than 1 year apart. + + The start. + The end. + true + if dates both within a leap year, or span a period including Feb 29 + + + + return the whole number of days between the two time-stamps. Both time-stamps are + assumed to represent 12:00 midnight on the respective day. + + The start date ticks. + The end date ticks. + + + + + Averages the length of the year. + + The start year. + The end year. + + + + + determine Leap Year + + the year + + + + + Determines whether [is greater than one year] [the specified start]. + + The start date. + The end date. + + true if [is greater than one year] [the specified start]; otherwise, false. + + + + + Creates the date. + + The day count. + + + + + Simple Date Wrapper + + + + 1-based month + + + day of month + + + milliseconds since 1970 + + + Stores the parameters that identify the evaluation of one cell.
+
+ + A (mostly) opaque interface To allow test clients To trace cache values + Each spreadsheet cell Gets one unique cache entry instance. These objects + are safe To use as keys in {@link java.util.HashMap}s + + + Calls formulaCell.SetFormulaResult(null, null) recursively all the way up the tree of + dependencies. Calls usedCell.ClearConsumingCell(fc) for each child of a cell that Is + Cleared along the way. + @param formulaCells + + + Identical To {@link #RecurseClearCachedFormulaResults()} except for the listener call-backs + + + Stores details about the current evaluation of a cell.
+
+ + @param inputCell a cell directly used by the formula of this evaluation frame + + + @return never null, (possibly empty) array of all cells directly used while + evaluating the formula of this frame. + + + Manages a collection of {@link WorkbookEvaluator}s, in order To support evaluation of formulas + across spreadsheets.

+ + For POI internal use only + + @author Josh Micich + + + + + + Performance optimisation for {@link HSSFFormulaEvaluator}. This class stores previously + calculated values of already visited cells, To avoid unnecessary re-calculation when the + same cells are referenced multiple times + + + @author Josh Micich + + + only used for testing. null otherwise + + + Should be called whenever there are Changes To input cells in the evaluated workbook. + + +

+ Instances of this class keep track of multiple dependent cell evaluations due + To recursive calls To + The main purpose of this class is To detect an attempt To evaluate a cell + that is already being evaluated. In other words, it detects circular + references in spreadsheet formulas. + + + @author Josh Micich + +
+ + Notifies this evaluation tracker that evaluation of the specified cell Is + about To start.
+ + In the case of a true return code, the caller should + continue evaluation of the specified cell, and also be sure To call + endEvaluate() when complete.
+ + In the case of a null return code, the caller should + return an evaluation result of + ErrorEval.CIRCULAR_REF_ERROR, and not call endEvaluate(). +
+ @return false if the specified cell is already being evaluated +
+ + Notifies this evaluation tracker that the evaluation of the specified cell is complete.

+ + Every successful call To startEvaluate must be followed by a call To endEvaluate (recommended in a finally block) To enable + proper tracking of which cells are being evaluated at any point in time.

+ + Assuming a well behaved client, parameters To this method would not be + required. However, they have been included To assert correct behaviour, + and form more meaningful error messages. + + + Evaluation of 2D (Row+Column) and 3D (Sheet+Row+Column) areas + + + returns true if the cell at row and col specified + as absolute indexes in the sheet is contained in + this area. + @param row + @param col + + + returns true if the specified col is in range + @param col + + + returns true if the specified row is in range + @param row + + + @return the ValueEval from within this area at the specified row and col index. Never + null (possibly {@link BlankEval}). The specified indexes should be absolute + indexes in the sheet and not relative indexes within the area. + + + @return the ValueEval from within this area at the specified relativeRowIndex and + relativeColumnIndex. Never null (possibly {@link BlankEval}). The + specified indexes should relative to the top left corner of this area. + + + Creates an {@link AreaEval} offset by a relative amount from from the upper left cell + of this area + + + returns the 0-based index of the first row in + this area. + + + returns the 0-based index of the last row in + this area. + + + returns the 0-based index of the first col in + this area. + + + returns the 0-based index of the last col in + this area. + + + @author Josh Micich + + + @return whether cell at rowIndex and columnIndex is a subtotal. + By default return false which means 'don't care about subtotals' + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > This class is a + marker class. It is a special value for empty cells. + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @return never null, possibly empty string. + + + Convenience method for the following:
+ (b ? BoolEval.TRUE : BoolEval.FALSE) + @return a BoolEval instance representing b. +
+ + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + #NULL! - Intersection of two cell ranges is empty + + + #DIV/0! - Division by zero + + + #VALUE! - Wrong type of operand + + + #REF! - Illegal or deleted cell reference + + + #NAME? - Wrong function or range name + + + #NUM! - Value range overflow + + + #N/A - Argument or function not available + + + Translates an Excel internal error code into the corresponding POI ErrorEval instance + @param errorCode + + + Converts error codes to text. Handles non-standard error codes OK. + For debug/test purposes (and for formatting error messages). + @return the String representation of the specified Excel error code. + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + This class is used to simplify error handling logic within operator and function + implementations. Note - OperationEval.Evaluate() and Function.Evaluate() + method signatures do not throw this exception so it cannot propagate outside.

+ + Here is an example coded without EvaluationException, to show how it can help: +

+             public Eval Evaluate(Eval[] args, int srcRow, short srcCol) {
+            	// ...
+            	Eval arg0 = args[0];
+            	if(arg0 is ErrorEval) {
+            		return arg0;
+            	}
+            	if(!(arg0 is AreaEval)) {
+            		return ErrorEval.VALUE_INVALID;
+            	}
+            	double temp = 0;
+            	AreaEval area = (AreaEval)arg0;
+            	ValueEval[] values = area.LittleEndianConstants.BYTE_SIZE;
+            	for (int i = 0; i < values.Length; i++) {
+            		ValueEval ve = values[i];
+            		if(ve is ErrorEval) {
+            			return ve;
+            		}
+            		if(!(ve is NumericValueEval)) {
+            			return ErrorEval.VALUE_INVALID;
+            		}
+            		temp += ((NumericValueEval)ve).NumberValue;
+            	}
+            	// ...
+             }	 
+             
+ In this example, if any error is encountered while Processing the arguments, an error is + returned immediately. This code is difficult to refactor due to all the points where errors + are returned.
+ Using EvaluationException allows the error returning code to be consolidated to one + place.

+

+             public Eval Evaluate(Eval[] args, int srcRow, short srcCol) {
+            	try {
+            		// ...
+            		AreaEval area = GetAreaArg(args[0]);
+            		double temp = sumValues(area.LittleEndianConstants.BYTE_SIZE);
+            		// ...
+            	} catch (EvaluationException e) {
+            		return e.GetErrorEval();
+            	}
+            }
+            
+            private static AreaEval GetAreaArg(Eval arg0){
+            	if (arg0 is ErrorEval) {
+            		throw new EvaluationException((ErrorEval) arg0);
+            	}
+            	if (arg0 is AreaEval) {
+            		return (AreaEval) arg0;
+            	}
+            	throw EvaluationException.InvalidValue();
+            }
+            
+            private double sumValues(ValueEval[] values){
+            	double temp = 0;
+            	for (int i = 0; i < values.Length; i++) {
+            		ValueEval ve = values[i];
+            		if (ve is ErrorEval) {
+            			throw new EvaluationException((ErrorEval) ve);
+            		}
+            		if (!(ve is NumericValueEval)) {
+            			throw EvaluationException.InvalidValue();
+            		}
+            		temp += ((NumericValueEval) ve).NumberValue;
+            	}
+            	return temp;
+            }
+             
+ It is not mandatory to use EvaluationException, doing so might give the following advantages:
+ - Methods can more easily be extracted, allowing for re-use.
+ - Type management (typecasting etc) is simpler because error conditions have been Separated from + intermediate calculation values.
+ - Fewer local variables are required. Local variables can have stronger types.
+ - It is easier to mimic common Excel error handling behaviour (exit upon encountering first + error), because exceptions conveniently propagate up the call stack regardless of execution + points or the number of levels of nested calls.

+ + Note - Only standard evaluation errors are represented by EvaluationException ( + i.e. conditions expected to be encountered when evaluating arbitrary Excel formulas). Conditions + that could never occur in an Excel spReadsheet should result in runtime exceptions. Care should + be taken to not translate any POI internal error into an Excel evaluation error code. + + @author Josh Micich + + + #VALUE! - Wrong type of operand + + + #REF! - Illegal or deleted cell reference + + + #NUM! - Value range overflow + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Register a new function in runtime. + + @param name the function name + @param func the functoin to register + @throws ArgumentException if the function is unknown or already registered. + @since 3.8 beta6 + + + Returns a collection of function names implemented by POI. + + @return an array of supported functions + @since 3.8 beta6 + + + Returns an array of function names NOT implemented by POI. + + @return an array of not supported functions + @since 3.8 beta6 + + + Some function IDs that require special treatment + + + 1 + + + 78 + + + 100 + + + 148 + + + 255 + + + @author Josh Micich + + + @return simple rectangular {@link AreaEval} which represents the intersection of areas + aeA and aeB. If the two areas do not intersect, the result is null. + + + @author Josh Micich + + + Creates a NameEval representing a function name + + + Evaluation of a Name defined in a Sheet or Workbook scope + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Provides functionality for evaluating arguments to functions and operators. + + @author Josh Micich + + + Retrieves a single value from a variety of different argument types according to standard + Excel rules. Does not perform any type conversion. + @param arg the Evaluated argument as passed to the function or operator. + @param srcCellRow used when arg is a single column AreaRef + @param srcCellCol used when arg is a single row AreaRef + @return a NumberEval, StringEval, BoolEval or BlankEval. + Never null or ErrorEval. + @throws EvaluationException(#VALUE!) if srcCellRow or srcCellCol do not properly index into + an AreaEval. If the actual value retrieved is an ErrorEval, a corresponding + EvaluationException is thrown. + + + Implements (some perhaps not well known) Excel functionality to select a single cell from an + area depending on the coordinates of the calling cell. Here is an example demonstrating + both selection from a single row area and a single column area in the same formula. + + + + + + + +
A B C D
1152025
2 200
3 300
3 400
+ + If the formula "=1000+A1:B1+D2:D3" is put into the 9 cells from A2 to C4, the spReadsheet + will look like this: + + + + + + + +
A B C D
1152025
212151220#VALUE!200
313151320#VALUE!300
4#VALUE!#VALUE!#VALUE!400
+ + Note that the row area (A1:B1) does not include column C and the column area (D2:D3) does + not include row 4, so the values in C1(=25) and D4(=400) are not accessible to the formula + as written, but in the 4 cells A2:B3, the row and column selection works ok.

+ + The same concept is extended to references across sheets, such that even multi-row, + multi-column areas can be useful.

+ + Of course with carefully (or carelessly) chosen parameters, cyclic references can occur and + hence this method can throw a 'circular reference' EvaluationException. Note that + this method does not attempt to detect cycles. Every cell in the specified Area ae + has already been Evaluated prior to this method call. Any cell (or cells) part of + ae that would incur a cyclic reference error if selected by this method, will + already have the value ErrorEval.CIRCULAR_REF_ERROR upon entry to this method. It + is assumed logic exists elsewhere to produce this behaviour. + + @return whatever the selected cell's Evaluated value Is. Never null. Never + ErrorEval. + @if there is a problem with indexing into the area, or if the + Evaluated cell has an error. + + + @return possibly ErrorEval, and null + + + Applies some conversion rules if the supplied value is not already an integer.
+ Value is first Coerced to a double ( See CoerceValueTodouble() ).

+ + Excel typically Converts doubles to integers by truncating toward negative infinity.
+ The equivalent java code Is:
+ return (int)Math.floor(d);
+ not:
+ return (int)d; // wrong - rounds toward zero + + + + Applies some conversion rules if the supplied value is not already a number. + Note - BlankEval is not supported and must be handled by the caller. + @param ev must be a NumberEval, StringEval or BoolEval + @return actual, Parsed or interpreted double value (respectively). + @throws EvaluationException(#VALUE!) only if a StringEval is supplied and cannot be Parsed + as a double (See Parsedouble() for allowable formats). + @throws Exception if the supplied parameter is not NumberEval, + StringEval or BoolEval + + + Converts a string to a double using standard rules that Excel would use.
+ Tolerates currency prefixes, commas, leading and trailing spaces.

+ + Some examples:
+ " 123 " -> 123.0
+ ".123" -> 0.123
+ These not supported yet:
+ " $ 1,000.00 " -> 1000.0
+ "$1.25E4" -> 12500.0
+ "5**2" -> 500
+ "250%" -> 2.5
+ + @param text + @return null if the specified text cannot be Parsed as a number + + + @param ve must be a NumberEval, StringEval, BoolEval, or BlankEval + @return the Converted string value. never null + + + @return null to represent blank values + @throws EvaluationException if ve is an ErrorEval, or if a string value cannot be converted + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Implementation of Excel formula token '%'.

+ @author Josh Micich + + + + @author Josh Micich + + + @author Amol S Deshmukh < amolweb at ya hoo dot com > + + RefEval is the base interface for Ref2D and Ref3DEval. Basically a RefEval + impl should contain reference to the original ReferencePtg or Ref3DPtg as + well as the "value" resulting from the evaluation of the cell + reference. Thus if the HSSFCell has type CELL_TYPE_NUMERIC, the contained + value object should be of type NumberEval; if cell type is CELL_TYPE_STRING, + contained value object should be of type StringEval + + + The (possibly Evaluated) ValueEval contained + in this RefEval. eg. if cell A1 Contains "test" + then in a formula referring to cell A1 + the RefEval representing + A1 will return as the InnerValueEval the + object of concrete type StringEval + + + Creates an {@link AreaEval} offset by a relative amount from this RefEval + + + returns the zero based column index. + + + returns the zero based row index. + + + returns the first sheet index this applies to + + + returns the last sheet index this applies to, which + will be the same as the first for a 2D and many 3D references + + + returns the number of sheets this applies to + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo Dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + This is a documentation of the observed behaviour of + the '+' operator in Excel: + + - 1+TRUE = 2 + - 1+FALSE = 1 + - 1+"true" = #VALUE! + - 1+"1" = 2 + - 1+A1 = #VALUE if A1 Contains "1" + - 1+A1 = 2 if A1 Contains ="1" + - 1+A1 = 2 if A1 Contains TRUE or =TRUE + - 1+A1 = #VALUE! if A1 Contains "TRUE" or ="TRUE" + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Should be implemented by any {@link Ptg} subclass that needs Has an extern sheet index
+ + For POI internal use only + + @author Josh Micich +
+ + Encapsulates an encoded formula token array. + + @author Josh Micich + + + immutable + + + Convenience method for {@link #read(int, LittleEndianInput, int)} + + + When there are no array constants present, encodedTokenLen==totalEncodedLen + @param encodedTokenLen number of bytes in the stream taken by the plain formula tokens + @param totalEncodedLen the total number of bytes in the formula (includes trailing encoding + for array constants, but does not include 2 bytes for initial ushort encodedTokenLen field. + @return A new formula object as read from the stream. Possibly empty, never null. + + + Writes The formula encoding is includes: +

    +
  • ushort tokenDataLen
  • +
  • tokenData
  • +
  • arrayConstantData (if present)
  • +
+
+ + Creates a {@link Formula} object from a supplied {@link Ptg} array. + Handles nulls OK. + @param ptgs may be null + @return Never null (Possibly empty if the supplied ptgs is null) + + + Gets the {@link Ptg} array from the supplied {@link Formula}. + Handles nulls OK. + + @param formula may be null + @return possibly null (if the supplied formula is null) + + + @return total formula encoding length. The formula encoding includes: +
    +
  • ushort tokenDataLen
  • +
  • tokenData
  • +
  • arrayConstantData (optional)
  • +
+ Note - this value is different to tokenDataLength +
+ + This method is often used when the formula length does not appear immediately before + the encoded token data. + + @return the encoded length of the plain formula tokens. This does not include + the leading ushort field, nor any trailing array constant data. + + + Gets the locator for the corresponding {@link SharedFormulaRecord}, {@link ArrayRecord} or + {@link TableRecord} if this formula belongs to such a grouping. The {@link CellReference} + returned by this method will match the top left corner of the range of that grouping. + The return value is usually not the same as the location of the cell containing this formula. + + @return the firstRow & firstColumn of an array formula or shared formula that this formula + belongs to. null if this formula is not part of an array or shared formula. + + + + @author Josh Micich + + + @return null if not found + + + Stores the cached result of a formula evaluation, along with the Set of sensititive input cells + + @author Josh Micich + + + Cells 'used' in the current evaluation of the formula corresponding To this cache entry + + If any of the following cells Change, this cache entry needs To be Cleared + + + A custom implementation of {@link java.util.HashSet} in order To reduce memory consumption. + + Profiling tests (Oct 2008) have shown that each element {@link FormulaCellCacheEntry} takes + around 32 bytes To store in a HashSet, but around 6 bytes To store here. For Spreadsheets with + thousands of formula cells with multiple interdependencies, the savings can be very significant. + + @author Josh Micich + + + + Specific exception thrown when a supplied formula does not Parse properly. + Primarily used by test cases when testing for specific parsing exceptions. + + + + + This class was given package scope until it would become Clear that it is useful to general client code. + + + + + Lookahead Character. + Gets value '\0' when the input string is exhausted + + + Create the formula Parser, with the string that is To be + Parsed against the supplied workbook. + A later call the Parse() method To return ptg list in + rpn order, then call the GetRPNPtg() To retrive the + Parse results. + This class is recommended only for single threaded use. + + If you only have a usermodel.HSSFWorkbook, and not a + model.Workbook, then use the convenience method on + usermodel.HSSFFormulaEvaluator + + + Parse a formula into a array of tokens + + @param formula the formula to parse + @param workbook the parent workbook + @param formulaType the type of the formula, see {@link FormulaType} + @param sheetIndex the 0-based index of the sheet this formula belongs to. + The sheet index is required to resolve sheet-level names. -1 means that + the scope of the name will be ignored and the parser will match names only by name + + @return array of parsed tokens + @throws FormulaParseException if the formula is unparsable + + + Read New Character From Input Stream + + + Report What Was Expected + + + Recognize an Alpha Character + + + Recognize a Decimal Digit + + + Recognize an Alphanumeric + + + Recognize White Space + + + Skip Over Leading White Space + + + Consumes the next input character if it is equal To the one specified otherwise throws an + unchecked exception. This method does not consume whitespace (before or after the + matched character). + + + Get a Number + + + From OOO doc: "Whenever one operand of the reference subexpression is a function, + a defined name, a 3D reference, or an external reference (and no error occurs), + a tMemFunc token is used" + + + + + @return true if the specified character may be used in a defined name + + + @param currentParsePosition used to format a potential error message + + + @return false if sub-expression represented the specified ParseNode definitely + cannot appear on either side of the range (':') operator + + + Parses area refs (things which could be the operand of ':') and simple factors + Examples +
+               A$1
+               $A$1 :  $B1
+               A1 .......	C2
+               Sheet1 !$A1
+               a..b!A1
+               'my sheet'!A1
+               .my.sheet!A1
+               'my sheet':'my alt sheet'!A1
+               .my.sheet1:.my.sheet2!$B$2
+               my.named..range.
+               'my sheet'!my.named.range
+               .my.sheet!my.named.range
+               foo.bar(123.456, "abc")
+               123.456
+               "abc"
+               true
+               [Foo.xls]!$A$1
+               [Foo.xls]'my sheet'!$A$1
+               [Foo.xls]!my.named.range
+             
+ +
+ + Parses simple factors that are not primitive ranges or range components + i.e. '!', ':'(and equiv '...') do not appear + Examples +
+              my.named...range.
+              foo.bar(123.456, "abc")
+              123.456
+              "abc"
+              true
+            
+
+ + + @param sheetIden may be null + @param part1 + @param part2 may be null + + + Parses out a potential LHS or RHS of a ':' intended to produce a plain AreaRef. Normally these are + proper cell references but they could also be row or column refs like "$AC" or "10" + @return null (and leaves {@link #_pointer} unchanged if a proper range part does not parse out + + + + "A1", "B3" -> "A1:B3" + "sheet1!A1", "B3" -> "sheet1!A1:B3" + + @return null if the range expression cannot / shouldn't be reduced. + + + Note - caller should reset {@link #_pointer} upon null result + @return The sheet name as an identifier null if '!' is not found in the right place + + + If we have something that looks like [book]Sheet1: or + Sheet1, see if it's actually a range eg Sheet1:Sheet2! + + + very similar to {@link SheetNameFormatter#isSpecialChar(char)} + + + @return true if the specified name is a valid cell reference + + + Note - Excel Function names are 'case aware but not case sensitive'. This method may end + up creating a defined name record in the workbook if the specified name is not an internal + Excel Function, and Has not been encountered before. + + @param name case preserved Function name (as it was entered/appeared in the formula). + + + * Generates the variable Function ptg for the formula. + * + * For IF Formulas, Additional PTGs are Added To the Tokens + * @param name a {@link NamePtg} or {@link NameXPtg} or null + * @return Ptg a null is returned if we're in an IF formula, it needs extreme manipulation and is handled in this Function + + + Get arguments To a Function + + + Parse and Translate a Math Factor + + + factors (without ^ or % ) + + + Get a PTG for an integer from its string representation. + return Int or Number Ptg based on size of input + + + Parse and Translate a Math Term + + + Parse and Translate an Expression + + + API call To execute the parsing of the formula + + + + A1, $A1, A$1, $A$1, A, 1 + + + @return true if the two range parts can be combined in an + {@link AreaPtg} ( Note - the explicit range operator (:) may still be valid + when this method returns false ) + + + Common logic for rendering formulas.
+ + For POI internal use only + + @author Josh Micich +
+ + Static method To convert an array of {@link Ptg}s in RPN order + To a human readable string format in infix mode. + @param book used for defined names and 3D references + @param ptgs must not be null + @return a human readable String + + + Enumeration of various formula types.
+ + For POI internal use only + + @author Josh Micich +
+ + Optimisation - compacts many blank cell references used by a single formula. + + @author Josh Micich + + + Creates a text reference as text, given specified row and column numbers. + + @author Aniket Banerjee (banerjee@google.com) + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + ignore nested subtotals. + + + Returns the k-th percentile of values in a range. You can use this function to establish a threshold of + acceptance. For example, you can decide to examine candidates who score above the 90th percentile. + + PERCENTILE(array,k) + Array is the array or range of data that defines relative standing. + K is the percentile value in the range 0..1, inclusive. + + Remarks +
    +
  • if array is empty or Contains more than 8,191 data points, PERCENTILE returns the #NUM! error value.
  • +
  • If k is nonnumeric, PERCENTILE returns the #VALUE! error value.
  • +
  • If k is < 0 or if k > 1, PERCENTILE returns the #NUM! error value.
  • +
  • If k is not a multiple of 1/(n - 1), PERCENTILE interpolates to determine the value at the k-th percentile.
  • +
+
+ + Here are the general rules concerning Boolean functions: +
    +
  1. Blanks are ignored (not either true or false)
  2. +
  3. Strings are ignored if part of an area ref or cell ref, otherwise they must be 'true' or 'false'
  4. +
  5. Numbers: 0 is false. Any other number is TRUE
  6. +
  7. Areas: *all* cells in area are evaluated according to the above rules
  8. +
+ + @author Amol S. Deshmukh < amolweb at ya hoo dot com > +
+ + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Convenience base class for functions that only take zero arguments. + + @author Josh Micich + + + Implemented by all functions that can be called with zero arguments + + @author Josh Micich + + + see {@link Function#Evaluate(ValueEval[], int, int)} + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Implementation of Excel functions Date parsing functions: + Date - DAY, MONTH and YEAR + Time - HOUR, MINUTE and SECOND + + @author Others (not mentioned in code) + @author Thies Wellpott + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Josh Micich + + + Implementation for Excel COLUMNS function. + + @author Josh Micich + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Counts the number of cells that contain numeric data within + the list of arguments. + + Excel Syntax + COUNT(value1,value2,...) + Value1, value2, ... are 1 to 30 arguments representing the values or ranges to be Counted. + + TODO: Check this properly Matches excel on edge cases + like formula cells, error cells etc + + + Create an instance of Count to use in {@link Subtotal} +

+ If there are other subtotals within argument refs (or nested subtotals), + these nested subtotals are ignored to avoid double counting. +

+ + @see Subtotal +
+ + Common interface for the matching criteria. + + + Counts the number of cells that contain data within the list of arguments. + + Excel Syntax + COUNTA(value1,value2,...) + Value1, value2, ... are 1 to 30 arguments representing the values or ranges to be Counted. + + @author Josh Micich + + + don't count cells that are subtotals + + + Implementation for the function COUNTBLANK +

+ Syntax: COUNTBLANK ( range ) + + +
range is the range of cells to count blanks
+

+ + @author Mads Mohr Christensen +
+ + Implementation for the function COUNTIF

+ + Syntax: COUNTIF ( range, criteria ) + + + +
range is the range of cells to be Counted based on the criteria
criteriais used to determine which cells to Count
+

+ + @author Josh Micich + + + @return the number of evaluated cells in the range that match the specified criteria + + + + @return the de-referenced criteria arg (possibly {@link ErrorEval}) + + + When the second argument is a string, many things are possible + + + Creates a criteria predicate object for the supplied criteria arg + @return null if the arg evaluates to blank. + + + bool literals ('TRUE', 'FALSE') treated similarly but NOT same as numbers. + + + @return number of characters used to represent this operator + + +

+ Translates Excel countif wildcard strings into .NET regex strings + + Excel wildcard expression + return null if the specified value contains no special wildcard characters. +
+ + Common logic for COUNT, COUNTA and COUNTIF + + @author Josh Micich + + + @return the number of evaluated cells in the range that match the specified criteria + + + @return the number of evaluated cells in the range that match the specified criteria + + + @author Pavel Krupets (pkrupets at palmtreebusiness dot com) + + + Convenience base class for functions that must take exactly three arguments. + + @author Josh Micich + + + * Note - works with Java Calendar months, not Excel months + * Java Calendar month = Excel month + 1 + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + Super class for all Evals for financial function evaluation. + + + + Implemented by all functions that can be called with four arguments + + @author Josh Micich + + + see {@link Function#Evaluate(ValueEval[], int, int)} + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + This class Is a functon library for common fiscal functions. + Glossary of terms/abbreviations: +
+
    +
  • FV: Future Value
  • +
  • PV: Present Value
  • +
  • NPV: Net Present Value
  • +
  • PMT: (Periodic) Payment
  • + +
+ For more info on the terms/abbreviations please use the references below + (hyperlinks are subject to Change): +
Online References: +
    +
  1. GNU Emacs Calc 2.02 Manual: http://theory.uwinnipeg.ca/gnu/calc/calc_203.html
  2. +
  3. Yahoo Financial Glossary: http://biz.yahoo.com/f/g/nn.html#y
  4. +
  5. MS Excel function reference: http://office.microsoft.com/en-us/assistance/CH062528251033.aspx
  6. +
+

Implementation Notes:

+ Symbols used in the formulae that follow:
+
    +
  • p: present value
  • +
  • f: future value
  • +
  • n: number of periods
  • +
  • y: payment (in each period)
  • +
  • r: rate
  • +
  • ^: the power operator (NOT the java bitwise XOR operator!)
  • +
+ [From MS Excel function reference] Following are some of the key formulas + that are used in this implementation: +
+            p(1+r)^n + y(1+rt)((1+r)^n-1)/r + f=0   ...{when r!=0}
+            ny + p + f=0                            ...{when r=0}
+            
+
+ + Future value of an amount given the number of payments, rate, amount + of individual payment, present value and bool value indicating whether + payments are due at the beginning of period + (false => payments are due at end of period) + @param r rate + @param n num of periods + @param y pmt per period + @param p future value + @param t type (true=pmt at end of period, false=pmt at begining of period) + + + Present value of an amount given the number of future payments, rate, amount + of individual payment, future value and bool value indicating whether + payments are due at the beginning of period + (false => payments are due at end of period) + @param r + @param n + @param y + @param f + @param t + + + calculates the Net Present Value of a principal amount + given the disCount rate and a sequence of cash flows + (supplied as an array). If the amounts are income the value should + be positive, else if they are payments and not income, the + value should be negative. + @param r + @param cfs cashflow amounts + + + + @param r + @param n + @param p + @param f + @param t + + + + @param r + @param y + @param p + @param f + @param t + + + Convenience base class for functions that must take exactly four arguments. + + @author Josh Micich + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Implementation of the HLOOKUP() function.

+ + HLOOKUP Finds a column in a lookup table by the first row value and returns the value from another row.
+ + Syntax:
+ HLOOKUP(lookup_value, table_array, row_index_num, range_lookup)

+ + lookup_value The value to be found in the first column of the table array.
+ table_array An area reference for the lookup data.
+ row_index_num a 1 based index specifying which row value of the lookup data will be returned.
+ range_lookup If TRUE (default), HLOOKUP Finds the largest value less than or equal to + the lookup_value. If FALSE, only exact Matches will be considered
+ + @author Josh Micich + + + Returns one column from an AreaEval + + @(#VALUE!) if colIndex Is negative, (#REF!) if colIndex Is too high + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Implementation for the Excel function INDEX + + Syntax :
+ INDEX ( reference, row_num[, column_num [, area_num]])
+ INDEX ( array, row_num[, column_num]) + + + + + + +
referencetypically an area reference, possibly a union of areas
arraya literal array value (currently not supported)
row_numselects the row within the array or area reference
column_numselects column within the array or area reference. default Is 1
area_numused when reference Is a union of areas
+ + @author Josh Micich +
+ + @param colArgWasPassed false if the INDEX argument lIst had just 2 items + (exactly 1 comma). If anything Is passed for the column_num argument + (including {@link BlankEval} or {@link MIssingArgEval}) this parameter will be + true. ThIs parameter is needed because error codes are slightly + different when only 2 args are passed. + + + @param arg a 1-based index. + @return the Resolved 1-based index. Zero if the arg was missing or blank + @throws EvaluationException if the arg Is an error value evaluates to a negative numeric value + + + Implementation for Excel function INDIRECT

+ + INDIRECT() returns the cell or area reference denoted by the text argument.

+ + Syntax:
+ INDIRECT(ref_text,isA1Style)

+ + ref_text a string representation of the desired reference as it would normally be written + in a cell formula.
+ isA1Style (default TRUE) specifies whether the ref_text should be interpreted as A1-style + or R1C1-style. + + + @author Josh Micich + + + @return array of length 2: {workbookName, sheetName,}. Second element will always be + present. First element may be null if sheetName is unqualified. + Returns null if text cannot be parsed. + + + @return null if there is a syntax error in any escape sequence + (the typical syntax error is a single quote character not followed by another). + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Calculates the internal rate of return. + + Syntax is IRR(values) or IRR(values,guess) + + @author Marcel May + @author Yegor Kozlov + + @see Wikipedia on IRR + @see Excel IRR + + + Computes the internal rate of return using an estimated irr of 10 percent. + + @param income the income values. + @return the irr. + + + Calculates IRR using the Newton-Raphson Method. +

+ Starting with the guess, the method cycles through the calculation until the result + is accurate within 0.00001 percent. If IRR can't find a result that works + after 20 tries, the Double.NaN is returned. +

+

+ The implementation is inspired by the NewtonSolver from the Apache Commons-Math library, + @see http://commons.apache.org +

+ + @param values the income values. + @param guess the initial guess of irr. + @return the irr value. The method returns Double.NaN + if the maximum iteration count is exceeded + + @see + http://en.wikipedia.org/wiki/Internal_rate_of_return#Numerical_solution + @see + http://en.wikipedia.org/wiki/Newton%27s_method +
+ + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Implementation of Excel function LOOKUP.

+ + LOOKUP Finds an index row in a lookup table by the first column value and returns the value from another column. + + Syntax:
+ VLOOKUP(lookup_value, lookup_vector, result_vector)

+ + lookup_value The value to be found in the lookup vector.
+ lookup_vector An area reference for the lookup data.
+ result_vector Single row or single column area reference from which the result value Is chosen.
+ + @author Josh Micich + + + Common functionality used by VLOOKUP, HLOOKUP, LOOKUP and MATCH + + @author Josh Micich + + + @return null if the supplied area is neither a single row nor a single colum + + + Processes the third argument to VLOOKUP, or HLOOKUP (col_index_num + or row_index_num respectively).
+ Sample behaviour: + + + + + + + + + + + + + +
Input ReturnValue Thrown Error
54
2.92
"5"4
"2.18e1"21
"-$2"-3*
FALSE-1*
TRUE0
"TRUE" #REF!
"abc" #REF!
"" #REF!
<blank> #VALUE!

+ + * Note - out of range errors (both too high and too low) are handled by the caller. + @return column or row index as a zero-based value + +
+ + The second argument (table_array) should be an area ref, but can actually be a cell ref, in + which case it Is interpreted as a 1x1 area ref. Other scalar values cause #VALUE! error. + + + Resolves the last (optional) parameter (range_lookup) to the VLOOKUP and HLOOKUP functions. + @param rangeLookupArg + @param srcCellRow + @param srcCellCol + @return + @throws EvaluationException + + + Finds first (lowest index) exact occurrence of specified value. + @param lookupComparer the value to be found in column or row vector + @param vector the values to be searched. For VLOOKUP this Is the first column of the + tableArray. For HLOOKUP this Is the first row of the tableArray. + @return zero based index into the vector, -1 if value cannot be found + + + Excel has funny behaviour when the some elements in the search vector are the wrong type. + + + + Excel seems to handle mismatched types initially by just stepping 'mid' ix forward to the + first compatible value. + @param midIx 'mid' index (value which has the wrong type) + @return usually -1, signifying that the BinarySearchIndex has been narrowed to the new mid + index. Zero or greater signifies that an exact match for the lookup value was found + + + Once the binary search has found a single match, (V/H)LOOKUP steps one by one over subsequent + values to choose the last matching item. + + + @return one of 4 instances or CompareResult: LESS_THAN, EQUAL, + GREATER_THAN or TYPE_MISMATCH + + + used only for debug purposes + + + Enumeration to support 4 valued comparison results.

+ Excel lookup functions have complex behaviour in the case where the lookup array has mixed + types, and/or Is Unordered. Contrary to suggestions in some Excel documentation, there + does not appear to be a Universal ordering across types. The binary search algorithm used + Changes behaviour when the Evaluated 'mid' value has a different type to the lookup value.

+ + A simple int might have done the same job, but there Is risk in confusion with the well + known Comparable.CompareTo() and Comparator.Compare() which both use + a ubiquitous 3 value result encoding. + + + Encapsulates some standard binary search functionality so the Unusual Excel behaviour can + be clearly distinguished. + + + @return -1 if the search range Is empty + + + Implementation for the MATCH() Excel function.

+ + Syntax:
+ MATCH(lookup_value, lookup_array, match_type)

+ + Returns a 1-based index specifying at what position in the lookup_array the specified + lookup_value Is found.

+ + Specific matching behaviour can be modified with the optional match_type parameter. + + + + + + +
ValueMatching Behaviour
1(default) Find the largest value that Is less than or equal to lookup_value. + The lookup_array must be in ascending order*.
0Find the first value that Is exactly equal to lookup_value. + The lookup_array can be in any order.
-1Find the smallest value that Is greater than or equal to lookup_value. + The lookup_array must be in descending order*.
+ + * Note regarding order - For the match_type cases that require the lookup_array to + be ordered, MATCH() can produce incorrect results if this requirement Is not met. Observed + behaviour in Excel Is to return the lowest index value for which every item after that index + breaks the match rule.
+ The (ascending) sort order expected by MATCH() Is:
+ numbers (low to high), strings (A to Z), bool (FALSE to TRUE)
+ MATCH() ignores all elements in the lookup_array with a different type to the lookup_value. + Type conversion of the lookup_array elements Is never performed. + + + @author Josh Micich + + + @return zero based index + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + This class Is an extension to the standard math library + provided by java.lang.Math class. It follows the Math class + in that it has a private constructor and all static methods. + + + Returns a value rounded to p digits after decimal. + If p Is negative, then the number Is rounded to + places to the left of the decimal point. eg. + 10.23 rounded to -1 will give: 10. If p Is zero, + the returned value Is rounded to the nearest integral + value. + If n Is negative, the resulting value Is obtained + as the round value of absolute value of n multiplied + by the sign value of n (@see MathX.sign(double d)). + Thus, -0.6666666 rounded to p=0 will give -1 not 0. + If n Is NaN, returned value Is NaN. + @param n + @param p + + + Returns a value rounded-up to p digits after decimal. + If p Is negative, then the number Is rounded to + places to the left of the decimal point. eg. + 10.23 rounded to -1 will give: 20. If p Is zero, + the returned value Is rounded to the nearest integral + value. + If n Is negative, the resulting value Is obtained + as the round-up value of absolute value of n multiplied + by the sign value of n (@see MathX.sign(double d)). + Thus, -0.2 rounded-up to p=0 will give -1 not 0. + If n Is NaN, returned value Is NaN. + @param n + @param p + + + Returns a value rounded to p digits after decimal. + If p Is negative, then the number Is rounded to + places to the left of the decimal point. eg. + 10.23 rounded to -1 will give: 10. If p Is zero, + the returned value Is rounded to the nearest integral + value. + If n Is negative, the resulting value Is obtained + as the round-up value of absolute value of n multiplied + by the sign value of n (@see MathX.sign(double d)). + Thus, -0.8 rounded-down to p=0 will give 0 not -1. + If n Is NaN, returned value Is NaN. + @param n + @param p + + + average of all values + @param values + + + sum of all values + @param values + + + sum of squares of all values + @param values + + + product of all values + @param values + + + min of all values. If supplied array Is zero Length, + double.POSITIVE_INFINITY Is returned. + @param values + + + min of all values. If supplied array Is zero Length, + double.NEGATIVE_INFINITY Is returned. + @param values + + + Note: this function Is different from java.lang.Math.floor(..). + + When n and s are "valid" arguments, the returned value Is: Math.floor(n/s) * s; +
+ n and s are invalid if any of following conditions are true: +

    +
  • s Is zero
  • +
  • n Is negative and s Is positive
  • +
  • n Is positive and s Is negative
  • +
+ In all such cases, double.NaN Is returned. + @param n + @param s +
+ + Note: this function Is different from java.lang.Math.ceil(..). + + When n and s are "valid" arguments, the returned value Is: Math.ceiling(n/s) * s; +
+ n and s are invalid if any of following conditions are true: +
    +
  • s Is zero
  • +
  • n Is negative and s Is positive
  • +
  • n Is positive and s Is negative
  • +
+ In all such cases, double.NaN Is returned. + @param n + @param s +
+ +
for all n >= 1; factorial n = n * (n-1) * (n-2) * ... * 1 +
else if n == 0; factorial n = 1 +
else if n < 0; factorial n = double.NaN +
Loss of precision can occur if n Is large enough. + If n Is large so that the resulting value would be greater + than double.MAX_VALUE; double.POSITIVE_INFINITY Is returned. + If n < 0, double.NaN Is returned. + @param n +
+ + returns the remainder resulting from operation: + n / d. +
The result has the sign of the divisor. +
Examples: +
    +
  • mod(3.4, 2) = 1.4
  • +
  • mod(-3.4, 2) = 0.6
  • +
  • mod(-3.4, -2) = -1.4
  • +
  • mod(3.4, -2) = -0.6
  • +
+ If d == 0, result Is NaN + @param n + @param d +
+ + inverse hyperbolic cosine + @param d + + + inverse hyperbolic sine + @param d + + + inverse hyperbolic tangent + @param d + + + hyperbolic cosine + @param d + + + hyperbolic sine + @param d + + + hyperbolic tangent + @param d + + + returns the sum of product of corresponding double value in each + subarray. It Is the responsibility of the caller to Ensure that + all the subarrays are of equal Length. If the subarrays are + not of equal Length, the return value can be Unpredictable. + @param arrays + + + returns the sum of difference of squares of corresponding double + value in each subarray: ie. sigma (xarr[i]^2-yarr[i]^2) +
+ It Is the responsibility of the caller + to Ensure that the two subarrays are of equal Length. If the + subarrays are not of equal Length, the return value can be + Unpredictable. + @param xarr + @param yarr +
+ + returns the sum of sum of squares of corresponding double + value in each subarray: ie. sigma (xarr[i]^2 + yarr[i]^2) +
+ It Is the responsibility of the caller + to Ensure that the two subarrays are of equal Length. If the + subarrays are not of equal Length, the return value can be + Unpredictable. + @param xarr + @param yarr +
+ + returns the sum of squares of difference of corresponding double + value in each subarray: ie. sigma ( (xarr[i]-yarr[i])^2 ) +
+ It Is the responsibility of the caller + to Ensure that the two subarrays are of equal Length. If the + subarrays are not of equal Length, the return value can be + Unpredictable. + @param xarr + @param yarr +
+ + returns the total number of combinations possible when + k items are chosen out of total of n items. If the number + Is too large, loss of precision may occur (since returned + value Is double). If the returned value Is larger than + double.MAX_VALUE, double.POSITIVE_INFINITY Is returned. + If either of the parameters Is negative, double.NaN Is returned. + @param n + @param k + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + if v is zero length or contains no duplicates, return value is + Double.NaN. Else returns the value that occurs most times and if there is + a tie, returns the first such value. + + @param v + + + Implementation of Excel function NA() + + @author Josh Micich + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + This Is the default implementation of a Function class. + The default behaviour Is to return a non-standard ErrorEval + "ErrorEval.FUNCTION_NOT_IMPLEMENTED". This error should alert + the user that the formula contained a function that Is not + yet implemented. + + + Implementation of Excel NOW() Function + + @author Frank Taffelt + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + Support for hyperbolic trig functions was Added as a part of + Java distribution only in JDK1.5. This class uses custom + naive implementation based on formulas at: + http://www.math2.org/math/trig/hyperbolics.htm + These formulas seem to agree with excel's implementation. + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + Support for hyperbolic trig functions was Added as a part of + Java distribution only in JDK1.5. This class uses custom + naive implementation based on formulas at: + http://www.math2.org/math/trig/hyperbolics.htm + These formulas seem to agree with excel's implementation. + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + Support for hyperbolic trig functions was Added as a part of + Java distribution only in JDK1.5. This class uses custom + naive implementation based on formulas at: + http://www.math2.org/math/trig/hyperbolics.htm + These formulas seem to agree with excel's implementation. + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + Log: LOG(number,[base]) + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + This checks is x = 0 and the mean = 0. + Excel currently returns the value 1 where as the + maths common implementation will error. + @param x The number. + @param mean The mean. + @return If a default value should be returned. + + + All long-representable factorials + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Implementation for Excel function OFFSet()

+ + OFFSet returns an area reference that Is a specified number of rows and columns from a + reference cell or area.

+ + Syntax:
+ OFFSet(reference, rows, cols, height, width)

+ reference Is the base reference.
+ rows Is the number of rows up or down from the base reference.
+ cols Is the number of columns left or right from the base reference.
+ height (default same height as base reference) Is the row Count for the returned area reference.
+ width (default same width as base reference) Is the column Count for the returned area reference.
+ + @author Josh Micich + + + OFFSet's numeric arguments (2..5) have similar Processing rules + + + Fractional values are silently truncated by Excel. + Truncation Is toward negative infinity. + + + Exceptions are used within this class to help simplify flow control when error conditions + are enCountered + + + A one dimensional base + offset. Represents either a row range or a column range. + Two instances of this class toGether specify an area range. + + + Moves the range by the specified translation amount.

+ + This method also 'normalises' the range: Excel specifies that the width and height + parameters (Length field here) cannot be negative. However, OFFSet() does produce + sensible results in these cases. That behavior Is replicated here.

+ + @param translationAmount may be zero negative or positive + + @return the equivalent LinearOffsetRange with a positive Length, moved by the + specified translationAmount. + + + Encapsulates either an area or cell reference which may be 2d or 3d. + + + Implementation for the PMT() Excel function.

+ + Syntax:
+ PMT(rate, nper, pv, fv, type)

+ + Returns the constant repayment amount required for a loan assuming a constant interest rate.

+ + rate the loan interest rate.
+ nper the number of loan repayments.
+ pv the present value of the future payments (or principle).
+ fv the future value (default zero) surplus cash at the end of the loan lifetime.
+ type whether payments are due at the beginning(1) or end(0 - default) of each payment period.
+ + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Implementation for Excel ROWS function. + + @author Josh Micich + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + Library for common statistics functions + + + returns the mean of deviations from mean. + @param v + + + if v Is zero Length or Contains no duplicates, return value + Is double.NaN. Else returns the value that occurs most times + and if there Is a tie, returns the first such value. + @param v + + + Implementation for the Excel function SUBTOTAL

+ + Syntax :
+ SUBTOTAL ( functionCode, ref1, ref2 ... )
+ + + +
functionCode(1-11) Selects the underlying aggregate function to be used (see table below)
ref1, ref2 ...Arguments to be passed to the underlying aggregate function

+

+ + + + + + + + + + + + + + + +
functionCodeAggregate Function
1AVERAGE
2COUNT
3COUNTA
4MAX
5MIN
6PRODUCT
7STDEV
8STDEVP *
9SUM
10VAR *
11VARP *
101-111*

+ * Not implemented in POI yet. Functions 101-111 are the same as functions 1-11 but with + the option 'ignore hidden values'. +

+ + @author Paul Tomlin < pault at bulk sms dot com > + + + Implementation for the Excel function SUMIF

+ + Syntax :
+ SUMIF ( range, criteria, sum_range )
+ + + + +
rangeThe range over which criteria is applied. Also used for addend values when the third parameter is not present
criteriaThe value or expression used to filter rows from range
sum_rangeLocates the top-left corner of the corresponding range of addends - values to be added (after being selected by the criteria)

+

+ @author Josh Micich +
+ + @return a range of the same dimensions as aeRange using eval to define the top left corner. + @throws EvaluationException if eval is not a reference + + + Determines a double value for the specified ValueEval. + @param IsScalarProduct false for SUMPRODUCTs over area refs. + @throws EvalEx if ve represents an error value. +

+ Note - string values and empty cells are interpreted differently depending on + isScalarProduct. For scalar products, if any term Is blank or a string, the + error (#VALUE!) Is raised. For area (sum)products, if any term Is blank or a string, the + result Is zero. + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Constructs a new instance of the Accumulator used to calculated this function + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + +

+ An implementation of the MID function + MID returns a specific number of + Chars from a text string, starting at the specified position. + @author Manda Wilson < wilson at c bio dot msk cc dot org; + +
+ + An implementation of the Replace function: + Replaces part of a text string based on the number of Chars + you specify, with another text string. + @author Manda Wilson < wilson at c bio dot msk cc dot org > + + + Replaces part of a text string based on the number of Chars + you specify, with another text string. + + @see org.apache.poi.hssf.record.formula.eval.Eval + + + An implementation of the SUBSTITUTE function: + Substitutes text in a text string with new text, some number of times. + @author Manda Wilson < wilson at c bio dot msk cc dot org > + + + Substitutes text in a text string with new text, some number of times. + + @see org.apache.poi.hssf.record.formula.eval.Eval + + + An implementation of the TEXT function + TEXT returns a number value formatted with the given number formatting string. + This function is not a complete implementation of the Excel function, but + handles most of the common cases. All work is passed down to + {@link DataFormatter} to be done, as this works much the same as the + display focused work that that does. + + + An implementation of the TRIM function: + Removes leading and trailing spaces from value if Evaluated operand + value Is string. + @author Manda Wilson < wilson at c bio dot msk cc dot org > + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Implementation for the Excel function TIME + + @author Steven Butler (sebutler @ gmail dot com) + + Based on POI {@link DateFunc} + + + Converts the supplied hours, minutes and seconds to an Excel time value. + + + @param ds array of 3 doubles Containing hours, minutes and seconds. + Non-integer inputs are tRuncated to an integer before further calculation + of the time value. + @return An Excel representation of a time of day. + If the time value represents more than a day, the days are Removed from + the result, leaving only the time of day component. + @throws NPOI.SS.Formula.Eval.EvaluationException + If any of the arguments are greater than 32767 or the hours + minutes and seconds when combined form a time value less than 0, the function + Evaluates to an error. + + + "1,0000" is valid, "1,00" is not + + + TODO see if the same functionality is needed in {@link OperandResolver#parseDouble(String)} + + @return null if there is any problem converting the text + + + Convenience base class for any function which must take three or four + arguments + + @author Josh Micich + + + Implementation of the VLOOKUP() function.

+ + VLOOKUP Finds a row in a lookup table by the first column value and returns the value from another column.
+ + Syntax:
+ VLOOKUP(lookup_value, table_array, col_index_num, range_lookup)

+ + lookup_value The value to be found in the first column of the table array.
+ table_array An area reference for the lookup data.
+ col_index_num a 1 based index specifying which column value of the lookup data will be returned.
+ range_lookup If TRUE (default), VLOOKUP Finds the largest value less than or equal to + the lookup_value. If FALSE, only exact Matches will be considered
+ + @author Josh Micich + + + Returns one column from an AreaEval + + @(#VALUE!) if colIndex Is negative, (#REF!) if colIndex Is too high + + + Temporarily collects FunctionMetadata instances for creation of a + FunctionMetadataRegistry. + + @author Josh Micich + + + stores indexes of all functions with footnotes (i.e. whose definitions might Change) + + + Holds information about Excel built-in functions. + + @author Josh Micich + + + Converts the text meta-data file into a FunctionMetadataRegistry + + @author Josh Micich + + + plain ASCII text metadata file uses three dots for ellipsis + + + Makes sure that footnote digits from the original OOO document have not been accidentally + left behind + + + Allows clients to Get FunctionMetadata instances for any built-in function of Excel. + + @author Josh Micich + + + The name of the IF function (i.e. "IF"). Extracted as a constant for clarity. + + + Resolves a built-in function index. + @param name uppercase function name + @return a negative value if the function name is not found. + This typically occurs for external functions. + + + Tests can implement this class To track the internal working of the {@link WorkbookEvaluator}.
+ + For POI internal testing use only + + @author Josh Micich +
+ + Internally, formula {@link ICacheEntry}s are stored in Sets which may Change ordering due + To seemingly trivial Changes. This method is provided To make the order of call-backs To + {@link #onClearDependentCachedValue(ICacheEntry, int)} more deterministic. + + + Used to help optimise cell evaluation result caching by allowing applications to specify which + parts of a workbook are final.
+ The term final is introduced here to denote immutability or 'having constant definition'. + This classification refers to potential actions (on the evaluated workbook) by the evaluating + application. It does not refer to operations performed by the evaluator ({@link + WorkbookEvaluator}).
+
+ General guidelines: +

    +
  • a plain value cell can be marked as 'final' if it will not be changed after the first call + to {@link WorkbookEvaluator#evaluate(EvaluationCell)}. +
  • +
  • a formula cell can be marked as 'final' if its formula will not be changed after the first + call to {@link WorkbookEvaluator#evaluate(EvaluationCell)}. This remains true even if changes + in dependent values may cause the evaluated value to change.
  • +
  • plain value cells should be marked as 'not final' if their plain value value may change. +
  • +
  • formula cells should be marked as 'not final' if their formula definition may change.
  • +
  • cells which may switch between plain value and formula should also be marked as 'not final'. +
  • +
+ Notes: +
    +
  • If none of the spreadsheet cells is expected to have its definition changed after evaluation + begins, every cell can be marked as 'final'. This is the most efficient / least resource + intensive option.
  • +
  • To retain freedom to change any cell definition at any time, an application may classify all + cells as 'not final'. This freedom comes at the expense of greater memory consumption.
  • +
  • For the purpose of these classifications, setting the cached formula result of a cell (for + example in {@link HSSFFormulaEvaluator#evaluateFormulaCell(org.apache.poi.ss.usermodel.Cell)}) + does not constitute changing the definition of the cell.
  • +
  • Updating cells which have been classified as 'final' will cause the evaluator to behave + unpredictably (typically ignoring the update).
  • +
+ + @author Josh Micich +
+ + Convenience implementation for situations where all cell definitions remain fixed after + evaluation begins. + + + Checks if a cell's value(/formula) is fixed - in other words - not expected to be modified + between calls to the evaluator. (Note - this is an independent concept from whether a + formula cell's evaluated value may change during successive calls to the evaluator). + + @param sheetIndex zero based index into workbook sheet list + @param rowIndex zero based row index of cell + @param columnIndex zero based column index of cell + @return false if the evaluating application may need to modify the specified + cell between calls to the evaluator. + + + Provides Lazy Evaluation to 3D Ranges + + + @return whether cell at rowIndex and columnIndex is a subtotal + + + Provides Lazy Evaluation to a 3D Reference + + TODO Provide access to multiple sheets where present + + + This class performs 'operand class' transformation. Non-base Tokens are classified into three + operand classes: +
    +
  • reference
  • +
  • value
  • +
  • array
  • +
+

+ + The operand class chosen for each Token depends on the formula type and the Token's place + in the formula. If POI Gets the operand class wrong, Excel may interpret the formula + incorrectly. This condition is typically manifested as a formula cell that displays as '#VALUE!', + but resolves correctly when the user presses F2, enter.

+ + The logic implemented here was partially inspired by the description in + "OpenOffice.org's Documentation of the Microsoft Excel File Format". The model presented there + seems To be inconsistent with observed Excel behaviour (These differences have not been fully + investigated). The implementation in this class Has been heavily modified in order To satisfy + concrete examples of how Excel performs the same logic (see TestRVA).

+ + Hopefully, as Additional important test cases are identified and Added To the test suite, + patterns might become more obvious in this code and allow for simplification. + + @author Josh Micich + + + Traverses the supplied formula parse tree, calling Ptg.SetClass() for each non-base + Token To Set its operand class. + + + @param callerForceArrayFlag true if one of the current node's parents is a + function Ptg which Has been Changed from default 'V' To 'A' type (due To requirements on + the function return value). + + + Contains all the contextual information required to Evaluate an operation + within a formula + + For POI internal use only + + @author Josh Micich + + + @return null if either workbook or sheet is not found + + + Resolves a cell or area reference dynamically. + @param workbookName the name of the workbook Containing the reference. If null + the current workbook is assumed. Note - to Evaluate formulas which use multiple workbooks, + a {@link CollaboratingWorkbooksEnvironment} must be set up. + @param sheetName the name of the sheet Containing the reference. May be null + (when workbookName is also null) in which case the current workbook and sheet is + assumed. + @param refStrPart1 the single cell reference or first part of the area reference. Must not + be null. + @param refStrPart2 the second part of the area reference. For single cell references this + parameter must be null + @param isA1Style specifies the format for refStrPart1 and refStrPart2. + Pass true for 'A1' style and false for 'R1C1' style. + TODO - currently POI only supports 'A1' reference style + @return a {@link RefEval} or {@link AreaEval} + + + This class Creates OperationEval instances To help evaluate OperationPtg + formula Tokens. + + @author Josh Micich + + + returns the OperationEval concrete impl instance corresponding + to the supplied operationPtg + + + Represents a syntactic element from a formula by encapsulating the corresponding Ptg + Token. Each ParseNode may have child ParseNodes in the case when the wrapped + Ptg is non-atomic. + + @author Josh Micich + + + Collects the array of Ptg Tokens for the specified tree. + + + The IF() function Gets marked up with two or three tAttr Tokens. + Similar logic will be required for CHOOSE() when it is supported + + See excelfileformat.pdf sec 3.10.5 "tAttr (19H) + + + + @author Josh Micich + + + Used for non-formula cells, primarily To keep track of the referencing (formula) cells. + + @author Josh Micich + + + This class provides the base functionality for Excel sheet functions + There are two kinds of function Ptgs - tFunc and tFuncVar + Therefore, this class will have ONLY two subclasses + @author Avik Sengupta + @author Andrew C. Oliver (acoliver at apache dot org) + + + defines a Ptg that is an operation instead of an operand + @author andy + + + returns a string representation of the operations + the Length of the input array should equal the number returned by + @see #GetNumberOfOperands + + + + The number of operands expected by the operations + + + The name of the IF function (i.e. "IF"). Extracted as a constant for clarity. + + + All external functions have function index 255 + + + Used to detect whether a function name found in a formula is one of the standard excel functions + + The name matching is case insensitive. + @return true if the name specifies a standard worksheet function, + false if the name should be assumed to be an external function. + + + Resolves internal function names into function indexes. + + The name matching is case insensitive. + @return the standard worksheet function index if found, otherwise FUNCTION_INDEX_EXTERNAL + + + external functions Get some special Processing + @return true if this is an external function + + + Addition operator PTG the "+" binomial operator. If you need more + explanation than that then well...We really can't help you here. + @author Andrew C. Oliver (acoliver@apache.org) + @author Jason Height (jheight at chariot dot net dot au) + + + Common baseclass of all value operators. + Subclasses include all Unary and binary operators except for the reference operators (IntersectionPtg, RangePtg, UnionPtg) + + @author Josh Micich + + + All Operator Ptgs are base tokens (i.e. are not RVA classified) + + + implementation of method from OperationsPtg + + + Common superclass of 2-D area refs + + +

Title: Area 3D Ptg - 3D reference (Sheet + Area)

+

Description: Defined an area in Extern Sheet.

+

REFERENCE:

+ + This is HSSF only, as it matches the HSSF file format way of + referring to the sheet by an extern index. The XSSF equivalent + is {@link Area3DPxg} +
+ + Should be implemented by any {@link Ptg} subclass that needs a workbook To render its formula. +
+ + For POI internal use only + + @author Josh Micich +
+ + @return text representation of this area reference that can be used in text + formulas. The sheet name will get properly delimited if required. + + + AreaErr - handles deleted cell area references. + + @author Daniel Noll (daniel at nuix dot com dot au) + + + Specifies a rectangular area of cells A1:A4 for instance. + @author Jason Height (jheight at chariot dot net dot au) + + + Specifies a rectangular area of cells A1:A4 for instance. + @author Jason Height (jheight at chariot dot net dot au) + + + ArrayPtg - handles arrays + + The ArrayPtg is a little weird, the size of the Ptg when parsing initially only + includes the Ptg sid and the reserved bytes. The next Ptg in the expression then follows. + It is only after the "size" of all the Ptgs is met, that the ArrayPtg data is actually + held after this. So Ptg.CreateParsedExpression keeps track of the number of + ArrayPtg elements and need to Parse the data upto the FORMULA record size. + + @author Jason Height (jheight at chariot dot net dot au) + + + The size of the plain tArray token written within the standard formula tokens + (not including the data which comes after all formula tokens) + + + @param values2d array values arranged in rows + + + Note - (2D) array elements are stored column by column + @return the index into the internal 1D array for the specified column and row + + + This size includes the size of the array Ptg plus the Array Ptg Token value size + + + Represents the initial plain tArray token (without the constant data that trails the whole + formula). Objects of this class are only temporary and cannot be used as {@link Ptg}s. + These temporary objects get converted to {@link ArrayPtg} by the + {@link #finishReading(LittleEndianInput)} method. + + + Read in the actual token (array) values. This occurs + AFTER the last Ptg in the expression. + See page 304-305 of Excel97-2007BinaryFileFormat(xls)Specification.pdf + + + "Special Attributes" + This seems to be a Misc Stuff and Junk record. One function it serves Is + in SUM functions (i.e. SUM(A1:A3) causes an area PTG then an ATTR with the SUM option Set) + @author andy + @author Jason Height (jheight at chariot dot net dot au) + + + Common baseclass for + tExp + tTbl + tParen + tNlr + tAttr + tSheet + tEndSheet + + + only used for tAttrChoose: table of offsets to starts of args + + + only used for tAttrChoose: offset to the tFuncVar for CHOOSE() + + + + Creates the space. + + a constant from SpaceType + The count. + + + + Creates if. + + distance (in bytes) to start of either + tFuncVar(IF) token (when false parameter is not present). + + + + Creates the skip. + + distance (in bytes) to position behind tFuncVar(IF) token (minus 1). + + + 00H = Spaces before the next token (not allowed before tParen token) + + + 01H = Carriage returns before the next token (not allowed before tParen token) + + + 02H = Spaces before opening parenthesis (only allowed before tParen token) + + + 03H = Carriage returns before opening parenthesis (only allowed before tParen token) + + + 04H = Spaces before closing parenthesis (only allowed before tParen, tFunc, and tFuncVar tokens) + + + 05H = Carriage returns before closing parenthesis (only allowed before tParen, tFunc, and tFuncVar tokens) + + + 06H = Spaces following the equality sign (only in macro sheets) + + + bool (bool) + Stores a (java) bool value in a formula. + @author Paul Krause (pkrause at soundbite dot com) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + + + @author Josh Micich + + + + @author andy + @author Jason Height (jheight at chariot dot net dot au) + + + Title: Deleted Area 3D Ptg - 3D referecnce (Sheet + Area) + Description: Defined a area in Extern Sheet. + REFERENCE: + @author Patrick Luby + @version 1.0-pre + + + Title: Deleted Reference 3D Ptg + Description: Defined a cell in extern sheet. + REFERENCE: + @author Patrick Luby + @version 1.0-pre + + + Creates new DeletedRef3DPtg + + + This PTG implements the standard binomial divide "/" + @author Andrew C. Oliver acoliver at apache dot org + @author Jason Height (jheight at chariot dot net dot au) + + + + @author andy + + + @author Daniel Noll (daniel at nuix dot com dot au) + + + #NULL! - Intersection of two cell ranges is empty + + + #DIV/0! - Division by zero + + + #VALUE! - Wrong type of operand + + + #REF! - Illegal or deleted cell reference + + + #NAME? - Wrong function or range name + + + #NUM! - Value range overflow + + + #N/A - Argument or function not available + + + Creates new ErrPtg + + + + @author andy + @author Jason Height (jheight at chariot dot net dot au) + @author dmui (save existing implementation) + + + @author Josh Micich + + + Extern sheet index of sheet where moving is occurring + + + Sheet name of the sheet where moving is occurring, + used for updating XSSF style 3D references on row shifts. + + + Create an instance for Shifting row. + + For example, this will be called on {@link NPOI.HSSF.UserModel.HSSFSheet#ShiftRows(int, int, int)} } + + + Create an instance for shifting sheets. + + For example, this will be called on {@link org.apache.poi.hssf.usermodel.HSSFWorkbook#setSheetOrder(String, int)} + + + @param ptgs - if necessary, will get modified by this method + @param currentExternSheetIx - the extern sheet index of the sheet that contains the formula being adjusted + @return true if a change was made to the formula tokens + + + @return true if this Ptg needed to be changed + + + @author aviks + @author Jason Height (jheight at chariot dot net dot au) + @author Danny Mui (dmui at apache dot org) (Leftover handling) + + + + @author Jason Height (jheight at chariot dot net dot au) + + + Single instance of this token for 'sum() taking a single argument' + + + Creates new function pointer from a byte array + usually called while reading an excel file. + + + Create a function ptg from a string tokenised by the parser + + + PTG class to implement greater or equal to + + @author fred at stsci dot edu + + + Greater than operator PTG ">" + @author Cameron Riley (criley at ekmail.com) + + + Implementation of method from OperationsPtg + @param operands a String array of operands + @return String the Formula as a String + + + Get the number of operands for the Less than operator + @return int the number of operands + + + @author Daniel Noll (daniel at nuix dot com dot au) + + + Implementation of method from Ptg + + + implementation of method from OperationsPtg + + + Integer (unsigned short integer) + Stores an Unsigned short value (java int) in a formula + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + + + Excel represents integers 0..65535 with the tInt token. + @return true if the specified value is within the range of values + IntPtg can represent. + + + Ptg class to implement less than or equal + + @author fred at stsci dot edu + + + Less than operator PTG "<". The SID is taken from the + Openoffice.orgs Documentation of the Excel File Format, + Table 3.5.7 + @author Cameron Riley (criley at ekmail.com) + + + the sid for the less than operator as hex + + + identifier for LESS THAN char + + + Implementation of method from OperationsPtg + @param operands a String array of operands + @return String the Formula as a String + + + Get the number of operands for the Less than operator + @return int the number of operands + + + @author Daniel Noll (daniel at nuix dot com dot au) + + + Creates new MemAreaPtg + + + + @author andy + @author Jason Height (jheight at chariot dot net dot au) + @author Daniel Noll (daniel at nuix dot com dot au) + + + Creates new MemErrPtg + + + @author Glen Stampoultzis (glens at apache.org) + + + Creates new function pointer from a byte array + usually called while Reading an excel file. + + + Missing Function Arguments + + Avik Sengupta <avik at apache.org> + @author Jason Height (jheight at chariot dot net dot au) + + + Implements the standard mathmatical multiplication - * + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + + + + @author andy + @author Jason Height (jheight at chariot dot net dot au) + + + one-based index to defined name record + + + @param nameIndex zero-based index to name within workbook + + + Creates new NamePtg + + + @return zero based index to a defined name record in the LinkTable + + + A Name, be that a Named Range or a Function / User Defined + Function, addressed in the HSSF External Sheet style. + + This is HSSF only, as it matches the HSSF file format way of + referring to the sheet by an extern index. The XSSF equivalent + is {@link NameXPxg} + + + index to REF entry in externsheet record + + + index to defined name or externname table(1 based) + + + reserved must be 0 + + + @param sheetRefIndex index to REF entry in externsheet record + @param nameIndex index to defined name or externname table + + + Ptg class to implement not equal + + @author fred at stsci dot edu + + + Number + Stores a floating point value in a formula + value stored in a 8 byte field using IEEE notation + @author Avik Sengupta + @author Jason Height (jheight at chariot dot net dot au) + + + Create a NumberPtg from a byte array Read from disk + + + Create a NumberPtg from a string representation of the number + Number format is not checked, it is expected to be validated in the parser + that calls this method. + @param value : String representation of a floating point number + + + While formula tokens are stored in RPN order and thus do not need parenthesis for + precedence reasons, Parenthesis tokens ARE written to Ensure that user entered + parenthesis are Displayed as-is on Reading back + + Avik Sengupta <lists@aviksengupta.com> + Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + + + Percent PTG. + + @author Daniel Noll (daniel at nuix.com.au) + + + + @author andy + @author Jason Height (jheight at chariot dot net dot au) + + + @author Daniel Noll (daniel at nuix dot com dot au) + + + implementation of method from OperationsPtg + + + @author Josh Micich + + + Takes in a String representation of a cell reference and fills out the + numeric fields. + + + Title: Reference 3D Ptg + Description: Defined a cell in extern sheet. + REFERENCE: + @author Libin Roman (Vista Portal LDT. Developer) + @author Jason Height (jheight at chariot dot net dot au) + @version 1.0-pre + + + Field 2 + - lower 8 bits is the zero based Unsigned byte column index + - bit 16 - IsRowRelative + - bit 15 - IsColumnRelative + + + Creates new AreaPtg + + + @return text representation of this cell reference that can be used in text + formulas. The sheet name will Get properly delimited if required. + + + RefError - handles deleted cell reference + @author Jason Height (jheight at chariot dot net dot au) + + + RefNPtg + @author Jason Height (jheight at apache dot com) + + + Creates new ValueReferencePtg + + + ReferencePtg - handles references (such as A1, A2, IA4) + @author Andrew C. Oliver (acoliver@apache.org) + @author Jason Height (jheight at chariot dot net dot au) + + + Takes in a String representation of a cell reference and Fills out the + numeric fields. + + + String Stores a String value in a formula value stored in the format + <Length 2 bytes>char[] + + @author Werner Froidevaux + @author Jason Height (jheight at chariot dot net dot au) + @author Bernard Chesnoy + + + the Char (")used in formulas to delimit string literals + + + NOTE: OO doc says 16bit Length, but BiffViewer says 8 Book says something + totally different, so don't look there! + + + Create a StringPtg from a stream + + + Create a StringPtg from a string representation of the number Number + format Is not Checked, it Is expected to be Validated in the Parser that + calls this method. + + @param value : + String representation of a floating point number + + + + @author andy + @author Jason Height (jheight at chariot dot net dot au) + + + This ptg indicates a data table. + It only occurs in a FORMULA record, never in an + ARRAY or NAME record. When ptgTbl occurs in a + formula, it is the only token in the formula. + + This indicates that the cell containing the + formula is an interior cell in a data table; + the table description is found in a TABLE + record. Rows and columns which contain input + values to be substituted in the table do + not contain ptgTbl. + See page 811 of the june 08 binary docs. + + + The row number of the upper left corner + + + The column number of the upper left corner + + + Unary Plus operator + does not have any effect on the operand + @author Avik Sengupta + + + implementation of method from OperationsPtg + + + Unary Plus operator + does not have any effect on the operand + @author Avik Sengupta + + + implementation of method from OperationsPtg + + + @author Glen Stampoultzis (glens at apache.org) + + + implementation of method from OperationsPtg + + + + @author andy + @author Jason Height (jheight at chariot dot net dot au) + + + Creates new UnknownPtg + + + Formats sheet names for use in formula expressions. + + @author Josh Micich + + + Used to format sheet names as they would appear in cell formula expressions. + @return the sheet name UnChanged if there is no need for delimiting. Otherwise the sheet + name is enclosed in single quotes ('). Any single quotes which were already present in the + sheet name will be converted to double single quotes (''). + + + Convenience method for when a StringBuilder is already available + + @param out - sheet name will be Appended here possibly with delimiting quotes + + + @return true if the presence of the specified Char in a sheet name would + require the sheet name to be delimited in formulas. This includes every non-alphanumeric + Char besides Underscore '_'. + + + Used to decide whether sheet names like 'AB123' need delimiting due to the fact that they + look like cell references. +

+ This code is currently being used for translating formulas represented with Ptg + tokens into human readable text form. In formula expressions, a sheet name always has a + trailing '!' so there is little chance for ambiguity. It doesn't matter too much what this + method returns but it is worth noting the likely consumers of these formula text strings: +

    +
  1. POI's own formula parser
  2. +
  3. Visual reading by human
  4. +
  5. VBA automation entry into Excel cell contents e.g. ActiveCell.Formula = "=c64!A1"
  6. +
  7. Manual entry into Excel cell contents
  8. +
  9. Some third party formula parser
  10. +
+ + At the time of writing, POI's formula parser tolerates cell-like sheet names in formulas + with or without delimiters. The same goes for Excel(2007), both manual and automated entry. +

+ For better or worse this implementation attempts to replicate Excel's formula renderer. + Excel uses range checking on the apparent 'row' and 'column' components. Note however that + the maximum sheet size varies across versions. + @see org.apache.poi.hssf.util.CellReference + + + Note - this method assumes the specified rawSheetName has only letters and digits. It + cannot be used to match absolute or range references (using the dollar or colon char). + + Some notable cases: +

+ + + + + + + + + + +
Input Result Comments
"A1" true
"a111" true
"AA" false
"aa1" true
"A1A" false
"A1A1" false
"A$1:$C$20" falseNot a plain cell reference
"SALES20080101" trueStill needs delimiting even though well out of range
+ + @return true if there is any possible ambiguity that the specified rawSheetName + could be interpreted as a valid cell name. +
+ + + + @author Josh Micich + + + @return whether cell at rowIndex and columnIndex is a subtotal + @see org.apache.poi.ss.formula.functions.Subtotal + + + Default UDF Finder - for Adding your own user defined functions. + + @author PUdalau + + + Evaluates formula cells.

+ + For performance reasons, this class keeps a cache of all previously calculated intermediate + cell values. Be sure To call {@link #ClearCache()} if any workbook cells are Changed between + calls To evaluate~ methods on this class.
+ + For POI internal use only + + @author Josh Micich + + + also for debug use. Used in ToString methods + + + Should be called whenever there are Changes To input cells in the evaluated workbook. + Failure To call this method after changing cell values will cause incorrect behaviour + of the evaluate~ methods of this class + + + Should be called To tell the cell value cache that the specified (value or formula) cell + Has Changed. + + + Should be called To tell the cell value cache that the specified cell Has just been + deleted. + + + Case-insensitive. + @return -1 if sheet with specified name does not exist + + + @return never null, never {@link BlankEval} + + + Adds the current cell reference to the exception for easier debugging. + Would be nice to get the formula text as well, but that seems to require + too much digging around and casting to get the FormulaRenderingWorkbook. + + + Gets the value from a non-formula cell. + @param cell may be null + @return {@link BlankEval} if cell is null or blank, never null + + + whether print detailed messages about the next formula evaluation + + + Calculates the number of tokens that the evaluator should skip upon reaching a tAttrSkip. + + @return the number of tokens (starting from startIndex+1) that need to be skipped + to achieve the specified distInBytes skip distance. + + + Dereferences a single value from any AreaEval or RefEval evaluation result. + If the supplied evaluationResult is just a plain value, it is returned as-is. + @return a NumberEval, StringEval, BoolEval, + BlankEval or ErrorEval. Never null. + + + returns an appropriate Eval impl instance for the Ptg. The Ptg must be + one of: Area3DPtg, AreaPtg, ReferencePtg, Ref3DPtg, IntPtg, NumberPtg, + StringPtg, BoolPtg
special Note: OperationPtg subtypes cannot be + passed here! +
+ + Used by the lazy ref evals whenever they need To Get the value of a contained cell. + + + Return a collection of functions that POI can evaluate + + @return names of functions supported by POI + + + Return a collection of functions that POI does not support + + @return names of functions NOT supported by POI + + + Register a ATP function in runtime. + + @param name the function name + @param func the functoin to register + @throws IllegalArgumentException if the function is unknown or already registered. + @since 3.8 beta6 + + + Register a function in runtime. + + @param name the function name + @param func the functoin to register + @throws IllegalArgumentException if the function is unknown or already registered. + @since 3.8 beta6 + + + Whether to ignore missing references to external workbooks and + use cached formula results in the main workbook instead. +

+ In some cases exetrnal workbooks referenced by formulas in the main workbook are not avaiable. + With this method you can control how POI handles such missing references: +

    +
  • by default ignoreMissingWorkbooks=false and POI throws {@link WorkbookNotFoundException} + if an external reference cannot be resolved
  • +
  • if ignoreMissingWorkbooks=true then POI uses cached formula result + that already exists in the main workbook
  • +
+

+ @param ignore whether to ignore missing references to external workbooks + @see Bug 52575 for details +
+ + This enum allows spReadsheets from multiple Excel versions to be handled by the common code. + Properties of this enum correspond to attributes of the spReadsheet that are easily + discernable to the user. It is not intended to deal with low-level issues like file formats. +

+ + @author Josh Micich + @author Yegor Kozlov + + + Excel97 format aka BIFF8 +

    +
  • The total number of available columns is 256 (2^8)
  • +
  • The total number of available rows is 64k (2^16)
  • +
  • The maximum number of arguments to a function is 30
  • +
  • Number of conditional format conditions on a cell is 3
  • +
  • Length of text cell contents is unlimited
  • +
  • Length of text cell contents is 32767
  • +
+
+ + Excel2007 + +
    +
  • The total number of available columns is 16K (2^14)
  • +
  • The total number of available rows is 1M (2^20)
  • +
  • The maximum number of arguments to a function is 255
  • +
  • Number of conditional format conditions on a cell is unlimited + (actually limited by available memory in Excel)
  • +
  • Length of text cell contents is unlimited
  • +
+
+ + @return the default file extension of spReadsheet + + + @return the maximum number of usable rows in each spReadsheet + + + @return the last (maximum) valid row index, equals to GetMaxRows() - 1 + + + @return the maximum number of usable columns in each spReadsheet + + + @return the last (maximum) valid column index, equals to GetMaxColumns() - 1 + + + @return the maximum number arguments that can be passed to a multi-arg function (e.g. COUNTIF) + + + + @return the maximum number of conditional format conditions on a cell + + + + @return the last valid column index in a ALPHA-26 representation + (IV or XFD). + + + @return the maximum number of cell styles per spreadsheet + + + @return the maximum length of a text cell + + + + The enumeration value indicating the line style of a border in a cell + + + + + No border + + + + + Thin border + + + + + Medium border + + + + + dash border + + + + + dot border + + + + + Thick border + + + + + double-line border + + + + + hair-line border + + + + + Medium dashed border + + + + + dash-dot border + + + + + medium dash-dot border + + + + + dash-dot-dot border + + + + + medium dash-dot-dot border + + + + + slanted dash-dot border + + + + Utility to identify built-in formats. The following is a list of the formats as + returned by this class.

+

+ 0, "General"
+ 1, "0"
+ 2, "0.00"
+ 3, "#,##0"
+ 4, "#,##0.00"
+ 5, "$#,##0_);($#,##0)"
+ 6, "$#,##0_);[Red]($#,##0)"
+ 7, "$#,##0.00);($#,##0.00)"
+ 8, "$#,##0.00_);[Red]($#,##0.00)"
+ 9, "0%"
+ 0xa, "0.00%"
+ 0xb, "0.00E+00"
+ 0xc, "# ?/?"
+ 0xd, "# ??/??"
+ 0xe, "m/d/yy"
+ 0xf, "d-mmm-yy"
+ 0x10, "d-mmm"
+ 0x11, "mmm-yy"
+ 0x12, "h:mm AM/PM"
+ 0x13, "h:mm:ss AM/PM"
+ 0x14, "h:mm"
+ 0x15, "h:mm:ss"
+ 0x16, "m/d/yy h:mm"
+

+ // 0x17 - 0x24 reserved for international and undocumented + 0x25, "#,##0_);(#,##0)"
+ 0x26, "#,##0_);[Red](#,##0)"
+ 0x27, "#,##0.00_);(#,##0.00)"
+ 0x28, "#,##0.00_);[Red](#,##0.00)"
+ 0x29, "_(*#,##0_);_(*(#,##0);_(* \"-\"_);_(@_)"
+ 0x2a, "_($*#,##0_);_($*(#,##0);_($* \"-\"_);_(@_)"
+ 0x2b, "_(*#,##0.00_);_(*(#,##0.00);_(*\"-\"??_);_(@_)"
+ 0x2c, "_($*#,##0.00_);_($*(#,##0.00);_($*\"-\"??_);_(@_)"
+ 0x2d, "mm:ss"
+ 0x2e, "[h]:mm:ss"
+ 0x2f, "mm:ss.0"
+ 0x30, "##0.0E+0"
+ 0x31, "@" - This is text format.
+ 0x31 "text" - Alias for "@"
+

+ + @author Yegor Kozlov + + Modified 6/17/09 by Stanislav Shor - positive formats don't need starting '(' + + + + The first user-defined format starts at 164. + + + @deprecated (May 2009) use {@link #getAll()} + + + @return array of built-in data formats + + + Get the format string that matches the given format index + + @param index of a built in format + @return string represented at index of format or null if there is not a built-in format at that index + + + Get the format index that matches the given format string. + +

+ Automatically converts "text" to excel's format string to represent text. +

+ @param pFmt string matching a built-in format + @return index of format or -1 if undefined. +
+ + @param relativeRowIndex must be between 0 and height-1 + @param relativeColumnIndex must be between 0 and width-1 + @return the cell at the specified coordinates. Never null. + + + Gets the number of cells in this range. + @return height * width + + + @return the text format of this range. Single cell ranges are formatted + like single cell references (e.g. 'A1' instead of 'A1:A1'). + + + @return the cell at relative coordinates (0,0). Never null. + + + @return a flattened array of all the cells in this {@link CellRange} + + + @return a 2-D array of all the cells in this {@link CellRange}. The first + array dimension is the row index (values 0...height-1) + and the second dimension is the column index (values 0...width-1) + + + Mimics the 'data view' of a cell. This allows formula Evaluator + to return a CellValue instead of precasting the value to String + or Number or bool type. + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + @return Returns the boolValue. + + + @return Returns the numberValue. + + + @return Returns the stringValue. + + + @return Returns the cellType. + + + @return Returns the errorValue. + + + High level representation of a chart. + + @author Roman Kashitsyn + + + Abstraction of chart element that can be positioned with manual + layout. + + @author Roman Kashitsyn + + + Returns manual layout for the chart element. + @return manual layout for the chart element. + + + @return chart legend instance + + + Delete current chart legend. + + + @return list of all chart axis + + + Plots specified data on the chart. + + @param data a data to plot + + + @return an appropriate ChartDataFactory implementation + + + @return an appropriate ChartAxisFactory implementation + + + Specifies the possible crossing states of an axis. + + @author Roman Kashitsyn + + + Specifies the value axis shall cross the category axis + between data markers. + + + Specifies the value axis shall cross the category axis at + the midpoint of a category. + + + Specifies the possible crossing points for an axis. + + @author Roman Kashitsyn + + + The category axis crosses at the zero point of the value axis (if + possible), or the minimum value (if the minimum is greater than zero) or + the maximum (if the maximum is less than zero). + + + The axis crosses at the maximum value. + + + Axis crosses at the minimum value of the chart. + + + Specifies the possible ways to place a picture on a data point, series, wall, or floor. + + @author Roman Kashitsyn + + + Specifies that the values on the axis shall be reversed + so they go from maximum to minimum. + + + Specifies that the axis values shall be in the usual + order, minimum to maximum. + + + Enumeration of all possible axis positions. + + @author Roman Kashitsyn + + + High level representation of chart axis. + + @author Roman Kashitsyn + + + Declare this axis cross another axis. + @param axis that this axis should cross + + + @return axis id + + + get or set axis position + + + get or set axis number format + + + @return true if log base is defined, false otherwise + + + @param logBase a number between 2 and 1000 (inclusive) + @return axis log base or 0.0 if not Set + @throws ArgumentException if log base not within allowed range + + + @return true if minimum value is defined, false otherwise + + + get or set axis minimum + 0.0 if not Set + + + @return true if maximum value is defined, false otherwise + + + get or set axis maximum + 0.0 if not Set + + + get or set axis orientation + + + get or set axis cross type + + + @return visibility of the axis. + + + @return major tick mark. + + + @return minor tick mark. + + + + A factory for different chart axis. + + @author Roman Kashitsyn + + + + returns new value axis + + + + + + + A factory for different chart data types. + + + @author Roman Kashitsyn + + + + + returns an appropriate ScatterChartData instance + + + + + + High level representation of chart legend. + + @author Roman Kashitsyn + + + + legend position + + + + + + If true the legend is positioned over the chart area otherwise + the legend is displayed next to it. + Default is no overlay. + + + + + Specifies the possible ways to store a chart element's position. + + + @author Roman Kashitsyn + + + + + Specifies that the Width or Height shall be interpreted as the Right or Bottom of the chart element. + + + + + Specifies that the Width or Height shall be interpreted as the width or Height of the chart element. + + + + + Specifies whether to layout the plot area by its inside (not including axis + and axis labels) or outside (including axis and axis labels). + + + @author Roman Kashitsyn + + + + + Specifies that the plot area size shall determine the size of the plot area, not including the tick marks and axis labels. + + + + + Specifies that the plot area size shall determine the + size of the plot area, the tick marks, and the axis + labels. + + + + + Enumeration of all possible chart legend positions. + + + @author Roman Kashitsyn + + + + High level representation of chart element manual layout. + + @author Roman Kashitsyn + + + Sets the layout target. + @param target new layout target. + + + Returns current layout target. + @return current layout target + + + Sets the x-coordinate layout mode. + @param mode new x-coordinate layout mode. + + + Returns current x-coordinnate layout mode. + @return current x-coordinate layout mode. + + + Sets the y-coordinate layout mode. + @param mode new y-coordinate layout mode. + + + Returns current y-coordinate layout mode. + @return current y-coordinate layout mode. + + + Returns the x location of the chart element. + @return the x location (left) of the chart element or 0.0 if + not Set. + + + Specifies the x location (left) of the chart element as a + fraction of the width of the chart. If Left Mode is Factor, + then the position is relative to the default position for the + chart element. + + + Returns current y location of the chart element. + @return the y location (top) of the chart element or 0.0 if not + Set. + + + Specifies the y location (top) of the chart element as a + fraction of the height of the chart. If Top Mode is Factor, + then the position is relative to the default position for the + chart element. + + + Specifies how to interpret the Width element for this manual + layout. + @param mode new width layout mode of this manual layout. + + + Returns current width mode of this manual layout. + @return width mode of this manual layout. + + + Specifies how to interpret the Height element for this manual + layout. + @param mode new height mode of this manual layout. + + + Returns current height mode of this + @return height mode of this manual layout. + + + Specifies the width (if Width Mode is Factor) or right (if + Width Mode is Edge) of the chart element as a fraction of the + width of the chart. + @param ratio a fraction of the width of the chart. + + + Returns current fraction of the width of the chart. + @return fraction of the width of the chart or 0.0 if not Set. + + + Specifies the height (if Height Mode is Factor) or bottom (if + Height Mode is edge) of the chart element as a fraction of the + height of the chart. + @param ratio a fraction of the height of the chart. + + + Returns current fraction of the height of the chart. + @return fraction of the height of the chart or 0.0 if not Set. + + + Data for a Scatter Chart + + + @param xs data source to be used for X axis values + @param ys data source to be used for Y axis values + @return a new scatter charts series + + + @return list of all series + + + Represents scatter charts serie. + @author Roman Kashitsyn + + + @return data source used for X axis values + + + @return data source used for Y axis values + + + @author Roman Kashitsyn + + + @return cross between type + + + @param crossBetween cross between type + + + Move and Resize With Anchor Cells +

+ Specifies that the current drawing shall move and + resize to maintain its row and column anchors (i.e. the + object is anchored to the actual from and to row and column) +

+
+ + Move With Cells but Do Not Resize +

+ Specifies that the current drawing shall move with its + row and column (i.e. the object is anchored to the + actual from row and column), but that the size shall remain absolute. +

+

+ If Additional rows/columns are Added between the from and to locations of the drawing, + the drawing shall move its to anchors as needed to maintain this same absolute size. +

+
+ + Do Not Move or Resize With Underlying Rows/Columns +

+ Specifies that the current start and end positions shall + be maintained with respect to the distances from the + absolute start point of the worksheet. +

+

+ If Additional rows/columns are Added before the + drawing, the drawing shall move its anchors as needed + to maintain this same absolute position. +

+
+ + The conditional format operators used for "Highlight Cells That Contain..." rules. +

+ For example, "highlight cells that begin with "M2" and contain "Mountain Gear". +

+ + @author Dmitriy Kumshayev + @author Yegor Kozlov +
+ + 'Between' operator + + + 'Not between' operator + + + 'Equal to' operator + + + 'Not equal to' operator + + + 'Greater than' operator + + + 'Less than' operator + + + 'Greater than or equal to' operator + + + 'Less than or equal to' operator + + + + Allow accessing the Initial value. + + + + This conditional formatting rule Compares a cell value + to a formula calculated result, using an operator + + + This conditional formatting rule Contains a formula to Evaluate. + When the formula result is true, the cell is highlighted. + + + Error style constants for error box + + + STOP style + + + WARNING style + + + INFO style + + + ValidationType enum + + + 'Any value' type - value not restricted + + + int ('Whole number') type + + + Decimal type + + + List type ( combo box type ) + + + Date type + + + Time type + + + String length type + + + Formula ( 'Custom' ) type + + + Condition operator enum + + + default value to supply when the operator type is not used + + + Contains raw Excel error codes (as defined in OOO's excelfileformat.pdf (2.5.6) + + @author Michael Harhen + + + #NULL! - Intersection of two cell ranges is empty + + + #DIV/0! - Division by zero + + + #VALUE! - Wrong type of operand + + + #REF! - Illegal or deleted cell reference + + + #NAME? - Wrong function or range name + + + #NUM! - Value range overflow + + + #N/A - Argument or function not available + + + @return Standard Excel error literal for the specified error code. + @throws ArgumentException if the specified error code is not one of the 7 + standard error codes + + + @return true if the specified error code is a standard Excel error code. + + + A wrapper around a {@link SimpleDateFormat} instance, + which handles a few Excel-style extensions that + are not supported by {@link SimpleDateFormat}. + Currently, the extensions are around the handling + of elapsed time, eg rendering 1 day 2 hours + as 26 hours. + + + Takes a format String, and Replaces Excel specific bits + with our detection sequences + + + Used to let us know what the date being + formatted is, in Excel terms, which we + may wish to use when handling elapsed + times. + + + not underlined + + + single (normal) underline + + + double underlined + + + accounting style single underline + + + accounting style double underline + + + no type Offsetting (not super or subscript) + + + superscript + + + subscript + + + + Allow accessing the Initial value. + + + + normal type of black color. + + + Dark Red color + + + + Allow accessing the Initial value. + + + + Normal boldness (not bold) + + + Bold boldness (bold) + + + Charset represents the basic set of characters associated with a font (that it can display), and + corresponds to the ANSI codepage (8-bit or DBCS) of that character set used by a given language. + + @author Gisella Bronzetti + + + Returns value of this charset + + @return value of this charset + + + The font family this font belongs to. A font family is a set of fonts having common stroke width and serif + characteristics. The font name overrides when there are conflicting values. + + @author Gisella Bronzetti + + + Returns index of this font family + + @return index of this font family + + + Defines the font scheme to which this font belongs. + When a font defInition is part of a theme defInition, then the font is categorized as either a major or minor font scheme component. + When a new theme is chosen, every font that is part of a theme defInition is updated to use the new major or minor font defInition for that + theme. + Usually major fonts are used for styles like headings, and minor fonts are used for body and paragraph text. + + @author Gisella Bronzetti + + + Enumerates error values in SpreadsheetML formula calculations. + + See also OOO's excelfileformat.pdf (2.5.6) + + + Intended to indicate when two areas are required to intersect, but do not. +

Example: + In the case of SUM(B1 C1), the space between B1 and C1 is treated as the binary + intersection operator, when a comma was intended. end example] +

+
+ + Intended to indicate when any number, including zero, is divided by zero. + Note: However, any error code divided by zero results in that error code. + + + Intended to indicate when an incompatible type argument is passed to a function, or + an incompatible type operand is used with an operator. +

Example: + In the case of a function argument, text was expected, but a number was provided +

+
+ + Intended to indicate when a cell reference is invalid. +

Example: + If a formula Contains a reference to a cell, and then the row or column Containing that cell is deleted, + a #REF! error results. If a worksheet does not support 20,001 columns, + OFFSET(A1,0,20000) will result in a #REF! error. +

+
+ + Intended to indicate when an argument to a function has a compatible type, but has a + value that is outside the domain over which that function is defined. (This is known as + a domain error.) +

Example: + Certain calls to ASIN, ATANH, FACT, and SQRT might result in domain errors. +

+ Intended to indicate that the result of a function cannot be represented in a value of + the specified type, typically due to extreme magnitude. (This is known as a range + error.) +

Example: FACT(1000) might result in a range error.

+
+ + Intended to indicate when a designated value is not available. +

Example: + Some functions, such as SUMX2MY2, perform a series of operations on corresponding + elements in two arrays. If those arrays do not have the same number of elements, then + for some elements in the longer array, there are no corresponding elements in the + shorter one; that is, one or more values in the shorter array are not available. +

+ This error value can be produced by calling the function NA +
+ + POI specific code to indicate that there is a circular reference + in the formula + + + POI specific code to indicate that the funcition required is + not implemented in POI + + + @return numeric code of the error + + + @return long (internal) numeric code of the error + + + @return string representation of the error + + + The enumeration value indicating horizontal alignment of a cell, + i.e., whether it is aligned general, left, right, horizontally centered, Filled (replicated), + justified, centered across multiple cells, or distributed. + + + The horizontal alignment is general-aligned. Text data is left-aligned. + Numbers, dates, and times are rightaligned. Boolean types are centered. + Changing the alignment does not change the type of data. + + + The horizontal alignment is left-aligned, even in Rightto-Left mode. + Aligns contents at the left edge of the cell. If an indent amount is specified, the contents of + the cell is indented from the left by the specified number of character spaces. The character spaces are + based on the default font and font size for the workbook. + + + The horizontal alignment is centered, meaning the text is centered across the cell. + + + The horizontal alignment is right-aligned, meaning that cell contents are aligned at the right edge of the cell, + even in Right-to-Left mode. + + + The horizontal alignment is justified (flush left and right). + For each line of text, aligns each line of the wrapped text in a cell to the right and left + (except the last line). If no single line of text wraps in the cell, then the text is not justified. + + + Indicates that the value of the cell should be Filled + across the entire width of the cell. If blank cells to the right also have the fill alignment, + they are also Filled with the value, using a convention similar to centerContinuous. +

+ Additional rules: +

    +
  1. Only whole values can be Appended, not partial values.
  2. +
  3. The column will not be widened to 'best fit' the Filled value
  4. +
  5. If Appending an Additional occurrence of the value exceeds the boundary of the cell + left/right edge, don't append the Additional occurrence of the value.
  6. +
  7. The display value of the cell is Filled, not the underlying raw number.
  8. +
+

+
+ + The horizontal alignment is centered across multiple cells. + The information about how many cells to span is expressed in the Sheet Part, + in the row of the cell in question. For each cell that is spanned in the alignment, + a cell element needs to be written out, with the same style Id which references the centerContinuous alignment. + + + Indicates that each 'word' in each line of text inside the cell is evenly distributed + across the width of the cell, with flush right and left margins. +

+ When there is also an indent value to apply, both the left and right side of the cell + are pAdded by the indent value. +

+

A 'word' is a set of characters with no space character in them.

+

Two lines inside a cell are Separated by a carriage return.

+
+ + + Link to an existing file or web page + + + + + Link to a place in this document + + + + + Link to an E-mail Address + + + + + Link to a file + + + + Specifies printed page order. + + @author Gisella Bronzetti + + + Order pages vertically first, then move horizontally. + + + Order pages horizontally first, then move vertically + + + The enumeration value indicating the possible paper size for a sheet + + @author Daniele Montagni + + + + Allow accessing the Initial value. + + + + + A4 Transverse - 210x297 mm + + + + + A4 Plus - 210x330 mm + + + + + US Letter Rotated 11 x 8 1/2 in + + + + + A4 Rotated - 297x210 mm */ + + + + + Allow accessing the Initial value. + + + + + Extended windows meta file + + + Windows Meta File + + + Mac PICT format + + + JPEG format + + + PNG format + + + Device independent bitmap + + + GIF image format + + + Tag Image File (.tiff) + + + Encapsulated Postscript (.eps) + + + Windows Bitmap (.bmp) + + + WordPerfect graphics (.wpg) + + + These enumerations specify how cell comments shall be displayed for paper printing purposes. + + @author Gisella Bronzetti + + + Do not print cell comments. + + + Print cell comments as displayed. + + + Print cell comments at end of document. + + + The enumeration value indicating the print orientation for a sheet. + + @author Gisella Bronzetti + + + orientation not specified + + + portrait orientation + + + landscape orientations + + + + Used by HSSFPrintSetup.CellError property + + + + + Used to specify the different possible policies + if for the case of null and blank cells + + + + Missing cells are returned as null, Blank cells are returned as normal + + + Missing cells are returned as null, as are blank cells + + + A new, blank cell is Created for missing cells. Blank cells are returned as normal + + + All known types of automatic shapes in DrawingML + + @author Yegor Kozlov + + + + Allow accessing the Initial value. + + + + + Indicate the position of the margin. One of left, right, top and bottom. + + + + + referes to the left margin + + + + + referes to the right margin + + + + + referes to the top margin + + + + + referes to the bottom margin + + + + + Define the position of the pane. One of lower/right, upper/right, lower/left and upper/left. + + + + + referes to the lower/right corner + + + + + referes to the upper/right corner + + + + + referes to the lower/left corner + + + + + referes to the upper/left corner + + + + @return the rich text string for this textbox. + + + @return Returns the left margin within the textbox. + + + @return returns the right margin within the textbox. + + + @return returns the top margin within the textbox. + + + s the bottom margin within the textbox. + + + This enumeration value indicates the type of vertical alignment for a cell, i.e., + whether it is aligned top, bottom, vertically centered, justified or distributed. + + + The vertical alignment is aligned-to-top. + + + The vertical alignment is centered across the height of the cell. + + + The vertical alignment is aligned-to-bottom. + + +

+ When text direction is horizontal: the vertical alignment of lines of text is distributed vertically, + where each line of text inside the cell is evenly distributed across the height of the cell, + with flush top and bottom margins. +

+

+ When text direction is vertical: similar behavior as horizontal justification. + The alignment is justified (flush top and bottom in this case). For each line of text, each + line of the wrapped text in a cell is aligned to the top and bottom (except the last line). + If no single line of text wraps in the cell, then the text is not justified. +

+
+ +

+ When text direction is horizontal: the vertical alignment of lines of text is distributed vertically, + where each line of text inside the cell is evenly distributed across the height of the cell, + with flush top +

+

+ When text direction is vertical: behaves exactly as distributed horizontal alignment. + The first words in a line of text (appearing at the top of the cell) are flush + with the top edge of the cell, and the last words of a line of text are flush with the bottom edge of the cell, + and the line of text is distributed evenly from top to bottom. +

+
+ + + Indicates the sheet is visible. + + + + + Indicates the book window is hidden, but can be shown by the user via the user interface. + + + + + Indicates the sheet is hidden and cannot be shown in the user interface (UI). + + + In Excel this state is only available programmatically in VBA: + ThisWorkbook.Sheets("MySheetName").Visible = xlSheetVeryHidden + + + + + The Char (!) that Separates sheet names from cell references + + + The Char (:) that Separates the two cell references in a multi-cell area reference + + + The Char (') used to quote sheet names when they contain special Chars + + + Create an area ref from a string representation. Sheet names containing special Chars should be + delimited and escaped as per normal syntax rules for formulas.
+ The area reference must be contiguous (i.e. represent a single rectangle, not a Union of rectangles) +
+ + Creates an area ref from a pair of Cell References. + + + is the reference for a contiguous (i.e. + Unbroken) area, or is it made up of + several different parts? + (If it Is, you will need to call + .... + + + is the reference for a whole-column reference, + such as C:C or D:G ? + + + Takes a non-contiguous area reference, and + returns an array of contiguous area references. + + + Returns a reference to every cell covered by this area + + + Example return values: + + + + + + +
ResultComment
A1:A1Single cell area reference without sheet
A1:$C$1Multi-cell area reference without sheet
Sheet1!A$1:B4Standard sheet name
'O''Brien''s Sales'!B5:C6' Sheet name with special Chars
+ @return the text representation of this area reference as it would appear in a formula. +
+ + Separates Area refs in two parts and returns them as Separate elements in a String array, + each qualified with the sheet name (if present) + + @return array with one or two elements. never null + + + @return false if this area reference involves more than one cell + + + @return the first cell reference which defines this area. Usually this cell is in the upper + left corner of the area (but this is not a requirement). + + + Note - if this area reference refers to a single cell, the return value of this method will + be identical to that of GetFirstCell() + @return the second cell reference which defines this area. For multi-cell areas, this is + cell diagonally opposite the 'first cell'. Usually this cell is in the lower right corner + of the area (but this is not a requirement). + + + See OOO documentation: excelfileformat.pdf sec 2.5.14 - 'Cell Range Address'

+ + Common subclass of 8-bit and 16-bit versions + + @author Josh Micich + + + Validate the range limits against the supplied version of Excel + + @param ssVersion the version of Excel to validate against + @throws IllegalArgumentException if the range limits are outside of the allowed range + + + Runs a bounds check for row numbers + @param row + + + Runs a bounds check for column numbers + @param column + + + @return column number for the upper left hand corner + + + @return row number for the upper left hand corner + + + @return column number for the lower right hand corner + + + @return row number for the lower right hand corner + + + @return the size of the range (number of cells in the area). + + + Creates new cell range. Indexes are zero-based. + + @param firstRow Index of first row + @param lastRow Index of last row (inclusive), must be equal to or larger than {@code firstRow} + @param firstCol Index of first column + @param lastCol Index of last column (inclusive), must be equal to or larger than {@code firstCol} + + + @return the text format of this range using specified sheet name. + + +

+ Creates a CellRangeAddress from a cell range reference string. + + + usually a standard area ref (e.g. "B1:D8"). May be a single + cell ref (e.g. "B5") in which case the result is a 1 x 1 cell + range. May also be a whole row range (e.g. "3:5"), or a whole + column range (e.g. "C:F") + + a CellRangeAddress object +
+ + List of CellRangeAddresses. Each structure represents a cell range + + + Convenience constructor for creating a CellRangeAddressList with a single + CellRangeAddress. Other CellRangeAddresses may be Added later. + + + @param in the RecordInputstream to read the record from + + + Get the number of following ADDR structures. The number of this + structures is automatically set when reading an Excel file and/or + increased when you manually Add a new ADDR structure . This is the reason + there isn't a set method for this field . + + @return number of ADDR structures + + + Add a cell range structure. + + @param firstRow - the upper left hand corner's row + @param firstCol - the upper left hand corner's col + @param lastRow - the lower right hand corner's row + @param lastCol - the lower right hand corner's col + @return the index of this ADDR structure + + + @return CellRangeAddress at the given index + + + @return the total size of for the specified number of ranges, + including the initial 2 byte range count + + + + Allow accessing the Initial value. + + + + + @author Avik Sengupta + @author Dennis doubleday (patch to seperateRowColumns()) + + + The character ($) that signifies a row or column value is absolute instead of relative + + + The character (!) that Separates sheet names from cell references + + + The character (') used to quote sheet names when they contain special characters + + + Matches a run of one or more letters followed by a run of one or more digits. + The run of letters is group 1 and the run of digits is group 2. + Each group may optionally be prefixed with a single '$'. + + + Matches a run of one or more letters. The run of letters is group 1. + The text may optionally be prefixed with a single '$'. + + + Matches a run of one or more digits. The run of digits is group 1. + The text may optionally be prefixed with a single '$'. + + + Named range names must start with a letter or underscore. Subsequent characters may include + digits or dot. (They can even end in dot). + + + Create an cell ref from a string representation. Sheet names containing special characters should be + delimited and escaped as per normal syntax rules for formulas. + + + takes in a column reference portion of a CellRef and converts it from + ALPHA-26 number format to 0-based base 10. + 'A' -> 0 + 'Z' -> 25 + 'AA' -> 26 + 'IV' -> 255 + @return zero based column index + + + Takes in a 0-based base-10 column and returns a ALPHA-26 + representation. + eg column #3 -> D + + + Separates the row from the columns and returns an array of three Strings. The first element + is the sheet name. Only the first element may be null. The second element in is the column + name still in ALPHA-26 number format. The third element is the row. + + + Example return values: + + + + + +
ResultComment
A1Cell reference without sheet
Sheet1!A1Standard sheet name
'O''Brien''s Sales'!A1'Sheet name with special characters
+ @return the text representation of this cell reference as it would appear in a formula. +
+ + Appends cell reference with '$' markers for absolute values as required. + Sheet name is not included. + + + Used to decide whether a name of the form "[A-Z]*[0-9]*" that appears in a formula can be + interpreted as a cell reference. Names of that form can be also used for sheets and/or + named ranges, and in those circumstances, the question of whether the potential cell + reference is valid (in range) becomes important. +

+ Note - that the maximum sheet size varies across Excel versions: +

+

+ + + + +
Version File Format Last Column Last Row
97-2003BIFF8"IV" (2^8)65536 (2^14)
2007BIFF12"XFD" (2^14)1048576 (2^20)
+ POI currently targets BIFF8 (Excel 97-2003), so the following behaviour can be observed for + this method: +
+ + + + + + + + + + + +
Input Result
"A", "1"true
"a", "111"true
"A", "65536"true
"A", "65537"false
"iv", "1"true
"IW", "1"false
"AAA", "1"false
"a", "111"true
"Sheet", "1"false
+ + @param colStr a string of only letter characters + @param rowStr a string of only digit characters + @return true if the row and col parameters are within range of a BIFF8 spreadsheet. +
+ + @return possibly null if this is a 2D reference. Special characters are not + escaped or delimited + + + Returns the three parts of the cell reference, the + Sheet name (or null if none supplied), the 1 based + row number, and the A based column letter. + This will not include any markers for absolute + references, so use {@link #formatAsString()} + to properly turn references into strings. + + + Various utility functions that make working with a cells and rows easier. The various methods + that deal with style's allow you to create your CellStyles as you need them. When you apply a + style change to a cell, the code will attempt to see if a style already exists that meets your + needs. If not, then it will create a new style. This is to prevent creating too many styles. + there is an upper limit in Excel on the number of styles that can be supported. + + @author Eric Pugh epugh@upstate.com + @author (secondary) Avinash Kewalramani akewalramani@accelrys.com + + + Get a row from the spreadsheet, and create it if it doesn't exist. + + @param rowIndex The 0 based row number + @param sheet The sheet that the row is part of. + @return The row indicated by the rowCounter + + + Get a specific cell from a row. If the cell doesn't exist, then create it. + + @param row The row that the cell is part of + @param columnIndex The column index that the cell is in. + @return The cell indicated by the column. + + + Creates a cell, gives it a value, and applies a style if provided + + @param row the row to create the cell in + @param column the column index to create the cell in + @param value The value of the cell + @param style If the style is not null, then set + @return A new Cell + + + Create a cell, and give it a value. + + @param row the row to create the cell in + @param column the column index to create the cell in + @param value The value of the cell + @return A new Cell. + + + Take a cell, and align it. + + @param cell the cell to set the alignment for + @param workbook The workbook that is being worked with. + @param align the column alignment to use. + + @see CellStyle for alignment options + + + Take a cell, and apply a font to it + + @param cell the cell to set the alignment for + @param workbook The workbook that is being worked with. + @param font The Font that you want to set... + + + This method attempt to find an already existing CellStyle that matches what you want the + style to be. If it does not find the style, then it creates a new one. If it does create a + new one, then it applies the propertyName and propertyValue to the style. This is necessary + because Excel has an upper limit on the number of Styles that it supports. + + @param workbook The workbook that is being worked with. + @param propertyName The name of the property that is to be changed. + @param propertyValue The value of the property that is to be changed. + @param cell The cell that needs it's style changes + + + Returns a map containing the format properties of the given cell style. + + @param style cell style + @return map of format properties (String -> Object) + @see #setFormatProperties(org.apache.poi.ss.usermodel.CellStyle, org.apache.poi.ss.usermodel.Workbook, java.util.Map) + + + Sets the format properties of the given style based on the given map. + + @param style cell style + @param workbook parent workbook + @param properties map of format properties (String -> Object) + @see #getFormatProperties(CellStyle) + + + Utility method that returns the named short value form the given map. + @return zero if the property does not exist, or is not a {@link Short}. + + @param properties map of named properties (String -> Object) + @param name property name + @return property value, or zero + + + Utility method that returns the named boolean value form the given map. + @return false if the property does not exist, or is not a {@link Boolean}. + + @param properties map of properties (String -> Object) + @param name property name + @return property value, or false + + + Utility method that puts the named short value to the given map. + + @param properties map of properties (String -> Object) + @param name property name + @param value property value + + + Utility method that puts the named boolean value to the given map. + + @param properties map of properties (String -> Object) + @param name property name + @param value property value + + + Looks for text in the cell that should be unicode, like an alpha and provides the + unicode version of it. + + @param cell The cell to check for unicode values + @return translated to unicode + + + Represents callback for CellWalk traverse method. + @author Roman Kashitsyn + + + @param cell current cell + @param ctx information about invokation context + + + Traverse cell range. + + @author Roman Kashitsyn + + + Should we call handler on empty (blank) cells. Default is + false. + @return true if handler should be called on empty (blank) + cells, false otherwise. + + + Sets the traverseEmptyCells property. + @param traverseEmptyCells new property value + + + Traverse cell range from top left to bottom right cell. + @param handler handler to call on each appropriate cell + + + Inner class to hold walk context. + @author Roman Kashitsyn + + + @author Roman Kashitsyn + + + Returns ordinal number of cell in range. Numeration starts + from top left cell and ends at bottom right cell. Here is a + brief example (number in cell is it's ordinal number): + + + + + + +
12
34
+ + @return ordinal number of current cell +
+ + Returns number of current row. + @return number of current row + + + Returns number of current column. + @return number of current column + + + Always 64 bits long (MSB, bit-63 is '1') + + + Convert to an equivalent {@link NormalisedDecimal} representation having 15 decimal digits of precision in the + non-fractional bits of the significand. + + + @return the number of non-fractional bits after the MSB of the significand + + + Format class for Excel's SSN Format. This class mimics Excel's built-in + SSN Formatting. + + @author James May + + + Format a number as an SSN + + + Format class for Excel Zip + 4 Format. This class mimics Excel's + built-in Formatting for Zip + 4. + @author James May + + + Format a number as Zip + 4 + + + Format class for Excel phone number Format. This class mimics Excel's + built-in phone number Formatting. + @author James May + + + Format a number as a phone number + + + Format class that does nothing and always returns a constant string. + + This format is used to simulate Excel's handling of a format string + of all # when the value is 0. Excel will output "", Java will output "0". + + @see DataFormatter#createFormat(double, int, String) + + + The value the exponent field Gets for all NaN and InfInity values + + + @param rawBits the 64 bit binary representation of the double value + @return the top 12 bits (sign and biased exponent value) + + + Width of a long + + + Minimum precision after discarding whole 32-bit words from the significand + + + The minimum value in 'Base-10 normalised form'.
+ When {@link #_binaryExponent} == 46 this is the the minimum {@link #_frac} value + (1014-0.05) * 2^17 +
+ Values between (1014-0.05) and 1014 will be represented as '1' + followed by 14 zeros. + Values less than (1014-0.05) will get Shifted by one more power of 10 + + This frac value rounds to '1' followed by fourteen zeros with an incremented decimal exponent +
+ + For 'Base-10 normalised form'
+ The maximum {@link #_frac} value when {@link #_binaryExponent} == 49 + (10^15-0.5) * 2^14 +
+ + @param nBits number of bits to shift right + + + Holds values for quick multiplication and division by 10 + + + Number of powers of ten Contained in the significand + + + 219 + + + the value of {@link #_fractionalPart} that represents 0.5 + + + 1015 + + + Rounds at the digit with value 10decimalExponent + + + The decimal exponent increased by one less than the digit count of {@link #_wholePart} + + + The whole part of the significand (typically 15 digits). + + 47-50 bits long (MSB may be anywhere from bit 46 to 49) + LSB is units bit. + + + The fractional part of the significand. + 24 bits (only top 14-17 bits significant): a value between 0x000000 and 0xFFFF80 + + + Convert to an equivalent {@link ExpandedDouble} representation (binary frac and exponent). + The resulting transformed object is easily Converted to a 64 bit IEEE double: +
    +
  • bits 2-53 of the {@link #GetSignificand()} become the 52 bit 'fraction'.
  • +
  • {@link #GetBinaryExponent()} is biased by 1023 to give the 'exponent'.
  • +
+ The sign bit must be obtained from somewhere else. + @return a new {@link NormalisedDecimal} normalised to base 2 representation. +
+ + @return the significand as a fixed point number (with 24 fraction bits and 47-50 whole bits) + + + Rounds the first whole digit position (considers only units digit, not frational part). + Caller should check total digit count of result to see whether the rounding operation caused + a carry out of the most significant digit + + + @return the number of powers of 10 which have been extracted from the significand and binary exponent. + + + assumes both this and other are normalised + + + This class attempts to reproduce Excel's behaviour for comparing numbers. Results are + mostly the same as those from {@link Double#compare(double, double)} but with some + rounding. For numbers that are very close, this code converts to a format having 15 + decimal digits of precision and a decimal exponent, before completing the comparison. +

+ In Excel formula evaluation, expressions like "(0.06-0.01)=0.05" evaluate to "TRUE" even + though the equivalent java expression is false. In examples like this, + Excel achieves the effect by having additional logic for comparison operations. +

+

+ Note - Excel also gives special treatment to expressions like "0.06-0.01-0.05" which + evaluates to "0" (in java, rounding anomalies give a result of 6.9E-18). The special + behaviour here is for different reasons to the example above: If the last operator in a + cell formula is '+' or '-' and the result is less than 250 times smaller than + first operand, the result is rounded to zero. + Needless to say, the two rules are not consistent and it is relatively easy to find + examples that satisfy
+ "A=B" is "TRUE" but "A-B" is not "0"
+ and
+ "A=B" is "FALSE" but "A-B" is "0"
+
+ This rule (for rounding the result of a final addition or subtraction), has not been + implemented in POI (as of Jul-2009). + + @return negative, 0, or positive according to the standard Excel comparison + of values a and b. + + + If both numbers are subnormal, Excel seems to use standard comparison rules + + + Usually any normal number is greater (in magnitude) than any subnormal number. + However there are some anomalous cases around the threshold where Excel produces screwy results + @param isNegative both values are either negative or positive. This parameter affects the sign of the comparison result + @return usually isNegative ? -1 : +1 + + + for formatting double values in error messages + + + Converts the supplied value to the text representation that Excel would give if + the value were to appear in an unformatted cell, or as a literal number in a formula.
+ Note - the results from this method differ slightly from those of Double.ToString() + In some special cases Excel behaves quite differently. This function attempts to reproduce + those results. +
+ + Holds information regarding a split plane or freeze plane for a sheet. + + + + Constant for active pane being the lower right + + + Constant for active pane being the upper right + + + Constant for active pane being the lower left + + + Constant for active pane being the upper left + + + Returns true if this is a Freeze pane, false if it is a split pane. + + + Returns the vertical position of the split. + @return 0 if there is no vertical spilt, + or for a freeze pane the number of columns in the TOP pane, + or for a split plane the position of the split in 1/20th of a point. + + + Returns the horizontal position of the split. + @return 0 if there is no horizontal spilt, + or for a freeze pane the number of rows in the LEFT pane, + or for a split plane the position of the split in 1/20th of a point. + + + For a horizontal split returns the top row in the BOTTOM pane. + @return 0 if there is no horizontal split, or the top row of the bottom pane. + + + For a vertical split returns the left column in the RIGHT pane. + @return 0 if there is no vertical split, or the left column in the RIGHT pane. + + + Returns the active pane + @see #PANE_LOWER_RIGHT + @see #PANE_UPPER_RIGHT + @see #PANE_LOWER_LEFT + @see #PANE_UPPER_LEFT + @return the active pane. + + + Represents a from/to row/col square. This is a object primitive + that can be used to represent row,col - row,col just as one would use String + to represent a string of characters. Its really only useful for HSSF though. + + @author Andrew C. Oliver acoliver at apache dot org + + + Creates a new instance of Region (0,0 - 0,0) + + + Convert a List of CellRange objects to an array of regions + + @param List of CellRange objects + @return regions + + + Get the upper left hand corner column number + + @return column number for the upper left hand corner + + + Get the upper left hand corner row number + + @return row number for the upper left hand corner + + + Get the lower right hand corner column number + + @return column number for the lower right hand corner + + + Get the lower right hand corner row number + + @return row number for the lower right hand corner + + + Various utility functions that make working with a region of cells easier. + + @author Eric Pugh epugh@upstate.com + @author (secondary) Avinash Kewalramani akewalramani@accelrys.com + + + Sets the left border for a region of cells by manipulating the cell style of the individual + cells on the left + + @param border The new border + @param region The region that should have the border + @param workbook The workbook that the region is on. + @param sheet The sheet that the region is on. + + + Sets the leftBorderColor attribute of the RegionUtil object + + @param color The color of the border + @param region The region that should have the border + @param workbook The workbook that the region is on. + @param sheet The sheet that the region is on. + + + Sets the borderRight attribute of the RegionUtil object + + @param border The new border + @param region The region that should have the border + @param workbook The workbook that the region is on. + @param sheet The sheet that the region is on. + + + Sets the rightBorderColor attribute of the RegionUtil object + + @param color The color of the border + @param region The region that should have the border + @param workbook The workbook that the region is on. + @param sheet The sheet that the region is on. + + + Sets the borderBottom attribute of the RegionUtil object + + @param border The new border + @param region The region that should have the border + @param workbook The workbook that the region is on. + @param sheet The sheet that the region is on. + + + Sets the bottomBorderColor attribute of the RegionUtil object + + @param color The color of the border + @param region The region that should have the border + @param workbook The workbook that the region is on. + @param sheet The sheet that the region is on. + + + Sets the borderBottom attribute of the RegionUtil object + + @param border The new border + @param region The region that should have the border + @param workbook The workbook that the region is on. + @param sheet The sheet that the region is on. + + + Sets the topBorderColor attribute of the RegionUtil object + + @param color The color of the border + @param region The region that should have the border + @param workbook The workbook that the region is on. + @param sheet The sheet that the region is on. + + + For setting the same property on many cells to the same value + + + Class {@code SheetBuilder} provides an easy way of building workbook sheets + from 2D array of Objects. It can be used in test cases to improve code + readability or in Swing applications with tables. + + @author Roman Kashitsyn + + + Returns {@code true} if null array elements should be treated as empty + cells. + + @return {@code true} if null objects should be treated as empty cells + and {@code false} otherwise + + + Specifies if null array elements should be treated as empty cells. + + @param shouldCreateEmptyCells {@code true} if null array elements should be + treated as empty cells + @return {@code this} + + + Specifies name of the sheet to build. If not specified, default name (provided by + workbook) will be used instead. + @param sheetName sheet name to use + @return {@code this} + + + Builds sheet from parent workbook and 2D array with cell + values. Creates rows anyway (even if row contains only null + cells), creates cells if either corresponding array value is not + null or createEmptyCells property is true. + The conversion is performed in the following way: +

+

    +
  • Numbers become numeric cells.
  • +
  • java.util.Date or java.util.Calendar + instances become date cells.
  • +
  • String with leading '=' char become formulas (leading '=' + will be truncated).
  • +
  • Other objects become strings via Object.toString() + method call.
  • +
+ + @return newly created sheet +
+ + Sets the cell value using object type information. + @param cell cell to change + @param value value to set + + + Holds a collection of Sheet names and their associated + reference numbers. + + @author Andrew C. Oliver (acoliver at apache dot org) + + + + Helper methods for when working with Usermodel sheets + + @author Yegor Kozlov + + + Dummy formula Evaluator that does nothing. + YK: The only reason of having this class is that + {@link NPOI.SS.UserModel.DataFormatter#formatCellValue(NPOI.SS.UserModel.Cell)} + returns formula string for formula cells. Dummy Evaluator Makes it to format the cached formula result. + + See Bugzilla #50021 + + + Compute width of a single cell + + @param cell the cell whose width is to be calculated + @param defaultCharWidth the width of a single character + @param formatter formatter used to prepare the text to be measured + @param useMergedCells whether to use merged cells + @return the width in pixels + + + Compute width of a column and return the result + + @param sheet the sheet to calculate + @param column 0-based index of the column + @param useMergedCells whether to use merged cells + @return the width in pixels + + + Compute width of a column based on a subset of the rows and return the result + + @param sheet the sheet to calculate + @param column 0-based index of the column + @param useMergedCells whether to use merged cells + @param firstRow 0-based index of the first row to consider (inclusive) + @param lastRow 0-based index of the last row to consider (inclusive) + @return the width in pixels + + + + Convert HSSFFont to Font. + + The font. + + + + Generate a valid sheet name based on the existing one. Used when cloning sheets. + + @param srcName the original sheet name to + @return clone sheet name + + + Return the cell, taking account of merged regions. Allows you to find the + cell who's contents are Shown in a given position in the sheet. + +

If the cell at the given co-ordinates is a merged cell, this will + return the primary (top-left) most cell of the merged region.

+

If the cell at the given co-ordinates is not in a merged region, + then will return the cell itself.

+

If there is no cell defined at the given co-ordinates, will return + null.

+
+ + For POI internal use only + + @author Josh Micich + + + Helper methods for when working with Usermodel Workbooks + + + Creates a valid sheet name, which is conform to the rules. + In any case, the result safely can be used for + {@link org.apache.poi.ss.usermodel.Workbook#setSheetName(int, String)}. +
+ Rules: +
    +
  • never null
  • +
  • minimum length is 1
  • +
  • maximum length is 31
  • +
  • doesn't contain special chars: 0x0000, 0x0003, / \ ? * ] [
  • +
  • Sheet names must not begin or end with ' (apostrophe)
  • +
+ Invalid characters are replaced by one space character ' '. + + @param nameProposal can be any string, will be truncated if necessary, + allowed to be null + @return a valid string, "empty" if to short, "null" if null +
+ + Creates a valid sheet name, which is conform to the rules. + In any case, the result safely can be used for + {@link org.apache.poi.ss.usermodel.Workbook#setSheetName(int, String)}. +
+ Rules: +
    +
  • never null
  • +
  • minimum length is 1
  • +
  • maximum length is 31
  • +
  • doesn't contain special chars: : 0x0000, 0x0003, / \ ? * ] [
  • +
  • Sheet names must not begin or end with ' (apostrophe)
  • +
+ + @param nameProposal can be any string, will be truncated if necessary, + allowed to be null + @param replaceChar the char to replace invalid characters. + @return a valid string, "empty" if to short, "null" if null +
+ + Validates sheet name. + +

+ The character count MUST be greater than or equal to 1 and less than or equal to 31. + The string MUST NOT contain the any of the following characters: +

    +
  • 0x0000
  • +
  • 0x0003
  • +
  • colon (:)
  • +
  • backslash (\)
  • +
  • asterisk (*)
  • +
  • question mark (?)
  • +
  • forward slash (/)
  • +
  • opening square bracket ([)
  • +
  • closing square bracket (])
  • +
+ The string MUST NOT begin or end with the single quote (') character. +

+ + @param sheetName the name to validate +
+ + + Fills the specified array. + + The array. + The default value. + + + + Assigns the specified byte value to each element of the specified + range of the specified array of bytes. The range to be filled + extends from index fromIndex, inclusive, to index + toIndex, exclusive. (If fromIndex==toIndex, the + range to be filled is empty.) + + the array to be filled + the index of the first element (inclusive) to be filled with the specified value + the index of the last element (exclusive) to be filled with the specified value + the value to be stored in all elements of the array + if fromIndex > toIndex + if fromIndex < 0 or toIndex > a.length + + + + Checks that {@code fromIndex} and {@code toIndex} are in + the range and throws an appropriate exception, if they aren't. + + + + + + + + Convert Array to ArrayList + + source array + + + + + Fills the specified array. + + The array. + The default value. + + + + Equals the specified a1. + + The a1. + The b1. + + + + Returns true if the two specified arrays of Objects are + equal to one another. The two arrays are considered equal if + both arrays contain the same number of elements, and all corresponding + pairs of elements in the two arrays are equal. Two objects e1 + and e2 are considered equal if (e1==null ? e2==null + : e1.equals(e2)). In other words, the two arrays are equal if + they contain the same elements in the same order. Also, two array + references are considered equal if both are null. + + @param a one array to be tested for equality + @param a2 the other array to be tested for equality + @return true if the two arrays are equal + + + + Moves a number of entries in an array to another point in the array, shifting those inbetween as required. + + The array to alter + The (0 based) index of the first entry to move + The (0 based) index of the positition to move to + The number of entries to move + + + + Copies the specified array, truncating or padding with zeros (if + necessary) so the copy has the specified length. This method is temporary + replace for Arrays.copyOf() until we start to require JDK 1.6. + + the array to be copied + the length of the copy to be returned + a copy of the original array, truncated or padded with zeros to obtain the specified length + + + Returns a hash code based on the contents of the specified array. + For any two long arrays a and b + such that Arrays.Equals(a, b), it is also the case that + Arrays.HashCode(a) == Arrays.HashCode(b). + + The value returned by this method is the same value that would be + obtained by invoking the {@link List#hashCode() hashCode} + method on a {@link List} Containing a sequence of {@link Long} + instances representing the elements of a in the same order. + If a is null, this method returns 0. + + @param a the array whose hash value to compute + @return a content-based hash code for a + @since 1.5 + + + Returns a hash code based on the contents of the specified array. + For any two non-null int arrays a and b + such that Arrays.Equals(a, b), it is also the case that + Arrays.HashCode(a) == Arrays.HashCode(b). + + The value returned by this method is the same value that would be + obtained by invoking the {@link List#hashCode() hashCode} + method on a {@link List} Containing a sequence of {@link int} + instances representing the elements of a in the same order. + If a is null, this method returns 0. + + @param a the array whose hash value to compute + @return a content-based hash code for a + @since 1.5 + + + Returns a hash code based on the contents of the specified array. + For any two short arrays a and b + such that Arrays.Equals(a, b), it is also the case that + Arrays.HashCode(a) == Arrays.HashCode(b). + + The value returned by this method is the same value that would be + obtained by invoking the {@link List#hashCode() hashCode} + method on a {@link List} Containing a sequence of {@link short} + instances representing the elements of a in the same order. + If a is null, this method returns 0. + + @param a the array whose hash value to compute + @return a content-based hash code for a + @since 1.5 + + + Returns a hash code based on the contents of the specified array. + For any two char arrays a and b + such that Arrays.Equals(a, b), it is also the case that + Arrays.HashCode(a) == Arrays.HashCode(b). + + The value returned by this method is the same value that would be + obtained by invoking the {@link List#hashCode() hashCode} + method on a {@link List} Containing a sequence of {@link Character} + instances representing the elements of a in the same order. + If a is null, this method returns 0. + + @param a the array whose hash value to compute + @return a content-based hash code for a + @since 1.5 + + + Returns a hash code based on the contents of the specified array. + For any two byte arrays a and b + such that Arrays.Equals(a, b), it is also the case that + Arrays.HashCode(a) == Arrays.HashCode(b). + + The value returned by this method is the same value that would be + obtained by invoking the {@link List#hashCode() hashCode} + method on a {@link List} Containing a sequence of {@link Byte} + instances representing the elements of a in the same order. + If a is null, this method returns 0. + + @param a the array whose hash value to compute + @return a content-based hash code for a + @since 1.5 + + + Returns a hash code based on the contents of the specified array. + For any two bool arrays a and b + such that Arrays.Equals(a, b), it is also the case that + Arrays.HashCode(a) == Arrays.HashCode(b). + + The value returned by this method is the same value that would be + obtained by invoking the {@link List#hashCode() hashCode} + method on a {@link List} Containing a sequence of {@link Boolean} + instances representing the elements of a in the same order. + If a is null, this method returns 0. + + @param a the array whose hash value to compute + @return a content-based hash code for a + @since 1.5 + + + Returns a hash code based on the contents of the specified array. + For any two float arrays a and b + such that Arrays.Equals(a, b), it is also the case that + Arrays.HashCode(a) == Arrays.HashCode(b). + + The value returned by this method is the same value that would be + obtained by invoking the {@link List#hashCode() hashCode} + method on a {@link List} Containing a sequence of {@link Float} + instances representing the elements of a in the same order. + If a is null, this method returns 0. + + @param a the array whose hash value to compute + @return a content-based hash code for a + @since 1.5 + + + Returns a hash code based on the contents of the specified array. + For any two double arrays a and b + such that Arrays.Equals(a, b), it is also the case that + Arrays.HashCode(a) == Arrays.HashCode(b). + + The value returned by this method is the same value that would be + obtained by invoking the {@link List#hashCode() hashCode} + method on a {@link List} Containing a sequence of {@link Double} + instances representing the elements of a in the same order. + If a is null, this method returns 0. + + @param a the array whose hash value to compute + @return a content-based hash code for a + @since 1.5 + + + Returns a hash code based on the contents of the specified array. If + the array Contains other arrays as elements, the hash code is based on + their identities rather than their contents. It is therefore + acceptable to invoke this method on an array that Contains itself as an + element, either directly or indirectly through one or more levels of + arrays. + + For any two arrays a and b such that + Arrays.Equals(a, b), it is also the case that + Arrays.HashCode(a) == Arrays.HashCode(b). + + The value returned by this method is equal to the value that would + be returned by Arrays.AsList(a).HashCode(), unless a + is null, in which case 0 is returned. + + @param a the array whose content-based hash code to compute + @return a content-based hash code for a + @see #deepHashCode(Object[]) + @since 1.5 + + + Returns a hash code based on the "deep contents" of the specified + array. If the array Contains other arrays as elements, the + hash code is based on their contents and so on, ad infInitum. + It is therefore unacceptable to invoke this method on an array that + Contains itself as an element, either directly or indirectly through + one or more levels of arrays. The behavior of such an invocation is + undefined. + + For any two arrays a and b such that + Arrays.DeepEquals(a, b), it is also the case that + Arrays.DeepHashCode(a) == Arrays.DeepHashCode(b). + + The computation of the value returned by this method is similar to + that of the value returned by {@link List#hashCode()} on a list + Containing the same elements as a in the same order, with one + difference: If an element e of a is itself an array, + its hash code is computed not by calling e.HashCode(), but as + by calling the appropriate overloading of Arrays.HashCode(e) + if e is an array of a primitive type, or as by calling + Arrays.DeepHashCode(e) recursively if e is an array + of a reference type. If a is null, this method + returns 0. + + @param a the array whose deep-content-based hash code to compute + @return a deep-content-based hash code for a + @see #hashCode(Object[]) + @since 1.5 + + + Returns true if the two specified arrays are deeply + Equal to one another. Unlike the {@link #Equals(Object[],Object[])} + method, this method is appropriate for use with nested arrays of + arbitrary depth. + + Two array references are considered deeply equal if both + are null, or if they refer to arrays that contain the same + number of elements and all corresponding pairs of elements in the two + arrays are deeply Equal. + + Two possibly null elements e1 and e2 are + deeply equal if any of the following conditions hold: +
    +
  • e1 and e2 are both arrays of object reference + types, and Arrays.DeepEquals(e1, e2) would return true
  • +
  • e1 and e2 are arrays of the same primitive + type, and the appropriate overloading of + Arrays.Equals(e1, e2) would return true.
  • +
  • e1 == e2
  • +
  • e1.Equals(e2) would return true.
  • +
+ Note that this defInition permits null elements at any depth. + + If either of the specified arrays contain themselves as elements + either directly or indirectly through one or more levels of arrays, + the behavior of this method is undefined. + + @param a1 one array to be tested for Equality + @param a2 the other array to be tested for Equality + @return true if the two arrays are equal + @see #Equals(Object[],Object[]) + @see Objects#deepEquals(Object, Object) + @since 1.5 +
+ + Returns a string representation of the contents of the specified array. + The string representation consists of a list of the array's elements, + enclosed in square brackets ("[]"). Adjacent elements are + Separated by the characters ", " (a comma followed by a + space). Elements are Converted to strings as by + String.ValueOf(long). Returns "null" if a + is null. + + @param a the array whose string representation to return + @return a string representation of a + @since 1.5 + + + Returns a string representation of the contents of the specified array. + The string representation consists of a list of the array's elements, + enclosed in square brackets ("[]"). Adjacent elements are + Separated by the characters ", " (a comma followed by a + space). Elements are Converted to strings as by + String.ValueOf(int). Returns "null" if a is + null. + + @param a the array whose string representation to return + @return a string representation of a + @since 1.5 + + + Returns a string representation of the contents of the specified array. + The string representation consists of a list of the array's elements, + enclosed in square brackets ("[]"). Adjacent elements are + Separated by the characters ", " (a comma followed by a + space). Elements are Converted to strings as by + String.ValueOf(short). Returns "null" if a + is null. + + @param a the array whose string representation to return + @return a string representation of a + @since 1.5 + + + Returns a string representation of the contents of the specified array. + The string representation consists of a list of the array's elements, + enclosed in square brackets ("[]"). Adjacent elements are + Separated by the characters ", " (a comma followed by a + space). Elements are Converted to strings as by + String.ValueOf(char). Returns "null" if a + is null. + + @param a the array whose string representation to return + @return a string representation of a + @since 1.5 + + + Returns a string representation of the contents of the specified array. + The string representation consists of a list of the array's elements, + enclosed in square brackets ("[]"). Adjacent elements + are Separated by the characters ", " (a comma followed + by a space). Elements are Converted to strings as by + String.ValueOf(byte). Returns "null" if + a is null. + + @param a the array whose string representation to return + @return a string representation of a + @since 1.5 + + + Returns a string representation of the contents of the specified array. + The string representation consists of a list of the array's elements, + enclosed in square brackets ("[]"). Adjacent elements are + Separated by the characters ", " (a comma followed by a + space). Elements are Converted to strings as by + String.ValueOf(bool). Returns "null" if + a is null. + + @param a the array whose string representation to return + @return a string representation of a + @since 1.5 + + + Returns a string representation of the contents of the specified array. + The string representation consists of a list of the array's elements, + enclosed in square brackets ("[]"). Adjacent elements are + Separated by the characters ", " (a comma followed by a + space). Elements are Converted to strings as by + String.ValueOf(float). Returns "null" if a + is null. + + @param a the array whose string representation to return + @return a string representation of a + @since 1.5 + + + Returns a string representation of the contents of the specified array. + The string representation consists of a list of the array's elements, + enclosed in square brackets ("[]"). Adjacent elements are + Separated by the characters ", " (a comma followed by a + space). Elements are Converted to strings as by + String.ValueOf(double). Returns "null" if a + is null. + + @param a the array whose string representation to return + @return a string representation of a + @since 1.5 + + + Returns a string representation of the "deep contents" of the specified + array. If the array Contains other arrays as elements, the string + representation Contains their contents and so on. This method is + designed for Converting multidimensional arrays to strings. + + The string representation consists of a list of the array's + elements, enclosed in square brackets ("[]"). Adjacent + elements are Separated by the characters ", " (a comma + followed by a space). Elements are Converted to strings as by + String.ValueOf(Object), unless they are themselves + arrays. + + If an element e is an array of a primitive type, it is + Converted to a string as by invoking the appropriate overloading of + Arrays.ToString(e). If an element e is an array of a + reference type, it is Converted to a string as by invoking + this method recursively. + + To avoid infInite recursion, if the specified array Contains itself + as an element, or Contains an indirect reference to itself through one + or more levels of arrays, the self-reference is Converted to the string + "[...]". For example, an array Containing only a reference + to itself would be rendered as "[[...]]". + + This method returns "null" if the specified array + is null. + + @param a the array whose string representation to return + @return a string representation of a + @see #ToString(Object[]) + @since 1.5 + + + Returns a string representation of the contents of the specified array. + If the array contains other arrays as elements, they are converted to + strings by the {@link Object#toString} method inherited from + Object, which describes their identities rather than + their contents. + +

The value returned by this method is equal to the value that would + be returned by Arrays.asList(a).toString(), unless a + is null, in which case "null" is returned.

+ + @param a the array whose string representation to return + @return a string representation of a + @see #deepToString(Object[]) + @since 1.5 +
+ + This mask is used to obtain the value of an int as if it were unsigned. + + + The signum of this BigInteger: -1 for negative, 0 for zero, or + 1 for positive. Note that the BigInteger zero must have + a signum of 0. This is necessary to ensures that there is exactly one + representation for each BigInteger value. + + @serial + + + The magnitude of this BigInteger, in big-endian order: the + zeroth element of this array is the most-significant int of the + magnitude. The magnitude must be "minimal" in that the most-significant + int ({@code mag[0]}) must be non-zero. This is necessary to + ensure that there is exactly one representation for each BigInteger + value. Note that this implies that the BigInteger zero has a + zero-length mag array. + + + One plus the bitCount of this BigInteger. Zeros means unitialized. + + @serial + @see #bitCount + @deprecated Deprecated since logical value is offset from stored + value and correction factor is applied in accessor method. + + + One plus the bitLength of this BigInteger. Zeros means unitialized. + (either value is acceptable). + + @serial + @see #bitLength() + @deprecated Deprecated since logical value is offset from stored + value and correction factor is applied in accessor method. + + + Two plus the index of the lowest-order int in the magnitude of this + BigInteger that contains a nonzero int, or -2 (either value is acceptable). + The least significant int has int-number 0, the next int in order of + increasing significance has int-number 1, and so forth. + @deprecated Deprecated since logical value is offset from stored + value and correction factor is applied in accessor method. + + + This internal constructor differs from its public cousin + with the arguments reversed in two ways: it assumes that its + arguments are correct, and it doesn't copy the magnitude array. + + + Translates a byte array containing the two's-complement binary + representation of a BigInteger into a BigInteger. The input array is + assumed to be in big-endian byte-order: the most significant + byte is in the zeroth element. + + @param val big-endian two's-complement binary representation of + BigInteger. + @throws NumberFormatException {@code val} is zero bytes long. + + + This private constructor translates an int array containing the + two's-complement binary representation of a BigInteger into a + BigInteger. The input array is assumed to be in big-endian + int-order: the most significant int is in the zeroth element. + + + Constructs a BigInteger with the specified value, which may not be zero. + + + Returns the input array stripped of any leading zero bytes. + Since the source is trusted the copying may be skipped. + + + Returns the String representation of this BigInteger in the + given radix. If the radix is outside the range from {@link + Character#Min_RADIX} to {@link Character#Max_RADIX} inclusive, + it will default to 10 (as is the case for + {@code Integer.toString}). The digit-to-character mapping + provided by {@code Character.forDigit} is used, and a minus + sign is prepended if appropriate. (This representation is + compatible with the {@link #BigInteger(String, int) (String, + int)} constructor.) + + @param radix radix of the String representation. + @return String representation of this BigInteger in the given radix. + @see Integer#toString + @see Character#forDigit + @see #BigInteger(java.lang.String, int) + + + The BigInteger constant zero. + + @since 1.2 + + + The BigInteger constant one. + + @since 1.2 + + + The BigInteger constant two. (Not exported.) + + + The BigInteger constant ten. + + @since 1.5 + + + Returns a BigInteger whose value is equal to that of the + specified {@code long}. This "static factory method" is + provided in preference to a ({@code long}) constructor + because it allows for reuse of frequently used BigIntegers. + + @param val value of the BigInteger to return. + @return a BigInteger with the specified value. + + + Returns a BigInteger with the given two's complement representation. + Assumes that the input array will not be modified (the returned + BigInteger will reference the input array if feasible). + + + Package private method to return bit length for an integer. + + + Returns the number of bits in the two's complement representation + of this BigInteger that differ from its sign bit. This method is + useful when implementing bit-vector style sets atop BigIntegers. + + @return number of bits in the two's complement representation + of this BigInteger that differ from its sign bit. + + + Returns a BigInteger whose value is the absolute value of this + BigInteger. + + @return {@code abs(this)} + + + Returns a BigInteger whose value is {@code (-this)}. + + @return {@code -this} + + + Returns a BigInteger whose value is (thisexponent). + Note that {@code exponent} is an integer rather than a BigInteger. + + @param exponent exponent to which this BigInteger is to be raised. + @return thisexponent + @throws ArithmeticException {@code exponent} is negative. (This would + cause the operation to yield a non-integer value.) + + + Multiplies int arrays x and y to the specified lengths and places + the result into z. There will be no leading zeros in the resultant array. + + + Multiply an array by one word k and add to result, return the carry + + + Squares the contents of the int array x. The result is placed into the + int array z. The contents of x are not changed. + + + Add one word to the number a mlen words into a. Return the resulting + carry. + + + Returns the signum function of this BigInteger. + + @return -1, 0 or 1 as the value of this BigInteger is negative, zero or + positive. + + + Returns a byte array containing the two's-complement + representation of this BigInteger. The byte array will be in + big-endian byte-order: the most significant byte is in + the zeroth element. The array will contain the minimum number + of bytes required to represent this BigInteger, including at + least one sign bit, which is {@code (ceil((this.bitLength() + + 1)/8))}. (This representation is compatible with the + {@link #BigInteger(byte[]) (byte[])} constructor.) + + @return a byte array containing the two's-complement representation of + this BigInteger. + @see #BigInteger(byte[]) + + + Returns the length of the two's complement representation in ints, + including space for at least one sign bit. + + + Returns the specified int of the little-endian two's complement + representation (int 0 is the least significant). The int number can + be arbitrarily high (values are logically preceded by infinitely many + sign ints). + + + Returns the index of the int that contains the first nonzero int in the + little-endian binary representation of the magnitude (int 0 is the + least significant). If the magnitude is zero, return value is undefined. + + + Returns a copy of the input array stripped of any leading zero bytes. + + + Takes an array a representing a negative 2's-complement number and + returns the minimal (no leading zero bytes) unsigned whose value is -a. + + + Takes an array a representing a negative 2's-complement number and + returns the minimal (no leading zero ints) unsigned whose value is -a. + + + Returns the number of zero bits preceding the highest-order + ("leftmost") one-bit in the two's complement binary representation + of the specified {@code int} value. Returns 32 if the + specified value has no one-bits in its two's complement representation, + in other words if it is equal to zero. + + Note that this method is closely related to the logarithm base 2. + For all positive {@code int} values x: +
    +
  • floor(log2(x)) = {@code 31 - numberOfLeadingZeros(x)}
  • +
  • ceil(log2(x)) = {@code 32 - numberOfLeadingZeros(x - 1)}
  • +
+ + @return the number of zero bits preceding the highest-order + ("leftmost") one-bit in the two's complement binary representation + of the specified {@code int} value, or 32 if the value + is equal to zero. + @since 1.5 +
+ + Returns the number of zero bits following the lowest-order ("rightmost") + one-bit in the two's complement binary representation of the specified + {@code int} value. Returns 32 if the specified value has no + one-bits in its two's complement representation, in other words if it is + equal to zero. + + @return the number of zero bits following the lowest-order ("rightmost") + one-bit in the two's complement binary representation of the + specified {@code int} value, or 32 if the value is equal + to zero. + @since 1.5 + + + Returns the number of one-bits in the two's complement binary + representation of the specified {@code int} value. This function is + sometimes referred to as the population count. + + @return the number of one-bits in the two's complement binary + representation of the specified {@code int} value. + @since 1.5 + + + Compares the magnitude array of this BigInteger with the specified + BigInteger's. This is the version of compareTo ignoring sign. + + @param val BigInteger whose magnitude array to be compared. + @return -1, 0 or 1 as this magnitude array is less than, equal to or + greater than the magnitude aray for the specified BigInteger's. + + + Compares this BigInteger with the specified Object for equality. + + @param x Object to which this BigInteger is to be compared. + @return {@code true} if and only if the specified Object is a + BigInteger whose value is numerically equal to this BigInteger. + + + Returns the minimum of this BigInteger and {@code val}. + + @param val value with which the minimum is to be computed. + @return the BigInteger whose value is the lesser of this BigInteger and + {@code val}. If they are equal, either may be returned. + + + Returns the maximum of this BigInteger and {@code val}. + + @param val value with which the maximum is to be computed. + @return the BigInteger whose value is the greater of this and + {@code val}. If they are equal, either may be returned. + + + Returns the hash code for this BigInteger. + + @return hash code for this BigInteger. + + + Converts this BigInteger to an {@code int}. This + conversion is analogous to a + narrowing primitive conversion from {@code long} to + {@code int} as defined in section 5.1.3 of + The Java(TM) Language Specification: + if this BigInteger is too big to fit in an + {@code int}, only the low-order 32 bits are returned. + Note that this conversion can lose information about the + overall magnitude of the BigInteger value as well as return a + result with the opposite sign. + + @return this BigInteger converted to an {@code int}. + + + Converts this BigInteger to a {@code long}. This + conversion is analogous to a + narrowing primitive conversion from {@code long} to + {@code int} as defined in section 5.1.3 of + The Java(TM) Language Specification: + if this BigInteger is too big to fit in a + {@code long}, only the low-order 64 bits are returned. + Note that this conversion can lose information about the + overall magnitude of the BigInteger value as well as return a + result with the opposite sign. + + @return this BigInteger converted to a {@code long}. + + + Returns a BigInteger whose value is {@code (this >> n)}. Sign + extension is performed. The shift distance, {@code n}, may be + negative, in which case this method performs a left shift. + (Computes floor(this / 2n).) + + @param n shift distance, in bits. + @return {@code this >> n} + @throws ArithmeticException if the shift distance is {@code + Integer.Min_VALUE}. + @see #shiftLeft + + + Returns a BigInteger whose value is {@code (~this)}. (This method + returns a negative value if and only if this BigInteger is + non-negative.) + + @return {@code ~this} + + + Returns a BigInteger whose value is {@code (this | val)}. (This method + returns a negative BigInteger if and only if either this or val is + negative.) + + @param val value to be OR'ed with this BigInteger. + @return {@code this | val} + + + Package private methods used by BigDecimal code to multiply a BigInteger + with a long. Assumes v is not equal to INFLATED. + + + Returns a BigInteger whose value is {@code (this * val)}. + + @param val value to be multiplied by this BigInteger. + @return {@code this * val} + + + Returns a BigInteger whose value is {@code (this + val)}. + + @param val value to be added to this BigInteger. + @return {@code this + val} + + + Adds the contents of the int arrays x and y. This method allocates + a new int array to hold the answer and returns a reference to that + array. + + + Returns a BigInteger whose value is {@code (this - val)}. + + @param val value to be subtracted from this BigInteger. + @return {@code this - val} + + + Subtracts the contents of the second int arrays (little) from the + first (big). The first int array (big) must represent a larger number + than the second. This method allocates the space necessary to hold the + answer. + + + Returns a BigInteger whose value is {@code (this / val)}. + + @param val value by which this BigInteger is to be divided. + @return {@code this / val} + @throws ArithmeticException if {@code val} is zero. + + + Holds the magnitude of this MutableBigInteger in big endian order. + The magnitude may start at an offset into the value array, and it may + end before the length of the value array. + + + The number of ints of the value array that are currently used + to hold the magnitude of this MutableBigInteger. The magnitude starts + at an offset and offset + intLen may be less than value.Length. + + + The offset into the value array where the magnitude of this + MutableBigInteger begins. + + + MutableBigInteger with one element value array with the value 1. Used by + BigDecimal divideAndRound to increment the quotient. Use this constant + only when the method is not going to modify this object. + + + The default constructor. An empty MutableBigInteger is created with + a one word capacity. + + + Construct a new MutableBigInteger with a magnitude specified by + the int val. + + + Construct a new MutableBigInteger with the specified value array + up to the length of the array supplied. + + + Construct a new MutableBigInteger with a magnitude equal to the + specified BigInteger. + + + Construct a new MutableBigInteger with a magnitude equal to the + specified MutableBigInteger. + + + Internal helper method to return the magnitude array. The caller is not + supposed to modify the returned array. + + + Convert this MutableBigInteger to a long value. The caller has to make + sure this MutableBigInteger can be fit into long. + + + Convert this MutableBigInteger to a BigInteger object. + + + Clear out a MutableBigInteger for reuse. + + + Set a MutableBigInteger to zero, removing its offset. + + + Compare the magnitude of two MutableBigIntegers. Returns -1, 0 or 1 + as this MutableBigInteger is numerically less than, equal to, or + greater than b. + + + Compare this against half of a MutableBigInteger object (Needed for + remainder tests). + Assumes no leading unnecessary zeros, which holds for results + from divide(). + + + Return the index of the lowest set bit in this MutableBigInteger. If the + magnitude of this MutableBigInteger is zero, -1 is returned. + + + Return the int in use in this MutableBigInteger at the specified + index. This method is not used because it is not inlined on all + platforms. + + + Return a long which is equal to the unsigned value of the int in + use in this MutableBigInteger at the specified index. This method is + not used because it is not inlined on all platforms. + + + Ensure that the MutableBigInteger is in normal form, specifically + making sure that there are no leading zeros, and that if the + magnitude is zero, then intLen is zero. + + + If this MutableBigInteger cannot hold len words, increase the size + of the value array to len words. + + + Convert this MutableBigInteger into an int array with no leading + zeros, of a length that is equal to this MutableBigInteger's intLen. + + + Sets the int at index+offset in this MutableBigInteger to val. + This does not get inlined on all platforms so it is not used + as often as originally intended. + + + Sets this MutableBigInteger's value array to the specified array. + The intLen is set to the specified length. + + + Sets this MutableBigInteger's value array to a copy of the specified + array. The intLen is set to the length of the new array. + + + Sets this MutableBigInteger's value array to a copy of the specified + array. The intLen is set to the length of the specified array. + + + Returns true iff this MutableBigInteger has a value of one. + + + Returns true iff this MutableBigInteger has a value of zero. + + + Returns true iff this MutableBigInteger is even. + + + Returns true iff this MutableBigInteger is odd. + + + Returns true iff this MutableBigInteger is in normal form. A + MutableBigInteger is in normal form if it has no leading zeros + after the offset, and intLen + offset <= value.Length. + + + Returns a String representation of this MutableBigInteger in radix 10. + + + Right shift this MutableBigInteger n bits. The MutableBigInteger is left + in normal form. + + + Left shift this MutableBigInteger n bits. + + + A primitive used for division. This method adds in one multiple of the + divisor a back to the dividend result at a specified offset. It is used + when qhat was estimated too large, and must be adjusted. + + + This method is used for division. It multiplies an n word input a by one + word input x, and subtracts the n word product from q. This is needed + when subtracting qhat*divisor from dividend. + + + Right shift this MutableBigInteger n bits, where n is + less than 32. + Assumes that intLen > 0, n > 0 for speed + + + Left shift this MutableBigInteger n bits, where n is + less than 32. + Assumes that intLen > 0, n > 0 for speed + + + Adds the contents of two MutableBigInteger objects.The result + is placed within this MutableBigInteger. + The contents of the addend are not changed. + + + Subtracts the smaller of this and b from the larger and places the + result into this MutableBigInteger. + + + Subtracts the smaller of a and b from the larger and places the result + into the larger. Returns 1 if the answer is in a, -1 if in b, 0 if no + operation was performed. + + + Multiply the contents of two MutableBigInteger objects. The result is + placed into MutableBigInteger z. The contents of y are not changed. + + + Multiply the contents of this MutableBigInteger by the word y. The + result is placed into z. + + + This method is used for division of an n word dividend by a one word + divisor. The quotient is placed into quotient. The one word divisor is + specified by divisor. + + @return the remainder of the division is returned. + + + + Calculates the quotient of this div b and places the quotient in the + provided MutableBigInteger objects and the remainder object is returned. + + Uses Algorithm D in Knuth section 4.3.1. + Many optimizations to that algorithm have been adapted from the Colin + Plumb C library. + It special cases one word divisors for speed. The content of b is not + changed. + + + + Internally used to calculate the quotient of this div v and places the + quotient in the provided MutableBigInteger object and the remainder is + returned. + + @return the remainder of the division will be returned. + + + Divide this MutableBigInteger by the divisor represented by its magnitude + array. The quotient will be placed into the provided quotient object & + the remainder object is returned. + + + Compare two longs as if they were unsigned. + Returns true iff one is bigger than two. + + + This method divides a long quantity by an int to estimate + qhat for two multi precision numbers. It is used when + the signed value of n is less than zero. + + + Calculate GCD of this and b. This and b are changed by the computation. + + + Calculate GCD of this and v. + Assumes that this and v are not zero. + + + Calculate GCD of a and b interpreted as unsigned integers. + + + Returns the modInverse of this mod p. This and p are not affected by + the operation. + + + Calculate the multiplicative inverse of this mod mod, where mod is odd. + This and mod are not changed by the calculation. + + This method implements an algorithm due to Richard Schroeppel, that uses + the same intermediate representation as Montgomery Reduction + ("Montgomery Form"). The algorithm is described in an unpublished + manuscript entitled "Fast Modular Reciprocals." + + + Uses the extended Euclidean algorithm to compute the modInverse of base + mod a modulus that is a power of 2. The modulus is 2^k. + + + + Manage operations dealing with bit-mapped fields. + @author Marc Johnson (mjohnson at apache dot org) + @author Andrew C. Oliver (acoliver at apache dot org) + + + + + Create a instance + + + the mask specifying which bits apply to this + BitField. Bits that are set in this mask are the + bits that this BitField operates on + + + + + Create a instance + + + the mask specifying which bits apply to this + BitField. Bits that are set in this mask are the + bits that this BitField operates on + + + + + Clear the bits. + + the int data containing the bits we're interested in + the value of holder with the specified bits cleared (set to 0) + + + + Clear the bits. + + the short data containing the bits we're interested in + the value of holder with the specified bits cleared (set to 0) + + + + Obtain the value for the specified BitField, appropriately + shifted right. Many users of a BitField will want to treat the + specified bits as an int value, and will not want to be aware + that the value is stored as a BitField (and so shifted left so + many bits) + + the int data containing the bits we're interested in + the selected bits, shifted right appropriately + + + + Obtain the value for the specified BitField, unshifted + + the short data containing the bits we're interested in + the selected bits + + + + Obtain the value for the specified BitField, appropriately + shifted right, as a short. Many users of a BitField will want + to treat the specified bits as an int value, and will not want + to be aware that the value is stored as a BitField (and so + shifted left so many bits) + + the short data containing the bits we're interested in + the selected bits, shifted right appropriately + + + + Obtain the value for the specified BitField, appropriately + shifted right. Many users of a BitField will want to treat the + specified bits as an int value, and will not want to be aware + that the value is stored as a BitField (and so shifted left so + many bits) + + the int data containing the bits we're interested in + the selected bits, shifted right appropriately + + + + Are all of the bits set or not? This is a stricter test than + isSet, in that all of the bits in a multi-bit set must be set + for this method to return true + + the int data containing the bits we're interested in + + true if all of the bits are set otherwise, false. + + + + + is the field set or not? This is most commonly used for a + single-bit field, which is often used to represent a boolean + value; the results of using it for a multi-bit field is to + determine whether *any* of its bits are set + + the int data containing the bits we're interested in + + true if any of the bits are set; otherwise, false. + + + + + Set the bits. + + the int data containing the bits we're interested in + the value of holder with the specified bits set to 1 + + + + Set a boolean BitField + + the int data containing the bits we're interested in + indicating whether to set or clear the bits + the value of holder with the specified bits set or cleared + + + + Set the bits. + + the short data containing the bits we're interested in + the value of holder with the specified bits set to 1 + + + + Set a boolean BitField + + the short data containing the bits we're interested in + indicating whether to set or clear the bits + the value of holder with the specified bits set or cleared + + + + Obtain the value for the specified BitField, appropriately + shifted right, as a short. Many users of a BitField will want + to treat the specified bits as an int value, and will not want + to be aware that the value is stored as a BitField (and so + shifted left so many bits) + + the short data containing the bits we're interested in + the new value for the specified bits + the selected bits, shifted right appropriately + + + + Sets the value. + + the byte data containing the bits we're interested in + The value. + + + + + Set a boolean BitField + + the byte data containing the bits we're interested in + indicating whether to set or clear the bits + the value of holder with the specified bits set or cleared + + + + Clears the bits. + + the byte data containing the bits we're interested in + the value of holder with the specified bits cleared + + + + Set the bits. + + the byte data containing the bits we're interested in + the value of holder with the specified bits set to 1 + + + + Returns immutable Btfield instances. + @author Jason Height (jheight at apache dot org) + + + + + Gets the instance. + + The mask. + + + + + representation of a byte (8-bit) field at a fixed location within a + byte array + @author Marc Johnson (mjohnson at apache dot org + + + + + behavior of a field at a fixed location within a byte array + @author Marc Johnson (mjohnson at apache dot org + + + + + set the value from its offset into an array of bytes + + the byte array from which the value is to be read + + + + set the value from an Stream + + the Stream from which the value is to be read + + + + return the value as a String + + + + + + write the value out to an array of bytes at the appropriate offset + + the array of bytes to which the value is to be written + + + + Initializes a new instance of the class. + + The offset. + + + + Initializes a new instance of the class. + + The offset. + The value. + + + + Initializes a new instance of the class. + + The offset. + The data. + + + + Initializes a new instance of the class. + + The offset. + The _value. + The data. + + + + set the value from its offset into an array of bytes + + the byte array from which the value is to be read + + + + set the value from an Stream + + the Stream from which the value is to be read + + + + set the ByteField's current value and write it to a byte array + + value to be set + the byte array to write the value to + + + + Returns a that represents the current . + + + A that represents the current . + + + + + write the value out to an array of bytes at the appropriate offset + + the array of bytes to which the value is to be written + + + + Gets or sets the value. + + The value. + + + Utilities for working with Microsoft CodePages. + +

Provides constants for understanding numeric codepages, + along with utilities to translate these into Java Character Sets.

+
+ +

Codepage 037, a special case

+
+ +

Codepage for SJIS

+
+ +

Codepage for GBK, aka MS936

+
+ +

Codepage for MS949

+
+ +

Codepage for UTF-16

+
+ +

Codepage for UTF-16 big-endian

+
+ +

Codepage for Windows 1250

+
+ +

Codepage for Windows 1251

+
+ +

Codepage for Windows 1252

+
+ +

Codepage for Windows 1253

+
+ +

Codepage for Windows 1254

+
+ +

Codepage for Windows 1255

+
+ +

Codepage for Windows 1256

+
+ +

Codepage for Windows 1257

+
+ +

Codepage for Windows 1258

+
+ +

Codepage for Johab

+
+ +

Codepage for Macintosh Roman (Java: MacRoman)

+
+ +

Codepage for Macintosh Japan (Java: unknown - use SJIS, cp942 or + cp943)

+
+ +

Codepage for Macintosh Chinese Traditional (Java: unknown - use Big5, + MS950, or cp937)

+
+ +

Codepage for Macintosh Korean (Java: unknown - use EUC_KR or + cp949)

+
+ +

Codepage for Macintosh Arabic (Java: MacArabic)

+
+ +

Codepage for Macintosh Hebrew (Java: MacHebrew)

+
+ +

Codepage for Macintosh Greek (Java: MacGreek)

+
+ +

Codepage for Macintosh Cyrillic (Java: MacCyrillic)

+
+ +

Codepage for Macintosh Chinese Simplified (Java: unknown - use + EUC_CN, ISO2022_CN_GB, MS936 or cp935)

+
+ +

Codepage for Macintosh Romanian (Java: MacRomania)

+
+ +

Codepage for Macintosh Ukrainian (Java: MacUkraine)

+
+ +

Codepage for Macintosh Thai (Java: MacThai)

+
+ +

Codepage for Macintosh Central Europe (Latin-2) + (Java: MacCentralEurope)

+
+ +

Codepage for Macintosh Iceland (Java: MacIceland)

+
+ +

Codepage for Macintosh Turkish (Java: MacTurkish)

+
+ +

Codepage for Macintosh Croatian (Java: MacCroatian)

+
+ +

Codepage for US-ASCII

+
+ +

Codepage for KOI8-R

+
+ +

Codepage for ISO-8859-1

+
+ +

Codepage for ISO-8859-2

+
+ +

Codepage for ISO-8859-3

+
+ +

Codepage for ISO-8859-4

+
+ +

Codepage for ISO-8859-5

+
+ +

Codepage for ISO-8859-6

+
+ +

Codepage for ISO-8859-7

+
+ +

Codepage for ISO-8859-8

+
+ +

Codepage for ISO-8859-9

+
+ +

Codepage for ISO-2022-JP

+
+ +

Another codepage for ISO-2022-JP

+
+ +

Yet another codepage for ISO-2022-JP

+
+ +

Codepage for ISO-2022-KR

+
+ +

Codepage for EUC-JP

+
+ +

Codepage for EUC-KR

+
+ +

Codepage for GB2312

+
+ +

Codepage for GB18030

+
+ +

Another codepage for US-ASCII

+
+ +

Codepage for UTF-8

+
+ +

Codepage for Unicode

+
+ + Converts a string into bytes, in the equivalent character encoding + to the supplied codepage number. + @param string The string to convert + @param codepage The codepage number + + + Converts the bytes into a String, based on the equivalent character encoding + to the supplied codepage number. + @param string The byte of the string to convert + @param codepage The codepage number + + + Converts the bytes into a String, based on the equivalent character encoding + to the supplied codepage number. + @param string The byte of the string to convert + @param codepage The codepage number + + +

Turns a codepage number into the equivalent character encoding's + name.

+ + @param codepage The codepage number + + @return The character encoding's name. If the codepage number is 65001, + the encoding name is "UTF-8". All other positive numbers are mapped to + "cp" followed by the number, e.g. if the codepage number is 1252 the + returned character encoding name will be "cp1252". + + @exception UnsupportedEncodingException if the specified codepage is + less than zero. +
+ + + This class comes from Java + + + + + Initializes a new instance of the class. + + + + + Adds the specified o. + + The o. + + + + Determines whether [contains] [the specified o]. + + The o. + + true if [contains] [the specified o]; otherwise, false. + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in at which copying begins. + + is null. + + + is less than zero. + + + is multidimensional. + -or- + is equal to or greater than the length of . + -or- + The number of elements in the source is greater than the available space from to the end of the destination . + + + The type of the source cannot be cast automatically to the type of the destination . + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Removes the specified o. + + The o. + + + + Removes all of the elements from this set. + The set will be empty after this call returns. + + + + + Gets the number of elements contained in the . + + + + The number of elements contained in the . + + + + + This class comes from Java + + + + + Initializes a new instance of the class. + + + + + Removes the specified key. + + The key. + + + + + Gets the enumerator. + + + + + + Determines whether the specified key contains key. + + The key. + + true if the specified key contains key; otherwise, false. + + + + + Adds the specified key. + + The key. + The value. + + + + Clears this instance. + + + + + Loads the specified in stream. + + The in stream. + + + + Loads the convert. + + The string. + + + Converts encoded \uxxxx to unicode chars + and changes special saved chars to their original forms + + + + + Continues the line. + + The line. + + + + + Gets the count. + + The count. + + + + Gets or sets the with the specified key. + + + + + + Gets the keys. + + The keys. + + + + CRC Verification + + + + + Initializes a new instance of the class. + + + + + CRC Bytes. + + The buffer. + + + + + String CRC + + the string + + + + + File CRC + + the input file + + + + + Stream CRC + + the input stream + + + + + dump data in hexadecimal format; derived from a HexDump utility I + wrote in June 2001. + @author Marc Johnson + @author Glen Stampoultzis (glens at apache.org) + + + + Dumps bytesToDump bytes to an output stream. + + @param in The stream to read from + @param out The output stream + @param start The index to use as the starting position for the left hand side label + @param bytesToDump The number of bytes to output. Use -1 to read until the end of file. + + + + Shorts to hex. + + The value. + char array of 2 (zero padded) uppercase hex chars and prefixed with '0x' + + + + Bytes to hex. + + The value. + char array of 1 (zero padded) uppercase hex chars and prefixed with '0x' + + + + Ints to hex. + + The value. + char array of 4 (zero padded) uppercase hex chars and prefixed with '0x' + + + + char array of 4 (zero padded) uppercase hex chars and prefixed with '0x' + + The value. + char array of 4 (zero padded) uppercase hex chars and prefixed with '0x' + + + + Toes the hex chars. + + The p value. + The n bytes. + char array of uppercase hex chars, zero padded and prefixed with '0x' + + + + This method reads hex data from a filename and returns a byte array. + The file may contain line comments that are preceeded with a # symbol. + + The filename to read + The bytes read from the file. + If there was a problem while reading the file. + + + + Same as ReadData(String) except that this method allows you to specify sections within + a file. Sections are referenced using section headers in the form: + + The stream. + The section. + + + + + Reads the data. + + The filename. + The section. + + + + + Reads the data. + + The stream. + The EOF char. + + + + + Reads from string. + + The data. + + + + + Reads to EOL. + + The stream. + + + + construct the with its offset into its containing byte array class. + + offset of the field within its byte array. + + + + construct the with its offset into its containing + byte array and initialize its value + + offset of the field within its byte array + the initial value + + + + Construct the with its offset into its containing + byte array and initialize its value from its byte array + + offset of the field within its byte array + the byte array to Read the value from + + + + construct the with its offset into its containing + byte array, initialize its value, and write the value to a byte + + offset of the field within its byte array + the initial value + the byte array to write the value to + + + + Set the IntegerField's current value and write it to a byte array + + value to be Set + the byte array to write the value to + + + + Set the value from its offset into an array of bytes + + The data. + + + + Set the value from an Stream + + the Stream from which the value is to be Read + + + + write the value out to an array of bytes at the appropriate offset + + the array of bytes to which the value is to be written + + + + Same as using the constructor with the same + parameter list. Avoid creation of an useless object. + + offset of the field within its byte array + the initial value + the byte array to write the value to + + + + Returns a that represents the current . + + + A that represents the current . + + + + + get or Set the IntegerField's current value + + The value. + + + + + A List of int's; as full an implementation of the java.Util.List interface as possible, with an eye toward minimal creation of objects + + the mimicry of List is as follows: +
    +
  • if possible, operations designated 'optional' in the List + interface are attempted
  • +
  • wherever the List interface refers to an Object, substitute + int
  • +
  • wherever the List interface refers to a Collection or List, + substitute IntList
  • +
+ + the mimicry is not perfect, however: +
    +
  • operations involving Iterators or ListIterators are not + supported
  • +
  • Remove(Object) becomes RemoveValue to distinguish it from + Remove(int index)
  • +
  • subList is not supported
  • +
+ @author Marc Johnson +
+
+ + + create an IntList of default size + + + + + create a copy of an existing IntList + + the existing IntList + + + + create an IntList with a predefined Initial size + + the size for the internal array + + + + + add the specfied value at the specified index + + the index where the new value is to be Added + the new value + + + + Appends the specified element to the end of this list + + element to be Appended to this list. + return true (as per the general contract of the Collection.add method + + + + Appends all of the elements in the specified collection to the + end of this list, in the order that they are returned by the + specified collection's iterator. The behavior of this + operation is unspecified if the specified collection is + modified while the operation is in progress. (Note that this + will occur if the specified collection is this list, and it's + nonempty.) + + collection whose elements are to be Added to this list. + return true if this list Changed as a result of the call. + + + + Inserts all of the elements in the specified collection into + this list at the specified position. Shifts the element + currently at that position (if any) and any subsequent elements + to the right (increases their indices). The new elements will + appear in this list in the order that they are returned by the + specified collection's iterator. The behavior of this + operation is unspecified if the specified collection is + modified while the operation is in progress. (Note that this + will occur if the specified collection is this list, and it's + nonempty.) + + index at which to insert first element from the specified collection. + elements to be inserted into this list. + return true if this list Changed as a result of the call. + + + + Removes all of the elements from this list. This list will be + empty After this call returns (unless it throws an exception). + + + + + Returns true if this list Contains the specified element. More + formally, returns true if and only if this list Contains at + least one element e such that o == e + + element whose presence in this list is to be Tested. + return true if this list Contains the specified element. + + + + Returns true if this list Contains all of the elements of the + specified collection. + + collection to be Checked for Containment in this list. + return true if this list Contains all of the elements of the specified collection. + + + + Compares the specified object with this list for Equality. + Returns true if and only if the specified object is also a + list, both lists have the same size, and all corresponding + pairs of elements in the two lists are Equal. (Two elements e1 + and e2 are equal if e1 == e2.) In other words, two lists are + defined to be equal if they contain the same elements in the + same order. This defInition ensures that the Equals method + works properly across different implementations of the List + interface. + + the object to be Compared for Equality with this list. + return true if the specified object is equal to this list. + + + + Returns the element at the specified position in this list. + + index of element to return. + return the element at the specified position in this list. + + + + Returns the hash code value for this list. The hash code of a + list is defined to be the result of the following calculation: + + + hashCode = 1; + Iterator i = list.Iterator(); + while (i.HasNext()) { + Object obj = i.Next(); + hashCode = 31*hashCode + (obj==null ? 0 : obj.HashCode()); + } + + + This ensures that list1.Equals(list2) implies that + list1.HashCode()==list2.HashCode() for any two lists, list1 and + list2, as required by the general contract of Object.HashCode. + + + return the hash code value for this list. + + + + Returns the index in this list of the first occurrence of the + specified element, or -1 if this list does not contain this + element. More formally, returns the lowest index i such that + (o == Get(i)), or -1 if there is no such index. + + element to search for. + return the index in this list of the first occurrence of the + specified element, or -1 if this list does not contain + this element. + + + + Returns true if this list Contains no elements. + + return true if this list Contains no elements. + + + + Returns the index in this list of the last occurrence of the + specified element, or -1 if this list does not contain this + element. More formally, returns the highest index i such that + (o == Get(i)), or -1 if there is no such index. + + element to search for. + the index in this list of the last occurrence of the + specified element, or -1 if this list does not contain + this element. + + + + + Removes the element at the specified position in this list. + Shifts any subsequent elements to the left (subtracts one from + their indices). Returns the element that was Removed from the + list. + + the index of the element to Removed. + return the element previously at the specified position. + + + + Removes the first occurrence in this list of the specified + element (optional operation). If this list does not contain + the element, it is unChanged. More formally, Removes the + element with the lowest index i such that (o.Equals(get(i))) + (if such an element exists). + + element to be Removed from this list, if present. + return true if this list Contained the specified element. + + + + Removes from this list all the elements that are Contained in + the specified collection + + collection that defines which elements will be Removed from the list. + return true if this list Changed as a result of the call. + + + + Retains only the elements in this list that are Contained in + the specified collection. In other words, Removes from this + list all the elements that are not Contained in the specified + collection. + + collection that defines which elements this Set will retain. + return true if this list Changed as a result of the call. + + + + Replaces the element at the specified position in this list with the specified element + + index of element to Replace. + element to be stored at the specified position. + the element previously at the specified position. + + + + Returns the number of elements in this list. If this list + Contains more than Int32.MaxValue elements, returns + Int32.MaxValue. + + the number of elements in this IntList + + + + Returns an array Containing all of the elements in this list in + proper sequence. Obeys the general contract of the + Collection.ToArray method. + + an array Containing all of the elements in this list in proper sequence. + + + + Returns an array Containing all of the elements in this list in + proper sequence. Obeys the general contract of the + Collection.ToArray(Object[]) method. + + the array into which the elements of this list are to + be stored, if it is big enough; otherwise, a new array + is allocated for this purpose. + return an array Containing the elements of this list. + + + + the number of elements in this IntList + + + + + A List of objects that are indexed AND keyed by an int; also allows for Getting + the index of a value in the list + +

I am happy is someone wants to re-implement this without using the + internal list and hashmap. If so could you please make sure that + you can add elements half way into the list and have the value-key mappings + update

+
+ + @author Jason Height +
+ + + create an IntMapper of default size + + + + + Appends the specified element to the end of this list + + element to be Appended to this list. + return true (as per the general contract of the Collection.add method) + + + + Gets the index of T object. + + The o. + + + + + Gets the enumerator. + + + + + + Gets the size. + + + + + Gets the T object at the specified index. + + + + + + + Reads all the data from the input stream, and returns + the bytes Read. + + The stream. + + Tony Qu changed the code + + + + Reads the fully. + + The stream. + The b. + + + + + Same as the normal + in.Read(b, off, len) + , but tries to ensure that the entire len number of bytes is Read. + If the end of file is reached before any bytes are Read, returns -1. + If the end of the file is reached after some bytes are + Read, returns the number of bytes Read. + If the end of the file isn't reached before len + bytes have been Read, will return len bytes. + + The stream. + The b. + The off. + The len. + + + + + Copies all the data from the given InputStream to the OutputStream. It + leaves both streams open, so you will still need to close them once done. + + + + + + + Adapts a plain byte array to + + @author Josh Micich + + + + Adapts a plain byte array to + + @author Josh Micich + + + + Wraps an providing

+ + This class does not buffer any input, so the stream Read position maintained + by this class is consistent with that of the inner stream. +

+ + @author Josh Micich + +
+ + + Wraps an providing + + @author Josh Micich + + + + a utility class for handling little-endian numbers, which the 80x86 world is + replete with. The methods are all static, and input/output is from/to byte + arrays, or from InputStreams. + + + @author Marc Johnson (mjohnson at apache dot org) + @author Andrew Oliver (acoliver at apache dot org) + + + + + Initializes a new instance of the class. + + + + + get a short value from a byte array + + the byte array + a starting offset into the byte array + the short (16-bit) value + + + + get an unsigned short value from a byte array + + the byte array + a starting offset into the byte array + the unsigned short (16-bit) value in an integer + + + + get a short value from a byte array + + a starting offset into the byte array + the short (16-bit) value + + + + get a short value from a byte array + + the unsigned short (16-bit) value in an integer + + + + + get an int value from a byte array + + the byte array + a starting offset into the byte array + the int (32-bit) value + + + + get an int value from the beginning of a byte array + + the byte array + the int (32-bit) value + + + + Gets the U int. + + the byte array + a starting offset into the byte array + the unsigned int (32-bit) value in a long + + + + Gets the U int. + + the byte array + the unsigned int (32-bit) value in a long + + + + get a long value from a byte array + + the byte array + a starting offset into the byte array + the long (64-bit) value + + + + get a double value from a byte array, reads it in little endian format + then converts the resulting revolting IEEE 754 (curse them) floating + point number to a c# double + + the byte array + a starting offset into the byte array + the double (64-bit) value + + + + Puts the short. + + the byte array + a starting offset into the byte array + The value. + + + + Added for consistency with other put~() methods + + the byte array + a starting offset into the byte array + The value. + + + + Puts the U short. + + the byte array + a starting offset into the byte array + The value. + + + + put a short value into beginning of a byte array + + the byte array + the short (16-bit) value + + + Put signed short into output stream + + @param value + the short (16-bit) value + @param outputStream + output stream + @throws IOException + if an I/O error occurs + + + + put an int value into a byte array + + the byte array + a starting offset into the byte array + the int (32-bit) value + + + + put an int value into beginning of a byte array + + the byte array + the int (32-bit) value + + + + Put int into output stream + + the int (32-bit) value + output stream + + + + put a long value into a byte array + + the byte array + a starting offset into the byte array + the long (64-bit) value + + + + put a double value into a byte array + + the byte array + a starting offset into the byte array + the double (64-bit) value + + + + Reads the short. + + The stream. + + + + + get an int value from an Stream + + the Stream from which the int is to be read + the int (32-bit) value + will be propagated back to the caller + if the stream cannot provide enough bytes + + + + get a long value from a Stream + + the Stream from which the long is to be read + the long (64-bit) value + will be propagated back to the caller + if the stream cannot provide enough bytes + + + + Us the byte to int. + + The b. + + + + + get the unsigned value of a byte. + + the byte array. + a starting offset into the byte array. + the unsigned value of the byte as a 32 bit integer + + + + Copy a portion of a byte array + + the original byte array + Where to start copying from. + Number of bytes to copy. + The byteArray value + + if copying would cause access ofdata outside array bounds. + + + + + Gets the unsigned byte. + + the byte array + + + + + Gets the unsigned byte. + + the byte array + a starting offset into the byte array + + + + + Puts the double. + + the byte array + The value. + + + put a double value into a byte array + + @param value + the double (64-bit) value + @param outputStream + output stream + @throws IOException + if an I/O error occurs + + + + Puts the uint. + + the byte array + The value. + + + Put unsigned int into output stream + + @param value + the int (32-bit) value + @param outputStream + output stream + @throws IOException + if an I/O error occurs + + + + Puts the uint. + + the byte array + a starting offset into the byte array + The value. + + + + Puts the long. + + the byte array + The value. + + + Put long into output stream + + @param value + the long (64-bit) value + @param outputStream + output stream + @throws IOException + if an I/O error occurs + + + + Puts the long. + + the byte array + The value. + + + + Puts the ulong. + + the byte array + a starting offset into the byte array + The value. + + + + Puts the number. + + the byte array + a starting offset into the byte array + The value. + The size. + + + + Puts the number. + + the byte array + a starting offset into the byte array + The value. + The size. + + + + Puts the short array. + + the byte array + a starting offset into the byte array + The value. + + + + Puts the U short. + + the byte array + The value. + + + Put unsigned short into output stream + + @param value + the unsigned short (16-bit) value + @param outputStream + output stream + @throws IOException + if an I/O error occurs + + + + Reads from stream. + + The stream. + The size. + + + + + Reads the long. + + The stream. + + + + + construct the with its offset into its containing byte array + + The offset. + + + + construct the LongField with its offset into its containing + byte array and initialize its value + + offset of the field within its byte array + the initial value + + + + Construct the class with its offset into its containing + byte array and initialize its value from its byte array + + The offset of the field within its byte array + the byte array to read the value from + + + + construct the class with its offset into its containing + byte array, initialize its value, and write the value to a byte + array + + offset of the field within its byte array + the initial value + the byte array to write the value to + + + + set the LongField's current value and write it to a byte array + + value to be set + the byte array to write the value to + + + + set the value from its offset into an array of bytes + + the byte array from which the value is to be read + + + + set the value from an Stream + + the Stream from which the value is to be + + + + write the value out to an array of bytes at the appropriate offset + + the array of bytes to which the value is to be written + + + + Same as using the constructor with the same + parameter list. Avoid creation of an useless object. + + offset of the field within its byte array + the initial value + the byte array to write the value to + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Getg or sets the LongField's current value + + The current value + + + This class provides common functionality for the + various LZW implementations in the different file + formats. + It's currently used by HDGF and HMEF. + + Two good resources on LZW are: + http://en.wikipedia.org/wiki/LZW + http://marknelson.us/1989/10/01/lzw-data-compression/ + + + Does the mask bit mean it's compressed or uncompressed? + + + How much to append to the code length in the stream + to Get the real code length? Normally 2 or 3 + + + Does the 12 bits of the position Get stored in + Little Endian or Big Endian form? + This controls whether a pos+length of 0x12 0x34 + becomes a position of 0x123 or 0x312 + + + Populates the dictionary, and returns where in it + to begin writing new codes. + Generally, if the dictionary is pre-populated, then new + codes should be placed at the end of that block. + Equally, if the dictionary is left with all zeros, then + usually the new codes can go in at the start. + + + Adjusts the position offset if needed when looking + something up in the dictionary. + + + Decompresses the given input stream, returning the array of bytes + of the decompressed input. + + + Perform a streaming decompression of the input. + Works by: + 1) Reading a flag byte, the 8 bits of which tell you if the + following 8 codes are compressed our un-compressed + 2) Consider the 8 bits in turn + 3) If the bit is Set, the next code is un-compressed, so + add it to the dictionary and output it + 4) If the bit isn't Set, then read in the length and start + position in the dictionary, and output the bytes there + 5) Loop until we've done all 8 bits, then read in the next + flag byte + + + Given an integer, turn it into a java byte, handling + the wrapping. + This is a convenience method + + + Given a java byte, turn it into an integer between 0 + and 255 (i.e. handle the unwrapping). + This is a convenience method + + + + A Logger class that strives to make it as easy as possible for + developers to write Log calls, while simultaneously making those + calls as cheap as possible by performing lazy evaluation of the Log + message. + @author Marc Johnson (mjohnson at apache dot org) + @author Glen Stampoultzis (glens at apache.org) + @author Nicola Ken Barozzi (nicolaken at apache.org) + + + + package scope so it cannot be instantiated outside of the util + package. You need a POILogger? Go to the POILogFactory for one + + + + Log a message + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 The object to Log. This is converted to a string. + + + Log a message + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 The object to Log. This is converted to a string. + @param exception An exception to be Logged + + + Check if a Logger is enabled to Log at the specified level + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first object to place in the message + @param obj2 second object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + @param obj4 fourth Object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + @param obj4 fourth Object to place in the message + @param obj5 fifth Object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + @param obj4 fourth Object to place in the message + @param obj5 fifth Object to place in the message + @param obj6 sixth Object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + @param obj4 fourth Object to place in the message + @param obj5 fifth Object to place in the message + @param obj6 sixth Object to place in the message + @param obj7 seventh Object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + @param obj4 fourth Object to place in the message + @param obj5 fifth Object to place in the message + @param obj6 sixth Object to place in the message + @param obj7 seventh Object to place in the message + @param obj8 eighth Object to place in the message + + + Log an exception, without a message + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param exception An error message to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param obj4 fourth object to place in the message + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param obj4 fourth object to place in the message + @param obj5 fifth object to place in the message + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param obj4 fourth object to place in the message + @param obj5 fifth object to place in the message + @param obj6 sixth object to place in the message + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param obj4 fourth object to place in the message + @param obj5 fifth object to place in the message + @param obj6 sixth object to place in the message + @param obj7 seventh object to place in the message + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param obj4 fourth object to place in the message + @param obj5 fifth object to place in the message + @param obj6 sixth object to place in the message + @param obj7 seventh object to place in the message + @param obj8 eighth object to place in the message + @param exception An exception to be Logged + + + Logs a formated message. The message itself may contain % + characters as place holders. This routine will attempt to match + the placeholder by looking at the type of parameter passed to + obj1. + + If the parameter is an array, it traverses the array first and + matches parameters sequentially against the array items. + Otherwise the parameters after message are matched + in order. + + If the place holder matches against a number it is printed as a + whole number. This can be overridden by specifying a precision + in the form %n.m where n is the padding for the whole part and + m is the number of decimal places to display. n can be excluded + if desired. n and m may not be more than 9. + + If the last parameter (after flattening) is a Exception it is + Logged specially. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param message The message to Log. + @param obj1 The first object to match against. + + + Logs a formated message. The message itself may contain % + characters as place holders. This routine will attempt to match + the placeholder by looking at the type of parameter passed to + obj1. + + If the parameter is an array, it traverses the array first and + matches parameters sequentially against the array items. + Otherwise the parameters after message are matched + in order. + + If the place holder matches against a number it is printed as a + whole number. This can be overridden by specifying a precision + in the form %n.m where n is the padding for the whole part and + m is the number of decimal places to display. n can be excluded + if desired. n and m may not be more than 9. + + If the last parameter (after flattening) is a Exception it is + Logged specially. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param message The message to Log. + @param obj1 The first object to match against. + @param obj2 The second object to match against. + + + Logs a formated message. The message itself may contain % + characters as place holders. This routine will attempt to match + the placeholder by looking at the type of parameter passed to + obj1. + + If the parameter is an array, it traverses the array first and + matches parameters sequentially against the array items. + Otherwise the parameters after message are matched + in order. + + If the place holder matches against a number it is printed as a + whole number. This can be overridden by specifying a precision + in the form %n.m where n is the padding for the whole part and + m is the number of decimal places to display. n can be excluded + if desired. n and m may not be more than 9. + + If the last parameter (after flattening) is a Exception it is + Logged specially. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param message The message to Log. + @param obj1 The first object to match against. + @param obj2 The second object to match against. + @param obj3 The third object to match against. + + + Logs a formated message. The message itself may contain % + characters as place holders. This routine will attempt to match + the placeholder by looking at the type of parameter passed to + obj1. + + If the parameter is an array, it traverses the array first and + matches parameters sequentially against the array items. + Otherwise the parameters after message are matched + in order. + + If the place holder matches against a number it is printed as a + whole number. This can be overridden by specifying a precision + in the form %n.m where n is the padding for the whole part and + m is the number of decimal places to display. n can be excluded + if desired. n and m may not be more than 9. + + If the last parameter (after flattening) is a Exception it is + Logged specially. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param message The message to Log. + @param obj1 The first object to match against. + @param obj2 The second object to match against. + @param obj3 The third object to match against. + @param obj4 The forth object to match against. + + + Flattens any contained objects. Only tranverses one level deep. + + + Log a message + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 The object to Log. + + + Check if a Logger is enabled to Log at the specified level + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first object to place in the message + @param obj2 second object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + @param obj4 fourth Object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + @param obj4 fourth Object to place in the message + @param obj5 fifth Object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + @param obj4 fourth Object to place in the message + @param obj5 fifth Object to place in the message + @param obj6 sixth Object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + @param obj4 fourth Object to place in the message + @param obj5 fifth Object to place in the message + @param obj6 sixth Object to place in the message + @param obj7 seventh Object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + @param obj4 fourth Object to place in the message + @param obj5 fifth Object to place in the message + @param obj6 sixth Object to place in the message + @param obj7 seventh Object to place in the message + @param obj8 eighth Object to place in the message + + + Log a message + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 The object to Log. This is converted to a string. + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param exception An error message to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param obj4 fourth object to place in the message + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param obj4 fourth object to place in the message + @param obj5 fifth object to place in the message + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param obj4 fourth object to place in the message + @param obj5 fifth object to place in the message + @param obj6 sixth object to place in the message + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param obj4 fourth object to place in the message + @param obj5 fifth object to place in the message + @param obj6 sixth object to place in the message + @param obj7 seventh object to place in the message + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param obj4 fourth object to place in the message + @param obj5 fifth object to place in the message + @param obj6 sixth object to place in the message + @param obj7 seventh object to place in the message + @param obj8 eighth object to place in the message + @param exception An exception to be Logged + + + Logs a formated message. The message itself may contain % + characters as place holders. This routine will attempt to match + the placeholder by looking at the type of parameter passed to + obj1. + + If the parameter is an array, it traverses the array first and + matches parameters sequentially against the array items. + Otherwise the parameters after message are matched + in order. + + If the place holder matches against a number it is printed as a + whole number. This can be overridden by specifying a precision + in the form %n.m where n is the padding for the whole part and + m is the number of decimal places to display. n can be excluded + if desired. n and m may not be more than 9. + + If the last parameter (after flattening) is a Exception it is + Logged specially. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param message The message to Log. + @param obj1 The first object to match against. + + + Logs a formated message. The message itself may contain % + characters as place holders. This routine will attempt to match + the placeholder by looking at the type of parameter passed to + obj1. + + If the parameter is an array, it traverses the array first and + matches parameters sequentially against the array items. + Otherwise the parameters after message are matched + in order. + + If the place holder matches against a number it is printed as a + whole number. This can be overridden by specifying a precision + in the form %n.m where n is the padding for the whole part and + m is the number of decimal places to display. n can be excluded + if desired. n and m may not be more than 9. + + If the last parameter (after flattening) is a Exception it is + Logged specially. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param message The message to Log. + @param obj1 The first object to match against. + @param obj2 The second object to match against. + + + Logs a formated message. The message itself may contain % + characters as place holders. This routine will attempt to match + the placeholder by looking at the type of parameter passed to + obj1. + + If the parameter is an array, it traverses the array first and + matches parameters sequentially against the array items. + Otherwise the parameters after message are matched + in order. + + If the place holder matches against a number it is printed as a + whole number. This can be overridden by specifying a precision + in the form %n.m where n is the padding for the whole part and + m is the number of decimal places to display. n can be excluded + if desired. n and m may not be more than 9. + + If the last parameter (after flattening) is a Exception it is + Logged specially. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param message The message to Log. + @param obj1 The first object to match against. + @param obj2 The second object to match against. + @param obj3 The third object to match against. + + + Logs a formated message. The message itself may contain % + characters as place holders. This routine will attempt to match + the placeholder by looking at the type of parameter passed to + obj1. + + If the parameter is an array, it traverses the array first and + matches parameters sequentially against the array items. + Otherwise the parameters after message are matched + in order. + + If the place holder matches against a number it is printed as a + whole number. This can be overridden by specifying a precision + in the form %n.m where n is the padding for the whole part and + m is the number of decimal places to display. n can be excluded + if desired. n and m may not be more than 9. + + If the last parameter (after flattening) is a Exception it is + Logged specially. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param message The message to Log. + @param obj1 The first object to match against. + @param obj2 The second object to match against. + @param obj3 The third object to match against. + @param obj4 The forth object to match against. + + + File header for PNG format. + + + Checks if the offset matches the PNG header. + + @param data the data to check. + @param offset the offset to check at. + @return {@code true} if the offset matches. + + + Map of POILogger instances, with classes as keys + + + A common instance of NullLogger, as it does nothing + we only need the one + + + The name of the class to use. Initialised the + first time we need it + + + + Initializes a new instance of the class. + + + + + Get a logger, based on a class name + + the class whose name defines the log + a POILogger for the specified class + + + + Get a logger, based on a String + + the String that defines the log + a POILogger for the specified class + + + + Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream. + + + The unsigned byte cast to an Int32, or -1 if at the end of the stream. + + + The stream does not support reading. + + + Methods were called after the stream was closed. + + + + + When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. + + An array of bytes. When this method returns, the buffer contains the specified byte array with the values between and ( + - 1) replaced by the bytes read from the current source. + The zero-based byte offset in at which to begin storing the data read from the current stream. + The maximum number of bytes to be read from the current stream. + + The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached. + + + The sum of and is larger than the buffer length. + + + is null. + + + or is negative. + + + An I/O error occurs. + + + The stream does not support reading. + + + Methods were called after the stream was closed. + + + + + Unreads the specified b. + + The b. + + + + Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. + + + + + When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device. + + + An I/O error occurs. + + + + + When overridden in a derived class, sets the position within the current stream. + + A byte offset relative to the parameter. + A value of type indicating the reference point used to obtain the new position. + + The new position within the current stream. + + + An I/O error occurs. + + + The stream does not support seeking, such as if the stream is constructed from a pipe or console output. + + + Methods were called after the stream was closed. + + + + + When overridden in a derived class, sets the length of the current stream. + + The desired length of the current stream in bytes. + + An I/O error occurs. + + + The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output. + + + Methods were called after the stream was closed. + + + + + When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + + An array of bytes. This method copies bytes from to the current stream. + The zero-based byte offset in at which to begin copying bytes to the current stream. + The number of bytes to be written to the current stream. + + The sum of and is greater than the buffer length. + + + is null. + + + or is negative. + + + An I/O error occurs. + + + The stream does not support writing. + + + Methods were called after the stream was closed. + + + + + Writes a byte to the current position in the stream and advances the position within the stream by one byte. + + The byte to write to the stream. + + An I/O error occurs. + + + The stream does not support writing, or the stream is already closed. + + + Methods were called after the stream was closed. + + + + + When overridden in a derived class, gets a value indicating whether the current stream supports reading. + + + true if the stream supports reading; otherwise, false. + + + + + When overridden in a derived class, gets a value indicating whether the current stream supports seeking. + + + true if the stream supports seeking; otherwise, false. + + + + + When overridden in a derived class, gets a value indicating whether the current stream supports writing. + + + true if the stream supports writing; otherwise, false. + + + + + When overridden in a derived class, gets the length in bytes of the stream. + + + + A long value representing the length of the stream in bytes. + + + A class derived from Stream does not support seeking. + + + Methods were called after the stream was closed. + + + + + When overridden in a derived class, gets or sets the position within the current stream. + + + + The current position within the stream. + + + An I/O error occurs. + + + The stream does not support seeking. + + + Methods were called after the stream was closed. + + + + + construct the ShortField with its offset into its containing + byte array + + offset of the field within its byte array + if offset is negative + + + + construct the ShortField with its offset into its containing byte array and initialize its value + + offset of the field within its byte array + the initial value + if offset is negative + + + + Construct the ShortField with its offset into its containing + byte array and initialize its value from its byte array + + offset of the field within its byte array + the byte array to read the value from + if the offset is not + within the range of 0..(data.length - 1) + + + + construct the ShortField with its offset into its containing + byte array, initialize its value, and write its value to its + byte array + + offset of the field within its byte array + the initial value + the byte array to write the value to + if offset is negative + + + + set the ShortField's current value and write it to a byte array + + value to be set + the byte array to write the value to + if the offset is out + of range + + + + set the value from its offset into an array of bytes + + the byte array from which the value is to be read + if the offset is out + of range + + + + set the value from an Stream + + the Stream from which the value is to be + read + if an IOException is thrown from reading + the Stream + if there is not enough data + available from the Stream + + + + write the value out to an array of bytes at the appropriate + offset + + the array of bytes to which the value is to be + written + if the offset is out + of range + + + + Same as using the constructor with the same + parameter list. Avoid creation of an useless object. + + offset of the field within its byte array + the initial value + the byte array to write the value to + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets or sets the value. + + The value. + + + + A List of short's; as full an implementation of the java.Util.List + interface as possible, with an eye toward minimal creation of + objects + + the mimicry of List is as follows: +
    +
  • if possible, operations designated 'optional' in the List + interface are attempted
  • +
  • wherever the List interface refers to an Object, substitute + short
  • +
  • wherever the List interface refers to a Collection or List, + substitute shortList
  • +
+ + the mimicry is not perfect, however: +
    +
  • operations involving Iterators or ListIterators are not + supported
  • +
  • Remove(Object) becomes RemoveValue to distinguish it from + Remove(short index)
  • +
  • subList is not supported
  • +
+
+
+ + + create an shortList of default size + + + + + create a copy of an existing shortList + + the existing shortList + + + + create an shortList with a predefined Initial size + + the size for the internal array + + + + add the specfied value at the specified index + + the index where the new value is to be Added + the new value + + + + Appends the specified element to the end of this list + + element to be Appended to this list. + return true (as per the general contract of the Collection.add method). + + + + Appends all of the elements in the specified collection to the + end of this list, in the order that they are returned by the + specified collection's iterator. The behavior of this + operation is unspecified if the specified collection is + modified while the operation is in progress. (Note that this + will occur if the specified collection is this list, and it's + nonempty.) + + collection whose elements are to be Added to this list. + return true if this list Changed as a result of the call. + + + + Inserts all of the elements in the specified collection into + this list at the specified position. Shifts the element + currently at that position (if any) and any subsequent elements + to the right (increases their indices). The new elements will + appear in this list in the order that they are returned by the + specified collection's iterator. The behavior of this + operation is unspecified if the specified collection is + modified while the operation is in progress. (Note that this + will occur if the specified collection is this list, and it's + nonempty.) + + index at which to insert first element from the specified collection. + elements to be inserted into this list. + return true if this list Changed as a result of the call. + if the index is out of range (index < 0 || index > size()) + + + + Removes all of the elements from this list. This list will be + empty After this call returns (unless it throws an exception). + + + + + Returns true if this list Contains the specified element. More + formally, returns true if and only if this list Contains at + least one element e such that o == e + + element whose presence in this list is to be Tested. + return true if this list Contains the specified element. + + + + Returns true if this list Contains all of the elements of the specified collection. + + collection to be Checked for Containment in this list. + return true if this list Contains all of the elements of the specified collection. + + + + Compares the specified object with this list for Equality. + Returns true if and only if the specified object is also a + list, both lists have the same size, and all corresponding + pairs of elements in the two lists are Equal. (Two elements e1 + and e2 are equal if e1 == e2.) In other words, two lists are + defined to be equal if they contain the same elements in the + same order. This defInition ensures that the Equals method + works properly across different implementations of the List + interface. + + the object to be Compared for Equality with this list. + return true if the specified object is equal to this list. + + + + Returns the element at the specified position in this list. + + index of element to return. + return the element at the specified position in this list. + + + + Returns the hash code value for this list. The hash code of a + list is defined to be the result of the following calculation: + + + hashCode = 1; + Iterator i = list.Iterator(); + while (i.HasNext()) { + Object obj = i.Next(); + hashCode = 31*hashCode + (obj==null ? 0 : obj.HashCode()); + } + + + This ensures that list1.Equals(list2) implies that + list1.HashCode()==list2.HashCode() for any two lists, list1 and + list2, as required by the general contract of Object.HashCode. + + return the hash code value for this list. + + + + Returns the index in this list of the first occurrence of the + specified element, or -1 if this list does not contain this + element. More formally, returns the lowest index i such that + (o == Get(i)), or -1 if there is no such index. + + element to search for. + the index in this list of the first occurrence of the + specified element, or -1 if this list does not contain + this element. + + + + + Returns true if this list Contains no elements. + + return true if this list Contains no elements. + + + + Returns the index in this list of the last occurrence of the + specified element, or -1 if this list does not contain this + element. More formally, returns the highest index i such that + (o == Get(i)), or -1 if there is no such index. + + element to search for. + return the index in this list of the last occurrence of the + specified element, or -1 if this list does not contain this element. + + + + Removes the element at the specified position in this list. + Shifts any subsequent elements to the left (subtracts one from + their indices). Returns the element that was Removed from the + list. + + the index of the element to Removed. + return the element previously at the specified position. + + + + Removes the first occurrence in this list of the specified + element (optional operation). If this list does not contain + the element, it is unChanged. More formally, Removes the + element with the lowest index i such that (o.Equals(get(i))) + (if such an element exists). + + element to be Removed from this list, if present. + return true if this list Contained the specified element. + + + + Removes from this list all the elements that are Contained in the specified collection + + collection that defines which elements will be removed from this list. + return true if this list Changed as a result of the call. + + + + Retains only the elements in this list that are Contained in + the specified collection. In other words, Removes from this + list all the elements that are not Contained in the specified + collection. + + collection that defines which elements this Set will retain. + return true if this list Changed as a result of the call. + + + + Replaces the element at the specified position in this list with the specified element + + index of element to Replace. + element to be stored at the specified position. + return the element previously at the specified position. + + + + Returns the number of elements in this list. If this list + Contains more than Int32.MaxValue elements, returns + Int32.MaxValue. + + return the number of elements in this shortList + + + + Returns an array Containing all of the elements in this list in + proper sequence. Obeys the general contract of the + Collection.ToArray method. + + an array Containing all of the elements in this list in + proper sequence. + + + + Returns an array Containing all of the elements in this list in + proper sequence. Obeys the general contract of the + Collection.ToArray(Object[]) method. + + the array into which the elements of this list are to + be stored, if it is big enough; otherwise, a new array + is allocated for this purpose. + return an array Containing the elements of this list. + + + + the number of elements in this shortList + + + + + Title: String Utility Description: Collection of string handling utilities + @author Andrew C. Oliver + @author Sergei Kozello (sergeikozello at mail.ru) + @author Toshiaki Kamoshida (kamoshida.toshiaki at future dot co dot jp) + @since May 10, 2002 + @version 1.0 + + + + Constructor for the StringUtil object + + + + Given a byte array of 16-bit unicode characters in Little Endian + Format (most important byte last), return a Java String representation + of it. + { 0x16, 0x00 } -0x16 + + the byte array to be converted + the initial offset into the + byte array. it is assumed that string[ offset ] and string[ offset + 1 ] contain the first 16-bit unicode character + the Length of the string + the converted string + + + + Given a byte array of 16-bit unicode characters in little endian + Format (most important byte last), return a Java String representation + of it. + { 0x16, 0x00 } -0x16 + + the byte array to be converted + the converted string + + + Convert String to 16-bit unicode characters in little endian format + + @param string the string + @return the byte array of 16-bit unicode characters + + + + Given a byte array of 16-bit unicode characters in big endian + Format (most important byte first), return a Java String representation + of it. + { 0x00, 0x16 } -0x16 + + the byte array to be converted + the initial offset into the + byte array. it is assumed that string[ offset ] and string[ offset + 1 ] contain the first 16-bit unicode character + the Length of the string + the converted string + + + + Given a byte array of 16-bit unicode characters in big endian + Format (most important byte first), return a Java String representation + of it. + { 0x00, 0x16 } -0x16 + + the byte array to be converted + the converted string + + + + Read 8 bit data (in IsO-8859-1 codepage) into a (unicode) Java + String and return. + (In Excel terms, read compressed 8 bit unicode as a string) + + byte array to read + offset to read byte array + Length to read byte array + generated String instance by reading byte array + + + + Takes a unicode (java) string, and returns it as 8 bit data (in IsO-8859-1 + codepage). + (In Excel terms, write compressed 8 bit unicode) + + the String containing the data to be written + the byte array to which the data Is to be written + an offset into the byte arrat at which the data Is start when written + + + + Takes a unicode string, and returns it as little endian (most + important byte last) bytes in the supplied byte array. + (In Excel terms, write uncompressed unicode) + + the String containing the unicode data to be written + the byte array to hold the uncompressed unicode, should be twice the Length of the String + the offset to start writing into the byte array + + + + Takes a unicode string, and returns it as big endian (most + important byte first) bytes in the supplied byte array. + (In Excel terms, write uncompressed unicode) + + the String containing the unicode data to be written + the byte array to hold the uncompressed unicode, should be twice the Length of the String. + the offset to start writing into the byte array + + + + Gets the preferred encoding. + + the encoding we want to use, currently hardcoded to IsO-8859-1 + + + + check the parameter Has multibyte character + + string to check + + true if Has at least one multibyte character; otherwise, false. + + + + InputStream in is expected to contain: +
    +
  1. ushort nChars
  2. +
  3. byte is16BitFlag
  4. +
  5. byte[]/char[] characterData
  6. +
+ For this encoding, the is16BitFlag is always present even if nChars==0. +
+ + InputStream in is expected to contain: +
    +
  1. byte is16BitFlag
  2. +
  3. byte[]/char[] characterData
  4. +
+ For this encoding, the is16BitFlag is always present even if nChars==0. +
+ This method should be used when the nChars field is not stored + as a ushort immediately before the is16BitFlag. Otherwise, {@link + #readUnicodeString(LittleEndianInput)} can be used. +
+ + OutputStream out will get: +
    +
  1. ushort nChars
  2. +
  3. byte is16BitFlag
  4. +
  5. byte[]/char[] characterData
  6. +
+ For this encoding, the is16BitFlag is always present even if nChars==0. +
+ + OutputStream out will get: +
    +
  1. byte is16BitFlag
  2. +
  3. byte[]/char[] characterData
  4. +
+ For this encoding, the is16BitFlag is always present even if nChars==0. +
+ This method should be used when the nChars field is not stored + as a ushort immediately before the is16BitFlag. Otherwise, {@link + #writeUnicodeString(LittleEndianOutput, String)} can be used. +
+ + + Gets the number of bytes that would be written by WriteUnicodeString(LittleEndianOutput, String) + + The value. + + + + + Checks to see if a given String needs to be represented as Unicode + + The value. + + true if string needs Unicode to be represented.; otherwise, false. + + Tony Qu change the logic + + + + Encodes non-US-ASCII characters in a string, good for encoding file names for download + http://www.acriticsreview.com/List.aspx?listid=42 + + + + + + + Encodes a non-US-ASCII character. + + + + + + + Encodes a non-US-ASCII character. + + + + + + + Encodes a non-US-ASCII character. + + + + + + + Encodes a non-US-ASCII character. + + + + + + + Determines if the character needs to be encoded. + http://www.acriticsreview.com/List.aspx?listid=42 + + + + + + Some strings may contain encoded characters of the unicode private use area. + Currently the characters of the symbol fonts are mapped to the corresponding + characters in the normal unicode range. + + @param string the original string + @return the string with mapped characters + + @see Private Use Area (symbol) + @see Symbol font - Unicode alternatives for Greek and special characters in HTML + + + The minimum value of a + + Unicode high-surrogate code unit + in the UTF-16 encoding, constant {@code '\u005CuD800'}. + A high-surrogate is also known as a leading-surrogate. + + @since 1.5 + + + The maximum value of a + + Unicode high-surrogate code unit + in the UTF-16 encoding, constant {@code '\u005CuDBFF'}. + A high-surrogate is also known as a leading-surrogate. + + @since 1.5 + + + The minimum value of a + + Unicode low-surrogate code unit + in the UTF-16 encoding, constant {@code '\u005CuDC00'}. + A low-surrogate is also known as a trailing-surrogate. + + @since 1.5 + + + The maximum value of a + + Unicode low-surrogate code unit + in the UTF-16 encoding, constant {@code '\u005CuDFFF'}. + A low-surrogate is also known as a trailing-surrogate. + + @since 1.5 + + + Converts the specified surrogate pair to its supplementary code + point value. This method does not validate the specified + surrogate pair. The caller must validate it using {@link + #isSurrogatePair(char, char) isSurrogatePair} if necessary. + + @param high the high-surrogate code unit + @param low the low-surrogate code unit + @return the supplementary code point composed from the + specified surrogate pair. + @since 1.5 + + + Determines the number of {@code char} values needed to + represent the specified character (Unicode code point). If the + specified character is equal to or greater than 0x10000, then + the method returns 2. Otherwise, the method returns 1. + + This method doesn't validate the specified character to be a + valid Unicode code point. The caller must validate the + character value using {@link #isValidCodePoint(int) isValidCodePoint} + if necessary. + + @param codePoint the character (Unicode code point) to be tested. + @return 2 if the character is a valid supplementary character; 1 otherwise. + @see Character#isSupplementaryCodePoint(int) + @since 1.5 + + + + A logger class that strives to make it as easy as possible for + developers to write log calls, while simultaneously making those + calls as cheap as possible by performing lazy Evaluation of the log + message. + + + @author Marc Johnson (mjohnson at apache dot org) + @author Glen Stampoultzis (glens at apache.org) + @author Nicola Ken Barozzi (nicolaken at apache.org) + + + + + Log a message + + One of DEBUG, INFO, WARN, ERROR, FATAL + The object to log. + + + + Log a message + + One of DEBUG, INFO, WARN, ERROR, FATAL + The object to log. This is Converted to a string. + An exception to be logged + + + + Check if a logger is enabled to log at the specified level + + One of DEBUG, INFO, WARN, ERROR, FATAL + + + + Creates a temporary file. Files are collected into one directory and by default are + deleted on exit from the VM. Files can be kept by defining the system property + poi.keep.tmp.files. + + Dont forget to close all files or it might not be possible to delete them. + + + + + + + + + construct the with its offset into its containing byte array + + The offset. + + + + construct the LongField with its offset into its containing + byte array and initialize its value + + offset of the field within its byte array + the initial value + + + + Construct the class with its offset into its containing + byte array and initialize its value from its byte array + + The offset of the field within its byte array + the byte array to read the value from + + + + construct the class with its offset into its containing + byte array, initialize its value, and write the value to a byte + array + + offset of the field within its byte array + the initial value + the byte array to write the value to + + + + set the LongField's current value and write it to a byte array + + value to be set + the byte array to write the value to + + + + set the value from its offset into an array of bytes + + the byte array from which the value is to be read + + + + set the value from an Stream + + the Stream from which the value is to be + + + + write the value out to an array of bytes at the appropriate offset + + the array of bytes to which the value is to be written + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Getg or sets the LongField's current value + + The current value + + + The enumeration value indicating the style of fill pattern being used for a cell format. + + + + No background + + + Solidly Filled + + + Small fine dots + + + Wide dots + + + Sparse dots + + + Thick horizontal bands + + + Thick vertical bands + + + Thick backward facing diagonals + + + Thick forward facing diagonals + + + Large spots + + + Brick-like layout + + + Thin horizontal bands + + + Thin vertical bands + + + Thin backward diagonal + + + Thin forward diagonal + + + Squares + + + Diamonds + + + Less Dots + + + Least Dots + + + @author Yegor Kozlov + + + Converts a value of type FixedPoint to a decimal number + + @param fixedPoint + @return decimal number + + @see [MS-OSHARED] - 2.2.1.6 FixedPoint + + + This class represents a run of text that share common properties. + + + @return The text of the Run, including any tabs/spaces/etc + + + This class represents a paragraph, made up of one or more + Runs of text. + +
+
diff --git a/北京北汽/SCP/DLL/Newtonsoft.Json.dll b/北京北汽/SCP/DLL/Newtonsoft.Json.dll new file mode 100644 index 0000000..77a5d89 Binary files /dev/null and b/北京北汽/SCP/DLL/Newtonsoft.Json.dll differ diff --git a/北京北汽/SCP/DLL/Newtonsoft.Json.xml b/北京北汽/SCP/DLL/Newtonsoft.Json.xml new file mode 100644 index 0000000..b386458 --- /dev/null +++ b/北京北汽/SCP/DLL/Newtonsoft.Json.xml @@ -0,0 +1,10760 @@ + + + + Newtonsoft.Json + + + + + Represents a BSON Oid (object id). + + + + + Gets or sets the value of the Oid. + + The value of the Oid. + + + + Initializes a new instance of the class. + + The Oid value. + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized BSON data. + + + + + Gets or sets a value indicating whether binary data reading should be compatible with incorrect Json.NET 3.5 written binary. + + + true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false. + + + + + Gets or sets a value indicating whether the root object will be read as a JSON array. + + + true if the root object will be read as a JSON array; otherwise, false. + + + + + Gets or sets the used when reading values from BSON. + + The used when reading values from BSON. + + + + Initializes a new instance of the class. + + The containing the BSON data to read. + + + + Initializes a new instance of the class. + + The containing the BSON data to read. + + + + Initializes a new instance of the class. + + The containing the BSON data to read. + if set to true the root object will be read as a JSON array. + The used when reading values from BSON. + + + + Initializes a new instance of the class. + + The containing the BSON data to read. + if set to true the root object will be read as a JSON array. + The used when reading values from BSON. + + + + Reads the next JSON token from the underlying . + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Changes the reader's state to . + If is set to true, the underlying is also closed. + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating BSON data. + + + + + Gets or sets the used when writing values to BSON. + When set to no conversion will occur. + + The used when writing values to BSON. + + + + Initializes a new instance of the class. + + The to write to. + + + + Initializes a new instance of the class. + + The to write to. + + + + Flushes whatever is in the buffer to the underlying and also flushes the underlying stream. + + + + + Writes the end. + + The token. + + + + Writes a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes raw JSON where a value is expected and updates the writer's state. + + The raw JSON to write. + + + + Writes the beginning of a JSON array. + + + + + Writes the beginning of a JSON object. + + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Closes this writer. + If is set to true, the underlying is also closed. + If is set to true, the JSON is auto-completed. + + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value that represents a BSON object id. + + The Object ID value to write. + + + + Writes a BSON regex. + + The regex pattern. + The regex options. + + + + Specifies how constructors are used when initializing objects during deserialization by the . + + + + + First attempt to use the public default constructor, then fall back to a single parameterized constructor, then to the non-public default constructor. + + + + + Json.NET will use a non-public default constructor before falling back to a parameterized constructor. + + + + + Converts a binary value to and from a base 64 string value. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a to and from JSON and BSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Creates a custom object. + + The object type to convert. + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Creates an object which will then be populated by the serializer. + + Type of the object. + The created object. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Gets a value indicating whether this can write JSON. + + + true if this can write JSON; otherwise, false. + + + + + Converts a to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified value type. + + Type of the value. + + true if this instance can convert the specified value type; otherwise, false. + + + + + Converts a to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified value type. + + Type of the value. + + true if this instance can convert the specified value type; otherwise, false. + + + + + Provides a base class for converting a to and from JSON. + + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a F# discriminated union type to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts an Entity Framework to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts an to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Gets a value indicating whether this can write JSON. + + + true if this can write JSON; otherwise, false. + + + + + Converts a to and from the ISO 8601 date format (e.g. "2008-04-12T12:53Z"). + + + + + Gets or sets the date time styles used when converting a date to and from JSON. + + The date time styles used when converting a date to and from JSON. + + + + Gets or sets the date time format used when converting a date to and from JSON. + + The date time format used when converting a date to and from JSON. + + + + Gets or sets the culture used when converting a date to and from JSON. + + The culture used when converting a date to and from JSON. + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Converts a to and from a JavaScript Date constructor (e.g. new Date(52231943)). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing property value of the JSON that is being converted. + The calling serializer. + The object value. + + + + Converts a to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a to and from JSON and BSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts an to and from its name string value. + + + + + Gets or sets a value indicating whether the written enum text should be camel case. + + true if the written enum text will be camel case; otherwise, false. + + + + Gets or sets a value indicating whether integer values are allowed when deserializing. + + true if integers are allowed when deserializing; otherwise, false. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + true if the written enum text will be camel case; otherwise, false. + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a to and from a string (e.g. "1.2.3.4"). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing property value of the JSON that is being converted. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts XML to and from JSON. + + + + + Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produced multiple root elements. + + The name of the deserialized root element. + + + + Gets or sets a flag to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + true if the array attribute is written to the XML; otherwise, false. + + + + Gets or sets a value indicating whether to write the root JSON object. + + true if the JSON root object is omitted; otherwise, false. + + + + Writes the JSON representation of the object. + + The to write to. + The calling serializer. + The value. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Checks if the is a namespace attribute. + + Attribute name to test. + The attribute name prefix if it has one, otherwise an empty string. + true if attribute name is for a namespace attribute, otherwise false. + + + + Determines whether this instance can convert the specified value type. + + Type of the value. + + true if this instance can convert the specified value type; otherwise, false. + + + + + Specifies how dates are formatted when writing JSON text. + + + + + Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z". + + + + + Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/". + + + + + Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text. + + + + + Date formatted strings are not parsed to a date type and are read as strings. + + + + + Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . + + + + + Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . + + + + + Specifies how to treat the time value when converting between string and . + + + + + Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time. + + + + + Treat as a UTC. If the object represents a local time, it is converted to a UTC. + + + + + Treat as a local time if a is being converted to a string. + If a string is being converted to , convert to a local time if a time zone is specified. + + + + + Time zone information should be preserved when converting. + + + + + Specifies default value handling options for the . + + + + + + + + + Include members where the member value is the same as the member's default value when serializing objects. + Included members are written to JSON. Has no effect when deserializing. + + + + + Ignore members where the member value is the same as the member's default value when serializing objects + so that it is not written to JSON. + This option will ignore all default values (e.g. null for objects and nullable types; 0 for integers, + decimals and floating point numbers; and false for booleans). The default value ignored can be changed by + placing the on the property. + + + + + Members with a default value but no JSON will be set to their default value when deserializing. + + + + + Ignore members where the member value is the same as the member's default value when serializing objects + and set members to their default value when deserializing. + + + + + Specifies float format handling options when writing special floating point numbers, e.g. , + and with . + + + + + Write special floating point values as strings in JSON, e.g. "NaN", "Infinity", "-Infinity". + + + + + Write special floating point values as symbols in JSON, e.g. NaN, Infinity, -Infinity. + Note that this will produce non-valid JSON. + + + + + Write special floating point values as the property's default value in JSON, e.g. 0.0 for a property, null for a of property. + + + + + Specifies how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Floating point numbers are parsed to . + + + + + Floating point numbers are parsed to . + + + + + Specifies formatting options for the . + + + + + No special formatting is applied. This is the default. + + + + + Causes child objects to be indented according to the and settings. + + + + + Provides an interface for using pooled arrays. + + The array type content. + + + + Rent an array from the pool. This array must be returned when it is no longer needed. + + The minimum required length of the array. The returned array may be longer. + The rented array from the pool. This array must be returned when it is no longer needed. + + + + Return an array to the pool. + + The array that is being returned. + + + + Provides an interface to enable a class to return line and position information. + + + + + Gets a value indicating whether the class can return line information. + + + true if and can be provided; otherwise, false. + + + + + Gets the current line number. + + The current line number or 0 if no line information is available (for example, when returns false). + + + + Gets the current line position. + + The current line position or 0 if no line information is available (for example, when returns false). + + + + Instructs the how to serialize the collection. + + + + + Gets or sets a value indicating whether null items are allowed in the collection. + + true if null items are allowed in the collection; otherwise, false. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with a flag indicating whether the array can contain null items. + + A flag indicating whether the array can contain null items. + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Instructs the to use the specified constructor when deserializing that object. + + + + + Instructs the how to serialize the object. + + + + + Gets or sets the id. + + The id. + + + + Gets or sets the title. + + The title. + + + + Gets or sets the description. + + The description. + + + + Gets or sets the collection's items converter. + + The collection's items converter. + + + + The parameter list to use when constructing the described by . + If null, the default constructor is used. + When non-null, there must be a constructor defined in the that exactly matches the number, + order, and type of these parameters. + + + + [JsonContainer(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })] + + + + + + Gets or sets the of the . + + The of the . + + + + The parameter list to use when constructing the described by . + If null, the default constructor is used. + When non-null, there must be a constructor defined in the that exactly matches the number, + order, and type of these parameters. + + + + [JsonContainer(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })] + + + + + + Gets or sets a value that indicates whether to preserve object references. + + + true to keep object reference; otherwise, false. The default is false. + + + + + Gets or sets a value that indicates whether to preserve collection's items references. + + + true to keep collection's items object references; otherwise, false. The default is false. + + + + + Gets or sets the reference loop handling used when serializing the collection's items. + + The reference loop handling. + + + + Gets or sets the type name handling used when serializing the collection's items. + + The type name handling. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Provides methods for converting between .NET types and JSON types. + + + + + + + + Gets or sets a function that creates default . + Default settings are automatically used by serialization methods on , + and and on . + To serialize without using any default settings create a with + . + + + + + Represents JavaScript's boolean value true as a string. This field is read-only. + + + + + Represents JavaScript's boolean value false as a string. This field is read-only. + + + + + Represents JavaScript's null as a string. This field is read-only. + + + + + Represents JavaScript's undefined as a string. This field is read-only. + + + + + Represents JavaScript's positive infinity as a string. This field is read-only. + + + + + Represents JavaScript's negative infinity as a string. This field is read-only. + + + + + Represents JavaScript's NaN as a string. This field is read-only. + + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation using the specified. + + The value to convert. + The format the date will be converted to. + The time zone handling when the date is converted to a string. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation using the specified. + + The value to convert. + The format the date will be converted to. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + The string delimiter character. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + The string delimiter character. + The string escape handling. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Serializes the specified object to a JSON string. + + The object to serialize. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using formatting. + + The object to serialize. + Indicates how the output should be formatted. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a collection of . + + The object to serialize. + A collection of converters used while serializing. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using formatting and a collection of . + + The object to serialize. + Indicates how the output should be formatted. + A collection of converters used while serializing. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using . + + The object to serialize. + The used to serialize the object. + If this is null, default serialization settings will be used. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a type, formatting and . + + The object to serialize. + The used to serialize the object. + If this is null, default serialization settings will be used. + + The type of the value being serialized. + This parameter is used when is to write out the type name if the type of the value does not match. + Specifying the type is optional. + + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using formatting and . + + The object to serialize. + Indicates how the output should be formatted. + The used to serialize the object. + If this is null, default serialization settings will be used. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a type, formatting and . + + The object to serialize. + Indicates how the output should be formatted. + The used to serialize the object. + If this is null, default serialization settings will be used. + + The type of the value being serialized. + This parameter is used when is to write out the type name if the type of the value does not match. + Specifying the type is optional. + + + A JSON string representation of the object. + + + + + Deserializes the JSON to a .NET object. + + The JSON to deserialize. + The deserialized object from the JSON string. + + + + Deserializes the JSON to a .NET object using . + + The JSON to deserialize. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type. + + The JSON to deserialize. + The of object being deserialized. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type. + + The type of the object to deserialize to. + The JSON to deserialize. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the given anonymous type. + + + The anonymous type to deserialize to. This can't be specified + traditionally and must be inferred from the anonymous type passed + as a parameter. + + The JSON to deserialize. + The anonymous type object. + The deserialized anonymous type from the JSON string. + + + + Deserializes the JSON to the given anonymous type using . + + + The anonymous type to deserialize to. This can't be specified + traditionally and must be inferred from the anonymous type passed + as a parameter. + + The JSON to deserialize. + The anonymous type object. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized anonymous type from the JSON string. + + + + Deserializes the JSON to the specified .NET type using a collection of . + + The type of the object to deserialize to. + The JSON to deserialize. + Converters to use while deserializing. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type using . + + The type of the object to deserialize to. + The object to deserialize. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type using a collection of . + + The JSON to deserialize. + The type of the object to deserialize. + Converters to use while deserializing. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type using . + + The JSON to deserialize. + The type of the object to deserialize to. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized object from the JSON string. + + + + Populates the object with values from the JSON string. + + The JSON to populate values from. + The target object to populate values onto. + + + + Populates the object with values from the JSON string using . + + The JSON to populate values from. + The target object to populate values onto. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + + + + Serializes the to a JSON string. + + The node to serialize. + A JSON string of the . + + + + Serializes the to a JSON string using formatting. + + The node to serialize. + Indicates how the output should be formatted. + A JSON string of the . + + + + Serializes the to a JSON string using formatting and omits the root object if is true. + + The node to serialize. + Indicates how the output should be formatted. + Omits writing the root object. + A JSON string of the . + + + + Deserializes the from a JSON string. + + The JSON string. + The deserialized . + + + + Deserializes the from a JSON string nested in a root element specified by . + + The JSON string. + The name of the root element to append when deserializing. + The deserialized . + + + + Deserializes the from a JSON string nested in a root element specified by + and writes a Json.NET array attribute for collections. + + The JSON string. + The name of the root element to append when deserializing. + + A flag to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + The deserialized . + + + + Serializes the to a JSON string. + + The node to convert to JSON. + A JSON string of the . + + + + Serializes the to a JSON string using formatting. + + The node to convert to JSON. + Indicates how the output should be formatted. + A JSON string of the . + + + + Serializes the to a JSON string using formatting and omits the root object if is true. + + The node to serialize. + Indicates how the output should be formatted. + Omits writing the root object. + A JSON string of the . + + + + Deserializes the from a JSON string. + + The JSON string. + The deserialized . + + + + Deserializes the from a JSON string nested in a root element specified by . + + The JSON string. + The name of the root element to append when deserializing. + The deserialized . + + + + Deserializes the from a JSON string nested in a root element specified by + and writes a Json.NET array attribute for collections. + + The JSON string. + The name of the root element to append when deserializing. + + A flag to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + The deserialized . + + + + Converts an object to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Gets a value indicating whether this can read JSON. + + true if this can read JSON; otherwise, false. + + + + Gets a value indicating whether this can write JSON. + + true if this can write JSON; otherwise, false. + + + + Instructs the to use the specified when serializing the member or class. + + + + + Gets the of the . + + The of the . + + + + The parameter list to use when constructing the described by . + If null, the default constructor is used. + + + + + Initializes a new instance of the class. + + Type of the . + + + + Initializes a new instance of the class. + + Type of the . + Parameter list to use when constructing the . Can be null. + + + + Represents a collection of . + + + + + Instructs the how to serialize the collection. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + The exception thrown when an error occurs during JSON serialization or deserialization. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or null if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Instructs the to deserialize properties with no matching class member into the specified collection + and write values during serialization. + + + + + Gets or sets a value that indicates whether to write extension data when serializing the object. + + + true to write extension data when serializing the object; otherwise, false. The default is true. + + + + + Gets or sets a value that indicates whether to read extension data when deserializing the object. + + + true to read extension data when deserializing the object; otherwise, false. The default is true. + + + + + Initializes a new instance of the class. + + + + + Instructs the not to serialize the public field or public read/write property value. + + + + + Instructs the how to serialize the object. + + + + + Gets or sets the member serialization. + + The member serialization. + + + + Gets or sets a value that indicates whether the object's properties are required. + + + A value indicating whether the object's properties are required. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified member serialization. + + The member serialization. + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Instructs the to always serialize the member with the specified name. + + + + + Gets or sets the used when serializing the property's collection items. + + The collection's items . + + + + The parameter list to use when constructing the described by . + If null, the default constructor is used. + When non-null, there must be a constructor defined in the that exactly matches the number, + order, and type of these parameters. + + + + [JsonProperty(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })] + + + + + + Gets or sets the of the . + + The of the . + + + + The parameter list to use when constructing the described by . + If null, the default constructor is used. + When non-null, there must be a constructor defined in the that exactly matches the number, + order, and type of these parameters. + + + + [JsonProperty(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })] + + + + + + Gets or sets the null value handling used when serializing this property. + + The null value handling. + + + + Gets or sets the default value handling used when serializing this property. + + The default value handling. + + + + Gets or sets the reference loop handling used when serializing this property. + + The reference loop handling. + + + + Gets or sets the object creation handling used when deserializing this property. + + The object creation handling. + + + + Gets or sets the type name handling used when serializing this property. + + The type name handling. + + + + Gets or sets whether this property's value is serialized as a reference. + + Whether this property's value is serialized as a reference. + + + + Gets or sets the order of serialization of a member. + + The numeric order of serialization. + + + + Gets or sets a value indicating whether this property is required. + + + A value indicating whether this property is required. + + + + + Gets or sets the name of the property. + + The name of the property. + + + + Gets or sets the reference loop handling used when serializing the property's collection items. + + The collection's items reference loop handling. + + + + Gets or sets the type name handling used when serializing the property's collection items. + + The collection's items type name handling. + + + + Gets or sets whether this property's collection items are serialized as a reference. + + Whether this property's collection items are serialized as a reference. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified name. + + Name of the property. + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. + + + + + Asynchronously reads the next JSON token from the source. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous read. The + property returns true if the next token was read successfully; false if there are no more tokens to read. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously skips the children of the current token. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously reads the next JSON token from the source as a of . + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous read. The + property returns the of . This result will be null at the end of an array. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously reads the next JSON token from the source as a []. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous read. The + property returns the []. This result will be null at the end of an array. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously reads the next JSON token from the source as a of . + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous read. The + property returns the of . This result will be null at the end of an array. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously reads the next JSON token from the source as a of . + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous read. The + property returns the of . This result will be null at the end of an array. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously reads the next JSON token from the source as a of . + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous read. The + property returns the of . This result will be null at the end of an array. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously reads the next JSON token from the source as a of . + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous read. The + property returns the of . This result will be null at the end of an array. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously reads the next JSON token from the source as a of . + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous read. The + property returns the of . This result will be null at the end of an array. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously reads the next JSON token from the source as a . + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous read. The + property returns the . This result will be null at the end of an array. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Specifies the state of the reader. + + + + + A read method has not been called. + + + + + The end of the file has been reached successfully. + + + + + Reader is at a property. + + + + + Reader is at the start of an object. + + + + + Reader is in an object. + + + + + Reader is at the start of an array. + + + + + Reader is in an array. + + + + + The method has been called. + + + + + Reader has just read a value. + + + + + Reader is at the start of a constructor. + + + + + Reader is in a constructor. + + + + + An error occurred that prevents the read operation from continuing. + + + + + The end of the file has been reached successfully. + + + + + Gets the current reader state. + + The current reader state. + + + + Gets or sets a value indicating whether the source should be closed when this reader is closed. + + + true to close the source when this reader is closed; otherwise false. The default is true. + + + + + Gets or sets a value indicating whether multiple pieces of JSON content can + be read from a continuous stream without erroring. + + + true to support reading multiple pieces of JSON content; otherwise false. + The default is false. + + + + + Gets the quotation mark character used to enclose the value of a string. + + + + + Gets or sets how time zones are handled when reading JSON. + + + + + Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Gets or sets how custom date formatted strings are parsed when reading JSON. + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Gets the type of the current JSON token. + + + + + Gets the text value of the current JSON token. + + + + + Gets the .NET type for the current JSON token. + + + + + Gets the depth of the current token in the JSON document. + + The depth of the current token in the JSON document. + + + + Gets the path of the current JSON token. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Initializes a new instance of the class. + + + + + Reads the next JSON token from the source. + + true if the next token was read successfully; false if there are no more tokens to read. + + + + Reads the next JSON token from the source as a of . + + A of . This method will return null at the end of an array. + + + + Reads the next JSON token from the source as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the source as a []. + + A [] or null if the next JSON token is null. This method will return null at the end of an array. + + + + Reads the next JSON token from the source as a of . + + A of . This method will return null at the end of an array. + + + + Reads the next JSON token from the source as a of . + + A of . This method will return null at the end of an array. + + + + Reads the next JSON token from the source as a of . + + A of . This method will return null at the end of an array. + + + + Reads the next JSON token from the source as a of . + + A of . This method will return null at the end of an array. + + + + Reads the next JSON token from the source as a of . + + A of . This method will return null at the end of an array. + + + + Skips the children of the current token. + + + + + Sets the current token. + + The new token. + + + + Sets the current token and value. + + The new token. + The value. + + + + Sets the current token and value. + + The new token. + The value. + A flag indicating whether the position index inside an array should be updated. + + + + Sets the state based on current token type. + + + + + Releases unmanaged and - optionally - managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Changes the reader's state to . + If is set to true, the source is also closed. + + + + + The exception thrown when an error occurs while reading JSON text. + + + + + Gets the line number indicating where the error occurred. + + The line number indicating where the error occurred. + + + + Gets the line position indicating where the error occurred. + + The line position indicating where the error occurred. + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or null if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Initializes a new instance of the class + with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The path to the JSON where the error occurred. + The line number indicating where the error occurred. + The line position indicating where the error occurred. + The exception that is the cause of the current exception, or null if no inner exception is specified. + + + + Instructs the to always serialize the member, and to require that the member has a value. + + + + + The exception thrown when an error occurs during JSON serialization or deserialization. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or null if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Serializes and deserializes objects into and from the JSON format. + The enables you to control how objects are encoded into JSON. + + + + + Occurs when the errors during serialization and deserialization. + + + + + Gets or sets the used by the serializer when resolving references. + + + + + Gets or sets the used by the serializer when resolving type names. + + + + + Gets or sets the used by the serializer when resolving type names. + + + + + Gets or sets the used by the serializer when writing trace messages. + + The trace writer. + + + + Gets or sets the equality comparer used by the serializer when comparing references. + + The equality comparer. + + + + Gets or sets how type name writing and reading is handled by the serializer. + + + should be used with caution when your application deserializes JSON from an external source. + Incoming types should be validated with a custom + when deserializing with a value other than . + + + + + Gets or sets how a type name assembly is written and resolved by the serializer. + + The type name assembly format. + + + + Gets or sets how a type name assembly is written and resolved by the serializer. + + The type name assembly format. + + + + Gets or sets how object references are preserved by the serializer. + + + + + Gets or sets how reference loops (e.g. a class referencing itself) is handled. + + + + + Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. + + + + + Gets or sets how null values are handled during serialization and deserialization. + + + + + Gets or sets how default values are handled during serialization and deserialization. + + + + + Gets or sets how objects are created during deserialization. + + The object creation handling. + + + + Gets or sets how constructors are used during deserialization. + + The constructor handling. + + + + Gets or sets how metadata properties are used during deserialization. + + The metadata properties handling. + + + + Gets a collection that will be used during serialization. + + Collection that will be used during serialization. + + + + Gets or sets the contract resolver used by the serializer when + serializing .NET objects to JSON and vice versa. + + + + + Gets or sets the used by the serializer when invoking serialization callback methods. + + The context. + + + + Indicates how JSON text output is formatted. + + + + + Gets or sets how dates are written to JSON text. + + + + + Gets or sets how time zones are handled during serialization and deserialization. + + + + + Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Gets or sets how special floating point numbers, e.g. , + and , + are written as JSON text. + + + + + Gets or sets how strings are escaped when writing JSON text. + + + + + Gets or sets how and values are formatted when writing JSON text, + and the expected date format when reading JSON text. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Gets a value indicating whether there will be a check for additional JSON content after deserializing an object. + + + true if there will be a check for additional JSON content after deserializing an object; otherwise, false. + + + + + Initializes a new instance of the class. + + + + + Creates a new instance. + The will not use default settings + from . + + + A new instance. + The will not use default settings + from . + + + + + Creates a new instance using the specified . + The will not use default settings + from . + + The settings to be applied to the . + + A new instance using the specified . + The will not use default settings + from . + + + + + Creates a new instance. + The will use default settings + from . + + + A new instance. + The will use default settings + from . + + + + + Creates a new instance using the specified . + The will use default settings + from as well as the specified . + + The settings to be applied to the . + + A new instance using the specified . + The will use default settings + from as well as the specified . + + + + + Populates the JSON values onto the target object. + + The that contains the JSON structure to reader values from. + The target object to populate values onto. + + + + Populates the JSON values onto the target object. + + The that contains the JSON structure to reader values from. + The target object to populate values onto. + + + + Deserializes the JSON structure contained by the specified . + + The that contains the JSON structure to deserialize. + The being deserialized. + + + + Deserializes the JSON structure contained by the specified + into an instance of the specified type. + + The containing the object. + The of object being deserialized. + The instance of being deserialized. + + + + Deserializes the JSON structure contained by the specified + into an instance of the specified type. + + The containing the object. + The type of the object to deserialize. + The instance of being deserialized. + + + + Deserializes the JSON structure contained by the specified + into an instance of the specified type. + + The containing the object. + The of object being deserialized. + The instance of being deserialized. + + + + Serializes the specified and writes the JSON structure + using the specified . + + The used to write the JSON structure. + The to serialize. + + + + Serializes the specified and writes the JSON structure + using the specified . + + The used to write the JSON structure. + The to serialize. + + The type of the value being serialized. + This parameter is used when is to write out the type name if the type of the value does not match. + Specifying the type is optional. + + + + + Serializes the specified and writes the JSON structure + using the specified . + + The used to write the JSON structure. + The to serialize. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifying the type is optional. + + + + + Serializes the specified and writes the JSON structure + using the specified . + + The used to write the JSON structure. + The to serialize. + + + + Specifies the settings on a object. + + + + + Gets or sets how reference loops (e.g. a class referencing itself) are handled. + + Reference loop handling. + + + + Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. + + Missing member handling. + + + + Gets or sets how objects are created during deserialization. + + The object creation handling. + + + + Gets or sets how null values are handled during serialization and deserialization. + + Null value handling. + + + + Gets or sets how default values are handled during serialization and deserialization. + + The default value handling. + + + + Gets or sets a collection that will be used during serialization. + + The converters. + + + + Gets or sets how object references are preserved by the serializer. + + The preserve references handling. + + + + Gets or sets how type name writing and reading is handled by the serializer. + + + should be used with caution when your application deserializes JSON from an external source. + Incoming types should be validated with a custom + when deserializing with a value other than . + + The type name handling. + + + + Gets or sets how metadata properties are used during deserialization. + + The metadata properties handling. + + + + Gets or sets how a type name assembly is written and resolved by the serializer. + + The type name assembly format. + + + + Gets or sets how a type name assembly is written and resolved by the serializer. + + The type name assembly format. + + + + Gets or sets how constructors are used during deserialization. + + The constructor handling. + + + + Gets or sets the contract resolver used by the serializer when + serializing .NET objects to JSON and vice versa. + + The contract resolver. + + + + Gets or sets the equality comparer used by the serializer when comparing references. + + The equality comparer. + + + + Gets or sets the used by the serializer when resolving references. + + The reference resolver. + + + + Gets or sets a function that creates the used by the serializer when resolving references. + + A function that creates the used by the serializer when resolving references. + + + + Gets or sets the used by the serializer when writing trace messages. + + The trace writer. + + + + Gets or sets the used by the serializer when resolving type names. + + The binder. + + + + Gets or sets the used by the serializer when resolving type names. + + The binder. + + + + Gets or sets the error handler called during serialization and deserialization. + + The error handler called during serialization and deserialization. + + + + Gets or sets the used by the serializer when invoking serialization callback methods. + + The context. + + + + Gets or sets how and values are formatted when writing JSON text, + and the expected date format when reading JSON text. + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Indicates how JSON text output is formatted. + + + + + Gets or sets how dates are written to JSON text. + + + + + Gets or sets how time zones are handled during serialization and deserialization. + + + + + Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Gets or sets how special floating point numbers, e.g. , + and , + are written as JSON. + + + + + Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Gets or sets how strings are escaped when writing JSON text. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Gets a value indicating whether there will be a check for additional content after deserializing an object. + + + true if there will be a check for additional content after deserializing an object; otherwise, false. + + + + + Initializes a new instance of the class. + + + + + Represents a reader that provides fast, non-cached, forward-only access to JSON text data. + + + + + Asynchronously reads the next JSON token from the source. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous read. The + property returns true if the next token was read successfully; false if there are no more tokens to read. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously reads the next JSON token from the source as a of . + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous read. The + property returns the of . This result will be null at the end of an array. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously reads the next JSON token from the source as a []. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous read. The + property returns the []. This result will be null at the end of an array. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously reads the next JSON token from the source as a of . + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous read. The + property returns the of . This result will be null at the end of an array. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously reads the next JSON token from the source as a of . + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous read. The + property returns the of . This result will be null at the end of an array. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously reads the next JSON token from the source as a of . + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous read. The + property returns the of . This result will be null at the end of an array. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously reads the next JSON token from the source as a of . + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous read. The + property returns the of . This result will be null at the end of an array. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously reads the next JSON token from the source as a of . + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous read. The + property returns the of . This result will be null at the end of an array. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously reads the next JSON token from the source as a . + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous read. The + property returns the . This result will be null at the end of an array. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Initializes a new instance of the class with the specified . + + The containing the JSON data to read. + + + + Gets or sets the reader's character buffer pool. + + + + + Reads the next JSON token from the underlying . + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Reads the next JSON token from the underlying as a of . + + A of . This method will return null at the end of an array. + + + + Reads the next JSON token from the underlying as a of . + + A of . This method will return null at the end of an array. + + + + Reads the next JSON token from the underlying as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the underlying as a []. + + A [] or null if the next JSON token is null. This method will return null at the end of an array. + + + + Reads the next JSON token from the underlying as a of . + + A of . This method will return null at the end of an array. + + + + Reads the next JSON token from the underlying as a of . + + A of . This method will return null at the end of an array. + + + + Reads the next JSON token from the underlying as a of . + + A of . This method will return null at the end of an array. + + + + Reads the next JSON token from the underlying as a of . + + A of . This method will return null at the end of an array. + + + + Changes the reader's state to . + If is set to true, the underlying is also closed. + + + + + Gets a value indicating whether the class can return line information. + + + true if and can be provided; otherwise, false. + + + + + Gets the current line number. + + + The current line number or 0 if no line information is available (for example, returns false). + + + + + Gets the current line position. + + + The current line position or 0 if no line information is available (for example, returns false). + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Asynchronously flushes whatever is in the buffer to the destination and also flushes the destination. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes the JSON value delimiter. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes the specified end token. + + The end token to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously closes this writer. + If is set to true, the destination is also closed. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes the end of the current JSON object or array. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes indent characters. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes an indent space. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes raw JSON without changing the writer's state. + + The raw JSON to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a null value. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes the property name of a name/value pair of a JSON object. + + The name of the property. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes the property name of a name/value pair of a JSON object. + + The name of the property. + A flag to indicate whether the text should be escaped when it is written as a JSON property name. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes the beginning of a JSON array. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes the beginning of a JSON object. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes the start of a constructor with the given name. + + The name of the constructor. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes an undefined value. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes the given white space. + + The string of white space characters. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a [] value. + + The [] value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes a comment /*...*/ containing the specified text. + + Text to place inside the comment. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes the end of an array. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes the end of a constructor. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes the end of a JSON object. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Asynchronously writes raw JSON where a value is expected and updates the writer's state. + + The raw JSON to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + Derived classes must override this method to get asynchronous behaviour. Otherwise it will + execute synchronously, returning an already-completed task. + + + + Gets or sets the writer's character array pool. + + + + + Gets or sets how many s to write for each level in the hierarchy when is set to . + + + + + Gets or sets which character to use to quote attribute values. + + + + + Gets or sets which character to use for indenting when is set to . + + + + + Gets or sets a value indicating whether object names will be surrounded with quotes. + + + + + Initializes a new instance of the class using the specified . + + The to write to. + + + + Flushes whatever is in the buffer to the underlying and also flushes the underlying . + + + + + Closes this writer. + If is set to true, the underlying is also closed. + If is set to true, the JSON is auto-completed. + + + + + Writes the beginning of a JSON object. + + + + + Writes the beginning of a JSON array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the specified end token. + + The end token to write. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + A flag to indicate whether the text should be escaped when it is written as a JSON property name. + + + + Writes indent characters. + + + + + Writes the JSON value delimiter. + + + + + Writes an indent space. + + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a of value. + + The of value to write. + + + + Writes a value. + + The value to write. + + + + Writes a of value. + + The of value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes the given white space. + + The string of white space characters. + + + + Specifies the type of JSON token. + + + + + This is returned by the if a read method has not been called. + + + + + An object start token. + + + + + An array start token. + + + + + A constructor start token. + + + + + An object property name. + + + + + A comment. + + + + + Raw JSON. + + + + + An integer. + + + + + A float. + + + + + A string. + + + + + A boolean. + + + + + A null token. + + + + + An undefined token. + + + + + An object end token. + + + + + An array end token. + + + + + A constructor end token. + + + + + A Date. + + + + + Byte data. + + + + + + Represents a reader that provides validation. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Sets an event handler for receiving schema validation errors. + + + + + Gets the text value of the current JSON token. + + + + + + Gets the depth of the current token in the JSON document. + + The depth of the current token in the JSON document. + + + + Gets the path of the current JSON token. + + + + + Gets the quotation mark character used to enclose the value of a string. + + + + + + Gets the type of the current JSON token. + + + + + + Gets the .NET type for the current JSON token. + + + + + + Initializes a new instance of the class that + validates the content returned from the given . + + The to read from while validating. + + + + Gets or sets the schema. + + The schema. + + + + Gets the used to construct this . + + The specified in the constructor. + + + + Changes the reader's state to . + If is set to true, the underlying is also closed. + + + + + Reads the next JSON token from the underlying as a of . + + A of . + + + + Reads the next JSON token from the underlying as a []. + + + A [] or null if the next JSON token is null. + + + + + Reads the next JSON token from the underlying as a of . + + A of . + + + + Reads the next JSON token from the underlying as a of . + + A of . + + + + Reads the next JSON token from the underlying as a of . + + A of . + + + + Reads the next JSON token from the underlying as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the underlying as a of . + + A of . This method will return null at the end of an array. + + + + Reads the next JSON token from the underlying as a of . + + A of . + + + + Reads the next JSON token from the underlying . + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Asynchronously closes this writer. + If is set to true, the destination is also closed. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously flushes whatever is in the buffer to the destination and also flushes the destination. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes the specified end token. + + The end token to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes indent characters. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes the JSON value delimiter. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes an indent space. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes raw JSON without changing the writer's state. + + The raw JSON to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes the end of the current JSON object or array. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes the end of an array. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes the end of a constructor. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes the end of a JSON object. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a null value. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes the property name of a name/value pair of a JSON object. + + The name of the property. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes the property name of a name/value pair of a JSON object. + + The name of the property. + A flag to indicate whether the text should be escaped when it is written as a JSON property name. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes the beginning of a JSON array. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a comment /*...*/ containing the specified text. + + Text to place inside the comment. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes raw JSON where a value is expected and updates the writer's state. + + The raw JSON to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes the start of a constructor with the given name. + + The name of the constructor. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes the beginning of a JSON object. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes the current token. + + The to read the token from. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes the current token. + + The to read the token from. + A flag indicating whether the current token's children should be written. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes the token and its value. + + The to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes the token and its value. + + The to write. + + The value to write. + A value is only required for tokens that have an associated value, e.g. the property name for . + null can be passed to the method for tokens that don't have a value, e.g. . + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a [] value. + + The [] value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a value. + + The value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes a of value. + + The of value to write. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes an undefined value. + + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously writes the given white space. + + The string of white space characters. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Asynchronously ets the state of the . + + The being written. + The value being written. + The token to monitor for cancellation requests. The default value is . + A that represents the asynchronous operation. + The default behaviour is to execute synchronously, returning an already-completed task. Derived + classes can override this behaviour for true asychronousity. + + + + Gets or sets a value indicating whether the destination should be closed when this writer is closed. + + + true to close the destination when this writer is closed; otherwise false. The default is true. + + + + + Gets or sets a value indicating whether the JSON should be auto-completed when this writer is closed. + + + true to auto-complete the JSON when this writer is closed; otherwise false. The default is true. + + + + + Gets the top. + + The top. + + + + Gets the state of the writer. + + + + + Gets the path of the writer. + + + + + Gets or sets a value indicating how JSON text output should be formatted. + + + + + Gets or sets how dates are written to JSON text. + + + + + Gets or sets how time zones are handled when writing JSON text. + + + + + Gets or sets how strings are escaped when writing JSON text. + + + + + Gets or sets how special floating point numbers, e.g. , + and , + are written to JSON text. + + + + + Gets or sets how and values are formatted when writing JSON text. + + + + + Gets or sets the culture used when writing JSON. Defaults to . + + + + + Initializes a new instance of the class. + + + + + Flushes whatever is in the buffer to the destination and also flushes the destination. + + + + + Closes this writer. + If is set to true, the destination is also closed. + If is set to true, the JSON is auto-completed. + + + + + Writes the beginning of a JSON object. + + + + + Writes the end of a JSON object. + + + + + Writes the beginning of a JSON array. + + + + + Writes the end of an array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the end constructor. + + + + + Writes the property name of a name/value pair of a JSON object. + + The name of the property. + + + + Writes the property name of a name/value pair of a JSON object. + + The name of the property. + A flag to indicate whether the text should be escaped when it is written as a JSON property name. + + + + Writes the end of the current JSON object or array. + + + + + Writes the current token and its children. + + The to read the token from. + + + + Writes the current token. + + The to read the token from. + A flag indicating whether the current token's children should be written. + + + + Writes the token and its value. + + The to write. + + The value to write. + A value is only required for tokens that have an associated value, e.g. the property name for . + null can be passed to the method for tokens that don't have a value, e.g. . + + + + + Writes the token. + + The to write. + + + + Writes the specified end token. + + The end token to write. + + + + Writes indent characters. + + + + + Writes the JSON value delimiter. + + + + + Writes an indent space. + + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON without changing the writer's state. + + The raw JSON to write. + + + + Writes raw JSON where a value is expected and updates the writer's state. + + The raw JSON to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a of value. + + The of value to write. + + + + Writes a of value. + + The of value to write. + + + + Writes a of value. + + The of value to write. + + + + Writes a of value. + + The of value to write. + + + + Writes a of value. + + The of value to write. + + + + Writes a of value. + + The of value to write. + + + + Writes a of value. + + The of value to write. + + + + Writes a of value. + + The of value to write. + + + + Writes a of value. + + The of value to write. + + + + Writes a of value. + + The of value to write. + + + + Writes a of value. + + The of value to write. + + + + Writes a of value. + + The of value to write. + + + + Writes a of value. + + The of value to write. + + + + Writes a of value. + + The of value to write. + + + + Writes a of value. + + The of value to write. + + + + Writes a of value. + + The of value to write. + + + + Writes a of value. + + The of value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes the given white space. + + The string of white space characters. + + + + Releases unmanaged and - optionally - managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Sets the state of the . + + The being written. + The value being written. + + + + The exception thrown when an error occurs while writing JSON text. + + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or null if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Initializes a new instance of the class + with a specified error message, JSON path and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The path to the JSON where the error occurred. + The exception that is the cause of the current exception, or null if no inner exception is specified. + + + + Specifies how JSON comments are handled when loading JSON. + + + + + Ignore comments. + + + + + Load comments as a with type . + + + + + Specifies how line information is handled when loading JSON. + + + + + Ignore line information. + + + + + Load line information. + + + + + Contains the LINQ to JSON extension methods. + + + + + Returns a collection of tokens that contains the ancestors of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains the ancestors of every token in the source collection. + + + + Returns a collection of tokens that contains every token in the source collection, and the ancestors of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains every token in the source collection, the ancestors of every token in the source collection. + + + + Returns a collection of tokens that contains the descendants of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains the descendants of every token in the source collection. + + + + Returns a collection of tokens that contains every token in the source collection, and the descendants of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains every token in the source collection, and the descendants of every token in the source collection. + + + + Returns a collection of child properties of every object in the source collection. + + An of that contains the source collection. + An of that contains the properties of every object in the source collection. + + + + Returns a collection of child values of every object in the source collection with the given key. + + An of that contains the source collection. + The token key. + An of that contains the values of every token in the source collection with the given key. + + + + Returns a collection of child values of every object in the source collection. + + An of that contains the source collection. + An of that contains the values of every token in the source collection. + + + + Returns a collection of converted child values of every object in the source collection with the given key. + + The type to convert the values to. + An of that contains the source collection. + The token key. + An that contains the converted values of every token in the source collection with the given key. + + + + Returns a collection of converted child values of every object in the source collection. + + The type to convert the values to. + An of that contains the source collection. + An that contains the converted values of every token in the source collection. + + + + Converts the value. + + The type to convert the value to. + A cast as a of . + A converted value. + + + + Converts the value. + + The source collection type. + The type to convert the value to. + A cast as a of . + A converted value. + + + + Returns a collection of child tokens of every array in the source collection. + + The source collection type. + An of that contains the source collection. + An of that contains the values of every token in the source collection. + + + + Returns a collection of converted child tokens of every array in the source collection. + + An of that contains the source collection. + The type to convert the values to. + The source collection type. + An that contains the converted values of every token in the source collection. + + + + Returns the input typed as . + + An of that contains the source collection. + The input typed as . + + + + Returns the input typed as . + + The source collection type. + An of that contains the source collection. + The input typed as . + + + + Represents a collection of objects. + + The type of token. + + + + Gets the of with the specified key. + + + + + + Represents a JSON array. + + + + + + + + Writes this token to a asynchronously. + + A into which this method will write. + The token to monitor for cancellation requests. + A collection of which will be used when writing the token. + A that represents the asynchronous write operation. + + + + Asynchronously loads a from a . + + A that will be read for the content of the . + If this is null, default load settings will be used. + The token to monitor for cancellation requests. The default value is . + A representing the asynchronous load. The property contains the JSON that was read from the specified . + + + + Asynchronously loads a from a . + + A that will be read for the content of the . + The used to load the JSON. + If this is null, default load settings will be used. + The token to monitor for cancellation requests. The default value is . + A representing the asynchronous load. The property contains the JSON that was read from the specified . + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets the node type for this . + + The type. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified content. + + The contents of the array. + + + + Initializes a new instance of the class with the specified content. + + The contents of the array. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Loads an from a . + + A that will be read for the content of the . + The used to load the JSON. + If this is null, default load settings will be used. + A that contains the JSON that was read from the specified . + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + + + + Load a from a string that contains JSON. + + A that contains JSON. + The used to load the JSON. + If this is null, default load settings will be used. + A populated from the string that contains JSON. + + + + + + + Creates a from an object. + + The object that will be used to create . + A with the values of the specified object. + + + + Creates a from an object. + + The object that will be used to create . + The that will be used to read the object. + A with the values of the specified object. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Gets the with the specified key. + + The with the specified key. + + + + Gets or sets the at the specified index. + + + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Inserts an item to the at the specified index. + + The zero-based index at which should be inserted. + The object to insert into the . + + is not a valid index in the . + + + + + Removes the item at the specified index. + + The zero-based index of the item to remove. + + is not a valid index in the . + + + + + Returns an enumerator that iterates through the collection. + + + A of that can be used to iterate through the collection. + + + + + Adds an item to the . + + The object to add to the . + + + + Removes all items from the . + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Copies the elements of the to an array, starting at a particular array index. + + The array. + Index of the array. + + + + Gets a value indicating whether the is read-only. + + true if the is read-only; otherwise, false. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Represents a JSON constructor. + + + + + Writes this token to a asynchronously. + + A into which this method will write. + The token to monitor for cancellation requests. + A collection of which will be used when writing the token. + A that represents the asynchronous write operation. + + + + Asynchronously loads a from a . + + A that will be read for the content of the . + The token to monitor for cancellation requests. The default value is . + + A that represents the asynchronous load. The + property returns a that contains the JSON that was read from the specified . + + + + Asynchronously loads a from a . + + A that will be read for the content of the . + The used to load the JSON. + If this is null, default load settings will be used. + The token to monitor for cancellation requests. The default value is . + + A that represents the asynchronous load. The + property returns a that contains the JSON that was read from the specified . + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets or sets the name of this constructor. + + The constructor name. + + + + Gets the node type for this . + + The type. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified name and content. + + The constructor name. + The contents of the constructor. + + + + Initializes a new instance of the class with the specified name and content. + + The constructor name. + The contents of the constructor. + + + + Initializes a new instance of the class with the specified name. + + The constructor name. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Gets the with the specified key. + + The with the specified key. + + + + Loads a from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Loads a from a . + + A that will be read for the content of the . + The used to load the JSON. + If this is null, default load settings will be used. + A that contains the JSON that was read from the specified . + + + + Represents a token that can contain other tokens. + + + + + Occurs when the list changes or an item in the list changes. + + + + + Occurs before an item is added to the collection. + + + + + Occurs when the items list of the collection has changed, or the collection is reset. + + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Raises the event. + + The instance containing the event data. + + + + Raises the event. + + The instance containing the event data. + + + + Raises the event. + + The instance containing the event data. + + + + Gets a value indicating whether this token has child tokens. + + + true if this token has child values; otherwise, false. + + + + + Get the first child token of this token. + + + A containing the first child token of the . + + + + + Get the last child token of this token. + + + A containing the last child token of the . + + + + + Returns a collection of the child tokens of this token, in document order. + + + An of containing the child tokens of this , in document order. + + + + + Returns a collection of the child values of this token, in document order. + + The type to convert the values to. + + A containing the child values of this , in document order. + + + + + Returns a collection of the descendant tokens for this token in document order. + + An of containing the descendant tokens of the . + + + + Returns a collection of the tokens that contain this token, and all descendant tokens of this token, in document order. + + An of containing this token, and all the descendant tokens of the . + + + + Adds the specified content as children of this . + + The content to be added. + + + + Adds the specified content as the first children of this . + + The content to be added. + + + + Creates a that can be used to add tokens to the . + + A that is ready to have content written to it. + + + + Replaces the child nodes of this token with the specified content. + + The content. + + + + Removes the child nodes from this token. + + + + + Merge the specified content into this . + + The content to be merged. + + + + Merge the specified content into this using . + + The content to be merged. + The used to merge the content. + + + + Gets the count of child JSON tokens. + + The count of child JSON tokens. + + + + Represents a collection of objects. + + The type of token. + + + + An empty collection of objects. + + + + + Initializes a new instance of the struct. + + The enumerable. + + + + Returns an enumerator that can be used to iterate through the collection. + + + A that can be used to iterate through the collection. + + + + + Gets the of with the specified key. + + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Represents a JSON object. + + + + + + + + Writes this token to a asynchronously. + + A into which this method will write. + The token to monitor for cancellation requests. + A collection of which will be used when writing the token. + A that represents the asynchronous write operation. + + + + Asynchronously loads a from a . + + A that will be read for the content of the . + The token to monitor for cancellation requests. The default value is . + + A that represents the asynchronous load. The + property returns a that contains the JSON that was read from the specified . + + + + Asynchronously loads a from a . + + A that will be read for the content of the . + The used to load the JSON. + If this is null, default load settings will be used. + The token to monitor for cancellation requests. The default value is . + + A that represents the asynchronous load. The + property returns a that contains the JSON that was read from the specified . + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Occurs when a property value changes. + + + + + Occurs when a property value is changing. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified content. + + The contents of the object. + + + + Initializes a new instance of the class with the specified content. + + The contents of the object. + + + + Gets the node type for this . + + The type. + + + + Gets an of of this object's properties. + + An of of this object's properties. + + + + Gets a the specified name. + + The property name. + A with the specified name or null. + + + + Gets a of of this object's property values. + + A of of this object's property values. + + + + Gets the with the specified key. + + The with the specified key. + + + + Gets or sets the with the specified property name. + + + + + + Loads a from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + is not valid JSON. + + + + + Loads a from a . + + A that will be read for the content of the . + The used to load the JSON. + If this is null, default load settings will be used. + A that contains the JSON that was read from the specified . + + is not valid JSON. + + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + is not valid JSON. + + + + + + + + Load a from a string that contains JSON. + + A that contains JSON. + The used to load the JSON. + If this is null, default load settings will be used. + A populated from the string that contains JSON. + + is not valid JSON. + + + + + + + + Creates a from an object. + + The object that will be used to create . + A with the values of the specified object. + + + + Creates a from an object. + + The object that will be used to create . + The that will be used to read the object. + A with the values of the specified object. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Gets the with the specified property name. + + Name of the property. + The with the specified property name. + + + + Gets the with the specified property name. + The exact property name will be searched for first and if no matching property is found then + the will be used to match a property. + + Name of the property. + One of the enumeration values that specifies how the strings will be compared. + The with the specified property name. + + + + Tries to get the with the specified property name. + The exact property name will be searched for first and if no matching property is found then + the will be used to match a property. + + Name of the property. + The value. + One of the enumeration values that specifies how the strings will be compared. + true if a value was successfully retrieved; otherwise, false. + + + + Adds the specified property name. + + Name of the property. + The value. + + + + Removes the property with the specified name. + + Name of the property. + true if item was successfully removed; otherwise, false. + + + + Tries to get the with the specified property name. + + Name of the property. + The value. + true if a value was successfully retrieved; otherwise, false. + + + + Returns an enumerator that can be used to iterate through the collection. + + + A that can be used to iterate through the collection. + + + + + Raises the event with the provided arguments. + + Name of the property. + + + + Raises the event with the provided arguments. + + Name of the property. + + + + Returns the responsible for binding operations performed on this object. + + The expression tree representation of the runtime value. + + The to bind this object. + + + + + Represents a JSON property. + + + + + Writes this token to a asynchronously. + + A into which this method will write. + The token to monitor for cancellation requests. + A collection of which will be used when writing the token. + A that represents the asynchronous write operation. + + + + Asynchronously loads a from a . + + A that will be read for the content of the . + The token to monitor for cancellation requests. The default value is . + A representing the asynchronous creation. The + property returns a that contains the JSON that was read from the specified . + + + + Asynchronously loads a from a . + + A that will be read for the content of the . + The used to load the JSON. + If this is null, default load settings will be used. + The token to monitor for cancellation requests. The default value is . + A representing the asynchronous creation. The + property returns a that contains the JSON that was read from the specified . + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets the property name. + + The property name. + + + + Gets or sets the property value. + + The property value. + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Gets the node type for this . + + The type. + + + + Initializes a new instance of the class. + + The property name. + The property content. + + + + Initializes a new instance of the class. + + The property name. + The property content. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Loads a from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Loads a from a . + + A that will be read for the content of the . + The used to load the JSON. + If this is null, default load settings will be used. + A that contains the JSON that was read from the specified . + + + + Represents a view of a . + + + + + Initializes a new instance of the class. + + The name. + + + + When overridden in a derived class, returns whether resetting an object changes its value. + + + true if resetting the component changes its value; otherwise, false. + + The component to test for reset capability. + + + + When overridden in a derived class, gets the current value of the property on a component. + + + The value of a property for a given component. + + The component with the property for which to retrieve the value. + + + + When overridden in a derived class, resets the value for this property of the component to the default value. + + The component with the property value that is to be reset to the default value. + + + + When overridden in a derived class, sets the value of the component to a different value. + + The component with the property value that is to be set. + The new value. + + + + When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted. + + + true if the property should be persisted; otherwise, false. + + The component with the property to be examined for persistence. + + + + When overridden in a derived class, gets the type of the component this property is bound to. + + + A that represents the type of component this property is bound to. + When the or + + methods are invoked, the object specified might be an instance of this type. + + + + + When overridden in a derived class, gets a value indicating whether this property is read-only. + + + true if the property is read-only; otherwise, false. + + + + + When overridden in a derived class, gets the type of the property. + + + A that represents the type of the property. + + + + + Gets the hash code for the name of the member. + + + + The hash code for the name of the member. + + + + + Represents a raw JSON string. + + + + + Asynchronously creates an instance of with the content of the reader's current token. + + The reader. + The token to monitor for cancellation requests. The default value is . + A representing the asynchronous creation. The + property returns an instance of with the content of the reader's current token. + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class. + + The raw json. + + + + Creates an instance of with the content of the reader's current token. + + The reader. + An instance of with the content of the reader's current token. + + + + Specifies the settings used when loading JSON. + + + + + Initializes a new instance of the class. + + + + + Gets or sets how JSON comments are handled when loading JSON. + + The JSON comment handling. + + + + Gets or sets how JSON line info is handled when loading JSON. + + The JSON line info handling. + + + + Specifies the settings used when merging JSON. + + + + + Gets or sets the method used when merging JSON arrays. + + The method used when merging JSON arrays. + + + + Gets or sets how null value properties are merged. + + How null value properties are merged. + + + + Represents an abstract JSON token. + + + + + Writes this token to a asynchronously. + + A into which this method will write. + The token to monitor for cancellation requests. + A collection of which will be used when writing the token. + A that represents the asynchronous write operation. + + + + Writes this token to a asynchronously. + + A into which this method will write. + A collection of which will be used when writing the token. + A that represents the asynchronous write operation. + + + + Asynchronously creates a from a . + + An positioned at the token to read into this . + The token to monitor for cancellation requests. The default value is . + + A that represents the asynchronous creation. The + property returns a that contains + the token and its descendant tokens + that were read from the reader. The runtime type of the token is determined + by the token type of the first token encountered in the reader. + + + + + Asynchronously creates a from a . + + An positioned at the token to read into this . + The used to load the JSON. + If this is null, default load settings will be used. + The token to monitor for cancellation requests. The default value is . + + A that represents the asynchronous creation. The + property returns a that contains + the token and its descendant tokens + that were read from the reader. The runtime type of the token is determined + by the token type of the first token encountered in the reader. + + + + + Asynchronously creates a from a . + + A positioned at the token to read into this . + The token to monitor for cancellation requests. The default value is . + + A that represents the asynchronous creation. The + property returns a that contains the token and its descendant tokens + that were read from the reader. The runtime type of the token is determined + by the token type of the first token encountered in the reader. + + + + + Asynchronously creates a from a . + + A positioned at the token to read into this . + The used to load the JSON. + If this is null, default load settings will be used. + The token to monitor for cancellation requests. The default value is . + + A that represents the asynchronous creation. The + property returns a that contains the token and its descendant tokens + that were read from the reader. The runtime type of the token is determined + by the token type of the first token encountered in the reader. + + + + + Gets a comparer that can compare two tokens for value equality. + + A that can compare two nodes for value equality. + + + + Gets or sets the parent. + + The parent. + + + + Gets the root of this . + + The root of this . + + + + Gets the node type for this . + + The type. + + + + Gets a value indicating whether this token has child tokens. + + + true if this token has child values; otherwise, false. + + + + + Compares the values of two tokens, including the values of all descendant tokens. + + The first to compare. + The second to compare. + true if the tokens are equal; otherwise false. + + + + Gets the next sibling token of this node. + + The that contains the next sibling token. + + + + Gets the previous sibling token of this node. + + The that contains the previous sibling token. + + + + Gets the path of the JSON token. + + + + + Adds the specified content immediately after this token. + + A content object that contains simple content or a collection of content objects to be added after this token. + + + + Adds the specified content immediately before this token. + + A content object that contains simple content or a collection of content objects to be added before this token. + + + + Returns a collection of the ancestor tokens of this token. + + A collection of the ancestor tokens of this token. + + + + Returns a collection of tokens that contain this token, and the ancestors of this token. + + A collection of tokens that contain this token, and the ancestors of this token. + + + + Returns a collection of the sibling tokens after this token, in document order. + + A collection of the sibling tokens after this tokens, in document order. + + + + Returns a collection of the sibling tokens before this token, in document order. + + A collection of the sibling tokens before this token, in document order. + + + + Gets the with the specified key. + + The with the specified key. + + + + Gets the with the specified key converted to the specified type. + + The type to convert the token to. + The token key. + The converted token value. + + + + Get the first child token of this token. + + A containing the first child token of the . + + + + Get the last child token of this token. + + A containing the last child token of the . + + + + Returns a collection of the child tokens of this token, in document order. + + An of containing the child tokens of this , in document order. + + + + Returns a collection of the child tokens of this token, in document order, filtered by the specified type. + + The type to filter the child tokens on. + A containing the child tokens of this , in document order. + + + + Returns a collection of the child values of this token, in document order. + + The type to convert the values to. + A containing the child values of this , in document order. + + + + Removes this token from its parent. + + + + + Replaces this token with the specified token. + + The value. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Returns the indented JSON for this token. + + + The indented JSON for this token. + + + + + Returns the JSON for this token using the given formatting and converters. + + Indicates how the output should be formatted. + A collection of s which will be used when writing the token. + The JSON for this token using the given formatting and converters. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to of . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to of . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to of . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to of . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to of . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to of . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to of . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to of . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to of . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to of . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to of . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to of . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to of . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to of . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to of . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to of . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to of . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to []. + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to of . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to of . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from of to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from of to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from of to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from of to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from of to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from of to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from of to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from of to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from of to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from of to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from of to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from of to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from of to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from of to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from of to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from [] to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from of to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from of to . + + The value to create a from. + The initialized with the specified value. + + + + Creates a for this token. + + A that can be used to read this token and its descendants. + + + + Creates a from an object. + + The object that will be used to create . + A with the value of the specified object. + + + + Creates a from an object using the specified . + + The object that will be used to create . + The that will be used when reading the object. + A with the value of the specified object. + + + + Creates an instance of the specified .NET type from the . + + The object type that the token will be deserialized to. + The new object created from the JSON value. + + + + Creates an instance of the specified .NET type from the . + + The object type that the token will be deserialized to. + The new object created from the JSON value. + + + + Creates an instance of the specified .NET type from the using the specified . + + The object type that the token will be deserialized to. + The that will be used when creating the object. + The new object created from the JSON value. + + + + Creates an instance of the specified .NET type from the using the specified . + + The object type that the token will be deserialized to. + The that will be used when creating the object. + The new object created from the JSON value. + + + + Creates a from a . + + A positioned at the token to read into this . + + A that contains the token and its descendant tokens + that were read from the reader. The runtime type of the token is determined + by the token type of the first token encountered in the reader. + + + + + Creates a from a . + + An positioned at the token to read into this . + The used to load the JSON. + If this is null, default load settings will be used. + + A that contains the token and its descendant tokens + that were read from the reader. The runtime type of the token is determined + by the token type of the first token encountered in the reader. + + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + Load a from a string that contains JSON. + + A that contains JSON. + The used to load the JSON. + If this is null, default load settings will be used. + A populated from the string that contains JSON. + + + + Creates a from a . + + A positioned at the token to read into this . + The used to load the JSON. + If this is null, default load settings will be used. + + A that contains the token and its descendant tokens + that were read from the reader. The runtime type of the token is determined + by the token type of the first token encountered in the reader. + + + + + Creates a from a . + + A positioned at the token to read into this . + + A that contains the token and its descendant tokens + that were read from the reader. The runtime type of the token is determined + by the token type of the first token encountered in the reader. + + + + + Selects a using a JPath expression. Selects the token that matches the object path. + + + A that contains a JPath expression. + + A , or null. + + + + Selects a using a JPath expression. Selects the token that matches the object path. + + + A that contains a JPath expression. + + A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. + A . + + + + Selects a collection of elements using a JPath expression. + + + A that contains a JPath expression. + + An of that contains the selected elements. + + + + Selects a collection of elements using a JPath expression. + + + A that contains a JPath expression. + + A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. + An of that contains the selected elements. + + + + Returns the responsible for binding operations performed on this object. + + The expression tree representation of the runtime value. + + The to bind this object. + + + + + Returns the responsible for binding operations performed on this object. + + The expression tree representation of the runtime value. + + The to bind this object. + + + + + Creates a new instance of the . All child tokens are recursively cloned. + + A new instance of the . + + + + Adds an object to the annotation list of this . + + The annotation to add. + + + + Get the first annotation object of the specified type from this . + + The type of the annotation to retrieve. + The first annotation object that matches the specified type, or null if no annotation is of the specified type. + + + + Gets the first annotation object of the specified type from this . + + The of the annotation to retrieve. + The first annotation object that matches the specified type, or null if no annotation is of the specified type. + + + + Gets a collection of annotations of the specified type for this . + + The type of the annotations to retrieve. + An that contains the annotations for this . + + + + Gets a collection of annotations of the specified type for this . + + The of the annotations to retrieve. + An of that contains the annotations that match the specified type for this . + + + + Removes the annotations of the specified type from this . + + The type of annotations to remove. + + + + Removes the annotations of the specified type from this . + + The of annotations to remove. + + + + Compares tokens to determine whether they are equal. + + + + + Determines whether the specified objects are equal. + + The first object of type to compare. + The second object of type to compare. + + true if the specified objects are equal; otherwise, false. + + + + + Returns a hash code for the specified object. + + The for which a hash code is to be returned. + A hash code for the specified object. + The type of is a reference type and is null. + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. + + + + + Gets the at the reader's current position. + + + + + Initializes a new instance of the class. + + The token to read from. + + + + Reads the next JSON token from the underlying . + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Gets the path of the current JSON token. + + + + + Specifies the type of token. + + + + + No token type has been set. + + + + + A JSON object. + + + + + A JSON array. + + + + + A JSON constructor. + + + + + A JSON object property. + + + + + A comment. + + + + + An integer value. + + + + + A float value. + + + + + A string value. + + + + + A boolean value. + + + + + A null value. + + + + + An undefined value. + + + + + A date value. + + + + + A raw JSON value. + + + + + A collection of bytes value. + + + + + A Guid value. + + + + + A Uri value. + + + + + A TimeSpan value. + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Gets the at the writer's current position. + + + + + Gets the token being written. + + The token being written. + + + + Initializes a new instance of the class writing to the given . + + The container being written to. + + + + Initializes a new instance of the class. + + + + + Flushes whatever is in the buffer to the underlying . + + + + + Closes this writer. + If is set to true, the JSON is auto-completed. + + + Setting to true has no additional effect, since the underlying is a type that cannot be closed. + + + + + Writes the beginning of a JSON object. + + + + + Writes the beginning of a JSON array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the end. + + The token. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Writes a value. + An error will be raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Represents a value in JSON (string, integer, date, etc). + + + + + Writes this token to a asynchronously. + + A into which this method will write. + The token to monitor for cancellation requests. + A collection of which will be used when writing the token. + A that represents the asynchronous write operation. + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Gets a value indicating whether this token has child tokens. + + + true if this token has child values; otherwise, false. + + + + + Creates a comment with the given value. + + The value. + A comment with the given value. + + + + Creates a string with the given value. + + The value. + A string with the given value. + + + + Creates a null value. + + A null value. + + + + Creates a undefined value. + + A undefined value. + + + + Gets the node type for this . + + The type. + + + + Gets or sets the underlying token value. + + The underlying token value. + + + + Writes this token to a . + + A into which this method will write. + A collection of s which will be used when writing the token. + + + + Indicates whether the current object is equal to another object of the same type. + + + true if the current object is equal to the parameter; otherwise, false. + + An object to compare with this object. + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format provider. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format. + The format provider. + + A that represents this instance. + + + + + Returns the responsible for binding operations performed on this object. + + The expression tree representation of the runtime value. + + The to bind this object. + + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: + Value + Meaning + Less than zero + This instance is less than . + Zero + This instance is equal to . + Greater than zero + This instance is greater than . + + + is not of the same type as this instance. + + + + + Specifies how JSON arrays are merged together. + + + + Concatenate arrays. + + + Union arrays, skipping items that already exist. + + + Replace all array items. + + + Merge array items together, matched by index. + + + + Specifies how null value properties are merged. + + + + + The content's null value properties will be ignored during merging. + + + + + The content's null value properties will be merged. + + + + + Specifies the member serialization options for the . + + + + + All public members are serialized by default. Members can be excluded using or . + This is the default member serialization mode. + + + + + Only members marked with or are serialized. + This member serialization mode can also be set by marking the class with . + + + + + All public and private fields are serialized. Members can be excluded using or . + This member serialization mode can also be set by marking the class with + and setting IgnoreSerializableAttribute on to false. + + + + + Specifies metadata property handling options for the . + + + + + Read metadata properties located at the start of a JSON object. + + + + + Read metadata properties located anywhere in a JSON object. Note that this setting will impact performance. + + + + + Do not try to read metadata properties. + + + + + Specifies missing member handling options for the . + + + + + Ignore a missing member and do not attempt to deserialize it. + + + + + Throw a when a missing member is encountered during deserialization. + + + + + Specifies null value handling options for the . + + + + + + + + + Include null values when serializing and deserializing objects. + + + + + Ignore null values when serializing and deserializing objects. + + + + + Specifies how object creation is handled by the . + + + + + Reuse existing objects, create new objects when needed. + + + + + Only reuse existing objects. + + + + + Always create new objects. + + + + + Specifies reference handling options for the . + Note that references cannot be preserved when a value is set via a non-default constructor such as types that implement . + + + + + + + + Do not preserve references when serializing types. + + + + + Preserve references when serializing into a JSON object structure. + + + + + Preserve references when serializing into a JSON array structure. + + + + + Preserve references when serializing. + + + + + Specifies reference loop handling options for the . + + + + + Throw a when a loop is encountered. + + + + + Ignore loop references and do not serialize. + + + + + Serialize loop references. + + + + + Indicating whether a property is required. + + + + + The property is not required. The default state. + + + + + The property must be defined in JSON but can be a null value. + + + + + The property must be defined in JSON and cannot be a null value. + + + + + The property is not required but it cannot be a null value. + + + + + + Contains the JSON schema extension methods. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + + Determines whether the is valid. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + + true if the specified is valid; otherwise, false. + + + + + + Determines whether the is valid. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + When this method returns, contains any error messages generated while validating. + + true if the specified is valid; otherwise, false. + + + + + + Validates the specified . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + + + + + Validates the specified . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + The validation event handler. + + + + + An in-memory representation of a JSON Schema. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Gets or sets the id. + + + + + Gets or sets the title. + + + + + Gets or sets whether the object is required. + + + + + Gets or sets whether the object is read-only. + + + + + Gets or sets whether the object is visible to users. + + + + + Gets or sets whether the object is transient. + + + + + Gets or sets the description of the object. + + + + + Gets or sets the types of values allowed by the object. + + The type. + + + + Gets or sets the pattern. + + The pattern. + + + + Gets or sets the minimum length. + + The minimum length. + + + + Gets or sets the maximum length. + + The maximum length. + + + + Gets or sets a number that the value should be divisible by. + + A number that the value should be divisible by. + + + + Gets or sets the minimum. + + The minimum. + + + + Gets or sets the maximum. + + The maximum. + + + + Gets or sets a flag indicating whether the value can not equal the number defined by the minimum attribute (). + + A flag indicating whether the value can not equal the number defined by the minimum attribute (). + + + + Gets or sets a flag indicating whether the value can not equal the number defined by the maximum attribute (). + + A flag indicating whether the value can not equal the number defined by the maximum attribute (). + + + + Gets or sets the minimum number of items. + + The minimum number of items. + + + + Gets or sets the maximum number of items. + + The maximum number of items. + + + + Gets or sets the of items. + + The of items. + + + + Gets or sets a value indicating whether items in an array are validated using the instance at their array position from . + + + true if items are validated using their array position; otherwise, false. + + + + + Gets or sets the of additional items. + + The of additional items. + + + + Gets or sets a value indicating whether additional items are allowed. + + + true if additional items are allowed; otherwise, false. + + + + + Gets or sets whether the array items must be unique. + + + + + Gets or sets the of properties. + + The of properties. + + + + Gets or sets the of additional properties. + + The of additional properties. + + + + Gets or sets the pattern properties. + + The pattern properties. + + + + Gets or sets a value indicating whether additional properties are allowed. + + + true if additional properties are allowed; otherwise, false. + + + + + Gets or sets the required property if this property is present. + + The required property if this property is present. + + + + Gets or sets the a collection of valid enum values allowed. + + A collection of valid enum values allowed. + + + + Gets or sets disallowed types. + + The disallowed types. + + + + Gets or sets the default value. + + The default value. + + + + Gets or sets the collection of that this schema extends. + + The collection of that this schema extends. + + + + Gets or sets the format. + + The format. + + + + Initializes a new instance of the class. + + + + + Reads a from the specified . + + The containing the JSON Schema to read. + The object representing the JSON Schema. + + + + Reads a from the specified . + + The containing the JSON Schema to read. + The to use when resolving schema references. + The object representing the JSON Schema. + + + + Load a from a string that contains JSON Schema. + + A that contains JSON Schema. + A populated from the string that contains JSON Schema. + + + + Load a from a string that contains JSON Schema using the specified . + + A that contains JSON Schema. + The resolver. + A populated from the string that contains JSON Schema. + + + + Writes this schema to a . + + A into which this method will write. + + + + Writes this schema to a using the specified . + + A into which this method will write. + The resolver used. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + + Returns detailed information about the schema exception. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Gets the line number indicating where the error occurred. + + The line number indicating where the error occurred. + + + + Gets the line position indicating where the error occurred. + + The line position indicating where the error occurred. + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or null if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + + Generates a from a specified . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Gets or sets how undefined schemas are handled by the serializer. + + + + + Gets or sets the contract resolver. + + The contract resolver. + + + + Generate a from the specified type. + + The type to generate a from. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + The used to resolve schema references. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + Specify whether the generated root will be nullable. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + The used to resolve schema references. + Specify whether the generated root will be nullable. + A generated from the specified type. + + + + + Resolves from an id. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Gets or sets the loaded schemas. + + The loaded schemas. + + + + Initializes a new instance of the class. + + + + + Gets a for the specified reference. + + The id. + A for the specified reference. + + + + + The value types allowed by the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + No type specified. + + + + + String type. + + + + + Float type. + + + + + Integer type. + + + + + Boolean type. + + + + + Object type. + + + + + Array type. + + + + + Null type. + + + + + Any type. + + + + + + Specifies undefined schema Id handling options for the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Do not infer a schema Id. + + + + + Use the .NET type name as the schema Id. + + + + + Use the assembly qualified .NET type name as the schema Id. + + + + + + Returns detailed information related to the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Gets the associated with the validation error. + + The JsonSchemaException associated with the validation error. + + + + Gets the path of the JSON location where the validation error occurred. + + The path of the JSON location where the validation error occurred. + + + + Gets the text description corresponding to the validation error. + + The text description. + + + + + Represents the callback method that will handle JSON schema validation events and the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + A camel case naming strategy. + + + + + Initializes a new instance of the class. + + + A flag indicating whether dictionary keys should be processed. + + + A flag indicating whether explicitly specified property names should be processed, + e.g. a property name customized with a . + + + + + Initializes a new instance of the class. + + + A flag indicating whether dictionary keys should be processed. + + + A flag indicating whether explicitly specified property names should be processed, + e.g. a property name customized with a . + + + A flag indicating whether extension data names should be processed. + + + + + Initializes a new instance of the class. + + + + + Resolves the specified property name. + + The property name to resolve. + The resolved property name. + + + + Resolves member mappings for a type, camel casing property names. + + + + + Initializes a new instance of the class. + + + + + Resolves the contract for a given type. + + The type to resolve a contract for. + The contract for a given type. + + + + Used by to resolve a for a given . + + + + + Gets a value indicating whether members are being get and set using dynamic code generation. + This value is determined by the runtime permissions available. + + + true if using dynamic code generation; otherwise, false. + + + + + Gets or sets the default members search flags. + + The default members search flags. + + + + Gets or sets a value indicating whether compiler generated members should be serialized. + + + true if serialized compiler generated members; otherwise, false. + + + + + Gets or sets a value indicating whether to ignore the interface when serializing and deserializing types. + + + true if the interface will be ignored when serializing and deserializing types; otherwise, false. + + + + + Gets or sets a value indicating whether to ignore the attribute when serializing and deserializing types. + + + true if the attribute will be ignored when serializing and deserializing types; otherwise, false. + + + + + Gets or sets the naming strategy used to resolve how property names and dictionary keys are serialized. + + The naming strategy used to resolve how property names and dictionary keys are serialized. + + + + Initializes a new instance of the class. + + + + + Resolves the contract for a given type. + + The type to resolve a contract for. + The contract for a given type. + + + + Gets the serializable members for the type. + + The type to get serializable members for. + The serializable members for the type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates the constructor parameters. + + The constructor to create properties for. + The type's member properties. + Properties for the given . + + + + Creates a for the given . + + The matching member property. + The constructor parameter. + A created for the given . + + + + Resolves the default for the contract. + + Type of the object. + The contract's default . + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Determines which contract type is created for the given type. + + Type of the object. + A for the given type. + + + + Creates properties for the given . + + The type to create properties for. + /// The member serialization mode for the type. + Properties for the given . + + + + Creates the used by the serializer to get and set values from a member. + + The member. + The used by the serializer to get and set values from a member. + + + + Creates a for the given . + + The member's parent . + The member to create a for. + A created for the given . + + + + Resolves the name of the property. + + Name of the property. + Resolved name of the property. + + + + Resolves the name of the extension data. By default no changes are made to extension data names. + + Name of the extension data. + Resolved name of the extension data. + + + + Resolves the key of the dictionary. By default is used to resolve dictionary keys. + + Key of the dictionary. + Resolved key of the dictionary. + + + + Gets the resolved name of the property. + + Name of the property. + Name of the property. + + + + The default naming strategy. Property names and dictionary keys are unchanged. + + + + + Resolves the specified property name. + + The property name to resolve. + The resolved property name. + + + + The default serialization binder used when resolving and loading classes from type names. + + + + + Initializes a new instance of the class. + + + + + When overridden in a derived class, controls the binding of a serialized object to a type. + + Specifies the name of the serialized object. + Specifies the name of the serialized object. + + The type of the object the formatter creates a new instance of. + + + + + When overridden in a derived class, controls the binding of a serialized object to a type. + + The type of the object the formatter creates a new instance of. + Specifies the name of the serialized object. + Specifies the name of the serialized object. + + + + Represents a trace writer that writes to the application's instances. + + + + + Gets the that will be used to filter the trace messages passed to the writer. + For example a filter level of will exclude messages and include , + and messages. + + + The that will be used to filter the trace messages passed to the writer. + + + + + Writes the specified trace level, message and optional exception. + + The at which to write this trace. + The trace message. + The trace exception. This parameter is optional. + + + + Get and set values for a using dynamic methods. + + + + + Initializes a new instance of the class. + + The member info. + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Provides information surrounding an error. + + + + + Gets the error. + + The error. + + + + Gets the original object that caused the error. + + The original object that caused the error. + + + + Gets the member that caused the error. + + The member that caused the error. + + + + Gets the path of the JSON location where the error occurred. + + The path of the JSON location where the error occurred. + + + + Gets or sets a value indicating whether this is handled. + + true if handled; otherwise, false. + + + + Provides data for the Error event. + + + + + Gets the current object the error event is being raised against. + + The current object the error event is being raised against. + + + + Gets the error context. + + The error context. + + + + Initializes a new instance of the class. + + The current object. + The error context. + + + + Get and set values for a using dynamic methods. + + + + + Initializes a new instance of the class. + + The member info. + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Provides methods to get attributes. + + + + + Returns a collection of all of the attributes, or an empty collection if there are no attributes. + + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Returns a collection of attributes, identified by type, or an empty collection if there are no attributes. + + The type of the attributes. + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Used by to resolve a for a given . + + + + + + + + + Resolves the contract for a given type. + + The type to resolve a contract for. + The contract for a given type. + + + + Used to resolve references when serializing and deserializing JSON by the . + + + + + Resolves a reference to its object. + + The serialization context. + The reference to resolve. + The object that was resolved from the reference. + + + + Gets the reference for the specified object. + + The serialization context. + The object to get a reference for. + The reference to the object. + + + + Determines whether the specified object is referenced. + + The serialization context. + The object to test for a reference. + + true if the specified object is referenced; otherwise, false. + + + + + Adds a reference to the specified object. + + The serialization context. + The reference. + The object to reference. + + + + Allows users to control class loading and mandate what class to load. + + + + + When implemented, controls the binding of a serialized object to a type. + + Specifies the name of the serialized object. + Specifies the name of the serialized object + The type of the object the formatter creates a new instance of. + + + + When implemented, controls the binding of a serialized object to a type. + + The type of the object the formatter creates a new instance of. + Specifies the name of the serialized object. + Specifies the name of the serialized object. + + + + Represents a trace writer. + + + + + Gets the that will be used to filter the trace messages passed to the writer. + For example a filter level of will exclude messages and include , + and messages. + + The that will be used to filter the trace messages passed to the writer. + + + + Writes the specified trace level, message and optional exception. + + The at which to write this trace. + The trace message. + The trace exception. This parameter is optional. + + + + Provides methods to get and set values. + + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Contract details for a used by the . + + + + + Gets the of the collection items. + + The of the collection items. + + + + Gets a value indicating whether the collection type is a multidimensional array. + + true if the collection type is a multidimensional array; otherwise, false. + + + + Gets or sets the function used to create the object. When set this function will override . + + The function used to create the object. + + + + Gets a value indicating whether the creator has a parameter with the collection values. + + true if the creator has a parameter with the collection values; otherwise, false. + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Contract details for a used by the . + + + + + Gets or sets the default collection items . + + The converter. + + + + Gets or sets a value indicating whether the collection items preserve object references. + + true if collection items preserve object references; otherwise, false. + + + + Gets or sets the collection item reference loop handling. + + The reference loop handling. + + + + Gets or sets the collection item type name handling. + + The type name handling. + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Handles serialization callback events. + + The object that raised the callback event. + The streaming context. + + + + Handles serialization error callback events. + + The object that raised the callback event. + The streaming context. + The error context. + + + + Sets extension data for an object during deserialization. + + The object to set extension data on. + The extension data key. + The extension data value. + + + + Gets extension data for an object during serialization. + + The object to set extension data on. + + + + Contract details for a used by the . + + + + + Gets the underlying type for the contract. + + The underlying type for the contract. + + + + Gets or sets the type created during deserialization. + + The type created during deserialization. + + + + Gets or sets whether this type contract is serialized as a reference. + + Whether this type contract is serialized as a reference. + + + + Gets or sets the default for this contract. + + The converter. + + + + Gets or sets all methods called immediately after deserialization of the object. + + The methods called immediately after deserialization of the object. + + + + Gets or sets all methods called during deserialization of the object. + + The methods called during deserialization of the object. + + + + Gets or sets all methods called after serialization of the object graph. + + The methods called after serialization of the object graph. + + + + Gets or sets all methods called before serialization of the object. + + The methods called before serialization of the object. + + + + Gets or sets all method called when an error is thrown during the serialization of the object. + + The methods called when an error is thrown during the serialization of the object. + + + + Gets or sets the default creator method used to create the object. + + The default creator method used to create the object. + + + + Gets or sets a value indicating whether the default creator is non-public. + + true if the default object creator is non-public; otherwise, false. + + + + Contract details for a used by the . + + + + + Gets or sets the dictionary key resolver. + + The dictionary key resolver. + + + + Gets the of the dictionary keys. + + The of the dictionary keys. + + + + Gets the of the dictionary values. + + The of the dictionary values. + + + + Gets or sets the function used to create the object. When set this function will override . + + The function used to create the object. + + + + Gets a value indicating whether the creator has a parameter with the dictionary values. + + true if the creator has a parameter with the dictionary values; otherwise, false. + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Contract details for a used by the . + + + + + Gets the object's properties. + + The object's properties. + + + + Gets or sets the property name resolver. + + The property name resolver. + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Contract details for a used by the . + + + + + Gets or sets the object constructor. + + The object constructor. + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Contract details for a used by the . + + + + + Gets or sets the object member serialization. + + The member object serialization. + + + + Gets or sets a value that indicates whether the object's properties are required. + + + A value indicating whether the object's properties are required. + + + + + Gets the object's properties. + + The object's properties. + + + + Gets a collection of instances that define the parameters used with . + + + + + Gets or sets the function used to create the object. When set this function will override . + This function is called with a collection of arguments which are defined by the collection. + + The function used to create the object. + + + + Gets or sets the extension data setter. + + + + + Gets or sets the extension data getter. + + + + + Gets or sets the extension data value type. + + + + + Gets or sets the extension data name resolver. + + The extension data name resolver. + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Maps a JSON property to a .NET member or constructor parameter. + + + + + Gets or sets the name of the property. + + The name of the property. + + + + Gets or sets the type that declared this property. + + The type that declared this property. + + + + Gets or sets the order of serialization of a member. + + The numeric order of serialization. + + + + Gets or sets the name of the underlying member or parameter. + + The name of the underlying member or parameter. + + + + Gets the that will get and set the during serialization. + + The that will get and set the during serialization. + + + + Gets or sets the for this property. + + The for this property. + + + + Gets or sets the type of the property. + + The type of the property. + + + + Gets or sets the for the property. + If set this converter takes precedence over the contract converter for the property type. + + The converter. + + + + Gets or sets the member converter. + + The member converter. + + + + Gets or sets a value indicating whether this is ignored. + + true if ignored; otherwise, false. + + + + Gets or sets a value indicating whether this is readable. + + true if readable; otherwise, false. + + + + Gets or sets a value indicating whether this is writable. + + true if writable; otherwise, false. + + + + Gets or sets a value indicating whether this has a member attribute. + + true if has a member attribute; otherwise, false. + + + + Gets the default value. + + The default value. + + + + Gets or sets a value indicating whether this is required. + + A value indicating whether this is required. + + + + Gets or sets a value indicating whether this property preserves object references. + + + true if this instance is reference; otherwise, false. + + + + + Gets or sets the property null value handling. + + The null value handling. + + + + Gets or sets the property default value handling. + + The default value handling. + + + + Gets or sets the property reference loop handling. + + The reference loop handling. + + + + Gets or sets the property object creation handling. + + The object creation handling. + + + + Gets or sets or sets the type name handling. + + The type name handling. + + + + Gets or sets a predicate used to determine whether the property should be serialized. + + A predicate used to determine whether the property should be serialized. + + + + Gets or sets a predicate used to determine whether the property should be deserialized. + + A predicate used to determine whether the property should be deserialized. + + + + Gets or sets a predicate used to determine whether the property should be serialized. + + A predicate used to determine whether the property should be serialized. + + + + Gets or sets an action used to set whether the property has been deserialized. + + An action used to set whether the property has been deserialized. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets or sets the converter used when serializing the property's collection items. + + The collection's items converter. + + + + Gets or sets whether this property's collection items are serialized as a reference. + + Whether this property's collection items are serialized as a reference. + + + + Gets or sets the type name handling used when serializing the property's collection items. + + The collection's items type name handling. + + + + Gets or sets the reference loop handling used when serializing the property's collection items. + + The collection's items reference loop handling. + + + + A collection of objects. + + + + + Initializes a new instance of the class. + + The type. + + + + When implemented in a derived class, extracts the key from the specified element. + + The element from which to extract the key. + The key for the specified element. + + + + Adds a object. + + The property to add to the collection. + + + + Gets the closest matching object. + First attempts to get an exact case match of and then + a case insensitive match. + + Name of the property. + A matching property if found. + + + + Gets a property by property name. + + The name of the property to get. + Type property name string comparison. + A matching property if found. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Lookup and create an instance of the type described by the argument. + + The type to create. + Optional arguments to pass to an initializing constructor of the JsonConverter. + If null, the default constructor is used. + + + + Represents a trace writer that writes to memory. When the trace message limit is + reached then old trace messages will be removed as new messages are added. + + + + + Gets the that will be used to filter the trace messages passed to the writer. + For example a filter level of will exclude messages and include , + and messages. + + + The that will be used to filter the trace messages passed to the writer. + + + + + Initializes a new instance of the class. + + + + + Writes the specified trace level, message and optional exception. + + The at which to write this trace. + The trace message. + The trace exception. This parameter is optional. + + + + Returns an enumeration of the most recent trace messages. + + An enumeration of the most recent trace messages. + + + + Returns a of the most recent trace messages. + + + A of the most recent trace messages. + + + + + A base class for resolving how property names and dictionary keys are serialized. + + + + + A flag indicating whether dictionary keys should be processed. + Defaults to false. + + + + + A flag indicating whether extension data names should be processed. + Defaults to false. + + + + + A flag indicating whether explicitly specified property names, + e.g. a property name customized with a , should be processed. + Defaults to false. + + + + + Gets the serialized name for a given property name. + + The initial property name. + A flag indicating whether the property has had a name explicitly specified. + The serialized property name. + + + + Gets the serialized name for a given extension data name. + + The initial extension data name. + The serialized extension data name. + + + + Gets the serialized key for a given dictionary key. + + The initial dictionary key. + The serialized dictionary key. + + + + Resolves the specified property name. + + The property name to resolve. + The resolved property name. + + + + Represents a method that constructs an object. + + The object type to create. + + + + When applied to a method, specifies that the method is called when an error occurs serializing an object. + + + + + Provides methods to get attributes from a , , or . + + + + + Initializes a new instance of the class. + + The instance to get attributes for. This parameter should be a , , or . + + + + Returns a collection of all of the attributes, or an empty collection if there are no attributes. + + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Returns a collection of attributes, identified by type, or an empty collection if there are no attributes. + + The type of the attributes. + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Get and set values for a using reflection. + + + + + Initializes a new instance of the class. + + The member info. + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + A snake case naming strategy. + + + + + Initializes a new instance of the class. + + + A flag indicating whether dictionary keys should be processed. + + + A flag indicating whether explicitly specified property names should be processed, + e.g. a property name customized with a . + + + + + Initializes a new instance of the class. + + + A flag indicating whether dictionary keys should be processed. + + + A flag indicating whether explicitly specified property names should be processed, + e.g. a property name customized with a . + + + A flag indicating whether extension data names should be processed. + + + + + Initializes a new instance of the class. + + + + + Resolves the specified property name. + + The property name to resolve. + The resolved property name. + + + + Specifies how strings are escaped when writing JSON text. + + + + + Only control characters (e.g. newline) are escaped. + + + + + All non-ASCII and control characters (e.g. newline) are escaped. + + + + + HTML (<, >, &, ', ") and control characters (e.g. newline) are escaped. + + + + + Indicates the method that will be used during deserialization for locating and loading assemblies. + + + + + In simple mode, the assembly used during deserialization need not match exactly the assembly used during serialization. Specifically, the version numbers need not match as the LoadWithPartialName method of the class is used to load the assembly. + + + + + In full mode, the assembly used during deserialization must match exactly the assembly used during serialization. The Load method of the class is used to load the assembly. + + + + + Specifies type name handling options for the . + + + should be used with caution when your application deserializes JSON from an external source. + Incoming types should be validated with a custom + when deserializing with a value other than . + + + + + Do not include the .NET type name when serializing types. + + + + + Include the .NET type name when serializing into a JSON object structure. + + + + + Include the .NET type name when serializing into a JSON array structure. + + + + + Always include the .NET type name when serializing. + + + + + Include the .NET type name when the type of the object being serialized is not the same as its declared type. + Note that this doesn't include the root serialized object by default. To include the root object's type name in JSON + you must specify a root type object with + or . + + + + + Determines whether the collection is null or empty. + + The collection. + + true if the collection is null or empty; otherwise, false. + + + + + Adds the elements of the specified collection to the specified generic . + + The list to add to. + The collection of elements to add. + + + + Converts the value to the specified type. If the value is unable to be converted, the + value is checked whether it assignable to the specified type. + + The value to convert. + The culture to use when converting. + The type to convert or cast the value to. + + The converted type. If conversion was unsuccessful, the initial value + is returned if assignable to the target type. + + + + + Helper method for generating a MetaObject which calls a + specific method on Dynamic that returns a result + + + + + Helper method for generating a MetaObject which calls a + specific method on Dynamic, but uses one of the arguments for + the result. + + + + + Helper method for generating a MetaObject which calls a + specific method on Dynamic, but uses one of the arguments for + the result. + + + + + Returns a Restrictions object which includes our current restrictions merged + with a restriction limiting our type + + + + + Gets a dictionary of the names and values of an type. + + + + + + Gets a dictionary of the names and values of an Enum type. + + The enum type to get names and values for. + + + + + Gets the type of the typed collection's items. + + The type. + The type of the typed collection's items. + + + + Gets the member's underlying type. + + The member. + The underlying type of the member. + + + + Determines whether the member is an indexed property. + + The member. + + true if the member is an indexed property; otherwise, false. + + + + + Determines whether the property is an indexed property. + + The property. + + true if the property is an indexed property; otherwise, false. + + + + + Gets the member's value on the object. + + The member. + The target object. + The member's value on the object. + + + + Sets the member's value on the target object. + + The member. + The target. + The value. + + + + Determines whether the specified MemberInfo can be read. + + The MemberInfo to determine whether can be read. + /// if set to true then allow the member to be gotten non-publicly. + + true if the specified MemberInfo can be read; otherwise, false. + + + + + Determines whether the specified MemberInfo can be set. + + The MemberInfo to determine whether can be set. + if set to true then allow the member to be set non-publicly. + if set to true then allow the member to be set if read-only. + + true if the specified MemberInfo can be set; otherwise, false. + + + + + Builds a string. Unlike this class lets you reuse its internal buffer. + + + + + Determines whether the string is all white space. Empty string will return false. + + The string to test whether it is all white space. + + true if the string is all white space; otherwise, false. + + + + + Specifies the state of the . + + + + + An exception has been thrown, which has left the in an invalid state. + You may call the method to put the in the Closed state. + Any other method calls result in an being thrown. + + + + + The method has been called. + + + + + An object is being written. + + + + + An array is being written. + + + + + A constructor is being written. + + + + + A property is being written. + + + + + A write method has not been called. + + + + diff --git a/北京北汽/SCP/DLL/WebSrvAPITest.dll b/北京北汽/SCP/DLL/WebSrvAPITest.dll new file mode 100644 index 0000000..6b0ec5d Binary files /dev/null and b/北京北汽/SCP/DLL/WebSrvAPITest.dll differ diff --git a/北京北汽/SCP/DLL/WebSrvAPITest.vshost.exe.manifest b/北京北汽/SCP/DLL/WebSrvAPITest.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/北京北汽/SCP/DLL/WebSrvAPITest.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/北京北汽/SCP/DLL/grsvr6.dll b/北京北汽/SCP/DLL/grsvr6.dll new file mode 100644 index 0000000..2c49d76 Binary files /dev/null and b/北京北汽/SCP/DLL/grsvr6.dll differ diff --git a/北京北汽/SCP/DLL/log4net.dll b/北京北汽/SCP/DLL/log4net.dll new file mode 100644 index 0000000..901cadd Binary files /dev/null and b/北京北汽/SCP/DLL/log4net.dll differ diff --git a/北京北汽/SCP/DLL/log4net.xml b/北京北汽/SCP/DLL/log4net.xml new file mode 100644 index 0000000..df56743 --- /dev/null +++ b/北京北汽/SCP/DLL/log4net.xml @@ -0,0 +1,32464 @@ + + + + log4net + + + + + Appender that logs to a database. + + + + appends logging events to a table within a + database. The appender can be configured to specify the connection + string by setting the property. + The connection type (provider) can be specified by setting the + property. For more information on database connection strings for + your specific database see http://www.connectionstrings.com/. + + + Records are written into the database either using a prepared + statement or a stored procedure. The property + is set to (System.Data.CommandType.Text) to specify a prepared statement + or to (System.Data.CommandType.StoredProcedure) to specify a stored + procedure. + + + The prepared statement text or the name of the stored procedure + must be set in the property. + + + The prepared statement or stored procedure can take a number + of parameters. Parameters are added using the + method. This adds a single to the + ordered list of parameters. The + type may be subclassed if required to provide database specific + functionality. The specifies + the parameter name, database type, size, and how the value should + be generated using a . + + + + An example of a SQL Server table that could be logged to: + + CREATE TABLE [dbo].[Log] ( + [ID] [int] IDENTITY (1, 1) NOT NULL , + [Date] [datetime] NOT NULL , + [Thread] [varchar] (255) NOT NULL , + [Level] [varchar] (20) NOT NULL , + [Logger] [varchar] (255) NOT NULL , + [Message] [varchar] (4000) NOT NULL + ) ON [PRIMARY] + + + + An example configuration to log to the above table: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Julian Biddle + Nicko Cadell + Gert Driesen + Lance Nehring + + + + Abstract base class implementation of that + buffers events in a fixed size buffer. + + + + This base class should be used by appenders that need to buffer a + number of events before logging them. For example the + buffers events and then submits the entire contents of the buffer to + the underlying database in one go. + + + Subclasses should override the + method to deliver the buffered events. + + The BufferingAppenderSkeleton maintains a fixed size cyclic + buffer of events. The size of the buffer is set using + the property. + + A is used to inspect + each event as it arrives in the appender. If the + triggers, then the current buffer is sent immediately + (see ). Otherwise the event + is stored in the buffer. For example, an evaluator can be used to + deliver the events immediately when an ERROR event arrives. + + + The buffering appender can be configured in a mode. + By default the appender is NOT lossy. When the buffer is full all + the buffered events are sent with . + If the property is set to true then the + buffer will not be sent when it is full, and new events arriving + in the appender will overwrite the oldest event in the buffer. + In lossy mode the buffer will only be sent when the + triggers. This can be useful behavior when you need to know about + ERROR events but not about events with a lower level, configure an + evaluator that will trigger when an ERROR event arrives, the whole + buffer will be sent which gives a history of events leading up to + the ERROR event. + + + Nicko Cadell + Gert Driesen + + + + Abstract base class implementation of . + + + + This class provides the code for common functionality, such + as support for threshold filtering and support for general filters. + + + Appenders can also implement the interface. Therefore + they would require that the method + be called after the appenders properties have been configured. + + + Nicko Cadell + Gert Driesen + + + + Implement this interface for your own strategies for printing log statements. + + + + Implementors should consider extending the + class which provides a default implementation of this interface. + + + Appenders can also implement the interface. Therefore + they would require that the method + be called after the appenders properties have been configured. + + + Nicko Cadell + Gert Driesen + + + + Closes the appender and releases resources. + + + + Releases any resources allocated within the appender such as file handles, + network connections, etc. + + + It is a programming error to append to a closed appender. + + + + + + Log the logging event in Appender specific way. + + The event to log + + + This method is called to log a message into this appender. + + + + + + Gets or sets the name of this appender. + + The name of the appender. + + The name uniquely identifies the appender. + + + + + Interface for appenders that support bulk logging. + + + + This interface extends the interface to + support bulk logging of objects. Appenders + should only implement this interface if they can bulk log efficiently. + + + Nicko Cadell + + + + Log the array of logging events in Appender specific way. + + The events to log + + + This method is called to log an array of events into this appender. + + + + + + Interface used to delay activate a configured object. + + + + This allows an object to defer activation of its options until all + options have been set. This is required for components which have + related options that remain ambiguous until all are set. + + + If a component implements this interface then the method + must be called by the container after its all the configured properties have been set + and before the component can be used. + + + Nicko Cadell + + + + Activate the options that were previously set with calls to properties. + + + + This allows an object to defer activation of its options until all + options have been set. This is required for components which have + related options that remain ambiguous until all are set. + + + If a component implements this interface then this method must be called + after its properties have been set before the component can be used. + + + + + + Interface that can be implemented by Appenders that buffer logging data and expose a method. + + + + + Flushes any buffered log data. + + + Appenders that implement the method must do so in a thread-safe manner: it can be called concurrently with + the method. + + Typically this is done by locking on the Appender instance, e.g.: + + + + + + The parameter is only relevant for appenders that process logging events asynchronously, + such as . + + + The maximum time to wait for logging events to be flushed. + True if all logging events were flushed successfully, else false. + + + + Initial buffer size + + + + + Maximum buffer size before it is recycled + + + + + Default constructor + + + Empty default constructor + + + + + Finalizes this appender by calling the implementation's + method. + + + + If this appender has not been closed then the Finalize method + will call . + + + + + + Initialize the appender based on the options set + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Closes the appender and release resources. + + + + Release any resources allocated within the appender such as file handles, + network connections, etc. + + + It is a programming error to append to a closed appender. + + + This method cannot be overridden by subclasses. This method + delegates the closing of the appender to the + method which must be overridden in the subclass. + + + + + + Performs threshold checks and invokes filters before + delegating actual logging to the subclasses specific + method. + + The event to log. + + + This method cannot be overridden by derived classes. A + derived class should override the method + which is called by this method. + + + The implementation of this method is as follows: + + + + + + Checks that the severity of the + is greater than or equal to the of this + appender. + + + + Checks that the chain accepts the + . + + + + + Calls and checks that + it returns true. + + + + + If all of the above steps succeed then the + will be passed to the abstract method. + + + + + + Performs threshold checks and invokes filters before + delegating actual logging to the subclasses specific + method. + + The array of events to log. + + + This method cannot be overridden by derived classes. A + derived class should override the method + which is called by this method. + + + The implementation of this method is as follows: + + + + + + Checks that the severity of the + is greater than or equal to the of this + appender. + + + + Checks that the chain accepts the + . + + + + + Calls and checks that + it returns true. + + + + + If all of the above steps succeed then the + will be passed to the method. + + + + + + Test if the logging event should we output by this appender + + the event to test + true if the event should be output, false if the event should be ignored + + + This method checks the logging event against the threshold level set + on this appender and also against the filters specified on this + appender. + + + The implementation of this method is as follows: + + + + + + Checks that the severity of the + is greater than or equal to the of this + appender. + + + + Checks that the chain accepts the + . + + + + + + + + + Adds a filter to the end of the filter chain. + + the filter to add to this appender + + + The Filters are organized in a linked list. + + + Setting this property causes the new filter to be pushed onto the + back of the filter chain. + + + + + + Clears the filter list for this appender. + + + + Clears the filter list for this appender. + + + + + + Checks if the message level is below this appender's threshold. + + to test against. + + + If there is no threshold set, then the return value is always true. + + + + true if the meets the + requirements of this appender. + + + + + Is called when the appender is closed. Derived classes should override + this method if resources need to be released. + + + + Releases any resources allocated within the appender such as file handles, + network connections, etc. + + + It is a programming error to append to a closed appender. + + + + + + Subclasses of should implement this method + to perform actual logging. + + The event to append. + + + A subclass must implement this method to perform + logging of the . + + This method will be called by + if all the conditions listed for that method are met. + + + To restrict the logging of events in the appender + override the method. + + + + + + Append a bulk array of logging events. + + the array of logging events + + + This base class implementation calls the + method for each element in the bulk array. + + + A sub class that can better process a bulk array of events should + override this method in addition to . + + + + + + Called before as a precondition. + + + + This method is called by + before the call to the abstract method. + + + This method can be overridden in a subclass to extend the checks + made before the event is passed to the method. + + + A subclass should ensure that they delegate this call to + this base class if it is overridden. + + + true if the call to should proceed. + + + + Renders the to a string. + + The event to render. + The event rendered as a string. + + + Helper method to render a to + a string. This appender must have a + set to render the to + a string. + + If there is exception data in the logging event and + the layout does not process the exception, this method + will append the exception text to the rendered string. + + + Where possible use the alternative version of this method + . + That method streams the rendering onto an existing Writer + which can give better performance if the caller already has + a open and ready for writing. + + + + + + Renders the to a string. + + The event to render. + The TextWriter to write the formatted event to + + + Helper method to render a to + a string. This appender must have a + set to render the to + a string. + + If there is exception data in the logging event and + the layout does not process the exception, this method + will append the exception text to the rendered string. + + + Use this method in preference to + where possible. If, however, the caller needs to render the event + to a string then does + provide an efficient mechanism for doing so. + + + + + + Flushes any buffered log data. + + + This implementation doesn't flush anything and always returns true + + True if all logging events were flushed successfully, else false. + + + + The layout of this appender. + + + See for more information. + + + + + The name of this appender. + + + See for more information. + + + + + The level threshold of this appender. + + + + There is no level threshold filtering by default. + + + See for more information. + + + + + + It is assumed and enforced that errorHandler is never null. + + + + It is assumed and enforced that errorHandler is never null. + + + See for more information. + + + + + + The first filter in the filter chain. + + + + Set to null initially. + + + See for more information. + + + + + + The last filter in the filter chain. + + + See for more information. + + + + + Flag indicating if this appender is closed. + + + See for more information. + + + + + The guard prevents an appender from repeatedly calling its own DoAppend method + + + + + StringWriter used to render events + + + + + The fully qualified type of the AppenderSkeleton class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Gets or sets the threshold of this appender. + + + The threshold of the appender. + + + + All log events with lower level than the threshold level are ignored + by the appender. + + + In configuration files this option is specified by setting the + value of the option to a level + string, such as "DEBUG", "INFO" and so on. + + + + + + Gets or sets the for this appender. + + The of the appender + + + The provides a default + implementation for the property. + + + + + + The filter chain. + + The head of the filter chain filter chain. + + + Returns the head Filter. The Filters are organized in a linked list + and so all Filters on this Appender are available through the result. + + + + + + Gets or sets the for this appender. + + The layout of the appender. + + + See for more information. + + + + + + + Gets or sets the name of this appender. + + The name of the appender. + + + The name uniquely identifies the appender. + + + + + + Tests if this appender requires a to be set. + + + + In the rather exceptional case, where the appender + implementation admits a layout but can also work without it, + then the appender should return true. + + + This default implementation always returns false. + + + + true if the appender requires a layout object, otherwise false. + + + + + The default buffer size. + + + The default size of the cyclic buffer used to store events. + This is set to 512 by default. + + + + + Initializes a new instance of the class. + + + + Protected default constructor to allow subclassing. + + + + + + Initializes a new instance of the class. + + the events passed through this appender must be + fixed by the time that they arrive in the derived class' SendBuffer method. + + + Protected constructor to allow subclassing. + + + The should be set if the subclass + expects the events delivered to be fixed even if the + is set to zero, i.e. when no buffering occurs. + + + + + + Flushes any buffered log data. + + The maximum time to wait for logging events to be flushed. + True if all logging events were flushed successfully, else false. + + + + Flush the currently buffered events + + + + Flushes any events that have been buffered. + + + If the appender is buffering in mode then the contents + of the buffer will NOT be flushed to the appender. + + + + + + Flush the currently buffered events + + set to true to flush the buffer of lossy events + + + Flushes events that have been buffered. If is + false then events will only be flushed if this buffer is non-lossy mode. + + + If the appender is buffering in mode then the contents + of the buffer will only be flushed if is true. + In this case the contents of the buffer will be tested against the + and if triggering will be output. All other buffered + events will be discarded. + + + If is true then the buffer will always + be emptied by calling this method. + + + + + + Initialize the appender based on the options set + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Close this appender instance. + + + + Close this appender instance. If this appender is marked + as not then the remaining events in + the buffer must be sent when the appender is closed. + + + + + + This method is called by the method. + + the event to log + + + Stores the in the cyclic buffer. + + + The buffer will be sent (i.e. passed to the + method) if one of the following conditions is met: + + + + The cyclic buffer is full and this appender is + marked as not lossy (see ) + + + An is set and + it is triggered for the + specified. + + + + Before the event is stored in the buffer it is fixed + (see ) to ensure that + any data referenced by the event will be valid when the buffer + is processed. + + + + + + Sends the contents of the buffer. + + The first logging event. + The buffer containing the events that need to be send. + + + The subclass must override . + + + + + + Sends the events. + + The events that need to be send. + + + The subclass must override this method to process the buffered events. + + + + + + The size of the cyclic buffer used to hold the logging events. + + + Set to by default. + + + + + The cyclic buffer used to store the logging events. + + + + + The triggering event evaluator that causes the buffer to be sent immediately. + + + The object that is used to determine if an event causes the entire + buffer to be sent immediately. This field can be null, which + indicates that event triggering is not to be done. The evaluator + can be set using the property. If this appender + has the ( property) set to + true then an must be set. + + + + + Indicates if the appender should overwrite events in the cyclic buffer + when it becomes full, or if the buffer should be flushed when the + buffer is full. + + + If this field is set to true then an must + be set. + + + + + The triggering event evaluator filters discarded events. + + + The object that is used to determine if an event that is discarded should + really be discarded or if it should be sent to the appenders. + This field can be null, which indicates that all discarded events will + be discarded. + + + + + Value indicating which fields in the event should be fixed + + + By default all fields are fixed + + + + + The events delivered to the subclass must be fixed. + + + + + Gets or sets a value that indicates whether the appender is lossy. + + + true if the appender is lossy, otherwise false. The default is false. + + + + This appender uses a buffer to store logging events before + delivering them. A triggering event causes the whole buffer + to be send to the remote sink. If the buffer overruns before + a triggering event then logging events could be lost. Set + to false to prevent logging events + from being lost. + + If is set to true then an + must be specified. + + + + + Gets or sets the size of the cyclic buffer used to hold the + logging events. + + + The size of the cyclic buffer used to hold the logging events. + + + + The option takes a positive integer + representing the maximum number of logging events to collect in + a cyclic buffer. When the is reached, + oldest events are deleted as new events are added to the + buffer. By default the size of the cyclic buffer is 512 events. + + + If the is set to a value less than + or equal to 1 then no buffering will occur. The logging event + will be delivered synchronously (depending on the + and properties). Otherwise the event will + be buffered. + + + + + + Gets or sets the that causes the + buffer to be sent immediately. + + + The that causes the buffer to be + sent immediately. + + + + The evaluator will be called for each event that is appended to this + appender. If the evaluator triggers then the current buffer will + immediately be sent (see ). + + If is set to true then an + must be specified. + + + + + Gets or sets the value of the to use. + + + The value of the to use. + + + + The evaluator will be called for each event that is discarded from this + appender. If the evaluator triggers then the current buffer will immediately + be sent (see ). + + + + + + Gets or sets a value indicating if only part of the logging event data + should be fixed. + + + true if the appender should only fix part of the logging event + data, otherwise false. The default is false. + + + + Setting this property to true will cause only part of the + event data to be fixed and serialized. This will improve performance. + + + See for more information. + + + + + + Gets or sets a the fields that will be fixed in the event + + + The event fields that will be fixed before the event is buffered + + + + The logging event needs to have certain thread specific values + captured before it can be buffered. See + for details. + + + + + + + Initializes a new instance of the class. + + + Public default constructor to initialize a new instance of this class. + + + + + Initialize the appender based on the options set + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Override the parent method to close the database + + + + Closes the database command and database connection. + + + + + + Inserts the events into the database. + + The events to insert into the database. + + + Insert all the events specified in the + array into the database. + + + + + + Adds a parameter to the command. + + The parameter to add to the command. + + + Adds a parameter to the ordered list of command parameters. + + + + + + Writes the events to the database using the transaction specified. + + The transaction that the events will be executed under. + The array of events to insert into the database. + + + The transaction argument can be null if the appender has been + configured not to use transactions. See + property for more information. + + + + + + Formats the log message into database statement text. + + The event being logged. + + This method can be overridden by subclasses to provide + more control over the format of the database statement. + + + Text that can be passed to a . + + + + + Creates an instance used to connect to the database. + + + This method is called whenever a new IDbConnection is needed (i.e. when a reconnect is necessary). + + The of the object. + The connectionString output from the ResolveConnectionString method. + An instance with a valid connection string. + + + + Resolves the connection string from the ConnectionString, ConnectionStringName, or AppSettingsKey + property. + + + ConnectiongStringName is only supported on .NET 2.0 and higher. + + Additional information describing the connection string. + A connection string used to connect to the database. + + + + Retrieves the class type of the ADO.NET provider. + + + + Gets the Type of the ADO.NET provider to use to connect to the + database. This method resolves the type specified in the + property. + + + Subclasses can override this method to return a different type + if necessary. + + + The of the ADO.NET provider + + + + Connects to the database. + + + + + Cleanup the existing connection. + + + Calls the IDbConnection's method. + + + + + The list of objects. + + + + The list of objects. + + + + + + The security context to use for privileged calls + + + + + The that will be used + to insert logging events into a database. + + + + + Database connection string. + + + + + The appSettings key from App.Config that contains the connection string. + + + + + The connectionStrings key from App.Config that contains the connection string. + + + + + String type name of the type name. + + + + + The text of the command. + + + + + The command type. + + + + + Indicates whether to use transactions when writing to the database. + + + + + Indicates whether to reconnect when a connection is lost. + + + + + The fully qualified type of the AdoNetAppender class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Gets or sets the database connection string that is used to connect to + the database. + + + The database connection string used to connect to the database. + + + + The connections string is specific to the connection type. + See for more information. + + + Connection string for MS Access via ODBC: + "DSN=MS Access Database;UID=admin;PWD=;SystemDB=C:\data\System.mdw;SafeTransactions = 0;FIL=MS Access;DriverID = 25;DBQ=C:\data\train33.mdb" + + Another connection string for MS Access via ODBC: + "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Work\cvs_root\log4net-1.2\access.mdb;UID=;PWD=;" + + Connection string for MS Access via OLE DB: + "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Work\cvs_root\log4net-1.2\access.mdb;User Id=;Password=;" + + + + + The appSettings key from App.Config that contains the connection string. + + + + + The connectionStrings key from App.Config that contains the connection string. + + + This property requires at least .NET 2.0. + + + + + Gets or sets the type name of the connection + that should be created. + + + The type name of the connection. + + + + The type name of the ADO.NET provider to use. + + + The default is to use the OLE DB provider. + + + Use the OLE DB Provider. This is the default value. + System.Data.OleDb.OleDbConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Use the MS SQL Server Provider. + System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Use the ODBC Provider. + Microsoft.Data.Odbc.OdbcConnection,Microsoft.Data.Odbc,version=1.0.3300.0,publicKeyToken=b77a5c561934e089,culture=neutral + This is an optional package that you can download from + http://msdn.microsoft.com/downloads + search for ODBC .NET Data Provider. + + Use the Oracle Provider. + System.Data.OracleClient.OracleConnection, System.Data.OracleClient, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + This is an optional package that you can download from + http://msdn.microsoft.com/downloads + search for .NET Managed Provider for Oracle. + + + + + Gets or sets the command text that is used to insert logging events + into the database. + + + The command text used to insert logging events into the database. + + + + Either the text of the prepared statement or the + name of the stored procedure to execute to write into + the database. + + + The property determines if + this text is a prepared statement or a stored procedure. + + + If this property is not set, the command text is retrieved by invoking + . + + + + + + Gets or sets the command type to execute. + + + The command type to execute. + + + + This value may be either (System.Data.CommandType.Text) to specify + that the is a prepared statement to execute, + or (System.Data.CommandType.StoredProcedure) to specify that the + property is the name of a stored procedure + to execute. + + + The default value is (System.Data.CommandType.Text). + + + + + + Should transactions be used to insert logging events in the database. + + + true if transactions should be used to insert logging events in + the database, otherwise false. The default value is true. + + + + Gets or sets a value that indicates whether transactions should be used + to insert logging events in the database. + + + When set a single transaction will be used to insert the buffered events + into the database. Otherwise each event will be inserted without using + an explicit transaction. + + + + + + Gets or sets the used to call the NetSend method. + + + The used to call the NetSend method. + + + + Unless a specified here for this appender + the is queried for the + security context to use. The default behavior is to use the security context + of the current thread. + + + + + + Should this appender try to reconnect to the database on error. + + + true if the appender should try to reconnect to the database after an + error has occurred, otherwise false. The default value is false, + i.e. not to try to reconnect. + + + + The default behaviour is for the appender not to try to reconnect to the + database if an error occurs. Subsequent logging events are discarded. + + + To force the appender to attempt to reconnect to the database set this + property to true. + + + When the appender attempts to connect to the database there may be a + delay of up to the connection timeout specified in the connection string. + This delay will block the calling application's thread. + Until the connection can be reestablished this potential delay may occur multiple times. + + + + + + Gets or sets the underlying . + + + The underlying . + + + creates a to insert + logging events into a database. Classes deriving from + can use this property to get or set this . Use the + underlying returned from if + you require access beyond that which provides. + + + + + Parameter type used by the . + + + + This class provides the basic database parameter properties + as defined by the interface. + + This type can be subclassed to provide database specific + functionality. The two methods that are called externally are + and . + + + + + + Initializes a new instance of the class. + + + Default constructor for the AdoNetAppenderParameter class. + + + + + Prepare the specified database command object. + + The command to prepare. + + + Prepares the database command object by adding + this parameter to its collection of parameters. + + + + + + Renders the logging event and set the parameter value in the command. + + The command containing the parameter. + The event to be rendered. + + + Renders the logging event using this parameters layout + object. Sets the value of the parameter on the command object. + + + + + + The name of this parameter. + + + + + The database type for this parameter. + + + + + Flag to infer type rather than use the DbType + + + + + The precision for this parameter. + + + + + The scale for this parameter. + + + + + The size for this parameter. + + + + + The to use to render the + logging event into an object for this parameter. + + + + + Gets or sets the name of this parameter. + + + The name of this parameter. + + + + The name of this parameter. The parameter name + must match up to a named parameter to the SQL stored procedure + or prepared statement. + + + + + + Gets or sets the database type for this parameter. + + + The database type for this parameter. + + + + The database type for this parameter. This property should + be set to the database type from the + enumeration. See . + + + This property is optional. If not specified the ADO.NET provider + will attempt to infer the type from the value. + + + + + + + Gets or sets the precision for this parameter. + + + The precision for this parameter. + + + + The maximum number of digits used to represent the Value. + + + This property is optional. If not specified the ADO.NET provider + will attempt to infer the precision from the value. + + + + + + + Gets or sets the scale for this parameter. + + + The scale for this parameter. + + + + The number of decimal places to which Value is resolved. + + + This property is optional. If not specified the ADO.NET provider + will attempt to infer the scale from the value. + + + + + + + Gets or sets the size for this parameter. + + + The size for this parameter. + + + + The maximum size, in bytes, of the data within the column. + + + This property is optional. If not specified the ADO.NET provider + will attempt to infer the size from the value. + + + For BLOB data types like VARCHAR(max) it may be impossible to infer the value automatically, use -1 as the size in this case. + + + + + + + Gets or sets the to use to + render the logging event into an object for this + parameter. + + + The used to render the + logging event into an object for this parameter. + + + + The that renders the value for this + parameter. + + + The can be used to adapt + any into a + for use in the property. + + + + + + Appends logging events to the terminal using ANSI color escape sequences. + + + + AnsiColorTerminalAppender appends log events to the standard output stream + or the error output stream using a layout specified by the + user. It also allows the color of a specific level of message to be set. + + + This appender expects the terminal to understand the VT100 control set + in order to interpret the color codes. If the terminal or console does not + understand the control codes the behavior is not defined. + + + By default, all output is written to the console's standard output stream. + The property can be set to direct the output to the + error stream. + + + NOTE: This appender writes each message to the System.Console.Out or + System.Console.Error that is set at the time the event is appended. + Therefore it is possible to programmatically redirect the output of this appender + (for example NUnit does this to capture program output). While this is the desired + behavior of this appender it may have security implications in your application. + + + When configuring the ANSI colored terminal appender, a mapping should be + specified to map a logging level to a color. For example: + + + + + + + + + + + + + + + The Level is the standard log4net logging level and ForeColor and BackColor can be any + of the following values: + + Blue + Green + Red + White + Yellow + Purple + Cyan + + These color values cannot be combined together to make new colors. + + + The attributes can be any combination of the following: + + Brightforeground is brighter + Dimforeground is dimmer + Underscoremessage is underlined + Blinkforeground is blinking (does not work on all terminals) + Reverseforeground and background are reversed + Hiddenoutput is hidden + Strikethroughmessage has a line through it + + While any of these attributes may be combined together not all combinations + work well together, for example setting both Bright and Dim attributes makes + no sense. + + + Patrick Wagstrom + Nicko Cadell + + + + The to use when writing to the Console + standard output stream. + + + + The to use when writing to the Console + standard output stream. + + + + + + The to use when writing to the Console + standard error output stream. + + + + The to use when writing to the Console + standard error output stream. + + + + + + Ansi code to reset terminal + + + + + Initializes a new instance of the class. + + + The instance of the class is set up to write + to the standard output stream. + + + + + Add a mapping of level to color + + The mapping to add + + + Add a mapping to this appender. + Each mapping defines the foreground and background colours + for a level. + + + + + + This method is called by the method. + + The event to log. + + + Writes the event to the console. + + + The format of the output will depend on the appender's layout. + + + + + + Initialize the options for this appender + + + + Initialize the level to color mappings set on this appender. + + + + + + Flag to write output to the error stream rather than the standard output stream + + + + + Mapping from level object to color value + + + + + Target is the value of the console output stream. + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + The enum of possible display attributes + + + + The following flags can be combined together to + form the ANSI color attributes. + + + + + + + text is bright + + + + + text is dim + + + + + text is underlined + + + + + text is blinking + + + Not all terminals support this attribute + + + + + text and background colors are reversed + + + + + text is hidden + + + + + text is displayed with a strikethrough + + + + + text color is light + + + + + The enum of possible foreground or background color values for + use with the color mapping method + + + + The output can be in one for the following ANSI colors. + + + + + + + color is black + + + + + color is red + + + + + color is green + + + + + color is yellow + + + + + color is blue + + + + + color is magenta + + + + + color is cyan + + + + + color is white + + + + + A class to act as a mapping between the level that a logging call is made at and + the color it should be displayed as. + + + + Defines the mapping between a level and the color it should be displayed in. + + + + + + An entry in the + + + + This is an abstract base class for types that are stored in the + object. + + + Nicko Cadell + + + + Default protected constructor + + + + Default protected constructor + + + + + + Initialize any options defined on this entry + + + + Should be overridden by any classes that need to initialise based on their options + + + + + + The level that is the key for this mapping + + + The that is the key for this mapping + + + + Get or set the that is the key for this + mapping subclass. + + + + + + Initialize the options for the object + + + + Combine the and together + and append the attributes. + + + + + + The mapped foreground color for the specified level + + + + Required property. + The mapped foreground color for the specified level + + + + + + The mapped background color for the specified level + + + + Required property. + The mapped background color for the specified level + + + + + + The color attributes for the specified level + + + + Required property. + The color attributes for the specified level + + + + + + The combined , and + suitable for setting the ansi terminal color. + + + + + A strongly-typed collection of objects. + + Nicko Cadell + + + + Creates a read-only wrapper for a AppenderCollection instance. + + list to create a readonly wrapper arround + + An AppenderCollection wrapper that is read-only. + + + + + An empty readonly static AppenderCollection + + + + + Initializes a new instance of the AppenderCollection class + that is empty and has the default initial capacity. + + + + + Initializes a new instance of the AppenderCollection class + that has the specified initial capacity. + + + The number of elements that the new AppenderCollection is initially capable of storing. + + + + + Initializes a new instance of the AppenderCollection class + that contains elements copied from the specified AppenderCollection. + + The AppenderCollection whose elements are copied to the new collection. + + + + Initializes a new instance of the AppenderCollection class + that contains elements copied from the specified array. + + The array whose elements are copied to the new list. + + + + Initializes a new instance of the AppenderCollection class + that contains elements copied from the specified collection. + + The collection whose elements are copied to the new list. + + + + Allow subclasses to avoid our default constructors + + + + + + + Copies the entire AppenderCollection to a one-dimensional + array. + + The one-dimensional array to copy to. + + + + Copies the entire AppenderCollection to a one-dimensional + array, starting at the specified index of the target array. + + The one-dimensional array to copy to. + The zero-based index in at which copying begins. + + + + Adds a to the end of the AppenderCollection. + + The to be added to the end of the AppenderCollection. + The index at which the value has been added. + + + + Removes all elements from the AppenderCollection. + + + + + Creates a shallow copy of the . + + A new with a shallow copy of the collection data. + + + + Determines whether a given is in the AppenderCollection. + + The to check for. + true if is found in the AppenderCollection; otherwise, false. + + + + Returns the zero-based index of the first occurrence of a + in the AppenderCollection. + + The to locate in the AppenderCollection. + + The zero-based index of the first occurrence of + in the entire AppenderCollection, if found; otherwise, -1. + + + + + Inserts an element into the AppenderCollection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + is less than zero + -or- + is equal to or greater than . + + + + + Removes the first occurrence of a specific from the AppenderCollection. + + The to remove from the AppenderCollection. + + The specified was not found in the AppenderCollection. + + + + + Removes the element at the specified index of the AppenderCollection. + + The zero-based index of the element to remove. + + is less than zero + -or- + is equal to or greater than . + + + + + Returns an enumerator that can iterate through the AppenderCollection. + + An for the entire AppenderCollection. + + + + Adds the elements of another AppenderCollection to the current AppenderCollection. + + The AppenderCollection whose elements should be added to the end of the current AppenderCollection. + The new of the AppenderCollection. + + + + Adds the elements of a array to the current AppenderCollection. + + The array whose elements should be added to the end of the AppenderCollection. + The new of the AppenderCollection. + + + + Adds the elements of a collection to the current AppenderCollection. + + The collection whose elements should be added to the end of the AppenderCollection. + The new of the AppenderCollection. + + + + Sets the capacity to the actual number of elements. + + + + + Return the collection elements as an array + + the array + + + + is less than zero + -or- + is equal to or greater than . + + + + + is less than zero + -or- + is equal to or greater than . + + + + + Gets the number of elements actually contained in the AppenderCollection. + + + + + Gets a value indicating whether access to the collection is synchronized (thread-safe). + + false, because the backing type is an array, which is never thread-safe. + + + + Gets an object that can be used to synchronize access to the collection. + + + + + Gets or sets the at the specified index. + + The zero-based index of the element to get or set. + + is less than zero + -or- + is equal to or greater than . + + + + + Gets a value indicating whether the collection has a fixed size. + + true if the collection has a fixed size; otherwise, false. The default is false + + + + Gets a value indicating whether the IList is read-only. + + true if the collection is read-only; otherwise, false. The default is false + + + + Gets or sets the number of elements the AppenderCollection can contain. + + + + + Supports type-safe iteration over a . + + + + + + Advances the enumerator to the next element in the collection. + + + true if the enumerator was successfully advanced to the next element; + false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, before the first element in the collection. + + + + + Gets the current element in the collection. + + + + + Type visible only to our subclasses + Used to access protected constructor + + + + + + A value + + + + + Supports simple iteration over a . + + + + + + Initializes a new instance of the Enumerator class. + + + + + + Advances the enumerator to the next element in the collection. + + + true if the enumerator was successfully advanced to the next element; + false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, before the first element in the collection. + + + + + Gets the current element in the collection. + + + + + + + + + Appends log events to the ASP.NET system. + + + + + Diagnostic information and tracing messages that you specify are appended to the output + of the page that is sent to the requesting browser. Optionally, you can view this information + from a separate trace viewer (Trace.axd) that displays trace information for every page in a + given application. + + + Trace statements are processed and displayed only when tracing is enabled. You can control + whether tracing is displayed to a page, to the trace viewer, or both. + + + The logging event is passed to the or + method depending on the level of the logging event. + The event's logger name is the default value for the category parameter of the Write/Warn method. + + + Nicko Cadell + Gert Driesen + Ron Grabowski + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Write the logging event to the ASP.NET trace + + the event to log + + + Write the logging event to the ASP.NET trace + HttpContext.Current.Trace + (). + + + + + + Defaults to %logger + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + The category parameter sent to the Trace method. + + + + Defaults to %logger which will use the logger name of the current + as the category parameter. + + + + + + + + Buffers events and then forwards them to attached appenders. + + + + The events are buffered in this appender until conditions are + met to allow the appender to deliver the events to the attached + appenders. See for the + conditions that cause the buffer to be sent. + + The forwarding appender can be used to specify different + thresholds and filters for the same appender at different locations + within the hierarchy. + + + Nicko Cadell + Gert Driesen + + + + Interface for attaching appenders to objects. + + + + Interface for attaching, removing and retrieving appenders. + + + Nicko Cadell + Gert Driesen + + + + Attaches an appender. + + The appender to add. + + + Add the specified appender. The implementation may + choose to allow or deny duplicate appenders. + + + + + + Gets an attached appender with the specified name. + + The name of the appender to get. + + The appender with the name specified, or null if no appender with the + specified name is found. + + + + Returns an attached appender with the specified. + If no appender with the specified name is found null will be + returned. + + + + + + Removes all attached appenders. + + + + Removes and closes all attached appenders + + + + + + Removes the specified appender from the list of attached appenders. + + The appender to remove. + The appender removed from the list + + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + + Removes the appender with the specified name from the list of appenders. + + The name of the appender to remove. + The appender removed from the list + + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + + Gets all attached appenders. + + + A collection of attached appenders. + + + + Gets a collection of attached appenders. + If there are no attached appenders the + implementation should return an empty + collection rather than null. + + + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Closes the appender and releases resources. + + + + Releases any resources allocated within the appender such as file handles, + network connections, etc. + + + It is a programming error to append to a closed appender. + + + + + + Send the events. + + The events that need to be send. + + + Forwards the events to the attached appenders. + + + + + + Adds an to the list of appenders of this + instance. + + The to add to this appender. + + + If the specified is already in the list of + appenders, then it won't be added again. + + + + + + Looks for the appender with the specified name. + + The name of the appender to lookup. + + The appender with the specified name, or null. + + + + Get the named appender attached to this buffering appender. + + + + + + Removes all previously added appenders from this appender. + + + + This is useful when re-reading configuration information. + + + + + + Removes the specified appender from the list of appenders. + + The appender to remove. + The appender removed from the list + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + Removes the appender with the specified name from the list of appenders. + + The name of the appender to remove. + The appender removed from the list + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + Implementation of the interface + + + + + Gets the appenders contained in this appender as an + . + + + If no appenders can be found, then an + is returned. + + + A collection of the appenders in this appender. + + + + + Appends logging events to the console. + + + + ColoredConsoleAppender appends log events to the standard output stream + or the error output stream using a layout specified by the + user. It also allows the color of a specific type of message to be set. + + + By default, all output is written to the console's standard output stream. + The property can be set to direct the output to the + error stream. + + + NOTE: This appender writes directly to the application's attached console + not to the System.Console.Out or System.Console.Error TextWriter. + The System.Console.Out and System.Console.Error streams can be + programmatically redirected (for example NUnit does this to capture program output). + This appender will ignore these redirections because it needs to use Win32 + API calls to colorize the output. To respect these redirections the + must be used. + + + When configuring the colored console appender, mapping should be + specified to map a logging level to a color. For example: + + + + + + + + + + + + + + The Level is the standard log4net logging level and ForeColor and BackColor can be any + combination of the following values: + + Blue + Green + Red + White + Yellow + Purple + Cyan + HighIntensity + + + + Rick Hobbs + Nicko Cadell + + + + The to use when writing to the Console + standard output stream. + + + + The to use when writing to the Console + standard output stream. + + + + + + The to use when writing to the Console + standard error output stream. + + + + The to use when writing to the Console + standard error output stream. + + + + + + Initializes a new instance of the class. + + + The instance of the class is set up to write + to the standard output stream. + + + + + Initializes a new instance of the class + with the specified layout. + + the layout to use for this appender + + The instance of the class is set up to write + to the standard output stream. + + + + + Initializes a new instance of the class + with the specified layout. + + the layout to use for this appender + flag set to true to write to the console error stream + + When is set to true, output is written to + the standard error output stream. Otherwise, output is written to the standard + output stream. + + + + + Add a mapping of level to color - done by the config file + + The mapping to add + + + Add a mapping to this appender. + Each mapping defines the foreground and background colors + for a level. + + + + + + This method is called by the method. + + The event to log. + + + Writes the event to the console. + + + The format of the output will depend on the appender's layout. + + + + + + Initialize the options for this appender + + + + Initialize the level to color mappings set on this appender. + + + + + + Flag to write output to the error stream rather than the standard output stream + + + + + Mapping from level object to color value + + + + + The console output stream writer to write to + + + + This writer is not thread safe. + + + + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + The enum of possible color values for use with the color mapping method + + + + The following flags can be combined together to + form the colors. + + + + + + + color is blue + + + + + color is green + + + + + color is red + + + + + color is white + + + + + color is yellow + + + + + color is purple + + + + + color is cyan + + + + + color is intensified + + + + + A class to act as a mapping between the level that a logging call is made at and + the color it should be displayed as. + + + + Defines the mapping between a level and the color it should be displayed in. + + + + + + Initialize the options for the object + + + + Combine the and together. + + + + + + The mapped foreground color for the specified level + + + + Required property. + The mapped foreground color for the specified level. + + + + + + The mapped background color for the specified level + + + + Required property. + The mapped background color for the specified level. + + + + + + The combined and suitable for + setting the console color. + + + + + Appends logging events to the console. + + + + ConsoleAppender appends log events to the standard output stream + or the error output stream using a layout specified by the + user. + + + By default, all output is written to the console's standard output stream. + The property can be set to direct the output to the + error stream. + + + NOTE: This appender writes each message to the System.Console.Out or + System.Console.Error that is set at the time the event is appended. + Therefore it is possible to programmatically redirect the output of this appender + (for example NUnit does this to capture program output). While this is the desired + behavior of this appender it may have security implications in your application. + + + Nicko Cadell + Gert Driesen + + + + The to use when writing to the Console + standard output stream. + + + + The to use when writing to the Console + standard output stream. + + + + + + The to use when writing to the Console + standard error output stream. + + + + The to use when writing to the Console + standard error output stream. + + + + + + Initializes a new instance of the class. + + + The instance of the class is set up to write + to the standard output stream. + + + + + Initializes a new instance of the class + with the specified layout. + + the layout to use for this appender + + The instance of the class is set up to write + to the standard output stream. + + + + + Initializes a new instance of the class + with the specified layout. + + the layout to use for this appender + flag set to true to write to the console error stream + + When is set to true, output is written to + the standard error output stream. Otherwise, output is written to the standard + output stream. + + + + + This method is called by the method. + + The event to log. + + + Writes the event to the console. + + + The format of the output will depend on the appender's layout. + + + + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Appends log events to the system. + + + + The application configuration file can be used to control what listeners + are actually used. See the MSDN documentation for the + class for details on configuring the + debug system. + + + Events are written using the + method. The event's logger name is passed as the value for the category name to the Write method. + + + Nicko Cadell + + + + Initializes a new instance of the . + + + + Default constructor. + + + + + + Initializes a new instance of the + with a specified layout. + + The layout to use with this appender. + + + Obsolete constructor. + + + + + + Flushes any buffered log data. + + The maximum time to wait for logging events to be flushed. + True if all logging events were flushed successfully, else false. + + + + Writes the logging event to the system. + + The event to log. + + + Writes the logging event to the system. + If is true then the + is called. + + + + + + Immediate flush means that the underlying writer or output stream + will be flushed at the end of each append operation. + + + + Immediate flush is slower but ensures that each append request is + actually written. If is set to + false, then there is a good chance that the last few + logs events are not actually written to persistent media if and + when the application crashes. + + + The default value is true. + + + + + Defaults to a with %logger as the pattern. + + + + + Gets or sets a value that indicates whether the appender will + flush at the end of each write. + + + The default behavior is to flush at the end of each + write. If the option is set tofalse, then the underlying + stream can defer writing to physical medium to a later time. + + + Avoiding the flush operation at the end of each append results + in a performance gain of 10 to 20 percent. However, there is safety + trade-off involved in skipping flushing. Indeed, when flushing is + skipped, then it is likely that the last few log events will not + be recorded on disk when the application exits. This is a high + price to pay even for a 20% performance gain. + + + + + + Formats the category parameter sent to the Debug method. + + + + Defaults to a with %logger as the pattern which will use the logger name of the current + as the category parameter. + + + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Writes events to the system event log. + + + + The appender will fail if you try to write using an event source that doesn't exist unless it is running with local administrator privileges. + See also http://logging.apache.org/log4net/release/faq.html#trouble-EventLog + + + The EventID of the event log entry can be + set using the EventID property () + on the . + + + The Category of the event log entry can be + set using the Category property () + on the . + + + There is a limit of 32K characters for an event log message + + + When configuring the EventLogAppender a mapping can be + specified to map a logging level to an event log entry type. For example: + + + <mapping> + <level value="ERROR" /> + <eventLogEntryType value="Error" /> + </mapping> + <mapping> + <level value="DEBUG" /> + <eventLogEntryType value="Information" /> + </mapping> + + + The Level is the standard log4net logging level and eventLogEntryType can be any value + from the enum, i.e.: + + Erroran error event + Warninga warning event + Informationan informational event + + + + Aspi Havewala + Douglas de la Torre + Nicko Cadell + Gert Driesen + Thomas Voss + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Initializes a new instance of the class + with the specified . + + The to use with this appender. + + + Obsolete constructor. + + + + + + Add a mapping of level to - done by the config file + + The mapping to add + + + Add a mapping to this appender. + Each mapping defines the event log entry type for a level. + + + + + + Initialize the appender based on the options set + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Create an event log source + + + Uses different API calls under NET_2_0 + + + + + This method is called by the + method. + + the event to log + + Writes the event to the system event log using the + . + + If the event has an EventID property (see ) + set then this integer will be used as the event log event id. + + + There is a limit of 32K characters for an event log message + + + + + + Get the equivalent for a + + the Level to convert to an EventLogEntryType + The equivalent for a + + Because there are fewer applicable + values to use in logging levels than there are in the + this is a one way mapping. There is + a loss of information during the conversion. + + + + + The log name is the section in the event logs where the messages + are stored. + + + + + Name of the application to use when logging. This appears in the + application column of the event log named by . + + + + + The name of the machine which holds the event log. This is + currently only allowed to be '.' i.e. the current machine. + + + + + Mapping from level object to EventLogEntryType + + + + + The security context to use for privileged calls + + + + + The event ID to use unless one is explicitly specified via the LoggingEvent's properties. + + + + + The event category to use unless one is explicitly specified via the LoggingEvent's properties. + + + + + The fully qualified type of the EventLogAppender class. + + + Used by the internal logger to record the Type of the + log message. + + + + + The maximum size supported by default. + + + http://msdn.microsoft.com/en-us/library/xzwc042w(v=vs.100).aspx + The 32766 documented max size is two bytes shy of 32K (I'm assuming 32766 + may leave space for a two byte null terminator of #0#0). The 32766 max + length is what the .NET 4.0 source code checks for, but this is WRONG! + Strings with a length > 31839 on Windows Vista or higher can CORRUPT + the event log! See: System.Diagnostics.EventLogInternal.InternalWriteEvent() + for the use of the 32766 max size. + + + + + The maximum size supported by a windows operating system that is vista + or newer. + + + See ReportEvent API: + http://msdn.microsoft.com/en-us/library/aa363679(VS.85).aspx + ReportEvent's lpStrings parameter: + "A pointer to a buffer containing an array of + null-terminated strings that are merged into the message before Event Viewer + displays the string to the user. This parameter must be a valid pointer + (or NULL), even if wNumStrings is zero. Each string is limited to 31,839 characters." + + Going beyond the size of 31839 will (at some point) corrupt the event log on Windows + Vista or higher! It may succeed for a while...but you will eventually run into the + error: "System.ComponentModel.Win32Exception : A device attached to the system is + not functioning", and the event log will then be corrupt (I was able to corrupt + an event log using a length of 31877 on Windows 7). + + The max size for Windows Vista or higher is documented here: + http://msdn.microsoft.com/en-us/library/xzwc042w(v=vs.100).aspx. + Going over this size may succeed a few times but the buffer will overrun and + eventually corrupt the log (based on testing). + + The maxEventMsgSize size is based on the max buffer size of the lpStrings parameter of the ReportEvent API. + The documented max size for EventLog.WriteEntry for Windows Vista and higher is 31839, but I'm leaving room for a + terminator of #0#0, as we cannot see the source of ReportEvent (though we could use an API monitor to examine the + buffer, given enough time). + + + + + The maximum size that the operating system supports for + a event log message. + + + Used to determine the maximum string length that can be written + to the operating system event log and eventually truncate a string + that exceeds the limits. + + + + + This method determines the maximum event log message size allowed for + the current environment. + + + + + + The name of the log where messages will be stored. + + + The string name of the log where messages will be stored. + + + This is the name of the log as it appears in the Event Viewer + tree. The default value is to log into the Application + log, this is where most applications write their events. However + if you need a separate log for your application (or applications) + then you should set the appropriately. + This should not be used to distinguish your event log messages + from those of other applications, the + property should be used to distinguish events. This property should be + used to group together events into a single log. + + + + + + Property used to set the Application name. This appears in the + event logs when logging. + + + The string used to distinguish events from different sources. + + + Sets the event log source property. + + + + + This property is used to return the name of the computer to use + when accessing the event logs. Currently, this is the current + computer, denoted by a dot "." + + + The string name of the machine holding the event log that + will be logged into. + + + This property cannot be changed. It is currently set to '.' + i.e. the local machine. This may be changed in future. + + + + + Gets or sets the used to write to the EventLog. + + + The used to write to the EventLog. + + + + The system security context used to write to the EventLog. + + + Unless a specified here for this appender + the is queried for the + security context to use. The default behavior is to use the security context + of the current thread. + + + + + + Gets or sets the EventId to use unless one is explicitly specified via the LoggingEvent's properties. + + + + The EventID of the event log entry will normally be + set using the EventID property () + on the . + This property provides the fallback value which defaults to 0. + + + + + + Gets or sets the Category to use unless one is explicitly specified via the LoggingEvent's properties. + + + + The Category of the event log entry will normally be + set using the Category property () + on the . + This property provides the fallback value which defaults to 0. + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + A class to act as a mapping between the level that a logging call is made at and + the color it should be displayed as. + + + + Defines the mapping between a level and its event log entry type. + + + + + + The for this entry + + + + Required property. + The for this entry + + + + + + Appends logging events to a file. + + + + Logging events are sent to the file specified by + the property. + + + The file can be opened in either append or overwrite mode + by specifying the property. + If the file path is relative it is taken as relative from + the application base directory. The file encoding can be + specified by setting the property. + + + The layout's and + values will be written each time the file is opened and closed + respectively. If the property is + then the file may contain multiple copies of the header and footer. + + + This appender will first try to open the file for writing when + is called. This will typically be during configuration. + If the file cannot be opened for writing the appender will attempt + to open the file again each time a message is logged to the appender. + If the file cannot be opened for writing when a message is logged then + the message will be discarded by this appender. + + + The supports pluggable file locking models via + the property. + The default behavior, implemented by + is to obtain an exclusive write lock on the file until this appender is closed. + The alternative models only hold a + write lock while the appender is writing a logging event () + or synchronize by using a named system wide Mutex (). + + + All locking strategies have issues and you should seriously consider using a different strategy that + avoids having multiple processes logging to the same file. + + + Nicko Cadell + Gert Driesen + Rodrigo B. de Oliveira + Douglas de la Torre + Niall Daley + + + + Sends logging events to a . + + + + An Appender that writes to a . + + + This appender may be used stand alone if initialized with an appropriate + writer, however it is typically used as a base class for an appender that + can open a to write to. + + + Nicko Cadell + Gert Driesen + Douglas de la Torre + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Initializes a new instance of the class and + sets the output destination to a new initialized + with the specified . + + The layout to use with this appender. + The to output to. + + + Obsolete constructor. + + + + + + Initializes a new instance of the class and sets + the output destination to the specified . + + The layout to use with this appender + The to output to + + The must have been previously opened. + + + + Obsolete constructor. + + + + + + This method determines if there is a sense in attempting to append. + + + + This method checks if an output target has been set and if a + layout has been set. + + + false if any of the preconditions fail. + + + + This method is called by the + method. + + The event to log. + + + Writes a log statement to the output stream if the output stream exists + and is writable. + + + The format of the output will depend on the appender's layout. + + + + + + This method is called by the + method. + + The array of events to log. + + + This method writes all the bulk logged events to the output writer + before flushing the stream. + + + + + + Close this appender instance. The underlying stream or writer is also closed. + + + Closed appenders cannot be reused. + + + + + Writes the footer and closes the underlying . + + + + Writes the footer and closes the underlying . + + + + + + Closes the underlying . + + + + Closes the underlying . + + + + + + Clears internal references to the underlying + and other variables. + + + + Subclasses can override this method for an alternate closing behavior. + + + + + + Writes a footer as produced by the embedded layout's property. + + + + Writes a footer as produced by the embedded layout's property. + + + + + + Writes a header produced by the embedded layout's property. + + + + Writes a header produced by the embedded layout's property. + + + + + + Called to allow a subclass to lazily initialize the writer + + + + This method is called when an event is logged and the or + have not been set. This allows a subclass to + attempt to initialize the writer multiple times. + + + + + + This is the where logging events + will be written to. + + + + + Immediate flush means that the underlying + or output stream will be flushed at the end of each append operation. + + + + Immediate flush is slower but ensures that each append request is + actually written. If is set to + false, then there is a good chance that the last few + logging events are not actually persisted if and when the application + crashes. + + + The default value is true. + + + + + + The fully qualified type of the TextWriterAppender class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Flushes any buffered log data. + + The maximum time to wait for logging events to be flushed. + True if all logging events were flushed successfully, else false. + + + + Gets or set whether the appender will flush at the end + of each append operation. + + + + The default behavior is to flush at the end of each + append operation. + + + If this option is set to false, then the underlying + stream can defer persisting the logging event to a later + time. + + + + Avoiding the flush operation at the end of each append results in + a performance gain of 10 to 20 percent. However, there is safety + trade-off involved in skipping flushing. Indeed, when flushing is + skipped, then it is likely that the last few log events will not + be recorded on disk when the application exits. This is a high + price to pay even for a 20% performance gain. + + + + + Sets the where the log output will go. + + + + The specified must be open and writable. + + + The will be closed when the appender + instance is closed. + + + Note: Logging to an unopened will fail. + + + + + + Gets or set the and the underlying + , if any, for this appender. + + + The for this appender. + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Gets or sets the where logging events + will be written to. + + + The where logging events are written. + + + + This is the where logging events + will be written to. + + + + + + Default constructor + + + + Default constructor + + + + + + Construct a new appender using the layout, file and append mode. + + the layout to use with this appender + the full path to the file to write to + flag to indicate if the file should be appended to + + + Obsolete constructor. + + + + + + Construct a new appender using the layout and file specified. + The file will be appended to. + + the layout to use with this appender + the full path to the file to write to + + + Obsolete constructor. + + + + + + Activate the options on the file appender. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + This will cause the file to be opened. + + + + + + Closes any previously opened file and calls the parent's . + + + + Resets the filename and the file stream. + + + + + + Close this appender instance. The underlying stream or writer is also closed. + + + + + Called to initialize the file writer + + + + Will be called for each logged message until the file is + successfully opened. + + + + + + This method is called by the + method. + + The event to log. + + + Writes a log statement to the output stream if the output stream exists + and is writable. + + + The format of the output will depend on the appender's layout. + + + + + + This method is called by the + method. + + The array of events to log. + + + Acquires the output file locks once before writing all the events to + the stream. + + + + + + Writes a footer as produced by the embedded layout's property. + + + + Writes a footer as produced by the embedded layout's property. + + + + + + Writes a header produced by the embedded layout's property. + + + + Writes a header produced by the embedded layout's property. + + + + + + Closes the underlying . + + + + Closes the underlying . + + + + + + Closes the previously opened file. + + + + Writes the to the file and then + closes the file. + + + + + + Sets and opens the file where the log output will go. The specified file must be writable. + + The path to the log file. Must be a fully qualified path. + If true will append to fileName. Otherwise will truncate fileName + + + Calls but guarantees not to throw an exception. + Errors are passed to the . + + + + + + Sets and opens the file where the log output will go. The specified file must be writable. + + The path to the log file. Must be a fully qualified path. + If true will append to fileName. Otherwise will truncate fileName + + + If there was already an opened file, then the previous file + is closed first. + + + This method will ensure that the directory structure + for the specified exists. + + + + + + Sets the quiet writer used for file output + + the file stream that has been opened for writing + + + This implementation of creates a + over the and passes it to the + method. + + + This method can be overridden by sub classes that want to wrap the + in some way, for example to encrypt the output + data using a System.Security.Cryptography.CryptoStream. + + + + + + Sets the quiet writer being used. + + the writer over the file stream that has been opened for writing + + + This method can be overridden by sub classes that want to + wrap the in some way. + + + + + + Convert a path into a fully qualified path. + + The path to convert. + The fully qualified path. + + + Converts the path specified to a fully + qualified path. If the path is relative it is + taken as relative from the application base + directory. + + + + + + Flag to indicate if we should append to the file + or overwrite the file. The default is to append. + + + + + The name of the log file. + + + + + The encoding to use for the file stream. + + + + + The security context to use for privileged calls + + + + + The stream to log to. Has added locking semantics + + + + + The locking model to use + + + + + The fully qualified type of the FileAppender class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Gets or sets the path to the file that logging will be written to. + + + The path to the file that logging will be written to. + + + + If the path is relative it is taken as relative from + the application base directory. + + + + + + Gets or sets a flag that indicates whether the file should be + appended to or overwritten. + + + Indicates whether the file should be appended to or overwritten. + + + + If the value is set to false then the file will be overwritten, if + it is set to true then the file will be appended to. + + The default value is true. + + + + + Gets or sets used to write to the file. + + + The used to write to the file. + + + + The default encoding set is + which is the encoding for the system's current ANSI code page. + + + + + + Gets or sets the used to write to the file. + + + The used to write to the file. + + + + Unless a specified here for this appender + the is queried for the + security context to use. The default behavior is to use the security context + of the current thread. + + + + + + Gets or sets the used to handle locking of the file. + + + The used to lock the file. + + + + Gets or sets the used to handle locking of the file. + + + There are three built in locking models, , and . + The first locks the file from the start of logging to the end, the + second locks only for the minimal amount of time when logging each message + and the last synchronizes processes using a named system wide Mutex. + + + The default locking model is the . + + + + + + Write only that uses the + to manage access to an underlying resource. + + + + + True asynchronous writes are not supported, the implementation forces a synchronous write. + + + + + Exception base type for log4net. + + + + This type extends . It + does not add any new functionality but does differentiate the + type of exception being thrown. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Constructor + + A message to include with the exception. + + + Initializes a new instance of the class with + the specified message. + + + + + + Constructor + + A message to include with the exception. + A nested exception to include. + + + Initializes a new instance of the class + with the specified message and inner exception. + + + + + + Serialization constructor + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + Initializes a new instance of the class + with serialized data. + + + + + + Locking model base class + + + + Base class for the locking models available to the derived loggers. + + + + + + Open the output file + + The filename to use + Whether to append to the file, or overwrite + The encoding to use + + + Open the file specified and prepare for logging. + No writes will be made until is called. + Must be called before any calls to , + and . + + + + + + Close the file + + + + Close the file. No further writes will be made. + + + + + + Initializes all resources used by this locking model. + + + + + Disposes all resources that were initialized by this locking model. + + + + + Acquire the lock on the file + + A stream that is ready to be written to. + + + Acquire the lock on the file in preparation for writing to it. + Return a stream pointing to the file. + must be called to release the lock on the output file. + + + + + + Release the lock on the file + + + + Release the lock on the file. No further writes will be made to the + stream until is called again. + + + + + + Helper method that creates a FileStream under CurrentAppender's SecurityContext. + + + + Typically called during OpenFile or AcquireLock. + + + If the directory portion of the does not exist, it is created + via Directory.CreateDirecctory. + + + + + + + + + + Helper method to close under CurrentAppender's SecurityContext. + + + Does not set to null. + + + + + + Gets or sets the for this LockingModel + + + The for this LockingModel + + + + The file appender this locking model is attached to and working on + behalf of. + + + The file appender is used to locate the security context and the error handler to use. + + + The value of this property will be set before is + called. + + + + + + Hold an exclusive lock on the output file + + + + Open the file once for writing and hold it open until is called. + Maintains an exclusive lock on the file during this time. + + + + + + Open the file specified and prepare for logging. + + The filename to use + Whether to append to the file, or overwrite + The encoding to use + + + Open the file specified and prepare for logging. + No writes will be made until is called. + Must be called before any calls to , + and . + + + + + + Close the file + + + + Close the file. No further writes will be made. + + + + + + Acquire the lock on the file + + A stream that is ready to be written to. + + + Does nothing. The lock is already taken + + + + + + Release the lock on the file + + + + Does nothing. The lock will be released when the file is closed. + + + + + + Initializes all resources used by this locking model. + + + + + Disposes all resources that were initialized by this locking model. + + + + + Acquires the file lock for each write + + + + Opens the file once for each / cycle, + thus holding the lock for the minimal amount of time. This method of locking + is considerably slower than but allows + other processes to move/delete the log file whilst logging continues. + + + + + + Prepares to open the file when the first message is logged. + + The filename to use + Whether to append to the file, or overwrite + The encoding to use + + + Open the file specified and prepare for logging. + No writes will be made until is called. + Must be called before any calls to , + and . + + + + + + Close the file + + + + Close the file. No further writes will be made. + + + + + + Acquire the lock on the file + + A stream that is ready to be written to. + + + Acquire the lock on the file in preparation for writing to it. + Return a stream pointing to the file. + must be called to release the lock on the output file. + + + + + + Release the lock on the file + + + + Release the lock on the file. No further writes will be made to the + stream until is called again. + + + + + + Initializes all resources used by this locking model. + + + + + Disposes all resources that were initialized by this locking model. + + + + + Provides cross-process file locking. + + Ron Grabowski + Steve Wranovsky + + + + Open the file specified and prepare for logging. + + The filename to use + Whether to append to the file, or overwrite + The encoding to use + + + Open the file specified and prepare for logging. + No writes will be made until is called. + Must be called before any calls to , + - and . + + + + + + Close the file + + + + Close the file. No further writes will be made. + + + + + + Acquire the lock on the file + + A stream that is ready to be written to. + + + Does nothing. The lock is already taken + + + + + + Releases the lock and allows others to acquire a lock. + + + + + Initializes all resources used by this locking model. + + + + + Disposes all resources that were initialized by this locking model. + + + + + This appender forwards logging events to attached appenders. + + + + The forwarding appender can be used to specify different thresholds + and filters for the same appender at different locations within the hierarchy. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Closes the appender and releases resources. + + + + Releases any resources allocated within the appender such as file handles, + network connections, etc. + + + It is a programming error to append to a closed appender. + + + + + + Forward the logging event to the attached appenders + + The event to log. + + + Delivers the logging event to all the attached appenders. + + + + + + Forward the logging events to the attached appenders + + The array of events to log. + + + Delivers the logging events to all the attached appenders. + + + + + + Adds an to the list of appenders of this + instance. + + The to add to this appender. + + + If the specified is already in the list of + appenders, then it won't be added again. + + + + + + Looks for the appender with the specified name. + + The name of the appender to lookup. + + The appender with the specified name, or null. + + + + Get the named appender attached to this appender. + + + + + + Removes all previously added appenders from this appender. + + + + This is useful when re-reading configuration information. + + + + + + Removes the specified appender from the list of appenders. + + The appender to remove. + The appender removed from the list + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + Removes the appender with the specified name from the list of appenders. + + The name of the appender to remove. + The appender removed from the list + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + Implementation of the interface + + + + + Gets the appenders contained in this appender as an + . + + + If no appenders can be found, then an + is returned. + + + A collection of the appenders in this appender. + + + + + Logs events to a local syslog service. + + + + This appender uses the POSIX libc library functions openlog, syslog, and closelog. + If these functions are not available on the local system then this appender will not work! + + + The functions openlog, syslog, and closelog are specified in SUSv2 and + POSIX 1003.1-2001 standards. These are used to log messages to the local syslog service. + + + This appender talks to a local syslog service. If you need to log to a remote syslog + daemon and you cannot configure your local syslog service to do this you may be + able to use the to log via UDP. + + + Syslog messages must have a facility and and a severity. The severity + is derived from the Level of the logging event. + The facility must be chosen from the set of defined syslog + values. The facilities list is predefined + and cannot be extended. + + + An identifier is specified with each log message. This can be specified + by setting the property. The identity (also know + as the tag) must not contain white space. The default value for the + identity is the application name (from ). + + + Rob Lyon + Nicko Cadell + + + + Initializes a new instance of the class. + + + This instance of the class is set up to write + to a local syslog service. + + + + + Add a mapping of level to severity + + The mapping to add + + + Adds a to this appender. + + + + + + Initialize the appender based on the options set. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + This method is called by the method. + + The event to log. + + + Writes the event to a remote syslog daemon. + + + The format of the output will depend on the appender's layout. + + + + + + Close the syslog when the appender is closed + + + + Close the syslog when the appender is closed + + + + + + Translates a log4net level to a syslog severity. + + A log4net level. + A syslog severity. + + + Translates a log4net level to a syslog severity. + + + + + + Generate a syslog priority. + + The syslog facility. + The syslog severity. + A syslog priority. + + + + The facility. The default facility is . + + + + + The message identity + + + + + Marshaled handle to the identity string. We have to hold on to the + string as the openlog and syslog APIs just hold the + pointer to the ident and dereference it for each log message. + + + + + Mapping from level object to syslog severity + + + + + Open connection to system logger. + + + + + Generate a log message. + + + + The libc syslog method takes a format string and a variable argument list similar + to the classic printf function. As this type of vararg list is not supported + by C# we need to specify the arguments explicitly. Here we have specified the + format string with a single message argument. The caller must set the format + string to "%s". + + + + + + Close descriptor used to write to system logger. + + + + + Message identity + + + + An identifier is specified with each log message. This can be specified + by setting the property. The identity (also know + as the tag) must not contain white space. The default value for the + identity is the application name (from ). + + + + + + Syslog facility + + + Set to one of the values. The list of + facilities is predefined and cannot be extended. The default value + is . + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + syslog severities + + + + The log4net Level maps to a syslog severity using the + method and the + class. The severity is set on . + + + + + + system is unusable + + + + + action must be taken immediately + + + + + critical conditions + + + + + error conditions + + + + + warning conditions + + + + + normal but significant condition + + + + + informational + + + + + debug-level messages + + + + + syslog facilities + + + + The syslog facility defines which subsystem the logging comes from. + This is set on the property. + + + + + + kernel messages + + + + + random user-level messages + + + + + mail system + + + + + system daemons + + + + + security/authorization messages + + + + + messages generated internally by syslogd + + + + + line printer subsystem + + + + + network news subsystem + + + + + UUCP subsystem + + + + + clock (cron/at) daemon + + + + + security/authorization messages (private) + + + + + ftp daemon + + + + + NTP subsystem + + + + + log audit + + + + + log alert + + + + + clock daemon + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + A class to act as a mapping between the level that a logging call is made at and + the syslog severity that is should be logged at. + + + + A class to act as a mapping between the level that a logging call is made at and + the syslog severity that is should be logged at. + + + + + + The mapped syslog severity for the specified level + + + + Required property. + The mapped syslog severity for the specified level + + + + + + Appends colorful logging events to the console, using the .NET 2 + built-in capabilities. + + + + ManagedColoredConsoleAppender appends log events to the standard output stream + or the error output stream using a layout specified by the + user. It also allows the color of a specific type of message to be set. + + + By default, all output is written to the console's standard output stream. + The property can be set to direct the output to the + error stream. + + + When configuring the colored console appender, mappings should be + specified to map logging levels to colors. For example: + + + + + + + + + + + + + + + + + + + + + + The Level is the standard log4net logging level while + ForeColor and BackColor are the values of + enumeration. + + + Based on the ColoredConsoleAppender + + + Rick Hobbs + Nicko Cadell + Pavlos Touboulidis + + + + The to use when writing to the Console + standard output stream. + + + + The to use when writing to the Console + standard output stream. + + + + + + The to use when writing to the Console + standard error output stream. + + + + The to use when writing to the Console + standard error output stream. + + + + + + Initializes a new instance of the class. + + + The instance of the class is set up to write + to the standard output stream. + + + + + Add a mapping of level to color - done by the config file + + The mapping to add + + + Add a mapping to this appender. + Each mapping defines the foreground and background colors + for a level. + + + + + + This method is called by the method. + + The event to log. + + + Writes the event to the console. + + + The format of the output will depend on the appender's layout. + + + + + + Initialize the options for this appender + + + + Initialize the level to color mappings set on this appender. + + + + + + Flag to write output to the error stream rather than the standard output stream + + + + + Mapping from level object to color value + + + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + A class to act as a mapping between the level that a logging call is made at and + the color it should be displayed as. + + + + Defines the mapping between a level and the color it should be displayed in. + + + + + + The mapped foreground color for the specified level + + + + Required property. + The mapped foreground color for the specified level. + + + + + + The mapped background color for the specified level + + + + Required property. + The mapped background color for the specified level. + + + + + + Stores logging events in an array. + + + + The memory appender stores all the logging events + that are appended in an in-memory array. + + + Use the method to get + and clear the current list of events that have been appended. + + + Use the method to get the current + list of events that have been appended. Note there is a + race-condition when calling and + in pairs, you better use in that case. + + + Use the method to clear the + current list of events. Note there is a + race-condition when calling and + in pairs, you better use in that case. + + + Julian Biddle + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Gets the events that have been logged. + + The events that have been logged + + + Gets the events that have been logged. + + + + + + This method is called by the method. + + the event to log + + Stores the in the events list. + + + + + Clear the list of events + + + Clear the list of events + + + + + Gets the events that have been logged and clears the list of events. + + The events that have been logged + + + Gets the events that have been logged and clears the list of events. + + + + + + The list of events that have been appended. + + + + + Value indicating which fields in the event should be fixed + + + By default all fields are fixed + + + + + Gets or sets a value indicating whether only part of the logging event + data should be fixed. + + + true if the appender should only fix part of the logging event + data, otherwise false. The default is false. + + + + Setting this property to true will cause only part of the event + data to be fixed and stored in the appender, hereby improving performance. + + + See for more information. + + + + + + Gets or sets the fields that will be fixed in the event + + + + The logging event needs to have certain thread specific values + captured before it can be buffered. See + for details. + + + + + + Logs entries by sending network messages using the + native function. + + + + You can send messages only to names that are active + on the network. If you send the message to a user name, + that user must be logged on and running the Messenger + service to receive the message. + + + The receiver will get a top most window displaying the + messages one at a time, therefore this appender should + not be used to deliver a high volume of messages. + + + The following table lists some possible uses for this appender : + + + + + Action + Property Value(s) + + + Send a message to a user account on the local machine + + + = <name of the local machine> + + + = <user name> + + + + + Send a message to a user account on a remote machine + + + = <name of the remote machine> + + + = <user name> + + + + + Send a message to a domain user account + + + = <name of a domain controller | uninitialized> + + + = <user name> + + + + + Send a message to all the names in a workgroup or domain + + + = <workgroup name | domain name>* + + + + + Send a message from the local machine to a remote machine + + + = <name of the local machine | uninitialized> + + + = <name of the remote machine> + + + + + + + Note : security restrictions apply for sending + network messages, see + for more information. + + + + + An example configuration section to log information + using this appender from the local machine, named + LOCAL_PC, to machine OPERATOR_PC : + + + + + + + + + + Nicko Cadell + Gert Driesen + + + + The DNS or NetBIOS name of the server on which the function is to execute. + + + + + The sender of the network message. + + + + + The message alias to which the message should be sent. + + + + + The security context to use for privileged calls + + + + + Initializes the appender. + + + The default constructor initializes all fields to their default values. + + + + + Initialize the appender based on the options set. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + The appender will be ignored if no was specified. + + + The required property was not specified. + + + + This method is called by the method. + + The event to log. + + + Sends the event using a network message. + + + + + + Sends a buffer of information to a registered message alias. + + The DNS or NetBIOS name of the server on which the function is to execute. + The message alias to which the message buffer should be sent + The originator of the message. + The message text. + The length, in bytes, of the message text. + + + The following restrictions apply for sending network messages: + + + + + Platform + Requirements + + + Windows NT + + + No special group membership is required to send a network message. + + + Admin, Accounts, Print, or Server Operator group membership is required to + successfully send a network message on a remote server. + + + + + Windows 2000 or later + + + If you send a message on a domain controller that is running Active Directory, + access is allowed or denied based on the access control list (ACL) for the securable + object. The default ACL permits only Domain Admins and Account Operators to send a network message. + + + On a member server or workstation, only Administrators and Server Operators can send a network message. + + + + + + + For more information see Security Requirements for the Network Management Functions. + + + + + If the function succeeds, the return value is zero. + + + + + + Gets or sets the sender of the message. + + + The sender of the message. + + + If this property is not specified, the message is sent from the local computer. + + + + + Gets or sets the message alias to which the message should be sent. + + + The recipient of the message. + + + This property should always be specified in order to send a message. + + + + + Gets or sets the DNS or NetBIOS name of the remote server on which the function is to execute. + + + DNS or NetBIOS name of the remote server on which the function is to execute. + + + + For Windows NT 4.0 and earlier, the string should begin with \\. + + + If this property is not specified, the local computer is used. + + + + + + Gets or sets the used to call the NetSend method. + + + The used to call the NetSend method. + + + + Unless a specified here for this appender + the is queried for the + security context to use. The default behavior is to use the security context + of the current thread. + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Appends log events to the OutputDebugString system. + + + + OutputDebugStringAppender appends log events to the + OutputDebugString system. + + + The string is passed to the native OutputDebugString + function. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Write the logging event to the output debug string API + + the event to log + + + Write the logging event to the output debug string API + + + + + + Stub for OutputDebugString native method + + the string to output + + + Stub for OutputDebugString native method + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Logs events to a remote syslog daemon. + + + + The BSD syslog protocol is used to remotely log to + a syslog daemon. The syslogd listens for for messages + on UDP port 514. + + + The syslog UDP protocol is not authenticated. Most syslog daemons + do not accept remote log messages because of the security implications. + You may be able to use the LocalSyslogAppender to talk to a local + syslog service. + + + There is an RFC 3164 that claims to document the BSD Syslog Protocol. + This RFC can be seen here: http://www.faqs.org/rfcs/rfc3164.html. + This appender generates what the RFC calls an "Original Device Message", + i.e. does not include the TIMESTAMP or HOSTNAME fields. By observation + this format of message will be accepted by all current syslog daemon + implementations. The daemon will attach the current time and the source + hostname or IP address to any messages received. + + + Syslog messages must have a facility and and a severity. The severity + is derived from the Level of the logging event. + The facility must be chosen from the set of defined syslog + values. The facilities list is predefined + and cannot be extended. + + + An identifier is specified with each log message. This can be specified + by setting the property. The identity (also know + as the tag) must not contain white space. The default value for the + identity is the application name (from ). + + + Rob Lyon + Nicko Cadell + + + + Sends logging events as connectionless UDP datagrams to a remote host or a + multicast group using an . + + + + UDP guarantees neither that messages arrive, nor that they arrive in the correct order. + + + To view the logging results, a custom application can be developed that listens for logging + events. + + + When decoding events send via this appender remember to use the same encoding + to decode the events as was used to send the events. See the + property to specify the encoding to use. + + + + This example shows how to log receive logging events that are sent + on IP address 244.0.0.1 and port 8080 to the console. The event is + encoded in the packet as a unicode string and it is decoded as such. + + IPEndPoint remoteEndPoint = new IPEndPoint(IPAddress.Any, 0); + UdpClient udpClient; + byte[] buffer; + string loggingEvent; + + try + { + udpClient = new UdpClient(8080); + + while(true) + { + buffer = udpClient.Receive(ref remoteEndPoint); + loggingEvent = System.Text.Encoding.Unicode.GetString(buffer); + Console.WriteLine(loggingEvent); + } + } + catch(Exception e) + { + Console.WriteLine(e.ToString()); + } + + + Dim remoteEndPoint as IPEndPoint + Dim udpClient as UdpClient + Dim buffer as Byte() + Dim loggingEvent as String + + Try + remoteEndPoint = new IPEndPoint(IPAddress.Any, 0) + udpClient = new UdpClient(8080) + + While True + buffer = udpClient.Receive(ByRef remoteEndPoint) + loggingEvent = System.Text.Encoding.Unicode.GetString(buffer) + Console.WriteLine(loggingEvent) + Wend + Catch e As Exception + Console.WriteLine(e.ToString()) + End Try + + + An example configuration section to log information using this appender to the + IP 224.0.0.1 on port 8080: + + + + + + + + + + Gert Driesen + Nicko Cadell + + + + Initializes a new instance of the class. + + + The default constructor initializes all fields to their default values. + + + + + Initialize the appender based on the options set. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + The appender will be ignored if no was specified or + an invalid remote or local TCP port number was specified. + + + The required property was not specified. + The TCP port number assigned to or is less than or greater than . + + + + This method is called by the method. + + The event to log. + + + Sends the event using an UDP datagram. + + + Exceptions are passed to the . + + + + + + Closes the UDP connection and releases all resources associated with + this instance. + + + + Disables the underlying and releases all managed + and unmanaged resources associated with the . + + + + + + Initializes the underlying connection. + + + + The underlying is initialized and binds to the + port number from which you intend to communicate. + + + Exceptions are passed to the . + + + + + + The IP address of the remote host or multicast group to which + the logging event will be sent. + + + + + The TCP port number of the remote host or multicast group to + which the logging event will be sent. + + + + + The cached remote endpoint to which the logging events will be sent. + + + + + The TCP port number from which the will communicate. + + + + + The instance that will be used for sending the + logging events. + + + + + The encoding to use for the packet. + + + + + Gets or sets the IP address of the remote host or multicast group to which + the underlying should sent the logging event. + + + The IP address of the remote host or multicast group to which the logging event + will be sent. + + + + Multicast addresses are identified by IP class D addresses (in the range 224.0.0.0 to + 239.255.255.255). Multicast packets can pass across different networks through routers, so + it is possible to use multicasts in an Internet scenario as long as your network provider + supports multicasting. + + + Hosts that want to receive particular multicast messages must register their interest by joining + the multicast group. Multicast messages are not sent to networks where no host has joined + the multicast group. Class D IP addresses are used for multicast groups, to differentiate + them from normal host addresses, allowing nodes to easily detect if a message is of interest. + + + Static multicast addresses that are needed globally are assigned by IANA. A few examples are listed in the table below: + + + + + IP Address + Description + + + 224.0.0.1 + + + Sends a message to all system on the subnet. + + + + + 224.0.0.2 + + + Sends a message to all routers on the subnet. + + + + + 224.0.0.12 + + + The DHCP server answers messages on the IP address 224.0.0.12, but only on a subnet. + + + + + + + A complete list of actually reserved multicast addresses and their owners in the ranges + defined by RFC 3171 can be found at the IANA web site. + + + The address range 239.0.0.0 to 239.255.255.255 is reserved for administrative scope-relative + addresses. These addresses can be reused with other local groups. Routers are typically + configured with filters to prevent multicast traffic in this range from flowing outside + of the local network. + + + + + + Gets or sets the TCP port number of the remote host or multicast group to which + the underlying should sent the logging event. + + + An integer value in the range to + indicating the TCP port number of the remote host or multicast group to which the logging event + will be sent. + + + The underlying will send messages to this TCP port number + on the remote host or multicast group. + + The value specified is less than or greater than . + + + + Gets or sets the TCP port number from which the underlying will communicate. + + + An integer value in the range to + indicating the TCP port number from which the underlying will communicate. + + + + The underlying will bind to this port for sending messages. + + + Setting the value to 0 (the default) will cause the udp client not to bind to + a local port. + + + The value specified is less than or greater than . + + + + Gets or sets used to write the packets. + + + The used to write the packets. + + + + The used to write the packets. + + + + + + Gets or sets the underlying . + + + The underlying . + + + creates a to send logging events + over a network. Classes deriving from can use this + property to get or set this . Use the underlying + returned from if you require access beyond that which + provides. + + + + + Gets or sets the cached remote endpoint to which the logging events should be sent. + + + The cached remote endpoint to which the logging events will be sent. + + + The method will initialize the remote endpoint + with the values of the and + properties. + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Syslog port 514 + + + + + Initial buffer size + + + + + Maximum buffer size before it is recycled + + + + + Initializes a new instance of the class. + + + This instance of the class is set up to write + to a remote syslog daemon. + + + + + Add a mapping of level to severity + + The mapping to add + + + Add a mapping to this appender. + + + + + + This method is called by the method. + + The event to log. + + + Writes the event to a remote syslog daemon. + + + The format of the output will depend on the appender's layout. + + + + + + Initialize the options for this appender + + + + Initialize the level to syslog severity mappings set on this appender. + + + + + + Translates a log4net level to a syslog severity. + + A log4net level. + A syslog severity. + + + Translates a log4net level to a syslog severity. + + + + + + Generate a syslog priority. + + The syslog facility. + The syslog severity. + A syslog priority. + + + Generate a syslog priority. + + + + + + The facility. The default facility is . + + + + + The message identity + + + + + Mapping from level object to syslog severity + + + + + Message identity + + + + An identifier is specified with each log message. This can be specified + by setting the property. The identity (also know + as the tag) must not contain white space. The default value for the + identity is the application name (from ). + + + + + + Syslog facility + + + Set to one of the values. The list of + facilities is predefined and cannot be extended. The default value + is . + + + + + syslog severities + + + + The syslog severities. + + + + + + system is unusable + + + + + action must be taken immediately + + + + + critical conditions + + + + + error conditions + + + + + warning conditions + + + + + normal but significant condition + + + + + informational + + + + + debug-level messages + + + + + syslog facilities + + + + The syslog facilities + + + + + + kernel messages + + + + + random user-level messages + + + + + mail system + + + + + system daemons + + + + + security/authorization messages + + + + + messages generated internally by syslogd + + + + + line printer subsystem + + + + + network news subsystem + + + + + UUCP subsystem + + + + + clock (cron/at) daemon + + + + + security/authorization messages (private) + + + + + ftp daemon + + + + + NTP subsystem + + + + + log audit + + + + + log alert + + + + + clock daemon + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + A class to act as a mapping between the level that a logging call is made at and + the syslog severity that is should be logged at. + + + + A class to act as a mapping between the level that a logging call is made at and + the syslog severity that is should be logged at. + + + + + + The mapped syslog severity for the specified level + + + + Required property. + The mapped syslog severity for the specified level + + + + + + Delivers logging events to a remote logging sink. + + + + This Appender is designed to deliver events to a remote sink. + That is any object that implements the + interface. It delivers the events using .NET remoting. The + object to deliver events to is specified by setting the + appenders property. + + The RemotingAppender buffers events before sending them. This allows it to + make more efficient use of the remoting infrastructure. + + Once the buffer is full the events are still not sent immediately. + They are scheduled to be sent using a pool thread. The effect is that + the send occurs asynchronously. This is very important for a + number of non obvious reasons. The remoting infrastructure will + flow thread local variables (stored in the ), + if they are marked as , across the + remoting boundary. If the server is not contactable then + the remoting infrastructure will clear the + objects from the . To prevent a logging failure from + having side effects on the calling application the remoting call must be made + from a separate thread to the one used by the application. A + thread is used for this. If no thread is available then + the events will block in the thread pool manager until a thread is available. + + Because the events are sent asynchronously using pool threads it is possible to close + this appender before all the queued events have been sent. + When closing the appender attempts to wait until all the queued events have been sent, but + this will timeout after 30 seconds regardless. + + If this appender is being closed because the + event has fired it may not be possible to send all the queued events. During process + exit the runtime limits the time that a + event handler is allowed to run for. If the runtime terminates the threads before + the queued events have been sent then they will be lost. To ensure that all events + are sent the appender must be closed before the application exits. See + for details on how to shutdown + log4net programmatically. + + + Nicko Cadell + Gert Driesen + Daniel Cazzulino + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Initialize the appender based on the options set + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Send the contents of the buffer to the remote sink. + + + The events are not sent immediately. They are scheduled to be sent + using a pool thread. The effect is that the send occurs asynchronously. + This is very important for a number of non obvious reasons. The remoting + infrastructure will flow thread local variables (stored in the ), + if they are marked as , across the + remoting boundary. If the server is not contactable then + the remoting infrastructure will clear the + objects from the . To prevent a logging failure from + having side effects on the calling application the remoting call must be made + from a separate thread to the one used by the application. A + thread is used for this. If no thread is available then + the events will block in the thread pool manager until a thread is available. + + The events to send. + + + + Override base class close. + + + + This method waits while there are queued work items. The events are + sent asynchronously using work items. These items + will be sent once a thread pool thread is available to send them, therefore + it is possible to close the appender before all the queued events have been + sent. + + This method attempts to wait until all the queued events have been sent, but this + method will timeout after 30 seconds regardless. + + If the appender is being closed because the + event has fired it may not be possible to send all the queued events. During process + exit the runtime limits the time that a + event handler is allowed to run for. + + + + + Flushes any buffered log data. + + The maximum time to wait for logging events to be flushed. + True if all logging events were flushed successfully, else false. + + + + A work item is being queued into the thread pool + + + + + A work item from the thread pool has completed + + + + + Send the contents of the buffer to the remote sink. + + + This method is designed to be used with the . + This method expects to be passed an array of + objects in the state param. + + the logging events to send + + + + The URL of the remote sink. + + + + + The local proxy (.NET remoting) for the remote logging sink. + + + + + The number of queued callbacks currently waiting or executing + + + + + Event used to signal when there are no queued work items + + + This event is set when there are no queued work items. In this + state it is safe to close the appender. + + + + + Gets or sets the URL of the well-known object that will accept + the logging events. + + + The well-known URL of the remote sink. + + + + The URL of the remoting sink that will accept logging events. + The sink must implement the + interface. + + + + + + Interface used to deliver objects to a remote sink. + + + This interface must be implemented by a remoting sink + if the is to be used + to deliver logging events to the sink. + + + + + Delivers logging events to the remote sink + + Array of events to log. + + + Delivers logging events to the remote sink + + + + + + Appender that rolls log files based on size or date or both. + + + + RollingFileAppender can roll log files based on size or date or both + depending on the setting of the property. + When set to the log file will be rolled + once its size exceeds the . + When set to the log file will be rolled + once the date boundary specified in the property + is crossed. + When set to the log file will be + rolled once the date boundary specified in the property + is crossed, but within a date boundary the file will also be rolled + once its size exceeds the . + When set to the log file will be rolled when + the appender is configured. This effectively means that the log file can be + rolled once per program execution. + + + A of few additional optional features have been added: + + Attach date pattern for current log file + Backup number increments for newer files + Infinite number of backups by file size + + + + + + For large or infinite numbers of backup files a + greater than zero is highly recommended, otherwise all the backup files need + to be renamed each time a new backup is created. + + + When Date/Time based rolling is used setting + to will reduce the number of file renamings to few or none. + + + + + + Changing or without clearing + the log file directory of backup files will cause unexpected and unwanted side effects. + + + + + If Date/Time based rolling is enabled this appender will attempt to roll existing files + in the directory without a Date/Time tag based on the last write date of the base log file. + The appender only rolls the log file when a message is logged. If Date/Time based rolling + is enabled then the appender will not roll the log file at the Date/Time boundary but + at the point when the next message is logged after the boundary has been crossed. + + + + The extends the and + has the same behavior when opening the log file. + The appender will first try to open the file for writing when + is called. This will typically be during configuration. + If the file cannot be opened for writing the appender will attempt + to open the file again each time a message is logged to the appender. + If the file cannot be opened for writing when a message is logged then + the message will be discarded by this appender. + + + When rolling a backup file necessitates deleting an older backup file the + file to be deleted is moved to a temporary name before being deleted. + + + + + A maximum number of backup files when rolling on date/time boundaries is not supported. + + + + Nicko Cadell + Gert Driesen + Aspi Havewala + Douglas de la Torre + Edward Smit + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Cleans up all resources used by this appender. + + + + + The fully qualified type of the RollingFileAppender class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Sets the quiet writer being used. + + + This method can be overridden by sub classes. + + the writer to set + + + + Write out a logging event. + + the event to write to file. + + + Handles append time behavior for RollingFileAppender. This checks + if a roll over either by date (checked first) or time (checked second) + is need and then appends to the file last. + + + + + + Write out an array of logging events. + + the events to write to file. + + + Handles append time behavior for RollingFileAppender. This checks + if a roll over either by date (checked first) or time (checked second) + is need and then appends to the file last. + + + + + + Performs any required rolling before outputting the next event + + + + Handles append time behavior for RollingFileAppender. This checks + if a roll over either by date (checked first) or time (checked second) + is need and then appends to the file last. + + + + + + Creates and opens the file for logging. If + is false then the fully qualified name is determined and used. + + the name of the file to open + true to append to existing file + + This method will ensure that the directory structure + for the specified exists. + + + + + Get the current output file name + + the base file name + the output file name + + The output file name is based on the base fileName specified. + If is set then the output + file name is the same as the base file passed in. Otherwise + the output file depends on the date pattern, on the count + direction or both. + + + + + Determines curSizeRollBackups (only within the current roll point) + + + + + Generates a wildcard pattern that can be used to find all files + that are similar to the base file name. + + + + + + + Builds a list of filenames for all files matching the base filename plus a file + pattern. + + + + + + + Initiates a roll over if needed for crossing a date boundary since the last run. + + + + + Initializes based on existing conditions at time of . + + + + Initializes based on existing conditions at time of . + The following is done + + determine curSizeRollBackups (only within the current roll point) + initiates a roll over if needed for crossing a date boundary since the last run. + + + + + + + Does the work of bumping the 'current' file counter higher + to the highest count when an incremental file name is seen. + The highest count is either the first file (when count direction + is greater than 0) or the last file (when count direction less than 0). + In either case, we want to know the highest count that is present. + + + + + + + Attempts to extract a number from the end of the file name that indicates + the number of the times the file has been rolled over. + + + Certain date pattern extensions like yyyyMMdd will be parsed as valid backup indexes. + + + + + + + Takes a list of files and a base file name, and looks for + 'incremented' versions of the base file. Bumps the max + count up to the highest count seen. + + + + + + + Calculates the RollPoint for the datePattern supplied. + + the date pattern to calculate the check period for + The RollPoint that is most accurate for the date pattern supplied + + Essentially the date pattern is examined to determine what the + most suitable roll point is. The roll point chosen is the roll point + with the smallest period that can be detected using the date pattern + supplied. i.e. if the date pattern only outputs the year, month, day + and hour then the smallest roll point that can be detected would be + and hourly roll point as minutes could not be detected. + + + + + Initialize the appender based on the options set + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + Sets initial conditions including date/time roll over information, first check, + scheduledFilename, and calls to initialize + the current number of backups. + + + + + + + + + .1, .2, .3, etc. + + + + + Rollover the file(s) to date/time tagged file(s). + + set to true if the file to be rolled is currently open + + + Rollover the file(s) to date/time tagged file(s). + Resets curSizeRollBackups. + If fileIsOpen is set then the new file is opened (through SafeOpenFile). + + + + + + Renames file to file . + + Name of existing file to roll. + New name for file. + + + Renames file to file . It + also checks for existence of target file and deletes if it does. + + + + + + Test if a file exists at a specified path + + the path to the file + true if the file exists + + + Test if a file exists at a specified path + + + + + + Deletes the specified file if it exists. + + The file to delete. + + + Delete a file if is exists. + The file is first moved to a new filename then deleted. + This allows the file to be removed even when it cannot + be deleted, but it still can be moved. + + + + + + Implements file roll base on file size. + + + + If the maximum number of size based backups is reached + (curSizeRollBackups == maxSizeRollBackups) then the oldest + file is deleted -- its index determined by the sign of countDirection. + If countDirection < 0, then files + {File.1, ..., File.curSizeRollBackups -1} + are renamed to {File.2, ..., + File.curSizeRollBackups}. Moreover, File is + renamed File.1 and closed. + + + A new file is created to receive further log output. + + + If maxSizeRollBackups is equal to zero, then the + File is truncated with no backup files created. + + + If maxSizeRollBackups < 0, then File is + renamed if needed and no files are deleted. + + + + + + Implements file roll. + + the base name to rename + + + If the maximum number of size based backups is reached + (curSizeRollBackups == maxSizeRollBackups) then the oldest + file is deleted -- its index determined by the sign of countDirection. + If countDirection < 0, then files + {File.1, ..., File.curSizeRollBackups -1} + are renamed to {File.2, ..., + File.curSizeRollBackups}. + + + If maxSizeRollBackups is equal to zero, then the + File is truncated with no backup files created. + + + If maxSizeRollBackups < 0, then File is + renamed if needed and no files are deleted. + + + This is called by to rename the files. + + + + + + Get the start time of the next window for the current rollpoint + + the current date + the type of roll point we are working with + the start time for the next roll point an interval after the currentDateTime date + + + Returns the date of the next roll point after the currentDateTime date passed to the method. + + + The basic strategy is to subtract the time parts that are less significant + than the rollpoint from the current time. This should roll the time back to + the start of the time window for the current rollpoint. Then we add 1 window + worth of time and get the start time of the next window for the rollpoint. + + + + + + This object supplies the current date/time. Allows test code to plug in + a method to control this class when testing date/time based rolling. The default + implementation uses the underlying value of DateTime.Now. + + + + + The date pattern. By default, the pattern is set to ".yyyy-MM-dd" + meaning daily rollover. + + + + + The actual formatted filename that is currently being written to + or will be the file transferred to on roll over + (based on staticLogFileName). + + + + + The timestamp when we shall next recompute the filename. + + + + + Holds date of last roll over + + + + + The type of rolling done + + + + + The default maximum file size is 10MB + + + + + There is zero backup files by default + + + + + How many sized based backups have been made so far + + + + + The rolling file count direction. + + + + + The rolling mode used in this appender. + + + + + Cache flag set if we are rolling by date. + + + + + Cache flag set if we are rolling by size. + + + + + Value indicating whether to always log to the same file. + + + + + Value indicating whether to preserve the file name extension when rolling. + + + + + FileName provided in configuration. Used for rolling properly + + + + + A mutex that is used to lock rolling of files. + + + + + The 1st of January 1970 in UTC + + + + + Gets or sets the strategy for determining the current date and time. The default + implementation is to use LocalDateTime which internally calls through to DateTime.Now. + DateTime.UtcNow may be used on frameworks newer than .NET 1.0 by specifying + . + + + An implementation of the interface which returns the current date and time. + + + + Gets or sets the used to return the current date and time. + + + There are two built strategies for determining the current date and time, + + and . + + + The default strategy is . + + + + + + Gets or sets the date pattern to be used for generating file names + when rolling over on date. + + + The date pattern to be used for generating file names when rolling + over on date. + + + + Takes a string in the same format as expected by + . + + + This property determines the rollover schedule when rolling over + on date. + + + + + + Gets or sets the maximum number of backup files that are kept before + the oldest is erased. + + + The maximum number of backup files that are kept before the oldest is + erased. + + + + If set to zero, then there will be no backup files and the log file + will be truncated when it reaches . + + + If a negative number is supplied then no deletions will be made. Note + that this could result in very slow performance as a large number of + files are rolled over unless is used. + + + The maximum applies to each time based group of files and + not the total. + + + + + + Gets or sets the maximum size that the output file is allowed to reach + before being rolled over to backup files. + + + The maximum size in bytes that the output file is allowed to reach before being + rolled over to backup files. + + + + This property is equivalent to except + that it is required for differentiating the setter taking a + argument from the setter taking a + argument. + + + The default maximum file size is 10MB (10*1024*1024). + + + + + + Gets or sets the maximum size that the output file is allowed to reach + before being rolled over to backup files. + + + The maximum size that the output file is allowed to reach before being + rolled over to backup files. + + + + This property allows you to specify the maximum size with the + suffixes "KB", "MB" or "GB" so that the size is interpreted being + expressed respectively in kilobytes, megabytes or gigabytes. + + + For example, the value "10KB" will be interpreted as 10240 bytes. + + + The default maximum file size is 10MB. + + + If you have the option to set the maximum file size programmatically + consider using the property instead as this + allows you to set the size in bytes as a . + + + + + + Gets or sets the rolling file count direction. + + + The rolling file count direction. + + + + Indicates if the current file is the lowest numbered file or the + highest numbered file. + + + By default newer files have lower numbers ( < 0), + i.e. log.1 is most recent, log.5 is the 5th backup, etc... + + + >= 0 does the opposite i.e. + log.1 is the first backup made, log.5 is the 5th backup made, etc. + For infinite backups use >= 0 to reduce + rollover costs. + + The default file count direction is -1. + + + + + Gets or sets the rolling style. + + The rolling style. + + + The default rolling style is . + + + When set to this appender's + property is set to false, otherwise + the appender would append to a single file rather than rolling + the file each time it is opened. + + + + + + Gets or sets a value indicating whether to preserve the file name extension when rolling. + + + true if the file name extension should be preserved. + + + + By default file.log is rolled to file.log.yyyy-MM-dd or file.log.curSizeRollBackup. + However, under Windows the new file name will loose any program associations as the + extension is changed. Optionally file.log can be renamed to file.yyyy-MM-dd.log or + file.curSizeRollBackup.log to maintain any program associations. + + + + + + Gets or sets a value indicating whether to always log to + the same file. + + + true if always should be logged to the same file, otherwise false. + + + + By default file.log is always the current file. Optionally + file.log.yyyy-mm-dd for current formatted datePattern can by the currently + logging file (or file.log.curSizeRollBackup or even + file.log.yyyy-mm-dd.curSizeRollBackup). + + + This will make time based rollovers with a large number of backups + much faster as the appender it won't have to rename all the backups! + + + + + + Style of rolling to use + + + + Style of rolling to use + + + + + + Roll files once per program execution + + + + Roll files once per program execution. + Well really once each time this appender is + configured. + + + Setting this option also sets AppendToFile to + false on the RollingFileAppender, otherwise + this appender would just be a normal file appender. + + + + + + Roll files based only on the size of the file + + + + + Roll files based only on the date + + + + + Roll files based on both the size and date of the file + + + + + The code assumes that the following 'time' constants are in a increasing sequence. + + + + The code assumes that the following 'time' constants are in a increasing sequence. + + + + + + Roll the log not based on the date + + + + + Roll the log for each minute + + + + + Roll the log for each hour + + + + + Roll the log twice a day (midday and midnight) + + + + + Roll the log each day (midnight) + + + + + Roll the log each week + + + + + Roll the log each month + + + + + This interface is used to supply Date/Time information to the . + + + This interface is used to supply Date/Time information to the . + Used primarily to allow test classes to plug themselves in so they can + supply test date/times. + + + + + Gets the current time. + + The current time. + + + Gets the current time. + + + + + + Default implementation of that returns the current time. + + + + + Gets the current time. + + The current time. + + + Gets the current time. + + + + + + Implementation of that returns the current time as the coordinated universal time (UTC). + + + + + Gets the current time. + + The current time. + + + Gets the current time. + + + + + + Send an e-mail when a specific logging event occurs, typically on errors + or fatal errors. + + + + The number of logging events delivered in this e-mail depend on + the value of option. The + keeps only the last + logging events in its + cyclic buffer. This keeps memory requirements at a reasonable level while + still delivering useful application context. + + + Authentication and setting the server Port are only available on the MS .NET 1.1 runtime. + For these features to be enabled you need to ensure that you are using a version of + the log4net assembly that is built against the MS .NET 1.1 framework and that you are + running the your application on the MS .NET 1.1 runtime. On all other platforms only sending + unauthenticated messages to a server listening on port 25 (the default) is supported. + + + Authentication is supported by setting the property to + either or . + If using authentication then the + and properties must also be set. + + + To set the SMTP server port use the property. The default port is 25. + + + Nicko Cadell + Gert Driesen + + + + Default constructor + + + + Default constructor + + + + + + Sends the contents of the cyclic buffer as an e-mail message. + + The logging events to send. + + + + Send the email message + + the body text to include in the mail + + + + trims leading and trailing commas or semicolons + + + + + Gets or sets a comma- or semicolon-delimited list of recipient e-mail addresses (use semicolon on .NET 1.1 and comma for later versions). + + + + For .NET 1.1 (System.Web.Mail): A semicolon-delimited list of e-mail addresses. + + + For .NET 2.0 (System.Net.Mail): A comma-delimited list of e-mail addresses. + + + + + For .NET 1.1 (System.Web.Mail): A semicolon-delimited list of e-mail addresses. + + + For .NET 2.0 (System.Net.Mail): A comma-delimited list of e-mail addresses. + + + + + + Gets or sets a comma- or semicolon-delimited list of recipient e-mail addresses + that will be carbon copied (use semicolon on .NET 1.1 and comma for later versions). + + + + For .NET 1.1 (System.Web.Mail): A semicolon-delimited list of e-mail addresses. + + + For .NET 2.0 (System.Net.Mail): A comma-delimited list of e-mail addresses. + + + + + For .NET 1.1 (System.Web.Mail): A semicolon-delimited list of e-mail addresses. + + + For .NET 2.0 (System.Net.Mail): A comma-delimited list of e-mail addresses. + + + + + + Gets or sets a semicolon-delimited list of recipient e-mail addresses + that will be blind carbon copied. + + + A semicolon-delimited list of e-mail addresses. + + + + A semicolon-delimited list of recipient e-mail addresses. + + + + + + Gets or sets the e-mail address of the sender. + + + The e-mail address of the sender. + + + + The e-mail address of the sender. + + + + + + Gets or sets the subject line of the e-mail message. + + + The subject line of the e-mail message. + + + + The subject line of the e-mail message. + + + + + + Gets or sets the name of the SMTP relay mail server to use to send + the e-mail messages. + + + The name of the e-mail relay server. If SmtpServer is not set, the + name of the local SMTP server is used. + + + + The name of the e-mail relay server. If SmtpServer is not set, the + name of the local SMTP server is used. + + + + + + Obsolete + + + Use the BufferingAppenderSkeleton Fix methods instead + + + + Obsolete property. + + + + + + The mode to use to authentication with the SMTP server + + + Authentication is only available on the MS .NET 1.1 runtime. + + Valid Authentication mode values are: , + , and . + The default value is . When using + you must specify the + and to use to authenticate. + When using the Windows credentials for the current + thread, if impersonating, or the process will be used to authenticate. + + + + + + The username to use to authenticate with the SMTP server + + + Authentication is only available on the MS .NET 1.1 runtime. + + A and must be specified when + is set to , + otherwise the username will be ignored. + + + + + + The password to use to authenticate with the SMTP server + + + Authentication is only available on the MS .NET 1.1 runtime. + + A and must be specified when + is set to , + otherwise the password will be ignored. + + + + + + The port on which the SMTP server is listening + + + Server Port is only available on the MS .NET 1.1 runtime. + + The port on which the SMTP server is listening. The default + port is 25. The Port can only be changed when running on + the MS .NET 1.1 runtime. + + + + + + Gets or sets the priority of the e-mail message + + + One of the values. + + + + Sets the priority of the e-mails generated by this + appender. The default priority is . + + + If you are using this appender to report errors then + you may want to set the priority to . + + + + + + Enable or disable use of SSL when sending e-mail message + + + This is available on MS .NET 2.0 runtime and higher + + + + + Gets or sets the reply-to e-mail address. + + + This is available on MS .NET 2.0 runtime and higher + + + + + Gets or sets the subject encoding to be used. + + + The default encoding is the operating system's current ANSI codepage. + + + + + Gets or sets the body encoding to be used. + + + The default encoding is the operating system's current ANSI codepage. + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Values for the property. + + + + SMTP authentication modes. + + + + + + No authentication + + + + + Basic authentication. + + + Requires a username and password to be supplied + + + + + Integrated authentication + + + Uses the Windows credentials from the current thread or process to authenticate. + + + + + Send an email when a specific logging event occurs, typically on errors + or fatal errors. Rather than sending via smtp it writes a file into the + directory specified by . This allows services such + as the IIS SMTP agent to manage sending the messages. + + + + The configuration for this appender is identical to that of the SMTPAppender, + except that instead of specifying the SMTPAppender.SMTPHost you specify + . + + + The number of logging events delivered in this e-mail depend on + the value of option. The + keeps only the last + logging events in its + cyclic buffer. This keeps memory requirements at a reasonable level while + still delivering useful application context. + + + Niall Daley + Nicko Cadell + + + + Default constructor + + + + Default constructor + + + + + + Sends the contents of the cyclic buffer as an e-mail message. + + The logging events to send. + + + Sends the contents of the cyclic buffer as an e-mail message. + + + + + + Activate the options on this appender. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Convert a path into a fully qualified path. + + The path to convert. + The fully qualified path. + + + Converts the path specified to a fully + qualified path. If the path is relative it is + taken as relative from the application base + directory. + + + + + + The security context to use for privileged calls + + + + + Gets or sets a semicolon-delimited list of recipient e-mail addresses. + + + A semicolon-delimited list of e-mail addresses. + + + + A semicolon-delimited list of e-mail addresses. + + + + + + Gets or sets the e-mail address of the sender. + + + The e-mail address of the sender. + + + + The e-mail address of the sender. + + + + + + Gets or sets the subject line of the e-mail message. + + + The subject line of the e-mail message. + + + + The subject line of the e-mail message. + + + + + + Gets or sets the path to write the messages to. + + + + Gets or sets the path to write the messages to. This should be the same + as that used by the agent sending the messages. + + + + + + Gets or sets the file extension for the generated files + + + The file extension for the generated files + + + + The file extension for the generated files + + + + + + Gets or sets the used to write to the pickup directory. + + + The used to write to the pickup directory. + + + + Unless a specified here for this appender + the is queried for the + security context to use. The default behavior is to use the security context + of the current thread. + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Appender that allows clients to connect via Telnet to receive log messages + + + + The TelnetAppender accepts socket connections and streams logging messages + back to the client. + The output is provided in a telnet-friendly way so that a log can be monitored + over a TCP/IP socket. + This allows simple remote monitoring of application logging. + + + The default is 23 (the telnet port). + + + Keith Long + Nicko Cadell + + + + Default constructor + + + + Default constructor + + + + + + The fully qualified type of the TelnetAppender class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Overrides the parent method to close the socket handler + + + + Closes all the outstanding connections. + + + + + + Initialize the appender based on the options set. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + Create the socket handler and wait for connections + + + + + + Writes the logging event to each connected client. + + The event to log. + + + Writes the logging event to each connected client. + + + + + + Gets or sets the TCP port number on which this will listen for connections. + + + An integer value in the range to + indicating the TCP port number on which this will listen for connections. + + + + The default value is 23 (the telnet port). + + + The value specified is less than + or greater than . + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Helper class to manage connected clients + + + + The SocketHandler class is used to accept connections from + clients. It is threaded so that clients can connect/disconnect + asynchronously. + + + + + + Opens a new server port on + + the local port to listen on for connections + + + Creates a socket handler on the specified local server port. + + + + + + Sends a string message to each of the connected clients + + the text to send + + + Sends a string message to each of the connected clients + + + + + + Add a client to the internal clients list + + client to add + + + + Remove a client from the internal clients list + + client to remove + + + + Callback used to accept a connection on the server socket + + The result of the asynchronous operation + + + On connection adds to the list of connections + if there are two many open connections you will be disconnected + + + + + + Close all network connections + + + + Make sure we close all network connections + + + + + + Test if this handler has active connections + + + true if this handler has active connections + + + + This property will be true while this handler has + active connections, that is at least one connection that + the handler will attempt to send a message to. + + + + + + Class that represents a client connected to this handler + + + + Class that represents a client connected to this handler + + + + + + Create this for the specified + + the client's socket + + + Opens a stream writer on the socket. + + + + + + Write a string to the client + + string to send + + + Write a string to the client + + + + + + Cleanup the clients connection + + + + Close the socket connection. + + + + + + Appends log events to the system. + + + + The application configuration file can be used to control what listeners + are actually used. See the MSDN documentation for the + class for details on configuring the + trace system. + + + Events are written using the System.Diagnostics.Trace.Write(string,string) + method. The event's logger name is the default value for the category parameter + of the Write method. + + + Compact Framework
+ The Compact Framework does not support the + class for any operation except Assert. When using the Compact Framework this + appender will write to the system rather than + the Trace system. This appender will therefore behave like the . +
+
+ Douglas de la Torre + Nicko Cadell + Gert Driesen + Ron Grabowski +
+ + + Initializes a new instance of the . + + + + Default constructor. + + + + + + Initializes a new instance of the + with a specified layout. + + The layout to use with this appender. + + + Obsolete constructor. + + + + + + Writes the logging event to the system. + + The event to log. + + + Writes the logging event to the system. + + + + + + Immediate flush means that the underlying writer or output stream + will be flushed at the end of each append operation. + + + + Immediate flush is slower but ensures that each append request is + actually written. If is set to + false, then there is a good chance that the last few + logs events are not actually written to persistent media if and + when the application crashes. + + + The default value is true. + + + + + Defaults to %logger + + + + + Flushes any buffered log data. + + The maximum time to wait for logging events to be flushed. + True if all logging events were flushed successfully, else false. + + + + Gets or sets a value that indicates whether the appender will + flush at the end of each write. + + + The default behavior is to flush at the end of each + write. If the option is set tofalse, then the underlying + stream can defer writing to physical medium to a later time. + + + Avoiding the flush operation at the end of each append results + in a performance gain of 10 to 20 percent. However, there is safety + trade-off involved in skipping flushing. Indeed, when flushing is + skipped, then it is likely that the last few log events will not + be recorded on disk when the application exits. This is a high + price to pay even for a 20% performance gain. + + + + + + The category parameter sent to the Trace method. + + + + Defaults to %logger which will use the logger name of the current + as the category parameter. + + + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Assembly level attribute that specifies a domain to alias to this assembly's repository. + + + + AliasDomainAttribute is obsolete. Use AliasRepositoryAttribute instead of AliasDomainAttribute. + + + An assembly's logger repository is defined by its , + however this can be overridden by an assembly loaded before the target assembly. + + + An assembly can alias another assembly's domain to its repository by + specifying this attribute with the name of the target domain. + + + This attribute can only be specified on the assembly and may be used + as many times as necessary to alias all the required domains. + + + Nicko Cadell + Gert Driesen + + + + Assembly level attribute that specifies a repository to alias to this assembly's repository. + + + + An assembly's logger repository is defined by its , + however this can be overridden by an assembly loaded before the target assembly. + + + An assembly can alias another assembly's repository to its repository by + specifying this attribute with the name of the target repository. + + + This attribute can only be specified on the assembly and may be used + as many times as necessary to alias all the required repositories. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class with + the specified repository to alias to this assembly's repository. + + The repository to alias to this assemby's repository. + + + Initializes a new instance of the class with + the specified repository to alias to this assembly's repository. + + + + + + Gets or sets the repository to alias to this assemby's repository. + + + The repository to alias to this assemby's repository. + + + + The name of the repository to alias to this assemby's repository. + + + + + + Initializes a new instance of the class with + the specified domain to alias to this assembly's repository. + + The domain to alias to this assemby's repository. + + + Obsolete. Use instead of . + + + + + + Use this class to quickly configure a . + + + + Allows very simple programmatic configuration of log4net. + + + Only one appender can be configured using this configurator. + The appender is set at the root of the hierarchy and all logging + events will be delivered to that appender. + + + Appenders can also implement the interface. Therefore + they would require that the method + be called after the appenders properties have been configured. + + + Nicko Cadell + Gert Driesen + + + + The fully qualified type of the BasicConfigurator class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Initializes a new instance of the class. + + + + Uses a private access modifier to prevent instantiation of this class. + + + + + + Initializes the log4net system with a default configuration. + + + + Initializes the log4net logging system using a + that will write to Console.Out. The log messages are + formatted using the layout object + with the + layout style. + + + + + + Initializes the log4net system using the specified appenders. + + The appenders to use to log all logging events. + + + Initializes the log4net system using the specified appenders. + + + + + + Initializes the log4net system using the specified appender. + + The appender to use to log all logging events. + + + Initializes the log4net system using the specified appender. + + + + + + Initializes the with a default configuration. + + The repository to configure. + + + Initializes the specified repository using a + that will write to Console.Out. The log messages are + formatted using the layout object + with the + layout style. + + + + + + Initializes the using the specified appender. + + The repository to configure. + The appender to use to log all logging events. + + + Initializes the using the specified appender. + + + + + + Initializes the using the specified appenders. + + The repository to configure. + The appenders to use to log all logging events. + + + Initializes the using the specified appender. + + + + + + Base class for all log4net configuration attributes. + + + This is an abstract class that must be extended by + specific configurators. This attribute allows the + configurator to be parameterized by an assembly level + attribute. + + Nicko Cadell + Gert Driesen + + + + Constructor used by subclasses. + + the ordering priority for this configurator + + + The is used to order the configurator + attributes before they are invoked. Higher priority configurators are executed + before lower priority ones. + + + + + + Configures the for the specified assembly. + + The assembly that this attribute was defined on. + The repository to configure. + + + Abstract method implemented by a subclass. When this method is called + the subclass should configure the . + + + + + + Compare this instance to another ConfiguratorAttribute + + the object to compare to + see + + + Compares the priorities of the two instances. + Sorts by priority in descending order. Objects with the same priority are + randomly ordered. + + + + + + Assembly level attribute that specifies the logging domain for the assembly. + + + + DomainAttribute is obsolete. Use RepositoryAttribute instead of DomainAttribute. + + + Assemblies are mapped to logging domains. Each domain has its own + logging repository. This attribute specified on the assembly controls + the configuration of the domain. The property specifies the name + of the domain that this assembly is a part of. The + specifies the type of the repository objects to create for the domain. If + this attribute is not specified and a is not specified + then the assembly will be part of the default shared logging domain. + + + This attribute can only be specified on the assembly and may only be used + once per assembly. + + + Nicko Cadell + Gert Driesen + + + + Assembly level attribute that specifies the logging repository for the assembly. + + + + Assemblies are mapped to logging repository. This attribute specified + on the assembly controls + the configuration of the repository. The property specifies the name + of the repository that this assembly is a part of. The + specifies the type of the object + to create for the assembly. If this attribute is not specified or a + is not specified then the assembly will be part of the default shared logging repository. + + + This attribute can only be specified on the assembly and may only be used + once per assembly. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Initialize a new instance of the class + with the name of the repository. + + The name of the repository. + + + Initialize the attribute with the name for the assembly's repository. + + + + + + Gets or sets the name of the logging repository. + + + The string name to use as the name of the repository associated with this + assembly. + + + + This value does not have to be unique. Several assemblies can share the + same repository. They will share the logging configuration of the repository. + + + + + + Gets or sets the type of repository to create for this assembly. + + + The type of repository to create for this assembly. + + + + The type of the repository to create for the assembly. + The type must implement the + interface. + + + This will be the type of repository created when + the repository is created. If multiple assemblies reference the + same repository then the repository is only created once using the + of the first assembly to call into the + repository. + + + + + + Initializes a new instance of the class. + + + + Obsolete. Use RepositoryAttribute instead of DomainAttribute. + + + + + + Initialize a new instance of the class + with the name of the domain. + + The name of the domain. + + + Obsolete. Use RepositoryAttribute instead of DomainAttribute. + + + + + + Use this class to initialize the log4net environment using an Xml tree. + + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + + Configures a using an Xml tree. + + + Nicko Cadell + Gert Driesen + + + + Private constructor + + + + + Automatically configures the log4net system based on the + application's configuration settings. + + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + Each application has a configuration file. This has the + same name as the application with '.config' appended. + This file is XML and calling this function prompts the + configurator to look in that file for a section called + log4net that contains the configuration data. + + + + + Automatically configures the using settings + stored in the application's configuration file. + + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + Each application has a configuration file. This has the + same name as the application with '.config' appended. + This file is XML and calling this function prompts the + configurator to look in that file for a section called + log4net that contains the configuration data. + + The repository to configure. + + + + Configures log4net using a log4net element + + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + Loads the log4net configuration from the XML element + supplied as . + + The element to parse. + + + + Configures the using the specified XML + element. + + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + Loads the log4net configuration from the XML element + supplied as . + + The repository to configure. + The element to parse. + + + + Configures log4net using the specified configuration file. + + The XML file to load the configuration from. + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the log4net configuration data. + + + The log4net configuration file can possible be specified in the application's + configuration file (either MyAppName.exe.config for a + normal application on Web.config for an ASP.NET application). + + + The following example configures log4net using a configuration file, of which the + location is stored in the application's configuration file : + + + using log4net.Config; + using System.IO; + using System.Configuration; + + ... + + DOMConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"])); + + + In the .config file, the path to the log4net can be specified like this : + + + + + + + + + + + + + Configures log4net using the specified configuration file. + + A stream to load the XML configuration from. + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + + The configuration data must be valid XML. It must contain + at least one element called log4net that holds + the log4net configuration data. + + + Note that this method will NOT close the stream parameter. + + + + + + Configures the using the specified configuration + file. + + The repository to configure. + The XML file to load the configuration from. + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + The log4net configuration file can possible be specified in the application's + configuration file (either MyAppName.exe.config for a + normal application on Web.config for an ASP.NET application). + + + The following example configures log4net using a configuration file, of which the + location is stored in the application's configuration file : + + + using log4net.Config; + using System.IO; + using System.Configuration; + + ... + + DOMConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"])); + + + In the .config file, the path to the log4net can be specified like this : + + + + + + + + + + + + + Configures the using the specified configuration + file. + + The repository to configure. + The stream to load the XML configuration from. + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + + The configuration data must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + Note that this method will NOT close the stream parameter. + + + + + + Configures log4net using the file specified, monitors the file for changes + and reloads the configuration if a change is detected. + + The XML file to load the configuration from. + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + The configuration file will be monitored using a + and depends on the behavior of that class. + + + For more information on how to configure log4net using + a separate configuration file, see . + + + + + + + Configures the using the file specified, + monitors the file for changes and reloads the configuration if a change + is detected. + + The repository to configure. + The XML file to load the configuration from. + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + The configuration file will be monitored using a + and depends on the behavior of that class. + + + For more information on how to configure log4net using + a separate configuration file, see . + + + + + + + Assembly level attribute to configure the . + + + + AliasDomainAttribute is obsolete. Use AliasRepositoryAttribute instead of AliasDomainAttribute. + + + This attribute may only be used at the assembly scope and can only + be used once per assembly. + + + Use this attribute to configure the + without calling one of the + methods. + + + Nicko Cadell + Gert Driesen + + + + Assembly level attribute to configure the . + + + + This attribute may only be used at the assembly scope and can only + be used once per assembly. + + + Use this attribute to configure the + without calling one of the + methods. + + + If neither of the or + properties are set the configuration is loaded from the application's .config file. + If set the property takes priority over the + property. The property + specifies a path to a file to load the config from. The path is relative to the + application's base directory; . + The property is used as a postfix to the assembly file name. + The config file must be located in the application's base directory; . + For example in a console application setting the to + config has the same effect as not specifying the or + properties. + + + The property can be set to cause the + to watch the configuration file for changes. + + + + Log4net will only look for assembly level configuration attributes once. + When using the log4net assembly level attributes to control the configuration + of log4net you must ensure that the first call to any of the + methods is made from the assembly with the configuration + attributes. + + + If you cannot guarantee the order in which log4net calls will be made from + different assemblies you must use programmatic configuration instead, i.e. + call the method directly. + + + + Nicko Cadell + Gert Driesen + + + + Default constructor + + + + Default constructor + + + + + + Configures the for the specified assembly. + + The assembly that this attribute was defined on. + The repository to configure. + + + Configure the repository using the . + The specified must extend the + class otherwise the will not be able to + configure it. + + + The does not extend . + + + + Attempt to load configuration from the local file system + + The assembly that this attribute was defined on. + The repository to configure. + + + + Configure the specified repository using a + + The repository to configure. + the FileInfo pointing to the config file + + + + Attempt to load configuration from a URI + + The assembly that this attribute was defined on. + The repository to configure. + + + + The fully qualified type of the XmlConfiguratorAttribute class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Gets or sets the filename of the configuration file. + + + The filename of the configuration file. + + + + If specified, this is the name of the configuration file to use with + the . This file path is relative to the + application base directory (). + + + The takes priority over the . + + + + + + Gets or sets the extension of the configuration file. + + + The extension of the configuration file. + + + + If specified this is the extension for the configuration file. + The path to the config file is built by using the application + base directory (), + the assembly file name and the config file extension. + + + If the is set to MyExt then + possible config file names would be: MyConsoleApp.exe.MyExt or + MyClassLibrary.dll.MyExt. + + + The takes priority over the . + + + + + + Gets or sets a value indicating whether to watch the configuration file. + + + true if the configuration should be watched, false otherwise. + + + + If this flag is specified and set to true then the framework + will watch the configuration file and will reload the config each time + the file is modified. + + + The config file can only be watched if it is loaded from local disk. + In a No-Touch (Smart Client) deployment where the application is downloaded + from a web server the config file may not reside on the local disk + and therefore it may not be able to watch it. + + + Watching configuration is not supported on the SSCLI. + + + + + + Class to register for the log4net section of the configuration file + + + The log4net section of the configuration file needs to have a section + handler registered. This is the section handler used. It simply returns + the XML element that is the root of the section. + + + Example of registering the log4net section handler : + + + +
+ + + log4net configuration XML goes here + + + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Parses the configuration section. + + The configuration settings in a corresponding parent configuration section. + The configuration context when called from the ASP.NET configuration system. Otherwise, this parameter is reserved and is a null reference. + The for the log4net section. + The for the log4net section. + + + Returns the containing the configuration data, + + + + + + Assembly level attribute that specifies a plugin to attach to + the repository. + + + + Specifies the type of a plugin to create and attach to the + assembly's repository. The plugin type must implement the + interface. + + + Nicko Cadell + Gert Driesen + + + + Interface used to create plugins. + + + + Interface used to create a plugin. + + + Nicko Cadell + Gert Driesen + + + + Creates the plugin object. + + the new plugin instance + + + Create and return a new plugin instance. + + + + + + Initializes a new instance of the class + with the specified type. + + The type name of plugin to create. + + + Create the attribute with the plugin type specified. + + + Where possible use the constructor that takes a . + + + + + + Initializes a new instance of the class + with the specified type. + + The type of plugin to create. + + + Create the attribute with the plugin type specified. + + + + + + Creates the plugin object defined by this attribute. + + + + Creates the instance of the object as + specified by this attribute. + + + The plugin object. + + + + Returns a representation of the properties of this object. + + + + Overrides base class method to + return a representation of the properties of this object. + + + A representation of the properties of this object + + + + Gets or sets the type for the plugin. + + + The type for the plugin. + + + + The type for the plugin. + + + + + + Gets or sets the type name for the plugin. + + + The type name for the plugin. + + + + The type name for the plugin. + + + Where possible use the property instead. + + + + + + Assembly level attribute to configure the . + + + + This attribute may only be used at the assembly scope and can only + be used once per assembly. + + + Use this attribute to configure the + without calling one of the + methods. + + + Nicko Cadell + + + + Construct provider attribute with type specified + + the type of the provider to use + + + The provider specified must subclass the + class. + + + + + + Configures the SecurityContextProvider + + The assembly that this attribute was defined on. + The repository to configure. + + + Creates a provider instance from the specified. + Sets this as the default security context provider . + + + + + + The fully qualified type of the SecurityContextProviderAttribute class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Gets or sets the type of the provider to use. + + + the type of the provider to use. + + + + The provider specified must subclass the + class. + + + + + + Use this class to initialize the log4net environment using an Xml tree. + + + + Configures a using an Xml tree. + + + Nicko Cadell + Gert Driesen + + + + Private constructor + + + + + Automatically configures the using settings + stored in the application's configuration file. + + + + Each application has a configuration file. This has the + same name as the application with '.config' appended. + This file is XML and calling this function prompts the + configurator to look in that file for a section called + log4net that contains the configuration data. + + + To use this method to configure log4net you must specify + the section + handler for the log4net configuration section. See the + for an example. + + + The repository to configure. + + + + Automatically configures the log4net system based on the + application's configuration settings. + + + + Each application has a configuration file. This has the + same name as the application with '.config' appended. + This file is XML and calling this function prompts the + configurator to look in that file for a section called + log4net that contains the configuration data. + + + To use this method to configure log4net you must specify + the section + handler for the log4net configuration section. See the + for an example. + + + + + + + Configures log4net using a log4net element + + + + Loads the log4net configuration from the XML element + supplied as . + + + The element to parse. + + + + Configures log4net using the specified configuration file. + + The XML file to load the configuration from. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the log4net configuration data. + + + The log4net configuration file can possible be specified in the application's + configuration file (either MyAppName.exe.config for a + normal application on Web.config for an ASP.NET application). + + + The first element matching <configuration> will be read as the + configuration. If this file is also a .NET .config file then you must specify + a configuration section for the log4net element otherwise .NET will + complain. Set the type for the section handler to , for example: + + +
+ + + + + The following example configures log4net using a configuration file, of which the + location is stored in the application's configuration file : + + + using log4net.Config; + using System.IO; + using System.Configuration; + + ... + + XmlConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"])); + + + In the .config file, the path to the log4net can be specified like this : + + + + + + + + + + + + + Configures log4net using the specified configuration URI. + + A URI to load the XML configuration from. + + + The configuration data must be valid XML. It must contain + at least one element called log4net that holds + the log4net configuration data. + + + The must support the URI scheme specified. + + + + + + Configures log4net using the specified configuration data stream. + + A stream to load the XML configuration from. + + + The configuration data must be valid XML. It must contain + at least one element called log4net that holds + the log4net configuration data. + + + Note that this method will NOT close the stream parameter. + + + + + + Configures the using the specified XML + element. + + + Loads the log4net configuration from the XML element + supplied as . + + The repository to configure. + The element to parse. + + + + Configures the using the specified configuration + file. + + The repository to configure. + The XML file to load the configuration from. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + The log4net configuration file can possible be specified in the application's + configuration file (either MyAppName.exe.config for a + normal application on Web.config for an ASP.NET application). + + + The first element matching <configuration> will be read as the + configuration. If this file is also a .NET .config file then you must specify + a configuration section for the log4net element otherwise .NET will + complain. Set the type for the section handler to , for example: + + +
+ + + + + The following example configures log4net using a configuration file, of which the + location is stored in the application's configuration file : + + + using log4net.Config; + using System.IO; + using System.Configuration; + + ... + + XmlConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"])); + + + In the .config file, the path to the log4net can be specified like this : + + + + + + + + + + + + + Configures the using the specified configuration + URI. + + The repository to configure. + A URI to load the XML configuration from. + + + The configuration data must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + The must support the URI scheme specified. + + + + + + Configures the using the specified configuration + file. + + The repository to configure. + The stream to load the XML configuration from. + + + The configuration data must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + Note that this method will NOT close the stream parameter. + + + + + + Configures log4net using the file specified, monitors the file for changes + and reloads the configuration if a change is detected. + + The XML file to load the configuration from. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + The configuration file will be monitored using a + and depends on the behavior of that class. + + + For more information on how to configure log4net using + a separate configuration file, see . + + + + + + + Configures the using the file specified, + monitors the file for changes and reloads the configuration if a change + is detected. + + The repository to configure. + The XML file to load the configuration from. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + The configuration file will be monitored using a + and depends on the behavior of that class. + + + For more information on how to configure log4net using + a separate configuration file, see . + + + + + + + Configures the specified repository using a log4net element. + + The hierarchy to configure. + The element to parse. + + + Loads the log4net configuration from the XML element + supplied as . + + + This method is ultimately called by one of the Configure methods + to load the configuration from an . + + + + + + Maps repository names to ConfigAndWatchHandler instances to allow a particular + ConfigAndWatchHandler to dispose of its FileSystemWatcher when a repository is + reconfigured. + + + + + The fully qualified type of the XmlConfigurator class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Class used to watch config files. + + + + Uses the to monitor + changes to a specified file. Because multiple change notifications + may be raised when the file is modified, a timer is used to + compress the notifications into a single event. The timer + waits for time before delivering + the event notification. If any further + change notifications arrive while the timer is waiting it + is reset and waits again for to + elapse. + + + + + + The default amount of time to wait after receiving notification + before reloading the config file. + + + + + Holds the FileInfo used to configure the XmlConfigurator + + + + + Holds the repository being configured. + + + + + The timer used to compress the notification events. + + + + + Watches file for changes. This object should be disposed when no longer + needed to free system handles on the watched resources. + + + + + Initializes a new instance of the class to + watch a specified config file used to configure a repository. + + The repository to configure. + The configuration file to watch. + + + Initializes a new instance of the class. + + + + + + Event handler used by . + + The firing the event. + The argument indicates the file that caused the event to be fired. + + + This handler reloads the configuration from the file when the event is fired. + + + + + + Event handler used by . + + The firing the event. + The argument indicates the file that caused the event to be fired. + + + This handler reloads the configuration from the file when the event is fired. + + + + + + Called by the timer when the configuration has been updated. + + null + + + + Release the handles held by the watcher and timer. + + + + + The implementation of the interface suitable + for use with the compact framework + + + + This implementation is a simple + mapping between repository name and + object. + + + The .NET Compact Framework 1.0 does not support retrieving assembly + level attributes therefore unlike the DefaultRepositorySelector + this selector does not examine the calling assembly for attributes. + + + Nicko Cadell + + + + Interface used by the to select the . + + + + The uses a + to specify the policy for selecting the correct + to return to the caller. + + + Nicko Cadell + Gert Driesen + + + + Gets the for the specified assembly. + + The assembly to use to lookup to the + The for the assembly. + + + Gets the for the specified assembly. + + + How the association between and + is made is not defined. The implementation may choose any method for + this association. The results of this method must be repeatable, i.e. + when called again with the same arguments the result must be the + save value. + + + + + + Gets the named . + + The name to use to lookup to the . + The named + + Lookup a named . This is the repository created by + calling . + + + + + Creates a new repository for the assembly specified. + + The assembly to use to create the domain to associate with the . + The type of repository to create, must implement . + The repository created. + + + The created will be associated with the domain + specified such that a call to with the + same assembly specified will return the same repository instance. + + + How the association between and + is made is not defined. The implementation may choose any method for + this association. + + + + + + Creates a new repository with the name specified. + + The name to associate with the . + The type of repository to create, must implement . + The repository created. + + + The created will be associated with the name + specified such that a call to with the + same name will return the same repository instance. + + + + + + Test if a named repository exists + + the named repository to check + true if the repository exists + + + Test if a named repository exists. Use + to create a new repository and to retrieve + a repository. + + + + + + Gets an array of all currently defined repositories. + + + An array of the instances created by + this . + + + Gets an array of all of the repositories created by this selector. + + + + + + Event to notify that a logger repository has been created. + + + Event to notify that a logger repository has been created. + + + + Event raised when a new repository is created. + The event source will be this selector. The event args will + be a which + holds the newly created . + + + + + + Create a new repository selector + + the type of the repositories to create, must implement + + + Create an new compact repository selector. + The default type for repositories must be specified, + an appropriate value would be . + + + throw if is null + throw if does not implement + + + + Get the for the specified assembly + + not used + The default + + + The argument is not used. This selector does not create a + separate repository for each assembly. + + + As a named repository is not specified the default repository is + returned. The default repository is named log4net-default-repository. + + + + + + Get the named + + the name of the repository to lookup + The named + + + Get the named . The default + repository is log4net-default-repository. Other repositories + must be created using the . + If the named repository does not exist an exception is thrown. + + + throw if is null + throw if the does not exist + + + + Create a new repository for the assembly specified + + not used + the type of repository to create, must implement + the repository created + + + The argument is not used. This selector does not create a + separate repository for each assembly. + + + If the is null then the + default repository type specified to the constructor is used. + + + As a named repository is not specified the default repository is + returned. The default repository is named log4net-default-repository. + + + + + + Create a new repository for the repository specified + + the repository to associate with the + the type of repository to create, must implement . + If this param is null then the default repository type is used. + the repository created + + + The created will be associated with the repository + specified such that a call to with the + same repository specified will return the same repository instance. + + + If the named repository already exists an exception will be thrown. + + + If is null then the default + repository type specified to the constructor is used. + + + throw if is null + throw if the already exists + + + + Test if a named repository exists + + the named repository to check + true if the repository exists + + + Test if a named repository exists. Use + to create a new repository and to retrieve + a repository. + + + + + + Gets a list of objects + + an array of all known objects + + + Gets an array of all of the repositories created by this selector. + + + + + + The fully qualified type of the CompactRepositorySelector class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Notify the registered listeners that the repository has been created + + The repository that has been created + + + Raises the LoggerRepositoryCreatedEvent + event. + + + + + + Event to notify that a logger repository has been created. + + + Event to notify that a logger repository has been created. + + + + Event raised when a new repository is created. + The event source will be this selector. The event args will + be a which + holds the newly created . + + + + + + The default implementation of the interface. + + + + Uses attributes defined on the calling assembly to determine how to + configure the hierarchy for the repository. + + + Nicko Cadell + Gert Driesen + + + + Creates a new repository selector. + + The type of the repositories to create, must implement + + + Create an new repository selector. + The default type for repositories must be specified, + an appropriate value would be . + + + is . + does not implement . + + + + Gets the for the specified assembly. + + The assembly use to lookup the . + + + The type of the created and the repository + to create can be overridden by specifying the + attribute on the . + + + The default values are to use the + implementation of the interface and to use the + as the name of the repository. + + + The created will be automatically configured using + any attributes defined on + the . + + + The for the assembly + is . + + + + Gets the for the specified repository. + + The repository to use to lookup the . + The for the specified repository. + + + Returns the named repository. If is null + a is thrown. If the repository + does not exist a is thrown. + + + Use to create a repository. + + + is . + does not exist. + + + + Create a new repository for the assembly specified + + the assembly to use to create the repository to associate with the . + The type of repository to create, must implement . + The repository created. + + + The created will be associated with the repository + specified such that a call to with the + same assembly specified will return the same repository instance. + + + The type of the created and + the repository to create can be overridden by specifying the + attribute on the + . The default values are to use the + implementation of the + interface and to use the + as the name of the repository. + + + The created will be automatically + configured using any + attributes defined on the . + + + If a repository for the already exists + that repository will be returned. An error will not be raised and that + repository may be of a different type to that specified in . + Also the attribute on the + assembly may be used to override the repository type specified in + . + + + is . + + + + Creates a new repository for the assembly specified. + + the assembly to use to create the repository to associate with the . + The type of repository to create, must implement . + The name to assign to the created repository + Set to true to read and apply the assembly attributes + The repository created. + + + The created will be associated with the repository + specified such that a call to with the + same assembly specified will return the same repository instance. + + + The type of the created and + the repository to create can be overridden by specifying the + attribute on the + . The default values are to use the + implementation of the + interface and to use the + as the name of the repository. + + + The created will be automatically + configured using any + attributes defined on the . + + + If a repository for the already exists + that repository will be returned. An error will not be raised and that + repository may be of a different type to that specified in . + Also the attribute on the + assembly may be used to override the repository type specified in + . + + + is . + + + + Creates a new repository for the specified repository. + + The repository to associate with the . + The type of repository to create, must implement . + If this param is then the default repository type is used. + The new repository. + + + The created will be associated with the repository + specified such that a call to with the + same repository specified will return the same repository instance. + + + is . + already exists. + + + + Test if a named repository exists + + the named repository to check + true if the repository exists + + + Test if a named repository exists. Use + to create a new repository and to retrieve + a repository. + + + + + + Gets a list of objects + + an array of all known objects + + + Gets an array of all of the repositories created by this selector. + + + + + + Aliases a repository to an existing repository. + + The repository to alias. + The repository that the repository is aliased to. + + + The repository specified will be aliased to the repository when created. + The repository must not already exist. + + + When the repository is created it must utilize the same repository type as + the repository it is aliased to, otherwise the aliasing will fail. + + + + is . + -or- + is . + + + + + Notifies the registered listeners that the repository has been created. + + The repository that has been created. + + + Raises the event. + + + + + + Gets the repository name and repository type for the specified assembly. + + The assembly that has a . + in/out param to hold the repository name to use for the assembly, caller should set this to the default value before calling. + in/out param to hold the type of the repository to create for the assembly, caller should set this to the default value before calling. + is . + + + + Configures the repository using information from the assembly. + + The assembly containing + attributes which define the configuration for the repository. + The repository to configure. + + is . + -or- + is . + + + + + Loads the attribute defined plugins on the assembly. + + The assembly that contains the attributes. + The repository to add the plugins to. + + is . + -or- + is . + + + + + Loads the attribute defined aliases on the assembly. + + The assembly that contains the attributes. + The repository to alias to. + + is . + -or- + is . + + + + + The fully qualified type of the DefaultRepositorySelector class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Event to notify that a logger repository has been created. + + + Event to notify that a logger repository has been created. + + + + Event raised when a new repository is created. + The event source will be this selector. The event args will + be a which + holds the newly created . + + + + + + Defined error codes that can be passed to the method. + + + + Values passed to the method. + + + Nicko Cadell + + + + A general error + + + + + Error while writing output + + + + + Failed to flush file + + + + + Failed to close file + + + + + Unable to open output file + + + + + No layout specified + + + + + Failed to parse address + + + + + An evaluator that triggers on an Exception type + + + + This evaluator will trigger if the type of the Exception + passed to + is equal to a Type in . /// + + + Drew Schaeffer + + + + Test if an triggers an action + + + + Implementations of this interface allow certain appenders to decide + when to perform an appender specific action. + + + The action or behavior triggered is defined by the implementation. + + + Nicko Cadell + + + + Test if this event triggers the action + + The event to check + true if this event triggers the action, otherwise false + + + Return true if this event triggers the action + + + + + + The type that causes the trigger to fire. + + + + + Causes subclasses of to cause the trigger to fire. + + + + + Default ctor to allow dynamic creation through a configurator. + + + + + Constructs an evaluator and initializes to trigger on + + the type that triggers this evaluator. + If true, this evaluator will trigger on subclasses of . + + + + Is this the triggering event? + + The event to check + This method returns true, if the logging event Exception + Type is . + Otherwise it returns false + + + This evaluator will trigger if the Exception Type of the event + passed to + is . + + + + + + The type that triggers this evaluator. + + + + + If true, this evaluator will trigger on subclasses of . + + + + + Appenders may delegate their error handling to an . + + + + Error handling is a particularly tedious to get right because by + definition errors are hard to predict and to reproduce. + + + Nicko Cadell + Gert Driesen + + + + Handles the error and information about the error condition is passed as + a parameter. + + The message associated with the error. + The that was thrown when the error occurred. + The error code associated with the error. + + + Handles the error and information about the error condition is passed as + a parameter. + + + + + + Prints the error message passed as a parameter. + + The message associated with the error. + The that was thrown when the error occurred. + + + See . + + + + + + Prints the error message passed as a parameter. + + The message associated with the error. + + + See . + + + + + + Interface for objects that require fixing. + + + + Interface that indicates that the object requires fixing before it + can be taken outside the context of the appender's + method. + + + When objects that implement this interface are stored + in the context properties maps + and + are fixed + (see ) the + method will be called. + + + Nicko Cadell + + + + Get a portable version of this object + + the portable instance of this object + + + Get a portable instance object that represents the current + state of this object. The portable object can be stored + and logged from any thread with identical results. + + + + + + Interface that all loggers implement + + + + This interface supports logging events and testing if a level + is enabled for logging. + + + These methods will not throw exceptions. Note to implementor, ensure + that the implementation of these methods cannot allow an exception + to be thrown to the caller. + + + Nicko Cadell + Gert Driesen + + + + This generic form is intended to be used by wrappers. + + The declaring type of the method that is + the stack boundary into the logging system for this call. + The level of the message to be logged. + The message object to log. + the exception to log, including its stack trace. Pass null to not log an exception. + + + Generates a logging event for the specified using + the and . + + + + + + This is the most generic printing method that is intended to be used + by wrappers. + + The event being logged. + + + Logs the specified logging event through this logger. + + + + + + Checks if this logger is enabled for a given passed as parameter. + + The level to check. + + true if this logger is enabled for level, otherwise false. + + + + Test if this logger is going to log events of the specified . + + + + + + Gets the name of the logger. + + + The name of the logger. + + + + The name of this logger + + + + + + Gets the where this + Logger instance is attached to. + + + The that this logger belongs to. + + + + Gets the where this + Logger instance is attached to. + + + + + + Base interface for all wrappers + + + + Base interface for all wrappers. + + + All wrappers must implement this interface. + + + Nicko Cadell + + + + Get the implementation behind this wrapper object. + + + The object that in implementing this object. + + + + The object that in implementing this + object. The Logger object may not + be the same object as this object because of logger decorators. + This gets the actual underlying objects that is used to process + the log events. + + + + + + Delegate used to handle logger repository creation event notifications + + The which created the repository. + The event args + that holds the instance that has been created. + + + Delegate used to handle logger repository creation event notifications. + + + + + + Provides data for the event. + + + + A + event is raised every time a is created. + + + + + + The created + + + + + Construct instance using specified + + the that has been created + + + Construct instance using specified + + + + + + The that has been created + + + The that has been created + + + + The that has been created + + + + + + Defines the default set of levels recognized by the system. + + + + Each has an associated . + + + Levels have a numeric that defines the relative + ordering between levels. Two Levels with the same + are deemed to be equivalent. + + + The levels that are recognized by log4net are set for each + and each repository can have different levels defined. The levels are stored + in the on the repository. Levels are + looked up by name from the . + + + When logging at level INFO the actual level used is not but + the value of LoggerRepository.LevelMap["INFO"]. The default value for this is + , but this can be changed by reconfiguring the level map. + + + Each level has a in addition to its . The + is the string that is written into the output log. By default + the display name is the same as the level name, but this can be used to alias levels + or to localize the log output. + + + Some of the predefined levels recognized by the system are: + + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + + Nicko Cadell + Gert Driesen + + + + Constructor + + Integer value for this level, higher values represent more severe levels. + The string name of this level. + The display name for this level. This may be localized or otherwise different from the name + + + Initializes a new instance of the class with + the specified level name and value. + + + + + + Constructor + + Integer value for this level, higher values represent more severe levels. + The string name of this level. + + + Initializes a new instance of the class with + the specified level name and value. + + + + + + Returns the representation of the current + . + + + A representation of the current . + + + + Returns the level . + + + + + + Compares levels. + + The object to compare against. + true if the objects are equal. + + + Compares the levels of instances, and + defers to base class if the target object is not a + instance. + + + + + + Returns a hash code + + A hash code for the current . + + + Returns a hash code suitable for use in hashing algorithms and data + structures like a hash table. + + + Returns the hash code of the level . + + + + + + Compares this instance to a specified object and returns an + indication of their relative values. + + A instance or to compare with this instance. + + A 32-bit signed integer that indicates the relative order of the + values compared. The return value has these meanings: + + + Value + Meaning + + + Less than zero + This instance is less than . + + + Zero + This instance is equal to . + + + Greater than zero + + This instance is greater than . + -or- + is . + + + + + + + must be an instance of + or ; otherwise, an exception is thrown. + + + is not a . + + + + Returns a value indicating whether a specified + is greater than another specified . + + A + A + + true if is greater than + ; otherwise, false. + + + + Compares two levels. + + + + + + Returns a value indicating whether a specified + is less than another specified . + + A + A + + true if is less than + ; otherwise, false. + + + + Compares two levels. + + + + + + Returns a value indicating whether a specified + is greater than or equal to another specified . + + A + A + + true if is greater than or equal to + ; otherwise, false. + + + + Compares two levels. + + + + + + Returns a value indicating whether a specified + is less than or equal to another specified . + + A + A + + true if is less than or equal to + ; otherwise, false. + + + + Compares two levels. + + + + + + Returns a value indicating whether two specified + objects have the same value. + + A or . + A or . + + true if the value of is the same as the + value of ; otherwise, false. + + + + Compares two levels. + + + + + + Returns a value indicating whether two specified + objects have different values. + + A or . + A or . + + true if the value of is different from + the value of ; otherwise, false. + + + + Compares two levels. + + + + + + Compares two specified instances. + + The first to compare. + The second to compare. + + A 32-bit signed integer that indicates the relative order of the + two values compared. The return value has these meanings: + + + Value + Meaning + + + Less than zero + is less than . + + + Zero + is equal to . + + + Greater than zero + is greater than . + + + + + + Compares two levels. + + + + + + The level designates a higher level than all the rest. + + + + + The level designates very severe error events. + System unusable, emergencies. + + + + + The level designates very severe error events. + System unusable, emergencies. + + + + + The level designates very severe error events + that will presumably lead the application to abort. + + + + + The level designates very severe error events. + Take immediate action, alerts. + + + + + The level designates very severe error events. + Critical condition, critical. + + + + + The level designates very severe error events. + + + + + The level designates error events that might + still allow the application to continue running. + + + + + The level designates potentially harmful + situations. + + + + + The level designates informational messages + that highlight the progress of the application at the highest level. + + + + + The level designates informational messages that + highlight the progress of the application at coarse-grained level. + + + + + The level designates fine-grained informational + events that are most useful to debug an application. + + + + + The level designates fine-grained informational + events that are most useful to debug an application. + + + + + The level designates fine-grained informational + events that are most useful to debug an application. + + + + + The level designates fine-grained informational + events that are most useful to debug an application. + + + + + The level designates fine-grained informational + events that are most useful to debug an application. + + + + + The level designates fine-grained informational + events that are most useful to debug an application. + + + + + The level designates the lowest level possible. + + + + + Gets the name of this level. + + + The name of this level. + + + + Gets the name of this level. + + + + + + Gets the value of this level. + + + The value of this level. + + + + Gets the value of this level. + + + + + + Gets the display name of this level. + + + The display name of this level. + + + + Gets the display name of this level. + + + + + + A strongly-typed collection of objects. + + Nicko Cadell + + + + Creates a read-only wrapper for a LevelCollection instance. + + list to create a readonly wrapper arround + + A LevelCollection wrapper that is read-only. + + + + + Initializes a new instance of the LevelCollection class + that is empty and has the default initial capacity. + + + + + Initializes a new instance of the LevelCollection class + that has the specified initial capacity. + + + The number of elements that the new LevelCollection is initially capable of storing. + + + + + Initializes a new instance of the LevelCollection class + that contains elements copied from the specified LevelCollection. + + The LevelCollection whose elements are copied to the new collection. + + + + Initializes a new instance of the LevelCollection class + that contains elements copied from the specified array. + + The array whose elements are copied to the new list. + + + + Initializes a new instance of the LevelCollection class + that contains elements copied from the specified collection. + + The collection whose elements are copied to the new list. + + + + Allow subclasses to avoid our default constructors + + + + + + Copies the entire LevelCollection to a one-dimensional + array. + + The one-dimensional array to copy to. + + + + Copies the entire LevelCollection to a one-dimensional + array, starting at the specified index of the target array. + + The one-dimensional array to copy to. + The zero-based index in at which copying begins. + + + + Adds a to the end of the LevelCollection. + + The to be added to the end of the LevelCollection. + The index at which the value has been added. + + + + Removes all elements from the LevelCollection. + + + + + Creates a shallow copy of the . + + A new with a shallow copy of the collection data. + + + + Determines whether a given is in the LevelCollection. + + The to check for. + true if is found in the LevelCollection; otherwise, false. + + + + Returns the zero-based index of the first occurrence of a + in the LevelCollection. + + The to locate in the LevelCollection. + + The zero-based index of the first occurrence of + in the entire LevelCollection, if found; otherwise, -1. + + + + + Inserts an element into the LevelCollection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + is less than zero + -or- + is equal to or greater than . + + + + + Removes the first occurrence of a specific from the LevelCollection. + + The to remove from the LevelCollection. + + The specified was not found in the LevelCollection. + + + + + Removes the element at the specified index of the LevelCollection. + + The zero-based index of the element to remove. + + is less than zero + -or- + is equal to or greater than . + + + + + Returns an enumerator that can iterate through the LevelCollection. + + An for the entire LevelCollection. + + + + Adds the elements of another LevelCollection to the current LevelCollection. + + The LevelCollection whose elements should be added to the end of the current LevelCollection. + The new of the LevelCollection. + + + + Adds the elements of a array to the current LevelCollection. + + The array whose elements should be added to the end of the LevelCollection. + The new of the LevelCollection. + + + + Adds the elements of a collection to the current LevelCollection. + + The collection whose elements should be added to the end of the LevelCollection. + The new of the LevelCollection. + + + + Sets the capacity to the actual number of elements. + + + + + is less than zero + -or- + is equal to or greater than . + + + + + is less than zero + -or- + is equal to or greater than . + + + + + Gets the number of elements actually contained in the LevelCollection. + + + + + Gets a value indicating whether access to the collection is synchronized (thread-safe). + + false, because the backing type is an array, which is never thread-safe. + + + + Gets an object that can be used to synchronize access to the collection. + + + + + Gets or sets the at the specified index. + + The zero-based index of the element to get or set. + + is less than zero + -or- + is equal to or greater than . + + + + + Gets a value indicating whether the collection has a fixed size. + + true if the collection has a fixed size; otherwise, false. The default is false + + + + Gets a value indicating whether the IList is read-only. + + true if the collection is read-only; otherwise, false. The default is false + + + + Gets or sets the number of elements the LevelCollection can contain. + + + + + Supports type-safe iteration over a . + + + + + Advances the enumerator to the next element in the collection. + + + true if the enumerator was successfully advanced to the next element; + false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, before the first element in the collection. + + + + + Gets the current element in the collection. + + + + + Type visible only to our subclasses + Used to access protected constructor + + + + + A value + + + + + Supports simple iteration over a . + + + + + Initializes a new instance of the Enumerator class. + + + + + + Advances the enumerator to the next element in the collection. + + + true if the enumerator was successfully advanced to the next element; + false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, before the first element in the collection. + + + + + Gets the current element in the collection. + + + + + An evaluator that triggers at a threshold level + + + + This evaluator will trigger if the level of the event + passed to + is equal to or greater than the + level. + + + Nicko Cadell + + + + The threshold for triggering + + + + + Create a new evaluator using the threshold. + + + + Create a new evaluator using the threshold. + + + This evaluator will trigger if the level of the event + passed to + is equal to or greater than the + level. + + + + + + Create a new evaluator using the specified threshold. + + the threshold to trigger at + + + Create a new evaluator using the specified threshold. + + + This evaluator will trigger if the level of the event + passed to + is equal to or greater than the + level. + + + + + + Is this the triggering event? + + The event to check + This method returns true, if the event level + is equal or higher than the . + Otherwise it returns false + + + This evaluator will trigger if the level of the event + passed to + is equal to or greater than the + level. + + + + + + the threshold to trigger at + + + The that will cause this evaluator to trigger + + + + This evaluator will trigger if the level of the event + passed to + is equal to or greater than the + level. + + + + + + Mapping between string name and Level object + + + + Mapping between string name and object. + This mapping is held separately for each . + The level name is case insensitive. + + + Nicko Cadell + + + + Mapping from level name to Level object. The + level name is case insensitive + + + + + Construct the level map + + + + Construct the level map. + + + + + + Clear the internal maps of all levels + + + + Clear the internal maps of all levels + + + + + + Create a new Level and add it to the map + + the string to display for the Level + the level value to give to the Level + + + Create a new Level and add it to the map + + + + + + + Create a new Level and add it to the map + + the string to display for the Level + the level value to give to the Level + the display name to give to the Level + + + Create a new Level and add it to the map + + + + + + Add a Level to the map + + the Level to add + + + Add a Level to the map + + + + + + Lookup a named level from the map + + the name of the level to lookup is taken from this level. + If the level is not set on the map then this level is added + the level in the map with the name specified + + + Lookup a named level from the map. The name of the level to lookup is taken + from the property of the + argument. + + + If no level with the specified name is found then the + argument is added to the level map + and returned. + + + + + + Lookup a by name + + The name of the Level to lookup + a Level from the map with the name specified + + + Returns the from the + map with the name specified. If the no level is + found then null is returned. + + + + + + Return all possible levels as a list of Level objects. + + all possible levels as a list of Level objects + + + Return all possible levels as a list of Level objects. + + + + + + The internal representation of caller location information. + + + + This class uses the System.Diagnostics.StackTrace class to generate + a call stack. The caller's information is then extracted from this stack. + + + The System.Diagnostics.StackTrace class is not supported on the + .NET Compact Framework 1.0 therefore caller location information is not + available on that framework. + + + The System.Diagnostics.StackTrace class has this to say about Release builds: + + + "StackTrace information will be most informative with Debug build configurations. + By default, Debug builds include debug symbols, while Release builds do not. The + debug symbols contain most of the file, method name, line number, and column + information used in constructing StackFrame and StackTrace objects. StackTrace + might not report as many method calls as expected, due to code transformations + that occur during optimization." + + + This means that in a Release build the caller information may be incomplete or may + not exist at all! Therefore caller location information cannot be relied upon in a Release build. + + + Nicko Cadell + Gert Driesen + + + + When location information is not available the constant + NA is returned. Current value of this string + constant is ?. + + + + + Constructor + + The declaring type of the method that is + the stack boundary into the logging system for this call. + + + Initializes a new instance of the + class based on the current thread. + + + + + + Constructor + + The fully qualified class name. + The method name. + The file name. + The line number of the method within the file. + + + Initializes a new instance of the + class with the specified data. + + + + + + The fully qualified type of the LocationInfo class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Gets the fully qualified class name of the caller making the logging + request. + + + The fully qualified class name of the caller making the logging + request. + + + + Gets the fully qualified class name of the caller making the logging + request. + + + + + + Gets the file name of the caller. + + + The file name of the caller. + + + + Gets the file name of the caller. + + + + + + Gets the line number of the caller. + + + The line number of the caller. + + + + Gets the line number of the caller. + + + + + + Gets the method name of the caller. + + + The method name of the caller. + + + + Gets the method name of the caller. + + + + + + Gets all available caller information + + + All available caller information, in the format + fully.qualified.classname.of.caller.methodName(Filename:line) + + + + Gets all available caller information, in the format + fully.qualified.classname.of.caller.methodName(Filename:line) + + + + + + Gets the stack frames from the stack trace of the caller making the log request + + + + + Static manager that controls the creation of repositories + + + + Static manager that controls the creation of repositories + + + This class is used by the wrapper managers (e.g. ) + to provide access to the objects. + + + This manager also holds the that is used to + lookup and create repositories. The selector can be set either programmatically using + the property, or by setting the log4net.RepositorySelector + AppSetting in the applications config file to the fully qualified type name of the + selector to use. + + + Nicko Cadell + Gert Driesen + + + + Private constructor to prevent instances. Only static methods should be used. + + + + Private constructor to prevent instances. Only static methods should be used. + + + + + + Hook the shutdown event + + + + On the full .NET runtime, the static constructor hooks up the + AppDomain.ProcessExit and AppDomain.DomainUnload> events. + These are used to shutdown the log4net system as the application exits. + + + + + + Register for ProcessExit and DomainUnload events on the AppDomain + + + + This needs to be in a separate method because the events make + a LinkDemand for the ControlAppDomain SecurityPermission. Because + this is a LinkDemand it is demanded at JIT time. Therefore we cannot + catch the exception in the method itself, we have to catch it in the + caller. + + + + + + Return the default instance. + + the repository to lookup in + Return the default instance + + + Gets the for the repository specified + by the argument. + + + + + + Returns the default instance. + + The assembly to use to lookup the repository. + The default instance. + + + + Return the default instance. + + the repository to lookup in + Return the default instance + + + Gets the for the repository specified + by the argument. + + + + + + Returns the default instance. + + The assembly to use to lookup the repository. + The default instance. + + + Returns the default instance. + + + + + + Returns the named logger if it exists. + + The repository to lookup in. + The fully qualified logger name to look for. + + The logger found, or null if the named logger does not exist in the + specified repository. + + + + If the named logger exists (in the specified repository) then it + returns a reference to the logger, otherwise it returns + null. + + + + + + Returns the named logger if it exists. + + The assembly to use to lookup the repository. + The fully qualified logger name to look for. + + The logger found, or null if the named logger does not exist in the + specified assembly's repository. + + + + If the named logger exists (in the specified assembly's repository) then it + returns a reference to the logger, otherwise it returns + null. + + + + + + Returns all the currently defined loggers in the specified repository. + + The repository to lookup in. + All the defined loggers. + + + The root logger is not included in the returned array. + + + + + + Returns all the currently defined loggers in the specified assembly's repository. + + The assembly to use to lookup the repository. + All the defined loggers. + + + The root logger is not included in the returned array. + + + + + + Retrieves or creates a named logger. + + The repository to lookup in. + The name of the logger to retrieve. + The logger with the name specified. + + + Retrieves a logger named as the + parameter. If the named logger already exists, then the + existing instance will be returned. Otherwise, a new instance is + created. + + + By default, loggers do not have a set level but inherit + it from the hierarchy. This is one of the central features of + log4net. + + + + + + Retrieves or creates a named logger. + + The assembly to use to lookup the repository. + The name of the logger to retrieve. + The logger with the name specified. + + + Retrieves a logger named as the + parameter. If the named logger already exists, then the + existing instance will be returned. Otherwise, a new instance is + created. + + + By default, loggers do not have a set level but inherit + it from the hierarchy. This is one of the central features of + log4net. + + + + + + Shorthand for . + + The repository to lookup in. + The of which the fullname will be used as the name of the logger to retrieve. + The logger with the name specified. + + + Gets the logger for the fully qualified name of the type specified. + + + + + + Shorthand for . + + the assembly to use to lookup the repository + The of which the fullname will be used as the name of the logger to retrieve. + The logger with the name specified. + + + Gets the logger for the fully qualified name of the type specified. + + + + + + Shuts down the log4net system. + + + + Calling this method will safely close and remove all + appenders in all the loggers including root contained in all the + default repositories. + + + Some appenders need to be closed before the application exists. + Otherwise, pending logging events might be lost. + + + The shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + + + + Shuts down the repository for the repository specified. + + The repository to shutdown. + + + Calling this method will safely close and remove all + appenders in all the loggers including root contained in the + repository for the specified. + + + Some appenders need to be closed before the application exists. + Otherwise, pending logging events might be lost. + + + The shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + + + + Shuts down the repository for the repository specified. + + The assembly to use to lookup the repository. + + + Calling this method will safely close and remove all + appenders in all the loggers including root contained in the + repository for the repository. The repository is looked up using + the specified. + + + Some appenders need to be closed before the application exists. + Otherwise, pending logging events might be lost. + + + The shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + + + + Resets all values contained in this repository instance to their defaults. + + The repository to reset. + + + Resets all values contained in the repository instance to their + defaults. This removes all appenders from all loggers, sets + the level of all non-root loggers to null, + sets their additivity flag to true and sets the level + of the root logger to . Moreover, + message disabling is set its default "off" value. + + + + + + Resets all values contained in this repository instance to their defaults. + + The assembly to use to lookup the repository to reset. + + + Resets all values contained in the repository instance to their + defaults. This removes all appenders from all loggers, sets + the level of all non-root loggers to null, + sets their additivity flag to true and sets the level + of the root logger to . Moreover, + message disabling is set its default "off" value. + + + + + + Creates a repository with the specified name. + + The name of the repository, this must be unique amongst repositories. + The created for the repository. + + + CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. + + + Creates the default type of which is a + object. + + + The name must be unique. Repositories cannot be redefined. + An will be thrown if the repository already exists. + + + The specified repository already exists. + + + + Creates a repository with the specified name. + + The name of the repository, this must be unique amongst repositories. + The created for the repository. + + + Creates the default type of which is a + object. + + + The name must be unique. Repositories cannot be redefined. + An will be thrown if the repository already exists. + + + The specified repository already exists. + + + + Creates a repository with the specified name and repository type. + + The name of the repository, this must be unique to the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. + + + The name must be unique. Repositories cannot be redefined. + An Exception will be thrown if the repository already exists. + + + The specified repository already exists. + + + + Creates a repository with the specified name and repository type. + + The name of the repository, this must be unique to the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + The name must be unique. Repositories cannot be redefined. + An Exception will be thrown if the repository already exists. + + + The specified repository already exists. + + + + Creates a repository for the specified assembly and repository type. + + The assembly to use to get the name of the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. + + + The created will be associated with the repository + specified such that a call to with the + same assembly specified will return the same repository instance. + + + + + + Creates a repository for the specified assembly and repository type. + + The assembly to use to get the name of the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + The created will be associated with the repository + specified such that a call to with the + same assembly specified will return the same repository instance. + + + + + + Gets an array of all currently defined repositories. + + An array of all the known objects. + + + Gets an array of all currently defined repositories. + + + + + + Internal method to get pertinent version info. + + A string of version info. + + + + Called when the event fires + + the that is exiting + null + + + Called when the event fires. + + + When the event is triggered the log4net system is . + + + + + + Called when the event fires + + the that is exiting + null + + + Called when the event fires. + + + When the event is triggered the log4net system is . + + + + + + The fully qualified type of the LoggerManager class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Initialize the default repository selector + + + + + Gets or sets the repository selector used by the . + + + The repository selector used by the . + + + + The repository selector () is used by + the to create and select repositories + (). + + + The caller to supplies either a string name + or an assembly (if not supplied the assembly is inferred using + ). + + + This context is used by the selector to lookup a specific repository. + + + For the full .NET Framework, the default repository is DefaultRepositorySelector; + for the .NET Compact Framework CompactRepositorySelector is the default + repository. + + + + + + Implementation of the interface. + + + + This class should be used as the base for all wrapper implementations. + + + Nicko Cadell + Gert Driesen + + + + Constructs a new wrapper for the specified logger. + + The logger to wrap. + + + Constructs a new wrapper for the specified logger. + + + + + + The logger that this object is wrapping + + + + + Gets the implementation behind this wrapper object. + + + The object that this object is implementing. + + + + The Logger object may not be the same object as this object + because of logger decorators. + + + This gets the actual underlying objects that is used to process + the log events. + + + + + + Portable data structure used by + + + + Portable data structure used by + + + Nicko Cadell + + + + The logger name. + + + + The logger name. + + + + + + Level of logging event. + + + + Level of logging event. Level cannot be Serializable + because it is a flyweight. Due to its special serialization it + cannot be declared final either. + + + + + + The application supplied message. + + + + The application supplied message of logging event. + + + + + + The name of thread + + + + The name of thread in which this logging event was generated + + + + + + Gets or sets the local time the event was logged + + + + Prefer using the setter, since local time can be ambiguous. + + + + + + Location information for the caller. + + + + Location information for the caller. + + + + + + String representation of the user + + + + String representation of the user's windows name, + like DOMAIN\username + + + + + + String representation of the identity. + + + + String representation of the current thread's principal identity. + + + + + + The string representation of the exception + + + + The string representation of the exception + + + + + + String representation of the AppDomain. + + + + String representation of the AppDomain. + + + + + + Additional event specific properties + + + + A logger or an appender may attach additional + properties to specific events. These properties + have a string key and an object value. + + + + + + Gets or sets the UTC time the event was logged + + + + The TimeStamp is stored in the UTC time zone. + + + + + + Flags passed to the property + + + + Flags passed to the property + + + Nicko Cadell + + + + Fix the MDC + + + + + Fix the NDC + + + + + Fix the rendered message + + + + + Fix the thread name + + + + + Fix the callers location information + + + CAUTION: Very slow to generate + + + + + Fix the callers windows user name + + + CAUTION: Slow to generate + + + + + Fix the domain friendly name + + + + + Fix the callers principal name + + + CAUTION: May be slow to generate + + + + + Fix the exception text + + + + + Fix the event properties. Active properties must implement in order to be eligible for fixing. + + + + + No fields fixed + + + + + All fields fixed + + + + + Partial fields fixed + + + + This set of partial fields gives good performance. The following fields are fixed: + + + + + + + + + + + + + The internal representation of logging events. + + + + When an affirmative decision is made to log then a + instance is created. This instance + is passed around to the different log4net components. + + + This class is of concern to those wishing to extend log4net. + + + Some of the values in instances of + are considered volatile, that is the values are correct at the + time the event is delivered to appenders, but will not be consistent + at any time afterwards. If an event is to be stored and then processed + at a later time these volatile values must be fixed by calling + . There is a performance penalty + for incurred by calling but it + is essential to maintaining data consistency. + + + Nicko Cadell + Gert Driesen + Douglas de la Torre + Daniel Cazzulino + + + + The key into the Properties map for the host name value. + + + + + The key into the Properties map for the thread identity value. + + + + + The key into the Properties map for the user name value. + + + + + Initializes a new instance of the class + from the supplied parameters. + + The declaring type of the method that is + the stack boundary into the logging system for this call. + The repository this event is logged in. + The name of the logger of this event. + The level of this event. + The message of this event. + The exception for this event. + + + Except , and , + all fields of LoggingEvent are filled when actually needed. Call + to cache all data locally + to prevent inconsistencies. + + This method is called by the log4net framework + to create a logging event. + + + + + + Initializes a new instance of the class + using specific data. + + The declaring type of the method that is + the stack boundary into the logging system for this call. + The repository this event is logged in. + Data used to initialize the logging event. + The fields in the struct that have already been fixed. + + + This constructor is provided to allow a + to be created independently of the log4net framework. This can + be useful if you require a custom serialization scheme. + + + Use the method to obtain an + instance of the class. + + + The parameter should be used to specify which fields in the + struct have been preset. Fields not specified in the + will be captured from the environment if requested or fixed. + + + + + + Initializes a new instance of the class + using specific data. + + The declaring type of the method that is + the stack boundary into the logging system for this call. + The repository this event is logged in. + Data used to initialize the logging event. + + + This constructor is provided to allow a + to be created independently of the log4net framework. This can + be useful if you require a custom serialization scheme. + + + Use the method to obtain an + instance of the class. + + + This constructor sets this objects flags to , + this assumes that all the data relating to this event is passed in via the + parameter and no other data should be captured from the environment. + + + + + + Initializes a new instance of the class + using specific data. + + Data used to initialize the logging event. + + + This constructor is provided to allow a + to be created independently of the log4net framework. This can + be useful if you require a custom serialization scheme. + + + Use the method to obtain an + instance of the class. + + + This constructor sets this objects flags to , + this assumes that all the data relating to this event is passed in via the + parameter and no other data should be captured from the environment. + + + + + + Serialization constructor + + The that holds the serialized object data. + The that contains contextual information about the source or destination. + + + Initializes a new instance of the class + with serialized data. + + + + + + Ensure that the repository is set. + + the value for the repository + + + + Write the rendered message to a TextWriter + + the writer to write the message to + + + Unlike the property this method + does store the message data in the internal cache. Therefore + if called only once this method should be faster than the + property, however if the message is + to be accessed multiple times then the property will be more efficient. + + + + + + Serializes this object into the provided. + + The to populate with data. + The destination for this serialization. + + + The data in this event must be fixed before it can be serialized. + + + The method must be called during the + method call if this event + is to be used outside that method. + + + + + + Gets the portable data for this . + + The for this event. + + + A new can be constructed using a + instance. + + + Does a fix of the data + in the logging event before returning the event data. + + + + + + Gets the portable data for this . + + The set of data to ensure is fixed in the LoggingEventData + The for this event. + + + A new can be constructed using a + instance. + + + + + + Returns this event's exception's rendered using the + . + + + This event's exception's rendered using the . + + + + Obsolete. Use instead. + + + + + + Returns this event's exception's rendered using the + . + + + This event's exception's rendered using the . + + + + Returns this event's exception's rendered using the + . + + + + + + Fix instance fields that hold volatile data. + + + + Some of the values in instances of + are considered volatile, that is the values are correct at the + time the event is delivered to appenders, but will not be consistent + at any time afterwards. If an event is to be stored and then processed + at a later time these volatile values must be fixed by calling + . There is a performance penalty + incurred by calling but it + is essential to maintaining data consistency. + + + Calling is equivalent to + calling passing the parameter + false. + + + See for more + information. + + + + + + Fixes instance fields that hold volatile data. + + Set to true to not fix data that takes a long time to fix. + + + Some of the values in instances of + are considered volatile, that is the values are correct at the + time the event is delivered to appenders, but will not be consistent + at any time afterwards. If an event is to be stored and then processed + at a later time these volatile values must be fixed by calling + . There is a performance penalty + for incurred by calling but it + is essential to maintaining data consistency. + + + The param controls the data that + is fixed. Some of the data that can be fixed takes a long time to + generate, therefore if you do not require those settings to be fixed + they can be ignored by setting the param + to true. This setting will ignore the + and settings. + + + Set to false to ensure that all + settings are fixed. + + + + + + Fix the fields specified by the parameter + + the fields to fix + + + Only fields specified in the will be fixed. + Fields will not be fixed if they have previously been fixed. + It is not possible to 'unfix' a field. + + + + + + Lookup a composite property in this event + + the key for the property to lookup + the value for the property + + + This event has composite properties that combine together properties from + several different contexts in the following order: + + + this events properties + + This event has that can be set. These + properties are specific to this event only. + + + + the thread properties + + The that are set on the current + thread. These properties are shared by all events logged on this thread. + + + + the global properties + + The that are set globally. These + properties are shared by all the threads in the AppDomain. + + + + + + + + + Get all the composite properties in this event + + the containing all the properties + + + See for details of the composite properties + stored by the event. + + + This method returns a single containing all the + properties defined for this event. + + + + + + The internal logging event data. + + + + + The internal logging event data. + + + + + The internal logging event data. + + + + + The fully qualified Type of the calling + logger class in the stack frame (i.e. the declaring type of the method). + + + + + The application supplied message of logging event. + + + + + The exception that was thrown. + + + This is not serialized. The string representation + is serialized instead. + + + + + The repository that generated the logging event + + + This is not serialized. + + + + + The fix state for this event + + + These flags indicate which fields have been fixed. + Not serialized. + + + + + Indicated that the internal cache is updateable (ie not fixed) + + + This is a seperate flag to m_fixFlags as it allows incrementel fixing and simpler + changes in the caching strategy. + + + + + Gets the time when the current process started. + + + This is the time when this process started. + + + + The TimeStamp is stored internally in UTC and converted to the local time zone for this computer. + + + Tries to get the start time for the current process. + Failing that it returns the time of the first call to + this property. + + + Note that AppDomains may be loaded and unloaded within the + same process without the process terminating and therefore + without the process start time being reset. + + + + + + Gets the UTC time when the current process started. + + + This is the UTC time when this process started. + + + + Tries to get the start time for the current process. + Failing that it returns the time of the first call to + this property. + + + Note that AppDomains may be loaded and unloaded within the + same process without the process terminating and therefore + without the process start time being reset. + + + + + + Gets the of the logging event. + + + The of the logging event. + + + + Gets the of the logging event. + + + + + + Gets the time of the logging event. + + + The time of the logging event. + + + + The TimeStamp is stored in UTC and converted to the local time zone for this computer. + + + + + + Gets UTC the time of the logging event. + + + The UTC time of the logging event. + + + + + Gets the name of the logger that logged the event. + + + The name of the logger that logged the event. + + + + Gets the name of the logger that logged the event. + + + + + + Gets the location information for this logging event. + + + The location information for this logging event. + + + + The collected information is cached for future use. + + + See the class for more information on + supported frameworks and the different behavior in Debug and + Release builds. + + + + + + Gets the message object used to initialize this event. + + + The message object used to initialize this event. + + + + Gets the message object used to initialize this event. + Note that this event may not have a valid message object. + If the event is serialized the message object will not + be transferred. To get the text of the message the + property must be used + not this property. + + + If there is no defined message object for this event then + null will be returned. + + + + + + Gets the exception object used to initialize this event. + + + The exception object used to initialize this event. + + + + Gets the exception object used to initialize this event. + Note that this event may not have a valid exception object. + If the event is serialized the exception object will not + be transferred. To get the text of the exception the + method must be used + not this property. + + + If there is no defined exception object for this event then + null will be returned. + + + + + + The that this event was created in. + + + + The that this event was created in. + + + + + + Gets the message, rendered through the . + + + The message rendered through the . + + + + The collected information is cached for future use. + + + + + + Gets the name of the current thread. + + + The name of the current thread, or the thread ID when + the name is not available. + + + + The collected information is cached for future use. + + + + + + Gets the name of the current user. + + + The name of the current user, or NOT AVAILABLE when the + underlying runtime has no support for retrieving the name of the + current user. + + + + Calls WindowsIdentity.GetCurrent().Name to get the name of + the current windows user. + + + To improve performance, we could cache the string representation of + the name, and reuse that as long as the identity stayed constant. + Once the identity changed, we would need to re-assign and re-render + the string. + + + However, the WindowsIdentity.GetCurrent() call seems to + return different objects every time, so the current implementation + doesn't do this type of caching. + + + Timing for these operations: + + + + Method + Results + + + WindowsIdentity.GetCurrent() + 10000 loops, 00:00:00.2031250 seconds + + + WindowsIdentity.GetCurrent().Name + 10000 loops, 00:00:08.0468750 seconds + + + + This means we could speed things up almost 40 times by caching the + value of the WindowsIdentity.GetCurrent().Name property, since + this takes (8.04-0.20) = 7.84375 seconds. + + + + + + Gets the identity of the current thread principal. + + + The string name of the identity of the current thread principal. + + + + Calls System.Threading.Thread.CurrentPrincipal.Identity.Name to get + the name of the current thread principal. + + + + + + Gets the AppDomain friendly name. + + + The AppDomain friendly name. + + + + Gets the AppDomain friendly name. + + + + + + Additional event specific properties. + + + Additional event specific properties. + + + + A logger or an appender may attach additional + properties to specific events. These properties + have a string key and an object value. + + + This property is for events that have been added directly to + this event. The aggregate properties (which include these + event properties) can be retrieved using + and . + + + Once the properties have been fixed this property + returns the combined cached properties. This ensures that updates to + this property are always reflected in the underlying storage. When + returning the combined properties there may be more keys in the + Dictionary than expected. + + + + + + The fixed fields in this event + + + The set of fields that are fixed in this event + + + + Fields will not be fixed if they have previously been fixed. + It is not possible to 'unfix' a field. + + + + + + Implementation of wrapper interface. + + + + This implementation of the interface + forwards to the held by the base class. + + + This logger has methods to allow the caller to log at the following + levels: + + + + DEBUG + + The and methods log messages + at the DEBUG level. That is the level with that name defined in the + repositories . The default value + for this level is . The + property tests if this level is enabled for logging. + + + + INFO + + The and methods log messages + at the INFO level. That is the level with that name defined in the + repositories . The default value + for this level is . The + property tests if this level is enabled for logging. + + + + WARN + + The and methods log messages + at the WARN level. That is the level with that name defined in the + repositories . The default value + for this level is . The + property tests if this level is enabled for logging. + + + + ERROR + + The and methods log messages + at the ERROR level. That is the level with that name defined in the + repositories . The default value + for this level is . The + property tests if this level is enabled for logging. + + + + FATAL + + The and methods log messages + at the FATAL level. That is the level with that name defined in the + repositories . The default value + for this level is . The + property tests if this level is enabled for logging. + + + + + The values for these levels and their semantic meanings can be changed by + configuring the for the repository. + + + Nicko Cadell + Gert Driesen + + + + The ILog interface is use by application to log messages into + the log4net framework. + + + + Use the to obtain logger instances + that implement this interface. The + static method is used to get logger instances. + + + This class contains methods for logging at different levels and also + has properties for determining if those logging levels are + enabled in the current configuration. + + + This interface can be implemented in different ways. This documentation + specifies reasonable behavior that a caller can expect from the actual + implementation, however different implementations reserve the right to + do things differently. + + + Simple example of logging messages + + ILog log = LogManager.GetLogger("application-log"); + + log.Info("Application Start"); + log.Debug("This is a debug message"); + + if (log.IsDebugEnabled) + { + log.Debug("This is another debug message"); + } + + + + + Nicko Cadell + Gert Driesen + + + Log a message object with the level. + + Log a message object with the level. + + The message object to log. + + + This method first checks if this logger is DEBUG + enabled by comparing the level of this logger with the + level. If this logger is + DEBUG enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a formatted string with the level. + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + Log a message object with the level. + + Logs a message object with the level. + + + + This method first checks if this logger is INFO + enabled by comparing the level of this logger with the + level. If this logger is + INFO enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of the + additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + The message object to log. + + + + + + Logs a message object with the INFO level including + the stack trace of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a formatted message string with the level. + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + Log a message object with the level. + + Log a message object with the level. + + + + This method first checks if this logger is WARN + enabled by comparing the level of this logger with the + level. If this logger is + WARN enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of the + additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + The message object to log. + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a formatted message string with the level. + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + Log a message object with the level. + + Logs a message object with the level. + + The message object to log. + + + This method first checks if this logger is ERROR + enabled by comparing the level of this logger with the + level. If this logger is + ERROR enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of the + additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a formatted message string with the level. + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + Log a message object with the level. + + Log a message object with the level. + + + + This method first checks if this logger is FATAL + enabled by comparing the level of this logger with the + level. If this logger is + FATAL enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of the + additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + The message object to log. + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a formatted message string with the level. + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Checks if this logger is enabled for the level. + + + true if this logger is enabled for events, false otherwise. + + + + This function is intended to lessen the computational cost of + disabled log debug statements. + + For some ILog interface log, when you write: + + log.Debug("This is entry number: " + i ); + + + You incur the cost constructing the message, string construction and concatenation in + this case, regardless of whether the message is logged or not. + + + If you are worried about speed (who isn't), then you should write: + + + if (log.IsDebugEnabled) + { + log.Debug("This is entry number: " + i ); + } + + + This way you will not incur the cost of parameter + construction if debugging is disabled for log. On + the other hand, if the log is debug enabled, you + will incur the cost of evaluating whether the logger is debug + enabled twice. Once in and once in + the . This is an insignificant overhead + since evaluating a logger takes about 1% of the time it + takes to actually log. This is the preferred style of logging. + + Alternatively if your logger is available statically then the is debug + enabled state can be stored in a static variable like this: + + + private static readonly bool isDebugEnabled = log.IsDebugEnabled; + + + Then when you come to log you can write: + + + if (isDebugEnabled) + { + log.Debug("This is entry number: " + i ); + } + + + This way the debug enabled state is only queried once + when the class is loaded. Using a private static readonly + variable is the most efficient because it is a run time constant + and can be heavily optimized by the JIT compiler. + + + Of course if you use a static readonly variable to + hold the enabled state of the logger then you cannot + change the enabled state at runtime to vary the logging + that is produced. You have to decide if you need absolute + speed or runtime flexibility. + + + + + + + + Checks if this logger is enabled for the level. + + + true if this logger is enabled for events, false otherwise. + + + For more information see . + + + + + + + + Checks if this logger is enabled for the level. + + + true if this logger is enabled for events, false otherwise. + + + For more information see . + + + + + + + + Checks if this logger is enabled for the level. + + + true if this logger is enabled for events, false otherwise. + + + For more information see . + + + + + + + + Checks if this logger is enabled for the level. + + + true if this logger is enabled for events, false otherwise. + + + For more information see . + + + + + + + + Construct a new wrapper for the specified logger. + + The logger to wrap. + + + Construct a new wrapper for the specified logger. + + + + + + Virtual method called when the configuration of the repository changes + + the repository holding the levels + + + Virtual method called when the configuration of the repository changes + + + + + + Logs a message object with the DEBUG level. + + The message object to log. + + + This method first checks if this logger is DEBUG + enabled by comparing the level of this logger with the + DEBUG level. If this logger is + DEBUG enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of the + additivity flag. + + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + Logs a message object with the DEBUG level + + The message object to log. + The exception to log, including its stack trace. + + + Logs a message object with the DEBUG level including + the stack trace of the passed + as a parameter. + + + See the form for more detailed information. + + + + + + + Logs a formatted message string with the DEBUG level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the DEBUG level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the DEBUG level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the DEBUG level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the DEBUG level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a message object with the INFO level. + + The message object to log. + + + This method first checks if this logger is INFO + enabled by comparing the level of this logger with the + INFO level. If this logger is + INFO enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + Logs a message object with the INFO level. + + The message object to log. + The exception to log, including its stack trace. + + + Logs a message object with the INFO level including + the stack trace of the + passed as a parameter. + + + See the form for more detailed information. + + + + + + + Logs a formatted message string with the INFO level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the INFO level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the INFO level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the INFO level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the INFO level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a message object with the WARN level. + + the message object to log + + + This method first checks if this logger is WARN + enabled by comparing the level of this logger with the + WARN level. If this logger is + WARN enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger and + also higher in the hierarchy depending on the value of the + additivity flag. + + + WARNING Note that passing an to this + method will print the name of the but no + stack trace. To print a stack trace use the + form instead. + + + + + + Logs a message object with the WARN level + + The message object to log. + The exception to log, including its stack trace. + + + Logs a message object with the WARN level including + the stack trace of the + passed as a parameter. + + + See the form for more detailed information. + + + + + + + Logs a formatted message string with the WARN level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the WARN level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the WARN level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the WARN level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the WARN level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a message object with the ERROR level. + + The message object to log. + + + This method first checks if this logger is ERROR + enabled by comparing the level of this logger with the + ERROR level. If this logger is + ERROR enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger and + also higher in the hierarchy depending on the value of the + additivity flag. + + + WARNING Note that passing an to this + method will print the name of the but no + stack trace. To print a stack trace use the + form instead. + + + + + + Logs a message object with the ERROR level + + The message object to log. + The exception to log, including its stack trace. + + + Logs a message object with the ERROR level including + the stack trace of the + passed as a parameter. + + + See the form for more detailed information. + + + + + + + Logs a formatted message string with the ERROR level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the ERROR level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the ERROR level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the ERROR level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the ERROR level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a message object with the FATAL level. + + The message object to log. + + + This method first checks if this logger is FATAL + enabled by comparing the level of this logger with the + FATAL level. If this logger is + FATAL enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger and + also higher in the hierarchy depending on the value of the + additivity flag. + + + WARNING Note that passing an to this + method will print the name of the but no + stack trace. To print a stack trace use the + form instead. + + + + + + Logs a message object with the FATAL level + + The message object to log. + The exception to log, including its stack trace. + + + Logs a message object with the FATAL level including + the stack trace of the + passed as a parameter. + + + See the form for more detailed information. + + + + + + + Logs a formatted message string with the FATAL level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the FATAL level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the FATAL level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the FATAL level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the FATAL level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Event handler for the event + + the repository + Empty + + + + The fully qualified name of this declaring type not the type of any subclass. + + + + + Checks if this logger is enabled for the DEBUG + level. + + + true if this logger is enabled for DEBUG events, + false otherwise. + + + + This function is intended to lessen the computational cost of + disabled log debug statements. + + + For some log Logger object, when you write: + + + log.Debug("This is entry number: " + i ); + + + You incur the cost constructing the message, concatenation in + this case, regardless of whether the message is logged or not. + + + If you are worried about speed, then you should write: + + + if (log.IsDebugEnabled()) + { + log.Debug("This is entry number: " + i ); + } + + + This way you will not incur the cost of parameter + construction if debugging is disabled for log. On + the other hand, if the log is debug enabled, you + will incur the cost of evaluating whether the logger is debug + enabled twice. Once in IsDebugEnabled and once in + the Debug. This is an insignificant overhead + since evaluating a logger takes about 1% of the time it + takes to actually log. + + + + + + Checks if this logger is enabled for the INFO level. + + + true if this logger is enabled for INFO events, + false otherwise. + + + + See for more information and examples + of using this method. + + + + + + + Checks if this logger is enabled for the WARN level. + + + true if this logger is enabled for WARN events, + false otherwise. + + + + See for more information and examples + of using this method. + + + + + + + Checks if this logger is enabled for the ERROR level. + + + true if this logger is enabled for ERROR events, + false otherwise. + + + + See for more information and examples of using this method. + + + + + + + Checks if this logger is enabled for the FATAL level. + + + true if this logger is enabled for FATAL events, + false otherwise. + + + + See for more information and examples of using this method. + + + + + + + provides method information without actually referencing a System.Reflection.MethodBase + as that would require that the containing assembly is loaded. + + + + + + When location information is not available the constant + NA is returned. Current value of this string + constant is ?. + + + + + constructs a method item for an unknown method. + + + + + constructs a method item from the name of the method. + + + + + + constructs a method item from the name of the method and its parameters. + + + + + + + constructs a method item from a method base by determining the method name and its parameters. + + + + + + The fully qualified type of the StackFrameItem class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Gets the method name of the caller making the logging + request. + + + The method name of the caller making the logging + request. + + + + Gets the method name of the caller making the logging + request. + + + + + + Gets the method parameters of the caller making + the logging request. + + + The method parameters of the caller making + the logging request + + + + Gets the method parameters of the caller making + the logging request. + + + + + + A SecurityContext used by log4net when interacting with protected resources + + + + A SecurityContext used by log4net when interacting with protected resources + for example with operating system services. This can be used to impersonate + a principal that has been granted privileges on the system resources. + + + Nicko Cadell + + + + Impersonate this SecurityContext + + State supplied by the caller + An instance that will + revoke the impersonation of this SecurityContext, or null + + + Impersonate this security context. Further calls on the current + thread should now be made in the security context provided + by this object. When the result + method is called the security + context of the thread should be reverted to the state it was in + before was called. + + + + + + The providers default instances. + + + + A configured component that interacts with potentially protected system + resources uses a to provide the elevated + privileges required. If the object has + been not been explicitly provided to the component then the component + will request one from this . + + + By default the is + an instance of which returns only + objects. This is a reasonable default + where the privileges required are not know by the system. + + + This default behavior can be overridden by subclassing the + and overriding the method to return + the desired objects. The default provider + can be replaced by programmatically setting the value of the + property. + + + An alternative is to use the log4net.Config.SecurityContextProviderAttribute + This attribute can be applied to an assembly in the same way as the + log4net.Config.XmlConfiguratorAttribute". The attribute takes + the type to use as the as an argument. + + + Nicko Cadell + + + + The default provider + + + + + Protected default constructor to allow subclassing + + + + Protected default constructor to allow subclassing + + + + + + Create a SecurityContext for a consumer + + The consumer requesting the SecurityContext + An impersonation context + + + The default implementation is to return a . + + + Subclasses should override this method to provide their own + behavior. + + + + + + Gets or sets the default SecurityContextProvider + + + The default SecurityContextProvider + + + + The default provider is used by configured components that + require a and have not had one + given to them. + + + By default this is an instance of + that returns objects. + + + The default provider can be set programmatically by setting + the value of this property to a sub class of + that has the desired behavior. + + + + + + provides stack frame information without actually referencing a System.Diagnostics.StackFrame + as that would require that the containing assembly is loaded. + + + + + + When location information is not available the constant + NA is returned. Current value of this string + constant is ?. + + + + + returns a stack frame item from a stack frame. This + + + + + + + The fully qualified type of the StackFrameItem class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Gets the fully qualified class name of the caller making the logging + request. + + + The fully qualified class name of the caller making the logging + request. + + + + Gets the fully qualified class name of the caller making the logging + request. + + + + + + Gets the file name of the caller. + + + The file name of the caller. + + + + Gets the file name of the caller. + + + + + + Gets the line number of the caller. + + + The line number of the caller. + + + + Gets the line number of the caller. + + + + + + Gets the method name of the caller. + + + The method name of the caller. + + + + Gets the method name of the caller. + + + + + + Gets all available caller information + + + All available caller information, in the format + fully.qualified.classname.of.caller.methodName(Filename:line) + + + + Gets all available caller information, in the format + fully.qualified.classname.of.caller.methodName(Filename:line) + + + + + + An evaluator that triggers after specified number of seconds. + + + + This evaluator will trigger if the specified time period + has passed since last check. + + + Robert Sevcik + + + + The default time threshold for triggering in seconds. Zero means it won't trigger at all. + + + + + The time threshold for triggering in seconds. Zero means it won't trigger at all. + + + + + The UTC time of last check. This gets updated when the object is created and when the evaluator triggers. + + + + + Create a new evaluator using the time threshold in seconds. + + + + Create a new evaluator using the time threshold in seconds. + + + This evaluator will trigger if the specified time period + has passed since last check. + + + + + + Create a new evaluator using the specified time threshold in seconds. + + + The time threshold in seconds to trigger after. + Zero means it won't trigger at all. + + + + Create a new evaluator using the specified time threshold in seconds. + + + This evaluator will trigger if the specified time period + has passed since last check. + + + + + + Is this the triggering event? + + The event to check + This method returns true, if the specified time period + has passed since last check.. + Otherwise it returns false + + + This evaluator will trigger if the specified time period + has passed since last check. + + + + + + The time threshold in seconds to trigger after + + + The time threshold in seconds to trigger after. + Zero means it won't trigger at all. + + + + This evaluator will trigger if the specified time period + has passed since last check. + + + + + + Delegate used to handle creation of new wrappers. + + The logger to wrap in a wrapper. + + + Delegate used to handle creation of new wrappers. This delegate + is called from the + method to construct the wrapper for the specified logger. + + + The delegate to use is supplied to the + constructor. + + + + + + Maps between logger objects and wrapper objects. + + + + This class maintains a mapping between objects and + objects. Use the method to + lookup the for the specified . + + + New wrapper instances are created by the + method. The default behavior is for this method to delegate construction + of the wrapper to the delegate supplied + to the constructor. This allows specialization of the behavior without + requiring subclassing of this type. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the + + The handler to use to create the wrapper objects. + + + Initializes a new instance of the class with + the specified handler to create the wrapper objects. + + + + + + Gets the wrapper object for the specified logger. + + The wrapper object for the specified logger + + + If the logger is null then the corresponding wrapper is null. + + + Looks up the wrapper it it has previously been requested and + returns it. If the wrapper has never been requested before then + the virtual method is + called. + + + + + + Creates the wrapper object for the specified logger. + + The logger to wrap in a wrapper. + The wrapper object for the logger. + + + This implementation uses the + passed to the constructor to create the wrapper. This method + can be overridden in a subclass. + + + + + + Called when a monitored repository shutdown event is received. + + The that is shutting down + + + This method is called when a that this + is holding loggers for has signaled its shutdown + event . The default + behavior of this method is to release the references to the loggers + and their wrappers generated for this repository. + + + + + + Event handler for repository shutdown event. + + The sender of the event. + The event args. + + + + Map of logger repositories to hashtables of ILogger to ILoggerWrapper mappings + + + + + The handler to use to create the extension wrapper objects. + + + + + Internal reference to the delegate used to register for repository shutdown events. + + + + + Gets the map of logger repositories. + + + Map of logger repositories. + + + + Gets the hashtable that is keyed on . The + values are hashtables keyed on with the + value being the corresponding . + + + + + + Formats a as "HH:mm:ss,fff". + + + + Formats a in the format "HH:mm:ss,fff" for example, "15:49:37,459". + + + Nicko Cadell + Gert Driesen + + + + Render a as a string. + + + + Interface to abstract the rendering of a + instance into a string. + + + The method is used to render the + date to a text writer. + + + Nicko Cadell + Gert Driesen + + + + Formats the specified date as a string. + + The date to format. + The writer to write to. + + + Format the as a string and write it + to the provided. + + + + + + String constant used to specify AbsoluteTimeDateFormat in layouts. Current value is ABSOLUTE. + + + + + String constant used to specify DateTimeDateFormat in layouts. Current value is DATE. + + + + + String constant used to specify ISO8601DateFormat in layouts. Current value is ISO8601. + + + + + Renders the date into a string. Format is "HH:mm:ss". + + The date to render into a string. + The string builder to write to. + + + Subclasses should override this method to render the date + into a string using a precision up to the second. This method + will be called at most once per second and the result will be + reused if it is needed again during the same second. + + + + + + Renders the date into a string. Format is "HH:mm:ss,fff". + + The date to render into a string. + The writer to write to. + + + Uses the method to generate the + time string up to the seconds and then appends the current + milliseconds. The results from are + cached and is called at most once + per second. + + + Sub classes should override + rather than . + + + + + + Last stored time with precision up to the second. + + + + + Last stored time with precision up to the second, formatted + as a string. + + + + + Last stored time with precision up to the second, formatted + as a string. + + + + + Formats a as "dd MMM yyyy HH:mm:ss,fff" + + + + Formats a in the format + "dd MMM yyyy HH:mm:ss,fff" for example, + "06 Nov 1994 15:49:37,459". + + + Nicko Cadell + Gert Driesen + Angelika Schnagl + + + + Default constructor. + + + + Initializes a new instance of the class. + + + + + + Formats the date without the milliseconds part + + The date to format. + The string builder to write to. + + + Formats a DateTime in the format "dd MMM yyyy HH:mm:ss" + for example, "06 Nov 1994 15:49:37". + + + The base class will append the ",fff" milliseconds section. + This method will only be called at most once per second. + + + + + + The format info for the invariant culture. + + + + + Formats the as "yyyy-MM-dd HH:mm:ss,fff". + + + + Formats the specified as a string: "yyyy-MM-dd HH:mm:ss,fff". + + + Nicko Cadell + Gert Driesen + + + + Default constructor + + + + Initializes a new instance of the class. + + + + + + Formats the date without the milliseconds part + + The date to format. + The string builder to write to. + + + Formats the date specified as a string: "yyyy-MM-dd HH:mm:ss". + + + The base class will append the ",fff" milliseconds section. + This method will only be called at most once per second. + + + + + + Formats the using the method. + + + + Formats the using the method. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + The format string. + + + Initializes a new instance of the class + with the specified format string. + + + The format string must be compatible with the options + that can be supplied to . + + + + + + Formats the date using . + + The date to convert to a string. + The writer to write to. + + + Uses the date format string supplied to the constructor to call + the method to format the date. + + + + + + The format string used to format the . + + + + The format string must be compatible with the options + that can be supplied to . + + + + + + This filter drops all . + + + + You can add this filter to the end of a filter chain to + switch from the default "accept all unless instructed otherwise" + filtering behavior to a "deny all unless instructed otherwise" + behavior. + + + Nicko Cadell + Gert Driesen + + + + Subclass this type to implement customized logging event filtering + + + + Users should extend this class to implement customized logging + event filtering. Note that and + , the parent class of all standard + appenders, have built-in filtering rules. It is suggested that you + first use and understand the built-in rules before rushing to write + your own custom filters. + + + This abstract class assumes and also imposes that filters be + organized in a linear chain. The + method of each filter is called sequentially, in the order of their + addition to the chain. + + + The method must return one + of the integer constants , + or . + + + If the value is returned, then the log event is dropped + immediately without consulting with the remaining filters. + + + If the value is returned, then the next filter + in the chain is consulted. If there are no more filters in the + chain, then the log event is logged. Thus, in the presence of no + filters, the default behavior is to log all logging events. + + + If the value is returned, then the log + event is logged without consulting the remaining filters. + + + The philosophy of log4net filters is largely inspired from the + Linux ipchains. + + + Nicko Cadell + Gert Driesen + + + + Implement this interface to provide customized logging event filtering + + + + Users should implement this interface to implement customized logging + event filtering. Note that and + , the parent class of all standard + appenders, have built-in filtering rules. It is suggested that you + first use and understand the built-in rules before rushing to write + your own custom filters. + + + This abstract class assumes and also imposes that filters be + organized in a linear chain. The + method of each filter is called sequentially, in the order of their + addition to the chain. + + + The method must return one + of the integer constants , + or . + + + If the value is returned, then the log event is dropped + immediately without consulting with the remaining filters. + + + If the value is returned, then the next filter + in the chain is consulted. If there are no more filters in the + chain, then the log event is logged. Thus, in the presence of no + filters, the default behavior is to log all logging events. + + + If the value is returned, then the log + event is logged without consulting the remaining filters. + + + The philosophy of log4net filters is largely inspired from the + Linux ipchains. + + + Nicko Cadell + Gert Driesen + + + + Decide if the logging event should be logged through an appender. + + The LoggingEvent to decide upon + The decision of the filter + + + If the decision is , then the event will be + dropped. If the decision is , then the next + filter, if any, will be invoked. If the decision is then + the event will be logged without consulting with other filters in + the chain. + + + + + + Property to get and set the next filter + + + The next filter in the chain + + + + Filters are typically composed into chains. This property allows the next filter in + the chain to be accessed. + + + + + + Points to the next filter in the filter chain. + + + + See for more information. + + + + + + Initialize the filter with the options set + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + Typically filter's options become active immediately on set, + however this method must still be called. + + + + + + Decide if the should be logged through an appender. + + The to decide upon + The decision of the filter + + + If the decision is , then the event will be + dropped. If the decision is , then the next + filter, if any, will be invoked. If the decision is then + the event will be logged without consulting with other filters in + the chain. + + + This method is marked abstract and must be implemented + in a subclass. + + + + + + Property to get and set the next filter + + + The next filter in the chain + + + + Filters are typically composed into chains. This property allows the next filter in + the chain to be accessed. + + + + + + Default constructor + + + + + Always returns the integer constant + + the LoggingEvent to filter + Always returns + + + Ignores the event being logged and just returns + . This can be used to change the default filter + chain behavior from to . This filter + should only be used as the last filter in the chain + as any further filters will be ignored! + + + + + + The return result from + + + + The return result from + + + + + + The log event must be dropped immediately without + consulting with the remaining filters, if any, in the chain. + + + + + This filter is neutral with respect to the log event. + The remaining filters, if any, should be consulted for a final decision. + + + + + The log event must be logged immediately without + consulting with the remaining filters, if any, in the chain. + + + + + This is a very simple filter based on matching. + + + + The filter admits two options and + . If there is an exact match between the value + of the option and the of the + , then the method returns in + case the option value is set + to true, if it is false then + is returned. If the does not match then + the result will be . + + + Nicko Cadell + Gert Driesen + + + + flag to indicate if the filter should on a match + + + + + the to match against + + + + + Default constructor + + + + + Tests if the of the logging event matches that of the filter + + the event to filter + see remarks + + + If the of the event matches the level of the + filter then the result of the function depends on the + value of . If it is true then + the function will return , it it is false then it + will return . If the does not match then + the result will be . + + + + + + when matching + + + + The property is a flag that determines + the behavior when a matching is found. If the + flag is set to true then the filter will the + logging event, otherwise it will the event. + + + The default is true i.e. to the event. + + + + + + The that the filter will match + + + + The level that this filter will attempt to match against the + level. If a match is found then + the result depends on the value of . + + + + + + This is a simple filter based on matching. + + + + The filter admits three options and + that determine the range of priorities that are matched, and + . If there is a match between the range + of priorities and the of the , then the + method returns in case the + option value is set to true, if it is false + then is returned. If there is no match, is returned. + + + Nicko Cadell + Gert Driesen + + + + Flag to indicate the behavior when matching a + + + + + the minimum value to match + + + + + the maximum value to match + + + + + Default constructor + + + + + Check if the event should be logged. + + the logging event to check + see remarks + + + If the of the logging event is outside the range + matched by this filter then + is returned. If the is matched then the value of + is checked. If it is true then + is returned, otherwise + is returned. + + + + + + when matching and + + + + The property is a flag that determines + the behavior when a matching is found. If the + flag is set to true then the filter will the + logging event, otherwise it will the event. + + + The default is true i.e. to the event. + + + + + + Set the minimum matched + + + + The minimum level that this filter will attempt to match against the + level. If a match is found then + the result depends on the value of . + + + + + + Sets the maximum matched + + + + The maximum level that this filter will attempt to match against the + level. If a match is found then + the result depends on the value of . + + + + + + Simple filter to match a string in the event's logger name. + + + + The works very similar to the . It admits two + options and . If the + of the starts + with the value of the option, then the + method returns in + case the option value is set to true, + if it is false then is returned. + + + Daniel Cazzulino + + + + Flag to indicate the behavior when we have a match + + + + + The logger name string to substring match against the event + + + + + Default constructor + + + + + Check if this filter should allow the event to be logged + + the event being logged + see remarks + + + The rendered message is matched against the . + If the equals the beginning of + the incoming () + then a match will have occurred. If no match occurs + this function will return + allowing other filters to check the event. If a match occurs then + the value of is checked. If it is + true then is returned otherwise + is returned. + + + + + + when matching + + + + The property is a flag that determines + the behavior when a matching is found. If the + flag is set to true then the filter will the + logging event, otherwise it will the event. + + + The default is true i.e. to the event. + + + + + + The that the filter will match + + + + This filter will attempt to match this value against logger name in + the following way. The match will be done against the beginning of the + logger name (using ). The match is + case sensitive. If a match is found then + the result depends on the value of . + + + + + + Simple filter to match a keyed string in the + + + + Simple filter to match a keyed string in the + + + As the MDC has been replaced with layered properties the + should be used instead. + + + Nicko Cadell + Gert Driesen + + + + Simple filter to match a string an event property + + + + Simple filter to match a string in the value for a + specific event property + + + Nicko Cadell + + + + Simple filter to match a string in the rendered message + + + + Simple filter to match a string in the rendered message + + + Nicko Cadell + Gert Driesen + + + + Flag to indicate the behavior when we have a match + + + + + The string to substring match against the message + + + + + A string regex to match + + + + + A regex object to match (generated from m_stringRegexToMatch) + + + + + Default constructor + + + + + Initialize and precompile the Regex if required + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Check if this filter should allow the event to be logged + + the event being logged + see remarks + + + The rendered message is matched against the . + If the occurs as a substring within + the message then a match will have occurred. If no match occurs + this function will return + allowing other filters to check the event. If a match occurs then + the value of is checked. If it is + true then is returned otherwise + is returned. + + + + + + when matching or + + + + The property is a flag that determines + the behavior when a matching is found. If the + flag is set to true then the filter will the + logging event, otherwise it will the event. + + + The default is true i.e. to the event. + + + + + + Sets the static string to match + + + + The string that will be substring matched against + the rendered message. If the message contains this + string then the filter will match. If a match is found then + the result depends on the value of . + + + One of or + must be specified. + + + + + + Sets the regular expression to match + + + + The regular expression pattern that will be matched against + the rendered message. If the message matches this + pattern then the filter will match. If a match is found then + the result depends on the value of . + + + One of or + must be specified. + + + + + + The key to use to lookup the string from the event properties + + + + + Default constructor + + + + + Check if this filter should allow the event to be logged + + the event being logged + see remarks + + + The event property for the is matched against + the . + If the occurs as a substring within + the property value then a match will have occurred. If no match occurs + this function will return + allowing other filters to check the event. If a match occurs then + the value of is checked. If it is + true then is returned otherwise + is returned. + + + + + + The key to lookup in the event properties and then match against. + + + + The key name to use to lookup in the properties map of the + . The match will be performed against + the value of this property if it exists. + + + + + + Simple filter to match a string in the + + + + Simple filter to match a string in the + + + As the MDC has been replaced with named stacks stored in the + properties collections the should + be used instead. + + + Nicko Cadell + Gert Driesen + + + + Default constructor + + + + Sets the to "NDC". + + + + + + Write the event appdomain name to the output + + + + Writes the to the output writer. + + + Daniel Cazzulino + Nicko Cadell + + + + Abstract class that provides the formatting functionality that + derived classes need. + + + Conversion specifiers in a conversion patterns are parsed to + individual PatternConverters. Each of which is responsible for + converting a logging event in a converter specific manner. + + Nicko Cadell + + + + Abstract class that provides the formatting functionality that + derived classes need. + + + + Conversion specifiers in a conversion patterns are parsed to + individual PatternConverters. Each of which is responsible for + converting a logging event in a converter specific manner. + + + Nicko Cadell + Gert Driesen + + + + Initial buffer size + + + + + Maximum buffer size before it is recycled + + + + + Protected constructor + + + + Initializes a new instance of the class. + + + + + + Evaluate this pattern converter and write the output to a writer. + + that will receive the formatted result. + The state object on which the pattern converter should be executed. + + + Derived pattern converters must override this method in order to + convert conversion specifiers in the appropriate way. + + + + + + Set the next pattern converter in the chains + + the pattern converter that should follow this converter in the chain + the next converter + + + The PatternConverter can merge with its neighbor during this method (or a sub class). + Therefore the return value may or may not be the value of the argument passed in. + + + + + + Write the pattern converter to the writer with appropriate formatting + + that will receive the formatted result. + The state object on which the pattern converter should be executed. + + + This method calls to allow the subclass to perform + appropriate conversion of the pattern converter. If formatting options have + been specified via the then this method will + apply those formattings before writing the output. + + + + + + Fast space padding method. + + to which the spaces will be appended. + The number of spaces to be padded. + + + Fast space padding method. + + + + + + The option string to the converter + + + + + Write an dictionary to a + + the writer to write to + a to use for object conversion + the value to write to the writer + + + Writes the to a writer in the form: + + + {key1=value1, key2=value2, key3=value3} + + + If the specified + is not null then it is used to render the key and value to text, otherwise + the object's ToString method is called. + + + + + + Write an dictionary to a + + the writer to write to + a to use for object conversion + the value to write to the writer + + + Writes the to a writer in the form: + + + {key1=value1, key2=value2, key3=value3} + + + If the specified + is not null then it is used to render the key and value to text, otherwise + the object's ToString method is called. + + + + + + Write an object to a + + the writer to write to + a to use for object conversion + the value to write to the writer + + + Writes the Object to a writer. If the specified + is not null then it is used to render the object to text, otherwise + the object's ToString method is called. + + + + + + Get the next pattern converter in the chain + + + the next pattern converter in the chain + + + + Get the next pattern converter in the chain + + + + + + Gets or sets the formatting info for this converter + + + The formatting info for this converter + + + + Gets or sets the formatting info for this converter + + + + + + Gets or sets the option value for this converter + + + The option for this converter + + + + Gets or sets the option value for this converter + + + + + + + + + + + Initializes a new instance of the class. + + + + + Derived pattern converters must override this method in order to + convert conversion specifiers in the correct way. + + that will receive the formatted result. + The on which the pattern converter should be executed. + + + + Derived pattern converters must override this method in order to + convert conversion specifiers in the correct way. + + that will receive the formatted result. + The state object on which the pattern converter should be executed. + + + + Flag indicating if this converter handles exceptions + + + false if this converter handles exceptions + + + + + Flag indicating if this converter handles the logging event exception + + false if this converter handles the logging event exception + + + If this converter handles the exception object contained within + , then this property should be set to + false. Otherwise, if the layout ignores the exception + object, then the property should be set to true. + + + Set this value to override a this default setting. The default + value is true, this converter does not handle the exception. + + + + + + Write the event appdomain name to the output + + that will receive the formatted result. + the event being logged + + + Writes the to the output . + + + + + + Converter for items in the ASP.Net Cache. + + + + Outputs an item from the . + + + Ron Grabowski + + + + Abstract class that provides access to the current HttpContext () that + derived classes need. + + + This class handles the case when HttpContext.Current is null by writing + to the writer. + + Ron Grabowski + + + + Derived pattern converters must override this method in order to + convert conversion specifiers in the correct way. + + that will receive the formatted result. + The on which the pattern converter should be executed. + The under which the ASP.Net request is running. + + + + Write the ASP.Net Cache item to the output + + that will receive the formatted result. + The on which the pattern converter should be executed. + The under which the ASP.Net request is running. + + + Writes out the value of a named property. The property name + should be set in the + property. If no property has been set, all key value pairs from the Cache will + be written to the output. + + + + + + Converter for items in the . + + + + Outputs an item from the . + + + Ron Grabowski + + + + Write the ASP.Net HttpContext item to the output + + that will receive the formatted result. + The on which the pattern converter should be executed. + The under which the ASP.Net request is running. + + + Writes out the value of a named property. The property name + should be set in the + property. + + + + + + Converter for items in the ASP.Net Cache. + + + + Outputs an item from the . + + + Ron Grabowski + + + + Write the ASP.Net Cache item to the output + + that will receive the formatted result. + The on which the pattern converter should be executed. + The under which the ASP.Net request is running. + + + Writes out the value of a named property. The property name + should be set in the + property. + + + + + + Converter for items in the ASP.Net Cache. + + + + Outputs an item from the . + + + Ron Grabowski + + + + Write the ASP.Net Cache item to the output + + that will receive the formatted result. + The on which the pattern converter should be executed. + The under which the ASP.Net request is running. + + + Writes out the value of a named property. The property name + should be set in the + property. If no property has been set, all key value pairs from the Session will + be written to the output. + + + + + + Date pattern converter, uses a to format + the date of a . + + + + Render the to the writer as a string. + + + The value of the determines + the formatting of the date. The following values are allowed: + + + Option value + Output + + + ISO8601 + + Uses the formatter. + Formats using the "yyyy-MM-dd HH:mm:ss,fff" pattern. + + + + DATE + + Uses the formatter. + Formats using the "dd MMM yyyy HH:mm:ss,fff" for example, "06 Nov 1994 15:49:37,459". + + + + ABSOLUTE + + Uses the formatter. + Formats using the "HH:mm:ss,yyyy" for example, "15:49:37,459". + + + + other + + Any other pattern string uses the formatter. + This formatter passes the pattern string to the + method. + For details on valid patterns see + DateTimeFormatInfo Class. + + + + + + The is in the local time zone and is rendered in that zone. + To output the time in Universal time see . + + + Nicko Cadell + + + + The used to render the date to a string + + + + The used to render the date to a string + + + + + + Initialize the converter pattern based on the property. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Convert the pattern into the rendered message + + that will receive the formatted result. + the event being logged + + + Pass the to the + for it to render it to the writer. + + + The passed is in the local time zone. + + + + + + The fully qualified type of the DatePatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Write the exception text to the output + + + + If an exception object is stored in the logging event + it will be rendered into the pattern output with a + trailing newline. + + + If there is no exception then nothing will be output + and no trailing newline will be appended. + It is typical to put a newline before the exception + and to have the exception as the last data in the pattern. + + + Nicko Cadell + + + + Default constructor + + + + + Write the exception text to the output + + that will receive the formatted result. + the event being logged + + + If an exception object is stored in the logging event + it will be rendered into the pattern output with a + trailing newline. + + + If there is no exception or the exception property specified + by the Option value does not exist then nothing will be output + and no trailing newline will be appended. + It is typical to put a newline before the exception + and to have the exception as the last data in the pattern. + + + Recognized values for the Option parameter are: + + + + Message + + + Source + + + StackTrace + + + TargetSite + + + HelpLink + + + + + + + Writes the caller location file name to the output + + + + Writes the value of the for + the event to the output writer. + + + Nicko Cadell + + + + Write the caller location file name to the output + + that will receive the formatted result. + the event being logged + + + Writes the value of the for + the to the output . + + + + + + Write the caller location info to the output + + + + Writes the to the output writer. + + + Nicko Cadell + + + + Write the caller location info to the output + + that will receive the formatted result. + the event being logged + + + Writes the to the output writer. + + + + + + Writes the event identity to the output + + + + Writes the value of the to + the output writer. + + + Daniel Cazzulino + Nicko Cadell + + + + Writes the event identity to the output + + that will receive the formatted result. + the event being logged + + + Writes the value of the + to + the output . + + + + + + Write the event level to the output + + + + Writes the display name of the event + to the writer. + + + Nicko Cadell + + + + Write the event level to the output + + that will receive the formatted result. + the event being logged + + + Writes the of the + to the . + + + + + + Write the caller location line number to the output + + + + Writes the value of the for + the event to the output writer. + + + Nicko Cadell + + + + Write the caller location line number to the output + + that will receive the formatted result. + the event being logged + + + Writes the value of the for + the to the output . + + + + + + Converter for logger name + + + + Outputs the of the event. + + + Nicko Cadell + + + + Converter to output and truncate '.' separated strings + + + + This abstract class supports truncating a '.' separated string + to show a specified number of elements from the right hand side. + This is used to truncate class names that are fully qualified. + + + Subclasses should override the method to + return the fully qualified string. + + + Nicko Cadell + + + + Initialize the converter + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Get the fully qualified string data + + the event being logged + the fully qualified name + + + Overridden by subclasses to get the fully qualified name before the + precision is applied to it. + + + Return the fully qualified '.' (dot/period) separated string. + + + + + + Convert the pattern to the rendered message + + that will receive the formatted result. + the event being logged + + Render the to the precision + specified by the property. + + + + + The fully qualified type of the NamedPatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Gets the fully qualified name of the logger + + the event being logged + The fully qualified logger name + + + Returns the of the . + + + + + + Writes the event message to the output + + + + Uses the method + to write out the event message. + + + Nicko Cadell + + + + Writes the event message to the output + + that will receive the formatted result. + the event being logged + + + Uses the method + to write out the event message. + + + + + + Write the method name to the output + + + + Writes the caller location to + the output. + + + Nicko Cadell + + + + Write the method name to the output + + that will receive the formatted result. + the event being logged + + + Writes the caller location to + the output. + + + + + + Converter to include event NDC + + + + Outputs the value of the event property named NDC. + + + The should be used instead. + + + Nicko Cadell + + + + Write the event NDC to the output + + that will receive the formatted result. + the event being logged + + + As the thread context stacks are now stored in named event properties + this converter simply looks up the value of the NDC property. + + + The should be used instead. + + + + + + Property pattern converter + + + + Writes out the value of a named property. The property name + should be set in the + property. + + + If the is set to null + then all the properties are written as key value pairs. + + + Nicko Cadell + + + + Write the property value to the output + + that will receive the formatted result. + the event being logged + + + Writes out the value of a named property. The property name + should be set in the + property. + + + If the is set to null + then all the properties are written as key value pairs. + + + + + + Converter to output the relative time of the event + + + + Converter to output the time of the event relative to the start of the program. + + + Nicko Cadell + + + + Write the relative time to the output + + that will receive the formatted result. + the event being logged + + + Writes out the relative time of the event in milliseconds. + That is the number of milliseconds between the event + and the . + + + + + + Helper method to get the time difference between two DateTime objects + + start time (in the current local time zone) + end time (in the current local time zone) + the time difference in milliseconds + + + + Write the caller stack frames to the output + + + + Writes the to the output writer, using format: + type3.MethodCall3(type param,...) > type2.MethodCall2(type param,...) > type1.MethodCall1(type param,...) + + + Adam Davies + + + + Write the caller stack frames to the output + + + + Writes the to the output writer, using format: + type3.MethodCall3 > type2.MethodCall2 > type1.MethodCall1 + + + Michael Cromwell + + + + Initialize the converter + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Write the strack frames to the output + + that will receive the formatted result. + the event being logged + + + Writes the to the output writer. + + + + + + Returns the Name of the method + + + This method was created, so this class could be used as a base class for StackTraceDetailPatternConverter + string + + + + The fully qualified type of the StackTracePatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + The fully qualified type of the StackTraceDetailPatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Converter to include event thread name + + + + Writes the to the output. + + + Nicko Cadell + + + + Write the ThreadName to the output + + that will receive the formatted result. + the event being logged + + + Writes the to the . + + + + + + Pattern converter for the class name + + + + Outputs the of the event. + + + Nicko Cadell + + + + Gets the fully qualified name of the class + + the event being logged + The fully qualified type name for the caller location + + + Returns the of the . + + + + + + Converter to include event user name + + Douglas de la Torre + Nicko Cadell + + + + Convert the pattern to the rendered message + + that will receive the formatted result. + the event being logged + + + + Write the TimeStamp to the output + + + + Date pattern converter, uses a to format + the date of a . + + + Uses a to format the + in Universal time. + + + See the for details on the date pattern syntax. + + + + Nicko Cadell + + + + Write the TimeStamp to the output + + that will receive the formatted result. + the event being logged + + + Pass the to the + for it to render it to the writer. + + + The passed is in the local time zone, this is converted + to Universal time before it is rendered. + + + + + + + The fully qualified type of the UtcDatePatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + A flexible layout configurable with pattern string that re-evaluates on each call. + + + This class is built on and provides all the + features and capabilities of PatternLayout. PatternLayout is a 'static' class + in that its layout is done once at configuration time. This class will recreate + the layout on each reference. + One important difference between PatternLayout and DynamicPatternLayout is the + treatment of the Header and Footer parameters in the configuration. The Header and Footer + parameters for DynamicPatternLayout must be syntactically in the form of a PatternString, + but should not be marked as type log4net.Util.PatternString. Doing so causes the + pattern to be statically converted at configuration time and causes DynamicPatternLayout + to perform the same as PatternLayout. + Please see for complete documentation. + + <layout type="log4net.Layout.DynamicPatternLayout"> + <param name="Header" value="%newline**** Trace Opened Local: %date{yyyy-MM-dd HH:mm:ss.fff} UTC: %utcdate{yyyy-MM-dd HH:mm:ss.fff} ****%newline" /> + <param name="Footer" value="**** Trace Closed %date{yyyy-MM-dd HH:mm:ss.fff} ****%newline" /> + </layout> + + + + + + A flexible layout configurable with pattern string. + + + + The goal of this class is to a + as a string. The results + depend on the conversion pattern. + + + The conversion pattern is closely related to the conversion + pattern of the printf function in C. A conversion pattern is + composed of literal text and format control expressions called + conversion specifiers. + + + You are free to insert any literal text within the conversion + pattern. + + + Each conversion specifier starts with a percent sign (%) and is + followed by optional format modifiers and a conversion + pattern name. The conversion pattern name specifies the type of + data, e.g. logger, level, date, thread name. The format + modifiers control such things as field width, padding, left and + right justification. The following is a simple example. + + + Let the conversion pattern be "%-5level [%thread]: %message%newline" and assume + that the log4net environment was set to use a PatternLayout. Then the + statements + + + ILog log = LogManager.GetLogger(typeof(TestApp)); + log.Debug("Message 1"); + log.Warn("Message 2"); + + would yield the output + + DEBUG [main]: Message 1 + WARN [main]: Message 2 + + + Note that there is no explicit separator between text and + conversion specifiers. The pattern parser knows when it has reached + the end of a conversion specifier when it reads a conversion + character. In the example above the conversion specifier + %-5level means the level of the logging event should be left + justified to a width of five characters. + + + The recognized conversion pattern names are: + + + + Conversion Pattern Name + Effect + + + a + Equivalent to appdomain + + + appdomain + + Used to output the friendly name of the AppDomain where the + logging event was generated. + + + + aspnet-cache + + + Used to output all cache items in the case of %aspnet-cache or just one named item if used as %aspnet-cache{key} + + + This pattern is not available for Compact Framework or Client Profile assemblies. + + + + + aspnet-context + + + Used to output all context items in the case of %aspnet-context or just one named item if used as %aspnet-context{key} + + + This pattern is not available for Compact Framework or Client Profile assemblies. + + + + + aspnet-request + + + Used to output all request parameters in the case of %aspnet-request or just one named param if used as %aspnet-request{key} + + + This pattern is not available for Compact Framework or Client Profile assemblies. + + + + + aspnet-session + + + Used to output all session items in the case of %aspnet-session or just one named item if used as %aspnet-session{key} + + + This pattern is not available for Compact Framework or Client Profile assemblies. + + + + + c + Equivalent to logger + + + C + Equivalent to type + + + class + Equivalent to type + + + d + Equivalent to date + + + date + + + Used to output the date of the logging event in the local time zone. + To output the date in universal time use the %utcdate pattern. + The date conversion + specifier may be followed by a date format specifier enclosed + between braces. For example, %date{HH:mm:ss,fff} or + %date{dd MMM yyyy HH:mm:ss,fff}. If no date format specifier is + given then ISO8601 format is + assumed (). + + + The date format specifier admits the same syntax as the + time pattern string of the . + + + For better results it is recommended to use the log4net date + formatters. These can be specified using one of the strings + "ABSOLUTE", "DATE" and "ISO8601" for specifying + , + and respectively + . For example, + %date{ISO8601} or %date{ABSOLUTE}. + + + These dedicated date formatters perform significantly + better than . + + + + + exception + + + Used to output the exception passed in with the log message. + + + If an exception object is stored in the logging event + it will be rendered into the pattern output with a + trailing newline. + If there is no exception then nothing will be output + and no trailing newline will be appended. + It is typical to put a newline before the exception + and to have the exception as the last data in the pattern. + + + + + F + Equivalent to file + + + file + + + Used to output the file name where the logging request was + issued. + + + WARNING Generating caller location information is + extremely slow. Its use should be avoided unless execution speed + is not an issue. + + + See the note below on the availability of caller location information. + + + + + identity + + + Used to output the user name for the currently active user + (Principal.Identity.Name). + + + WARNING Generating caller information is + extremely slow. Its use should be avoided unless execution speed + is not an issue. + + + + + l + Equivalent to location + + + L + Equivalent to line + + + location + + + Used to output location information of the caller which generated + the logging event. + + + The location information depends on the CLI implementation but + usually consists of the fully qualified name of the calling + method followed by the callers source the file name and line + number between parentheses. + + + The location information can be very useful. However, its + generation is extremely slow. Its use should be avoided + unless execution speed is not an issue. + + + See the note below on the availability of caller location information. + + + + + level + + + Used to output the level of the logging event. + + + + + line + + + Used to output the line number from where the logging request + was issued. + + + WARNING Generating caller location information is + extremely slow. Its use should be avoided unless execution speed + is not an issue. + + + See the note below on the availability of caller location information. + + + + + logger + + + Used to output the logger of the logging event. The + logger conversion specifier can be optionally followed by + precision specifier, that is a decimal constant in + brackets. + + + If a precision specifier is given, then only the corresponding + number of right most components of the logger name will be + printed. By default the logger name is printed in full. + + + For example, for the logger name "a.b.c" the pattern + %logger{2} will output "b.c". + + + + + m + Equivalent to message + + + M + Equivalent to method + + + message + + + Used to output the application supplied message associated with + the logging event. + + + + + mdc + + + The MDC (old name for the ThreadContext.Properties) is now part of the + combined event properties. This pattern is supported for compatibility + but is equivalent to property. + + + + + method + + + Used to output the method name where the logging request was + issued. + + + WARNING Generating caller location information is + extremely slow. Its use should be avoided unless execution speed + is not an issue. + + + See the note below on the availability of caller location information. + + + + + n + Equivalent to newline + + + newline + + + Outputs the platform dependent line separator character or + characters. + + + This conversion pattern offers the same performance as using + non-portable line separator strings such as "\n", or "\r\n". + Thus, it is the preferred way of specifying a line separator. + + + + + ndc + + + Used to output the NDC (nested diagnostic context) associated + with the thread that generated the logging event. + + + + + p + Equivalent to level + + + P + Equivalent to property + + + properties + Equivalent to property + + + property + + + Used to output the an event specific property. The key to + lookup must be specified within braces and directly following the + pattern specifier, e.g. %property{user} would include the value + from the property that is keyed by the string 'user'. Each property value + that is to be included in the log must be specified separately. + Properties are added to events by loggers or appenders. By default + the log4net:HostName property is set to the name of machine on + which the event was originally logged. + + + If no key is specified, e.g. %property then all the keys and their + values are printed in a comma separated list. + + + The properties of an event are combined from a number of different + contexts. These are listed below in the order in which they are searched. + + + + the event properties + + The event has that can be set. These + properties are specific to this event only. + + + + the thread properties + + The that are set on the current + thread. These properties are shared by all events logged on this thread. + + + + the global properties + + The that are set globally. These + properties are shared by all the threads in the AppDomain. + + + + + + + + r + Equivalent to timestamp + + + stacktrace + + + Used to output the stack trace of the logging event + The stack trace level specifier may be enclosed + between braces. For example, %stacktrace{level}. + If no stack trace level specifier is given then 1 is assumed + + + Output uses the format: + type3.MethodCall3 > type2.MethodCall2 > type1.MethodCall1 + + + This pattern is not available for Compact Framework assemblies. + + + + + stacktracedetail + + + Used to output the stack trace of the logging event + The stack trace level specifier may be enclosed + between braces. For example, %stacktracedetail{level}. + If no stack trace level specifier is given then 1 is assumed + + + Output uses the format: + type3.MethodCall3(type param,...) > type2.MethodCall2(type param,...) > type1.MethodCall1(type param,...) + + + This pattern is not available for Compact Framework assemblies. + + + + + t + Equivalent to thread + + + timestamp + + + Used to output the number of milliseconds elapsed since the start + of the application until the creation of the logging event. + + + + + thread + + + Used to output the name of the thread that generated the + logging event. Uses the thread number if no name is available. + + + + + type + + + Used to output the fully qualified type name of the caller + issuing the logging request. This conversion specifier + can be optionally followed by precision specifier, that + is a decimal constant in brackets. + + + If a precision specifier is given, then only the corresponding + number of right most components of the class name will be + printed. By default the class name is output in fully qualified form. + + + For example, for the class name "log4net.Layout.PatternLayout", the + pattern %type{1} will output "PatternLayout". + + + WARNING Generating the caller class information is + slow. Thus, its use should be avoided unless execution speed is + not an issue. + + + See the note below on the availability of caller location information. + + + + + u + Equivalent to identity + + + username + + + Used to output the WindowsIdentity for the currently + active user. + + + WARNING Generating caller WindowsIdentity information is + extremely slow. Its use should be avoided unless execution speed + is not an issue. + + + + + utcdate + + + Used to output the date of the logging event in universal time. + The date conversion + specifier may be followed by a date format specifier enclosed + between braces. For example, %utcdate{HH:mm:ss,fff} or + %utcdate{dd MMM yyyy HH:mm:ss,fff}. If no date format specifier is + given then ISO8601 format is + assumed (). + + + The date format specifier admits the same syntax as the + time pattern string of the . + + + For better results it is recommended to use the log4net date + formatters. These can be specified using one of the strings + "ABSOLUTE", "DATE" and "ISO8601" for specifying + , + and respectively + . For example, + %utcdate{ISO8601} or %utcdate{ABSOLUTE}. + + + These dedicated date formatters perform significantly + better than . + + + + + w + Equivalent to username + + + x + Equivalent to ndc + + + X + Equivalent to mdc + + + % + + + The sequence %% outputs a single percent sign. + + + + + + The single letter patterns are deprecated in favor of the + longer more descriptive pattern names. + + + By default the relevant information is output as is. However, + with the aid of format modifiers it is possible to change the + minimum field width, the maximum field width and justification. + + + The optional format modifier is placed between the percent sign + and the conversion pattern name. + + + The first optional format modifier is the left justification + flag which is just the minus (-) character. Then comes the + optional minimum field width modifier. This is a decimal + constant that represents the minimum number of characters to + output. If the data item requires fewer characters, it is padded on + either the left or the right until the minimum width is + reached. The default is to pad on the left (right justify) but you + can specify right padding with the left justification flag. The + padding character is space. If the data item is larger than the + minimum field width, the field is expanded to accommodate the + data. The value is never truncated. + + + This behavior can be changed using the maximum field + width modifier which is designated by a period followed by a + decimal constant. If the data item is longer than the maximum + field, then the extra characters are removed from the + beginning of the data item and not from the end. For + example, it the maximum field width is eight and the data item is + ten characters long, then the first two characters of the data item + are dropped. This behavior deviates from the printf function in C + where truncation is done from the end. + + + Below are various format modifier examples for the logger + conversion specifier. + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Format modifierleft justifyminimum widthmaximum widthcomment
%20loggerfalse20none + + Left pad with spaces if the logger name is less than 20 + characters long. + +
%-20loggertrue20none + + Right pad with spaces if the logger + name is less than 20 characters long. + +
%.30loggerNAnone30 + + Truncate from the beginning if the logger + name is longer than 30 characters. + +
%20.30loggerfalse2030 + + Left pad with spaces if the logger name is shorter than 20 + characters. However, if logger name is longer than 30 characters, + then truncate from the beginning. + +
%-20.30loggertrue2030 + + Right pad with spaces if the logger name is shorter than 20 + characters. However, if logger name is longer than 30 characters, + then truncate from the beginning. + +
+
+ + Note about caller location information.
+ The following patterns %type %file %line %method %location %class %C %F %L %l %M + all generate caller location information. + Location information uses the System.Diagnostics.StackTrace class to generate + a call stack. The caller's information is then extracted from this stack. +
+ + + The System.Diagnostics.StackTrace class is not supported on the + .NET Compact Framework 1.0 therefore caller location information is not + available on that framework. + + + + + The System.Diagnostics.StackTrace class has this to say about Release builds: + + + "StackTrace information will be most informative with Debug build configurations. + By default, Debug builds include debug symbols, while Release builds do not. The + debug symbols contain most of the file, method name, line number, and column + information used in constructing StackFrame and StackTrace objects. StackTrace + might not report as many method calls as expected, due to code transformations + that occur during optimization." + + + This means that in a Release build the caller information may be incomplete or may + not exist at all! Therefore caller location information cannot be relied upon in a Release build. + + + + Additional pattern converters may be registered with a specific + instance using the method. + +
+ + This is a more detailed pattern. + %timestamp [%thread] %level %logger %ndc - %message%newline + + + A similar pattern except that the relative time is + right padded if less than 6 digits, thread name is right padded if + less than 15 characters and truncated if longer and the logger + name is left padded if shorter than 30 characters and truncated if + longer. + %-6timestamp [%15.15thread] %-5level %30.30logger %ndc - %message%newline + + Nicko Cadell + Gert Driesen + Douglas de la Torre + Daniel Cazzulino +
+ + + Extend this abstract class to create your own log layout format. + + + + This is the base implementation of the + interface. Most layout objects should extend this class. + + + + + + Subclasses must implement the + method. + + + Subclasses should set the in their default + constructor. + + + + Nicko Cadell + Gert Driesen + + + + Interface implemented by layout objects + + + + An object is used to format a + as text. The method is called by an + appender to transform the into a string. + + + The layout can also supply and + text that is appender before any events and after all the events respectively. + + + Nicko Cadell + Gert Driesen + + + + Implement this method to create your own layout format. + + The TextWriter to write the formatted event to + The event to format + + + This method is called by an appender to format + the as text and output to a writer. + + + If the caller does not have a and prefers the + event to be formatted as a then the following + code can be used to format the event into a . + + + StringWriter writer = new StringWriter(); + Layout.Format(writer, loggingEvent); + string formattedEvent = writer.ToString(); + + + + + + The content type output by this layout. + + The content type + + + The content type output by this layout. + + + This is a MIME type e.g. "text/plain". + + + + + + The header for the layout format. + + the layout header + + + The Header text will be appended before any logging events + are formatted and appended. + + + + + + The footer for the layout format. + + the layout footer + + + The Footer text will be appended after all the logging events + have been formatted and appended. + + + + + + Flag indicating if this layout handle exceptions + + false if this layout handles exceptions + + + If this layout handles the exception object contained within + , then the layout should return + false. Otherwise, if the layout ignores the exception + object, then the layout should return true. + + + + + + The header text + + + + See for more information. + + + + + + The footer text + + + + See for more information. + + + + + + Flag indicating if this layout handles exceptions + + + + false if this layout handles exceptions + + + + + + Empty default constructor + + + + Empty default constructor + + + + + + Activate component options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + This method must be implemented by the subclass. + + + + + + Implement this method to create your own layout format. + + The TextWriter to write the formatted event to + The event to format + + + This method is called by an appender to format + the as text. + + + + + + Convenience method for easily formatting the logging event into a string variable. + + + + Creates a new StringWriter instance to store the formatted logging event. + + + + + The content type output by this layout. + + The content type is "text/plain" + + + The content type output by this layout. + + + This base class uses the value "text/plain". + To change this value a subclass must override this + property. + + + + + + The header for the layout format. + + the layout header + + + The Header text will be appended before any logging events + are formatted and appended. + + + + + + The footer for the layout format. + + the layout footer + + + The Footer text will be appended after all the logging events + have been formatted and appended. + + + + + + Flag indicating if this layout handles exceptions + + false if this layout handles exceptions + + + If this layout handles the exception object contained within + , then the layout should return + false. Otherwise, if the layout ignores the exception + object, then the layout should return true. + + + Set this value to override a this default setting. The default + value is true, this layout does not handle the exception. + + + + + + Default pattern string for log output. + + + + Default pattern string for log output. + Currently set to the string "%message%newline" + which just prints the application supplied message. + + + + + + A detailed conversion pattern + + + + A conversion pattern which includes Time, Thread, Logger, and Nested Context. + Current value is %timestamp [%thread] %level %logger %ndc - %message%newline. + + + + + + Internal map of converter identifiers to converter types. + + + + This static map is overridden by the m_converterRegistry instance map + + + + + + the pattern + + + + + the head of the pattern converter chain + + + + + patterns defined on this PatternLayout only + + + + + Initialize the global registry + + + + Defines the builtin global rules. + + + + + + Constructs a PatternLayout using the DefaultConversionPattern + + + + The default pattern just produces the application supplied message. + + + Note to Inheritors: This constructor calls the virtual method + . If you override this method be + aware that it will be called before your is called constructor. + + + As per the contract the + method must be called after the properties on this object have been + configured. + + + + + + Constructs a PatternLayout using the supplied conversion pattern + + the pattern to use + + + Note to Inheritors: This constructor calls the virtual method + . If you override this method be + aware that it will be called before your is called constructor. + + + When using this constructor the method + need not be called. This may not be the case when using a subclass. + + + + + + Create the pattern parser instance + + the pattern to parse + The that will format the event + + + Creates the used to parse the conversion string. Sets the + global and instance rules on the . + + + + + + Initialize layout options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Produces a formatted string as specified by the conversion pattern. + + the event being logged + The TextWriter to write the formatted event to + + + Parse the using the patter format + specified in the property. + + + + + + Add a converter to this PatternLayout + + the converter info + + + This version of the method is used by the configurator. + Programmatic users should use the alternative method. + + + + + + Add a converter to this PatternLayout + + the name of the conversion pattern for this converter + the type of the converter + + + Add a named pattern converter to this instance. This + converter will be used in the formatting of the event. + This method must be called before . + + + The specified must extend the + type. + + + + + + The pattern formatting string + + + + The ConversionPattern option. This is the string which + controls formatting and consists of a mix of literal content and + conversion specifiers. + + + + + + The header PatternString + + + + + The footer PatternString + + + + + Constructs a DynamicPatternLayout using the DefaultConversionPattern + + + + The default pattern just produces the application supplied message. + + + + + + Constructs a DynamicPatternLayout using the supplied conversion pattern + + the pattern to use + + + + + + The header for the layout format. + + the layout header + + + The Header text will be appended before any logging events + are formatted and appended. + + The pattern will be formatted on each get operation. + + + + + The footer for the layout format. + + the layout footer + + + The Footer text will be appended after all the logging events + have been formatted and appended. + + The pattern will be formatted on each get operation. + + + + + A Layout that renders only the Exception text from the logging event + + + + A Layout that renders only the Exception text from the logging event. + + + This Layout should only be used with appenders that utilize multiple + layouts (e.g. ). + + + Nicko Cadell + Gert Driesen + + + + Default constructor + + + + Constructs a ExceptionLayout + + + + + + Activate component options + + + + Part of the component activation + framework. + + + This method does nothing as options become effective immediately. + + + + + + Gets the exception text from the logging event + + The TextWriter to write the formatted event to + the event being logged + + + Write the exception string to the . + The exception string is retrieved from . + + + + + + Interface for raw layout objects + + + + Interface used to format a + to an object. + + + This interface should not be confused with the + interface. This interface is used in + only certain specialized situations where a raw object is + required rather than a formatted string. The + is not generally useful than this interface. + + + Nicko Cadell + Gert Driesen + + + + Implement this method to create your own layout format. + + The event to format + returns the formatted event + + + Implement this method to create your own layout format. + + + + + + Adapts any to a + + + + Where an is required this adapter + allows a to be specified. + + + Nicko Cadell + Gert Driesen + + + + The layout to adapt + + + + + Construct a new adapter + + the layout to adapt + + + Create the adapter for the specified . + + + + + + Format the logging event as an object. + + The event to format + returns the formatted event + + + Format the logging event as an object. + + + Uses the object supplied to + the constructor to perform the formatting. + + + + + + Type converter for the interface + + + + Used to convert objects to the interface. + Supports converting from the interface to + the interface using the . + + + Nicko Cadell + Gert Driesen + + + + Interface supported by type converters + + + + This interface supports conversion from arbitrary types + to a single target type. See . + + + Nicko Cadell + Gert Driesen + + + + Can the source type be converted to the type supported by this object + + the type to convert + true if the conversion is possible + + + Test if the can be converted to the + type supported by this converter. + + + + + + Convert the source object to the type supported by this object + + the object to convert + the converted object + + + Converts the to the type supported + by this converter. + + + + + + Can the sourceType be converted to an + + the source to be to be converted + true if the source type can be converted to + + + Test if the can be converted to a + . Only is supported + as the . + + + + + + Convert the value to a object + + the value to convert + the object + + + Convert the object to a + object. If the object + is a then the + is used to adapt between the two interfaces, otherwise an + exception is thrown. + + + + + + Extract the value of a property from the + + + + Extract the value of a property from the + + + Nicko Cadell + + + + Constructs a RawPropertyLayout + + + + + Lookup the property for + + The event to format + returns property value + + + Looks up and returns the object value of the property + named . If there is no property defined + with than name then null will be returned. + + + + + + The name of the value to lookup in the LoggingEvent Properties collection. + + + Value to lookup in the LoggingEvent Properties collection + + + + String name of the property to lookup in the . + + + + + + Extract the date from the + + + + Extract the date from the + + + Nicko Cadell + Gert Driesen + + + + Constructs a RawTimeStampLayout + + + + + Gets the as a . + + The event to format + returns the time stamp + + + Gets the as a . + + + The time stamp is in local time. To format the time stamp + in universal time use . + + + + + + Extract the date from the + + + + Extract the date from the + + + Nicko Cadell + Gert Driesen + + + + Constructs a RawUtcTimeStampLayout + + + + + Gets the as a . + + The event to format + returns the time stamp + + + Gets the as a . + + + The time stamp is in universal time. To format the time stamp + in local time use . + + + + + + A very simple layout + + + + SimpleLayout consists of the level of the log statement, + followed by " - " and then the log message itself. For example, + + DEBUG - Hello world + + + + Nicko Cadell + Gert Driesen + + + + Constructs a SimpleLayout + + + + + Initialize layout options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Produces a simple formatted output. + + the event being logged + The TextWriter to write the formatted event to + + + Formats the event as the level of the even, + followed by " - " and then the log message itself. The + output is terminated by a newline. + + + + + + Layout that formats the log events as XML elements. + + + + The output of the consists of a series of + log4net:event elements. It does not output a complete well-formed XML + file. The output is designed to be included as an external entity + in a separate file to form a correct XML file. + + + For example, if abc is the name of the file where + the output goes, then a well-formed XML file would + be: + + + <?xml version="1.0" ?> + + <!DOCTYPE log4net:events SYSTEM "log4net-events.dtd" [<!ENTITY data SYSTEM "abc">]> + + <log4net:events version="1.2" xmlns:log4net="http://logging.apache.org/log4net/schemas/log4net-events-1.2> + &data; + </log4net:events> + + + This approach enforces the independence of the + and the appender where it is embedded. + + + The version attribute helps components to correctly + interpret output generated by . The value of + this attribute should be "1.2" for release 1.2 and later. + + + Alternatively the Header and Footer properties can be + configured to output the correct XML header, open tag and close tag. + When setting the Header and Footer properties it is essential + that the underlying data store not be appendable otherwise the data + will become invalid XML. + + + Nicko Cadell + Gert Driesen + + + + Layout that formats the log events as XML elements. + + + + This is an abstract class that must be subclassed by an implementation + to conform to a specific schema. + + + Deriving classes must implement the method. + + + Nicko Cadell + Gert Driesen + + + + Protected constructor to support subclasses + + + + Initializes a new instance of the class + with no location info. + + + + + + Protected constructor to support subclasses + + + + The parameter determines whether + location information will be output by the layout. If + is set to true, then the + file name and line number of the statement at the origin of the log + statement will be output. + + + If you are embedding this layout within an SMTPAppender + then make sure to set the LocationInfo option of that + appender as well. + + + + + + Initialize layout options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Produces a formatted string. + + The event being logged. + The TextWriter to write the formatted event to + + + Format the and write it to the . + + + This method creates an that writes to the + . The is passed + to the method. Subclasses should override the + method rather than this method. + + + + + + Does the actual writing of the XML. + + The writer to use to output the event to. + The event to write. + + + Subclasses should override this method to format + the as XML. + + + + + + Flag to indicate if location information should be included in + the XML events. + + + + + The string to replace invalid chars with + + + + + Gets a value indicating whether to include location information in + the XML events. + + + true if location information should be included in the XML + events; otherwise, false. + + + + If is set to true, then the file + name and line number of the statement at the origin of the log + statement will be output. + + + If you are embedding this layout within an SMTPAppender + then make sure to set the LocationInfo option of that + appender as well. + + + + + + The string to replace characters that can not be expressed in XML with. + + + Not all characters may be expressed in XML. This property contains the + string to replace those that can not with. This defaults to a ?. Set it + to the empty string to simply remove offending characters. For more + details on the allowed character ranges see http://www.w3.org/TR/REC-xml/#charsets + Character replacement will occur in the log message, the property names + and the property values. + + + + + + + Gets the content type output by this layout. + + + As this is the XML layout, the value is always "text/xml". + + + + As this is the XML layout, the value is always "text/xml". + + + + + + Constructs an XmlLayout + + + + + Constructs an XmlLayout. + + + + The LocationInfo option takes a boolean value. By + default, it is set to false which means there will be no location + information output by this layout. If the the option is set to + true, then the file name and line number of the statement + at the origin of the log statement will be output. + + + If you are embedding this layout within an SmtpAppender + then make sure to set the LocationInfo option of that + appender as well. + + + + + + Initialize layout options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + Builds a cache of the element names + + + + + + Does the actual writing of the XML. + + The writer to use to output the event to. + The event to write. + + + Override the base class method + to write the to the . + + + + + + The prefix to use for all generated element names + + + + + The prefix to use for all element names + + + + The default prefix is log4net. Set this property + to change the prefix. If the prefix is set to an empty string + then no prefix will be written. + + + + + + Set whether or not to base64 encode the message. + + + + By default the log message will be written as text to the xml + output. This can cause problems when the message contains binary + data. By setting this to true the contents of the message will be + base64 encoded. If this is set then invalid character replacement + (see ) will not be performed + on the log message. + + + + + + Set whether or not to base64 encode the property values. + + + + By default the properties will be written as text to the xml + output. This can cause problems when one or more properties contain + binary data. By setting this to true the values of the properties + will be base64 encoded. If this is set then invalid character replacement + (see ) will not be performed + on the property values. + + + + + + Layout that formats the log events as XML elements compatible with the log4j schema + + + + Formats the log events according to the http://logging.apache.org/log4j schema. + + + Nicko Cadell + + + + The 1st of January 1970 in UTC + + + + + Constructs an XMLLayoutSchemaLog4j + + + + + Constructs an XMLLayoutSchemaLog4j. + + + + The LocationInfo option takes a boolean value. By + default, it is set to false which means there will be no location + information output by this layout. If the the option is set to + true, then the file name and line number of the statement + at the origin of the log statement will be output. + + + If you are embedding this layout within an SMTPAppender + then make sure to set the LocationInfo option of that + appender as well. + + + + + + Actually do the writing of the xml + + the writer to use + the event to write + + + Generate XML that is compatible with the log4j schema. + + + + + + The version of the log4j schema to use. + + + + Only version 1.2 of the log4j schema is supported. + + + + + + The default object Renderer. + + + + The default renderer supports rendering objects and collections to strings. + + + See the method for details of the output. + + + Nicko Cadell + Gert Driesen + + + + Implement this interface in order to render objects as strings + + + + Certain types require special case conversion to + string form. This conversion is done by an object renderer. + Object renderers implement the + interface. + + + Nicko Cadell + Gert Driesen + + + + Render the object to a string + + The map used to lookup renderers + The object to render + The writer to render to + + + Render the object to a + string. + + + The parameter is + provided to lookup and render other objects. This is + very useful where contains + nested objects of unknown type. The + method can be used to render these objects. + + + + + + Default constructor + + + + Default constructor + + + + + + Render the object to a string + + The map used to lookup renderers + The object to render + The writer to render to + + + Render the object to a string. + + + The parameter is + provided to lookup and render other objects. This is + very useful where contains + nested objects of unknown type. The + method can be used to render these objects. + + + The default renderer supports rendering objects to strings as follows: + + + + Value + Rendered String + + + null + + "(null)" + + + + + + + For a one dimensional array this is the + array type name, an open brace, followed by a comma + separated list of the elements (using the appropriate + renderer), followed by a close brace. + + + For example: int[] {1, 2, 3}. + + + If the array is not one dimensional the + Array.ToString() is returned. + + + + + , & + + + Rendered as an open brace, followed by a comma + separated list of the elements (using the appropriate + renderer), followed by a close brace. + + + For example: {a, b, c}. + + + All collection classes that implement its subclasses, + or generic equivalents all implement the interface. + + + + + + + + Rendered as the key, an equals sign ('='), and the value (using the appropriate + renderer). + + + For example: key=value. + + + + + other + + Object.ToString() + + + + + + + + Render the array argument into a string + + The map used to lookup renderers + the array to render + The writer to render to + + + For a one dimensional array this is the + array type name, an open brace, followed by a comma + separated list of the elements (using the appropriate + renderer), followed by a close brace. For example: + int[] {1, 2, 3}. + + + If the array is not one dimensional the + Array.ToString() is returned. + + + + + + Render the enumerator argument into a string + + The map used to lookup renderers + the enumerator to render + The writer to render to + + + Rendered as an open brace, followed by a comma + separated list of the elements (using the appropriate + renderer), followed by a close brace. For example: + {a, b, c}. + + + + + + Render the DictionaryEntry argument into a string + + The map used to lookup renderers + the DictionaryEntry to render + The writer to render to + + + Render the key, an equals sign ('='), and the value (using the appropriate + renderer). For example: key=value. + + + + + + Map class objects to an . + + + + Maintains a mapping between types that require special + rendering and the that + is used to render them. + + + The method is used to render an + object using the appropriate renderers defined in this map. + + + Nicko Cadell + Gert Driesen + + + + Default Constructor + + + + Default constructor. + + + + + + Render using the appropriate renderer. + + the object to render to a string + the object rendered as a string + + + This is a convenience method used to render an object to a string. + The alternative method + should be used when streaming output to a . + + + + + + Render using the appropriate renderer. + + the object to render to a string + The writer to render to + + + Find the appropriate renderer for the type of the + parameter. This is accomplished by calling the + method. Once a renderer is found, it is + applied on the object and the result is returned + as a . + + + + + + Gets the renderer for the specified object type + + the object to lookup the renderer for + the renderer for + + + Gets the renderer for the specified object type. + + + Syntactic sugar method that calls + with the type of the object parameter. + + + + + + Gets the renderer for the specified type + + the type to lookup the renderer for + the renderer for the specified type + + + Returns the renderer for the specified type. + If no specific renderer has been defined the + will be returned. + + + + + + Internal function to recursively search interfaces + + the type to lookup the renderer for + the renderer for the specified type + + + + Clear the map of renderers + + + + Clear the custom renderers defined by using + . The + cannot be removed. + + + + + + Register an for . + + the type that will be rendered by + the renderer for + + + Register an object renderer for a specific source type. + This renderer will be returned from a call to + specifying the same as an argument. + + + + + + Get the default renderer instance + + the default renderer + + + Get the default renderer + + + + + + Interface implemented by logger repository plugins. + + + + Plugins define additional behavior that can be associated + with a . + The held by the + property is used to store the plugins for a repository. + + + The log4net.Config.PluginAttribute can be used to + attach plugins to repositories created using configuration + attributes. + + + Nicko Cadell + Gert Driesen + + + + Attaches the plugin to the specified . + + The that this plugin should be attached to. + + + A plugin may only be attached to a single repository. + + + This method is called when the plugin is attached to the repository. + + + + + + Is called when the plugin is to shutdown. + + + + This method is called to notify the plugin that + it should stop operating and should detach from + the repository. + + + + + + Gets the name of the plugin. + + + The name of the plugin. + + + + Plugins are stored in the + keyed by name. Each plugin instance attached to a + repository must be a unique name. + + + + + + A strongly-typed collection of objects. + + Nicko Cadell + + + + Creates a read-only wrapper for a PluginCollection instance. + + list to create a readonly wrapper arround + + A PluginCollection wrapper that is read-only. + + + + + Initializes a new instance of the PluginCollection class + that is empty and has the default initial capacity. + + + + + Initializes a new instance of the PluginCollection class + that has the specified initial capacity. + + + The number of elements that the new PluginCollection is initially capable of storing. + + + + + Initializes a new instance of the PluginCollection class + that contains elements copied from the specified PluginCollection. + + The PluginCollection whose elements are copied to the new collection. + + + + Initializes a new instance of the PluginCollection class + that contains elements copied from the specified array. + + The array whose elements are copied to the new list. + + + + Initializes a new instance of the PluginCollection class + that contains elements copied from the specified collection. + + The collection whose elements are copied to the new list. + + + + Allow subclasses to avoid our default constructors + + + + + + + Copies the entire PluginCollection to a one-dimensional + array. + + The one-dimensional array to copy to. + + + + Copies the entire PluginCollection to a one-dimensional + array, starting at the specified index of the target array. + + The one-dimensional array to copy to. + The zero-based index in at which copying begins. + + + + Adds a to the end of the PluginCollection. + + The to be added to the end of the PluginCollection. + The index at which the value has been added. + + + + Removes all elements from the PluginCollection. + + + + + Creates a shallow copy of the . + + A new with a shallow copy of the collection data. + + + + Determines whether a given is in the PluginCollection. + + The to check for. + true if is found in the PluginCollection; otherwise, false. + + + + Returns the zero-based index of the first occurrence of a + in the PluginCollection. + + The to locate in the PluginCollection. + + The zero-based index of the first occurrence of + in the entire PluginCollection, if found; otherwise, -1. + + + + + Inserts an element into the PluginCollection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + is less than zero + -or- + is equal to or greater than . + + + + + Removes the first occurrence of a specific from the PluginCollection. + + The to remove from the PluginCollection. + + The specified was not found in the PluginCollection. + + + + + Removes the element at the specified index of the PluginCollection. + + The zero-based index of the element to remove. + + is less than zero. + -or- + is equal to or greater than . + + + + + Returns an enumerator that can iterate through the PluginCollection. + + An for the entire PluginCollection. + + + + Adds the elements of another PluginCollection to the current PluginCollection. + + The PluginCollection whose elements should be added to the end of the current PluginCollection. + The new of the PluginCollection. + + + + Adds the elements of a array to the current PluginCollection. + + The array whose elements should be added to the end of the PluginCollection. + The new of the PluginCollection. + + + + Adds the elements of a collection to the current PluginCollection. + + The collection whose elements should be added to the end of the PluginCollection. + The new of the PluginCollection. + + + + Sets the capacity to the actual number of elements. + + + + + is less than zero. + -or- + is equal to or greater than . + + + + + is less than zero. + -or- + is equal to or greater than . + + + + + Gets the number of elements actually contained in the PluginCollection. + + + + + Gets a value indicating whether access to the collection is synchronized (thread-safe). + + false, because the backing type is an array, which is never thread-safe. + + + + Gets an object that can be used to synchronize access to the collection. + + + An object that can be used to synchronize access to the collection. + + + + + Gets or sets the at the specified index. + + + The at the specified index. + + The zero-based index of the element to get or set. + + is less than zero. + -or- + is equal to or greater than . + + + + + Gets a value indicating whether the collection has a fixed size. + + true if the collection has a fixed size; otherwise, false. The default is false. + + + + Gets a value indicating whether the IList is read-only. + + true if the collection is read-only; otherwise, false. The default is false. + + + + Gets or sets the number of elements the PluginCollection can contain. + + + The number of elements the PluginCollection can contain. + + + + + Supports type-safe iteration over a . + + + + + + Advances the enumerator to the next element in the collection. + + + true if the enumerator was successfully advanced to the next element; + false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, before the first element in the collection. + + + + + Gets the current element in the collection. + + + + + Type visible only to our subclasses + Used to access protected constructor + + + + + + A value + + + + + Supports simple iteration over a . + + + + + + Initializes a new instance of the Enumerator class. + + + + + + Advances the enumerator to the next element in the collection. + + + true if the enumerator was successfully advanced to the next element; + false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, before the first element in the collection. + + + + + Gets the current element in the collection. + + + The current element in the collection. + + + + + + + + Map of repository plugins. + + + + This class is a name keyed map of the plugins that are + attached to a repository. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + The repository that the plugins should be attached to. + + + Initialize a new instance of the class with a + repository that the plugins should be attached to. + + + + + + Adds a to the map. + + The to add to the map. + + + The will be attached to the repository when added. + + + If there already exists a plugin with the same name + attached to the repository then the old plugin will + be and replaced with + the new plugin. + + + + + + Removes a from the map. + + The to remove from the map. + + + Remove a specific plugin from this map. + + + + + + Gets a by name. + + The name of the to lookup. + + The from the map with the name specified, or + null if no plugin is found. + + + + Lookup a plugin by name. If the plugin is not found null + will be returned. + + + + + + Gets all possible plugins as a list of objects. + + All possible plugins as a list of objects. + + + Get a collection of all the plugins defined in this map. + + + + + + Base implementation of + + + + Default abstract implementation of the + interface. This base class can be used by implementors + of the interface. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + the name of the plugin + + Initializes a new Plugin with the specified name. + + + + + Attaches this plugin to a . + + The that this plugin should be attached to. + + + A plugin may only be attached to a single repository. + + + This method is called when the plugin is attached to the repository. + + + + + + Is called when the plugin is to shutdown. + + + + This method is called to notify the plugin that + it should stop operating and should detach from + the repository. + + + + + + The name of this plugin. + + + + + The repository this plugin is attached to. + + + + + Gets or sets the name of the plugin. + + + The name of the plugin. + + + + Plugins are stored in the + keyed by name. Each plugin instance attached to a + repository must be a unique name. + + + The name of the plugin must not change one the + plugin has been attached to a repository. + + + + + + The repository for this plugin + + + The that this plugin is attached to. + + + + Gets or sets the that this plugin is + attached to. + + + + + + Plugin that listens for events from the + + + + This plugin publishes an instance of + on a specified . This listens for logging events delivered from + a remote . + + + When an event is received it is relogged within the attached repository + as if it had been raised locally. + + + Nicko Cadell + Gert Driesen + + + + Default constructor + + + + Initializes a new instance of the class. + + + The property must be set. + + + + + + Construct with sink Uri. + + The name to publish the sink under in the remoting infrastructure. + See for more details. + + + Initializes a new instance of the class + with specified name. + + + + + + Attaches this plugin to a . + + The that this plugin should be attached to. + + + A plugin may only be attached to a single repository. + + + This method is called when the plugin is attached to the repository. + + + + + + Is called when the plugin is to shutdown. + + + + When the plugin is shutdown the remote logging + sink is disconnected. + + + + + + The fully qualified type of the RemoteLoggingServerPlugin class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Gets or sets the URI of this sink. + + + The URI of this sink. + + + + This is the name under which the object is marshaled. + + + + + + + Delivers objects to a remote sink. + + + + Internal class used to listen for logging events + and deliver them to the local repository. + + + + + + Constructor + + The repository to log to. + + + Initializes a new instance of the for the + specified . + + + + + + Logs the events to the repository. + + The events to log. + + + The events passed are logged to the + + + + + + Obtains a lifetime service object to control the lifetime + policy for this instance. + + null to indicate that this instance should live forever. + + + Obtains a lifetime service object to control the lifetime + policy for this instance. This object should live forever + therefore this implementation returns null. + + + + + + The underlying that events should + be logged to. + + + + + Default implementation of + + + + This default implementation of the + interface is used to create the default subclass + of the object. + + + Nicko Cadell + Gert Driesen + + + + Interface abstracts creation of instances + + + + This interface is used by the to + create new objects. + + + The method is called + to create a named . + + + Implement this interface to create new subclasses of . + + + Nicko Cadell + Gert Driesen + + + + Create a new instance + + The that will own the . + The name of the . + The instance for the specified name. + + + Create a new instance with the + specified name. + + + Called by the to create + new named instances. + + + If the is null then the root logger + must be returned. + + + + + + Default constructor + + + + Initializes a new instance of the class. + + + + + + Create a new instance + + The that will own the . + The name of the . + The instance for the specified name. + + + Create a new instance with the + specified name. + + + Called by the to create + new named instances. + + + If the is null then the root logger + must be returned. + + + + + + Default internal subclass of + + + + This subclass has no additional behavior over the + class but does allow instances + to be created. + + + + + + Implementation of used by + + + + Internal class used to provide implementation of + interface. Applications should use to get + logger instances. + + + This is one of the central classes in the log4net implementation. One of the + distinctive features of log4net are hierarchical loggers and their + evaluation. The organizes the + instances into a rooted tree hierarchy. + + + The class is abstract. Only concrete subclasses of + can be created. The + is used to create instances of this type for the . + + + Nicko Cadell + Gert Driesen + Aspi Havewala + Douglas de la Torre + + + + This constructor created a new instance and + sets its name. + + The name of the . + + + This constructor is protected and designed to be used by + a subclass that is not abstract. + + + Loggers are constructed by + objects. See for the default + logger creator. + + + + + + Add to the list of appenders of this + Logger instance. + + An appender to add to this logger + + + Add to the list of appenders of this + Logger instance. + + + If is already in the list of + appenders, then it won't be added again. + + + + + + Look for the appender named as name + + The name of the appender to lookup + The appender with the name specified, or null. + + + Returns the named appender, or null if the appender is not found. + + + + + + Remove all previously added appenders from this Logger instance. + + + + Remove all previously added appenders from this Logger instance. + + + This is useful when re-reading configuration information. + + + + + + Remove the appender passed as parameter form the list of appenders. + + The appender to remove + The appender removed from the list + + + Remove the appender passed as parameter form the list of appenders. + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + + Remove the appender passed as parameter form the list of appenders. + + The name of the appender to remove + The appender removed from the list + + + Remove the named appender passed as parameter form the list of appenders. + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + + This generic form is intended to be used by wrappers. + + The declaring type of the method that is + the stack boundary into the logging system for this call. + The level of the message to be logged. + The message object to log. + The exception to log, including its stack trace. + + + Generate a logging event for the specified using + the and . + + + This method must not throw any exception to the caller. + + + + + + This is the most generic printing method that is intended to be used + by wrappers. + + The event being logged. + + + Logs the specified logging event through this logger. + + + This method must not throw any exception to the caller. + + + + + + Checks if this logger is enabled for a given passed as parameter. + + The level to check. + + true if this logger is enabled for level, otherwise false. + + + + Test if this logger is going to log events of the specified . + + + This method must not throw any exception to the caller. + + + + + + Deliver the to the attached appenders. + + The event to log. + + + Call the appenders in the hierarchy starting at + this. If no appenders could be found, emit a + warning. + + + This method calls all the appenders inherited from the + hierarchy circumventing any evaluation of whether to log or not + to log the particular log request. + + + + + + Closes all attached appenders implementing the interface. + + + + Used to ensure that the appenders are correctly shutdown. + + + + + + This is the most generic printing method. This generic form is intended to be used by wrappers + + The level of the message to be logged. + The message object to log. + The exception to log, including its stack trace. + + + Generate a logging event for the specified using + the . + + + + + + Creates a new logging event and logs the event without further checks. + + The declaring type of the method that is + the stack boundary into the logging system for this call. + The level of the message to be logged. + The message object to log. + The exception to log, including its stack trace. + + + Generates a logging event and delivers it to the attached + appenders. + + + + + + Creates a new logging event and logs the event without further checks. + + The event being logged. + + + Delivers the logging event to the attached appenders. + + + + + + The fully qualified type of the Logger class. + + + + + The name of this logger. + + + + + The assigned level of this logger. + + + + The level variable need not be + assigned a value in which case it is inherited + form the hierarchy. + + + + + + The parent of this logger. + + + + The parent of this logger. + All loggers have at least one ancestor which is the root logger. + + + + + + Loggers need to know what Hierarchy they are in. + + + + Loggers need to know what Hierarchy they are in. + The hierarchy that this logger is a member of is stored + here. + + + + + + Helper implementation of the interface + + + + + Flag indicating if child loggers inherit their parents appenders + + + + Additivity is set to true by default, that is children inherit + the appenders of their ancestors by default. If this variable is + set to false then the appenders found in the + ancestors of this logger are not used. However, the children + of this logger will inherit its appenders, unless the children + have their additivity flag set to false too. See + the user manual for more details. + + + + + + Lock to protect AppenderAttachedImpl variable m_appenderAttachedImpl + + + + + Gets or sets the parent logger in the hierarchy. + + + The parent logger in the hierarchy. + + + + Part of the Composite pattern that makes the hierarchy. + The hierarchy is parent linked rather than child linked. + + + + + + Gets or sets a value indicating if child loggers inherit their parent's appenders. + + + true if child loggers inherit their parent's appenders. + + + + Additivity is set to true by default, that is children inherit + the appenders of their ancestors by default. If this variable is + set to false then the appenders found in the + ancestors of this logger are not used. However, the children + of this logger will inherit its appenders, unless the children + have their additivity flag set to false too. See + the user manual for more details. + + + + + + Gets the effective level for this logger. + + The nearest level in the logger hierarchy. + + + Starting from this logger, searches the logger hierarchy for a + non-null level and returns it. Otherwise, returns the level of the + root logger. + + The Logger class is designed so that this method executes as + quickly as possible. + + + + + Gets or sets the where this + Logger instance is attached to. + + The hierarchy that this logger belongs to. + + + This logger must be attached to a single . + + + + + + Gets or sets the assigned , if any, for this Logger. + + + The of this logger. + + + + The assigned can be null. + + + + + + Get the appenders contained in this logger as an + . + + A collection of the appenders in this logger + + + Get the appenders contained in this logger as an + . If no appenders + can be found, then a is returned. + + + + + + Gets the logger name. + + + The name of the logger. + + + + The name of this logger + + + + + + Gets the where this + Logger instance is attached to. + + + The that this logger belongs to. + + + + Gets the where this + Logger instance is attached to. + + + + + + Construct a new Logger + + the name of the logger + + + Initializes a new instance of the class + with the specified name. + + + + + + Delegate used to handle logger creation event notifications. + + The in which the has been created. + The event args that hold the instance that has been created. + + + Delegate used to handle logger creation event notifications. + + + + + + Provides data for the event. + + + + A event is raised every time a + is created. + + + + + + The created + + + + + Constructor + + The that has been created. + + + Initializes a new instance of the event argument + class,with the specified . + + + + + + Gets the that has been created. + + + The that has been created. + + + + The that has been created. + + + + + + Hierarchical organization of loggers + + + + The casual user should not have to deal with this class + directly. + + + This class is specialized in retrieving loggers by name and + also maintaining the logger hierarchy. Implements the + interface. + + + The structure of the logger hierarchy is maintained by the + method. The hierarchy is such that children + link to their parent but parents do not have any references to their + children. Moreover, loggers can be instantiated in any order, in + particular descendant before ancestor. + + + In case a descendant is created before a particular ancestor, + then it creates a provision node for the ancestor and adds itself + to the provision node. Other descendants of the same ancestor add + themselves to the previously created provision node. + + + Nicko Cadell + Gert Driesen + + + + Base implementation of + + + + Default abstract implementation of the interface. + + + Skeleton implementation of the interface. + All types can extend this type. + + + Nicko Cadell + Gert Driesen + + + + Interface implemented by logger repositories. + + + + This interface is implemented by logger repositories. e.g. + . + + + This interface is used by the + to obtain interfaces. + + + Nicko Cadell + Gert Driesen + + + + Check if the named logger exists in the repository. If so return + its reference, otherwise returns null. + + The name of the logger to lookup + The Logger object with the name specified + + + If the names logger exists it is returned, otherwise + null is returned. + + + + + + Returns all the currently defined loggers as an Array. + + All the defined loggers + + + Returns all the currently defined loggers as an Array. + + + + + + Returns a named logger instance + + The name of the logger to retrieve + The logger object with the name specified + + + Returns a named logger instance. + + + If a logger of that name already exists, then it will be + returned. Otherwise, a new logger will be instantiated and + then linked with its existing ancestors as well as children. + + + + + Shutdown the repository + + + Shutting down a repository will safely close and remove + all appenders in all loggers including the root logger. + + + Some appenders need to be closed before the + application exists. Otherwise, pending logging events might be + lost. + + + The method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + + + + Reset the repositories configuration to a default state + + + + Reset all values contained in this instance to their + default state. + + + Existing loggers are not removed. They are just reset. + + + This method should be used sparingly and with care as it will + block all logging until it is completed. + + + + + + Log the through this repository. + + the event to log + + + This method should not normally be used to log. + The interface should be used + for routine logging. This interface can be obtained + using the method. + + + The logEvent is delivered to the appropriate logger and + that logger is then responsible for logging the event. + + + + + + Returns all the Appenders that are configured as an Array. + + All the Appenders + + + Returns all the Appenders that are configured as an Array. + + + + + + The name of the repository + + + The name of the repository + + + + The name of the repository. + + + + + + RendererMap accesses the object renderer map for this repository. + + + RendererMap accesses the object renderer map for this repository. + + + + RendererMap accesses the object renderer map for this repository. + + + The RendererMap holds a mapping between types and + objects. + + + + + + The plugin map for this repository. + + + The plugin map for this repository. + + + + The plugin map holds the instances + that have been attached to this repository. + + + + + + Get the level map for the Repository. + + + + Get the level map for the Repository. + + + The level map defines the mappings between + level names and objects in + this repository. + + + + + + The threshold for all events in this repository + + + The threshold for all events in this repository + + + + The threshold for all events in this repository. + + + + + + Flag indicates if this repository has been configured. + + + Flag indicates if this repository has been configured. + + + + Flag indicates if this repository has been configured. + + + + + + Collection of internal messages captured during the most + recent configuration process. + + + + + Event to notify that the repository has been shutdown. + + + Event to notify that the repository has been shutdown. + + + + Event raised when the repository has been shutdown. + + + + + + Event to notify that the repository has had its configuration reset. + + + Event to notify that the repository has had its configuration reset. + + + + Event raised when the repository's configuration has been + reset to default. + + + + + + Event to notify that the repository has had its configuration changed. + + + Event to notify that the repository has had its configuration changed. + + + + Event raised when the repository's configuration has been changed. + + + + + + Repository specific properties + + + Repository specific properties + + + + These properties can be specified on a repository specific basis. + + + + + + Default Constructor + + + + Initializes the repository with default (empty) properties. + + + + + + Construct the repository using specific properties + + the properties to set for this repository + + + Initializes the repository with specified properties. + + + + + + Test if logger exists + + The name of the logger to lookup + The Logger object with the name specified + + + Check if the named logger exists in the repository. If so return + its reference, otherwise returns null. + + + + + + Returns all the currently defined loggers in the repository + + All the defined loggers + + + Returns all the currently defined loggers in the repository as an Array. + + + + + + Return a new logger instance + + The name of the logger to retrieve + The logger object with the name specified + + + Return a new logger instance. + + + If a logger of that name already exists, then it will be + returned. Otherwise, a new logger will be instantiated and + then linked with its existing ancestors as well as children. + + + + + + Shutdown the repository + + + + Shutdown the repository. Can be overridden in a subclass. + This base class implementation notifies the + listeners and all attached plugins of the shutdown event. + + + + + + Reset the repositories configuration to a default state + + + + Reset all values contained in this instance to their + default state. + + + Existing loggers are not removed. They are just reset. + + + This method should be used sparingly and with care as it will + block all logging until it is completed. + + + + + + Log the logEvent through this repository. + + the event to log + + + This method should not normally be used to log. + The interface should be used + for routine logging. This interface can be obtained + using the method. + + + The logEvent is delivered to the appropriate logger and + that logger is then responsible for logging the event. + + + + + + Returns all the Appenders that are configured as an Array. + + All the Appenders + + + Returns all the Appenders that are configured as an Array. + + + + + + The fully qualified type of the LoggerRepositorySkeleton class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Adds an object renderer for a specific class. + + The type that will be rendered by the renderer supplied. + The object renderer used to render the object. + + + Adds an object renderer for a specific class. + + + + + + Notify the registered listeners that the repository is shutting down + + Empty EventArgs + + + Notify any listeners that this repository is shutting down. + + + + + + Notify the registered listeners that the repository has had its configuration reset + + Empty EventArgs + + + Notify any listeners that this repository's configuration has been reset. + + + + + + Notify the registered listeners that the repository has had its configuration changed + + Empty EventArgs + + + Notify any listeners that this repository's configuration has changed. + + + + + + Raise a configuration changed event on this repository + + EventArgs.Empty + + + Applications that programmatically change the configuration of the repository should + raise this event notification to notify listeners. + + + + + + Flushes all configured Appenders that implement . + + The maximum time in milliseconds to wait for logging events from asycnhronous appenders to be flushed, + or to wait indefinitely. + True if all logging events were flushed successfully, else false. + + + + The name of the repository + + + The string name of the repository + + + + The name of this repository. The name is + used to store and lookup the repositories + stored by the . + + + + + + The threshold for all events in this repository + + + The threshold for all events in this repository + + + + The threshold for all events in this repository + + + + + + RendererMap accesses the object renderer map for this repository. + + + RendererMap accesses the object renderer map for this repository. + + + + RendererMap accesses the object renderer map for this repository. + + + The RendererMap holds a mapping between types and + objects. + + + + + + The plugin map for this repository. + + + The plugin map for this repository. + + + + The plugin map holds the instances + that have been attached to this repository. + + + + + + Get the level map for the Repository. + + + + Get the level map for the Repository. + + + The level map defines the mappings between + level names and objects in + this repository. + + + + + + Flag indicates if this repository has been configured. + + + Flag indicates if this repository has been configured. + + + + Flag indicates if this repository has been configured. + + + + + + Contains a list of internal messages captures during the + last configuration. + + + + + Event to notify that the repository has been shutdown. + + + Event to notify that the repository has been shutdown. + + + + Event raised when the repository has been shutdown. + + + + + + Event to notify that the repository has had its configuration reset. + + + Event to notify that the repository has had its configuration reset. + + + + Event raised when the repository's configuration has been + reset to default. + + + + + + Event to notify that the repository has had its configuration changed. + + + Event to notify that the repository has had its configuration changed. + + + + Event raised when the repository's configuration has been changed. + + + + + + Repository specific properties + + + Repository specific properties + + + These properties can be specified on a repository specific basis + + + + + Basic Configurator interface for repositories + + + + Interface used by basic configurator to configure a + with a default . + + + A should implement this interface to support + configuration by the . + + + Nicko Cadell + Gert Driesen + + + + Initialize the repository using the specified appender + + the appender to use to log all logging events + + + Configure the repository to route all logging events to the + specified appender. + + + + + + Initialize the repository using the specified appenders + + the appenders to use to log all logging events + + + Configure the repository to route all logging events to the + specified appenders. + + + + + + Configure repository using XML + + + + Interface used by Xml configurator to configure a . + + + A should implement this interface to support + configuration by the . + + + Nicko Cadell + Gert Driesen + + + + Initialize the repository using the specified config + + the element containing the root of the config + + + The schema for the XML configuration data is defined by + the implementation. + + + + + + Default constructor + + + + Initializes a new instance of the class. + + + + + + Construct with properties + + The properties to pass to this repository. + + + Initializes a new instance of the class. + + + + + + Construct with a logger factory + + The factory to use to create new logger instances. + + + Initializes a new instance of the class with + the specified . + + + + + + Construct with properties and a logger factory + + The properties to pass to this repository. + The factory to use to create new logger instances. + + + Initializes a new instance of the class with + the specified . + + + + + + Test if a logger exists + + The name of the logger to lookup + The Logger object with the name specified + + + Check if the named logger exists in the hierarchy. If so return + its reference, otherwise returns null. + + + + + + Returns all the currently defined loggers in the hierarchy as an Array + + All the defined loggers + + + Returns all the currently defined loggers in the hierarchy as an Array. + The root logger is not included in the returned + enumeration. + + + + + + Return a new logger instance named as the first parameter using + the default factory. + + + + Return a new logger instance named as the first parameter using + the default factory. + + + If a logger of that name already exists, then it will be + returned. Otherwise, a new logger will be instantiated and + then linked with its existing ancestors as well as children. + + + The name of the logger to retrieve + The logger object with the name specified + + + + Shutting down a hierarchy will safely close and remove + all appenders in all loggers including the root logger. + + + + Shutting down a hierarchy will safely close and remove + all appenders in all loggers including the root logger. + + + Some appenders need to be closed before the + application exists. Otherwise, pending logging events might be + lost. + + + The Shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + + + + Reset all values contained in this hierarchy instance to their default. + + + + Reset all values contained in this hierarchy instance to their + default. This removes all appenders from all loggers, sets + the level of all non-root loggers to null, + sets their additivity flag to true and sets the level + of the root logger to . Moreover, + message disabling is set its default "off" value. + + + Existing loggers are not removed. They are just reset. + + + This method should be used sparingly and with care as it will + block all logging until it is completed. + + + + + + Log the logEvent through this hierarchy. + + the event to log + + + This method should not normally be used to log. + The interface should be used + for routine logging. This interface can be obtained + using the method. + + + The logEvent is delivered to the appropriate logger and + that logger is then responsible for logging the event. + + + + + + Returns all the Appenders that are currently configured + + An array containing all the currently configured appenders + + + Returns all the instances that are currently configured. + All the loggers are searched for appenders. The appenders may also be containers + for appenders and these are also searched for additional loggers. + + + The list returned is unordered but does not contain duplicates. + + + + + + Collect the appenders from an . + The appender may also be a container. + + + + + + + Collect the appenders from an container + + + + + + + Initialize the log4net system using the specified appender + + the appender to use to log all logging events + + + + Initialize the log4net system using the specified appenders + + the appenders to use to log all logging events + + + + Initialize the log4net system using the specified appenders + + the appenders to use to log all logging events + + + This method provides the same functionality as the + method implemented + on this object, but it is protected and therefore can be called by subclasses. + + + + + + Initialize the log4net system using the specified config + + the element containing the root of the config + + + + Initialize the log4net system using the specified config + + the element containing the root of the config + + + This method provides the same functionality as the + method implemented + on this object, but it is protected and therefore can be called by subclasses. + + + + + + Test if this hierarchy is disabled for the specified . + + The level to check against. + + true if the repository is disabled for the level argument, false otherwise. + + + + If this hierarchy has not been configured then this method will + always return true. + + + This method will return true if this repository is + disabled for level object passed as parameter and + false otherwise. + + + See also the property. + + + + + + Clear all logger definitions from the internal hashtable + + + + This call will clear all logger definitions from the internal + hashtable. Invoking this method will irrevocably mess up the + logger hierarchy. + + + You should really know what you are doing before + invoking this method. + + + + + + Return a new logger instance named as the first parameter using + . + + The name of the logger to retrieve + The factory that will make the new logger instance + The logger object with the name specified + + + If a logger of that name already exists, then it will be + returned. Otherwise, a new logger will be instantiated by the + parameter and linked with its existing + ancestors as well as children. + + + + + + Sends a logger creation event to all registered listeners + + The newly created logger + + Raises the logger creation event. + + + + + Updates all the parents of the specified logger + + The logger to update the parents for + + + This method loops through all the potential parents of + . There 3 possible cases: + + + + No entry for the potential parent of exists + + We create a ProvisionNode for this potential + parent and insert in that provision node. + + + + The entry is of type Logger for the potential parent. + + The entry is 's nearest existing parent. We + update 's parent field with this entry. We also break from + he loop because updating our parent's parent is our parent's + responsibility. + + + + The entry is of type ProvisionNode for this potential parent. + + We add to the list of children for this + potential parent. + + + + + + + + Replace a with a in the hierarchy. + + + + + + We update the links for all the children that placed themselves + in the provision node 'pn'. The second argument 'log' is a + reference for the newly created Logger, parent of all the + children in 'pn'. + + + We loop on all the children 'c' in 'pn'. + + + If the child 'c' has been already linked to a child of + 'log' then there is no need to update 'c'. + + + Otherwise, we set log's parent field to c's parent and set + c's parent field to log. + + + + + + Define or redefine a Level using the values in the argument + + the level values + + + Define or redefine a Level using the values in the argument + + + Supports setting levels via the configuration file. + + + + + + Set a Property using the values in the argument + + the property value + + + Set a Property using the values in the argument. + + + Supports setting property values via the configuration file. + + + + + + The fully qualified type of the Hierarchy class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Event used to notify that a logger has been created. + + + + Event raised when a logger is created. + + + + + + Has no appender warning been emitted + + + + Flag to indicate if we have already issued a warning + about not having an appender warning. + + + + + + Get the root of this hierarchy + + + + Get the root of this hierarchy. + + + + + + Gets or sets the default instance. + + The default + + + The logger factory is used to create logger instances. + + + + + + A class to hold the value, name and display name for a level + + + + A class to hold the value, name and display name for a level + + + + + + Override Object.ToString to return sensible debug info + + string info about this object + + + + Value of the level + + + + If the value is not set (defaults to -1) the value will be looked + up for the current level with the same name. + + + + + + Name of the level + + + The name of the level + + + + The name of the level. + + + + + + Display name for the level + + + The display name of the level + + + + The display name of the level. + + + + + + Used internally to accelerate hash table searches. + + + + Internal class used to improve performance of + string keyed hashtables. + + + The hashcode of the string is cached for reuse. + The string is stored as an interned value. + When comparing two objects for equality + the reference equality of the interned strings is compared. + + + Nicko Cadell + Gert Driesen + + + + Construct key with string name + + + + Initializes a new instance of the class + with the specified name. + + + Stores the hashcode of the string and interns + the string key to optimize comparisons. + + + The Compact Framework 1.0 the + method does not work. On the Compact Framework + the string keys are not interned nor are they + compared by reference. + + + The name of the logger. + + + + Returns a hash code for the current instance. + + A hash code for the current instance. + + + Returns the cached hashcode. + + + + + + Determines whether two instances + are equal. + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + + + Compares the references of the interned strings. + + + + + + Provision nodes are used where no logger instance has been specified + + + + instances are used in the + when there is no specified + for that node. + + + A provision node holds a list of child loggers on behalf of + a logger that does not exist. + + + Nicko Cadell + Gert Driesen + + + + Create a new provision node with child node + + A child logger to add to this node. + + + Initializes a new instance of the class + with the specified child logger. + + + + + + The sits at the root of the logger hierarchy tree. + + + + The is a regular except + that it provides several guarantees. + + + First, it cannot be assigned a null + level. Second, since the root logger cannot have a parent, the + property always returns the value of the + level field without walking the hierarchy. + + + Nicko Cadell + Gert Driesen + + + + Construct a + + The level to assign to the root logger. + + + Initializes a new instance of the class with + the specified logging level. + + + The root logger names itself as "root". However, the root + logger cannot be retrieved by name. + + + + + + The fully qualified type of the RootLogger class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Gets the assigned level value without walking the logger hierarchy. + + The assigned level value without walking the logger hierarchy. + + + Because the root logger cannot have a parent and its level + must not be null this property just returns the + value of . + + + + + + Gets or sets the assigned for the root logger. + + + The of the root logger. + + + + Setting the level of the root logger to a null reference + may have catastrophic results. We prevent this here. + + + + + + Initializes the log4net environment using an XML DOM. + + + + Configures a using an XML DOM. + + + Nicko Cadell + Gert Driesen + + + + Construct the configurator for a hierarchy + + The hierarchy to build. + + + Initializes a new instance of the class + with the specified . + + + + + + Configure the hierarchy by parsing a DOM tree of XML elements. + + The root element to parse. + + + Configure the hierarchy by parsing a DOM tree of XML elements. + + + + + + Parse appenders by IDREF. + + The appender ref element. + The instance of the appender that the ref refers to. + + + Parse an XML element that represents an appender and return + the appender. + + + + + + Parses an appender element. + + The appender element. + The appender instance or null when parsing failed. + + + Parse an XML element that represents an appender and return + the appender instance. + + + + + + Parses a logger element. + + The logger element. + + + Parse an XML element that represents a logger. + + + + + + Parses the root logger element. + + The root element. + + + Parse an XML element that represents the root logger. + + + + + + Parses the children of a logger element. + + The category element. + The logger instance. + Flag to indicate if the logger is the root logger. + + + Parse the child elements of a <logger> element. + + + + + + Parses an object renderer. + + The renderer element. + + + Parse an XML element that represents a renderer. + + + + + + Parses a level element. + + The level element. + The logger object to set the level on. + Flag to indicate if the logger is the root logger. + + + Parse an XML element that represents a level. + + + + + + Sets a parameter on an object. + + The parameter element. + The object to set the parameter on. + + The parameter name must correspond to a writable property + on the object. The value of the parameter is a string, + therefore this function will attempt to set a string + property first. If unable to set a string property it + will inspect the property and its argument type. It will + attempt to call a static method called Parse on the + type of the property. This method will take a single + string argument and return a value that can be used to + set the property. + + + + + Test if an element has no attributes or child elements + + the element to inspect + true if the element has any attributes or child elements, false otherwise + + + + Test if a is constructible with Activator.CreateInstance. + + the type to inspect + true if the type is creatable using a default constructor, false otherwise + + + + Look for a method on the that matches the supplied + + the type that has the method + the name of the method + the method info found + + + The method must be a public instance method on the . + The method must be named or "Add" followed by . + The method must take a single parameter. + + + + + + Converts a string value to a target type. + + The type of object to convert the string to. + The string value to use as the value of the object. + + + An object of type with value or + null when the conversion could not be performed. + + + + + + Creates an object as specified in XML. + + The XML element that contains the definition of the object. + The object type to use if not explicitly specified. + The type that the returned object must be or must inherit from. + The object or null + + + Parse an XML element and create an object instance based on the configuration + data. + + + The type of the instance may be specified in the XML. If not + specified then the is used + as the type. However the type is specified it must support the + type. + + + + + + key: appenderName, value: appender. + + + + + The Hierarchy being configured. + + + + + The fully qualified type of the XmlHierarchyConfigurator class. + + + Used by the internal logger to record the Type of the + log message. + + + + + + + + + + + + + + + + + + + + + Delegate used to handle logger repository shutdown event notifications + + The that is shutting down. + Empty event args + + + Delegate used to handle logger repository shutdown event notifications. + + + + + + Delegate used to handle logger repository configuration reset event notifications + + The that has had its configuration reset. + Empty event args + + + Delegate used to handle logger repository configuration reset event notifications. + + + + + + Delegate used to handle event notifications for logger repository configuration changes. + + The that has had its configuration changed. + Empty event arguments. + + + Delegate used to handle event notifications for logger repository configuration changes. + + + + + + Write the name of the current AppDomain to the output + + + + Write the name of the current AppDomain to the output writer + + + Nicko Cadell + + + + Write the name of the current AppDomain to the output + + the writer to write to + null, state is not set + + + Writes name of the current AppDomain to the output . + + + + + + AppSetting pattern converter + + + + This pattern converter reads appSettings from the application configuration file. + + + If the is specified then that will be used to + lookup a single appSettings value. If no is specified + then all appSettings will be dumped as a list of key value pairs. + + + A typical use is to specify a base directory for log files, e.g. + + + + + ... + + + ]]> + + + + + + + Write the property value to the output + + that will receive the formatted result. + null, state is not set + + + Writes out the value of a named property. The property name + should be set in the + property. + + + If the is set to null + then all the properties are written as key value pairs. + + + + + + Write the current date to the output + + + + Date pattern converter, uses a to format + the current date and time to the writer as a string. + + + The value of the determines + the formatting of the date. The following values are allowed: + + + Option value + Output + + + ISO8601 + + Uses the formatter. + Formats using the "yyyy-MM-dd HH:mm:ss,fff" pattern. + + + + DATE + + Uses the formatter. + Formats using the "dd MMM yyyy HH:mm:ss,fff" for example, "06 Nov 1994 15:49:37,459". + + + + ABSOLUTE + + Uses the formatter. + Formats using the "HH:mm:ss,fff" for example, "15:49:37,459". + + + + other + + Any other pattern string uses the formatter. + This formatter passes the pattern string to the + method. + For details on valid patterns see + DateTimeFormatInfo Class. + + + + + + The date and time is in the local time zone and is rendered in that zone. + To output the time in Universal time see . + + + Nicko Cadell + + + + The used to render the date to a string + + + + The used to render the date to a string + + + + + + Initialize the converter options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Write the current date to the output + + that will receive the formatted result. + null, state is not set + + + Pass the current date and time to the + for it to render it to the writer. + + + The date and time passed is in the local time zone. + + + + + + The fully qualified type of the DatePatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Write an folder path to the output + + + + Write an special path environment folder path to the output writer. + The value of the determines + the name of the variable to output. + should be a value in the enumeration. + + + Ron Grabowski + + + + Write an special path environment folder path to the output + + the writer to write to + null, state is not set + + + Writes the special path environment folder path to the output . + The name of the special path environment folder path to output must be set + using the + property. + + + + + + The fully qualified type of the EnvironmentFolderPathPatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Write an environment variable to the output + + + + Write an environment variable to the output writer. + The value of the determines + the name of the variable to output. + + + Nicko Cadell + + + + Write an environment variable to the output + + the writer to write to + null, state is not set + + + Writes the environment variable to the output . + The name of the environment variable to output must be set + using the + property. + + + + + + The fully qualified type of the EnvironmentPatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Write the current thread identity to the output + + + + Write the current thread identity to the output writer + + + Nicko Cadell + + + + Write the current thread identity to the output + + the writer to write to + null, state is not set + + + Writes the current thread identity to the output . + + + + + + The fully qualified type of the IdentityPatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Pattern converter for literal string instances in the pattern + + + + Writes the literal string value specified in the + property to + the output. + + + Nicko Cadell + + + + Set the next converter in the chain + + The next pattern converter in the chain + The next pattern converter + + + Special case the building of the pattern converter chain + for instances. Two adjacent + literals in the pattern can be represented by a single combined + pattern converter. This implementation detects when a + is added to the chain + after this converter and combines its value with this converter's + literal value. + + + + + + Write the literal to the output + + the writer to write to + null, not set + + + Override the formatting behavior to ignore the FormattingInfo + because we have a literal instead. + + + Writes the value of + to the output . + + + + + + Convert this pattern into the rendered message + + that will receive the formatted result. + null, not set + + + This method is not used. + + + + + + Writes a newline to the output + + + + Writes the system dependent line terminator to the output. + This behavior can be overridden by setting the : + + + + Option Value + Output + + + DOS + DOS or Windows line terminator "\r\n" + + + UNIX + UNIX line terminator "\n" + + + + Nicko Cadell + + + + Initialize the converter + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Write the current process ID to the output + + + + Write the current process ID to the output writer + + + Nicko Cadell + + + + Write the current process ID to the output + + the writer to write to + null, state is not set + + + Write the current process ID to the output . + + + + + + The fully qualified type of the ProcessIdPatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Property pattern converter + + + + This pattern converter reads the thread and global properties. + The thread properties take priority over global properties. + See for details of the + thread properties. See for + details of the global properties. + + + If the is specified then that will be used to + lookup a single property. If no is specified + then all properties will be dumped as a list of key value pairs. + + + Nicko Cadell + + + + Write the property value to the output + + that will receive the formatted result. + null, state is not set + + + Writes out the value of a named property. The property name + should be set in the + property. + + + If the is set to null + then all the properties are written as key value pairs. + + + + + + A Pattern converter that generates a string of random characters + + + + The converter generates a string of random characters. By default + the string is length 4. This can be changed by setting the + to the string value of the length required. + + + The random characters in the string are limited to uppercase letters + and numbers only. + + + The random number generator used by this class is not cryptographically secure. + + + Nicko Cadell + + + + Shared random number generator + + + + + Length of random string to generate. Default length 4. + + + + + Initialize the converter options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Write a randoim string to the output + + the writer to write to + null, state is not set + + + Write a randoim string to the output . + + + + + + The fully qualified type of the RandomStringPatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Write the current threads username to the output + + + + Write the current threads username to the output writer + + + Nicko Cadell + + + + Write the current threads username to the output + + the writer to write to + null, state is not set + + + Write the current threads username to the output . + + + + + + The fully qualified type of the UserNamePatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Write the UTC date time to the output + + + + Date pattern converter, uses a to format + the current date and time in Universal time. + + + See the for details on the date pattern syntax. + + + + Nicko Cadell + + + + Write the current date and time to the output + + that will receive the formatted result. + null, state is not set + + + Pass the current date and time to the + for it to render it to the writer. + + + The date is in Universal time when it is rendered. + + + + + + + The fully qualified type of the UtcDatePatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Type converter for Boolean. + + + + Supports conversion from string to bool type. + + + + + + Nicko Cadell + Gert Driesen + + + + Can the source type be converted to the type supported by this object + + the type to convert + true if the conversion is possible + + + Returns true if the is + the type. + + + + + + Convert the source object to the type supported by this object + + the object to convert + the converted object + + + Uses the method to convert the + argument to a . + + + + The object cannot be converted to the + target type. To check for this condition use the + method. + + + + + Exception base type for conversion errors. + + + + This type extends . It + does not add any new functionality but does differentiate the + type of exception being thrown. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Constructor + + A message to include with the exception. + + + Initializes a new instance of the class + with the specified message. + + + + + + Constructor + + A message to include with the exception. + A nested exception to include. + + + Initializes a new instance of the class + with the specified message and inner exception. + + + + + + Serialization constructor + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + Initializes a new instance of the class + with serialized data. + + + + + + Creates a new instance of the class. + + The conversion destination type. + The value to convert. + An instance of the . + + + Creates a new instance of the class. + + + + + + Creates a new instance of the class. + + The conversion destination type. + The value to convert. + A nested exception to include. + An instance of the . + + + Creates a new instance of the class. + + + + + + Register of type converters for specific types. + + + + Maintains a registry of type converters used to convert between + types. + + + Use the and + methods to register new converters. + The and methods + lookup appropriate converters to use. + + + + + Nicko Cadell + Gert Driesen + + + + Private constructor + + + Initializes a new instance of the class. + + + + + Static constructor. + + + + This constructor defines the intrinsic type converters. + + + + + + Adds a converter for a specific type. + + The type being converted to. + The type converter to use to convert to the destination type. + + + Adds a converter instance for a specific type. + + + + + + Adds a converter for a specific type. + + The type being converted to. + The type of the type converter to use to convert to the destination type. + + + Adds a converter for a specific type. + + + + + + Gets the type converter to use to convert values to the destination type. + + The type being converted from. + The type being converted to. + + The type converter instance to use for type conversions or null + if no type converter is found. + + + + Gets the type converter to use to convert values to the destination type. + + + + + + Gets the type converter to use to convert values to the destination type. + + The type being converted to. + + The type converter instance to use for type conversions or null + if no type converter is found. + + + + Gets the type converter to use to convert values to the destination type. + + + + + + Lookups the type converter to use as specified by the attributes on the + destination type. + + The type being converted to. + + The type converter instance to use for type conversions or null + if no type converter is found. + + + + + Creates the instance of the type converter. + + The type of the type converter. + + The type converter instance to use for type conversions or null + if no type converter is found. + + + + The type specified for the type converter must implement + the or interfaces + and must have a public default (no argument) constructor. + + + + + + The fully qualified type of the ConverterRegistry class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Mapping from to type converter. + + + + + Supports conversion from string to type. + + + + Supports conversion from string to type. + + + + + + Nicko Cadell + Gert Driesen + + + + Can the source type be converted to the type supported by this object + + the type to convert + true if the conversion is possible + + + Returns true if the is + the type. + + + + + + Overrides the ConvertFrom method of IConvertFrom. + + the object to convert to an encoding + the encoding + + + Uses the method to + convert the argument to an . + + + + The object cannot be converted to the + target type. To check for this condition use the + method. + + + + + Interface supported by type converters + + + + This interface supports conversion from a single type to arbitrary types. + See . + + + Nicko Cadell + + + + Returns whether this converter can convert the object to the specified type + + A Type that represents the type you want to convert to + true if the conversion is possible + + + Test if the type supported by this converter can be converted to the + . + + + + + + Converts the given value object to the specified type, using the arguments + + the object to convert + The Type to convert the value parameter to + the converted object + + + Converts the (which must be of the type supported + by this converter) to the specified.. + + + + + + Supports conversion from string to type. + + + + Supports conversion from string to type. + + + + + Nicko Cadell + + + + Can the source type be converted to the type supported by this object + + the type to convert + true if the conversion is possible + + + Returns true if the is + the type. + + + + + + Overrides the ConvertFrom method of IConvertFrom. + + the object to convert to an IPAddress + the IPAddress + + + Uses the method to convert the + argument to an . + If that fails then the string is resolved as a DNS hostname. + + + + The object cannot be converted to the + target type. To check for this condition use the + method. + + + + + Valid characters in an IPv4 or IPv6 address string. (Does not support subnets) + + + + + Supports conversion from string to type. + + + + Supports conversion from string to type. + + + The string is used as the + of the . + + + + + + Nicko Cadell + + + + Can the source type be converted to the type supported by this object + + the type to convert + true if the conversion is possible + + + Returns true if the is + the type. + + + + + + Overrides the ConvertFrom method of IConvertFrom. + + the object to convert to a PatternLayout + the PatternLayout + + + Creates and returns a new using + the as the + . + + + + The object cannot be converted to the + target type. To check for this condition use the + method. + + + + + Convert between string and + + + + Supports conversion from string to type, + and from a type to a string. + + + The string is used as the + of the . + + + + + + Nicko Cadell + + + + Can the target type be converted to the type supported by this object + + A that represents the type you want to convert to + true if the conversion is possible + + + Returns true if the is + assignable from a type. + + + + + + Converts the given value object to the specified type, using the arguments + + the object to convert + The Type to convert the value parameter to + the converted object + + + Uses the method to convert the + argument to a . + + + + The object cannot be converted to the + . To check for this condition use the + method. + + + + + Can the source type be converted to the type supported by this object + + the type to convert + true if the conversion is possible + + + Returns true if the is + the type. + + + + + + Overrides the ConvertFrom method of IConvertFrom. + + the object to convert to a PatternString + the PatternString + + + Creates and returns a new using + the as the + . + + + + The object cannot be converted to the + target type. To check for this condition use the + method. + + + + + Supports conversion from string to type. + + + + Supports conversion from string to type. + + + + + + Nicko Cadell + + + + Can the source type be converted to the type supported by this object + + the type to convert + true if the conversion is possible + + + Returns true if the is + the type. + + + + + + Overrides the ConvertFrom method of IConvertFrom. + + the object to convert to a Type + the Type + + + Uses the method to convert the + argument to a . + Additional effort is made to locate partially specified types + by searching the loaded assemblies. + + + + The object cannot be converted to the + target type. To check for this condition use the + method. + + + + + Attribute used to associate a type converter + + + + Class and Interface level attribute that specifies a type converter + to use with the associated type. + + + To associate a type converter with a target type apply a + TypeConverterAttribute to the target type. Specify the + type of the type converter on the attribute. + + + Nicko Cadell + Gert Driesen + + + + The string type name of the type converter + + + + + Default constructor + + + + Default constructor + + + + + + Create a new type converter attribute for the specified type name + + The string type name of the type converter + + + The type specified must implement the + or the interfaces. + + + + + + Create a new type converter attribute for the specified type + + The type of the type converter + + + The type specified must implement the + or the interfaces. + + + + + + The string type name of the type converter + + + The string type name of the type converter + + + + The type specified must implement the + or the interfaces. + + + + + + A straightforward implementation of the interface. + + + + This is the default implementation of the + interface. Implementors of the interface + should aggregate an instance of this type. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Append on on all attached appenders. + + The event being logged. + The number of appenders called. + + + Calls the method on all + attached appenders. + + + + + + Append on on all attached appenders. + + The array of events being logged. + The number of appenders called. + + + Calls the method on all + attached appenders. + + + + + + Calls the DoAppende method on the with + the objects supplied. + + The appender + The events + + + If the supports the + interface then the will be passed + through using that interface. Otherwise the + objects in the array will be passed one at a time. + + + + + + Attaches an appender. + + The appender to add. + + + If the appender is already in the list it won't be added again. + + + + + + Gets an attached appender with the specified name. + + The name of the appender to get. + + The appender with the name specified, or null if no appender with the + specified name is found. + + + + Lookup an attached appender by name. + + + + + + Removes all attached appenders. + + + + Removes and closes all attached appenders + + + + + + Removes the specified appender from the list of attached appenders. + + The appender to remove. + The appender removed from the list + + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + + Removes the appender with the specified name from the list of appenders. + + The name of the appender to remove. + The appender removed from the list + + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + + List of appenders + + + + + Array of appenders, used to cache the m_appenderList + + + + + The fully qualified type of the AppenderAttachedImpl class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Gets all attached appenders. + + + A collection of attached appenders, or null if there + are no attached appenders. + + + + The read only collection of all currently attached appenders. + + + + + + This class aggregates several PropertiesDictionary collections together. + + + + Provides a dictionary style lookup over an ordered list of + collections. + + + Nicko Cadell + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Add a Properties Dictionary to this composite collection + + the properties to add + + + Properties dictionaries added first take precedence over dictionaries added + later. + + + + + + Flatten this composite collection into a single properties dictionary + + the flattened dictionary + + + Reduces the collection of ordered dictionaries to a single dictionary + containing the resultant values for the keys. + + + + + + Gets the value of a property + + + The value for the property with the specified key + + + + Looks up the value for the specified. + The collections are searched + in the order in which they were added to this collection. The value + returned is the value held by the first collection that contains + the specified key. + + + If none of the collections contain the specified key then + null is returned. + + + + + + Base class for Context Properties implementations + + + + This class defines a basic property get set accessor + + + Nicko Cadell + + + + Gets or sets the value of a property + + + The value for the property with the specified key + + + + Gets or sets the value of a property + + + + + + Wrapper class used to map converter names to converter types + + + + Pattern converter info class used during configuration by custom + PatternString and PatternLayer converters. + + + + + + default constructor + + + + + + + + + + + Gets or sets the name of the conversion pattern + + + + The name of the pattern in the format string + + + + + + Gets or sets the type of the converter + + + + The value specified must extend the + type. + + + + + + + + + + + Subclass of that maintains a count of + the number of bytes written. + + + + This writer counts the number of bytes written. + + + Nicko Cadell + Gert Driesen + + + + that does not leak exceptions + + + + does not throw exceptions when things go wrong. + Instead, it delegates error handling to its . + + + Nicko Cadell + Gert Driesen + + + + Adapter that extends and forwards all + messages to an instance of . + + + + Adapter that extends and forwards all + messages to an instance of . + + + Nicko Cadell + + + + The writer to forward messages to + + + + + Create an instance of that forwards all + messages to a . + + The to forward to + + + Create an instance of that forwards all + messages to a . + + + + + + Closes the writer and releases any system resources associated with the writer + + + + + + + + + Dispose this writer + + flag indicating if we are being disposed + + + Dispose this writer + + + + + + Flushes any buffered output + + + + Clears all buffers for the writer and causes any buffered data to be written + to the underlying device + + + + + + Writes a character to the wrapped TextWriter + + the value to write to the TextWriter + + + Writes a character to the wrapped TextWriter + + + + + + Writes a character buffer to the wrapped TextWriter + + the data buffer + the start index + the number of characters to write + + + Writes a character buffer to the wrapped TextWriter + + + + + + Writes a string to the wrapped TextWriter + + the value to write to the TextWriter + + + Writes a string to the wrapped TextWriter + + + + + + Gets or sets the underlying . + + + The underlying . + + + + Gets or sets the underlying . + + + + + + The Encoding in which the output is written + + + The + + + + The Encoding in which the output is written + + + + + + Gets an object that controls formatting + + + The format provider + + + + Gets an object that controls formatting + + + + + + Gets or sets the line terminator string used by the TextWriter + + + The line terminator to use + + + + Gets or sets the line terminator string used by the TextWriter + + + + + + Constructor + + the writer to actually write to + the error handler to report error to + + + Create a new QuietTextWriter using a writer and error handler + + + + + + Writes a character to the underlying writer + + the char to write + + + Writes a character to the underlying writer + + + + + + Writes a buffer to the underlying writer + + the buffer to write + the start index to write from + the number of characters to write + + + Writes a buffer to the underlying writer + + + + + + Writes a string to the output. + + The string data to write to the output. + + + Writes a string to the output. + + + + + + Closes the underlying output writer. + + + + Closes the underlying output writer. + + + + + + The error handler instance to pass all errors to + + + + + Flag to indicate if this writer is closed + + + + + Gets or sets the error handler that all errors are passed to. + + + The error handler that all errors are passed to. + + + + Gets or sets the error handler that all errors are passed to. + + + + + + Gets a value indicating whether this writer is closed. + + + true if this writer is closed, otherwise false. + + + + Gets a value indicating whether this writer is closed. + + + + + + Constructor + + The to actually write to. + The to report errors to. + + + Creates a new instance of the class + with the specified and . + + + + + + Writes a character to the underlying writer and counts the number of bytes written. + + the char to write + + + Overrides implementation of . Counts + the number of bytes written. + + + + + + Writes a buffer to the underlying writer and counts the number of bytes written. + + the buffer to write + the start index to write from + the number of characters to write + + + Overrides implementation of . Counts + the number of bytes written. + + + + + + Writes a string to the output and counts the number of bytes written. + + The string data to write to the output. + + + Overrides implementation of . Counts + the number of bytes written. + + + + + + Total number of bytes written. + + + + + Gets or sets the total number of bytes written. + + + The total number of bytes written. + + + + Gets or sets the total number of bytes written. + + + + + + A fixed size rolling buffer of logging events. + + + + An array backed fixed size leaky bucket. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + The maximum number of logging events in the buffer. + + + Initializes a new instance of the class with + the specified maximum number of buffered logging events. + + + The argument is not a positive integer. + + + + Appends a to the buffer. + + The event to append to the buffer. + The event discarded from the buffer, if the buffer is full, otherwise null. + + + Append an event to the buffer. If the buffer still contains free space then + null is returned. If the buffer is full then an event will be dropped + to make space for the new event, the event dropped is returned. + + + + + + Get and remove the oldest event in the buffer. + + The oldest logging event in the buffer + + + Gets the oldest (first) logging event in the buffer and removes it + from the buffer. + + + + + + Pops all the logging events from the buffer into an array. + + An array of all the logging events in the buffer. + + + Get all the events in the buffer and clear the buffer. + + + + + + Clear the buffer + + + + Clear the buffer of all events. The events in the buffer are lost. + + + + + + Gets the th oldest event currently in the buffer. + + The th oldest event currently in the buffer. + + + If is outside the range 0 to the number of events + currently in the buffer, then null is returned. + + + + + + Gets the maximum size of the buffer. + + The maximum size of the buffer. + + + Gets the maximum size of the buffer + + + + + + Gets the number of logging events in the buffer. + + The number of logging events in the buffer. + + + This number is guaranteed to be in the range 0 to + (inclusive). + + + + + + An always empty . + + + + A singleton implementation of the + interface that always represents an empty collection. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Uses a private access modifier to enforce the singleton pattern. + + + + + + Copies the elements of the to an + , starting at a particular Array index. + + The one-dimensional + that is the destination of the elements copied from + . The Array must have zero-based + indexing. + The zero-based index in array at which + copying begins. + + + As the collection is empty no values are copied into the array. + + + + + + Returns an enumerator that can iterate through a collection. + + + An that can be used to + iterate through the collection. + + + + As the collection is empty a is returned. + + + + + + The singleton instance of the empty collection. + + + + + Gets the singleton instance of the empty collection. + + The singleton instance of the empty collection. + + + Gets the singleton instance of the empty collection. + + + + + + Gets a value indicating if access to the is synchronized (thread-safe). + + + true if access to the is synchronized (thread-safe); otherwise, false. + + + + For the this property is always true. + + + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + As the collection is empty the is always 0. + + + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + As the collection is empty and thread safe and synchronized this instance is also + the object. + + + + + + An always empty . + + + + A singleton implementation of the + interface that always represents an empty collection. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Uses a private access modifier to enforce the singleton pattern. + + + + + + Copies the elements of the to an + , starting at a particular Array index. + + The one-dimensional + that is the destination of the elements copied from + . The Array must have zero-based + indexing. + The zero-based index in array at which + copying begins. + + + As the collection is empty no values are copied into the array. + + + + + + Returns an enumerator that can iterate through a collection. + + + An that can be used to + iterate through the collection. + + + + As the collection is empty a is returned. + + + + + + Adds an element with the provided key and value to the + . + + The to use as the key of the element to add. + The to use as the value of the element to add. + + + As the collection is empty no new values can be added. A + is thrown if this method is called. + + + This dictionary is always empty and cannot be modified. + + + + Removes all elements from the . + + + + As the collection is empty no values can be removed. A + is thrown if this method is called. + + + This dictionary is always empty and cannot be modified. + + + + Determines whether the contains an element + with the specified key. + + The key to locate in the . + false + + + As the collection is empty the method always returns false. + + + + + + Returns an enumerator that can iterate through a collection. + + + An that can be used to + iterate through the collection. + + + + As the collection is empty a is returned. + + + + + + Removes the element with the specified key from the . + + The key of the element to remove. + + + As the collection is empty no values can be removed. A + is thrown if this method is called. + + + This dictionary is always empty and cannot be modified. + + + + The singleton instance of the empty dictionary. + + + + + Gets the singleton instance of the . + + The singleton instance of the . + + + Gets the singleton instance of the . + + + + + + Gets a value indicating if access to the is synchronized (thread-safe). + + + true if access to the is synchronized (thread-safe); otherwise, false. + + + + For the this property is always true. + + + + + + Gets the number of elements contained in the + + + The number of elements contained in the . + + + + As the collection is empty the is always 0. + + + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + As the collection is empty and thread safe and synchronized this instance is also + the object. + + + + + + Gets a value indicating whether the has a fixed size. + + true + + + As the collection is empty always returns true. + + + + + + Gets a value indicating whether the is read-only. + + true + + + As the collection is empty always returns true. + + + + + + Gets an containing the keys of the . + + An containing the keys of the . + + + As the collection is empty a is returned. + + + + + + Gets an containing the values of the . + + An containing the values of the . + + + As the collection is empty a is returned. + + + + + + Gets or sets the element with the specified key. + + The key of the element to get or set. + null + + + As the collection is empty no values can be looked up or stored. + If the index getter is called then null is returned. + A is thrown if the setter is called. + + + This dictionary is always empty and cannot be modified. + + + + Contain the information obtained when parsing formatting modifiers + in conversion modifiers. + + + + Holds the formatting information extracted from the format string by + the . This is used by the + objects when rendering the output. + + + Nicko Cadell + Gert Driesen + + + + Defaut Constructor + + + + Initializes a new instance of the class. + + + + + + Constructor + + + + Initializes a new instance of the class + with the specified parameters. + + + + + + Gets or sets the minimum value. + + + The minimum value. + + + + Gets or sets the minimum value. + + + + + + Gets or sets the maximum value. + + + The maximum value. + + + + Gets or sets the maximum value. + + + + + + Gets or sets a flag indicating whether left align is enabled + or not. + + + A flag indicating whether left align is enabled or not. + + + + Gets or sets a flag indicating whether left align is enabled or not. + + + + + + Implementation of Properties collection for the + + + + This class implements a properties collection that is thread safe and supports both + storing properties and capturing a read only copy of the current propertied. + + + This class is optimized to the scenario where the properties are read frequently + and are modified infrequently. + + + Nicko Cadell + + + + The read only copy of the properties. + + + + This variable is declared volatile to prevent the compiler and JIT from + reordering reads and writes of this thread performed on different threads. + + + + + + Lock object used to synchronize updates within this instance + + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Remove a property from the global context + + the key for the entry to remove + + + Removing an entry from the global context properties is relatively expensive compared + with reading a value. + + + + + + Clear the global context properties + + + + + Get a readonly immutable copy of the properties + + the current global context properties + + + This implementation is fast because the GlobalContextProperties class + stores a readonly copy of the properties. + + + + + + Gets or sets the value of a property + + + The value for the property with the specified key + + + + Reading the value for a key is faster than setting the value. + When the value is written a new read only copy of + the properties is created. + + + + + + The static class ILogExtensions contains a set of widely used + methods that ease the interaction with the ILog interface implementations. + + + + This class contains methods for logging at different levels and checks the + properties for determining if those logging levels are enabled in the current + configuration. + + + Simple example of logging messages + + using log4net.Util; + + ILog log = LogManager.GetLogger("application-log"); + + log.InfoExt("Application Start"); + log.DebugExt("This is a debug message"); + + + + + + The fully qualified type of the Logger class. + + + + + Log a message object with the level. + + The logger on which the message is logged. + The lambda expression that gets the object to log. + + + This method first checks if this logger is INFO + enabled by reading the value property. + This check happens always and does not depend on the + implementation. If this logger is INFO enabled, then it converts + the message object (retrieved by invocation of the provided callback) to a + string by invoking the appropriate . + It then proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The logger on which the message is logged. + The lambda expression that gets the object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a message object with the level. //TODO + + Log a message object with the level. + + The logger on which the message is logged. + The message object to log. + + + This method first checks if this logger is INFO + enabled by reading the value property. + This check happens always and does not depend on the + implementation. If this logger is INFO enabled, then it converts + the message object (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The logger on which the message is logged. + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + The logger on which the message is logged. + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Log a message object with the level. + + The logger on which the message is logged. + The lambda expression that gets the object to log. + + + This method first checks if this logger is INFO + enabled by reading the value property. + This check happens always and does not depend on the + implementation. If this logger is INFO enabled, then it converts + the message object (retrieved by invocation of the provided callback) to a + string by invoking the appropriate . + It then proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The logger on which the message is logged. + The lambda expression that gets the object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a message object with the level. //TODO + + Log a message object with the level. + + The logger on which the message is logged. + The message object to log. + + + This method first checks if this logger is INFO + enabled by reading the value property. + This check happens always and does not depend on the + implementation. If this logger is INFO enabled, then it converts + the message object (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The logger on which the message is logged. + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + The logger on which the message is logged. + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Log a message object with the level. + + The logger on which the message is logged. + The lambda expression that gets the object to log. + + + This method first checks if this logger is WARN + enabled by reading the value property. + This check happens always and does not depend on the + implementation. If this logger is WARN enabled, then it converts + the message object (retrieved by invocation of the provided callback) to a + string by invoking the appropriate . + It then proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The logger on which the message is logged. + The lambda expression that gets the object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a message object with the level. //TODO + + Log a message object with the level. + + The logger on which the message is logged. + The message object to log. + + + This method first checks if this logger is WARN + enabled by reading the value property. + This check happens always and does not depend on the + implementation. If this logger is WARN enabled, then it converts + the message object (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The logger on which the message is logged. + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + The logger on which the message is logged. + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Log a message object with the level. + + The logger on which the message is logged. + The lambda expression that gets the object to log. + + + This method first checks if this logger is ERROR + enabled by reading the value property. + This check happens always and does not depend on the + implementation. If this logger is ERROR enabled, then it converts + the message object (retrieved by invocation of the provided callback) to a + string by invoking the appropriate . + It then proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The logger on which the message is logged. + The lambda expression that gets the object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a message object with the level. //TODO + + Log a message object with the level. + + The logger on which the message is logged. + The message object to log. + + + This method first checks if this logger is ERROR + enabled by reading the value property. + This check happens always and does not depend on the + implementation. If this logger is ERROR enabled, then it converts + the message object (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The logger on which the message is logged. + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + The logger on which the message is logged. + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Log a message object with the level. + + The logger on which the message is logged. + The lambda expression that gets the object to log. + + + This method first checks if this logger is FATAL + enabled by reading the value property. + This check happens always and does not depend on the + implementation. If this logger is FATAL enabled, then it converts + the message object (retrieved by invocation of the provided callback) to a + string by invoking the appropriate . + It then proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The logger on which the message is logged. + The lambda expression that gets the object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a message object with the level. //TODO + + Log a message object with the level. + + The logger on which the message is logged. + The message object to log. + + + This method first checks if this logger is FATAL + enabled by reading the value property. + This check happens always and does not depend on the + implementation. If this logger is FATAL enabled, then it converts + the message object (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The logger on which the message is logged. + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + The logger on which the message is logged. + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Manages a mapping from levels to + + + + Manages an ordered mapping from instances + to subclasses. + + + Nicko Cadell + + + + Default constructor + + + + Initialise a new instance of . + + + + + + Add a to this mapping + + the entry to add + + + If a has previously been added + for the same then that entry will be + overwritten. + + + + + + Lookup the mapping for the specified level + + the level to lookup + the for the level or null if no mapping found + + + Lookup the value for the specified level. Finds the nearest + mapping value for the level that is equal to or less than the + specified. + + + If no mapping could be found then null is returned. + + + + + + Initialize options + + + + Caches the sorted list of in an array + + + + + + Implementation of Properties collection for the + + + + Class implements a collection of properties that is specific to each thread. + The class is not synchronized as each thread has its own . + + + This class stores its properties in a slot on the named + log4net.Util.LogicalThreadContextProperties. + + + For .NET Standard 1.3 this class uses + System.Threading.AsyncLocal rather than . + + + The requires a link time + for the + . + If the calling code does not have this permission then this context will be disabled. + It will not store any property values set on it. + + + Nicko Cadell + + + + Flag used to disable this context if we don't have permission to access the CallContext. + + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Remove a property + + the key for the entry to remove + + + Remove the value for the specified from the context. + + + + + + Clear all the context properties + + + + Clear all the context properties + + + + + + Get the PropertiesDictionary stored in the LocalDataStoreSlot for this thread. + + create the dictionary if it does not exist, otherwise return null if is does not exist + the properties for this thread + + + The collection returned is only to be used on the calling thread. If the + caller needs to share the collection between different threads then the + caller must clone the collection before doings so. + + + + + + Gets the call context get data. + + The peroperties dictionary stored in the call context + + The method has a + security link demand, therfore we must put the method call in a seperate method + that we can wrap in an exception handler. + + + + + Sets the call context data. + + The properties. + + The method has a + security link demand, therfore we must put the method call in a seperate method + that we can wrap in an exception handler. + + + + + The fully qualified type of the LogicalThreadContextProperties class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Gets or sets the value of a property + + + The value for the property with the specified key + + + + Get or set the property value for the specified. + + + + + + Delegate type used for LogicalThreadContextStack's callbacks. + + + + + Implementation of Stack for the + + + + Implementation of Stack for the + + + Nicko Cadell + + + + The stack store. + + + + + The name of this within the + . + + + + + The callback used to let the register a + new instance of a . + + + + + Internal constructor + + + + Initializes a new instance of the class. + + + + + + Clears all the contextual information held in this stack. + + + + Clears all the contextual information held in this stack. + Only call this if you think that this thread is being reused after + a previous call execution which may not have completed correctly. + You do not need to use this method if you always guarantee to call + the method of the + returned from even in exceptional circumstances, + for example by using the using(log4net.LogicalThreadContext.Stacks["NDC"].Push("Stack_Message")) + syntax. + + + + + + Removes the top context from this stack. + + The message in the context that was removed from the top of this stack. + + + Remove the top context from this stack, and return + it to the caller. If this stack is empty then an + empty string (not ) is returned. + + + + + + Pushes a new context message into this stack. + + The new context message. + + An that can be used to clean up the context stack. + + + + Pushes a new context onto this stack. An + is returned that can be used to clean up this stack. This + can be easily combined with the using keyword to scope the + context. + + + Simple example of using the Push method with the using keyword. + + using(log4net.LogicalThreadContext.Stacks["NDC"].Push("Stack_Message")) + { + log.Warn("This should have an ThreadContext Stack message"); + } + + + + + + Gets the current context information for this stack. + + The current context information. + + + + Gets the current context information for this stack. + + Gets the current context information + + + Gets the current context information for this stack. + + + + + + Get a portable version of this object + + the portable instance of this object + + + Get a cross thread portable version of this object + + + + + + The number of messages in the stack + + + The current number of messages in the stack + + + + The current number of messages in the stack. That is + the number of times has been called + minus the number of times has been called. + + + + + + Gets and sets the internal stack used by this + + The internal storage stack + + + This property is provided only to support backward compatability + of the . Tytpically the internal stack should not + be modified. + + + + + + Inner class used to represent a single context frame in the stack. + + + + Inner class used to represent a single context frame in the stack. + + + + + + Constructor + + The message for this context. + The parent context in the chain. + + + Initializes a new instance of the class + with the specified message and parent context. + + + + + + Get the message. + + The message. + + + Get the message. + + + + + + Gets the full text of the context down to the root level. + + + The full text of the context down to the root level. + + + + Gets the full text of the context down to the root level. + + + + + + Struct returned from the method. + + + + This struct implements the and is designed to be used + with the pattern to remove the stack frame at the end of the scope. + + + + + + The depth to trim the stack to when this instance is disposed + + + + + The outer LogicalThreadContextStack. + + + + + Constructor + + The internal stack used by the ThreadContextStack. + The depth to return the stack to when this object is disposed. + + + Initializes a new instance of the class with + the specified stack and return depth. + + + + + + Returns the stack to the correct depth. + + + + Returns the stack to the correct depth. + + + + + + Implementation of Stacks collection for the + + + + Implementation of Stacks collection for the + + + Nicko Cadell + + + + Internal constructor + + + + Initializes a new instance of the class. + + + + + + The fully qualified type of the ThreadContextStacks class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Gets the named thread context stack + + + The named stack + + + + Gets the named thread context stack + + + + + + + + + + + + + Outputs log statements from within the log4net assembly. + + + + Log4net components cannot make log4net logging calls. However, it is + sometimes useful for the user to learn about what log4net is + doing. + + + All log4net internal debug calls go to the standard output stream + whereas internal error messages are sent to the standard error output + stream. + + + Nicko Cadell + Gert Driesen + + + + Formats Prefix, Source, and Message in the same format as the value + sent to Console.Out and Trace.Write. + + + + + + Initializes a new instance of the class. + + + + + + + + + Static constructor that initializes logging by reading + settings from the application configuration file. + + + + The log4net.Internal.Debug application setting + controls internal debugging. This setting should be set + to true to enable debugging. + + + The log4net.Internal.Quiet application setting + suppresses all internal logging including error messages. + This setting should be set to true to enable message + suppression. + + + + + + Raises the LogReceived event when an internal messages is received. + + + + + + + + + Writes log4net internal debug messages to the + standard output stream. + + + The message to log. + + + All internal debug messages are prepended with + the string "log4net: ". + + + + + + Writes log4net internal debug messages to the + standard output stream. + + The Type that generated this message. + The message to log. + An exception to log. + + + All internal debug messages are prepended with + the string "log4net: ". + + + + + + Writes log4net internal warning messages to the + standard error stream. + + The Type that generated this message. + The message to log. + + + All internal warning messages are prepended with + the string "log4net:WARN ". + + + + + + Writes log4net internal warning messages to the + standard error stream. + + The Type that generated this message. + The message to log. + An exception to log. + + + All internal warning messages are prepended with + the string "log4net:WARN ". + + + + + + Writes log4net internal error messages to the + standard error stream. + + The Type that generated this message. + The message to log. + + + All internal error messages are prepended with + the string "log4net:ERROR ". + + + + + + Writes log4net internal error messages to the + standard error stream. + + The Type that generated this message. + The message to log. + An exception to log. + + + All internal debug messages are prepended with + the string "log4net:ERROR ". + + + + + + Writes output to the standard output stream. + + The message to log. + + + Writes to both Console.Out and System.Diagnostics.Trace. + Note that the System.Diagnostics.Trace is not supported + on the Compact Framework. + + + If the AppDomain is not configured with a config file then + the call to System.Diagnostics.Trace may fail. This is only + an issue if you are programmatically creating your own AppDomains. + + + + + + Writes output to the standard error stream. + + The message to log. + + + Writes to both Console.Error and System.Diagnostics.Trace. + Note that the System.Diagnostics.Trace is not supported + on the Compact Framework. + + + If the AppDomain is not configured with a config file then + the call to System.Diagnostics.Trace may fail. This is only + an issue if you are programmatically creating your own AppDomains. + + + + + + Default debug level + + + + + In quietMode not even errors generate any output. + + + + + The event raised when an internal message has been received. + + + + + The Type that generated the internal message. + + + + + The DateTime stamp of when the internal message was received. + + + + + The UTC DateTime stamp of when the internal message was received. + + + + + A string indicating the severity of the internal message. + + + "log4net: ", + "log4net:ERROR ", + "log4net:WARN " + + + + + The internal log message. + + + + + The Exception related to the message. + + + Optional. Will be null if no Exception was passed. + + + + + Gets or sets a value indicating whether log4net internal logging + is enabled or disabled. + + + true if log4net internal logging is enabled, otherwise + false. + + + + When set to true, internal debug level logging will be + displayed. + + + This value can be set by setting the application setting + log4net.Internal.Debug in the application configuration + file. + + + The default value is false, i.e. debugging is + disabled. + + + + + The following example enables internal debugging using the + application configuration file : + + + + + + + + + + + + + Gets or sets a value indicating whether log4net should generate no output + from internal logging, not even for errors. + + + true if log4net should generate no output at all from internal + logging, otherwise false. + + + + When set to true will cause internal logging at all levels to be + suppressed. This means that no warning or error reports will be logged. + This option overrides the setting and + disables all debug also. + + This value can be set by setting the application setting + log4net.Internal.Quiet in the application configuration file. + + + The default value is false, i.e. internal logging is not + disabled. + + + + The following example disables internal logging using the + application configuration file : + + + + + + + + + + + + + + + + + Test if LogLog.Debug is enabled for output. + + + true if Debug is enabled + + + + Test if LogLog.Debug is enabled for output. + + + + + + Test if LogLog.Warn is enabled for output. + + + true if Warn is enabled + + + + Test if LogLog.Warn is enabled for output. + + + + + + Test if LogLog.Error is enabled for output. + + + true if Error is enabled + + + + Test if LogLog.Error is enabled for output. + + + + + + Subscribes to the LogLog.LogReceived event and stores messages + to the supplied IList instance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Represents a native error code and message. + + + + Represents a Win32 platform native error. + + + Nicko Cadell + Gert Driesen + + + + Create an instance of the class with the specified + error number and message. + + The number of the native error. + The message of the native error. + + + Create an instance of the class with the specified + error number and message. + + + + + + Create a new instance of the class for the last Windows error. + + + An instance of the class for the last windows error. + + + + The message for the error number is lookup up using the + native Win32 FormatMessage function. + + + + + + Create a new instance of the class. + + the error number for the native error + + An instance of the class for the specified + error number. + + + + The message for the specified error number is lookup up using the + native Win32 FormatMessage function. + + + + + + Retrieves the message corresponding with a Win32 message identifier. + + Message identifier for the requested message. + + The message corresponding with the specified message identifier. + + + + The message will be searched for in system message-table resource(s) + using the native FormatMessage function. + + + + + + Return error information string + + error information string + + + Return error information string + + + + + + Formats a message string. + + Formatting options, and how to interpret the parameter. + Location of the message definition. + Message identifier for the requested message. + Language identifier for the requested message. + If includes FORMAT_MESSAGE_ALLOCATE_BUFFER, the function allocates a buffer using the LocalAlloc function, and places the pointer to the buffer at the address specified in . + If the FORMAT_MESSAGE_ALLOCATE_BUFFER flag is not set, this parameter specifies the maximum number of TCHARs that can be stored in the output buffer. If FORMAT_MESSAGE_ALLOCATE_BUFFER is set, this parameter specifies the minimum number of TCHARs to allocate for an output buffer. + Pointer to an array of values that are used as insert values in the formatted message. + + + The function requires a message definition as input. The message definition can come from a + buffer passed into the function. It can come from a message table resource in an + already-loaded module. Or the caller can ask the function to search the system's message + table resource(s) for the message definition. The function finds the message definition + in a message table resource based on a message identifier and a language identifier. + The function copies the formatted message text to an output buffer, processing any embedded + insert sequences if requested. + + + To prevent the usage of unsafe code, this stub does not support inserting values in the formatted message. + + + + + If the function succeeds, the return value is the number of TCHARs stored in the output + buffer, excluding the terminating null character. + + + If the function fails, the return value is zero. To get extended error information, + call . + + + + + + Gets the number of the native error. + + + The number of the native error. + + + + Gets the number of the native error. + + + + + + Gets the message of the native error. + + + The message of the native error. + + + + + Gets the message of the native error. + + + + + An always empty . + + + + A singleton implementation of the over a collection + that is empty and not modifiable. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Uses a private access modifier to enforce the singleton pattern. + + + + + + Test if the enumerator can advance, if so advance. + + false as the cannot advance. + + + As the enumerator is over an empty collection its + value cannot be moved over a valid position, therefore + will always return false. + + + + + + Resets the enumerator back to the start. + + + + As the enumerator is over an empty collection does nothing. + + + + + + The singleton instance of the . + + + + + Gets the singleton instance of the . + + The singleton instance of the . + + + Gets the singleton instance of the . + + + + + + Gets the current object from the enumerator. + + + Throws an because the + never has a current value. + + + + As the enumerator is over an empty collection its + value cannot be moved over a valid position, therefore + will throw an . + + + The collection is empty and + cannot be positioned over a valid location. + + + + Gets the current key from the enumerator. + + + Throws an exception because the + never has a current value. + + + + As the enumerator is over an empty collection its + value cannot be moved over a valid position, therefore + will throw an . + + + The collection is empty and + cannot be positioned over a valid location. + + + + Gets the current value from the enumerator. + + The current value from the enumerator. + + Throws an because the + never has a current value. + + + + As the enumerator is over an empty collection its + value cannot be moved over a valid position, therefore + will throw an . + + + The collection is empty and + cannot be positioned over a valid location. + + + + Gets the current entry from the enumerator. + + + Throws an because the + never has a current entry. + + + + As the enumerator is over an empty collection its + value cannot be moved over a valid position, therefore + will throw an . + + + The collection is empty and + cannot be positioned over a valid location. + + + + An always empty . + + + + A singleton implementation of the over a collection + that is empty and not modifiable. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Uses a private access modifier to enforce the singleton pattern. + + + + + + Test if the enumerator can advance, if so advance + + false as the cannot advance. + + + As the enumerator is over an empty collection its + value cannot be moved over a valid position, therefore + will always return false. + + + + + + Resets the enumerator back to the start. + + + + As the enumerator is over an empty collection does nothing. + + + + + + The singleton instance of the . + + + + + Get the singleton instance of the . + + The singleton instance of the . + + + Gets the singleton instance of the . + + + + + + Gets the current object from the enumerator. + + + Throws an because the + never has a current value. + + + + As the enumerator is over an empty collection its + value cannot be moved over a valid position, therefore + will throw an . + + + The collection is empty and + cannot be positioned over a valid location. + + + + A SecurityContext used when a SecurityContext is not required + + + + The is a no-op implementation of the + base class. It is used where a + is required but one has not been provided. + + + Nicko Cadell + + + + Singleton instance of + + + + Singleton instance of + + + + + + Private constructor + + + + Private constructor for singleton pattern. + + + + + + Impersonate this SecurityContext + + State supplied by the caller + null + + + No impersonation is done and null is always returned. + + + + + + Implements log4net's default error handling policy which consists + of emitting a message for the first error in an appender and + ignoring all subsequent errors. + + + + The error message is processed using the LogLog sub-system by default. + + + This policy aims at protecting an otherwise working application + from being flooded with error messages when logging fails. + + + Nicko Cadell + Gert Driesen + Ron Grabowski + + + + Default Constructor + + + + Initializes a new instance of the class. + + + + + + Constructor + + The prefix to use for each message. + + + Initializes a new instance of the class + with the specified prefix. + + + + + + Reset the error handler back to its initial disabled state. + + + + + Log an Error + + The error message. + The exception. + The internal error code. + + + Invokes if and only if this is the first error or the first error after has been called. + + + + + + Log the very first error + + The error message. + The exception. + The internal error code. + + + Sends the error information to 's Error method. + + + + + + Log an Error + + The error message. + The exception. + + + Invokes if and only if this is the first error or the first error after has been called. + + + + + + Log an error + + The error message. + + + Invokes if and only if this is the first error or the first error after has been called. + + + + + + The UTC date the error was recorded. + + + + + Flag to indicate if it is the first error + + + + + The message recorded during the first error. + + + + + The exception recorded during the first error. + + + + + The error code recorded during the first error. + + + + + String to prefix each message with + + + + + The fully qualified type of the OnlyOnceErrorHandler class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Is error logging enabled + + + + Is error logging enabled. Logging is only enabled for the + first error delivered to the . + + + + + + The date the first error that trigged this error handler occurred, or if it has not been triggered. + + + + + The UTC date the first error that trigged this error handler occured, or if it has not been triggered. + + + + + The message from the first error that trigged this error handler. + + + + + The exception from the first error that trigged this error handler. + + + May be . + + + + + The error code from the first error that trigged this error handler. + + + Defaults to + + + + + A convenience class to convert property values to specific types. + + + + Utility functions for converting types and parsing values. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Uses a private access modifier to prevent instantiation of this class. + + + + + + Converts a string to a value. + + String to convert. + The default value. + The value of . + + + If is "true", then true is returned. + If is "false", then false is returned. + Otherwise, is returned. + + + + + + Parses a file size into a number. + + String to parse. + The default value. + The value of . + + + Parses a file size of the form: number[KB|MB|GB] into a + long value. It is scaled with the appropriate multiplier. + + + is returned when + cannot be converted to a value. + + + + + + Converts a string to an object. + + The target type to convert to. + The string to convert to an object. + + The object converted from a string or null when the + conversion failed. + + + + Converts a string to an object. Uses the converter registry to try + to convert the string value into the specified target type. + + + + + + Checks if there is an appropriate type conversion from the source type to the target type. + + The type to convert from. + The type to convert to. + true if there is a conversion from the source type to the target type. + + Checks if there is an appropriate type conversion from the source type to the target type. + + + + + + + Converts an object to the target type. + + The object to convert to the target type. + The type to convert to. + The converted object. + + + Converts an object to the target type. + + + + + + Instantiates an object given a class name. + + The fully qualified class name of the object to instantiate. + The class to which the new object should belong. + The object to return in case of non-fulfillment. + + An instance of the or + if the object could not be instantiated. + + + + Checks that the is a subclass of + . If that test fails or the object could + not be instantiated, then is returned. + + + + + + Performs variable substitution in string from the + values of keys found in . + + The string on which variable substitution is performed. + The dictionary to use to lookup variables. + The result of the substitutions. + + + The variable substitution delimiters are ${ and }. + + + For example, if props contains key=value, then the call + + + + string s = OptionConverter.SubstituteVariables("Value of key is ${key}."); + + + + will set the variable s to "Value of key is value.". + + + If no value could be found for the specified key, then substitution + defaults to an empty string. + + + For example, if system properties contains no value for the key + "nonExistentKey", then the call + + + + string s = OptionConverter.SubstituteVariables("Value of nonExistentKey is [${nonExistentKey}]"); + + + + will set s to "Value of nonExistentKey is []". + + + An Exception is thrown if contains a start + delimiter "${" which is not balanced by a stop delimiter "}". + + + + + + Converts the string representation of the name or numeric value of one or + more enumerated constants to an equivalent enumerated object. + + The type to convert to. + The enum string value. + If true, ignore case; otherwise, regard case. + An object of type whose value is represented by . + + + + The fully qualified type of the OptionConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Most of the work of the class + is delegated to the PatternParser class. + + + + The PatternParser processes a pattern string and + returns a chain of objects. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + The pattern to parse. + + + Initializes a new instance of the class + with the specified pattern string. + + + + + + Parses the pattern into a chain of pattern converters. + + The head of a chain of pattern converters. + + + Parses the pattern into a chain of pattern converters. + + + + + + Build the unified cache of converters from the static and instance maps + + the list of all the converter names + + + Build the unified cache of converters from the static and instance maps + + + + + + Internal method to parse the specified pattern to find specified matches + + the pattern to parse + the converter names to match in the pattern + + + The matches param must be sorted such that longer strings come before shorter ones. + + + + + + Process a parsed literal + + the literal text + + + + Process a parsed converter pattern + + the name of the converter + the optional option for the converter + the formatting info for the converter + + + + Resets the internal state of the parser and adds the specified pattern converter + to the chain. + + The pattern converter to add. + + + + The first pattern converter in the chain + + + + + the last pattern converter in the chain + + + + + The pattern + + + + + Internal map of converter identifiers to converter types + + + + This map overrides the static s_globalRulesRegistry map. + + + + + + The fully qualified type of the PatternParser class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Get the converter registry used by this parser + + + The converter registry used by this parser + + + + Get the converter registry used by this parser + + + + + + Sort strings by length + + + + that orders strings by string length. + The longest strings are placed first + + + + + + This class implements a patterned string. + + + + This string has embedded patterns that are resolved and expanded + when the string is formatted. + + + This class functions similarly to the + in that it accepts a pattern and renders it to a string. Unlike the + however the PatternString + does not render the properties of a specific but + of the process in general. + + + The recognized conversion pattern names are: + + + + Conversion Pattern Name + Effect + + + appdomain + + + Used to output the friendly name of the current AppDomain. + + + + + appsetting + + + Used to output the value of a specific appSetting key in the application + configuration file. + + + + + date + + + Used to output the current date and time in the local time zone. + To output the date in universal time use the %utcdate pattern. + The date conversion + specifier may be followed by a date format specifier enclosed + between braces. For example, %date{HH:mm:ss,fff} or + %date{dd MMM yyyy HH:mm:ss,fff}. If no date format specifier is + given then ISO8601 format is + assumed (). + + + The date format specifier admits the same syntax as the + time pattern string of the . + + + For better results it is recommended to use the log4net date + formatters. These can be specified using one of the strings + "ABSOLUTE", "DATE" and "ISO8601" for specifying + , + and respectively + . For example, + %date{ISO8601} or %date{ABSOLUTE}. + + + These dedicated date formatters perform significantly + better than . + + + + + env + + + Used to output the a specific environment variable. The key to + lookup must be specified within braces and directly following the + pattern specifier, e.g. %env{COMPUTERNAME} would include the value + of the COMPUTERNAME environment variable. + + + The env pattern is not supported on the .NET Compact Framework. + + + + + identity + + + Used to output the user name for the currently active user + (Principal.Identity.Name). + + + + + newline + + + Outputs the platform dependent line separator character or + characters. + + + This conversion pattern name offers the same performance as using + non-portable line separator strings such as "\n", or "\r\n". + Thus, it is the preferred way of specifying a line separator. + + + + + processid + + + Used to output the system process ID for the current process. + + + + + property + + + Used to output a specific context property. The key to + lookup must be specified within braces and directly following the + pattern specifier, e.g. %property{user} would include the value + from the property that is keyed by the string 'user'. Each property value + that is to be included in the log must be specified separately. + Properties are stored in logging contexts. By default + the log4net:HostName property is set to the name of machine on + which the event was originally logged. + + + If no key is specified, e.g. %property then all the keys and their + values are printed in a comma separated list. + + + The properties of an event are combined from a number of different + contexts. These are listed below in the order in which they are searched. + + + + the thread properties + + The that are set on the current + thread. These properties are shared by all events logged on this thread. + + + + the global properties + + The that are set globally. These + properties are shared by all the threads in the AppDomain. + + + + + + + random + + + Used to output a random string of characters. The string is made up of + uppercase letters and numbers. By default the string is 4 characters long. + The length of the string can be specified within braces directly following the + pattern specifier, e.g. %random{8} would output an 8 character string. + + + + + username + + + Used to output the WindowsIdentity for the currently + active user. + + + + + utcdate + + + Used to output the date of the logging event in universal time. + The date conversion + specifier may be followed by a date format specifier enclosed + between braces. For example, %utcdate{HH:mm:ss,fff} or + %utcdate{dd MMM yyyy HH:mm:ss,fff}. If no date format specifier is + given then ISO8601 format is + assumed (). + + + The date format specifier admits the same syntax as the + time pattern string of the . + + + For better results it is recommended to use the log4net date + formatters. These can be specified using one of the strings + "ABSOLUTE", "DATE" and "ISO8601" for specifying + , + and respectively + . For example, + %utcdate{ISO8601} or %utcdate{ABSOLUTE}. + + + These dedicated date formatters perform significantly + better than . + + + + + % + + + The sequence %% outputs a single percent sign. + + + + + + Additional pattern converters may be registered with a specific + instance using or + . + + + See the for details on the + format modifiers supported by the patterns. + + + Nicko Cadell + + + + Internal map of converter identifiers to converter types. + + + + + the pattern + + + + + the head of the pattern converter chain + + + + + patterns defined on this PatternString only + + + + + Initialize the global registry + + + + + Default constructor + + + + Initialize a new instance of + + + + + + Constructs a PatternString + + The pattern to use with this PatternString + + + Initialize a new instance of with the pattern specified. + + + + + + Initialize object options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Create the used to parse the pattern + + the pattern to parse + The + + + Returns PatternParser used to parse the conversion string. Subclasses + may override this to return a subclass of PatternParser which recognize + custom conversion pattern name. + + + + + + Produces a formatted string as specified by the conversion pattern. + + The TextWriter to write the formatted event to + + + Format the pattern to the . + + + + + + Format the pattern as a string + + the pattern formatted as a string + + + Format the pattern to a string. + + + + + + Add a converter to this PatternString + + the converter info + + + This version of the method is used by the configurator. + Programmatic users should use the alternative method. + + + + + + Add a converter to this PatternString + + the name of the conversion pattern for this converter + the type of the converter + + + Add a converter to this PatternString + + + + + + Gets or sets the pattern formatting string + + + The pattern formatting string + + + + The ConversionPattern option. This is the string which + controls formatting and consists of a mix of literal content and + conversion specifiers. + + + + + + String keyed object map. + + + + While this collection is serializable only member + objects that are serializable will + be serialized along with this collection. + + + Nicko Cadell + Gert Driesen + + + + String keyed object map that is read only. + + + + This collection is readonly and cannot be modified. + + + While this collection is serializable only member + objects that are serializable will + be serialized along with this collection. + + + Nicko Cadell + Gert Driesen + + + + The Hashtable used to store the properties data + + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Copy Constructor + + properties to copy + + + Initializes a new instance of the class. + + + + + + Deserialization constructor + + The that holds the serialized object data. + The that contains contextual information about the source or destination. + + + Initializes a new instance of the class + with serialized data. + + + + + + Gets the key names. + + An array of all the keys. + + + Gets the key names. + + + + + + Test if the dictionary contains a specified key + + the key to look for + true if the dictionary contains the specified key + + + Test if the dictionary contains a specified key + + + + + + Serializes this object into the provided. + + The to populate with data. + The destination for this serialization. + + + Serializes this object into the provided. + + + + + + See + + + + + See + + + + + + See + + + + + + + Remove all properties from the properties collection + + + + + See + + + + + + + See + + + + + + + See + + + + + Gets or sets the value of the property with the specified key. + + + The value of the property with the specified key. + + The key of the property to get or set. + + + The property value will only be serialized if it is serializable. + If it cannot be serialized it will be silently ignored if + a serialization operation is performed. + + + + + + The hashtable used to store the properties + + + The internal collection used to store the properties + + + + The hashtable used to store the properties + + + + + + See + + + + + See + + + + + See + + + + + See + + + + + See + + + + + See + + + + + The number of properties in this collection + + + + + See + + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Constructor + + properties to copy + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class + with serialized data. + + The that holds the serialized object data. + The that contains contextual information about the source or destination. + + + Because this class is sealed the serialization constructor is private. + + + + + + Remove the entry with the specified key from this dictionary + + the key for the entry to remove + + + Remove the entry with the specified key from this dictionary + + + + + + See + + an enumerator + + + Returns a over the contest of this collection. + + + + + + See + + the key to remove + + + Remove the entry with the specified key from this dictionary + + + + + + See + + the key to lookup in the collection + true if the collection contains the specified key + + + Test if this collection contains a specified key. + + + + + + Remove all properties from the properties collection + + + + Remove all properties from the properties collection + + + + + + See + + the key + the value to store for the key + + + Store a value for the specified . + + + Thrown if the is not a string + + + + See + + + + + + + See + + + + + Gets or sets the value of the property with the specified key. + + + The value of the property with the specified key. + + The key of the property to get or set. + + + The property value will only be serialized if it is serializable. + If it cannot be serialized it will be silently ignored if + a serialization operation is performed. + + + + + + See + + + false + + + + This collection is modifiable. This property always + returns false. + + + + + + See + + + The value for the key specified. + + + + Get or set a value for the specified . + + + Thrown if the is not a string + + + + See + + + + + See + + + + + See + + + + + See + + + + + See + + + + + A class to hold the key and data for a property set in the config file + + + + A class to hold the key and data for a property set in the config file + + + + + + Override Object.ToString to return sensible debug info + + string info about this object + + + + Property Key + + + Property Key + + + + Property Key. + + + + + + Property Value + + + Property Value + + + + Property Value. + + + + + + A that ignores the message + + + + This writer is used in special cases where it is necessary + to protect a writer from being closed by a client. + + + Nicko Cadell + + + + Constructor + + the writer to actually write to + + + Create a new ProtectCloseTextWriter using a writer + + + + + + Attach this instance to a different underlying + + the writer to attach to + + + Attach this instance to a different underlying + + + + + + Does not close the underlying output writer. + + + + Does not close the underlying output writer. + This method does nothing. + + + + + + Defines a lock that supports single writers and multiple readers + + + + ReaderWriterLock is used to synchronize access to a resource. + At any given time, it allows either concurrent read access for + multiple threads, or write access for a single thread. In a + situation where a resource is changed infrequently, a + ReaderWriterLock provides better throughput than a simple + one-at-a-time lock, such as . + + + If a platform does not support a System.Threading.ReaderWriterLock + implementation then all readers and writers are serialized. Therefore + the caller must not rely on multiple simultaneous readers. + + + Nicko Cadell + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Acquires a reader lock + + + + blocks if a different thread has the writer + lock, or if at least one thread is waiting for the writer lock. + + + + + + Decrements the lock count + + + + decrements the lock count. When the count + reaches zero, the lock is released. + + + + + + Acquires the writer lock + + + + This method blocks if another thread has a reader lock or writer lock. + + + + + + Decrements the lock count on the writer lock + + + + ReleaseWriterLock decrements the writer lock count. + When the count reaches zero, the writer lock is released. + + + + + + A that can be and reused + + + + A that can be and reused. + This uses a single buffer for string operations. + + + Nicko Cadell + + + + Create an instance of + + the format provider to use + + + Create an instance of + + + + + + Override Dispose to prevent closing of writer + + flag + + + Override Dispose to prevent closing of writer + + + + + + Reset this string writer so that it can be reused. + + the maximum buffer capacity before it is trimmed + the default size to make the buffer + + + Reset this string writer so that it can be reused. + The internal buffers are cleared and reset. + + + + + + Utility class for system specific information. + + + + Utility class of static methods for system specific information. + + + Nicko Cadell + Gert Driesen + Alexey Solofnenko + + + + Private constructor to prevent instances. + + + + Only static methods are exposed from this type. + + + + + + Initialize default values for private static fields. + + + + Only static methods are exposed from this type. + + + + + + Gets the assembly location path for the specified assembly. + + The assembly to get the location for. + The location of the assembly. + + + This method does not guarantee to return the correct path + to the assembly. If only tries to give an indication as to + where the assembly was loaded from. + + + + + + Gets the fully qualified name of the , including + the name of the assembly from which the was + loaded. + + The to get the fully qualified name for. + The fully qualified name for the . + + + This is equivalent to the Type.AssemblyQualifiedName property, + but this method works on the .NET Compact Framework 1.0 as well as + the full .NET runtime. + + + + + + Gets the short name of the . + + The to get the name for. + The short name of the . + + + The short name of the assembly is the + without the version, culture, or public key. i.e. it is just the + assembly's file name without the extension. + + + Use this rather than Assembly.GetName().Name because that + is not available on the Compact Framework. + + + Because of a FileIOPermission security demand we cannot do + the obvious Assembly.GetName().Name. We are allowed to get + the of the assembly so we + start from there and strip out just the assembly name. + + + + + + Gets the file name portion of the , including the extension. + + The to get the file name for. + The file name of the assembly. + + + Gets the file name portion of the , including the extension. + + + + + + Loads the type specified in the type string. + + A sibling type to use to load the type. + The name of the type to load. + Flag set to true to throw an exception if the type cannot be loaded. + true to ignore the case of the type name; otherwise, false + The type loaded or null if it could not be loaded. + + + If the type name is fully qualified, i.e. if contains an assembly name in + the type name, the type will be loaded from the system using + . + + + If the type name is not fully qualified, it will be loaded from the assembly + containing the specified relative type. If the type is not found in the assembly + then all the loaded assemblies will be searched for the type. + + + + + + Loads the type specified in the type string. + + The name of the type to load. + Flag set to true to throw an exception if the type cannot be loaded. + true to ignore the case of the type name; otherwise, false + The type loaded or null if it could not be loaded. + + + If the type name is fully qualified, i.e. if contains an assembly name in + the type name, the type will be loaded from the system using + . + + + If the type name is not fully qualified it will be loaded from the + assembly that is directly calling this method. If the type is not found + in the assembly then all the loaded assemblies will be searched for the type. + + + + + + Loads the type specified in the type string. + + An assembly to load the type from. + The name of the type to load. + Flag set to true to throw an exception if the type cannot be loaded. + true to ignore the case of the type name; otherwise, false + The type loaded or null if it could not be loaded. + + + If the type name is fully qualified, i.e. if contains an assembly name in + the type name, the type will be loaded from the system using + . + + + If the type name is not fully qualified it will be loaded from the specified + assembly. If the type is not found in the assembly then all the loaded assemblies + will be searched for the type. + + + + + + Generate a new guid + + A new Guid + + + Generate a new guid + + + + + + Create an + + The name of the parameter that caused the exception + The value of the argument that causes this exception + The message that describes the error + the ArgumentOutOfRangeException object + + + Create a new instance of the class + with a specified error message, the parameter name, and the value + of the argument. + + + The Compact Framework does not support the 3 parameter constructor for the + type. This method provides an + implementation that works for all platforms. + + + + + + Parse a string into an value + + the string to parse + out param where the parsed value is placed + true if the string was able to be parsed into an integer + + + Attempts to parse the string into an integer. If the string cannot + be parsed then this method returns false. The method does not throw an exception. + + + + + + Parse a string into an value + + the string to parse + out param where the parsed value is placed + true if the string was able to be parsed into an integer + + + Attempts to parse the string into an integer. If the string cannot + be parsed then this method returns false. The method does not throw an exception. + + + + + + Parse a string into an value + + the string to parse + out param where the parsed value is placed + true if the string was able to be parsed into an integer + + + Attempts to parse the string into an integer. If the string cannot + be parsed then this method returns false. The method does not throw an exception. + + + + + + Lookup an application setting + + the application settings key to lookup + the value for the key, or null + + + Configuration APIs are not supported under the Compact Framework + + + + + + Convert a path into a fully qualified local file path. + + The path to convert. + The fully qualified path. + + + Converts the path specified to a fully + qualified path. If the path is relative it is + taken as relative from the application base + directory. + + + The path specified must be a local file path, a URI is not supported. + + + + + + Creates a new case-insensitive instance of the class with the default initial capacity. + + A new case-insensitive instance of the class with the default initial capacity + + + The new Hashtable instance uses the default load factor, the CaseInsensitiveHashCodeProvider, and the CaseInsensitiveComparer. + + + + + + Tests two strings for equality, the ignoring case. + + + If the platform permits, culture information is ignored completely (ordinal comparison). + The aim of this method is to provide a fast comparison that deals with null and ignores different casing. + It is not supposed to deal with various, culture-specific habits. + Use it to compare against pure ASCII constants, like keywords etc. + + The one string. + The other string. + true if the strings are equal, false otherwise. + + + + Gets an empty array of types. + + + + The Type.EmptyTypes field is not available on + the .NET Compact Framework 1.0. + + + + + + The fully qualified type of the SystemInfo class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Cache the host name for the current machine + + + + + Cache the application friendly name + + + + + Text to output when a null is encountered. + + + + + Text to output when an unsupported feature is requested. + + + + + Start time for the current process. + + + + + Gets the system dependent line terminator. + + + The system dependent line terminator. + + + + Gets the system dependent line terminator. + + + + + + Gets the base directory for this . + + The base directory path for the current . + + + Gets the base directory for this . + + + The value returned may be either a local file path or a URI. + + + + + + Gets the path to the configuration file for the current . + + The path to the configuration file for the current . + + + The .NET Compact Framework 1.0 does not have a concept of a configuration + file. For this runtime, we use the entry assembly location as the root for + the configuration file name. + + + The value returned may be either a local file path or a URI. + + + + + + Gets the path to the file that first executed in the current . + + The path to the entry assembly. + + + Gets the path to the file that first executed in the current . + + + + + + Gets the ID of the current thread. + + The ID of the current thread. + + + On the .NET framework, the AppDomain.GetCurrentThreadId method + is used to obtain the thread ID for the current thread. This is the + operating system ID for the thread. + + + On the .NET Compact Framework 1.0 it is not possible to get the + operating system thread ID for the current thread. The native method + GetCurrentThreadId is implemented inline in a header file + and cannot be called. + + + On the .NET Framework 2.0 the Thread.ManagedThreadId is used as this + gives a stable id unrelated to the operating system thread ID which may + change if the runtime is using fibers. + + + + + + Get the host name or machine name for the current machine + + + The hostname or machine name + + + + Get the host name or machine name for the current machine + + + The host name () or + the machine name (Environment.MachineName) for + the current machine, or if neither of these are available + then NOT AVAILABLE is returned. + + + + + + Get this application's friendly name + + + The friendly name of this application as a string + + + + If available the name of the application is retrieved from + the AppDomain using AppDomain.CurrentDomain.FriendlyName. + + + Otherwise the file name of the entry assembly is used. + + + + + + Get the start time for the current process. + + + + This is the time at which the log4net library was loaded into the + AppDomain. Due to reports of a hang in the call to System.Diagnostics.Process.StartTime + this is not the start time for the current process. + + + The log4net library should be loaded by an application early during its + startup, therefore this start time should be a good approximation for + the actual start time. + + + Note that AppDomains may be loaded and unloaded within the + same process without the process terminating, however this start time + will be set per AppDomain. + + + + + + Get the UTC start time for the current process. + + + + This is the UTC time at which the log4net library was loaded into the + AppDomain. Due to reports of a hang in the call to System.Diagnostics.Process.StartTime + this is not the start time for the current process. + + + The log4net library should be loaded by an application early during its + startup, therefore this start time should be a good approximation for + the actual start time. + + + Note that AppDomains may be loaded and unloaded within the + same process without the process terminating, however this start time + will be set per AppDomain. + + + + + + Text to output when a null is encountered. + + + + Use this value to indicate a null has been encountered while + outputting a string representation of an item. + + + The default value is (null). This value can be overridden by specifying + a value for the log4net.NullText appSetting in the application's + .config file. + + + + + + Text to output when an unsupported feature is requested. + + + + Use this value when an unsupported feature is requested. + + + The default value is NOT AVAILABLE. This value can be overridden by specifying + a value for the log4net.NotAvailableText appSetting in the application's + .config file. + + + + + + Utility class that represents a format string. + + + + Utility class that represents a format string. + + + Nicko Cadell + + + + Initialise the + + An that supplies culture-specific formatting information. + A containing zero or more format items. + An array containing zero or more objects to format. + + + + Format the string and arguments + + the formatted string + + + + Replaces the format item in a specified with the text equivalent + of the value of a corresponding instance in a specified array. + A specified parameter supplies culture-specific formatting information. + + An that supplies culture-specific formatting information. + A containing zero or more format items. + An array containing zero or more objects to format. + + A copy of format in which the format items have been replaced by the + equivalent of the corresponding instances of in args. + + + + This method does not throw exceptions. If an exception thrown while formatting the result the + exception and arguments are returned in the result string. + + + + + + Process an error during StringFormat + + + + + Dump the contents of an array into a string builder + + + + + Dump an object to a string + + + + + The fully qualified type of the SystemStringFormat class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Implementation of Properties collection for the + + + + Class implements a collection of properties that is specific to each thread. + The class is not synchronized as each thread has its own . + + + Nicko Cadell + + + + Each thread will automatically have its instance. + + + + + Internal constructor + + + + Initializes a new instance of the class. + + + + + + Remove a property + + the key for the entry to remove + + + Remove a property + + + + + + Get the keys stored in the properties. + + + Gets the keys stored in the properties. + + a set of the defined keys + + + + Clear all properties + + + + Clear all properties + + + + + + Get the PropertiesDictionary for this thread. + + create the dictionary if it does not exist, otherwise return null if does not exist + the properties for this thread + + + The collection returned is only to be used on the calling thread. If the + caller needs to share the collection between different threads then the + caller must clone the collection before doing so. + + + + + + Gets or sets the value of a property + + + The value for the property with the specified key + + + + Gets or sets the value of a property + + + + + + Implementation of Stack for the + + + + Implementation of Stack for the + + + Nicko Cadell + + + + The stack store. + + + + + Internal constructor + + + + Initializes a new instance of the class. + + + + + + Clears all the contextual information held in this stack. + + + + Clears all the contextual information held in this stack. + Only call this if you think that this tread is being reused after + a previous call execution which may not have completed correctly. + You do not need to use this method if you always guarantee to call + the method of the + returned from even in exceptional circumstances, + for example by using the using(log4net.ThreadContext.Stacks["NDC"].Push("Stack_Message")) + syntax. + + + + + + Removes the top context from this stack. + + The message in the context that was removed from the top of this stack. + + + Remove the top context from this stack, and return + it to the caller. If this stack is empty then an + empty string (not ) is returned. + + + + + + Pushes a new context message into this stack. + + The new context message. + + An that can be used to clean up the context stack. + + + + Pushes a new context onto this stack. An + is returned that can be used to clean up this stack. This + can be easily combined with the using keyword to scope the + context. + + + Simple example of using the Push method with the using keyword. + + using(log4net.ThreadContext.Stacks["NDC"].Push("Stack_Message")) + { + log.Warn("This should have an ThreadContext Stack message"); + } + + + + + + Gets the current context information for this stack. + + The current context information. + + + + Gets the current context information for this stack. + + Gets the current context information + + + Gets the current context information for this stack. + + + + + + Get a portable version of this object + + the portable instance of this object + + + Get a cross thread portable version of this object + + + + + + The number of messages in the stack + + + The current number of messages in the stack + + + + The current number of messages in the stack. That is + the number of times has been called + minus the number of times has been called. + + + + + + Gets and sets the internal stack used by this + + The internal storage stack + + + This property is provided only to support backward compatability + of the . Tytpically the internal stack should not + be modified. + + + + + + Inner class used to represent a single context frame in the stack. + + + + Inner class used to represent a single context frame in the stack. + + + + + + Constructor + + The message for this context. + The parent context in the chain. + + + Initializes a new instance of the class + with the specified message and parent context. + + + + + + Get the message. + + The message. + + + Get the message. + + + + + + Gets the full text of the context down to the root level. + + + The full text of the context down to the root level. + + + + Gets the full text of the context down to the root level. + + + + + + Struct returned from the method. + + + + This struct implements the and is designed to be used + with the pattern to remove the stack frame at the end of the scope. + + + + + + The ThreadContextStack internal stack + + + + + The depth to trim the stack to when this instance is disposed + + + + + Constructor + + The internal stack used by the ThreadContextStack. + The depth to return the stack to when this object is disposed. + + + Initializes a new instance of the class with + the specified stack and return depth. + + + + + + Returns the stack to the correct depth. + + + + Returns the stack to the correct depth. + + + + + + Implementation of Stacks collection for the + + + + Implementation of Stacks collection for the + + + Nicko Cadell + + + + Internal constructor + + + + Initializes a new instance of the class. + + + + + + The fully qualified type of the ThreadContextStacks class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Gets the named thread context stack + + + The named stack + + + + Gets the named thread context stack + + + + + + Utility class for transforming strings. + + + + Utility class for transforming strings. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Uses a private access modifier to prevent instantiation of this class. + + + + + + Write a string to an + + the writer to write to + the string to write + The string to replace non XML compliant chars with + + + The test is escaped either using XML escape entities + or using CDATA sections. + + + + + + Replace invalid XML characters in text string + + the XML text input string + the string to use in place of invalid characters + A string that does not contain invalid XML characters. + + + Certain Unicode code points are not allowed in the XML InfoSet, for + details see: http://www.w3.org/TR/REC-xml/#charsets. + + + This method replaces any illegal characters in the input string + with the mask string specified. + + + + + + Count the number of times that the substring occurs in the text + + the text to search + the substring to find + the number of times the substring occurs in the text + + + The substring is assumed to be non repeating within itself. + + + + + + Characters illegal in XML 1.0 + + + + + Impersonate a Windows Account + + + + This impersonates a Windows account. + + + How the impersonation is done depends on the value of . + This allows the context to either impersonate a set of user credentials specified + using username, domain name and password or to revert to the process credentials. + + + + + + Default constructor + + + + Default constructor + + + + + + Initialize the SecurityContext based on the options set. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + The security context will try to Logon the specified user account and + capture a primary token for impersonation. + + + The required , + or properties were not specified. + + + + Impersonate the Windows account specified by the and properties. + + caller provided state + + An instance that will revoke the impersonation of this SecurityContext + + + + Depending on the property either + impersonate a user using credentials supplied or revert + to the process credentials. + + + + + + Create a given the userName, domainName and password. + + the user name + the domain name + the password + the for the account specified + + + Uses the Windows API call LogonUser to get a principal token for the account. This + token is used to initialize the WindowsIdentity. + + + + + + Gets or sets the impersonation mode for this security context + + + The impersonation mode for this security context + + + + Impersonate either a user with user credentials or + revert this thread to the credentials of the process. + The value is one of the + enum. + + + The default value is + + + When the mode is set to + the user's credentials are established using the + , and + values. + + + When the mode is set to + no other properties need to be set. If the calling thread is + impersonating then it will be reverted back to the process credentials. + + + + + + Gets or sets the Windows username for this security context + + + The Windows username for this security context + + + + This property must be set if + is set to (the default setting). + + + + + + Gets or sets the Windows domain name for this security context + + + The Windows domain name for this security context + + + + The default value for is the local machine name + taken from the property. + + + This property must be set if + is set to (the default setting). + + + + + + Sets the password for the Windows account specified by the and properties. + + + The password for the Windows account specified by the and properties. + + + + This property must be set if + is set to (the default setting). + + + + + + The impersonation modes for the + + + + See the property for + details. + + + + + + Impersonate a user using the credentials supplied + + + + + Revert this the thread to the credentials of the process + + + + + Adds to + + + + Helper class to expose the + through the interface. + + + + + + Constructor + + the impersonation context being wrapped + + + Constructor + + + + + + Revert the impersonation + + + + Revert the impersonation + + + + + + The log4net Global Context. + + + + The GlobalContext provides a location for global debugging + information to be stored. + + + The global context has a properties map and these properties can + be included in the output of log messages. The + supports selecting and outputing these properties. + + + By default the log4net:HostName property is set to the name of + the current machine. + + + + + GlobalContext.Properties["hostname"] = Environment.MachineName; + + + + Nicko Cadell + + + + Private Constructor. + + + Uses a private access modifier to prevent instantiation of this class. + + + + + The global context properties instance + + + + + The global properties map. + + + The global properties map. + + + + The global properties map. + + + + + + Provides information about the environment the assembly has + been built for. + + + + Version of the assembly + + + Version of the framework targeted + + + Type of framework targeted + + + Does it target a client profile? + + + + Identifies the version and target for this assembly. + + + + + The log4net Logical Thread Context. + + + + The LogicalThreadContext provides a location for specific debugging + information to be stored. + The LogicalThreadContext properties override any or + properties with the same name. + + + For .NET Standard 1.3 this class uses + System.Threading.AsyncLocal rather than . + + + The Logical Thread Context has a properties map and a stack. + The properties and stack can + be included in the output of log messages. The + supports selecting and outputting these properties. + + + The Logical Thread Context provides a diagnostic context for the current call context. + This is an instrument for distinguishing interleaved log + output from different sources. Log output is typically interleaved + when a server handles multiple clients near-simultaneously. + + + The Logical Thread Context is managed on a per basis. + + + The requires a link time + for the + . + If the calling code does not have this permission then this context will be disabled. + It will not store any property values set on it. + + + Example of using the thread context properties to store a username. + + LogicalThreadContext.Properties["user"] = userName; + log.Info("This log message has a LogicalThreadContext Property called 'user'"); + + + Example of how to push a message into the context stack + + using(LogicalThreadContext.Stacks["LDC"].Push("my context message")) + { + log.Info("This log message has a LogicalThreadContext Stack message that includes 'my context message'"); + + } // at the end of the using block the message is automatically popped + + + + Nicko Cadell + + + + Private Constructor. + + + + Uses a private access modifier to prevent instantiation of this class. + + + + + + The thread context properties instance + + + + + The thread context stacks instance + + + + + The thread properties map + + + The thread properties map + + + + The LogicalThreadContext properties override any + or properties with the same name. + + + + + + The thread stacks + + + stack map + + + + The logical thread stacks. + + + + + + This class is used by client applications to request logger instances. + + + + This class has static methods that are used by a client to request + a logger instance. The method is + used to retrieve a logger. + + + See the interface for more details. + + + Simple example of logging messages + + ILog log = LogManager.GetLogger("application-log"); + + log.Info("Application Start"); + log.Debug("This is a debug message"); + + if (log.IsDebugEnabled) + { + log.Debug("This is another debug message"); + } + + + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + Uses a private access modifier to prevent instantiation of this class. + + + + Returns the named logger if it exists. + + Returns the named logger if it exists. + + + + If the named logger exists (in the default repository) then it + returns a reference to the logger, otherwise it returns null. + + + The fully qualified logger name to look for. + The logger found, or null if no logger could be found. + + + Get the currently defined loggers. + + Returns all the currently defined loggers in the default repository. + + + The root logger is not included in the returned array. + + All the defined loggers. + + + Get or create a logger. + + Retrieves or creates a named logger. + + + + Retrieves a logger named as the + parameter. If the named logger already exists, then the + existing instance will be returned. Otherwise, a new instance is + created. + + By default, loggers do not have a set level but inherit + it from the hierarchy. This is one of the central features of + log4net. + + + The name of the logger to retrieve. + The logger with the name specified. + + + + Returns the named logger if it exists. + + + + If the named logger exists (in the specified repository) then it + returns a reference to the logger, otherwise it returns + null. + + + The repository to lookup in. + The fully qualified logger name to look for. + + The logger found, or null if the logger doesn't exist in the specified + repository. + + + + + Returns the named logger if it exists. + + + + If the named logger exists (in the repository for the specified assembly) then it + returns a reference to the logger, otherwise it returns + null. + + + The assembly to use to lookup the repository. + The fully qualified logger name to look for. + + The logger, or null if the logger doesn't exist in the specified + assembly's repository. + + + + + Returns all the currently defined loggers in the specified repository. + + The repository to lookup in. + + The root logger is not included in the returned array. + + All the defined loggers. + + + + Returns all the currently defined loggers in the specified assembly's repository. + + The assembly to use to lookup the repository. + + The root logger is not included in the returned array. + + All the defined loggers. + + + + Retrieves or creates a named logger. + + + + Retrieve a logger named as the + parameter. If the named logger already exists, then the + existing instance will be returned. Otherwise, a new instance is + created. + + + By default, loggers do not have a set level but inherit + it from the hierarchy. This is one of the central features of + log4net. + + + The repository to lookup in. + The name of the logger to retrieve. + The logger with the name specified. + + + + Retrieves or creates a named logger. + + + + Retrieve a logger named as the + parameter. If the named logger already exists, then the + existing instance will be returned. Otherwise, a new instance is + created. + + + By default, loggers do not have a set level but inherit + it from the hierarchy. This is one of the central features of + log4net. + + + The assembly to use to lookup the repository. + The name of the logger to retrieve. + The logger with the name specified. + + + + Shorthand for . + + + Get the logger for the fully qualified name of the type specified. + + The full name of will be used as the name of the logger to retrieve. + The logger with the name specified. + + + + Shorthand for . + + + Gets the logger for the fully qualified name of the type specified. + + The repository to lookup in. + The full name of will be used as the name of the logger to retrieve. + The logger with the name specified. + + + + Shorthand for . + + + Gets the logger for the fully qualified name of the type specified. + + The assembly to use to lookup the repository. + The full name of will be used as the name of the logger to retrieve. + The logger with the name specified. + + + + Shuts down the log4net system. + + + + Calling this method will safely close and remove all + appenders in all the loggers including root contained in all the + default repositories. + + + Some appenders need to be closed before the application exists. + Otherwise, pending logging events might be lost. + + The shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + + + Shutdown a logger repository. + + Shuts down the default repository. + + + + Calling this method will safely close and remove all + appenders in all the loggers including root contained in the + default repository. + + Some appenders need to be closed before the application exists. + Otherwise, pending logging events might be lost. + + The shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + + + + Shuts down the repository for the repository specified. + + + + Calling this method will safely close and remove all + appenders in all the loggers including root contained in the + specified. + + + Some appenders need to be closed before the application exists. + Otherwise, pending logging events might be lost. + + The shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + The repository to shutdown. + + + + Shuts down the repository specified. + + + + Calling this method will safely close and remove all + appenders in all the loggers including root contained in the + repository. The repository is looked up using + the specified. + + + Some appenders need to be closed before the application exists. + Otherwise, pending logging events might be lost. + + + The shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + The assembly to use to lookup the repository. + + + Reset the configuration of a repository + + Resets all values contained in this repository instance to their defaults. + + + + Resets all values contained in the repository instance to their + defaults. This removes all appenders from all loggers, sets + the level of all non-root loggers to null, + sets their additivity flag to true and sets the level + of the root logger to . Moreover, + message disabling is set to its default "off" value. + + + + + + Resets all values contained in this repository instance to their defaults. + + + + Reset all values contained in the repository instance to their + defaults. This removes all appenders from all loggers, sets + the level of all non-root loggers to null, + sets their additivity flag to true and sets the level + of the root logger to . Moreover, + message disabling is set to its default "off" value. + + + The repository to reset. + + + + Resets all values contained in this repository instance to their defaults. + + + + Reset all values contained in the repository instance to their + defaults. This removes all appenders from all loggers, sets + the level of all non-root loggers to null, + sets their additivity flag to true and sets the level + of the root logger to . Moreover, + message disabling is set to its default "off" value. + + + The assembly to use to lookup the repository to reset. + + + Get the logger repository. + + Returns the default instance. + + + + Gets the for the repository specified + by the callers assembly (). + + + The instance for the default repository. + + + + Returns the default instance. + + The default instance. + + + Gets the for the repository specified + by the argument. + + + The repository to lookup in. + + + + Returns the default instance. + + The default instance. + + + Gets the for the repository specified + by the argument. + + + The assembly to use to lookup the repository. + + + Get a logger repository. + + Returns the default instance. + + + + Gets the for the repository specified + by the callers assembly (). + + + The instance for the default repository. + + + + Returns the default instance. + + The default instance. + + + Gets the for the repository specified + by the argument. + + + The repository to lookup in. + + + + Returns the default instance. + + The default instance. + + + Gets the for the repository specified + by the argument. + + + The assembly to use to lookup the repository. + + + Create a domain + + Creates a repository with the specified repository type. + + + + CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. + + + The created will be associated with the repository + specified such that a call to will return + the same repository instance. + + + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + Create a logger repository. + + Creates a repository with the specified repository type. + + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + The created will be associated with the repository + specified such that a call to will return + the same repository instance. + + + + + + Creates a repository with the specified name. + + + + CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. + + + Creates the default type of which is a + object. + + + The name must be unique. Repositories cannot be redefined. + An will be thrown if the repository already exists. + + + The name of the repository, this must be unique amongst repositories. + The created for the repository. + The specified repository already exists. + + + + Creates a repository with the specified name. + + + + Creates the default type of which is a + object. + + + The name must be unique. Repositories cannot be redefined. + An will be thrown if the repository already exists. + + + The name of the repository, this must be unique amongst repositories. + The created for the repository. + The specified repository already exists. + + + + Creates a repository with the specified name and repository type. + + + + CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. + + + The name must be unique. Repositories cannot be redefined. + An will be thrown if the repository already exists. + + + The name of the repository, this must be unique to the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + The specified repository already exists. + + + + Creates a repository with the specified name and repository type. + + + + The name must be unique. Repositories cannot be redefined. + An will be thrown if the repository already exists. + + + The name of the repository, this must be unique to the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + The specified repository already exists. + + + + Creates a repository for the specified assembly and repository type. + + + + CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. + + + The created will be associated with the repository + specified such that a call to with the + same assembly specified will return the same repository instance. + + + The assembly to use to get the name of the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + + Creates a repository for the specified assembly and repository type. + + + + The created will be associated with the repository + specified such that a call to with the + same assembly specified will return the same repository instance. + + + The assembly to use to get the name of the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + + Gets the list of currently defined repositories. + + + + Get an array of all the objects that have been created. + + + An array of all the known objects. + + + + Flushes logging events buffered in all configured appenders in the default repository. + + The maximum time in milliseconds to wait for logging events from asycnhronous appenders to be flushed. + True if all logging events were flushed successfully, else false. + + + + Looks up the wrapper object for the logger specified. + + The logger to get the wrapper for. + The wrapper for the logger specified. + + + + Looks up the wrapper objects for the loggers specified. + + The loggers to get the wrappers for. + The wrapper objects for the loggers specified. + + + + Create the objects used by + this manager. + + The logger to wrap. + The wrapper for the logger specified. + + + + The wrapper map to use to hold the objects. + + + + + Implementation of Mapped Diagnostic Contexts. + + + + + The MDC is deprecated and has been replaced by the . + The current MDC implementation forwards to the ThreadContext.Properties. + + + + The MDC class is similar to the class except that it is + based on a map instead of a stack. It provides mapped + diagnostic contexts. A Mapped Diagnostic Context, or + MDC in short, is an instrument for distinguishing interleaved log + output from different sources. Log output is typically interleaved + when a server handles multiple clients near-simultaneously. + + + The MDC is managed on a per thread basis. + + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + Uses a private access modifier to prevent instantiation of this class. + + + + + Gets the context value identified by the parameter. + + The key to lookup in the MDC. + The string value held for the key, or a null reference if no corresponding value is found. + + + + The MDC is deprecated and has been replaced by the . + The current MDC implementation forwards to the ThreadContext.Properties. + + + + If the parameter does not look up to a + previously defined context then null will be returned. + + + + + + Add an entry to the MDC + + The key to store the value under. + The value to store. + + + + The MDC is deprecated and has been replaced by the . + The current MDC implementation forwards to the ThreadContext.Properties. + + + + Puts a context value (the parameter) as identified + with the parameter into the current thread's + context map. + + + If a value is already defined for the + specified then the value will be replaced. If the + is specified as null then the key value mapping will be removed. + + + + + + Removes the key value mapping for the key specified. + + The key to remove. + + + + The MDC is deprecated and has been replaced by the . + The current MDC implementation forwards to the ThreadContext.Properties. + + + + Remove the specified entry from this thread's MDC + + + + + + Clear all entries in the MDC + + + + + The MDC is deprecated and has been replaced by the . + The current MDC implementation forwards to the ThreadContext.Properties. + + + + Remove all the entries from this thread's MDC + + + + + + Implementation of Nested Diagnostic Contexts. + + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + A Nested Diagnostic Context, or NDC in short, is an instrument + to distinguish interleaved log output from different sources. Log + output is typically interleaved when a server handles multiple + clients near-simultaneously. + + + Interleaved log output can still be meaningful if each log entry + from different contexts had a distinctive stamp. This is where NDCs + come into play. + + + Note that NDCs are managed on a per thread basis. The NDC class + is made up of static methods that operate on the context of the + calling thread. + + + How to push a message into the context + + using(NDC.Push("my context message")) + { + ... all log calls will have 'my context message' included ... + + } // at the end of the using block the message is automatically removed + + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + Uses a private access modifier to prevent instantiation of this class. + + + + + Clears all the contextual information held on the current thread. + + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + Clears the stack of NDC data held on the current thread. + + + + + + Creates a clone of the stack of context information. + + A clone of the context info for this thread. + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + The results of this method can be passed to the + method to allow child threads to inherit the context of their + parent thread. + + + + + + Inherits the contextual information from another thread. + + The context stack to inherit. + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + This thread will use the context information from the stack + supplied. This can be used to initialize child threads with + the same contextual information as their parent threads. These + contexts will NOT be shared. Any further contexts that + are pushed onto the stack will not be visible to the other. + Call to obtain a stack to pass to + this method. + + + + + + Removes the top context from the stack. + + + The message in the context that was removed from the top + of the stack. + + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + Remove the top context from the stack, and return + it to the caller. If the stack is empty then an + empty string (not null) is returned. + + + + + + Pushes a new context message. + + The new context message. + + An that can be used to clean up + the context stack. + + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + Pushes a new context onto the context stack. An + is returned that can be used to clean up the context stack. This + can be easily combined with the using keyword to scope the + context. + + + Simple example of using the Push method with the using keyword. + + using(log4net.NDC.Push("NDC_Message")) + { + log.Warn("This should have an NDC message"); + } + + + + + + Pushes a new context message. + + The new context message string format. + Arguments to be passed into messageFormat. + + An that can be used to clean up + the context stack. + + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + Pushes a new context onto the context stack. An + is returned that can be used to clean up the context stack. This + can be easily combined with the using keyword to scope the + context. + + + Simple example of using the Push method with the using keyword. + + var someValue = "ExampleContext" + using(log4net.NDC.PushFormat("NDC_Message {0}", someValue)) + { + log.Warn("This should have an NDC message"); + } + + + + + + Removes the context information for this thread. It is + not required to call this method. + + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + This method is not implemented. + + + + + + Forces the stack depth to be at most . + + The maximum depth of the stack + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + Forces the stack depth to be at most . + This may truncate the head of the stack. This only affects the + stack in the current thread. Also it does not prevent it from + growing, it only sets the maximum depth at the time of the + call. This can be used to return to a known context depth. + + + + + + Gets the current context depth. + + The current context depth. + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + The number of context values pushed onto the context stack. + + + Used to record the current depth of the context. This can then + be restored using the method. + + + + + + + The log4net Thread Context. + + + + The ThreadContext provides a location for thread specific debugging + information to be stored. + The ThreadContext properties override any + properties with the same name. + + + The thread context has a properties map and a stack. + The properties and stack can + be included in the output of log messages. The + supports selecting and outputting these properties. + + + The Thread Context provides a diagnostic context for the current thread. + This is an instrument for distinguishing interleaved log + output from different sources. Log output is typically interleaved + when a server handles multiple clients near-simultaneously. + + + The Thread Context is managed on a per thread basis. + + + Example of using the thread context properties to store a username. + + ThreadContext.Properties["user"] = userName; + log.Info("This log message has a ThreadContext Property called 'user'"); + + + Example of how to push a message into the context stack + + using(ThreadContext.Stacks["NDC"].Push("my context message")) + { + log.Info("This log message has a ThreadContext Stack message that includes 'my context message'"); + + } // at the end of the using block the message is automatically popped + + + + Nicko Cadell + + + + Private Constructor. + + + + Uses a private access modifier to prevent instantiation of this class. + + + + + + The thread context properties instance + + + + + The thread context stacks instance + + + + + The thread properties map + + + The thread properties map + + + + The ThreadContext properties override any + properties with the same name. + + + + + + The thread stacks + + + stack map + + + + The thread local stacks. + + + + + diff --git a/北京北汽/SCP/DLL/zh-Hans/EntityFramework.SqlServer.resources.dll b/北京北汽/SCP/DLL/zh-Hans/EntityFramework.SqlServer.resources.dll new file mode 100644 index 0000000..da4531e Binary files /dev/null and b/北京北汽/SCP/DLL/zh-Hans/EntityFramework.SqlServer.resources.dll differ diff --git a/北京北汽/SCP/DLL/zh-Hans/EntityFramework.resources.dll b/北京北汽/SCP/DLL/zh-Hans/EntityFramework.resources.dll new file mode 100644 index 0000000..6e55fdb Binary files /dev/null and b/北京北汽/SCP/DLL/zh-Hans/EntityFramework.resources.dll differ diff --git a/北京北汽/SCP/DLL/项目模版代码生成.rar b/北京北汽/SCP/DLL/项目模版代码生成.rar new file mode 100644 index 0000000..26c9242 Binary files /dev/null and b/北京北汽/SCP/DLL/项目模版代码生成.rar differ diff --git a/北京北汽/SCP/Data/ChangKeTecSCP.bak b/北京北汽/SCP/Data/ChangKeTecSCP.bak new file mode 100644 index 0000000..9f2035d Binary files /dev/null and b/北京北汽/SCP/Data/ChangKeTecSCP.bak differ diff --git a/北京北汽/SCP/Data/SCPAppbox.bak b/北京北汽/SCP/Data/SCPAppbox.bak new file mode 100644 index 0000000..13662c2 Binary files /dev/null and b/北京北汽/SCP/Data/SCPAppbox.bak differ diff --git a/北京北汽/SCP/Document/SCP数据库字典.xlsx b/北京北汽/SCP/Document/SCP数据库字典.xlsx new file mode 100644 index 0000000..ecf3cfe Binary files /dev/null and b/北京北汽/SCP/Document/SCP数据库字典.xlsx differ diff --git a/北京北汽/SCP/Document/Scp.sql b/北京北汽/SCP/Document/Scp.sql new file mode 100644 index 0000000..a617eef Binary files /dev/null and b/北京北汽/SCP/Document/Scp.sql differ diff --git a/北京北汽/SCP/Model/App.config b/北京北汽/SCP/Model/App.config new file mode 100644 index 0000000..1a60fd8 --- /dev/null +++ b/北京北汽/SCP/Model/App.config @@ -0,0 +1,17 @@ + + + + +
+ + + + + + + + + + + + diff --git a/北京北汽/SCP/Model/Attributes/BaseTableValidation.cs b/北京北汽/SCP/Model/Attributes/BaseTableValidation.cs new file mode 100644 index 0000000..f2ad84d --- /dev/null +++ b/北京北汽/SCP/Model/Attributes/BaseTableValidation.cs @@ -0,0 +1,13 @@ +using System.ComponentModel.DataAnnotations; + +namespace ChangkeTec.SDMS.Model.Attributes +{ + public class BaseTableValidation + { + public static ValidationResult IsNullOrEmpty(string value, string error) + { + if (string.IsNullOrEmpty(value)) return new ValidationResult(error); + return ValidationResult.Success; + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/Attributes/ColumnSource.cs b/北京北汽/SCP/Model/Attributes/ColumnSource.cs new file mode 100644 index 0000000..91a32cd --- /dev/null +++ b/北京北汽/SCP/Model/Attributes/ColumnSource.cs @@ -0,0 +1,61 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace ChangkeTec.SDMS.Model.Attributes +{ + /// + /// 列来源属于 + /// + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] + public class ColumnSource : Attribute + { + /// + /// + /// 列来源。ENUM:枚举数据源.TABLE表数据源(外键关系) + /// 来源数据源类型 + /// + /// sourceType为TABLE时,columName是对应表中的列名 + /// columnNames[0]: ValueMember ,colums[1]:DisplayMember + public ColumnSource(ColumnSourceType sourceType, Type typeName, string[] columnNames = null, + string selector = null) + { + SourceType = sourceType; + TypeName = typeName; + ColumnNames = columnNames; + Selector = selector; + } + + + public ColumnSourceType SourceType { get; } + + /// 获取或设置属性映射到的列的从零开始的顺序。 + /// 列的顺序。 + public Type TypeName { get; } + + /// 获取或设置该属性映射到的列的数据库提供程序特定的数据类型。 + /// 属性将映射到的列的数据库提供程序特定数据类型。 + [StringLength(50)] + public string[] ColumnNames { get; } + + [StringLength(50)] + public string Selector { get; set; } + } + + public enum ColumnSourceType + { + /// + /// 枚举数据源 + /// + ENUM = 1, + + /// + /// 表数据源 + /// + TABLE = 2, + + /// + /// bool类型 + /// + Boolean = 4 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/Attributes/Converter.cs b/北京北汽/SCP/Model/Attributes/Converter.cs new file mode 100644 index 0000000..1eb3019 --- /dev/null +++ b/北京北汽/SCP/Model/Attributes/Converter.cs @@ -0,0 +1,21 @@ +using System; + +namespace ChangkeTec.SDMS.Model.Attributes +{ + /// + /// Converter属性 + /// + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] + public class ConverterAttribute : Attribute + { + public ConverterAttribute(Type converterType) + { + ConverterType = converterType; + } + + /// + /// Converter类型 + /// + public Type ConverterType { get; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/Attributes/DataGridColum.cs b/北京北汽/SCP/Model/Attributes/DataGridColum.cs new file mode 100644 index 0000000..85239ed --- /dev/null +++ b/北京北汽/SCP/Model/Attributes/DataGridColum.cs @@ -0,0 +1,19 @@ +using System; + +namespace ChangkeTec.SDMS.Model.Attributes +{ + /// + /// 是否在DataGrid中显示 + /// + public class IsDataGridColum : Attribute + { + public IsDataGridColum(bool isShow, int displayOrder) + { + IsShowInDataGrid = isShow; + DisplayOrder = displayOrder; + } + + public bool IsShowInDataGrid { get; set; } + public int DisplayOrder { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/Attributes/Unique.cs b/北京北汽/SCP/Model/Attributes/Unique.cs new file mode 100644 index 0000000..d990b7a --- /dev/null +++ b/北京北汽/SCP/Model/Attributes/Unique.cs @@ -0,0 +1,14 @@ +using System; + +namespace ChangkeTec.SDMS.Model.Attributes +{ + public class Unique : Attribute + { + public Unique(bool isUnique) + { + IsUnique = isUnique; + } + + public bool IsUnique { get; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/Base/IData.cs b/北京北汽/SCP/Model/Base/IData.cs new file mode 100644 index 0000000..329aa52 --- /dev/null +++ b/北京北汽/SCP/Model/Base/IData.cs @@ -0,0 +1,11 @@ +using System; +using System.ComponentModel; + +namespace ChangkeTec.SDMS.Model.Base +{ + public interface IData : ITaskTable + { + [Description("数据编号")] + Guid DataID { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/Base/IDomain.cs b/北京北汽/SCP/Model/Base/IDomain.cs new file mode 100644 index 0000000..266cc04 --- /dev/null +++ b/北京北汽/SCP/Model/Base/IDomain.cs @@ -0,0 +1,10 @@ +using System.ComponentModel; + +namespace ChangkeTec.SDMS.Model.Base +{ + public interface IDomain + { + [Description("域")] + string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/Base/IDomainSite.cs b/北京北汽/SCP/Model/Base/IDomainSite.cs new file mode 100644 index 0000000..e66b81a --- /dev/null +++ b/北京北汽/SCP/Model/Base/IDomainSite.cs @@ -0,0 +1,10 @@ +using System.ComponentModel; + +namespace ChangkeTec.SDMS.Model.Base +{ + public interface IDomainSite : IDomain + { + [Description("地点")] + string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/Base/ISoftDelete.cs b/北京北汽/SCP/Model/Base/ISoftDelete.cs new file mode 100644 index 0000000..345bb1d --- /dev/null +++ b/北京北汽/SCP/Model/Base/ISoftDelete.cs @@ -0,0 +1,10 @@ +using System.ComponentModel; + +namespace ChangkeTec.SDMS.Model.Base +{ + public interface ISoftDelete + { + [Description("软删除")] + bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/Base/ITable.cs b/北京北汽/SCP/Model/Base/ITable.cs new file mode 100644 index 0000000..4674b3c --- /dev/null +++ b/北京北汽/SCP/Model/Base/ITable.cs @@ -0,0 +1,27 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangkeTec.SDMS.Model.Base +{ + public interface ITable + { + [Key] + [Description("主键")] + Guid GUID { get; set; } + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Description("自增长编号")] + int UID { get; set; } + + [Description("创建人")] + string CreateUser { get; set; } + + [Description("创建时间")] + DateTime CreateTime { get; set; } + + [Description("备注")] + string Remark { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/Base/ITaskTable.cs b/北京北汽/SCP/Model/Base/ITaskTable.cs new file mode 100644 index 0000000..e25ef17 --- /dev/null +++ b/北京北汽/SCP/Model/Base/ITaskTable.cs @@ -0,0 +1,21 @@ +using System; +using System.ComponentModel; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.Base +{ + public interface ITaskTable : ITable, IDomainSite + { + [Description("任务编号")] + Guid TaskID { get; set; } + + /// + /// A:Add,R:Read,U:Update,D:Delete + /// + [Description("命令类型")] + string CommandType { get; set; } + + [Description("数据编号")] + Guid DataID { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/Base/IUpdatableTable.cs b/北京北汽/SCP/Model/Base/IUpdatableTable.cs new file mode 100644 index 0000000..3041f33 --- /dev/null +++ b/北京北汽/SCP/Model/Base/IUpdatableTable.cs @@ -0,0 +1,16 @@ +using System; + +namespace ChangkeTec.SDMS.Model.Base +{ + public interface IUpdatableTable : ITable + { + string UpdateUser { get; set; } + + DateTime? UpdateTime { get; set; } + } + + public interface IEnable + { + bool Enable { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/CktException.cs b/北京北汽/SCP/Model/CktException.cs new file mode 100644 index 0000000..e0b04c5 --- /dev/null +++ b/北京北汽/SCP/Model/CktException.cs @@ -0,0 +1,56 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.Text; +using ChangkeTec.SDMS.Model.Enums; +using CK.SCP.Utils; + +namespace ChangkeTec.SDMS.Model +{ + [Serializable] //声明为可序列化的 因为要写入文件中 + public class CktException : ApplicationException //由用户程序引发,用于派生自定义的异常类型 + { + private const string SP = ";"; + + /// + /// 默认构造函数 + /// + public CktException() + { + } + + public CktException(EnumErrorCode code, string indexString = null, string message = null, + Exception inner = null) + : base(message, inner) + { + Code = code; + IndexString = indexString; + Ex = inner; + } + + // private ResultCode _code; + // private string _indexString; + public EnumErrorCode Code { get; set; } + + [StringLength(50)] + public string IndexString { get; set; } + + public Exception Ex { get; set; } + + // public WmsException(System.Runtime.Serialization.SerializationInfo info, + // System.Runtime.Serialization.StreamingContext context) : base(info, context) + // { + // _indexString = info.GetString(IndexString); + // } + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append(EnumHelper.GetDesc(Code) + SP); + sb.Append(IndexString ?? "" + SP); + if (!string.IsNullOrEmpty(Message)) + sb.Append(Message ?? "" + SP); + if (Ex != null) + sb.Append(Ex); + return sb.ToString(); + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterContext.cs b/北京北汽/SCP/Model/DataCenterContext.cs new file mode 100644 index 0000000..8f342d1 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterContext.cs @@ -0,0 +1,114 @@ +using System.Data.Entity; +using System.Data.Entity.ModelConfiguration.Conventions; +using ChangkeTec.SDMS.Model.DataCenterTables; + +namespace ChangkeTec.SDMS.Model +{ + [DbConfigurationType(typeof(SqlDbConfiguration))] + public class DataCenterContext : DbContext + { + public DataCenterContext() : base("name=DataCenterContext") + { + } + + public DataCenterContext(string strConn) : base(strConn) + { + //Database.SetInitializer(new DataCenterDatabaseInitializer()); + } + + public virtual DbSet TA_BUTTON { get; set; } + public virtual DbSet TA_DEPT { get; set; } + public virtual DbSet TA_MENU { get; set; } + public virtual DbSet TA_USER { get; set; } + public virtual DbSet TA_USER_BUTTON { get; set; } + public virtual DbSet TA_USER_MENU { get; set; } + public virtual DbSet TA_USER_TABLE { get; set; } + public virtual DbSet TA_CONFIG { get; set; } + public virtual DbSet TL_DATA_CHANGE { get; set; } + public virtual DbSet TL_LOGIN { get; set; } + public virtual DbSet TL_EXCEPTION { get; set; } + public virtual DbSet TS_EDI_DATA { get; set; } + public virtual DbSet TT_EDI_DATA { get; set; } + public virtual DbSet TA_TABLE { get; set; } + public virtual DbSet TA_TASK { get; set; } + public virtual DbSet TA_TASK_HIS { get; set; } + public virtual DbSet TS_SUPPLIER { get; set; } + public virtual DbSet TS_CUSTOMER { get; set; } + public virtual DbSet TS_DOMAIN { get; set; } + public virtual DbSet TS_WORK_CENTER { get; set; } + public virtual DbSet TS_SUPPLIER_TYPE { get; set; } + public virtual DbSet TS_SUB_ACCOUNT { get; set; } + public virtual DbSet TS_SITE { get; set; } + public virtual DbSet TS_CODE_TYPE { get; set; } + public virtual DbSet TS_CODE { get; set; } + public virtual DbSet TS_PRODUCT_LINE { get; set; } + public virtual DbSet TS_PROJECT { get; set; } + public virtual DbSet TS_DEPARTMENT { get; set; } + public virtual DbSet TS_ENTITY { get; set; } + public virtual DbSet TS_CUSTOMER_TYPE { get; set; } + public virtual DbSet TS_COST_CENTER { get; set; } + public virtual DbSet TS_ACCOUNT { get; set; } + public virtual DbSet TS_ROUTING { get; set; } + public virtual DbSet TS_PART_MSTR { get; set; } + public virtual DbSet TS_PART_DET { get; set; } + public virtual DbSet TS_MES_DATA { get; set; } + public virtual DbSet TS_LOCATION { get; set; } + public virtual DbSet TS_LINE { get; set; } + public virtual DbSet TS_COLOR { get; set; } + public virtual DbSet TS_BOM { get; set; } + public virtual DbSet TS_PACK { get; set; } + public virtual DbSet TS_SUPPLIER_PART { get; set; } + public virtual DbSet TS_CUSTOMER_PART { get; set; } + public virtual DbSet TS_LINE_PART { get; set; } + public virtual DbSet TS_PURCHASE_PRICE { get; set; } + public virtual DbSet TS_SALE_PRICE { get; set; } + public virtual DbSet TS_STAND_COST_PRICE { get; set; } + public virtual DbSet TS_TEAM { get; set; } + public virtual DbSet TS_SHIFT { get; set; } + public virtual DbSet TS_WMS_LOCATION { get; set; } + public virtual DbSet TT_SUPPLIER { get; set; } + public virtual DbSet TT_CUSTOMER { get; set; } + public virtual DbSet TT_DOMAIN { get; set; } + public virtual DbSet TT_WORK_CENTER { get; set; } + public virtual DbSet TT_SUPPLIER_TYPE { get; set; } + public virtual DbSet TT_SUB_ACCOUNT { get; set; } + public virtual DbSet TT_SITE { get; set; } + public virtual DbSet TT_CODE_TYPE { get; set; } + public virtual DbSet TT_CODE { get; set; } + public virtual DbSet TT_PRODUCT_LINE { get; set; } + public virtual DbSet TT_PROJECT { get; set; } + public virtual DbSet TT_DEPARTMENT { get; set; } + public virtual DbSet TT_ENTITY { get; set; } + public virtual DbSet TT_CUSTOMER_TYPE { get; set; } + public virtual DbSet TT_COST_CENTER { get; set; } + public virtual DbSet TT_ACCOUNT { get; set; } + public virtual DbSet TT_ROUTING { get; set; } + public virtual DbSet TT_PART_MSTR { get; set; } + public virtual DbSet TT_PART_DET { get; set; } + public virtual DbSet TT_MES_DATA { get; set; } + public virtual DbSet TT_LOCATION { get; set; } + public virtual DbSet TT_LINE { get; set; } + public virtual DbSet TT_COLOR { get; set; } + public virtual DbSet TT_BOM { get; set; } + public virtual DbSet TT_PACK { get; set; } + public virtual DbSet TT_SUPPLIER_PART { get; set; } + public virtual DbSet TT_CUSTOMER_PART { get; set; } + public virtual DbSet TT_LINE_PART { get; set; } + public virtual DbSet TT_PURCHASE_PRICE { get; set; } + public virtual DbSet TT_SALE_PRICE { get; set; } + public virtual DbSet TT_STAND_COST_PRICE { get; set; } + public virtual DbSet TT_TEAM { get; set; } + public virtual DbSet TT_SHIFT { get; set; } + public virtual DbSet TT_WMS_LOCATION { get; set; } + + + + protected override void OnModelCreating(DbModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + + modelBuilder.Conventions.Remove(); + modelBuilder.Conventions.Add(new DecimalPropertyConvention(18, 5)); + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterDatabaseInitializer.cs b/北京北汽/SCP/Model/DataCenterDatabaseInitializer.cs new file mode 100644 index 0000000..d2f5c37 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterDatabaseInitializer.cs @@ -0,0 +1,83 @@ +using System.Collections.Generic; +using System.Data.Entity; +using System.Data.Entity.Migrations; +using ChangkeTec.SDMS.Model.DataCenterTables; + +namespace ChangkeTec.SDMS.Model +{ + public class DataCenterDatabaseInitializer : DropCreateDatabaseIfModelChanges // DropCreateDatabaseAlways DropCreateDatabaseIfModelChanges + { + protected override void Seed(DataCenterContext db) + { + base.InitializeDatabase(db); + // db.TA_CONFIG.AddOrUpdate(InitConfigList); + // db.TA_MENU.AddOrUpdate(InitMenuList); + // db.TA_DEPT.AddOrUpdate(InitDeptList); + // db.TA_USER.AddOrUpdate(InitUserList); + // db.TA_USER_BUTTON.AddOrUpdate(InitUserButtonList); + // db.TA_USER_MENU.AddOrUpdate(InitUserMenuList); + // db.TA_USER_TABLE.AddOrUpdate(InitUserTableList); + // db.TA_TABLE.AddOrUpdate(InitTableList); + db.Database.ExecuteSqlCommand(ProcedureInitializer.P_GetAllTables); + db.SaveChanges(); + base.Seed(db); + + } + + + + } + + public static class ProcedureInitializer + { + public static string P_GetAllTables = @" + create procedure [dbo].[P_GetAllTables] + as + begin + SELECT + --表名 = Case When A.colorder = 1 Then D.name Else '' End, + --表说明 = Case When A.colorder = 1 Then isnull(F.value,'') Else '' End, + 表名 = D.name, + 表说明 = isnull(F.value, ''), + 字段序号 = A.colorder, + 字段名 = A.name, + 字段说明 = isnull(G.[value], ''), + 自增长 = Case When COLUMNPROPERTY(A.id, A.name,'IsIdentity')= 1 Then '●'Else '' End, + 主键 = Case When exists(SELECT 1 FROM sysobjects Where xtype = 'PK' and parent_obj = A.id and name in ( + SELECT name FROM sysindexes WHERE indid in(SELECT indid FROM sysindexkeys WHERE id = A.id AND colid = A.colid))) then '●' else '' end, + 类型 = B.name, + 长度 = COLUMNPROPERTY(A.id, A.name, 'PRECISION'), + 小数位数 = isnull(COLUMNPROPERTY(A.id, A.name, 'Scale'), 0), + 允许空 = Case When A.isnullable = 1 Then '●'Else '' End, + 默认值 = isnull(E.Text, ''), + 占用字节数 = A.Length + FROM + syscolumns A + Left Join + systypes B + On + A.xusertype = B.xusertype + Inner Join + sysobjects D + On + A.id = D.id and D.xtype = 'U' and D.name <> 'dtproperties' + Left Join + syscomments E + on + A.cdefault = E.id + Left Join + sys.extended_properties G + on + A.id = G.major_id and A.colid = G.minor_id + Left Join + + sys.extended_properties F + On + D.id = F.major_id and F.minor_id = 0 + --where d.name = 'OrderInfo'--如果只查询指定表,加上此条件 + Order By + D.Name,A.id,A.colorder + end + "; + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterEntityClassInfo.cs b/北京北汽/SCP/Model/DataCenterEntityClassInfo.cs new file mode 100644 index 0000000..39efcf3 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterEntityClassInfo.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; + +namespace ChangkeTec.SDMS.Model +{ + public class EntityClassInfo + { + public EntityClassInfo() + { + var classNameList = new List(); + var properties = typeof(T).GetProperties(); // 获得对象所有属性 + foreach (var property in properties) + { + var propertyType = property.PropertyType.Name; // 获得属性类型名称 + if (!propertyType.Contains("DbSet")) continue; + var genericTypes = property.PropertyType.GenericTypeArguments; // 获得泛型类型数组 + classNameList.AddRange(genericTypes.Select(type => type.Name)); + } + + this.EntityNameList = classNameList; + } + + public List EntityNameList { get; set; } + } + +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TA_BUTTON.cs b/北京北汽/SCP/Model/DataCenterTables/TA_BUTTON.cs new file mode 100644 index 0000000..0b66974 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TA_BUTTON.cs @@ -0,0 +1,65 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ť")] + public class TA_BUTTON : IUpdatableTable, IEnable + { + [Index("IndexButton", Order = 0, IsUnique = true, IsClustered = false)] + [Description("ť")] + [Column] + [Required] + [StringLength(50)] + public string ButtonCode { get; set; } + + [Description("ť")] + [Required] + [StringLength(50)] + public string ButtonName { get; set; } + + [Index("IndexButton", Order = 1, IsUnique = true, IsClustered = false)] + [Description("")] + [Required] + [StringLength(50)] + public string TableName { get; set; } + + [Description("ť˳")] + public int ButtonOrder { get; set; } + + #region ֶ + + [Description("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } = ""; + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } = DateTime.Now; + + + [Description("ע")] + public string Remark { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + + public bool Enable { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TA_CONFIG.cs b/北京北汽/SCP/Model/DataCenterTables/TA_CONFIG.cs new file mode 100644 index 0000000..e6c1104 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TA_CONFIG.cs @@ -0,0 +1,63 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ϵͳ")] + public class TA_CONFIG : ITable, IEnable + { + [IsDataGridColum(true, 1)] + [Index("IndexConfig", Order = 0, IsUnique = true, IsClustered = false)] + [Description("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string ConfigName { get; set; } + + [IsDataGridColum(true, 2)] + [Required(AllowEmptyStrings = true)] + [Description("ֵ")] + [StringLength(50)] + public string ConfigValue { get; set; } + + [IsDataGridColum(true, 3)] + [Description("˵")] + [StringLength(500)] + public string ConfigDesc { get; set; } + + + [IsDataGridColum(true, 4)] + [Required(AllowEmptyStrings = true)] + [Description("")] + public EnumConfigType ConfigType { get; set; } = EnumConfigType.STRING; + + #region ֶ + + [Description("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } = ""; + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + + [Description("ע")] + public string Remark { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + + public bool Enable { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TA_DEPT.cs b/北京北汽/SCP/Model/DataCenterTables/TA_DEPT.cs new file mode 100644 index 0000000..3d87a99 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TA_DEPT.cs @@ -0,0 +1,65 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ű")] + public class TA_DEPT : IUpdatableTable, IEnable,IDomainSite + { + [IsDataGridColum(true, 1)] + [Description("ű")] + [Required(ErrorMessage = "űŲΪ.")] + [Index("IndexDept", Order = 0, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string DeptCode { get; set; } + + [IsDataGridColum(true, 2)] + [Description("")] + [Required(ErrorMessage = "ƲΪ.")] + [StringLength(50)] + public string DeptName { get; set; } + + [Description("Ƿѡ")] + [NotMapped] + public bool IsChecked { get; set; } + + #region ֶ + + [Description("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } = ""; + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } = DateTime.Now; + + + [IsDataGridColum(true, 3)] + [Description("ע")] + public string Remark { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + + public bool Enable { get; set; } + public string Domain { get; set; } + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TA_MENU.cs b/北京北汽/SCP/Model/DataCenterTables/TA_MENU.cs new file mode 100644 index 0000000..7f6e967 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TA_MENU.cs @@ -0,0 +1,74 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("菜单表")] + public class TA_MENU : IUpdatableTable, IEnable + { + [Description("菜单编号")] + [Required] + [Index("IndexMenu", Order = 0, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string MenuCode { get; set; } + + [Description("菜单名称")] + [Required] + [StringLength(50)] + public string MenuName { get; set; } + + [Description("上级菜单")] + [Required] + [StringLength(50)] + public string ParentCode { get; set; } + + [Description("显示顺序")] + public int DisplayOrder { get; set; } + + [Description("图标名称")] + [Required] + [StringLength(50)] + public string IconName { get; set; } + + [Description("菜单级别")] + public int Level { get; set; } + + [Description("是否选中")] + [NotMapped] + public bool IsChecked { get; set; } + + #region 公共字段 + + [Description("创建人")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("创建时间")] + public DateTime CreateTime { get; set; } + + [Description("修改人")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("修改时间")] + public DateTime? UpdateTime { get; set; } + + + [Description("备注")] + public string Remark { get; set; } + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + + public bool Enable { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TA_TABLE.cs b/北京北汽/SCP/Model/DataCenterTables/TA_TABLE.cs new file mode 100644 index 0000000..a63c53f --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TA_TABLE.cs @@ -0,0 +1,61 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("Ϣ")] + public class TA_TABLE : IUpdatableTable, IEnable + { + [IsDataGridColum(true, 1)] + [Description("")] + [Required(ErrorMessage = "űŲΪ.")] + [Index("IndexDept", Order = 0, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string TableCode { get; set; } + + [IsDataGridColum(true, 2)] + [Description("")] + [Required(ErrorMessage = "ƲΪ.")] + [StringLength(50)] + public string TableName { get; set; } + + [Description("Ƿѡ")] + [NotMapped] + public bool IsChecked { get; set; } + + #region ֶ + + [Description("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + #endregion + + public bool Enable { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TA_TASK.cs b/北京北汽/SCP/Model/DataCenterTables/TA_TASK.cs new file mode 100644 index 0000000..0af0e94 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TA_TASK.cs @@ -0,0 +1,69 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("")] + public class TA_TASK : IUpdatableTable, ISoftDelete + { + [NotMapped] + [Description("")] + public Guid TaskID => GUID; + + + [Description("״̬")] + public EnumTaskState TaskState { get; set; } = EnumTaskState.Unread; + + [Description("")] + [StringLength(50)] + public string TableName { get; set; } + + [Description("")] + [StringLength(50)] + public string Creator { get; set; } + + [Description("")] + public int DataCount { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + + [Key] + [Description("")] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TA_TASK_HIS.cs b/北京北汽/SCP/Model/DataCenterTables/TA_TASK_HIS.cs new file mode 100644 index 0000000..c3a2f96 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TA_TASK_HIS.cs @@ -0,0 +1,72 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ʷ")] + /// + /// ʷ + /// + public class TA_TASK_HIS : IUpdatableTable, ISoftDelete + { + [NotMapped] + [Description("")] + public Guid TaskId => GUID; + + + [Description("״̬")] + public EnumTaskState TaskState { get; set; } + + [Description("")] + [StringLength(50)] + public string TableName { get; set; } + + [Description("")] + [StringLength(50)] + public string Creator { get; set; } + + [Description("")] + public int DataCount { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + + [Key] + [Description("")] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TA_USER.cs b/北京北汽/SCP/Model/DataCenterTables/TA_USER.cs new file mode 100644 index 0000000..b20c951 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TA_USER.cs @@ -0,0 +1,135 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("û")] + public class TA_USER : IUpdatableTable, ISoftDelete, IEnable, INotifyPropertyChanged + { + [IsDataGridColum(true, 1)] + [Description("û")] + [Required(ErrorMessage = "ûΪ")] + [Index("IndexUser", Order = 0, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string UserName { get; set; } + + [IsDataGridColum(true, 2)] + [Description("")] + [Required(ErrorMessage = "벻Ϊ")] + [StringLength(50)] + public string Password { get; set; } + + [IsDataGridColum(true, 3)] + [Description("ʵ")] + [StringLength(50)] + public string TrueName { get; set; } + + [IsDataGridColum(true, 7)] + [ColumnSource(ColumnSourceType.TABLE, typeof(TA_DEPT), + new[] {"DeptCode", "DeptName"})] //, "CompanyDeptSelector" + [Description("ű")] + [Required(ErrorMessage = "űŲΪ")] + [StringLength(50)] + public string DeptCode { get; set; } + + [ColumnSource(ColumnSourceType.ENUM, typeof(EnumUserType))] + [IsDataGridColum(true, 5)] + [Description("û")] + public EnumUserType UserType { get; set; } = EnumUserType.Admin; + + + [IsDataGridColum(true, 12)] + [Description("ʼ")] + [StringLength(50)] + public string Email { get; set; } + + [IsDataGridColum(true, 13)] + [Description("ϵ绰1")] + [StringLength(50)] + public string Phone1 { get; set; } + + [IsDataGridColum(true, 14)] + [Description("ϵ绰2")] + [StringLength(50)] + public string Phone2 { get; set; } + + [IsDataGridColum(true, 9)] + [Description("¼ʱ")] + [Column(TypeName = "datetime2")] + public DateTime? LastLoginTime { get; set; } + + [IsDataGridColum(true, 10)] + [Description("¼IPַ")] + [StringLength(50)] + public string LastLoginIp { get; set; } + + [IsDataGridColum(true, 11)] + [Description("¼")] + [StringLength(50)] + public string LastLoginClient { get; set; } + + [IsDataGridColum(true, 8)] + [Index("IndexUserSessionId", Order = 0, IsUnique = false, IsClustered = false)] + [Description("Ự")] + [StringLength(50)] + public string SessionId { get; set; } + + + [Description("ɾ")] + public bool IsDeleted { get; set; } + + [Description("Ƿ")] + public bool Enable { get; set; } + + #region ֶ + + [Description("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } = ""; + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } = ""; + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } = DateTime.Now; + + + [IsDataGridColum(true, 15)] + [Description("ע")] + public string Remark { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + + + #region INotifyPropertyChangedӿ + + public event PropertyChangedEventHandler PropertyChanged; + + public void NotityPropertyChanged(string propertyName) + { + if (PropertyChanged != null) + { + PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + + #endregion + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TA_USER_BUTTON.cs b/北京北汽/SCP/Model/DataCenterTables/TA_USER_BUTTON.cs new file mode 100644 index 0000000..d6cd712 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TA_USER_BUTTON.cs @@ -0,0 +1,63 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ûťȨ")] + public class TA_USER_BUTTON : IUpdatableTable, IEnable + { + [Description("û")] + [Required(AllowEmptyStrings = true)] + [Index("IndexUserButton", Order = 0, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string UserName { get; set; } + + [Description("")] + [Required(AllowEmptyStrings = true)] + [Index("IndexUserButton", Order = 1, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string TableName { get; set; } + + + [Description("ť")] + [Required(AllowEmptyStrings = true)] + [Index("IndexUserButton", Order = 2, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string ButtonCode { get; set; } + + #region ֶ + + [Description("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } = ""; + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } = DateTime.Now; + + + [Description("ע")] + public string Remark { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + + public bool Enable { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TA_USER_MENU.cs b/北京北汽/SCP/Model/DataCenterTables/TA_USER_MENU.cs new file mode 100644 index 0000000..fc22c4f --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TA_USER_MENU.cs @@ -0,0 +1,57 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("û˵Ȩ")] + public class TA_USER_MENU : IUpdatableTable, IEnable + { + [Description("û")] + [Required(AllowEmptyStrings = true)] + [Index("IndexUserMenu", Order = 0, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string UserName { get; set; } + + + [Description("˵")] + [Required(AllowEmptyStrings = true)] + [Index("IndexUserMenu", Order = 1, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string MenuCode { get; set; } + + #region ֶ + + [Description("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } = DateTime.Now; + + + [Description("ע")] + public string Remark { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + + public bool Enable { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TA_USER_TABLE.cs b/北京北汽/SCP/Model/DataCenterTables/TA_USER_TABLE.cs new file mode 100644 index 0000000..a4597a8 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TA_USER_TABLE.cs @@ -0,0 +1,57 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ûȨ")] + public class TA_USER_TABLE : IUpdatableTable, IEnable + { + [Description("û")] + [Required(AllowEmptyStrings = true)] + [Index("IndexUserTable", Order = 0, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string UserName { get; set; } + + + [Description("")] + [Required(AllowEmptyStrings = true)] + [Index("IndexUserTable", Order = 1, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string TableName { get; set; } + + #region ֶ + + [Description("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } = DateTime.Now; + + + [Description("ע")] + public string Remark { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + + public bool Enable { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TL_DATA_CHANGE.cs b/北京北汽/SCP/Model/DataCenterTables/TL_DATA_CHANGE.cs new file mode 100644 index 0000000..a9c022f --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TL_DATA_CHANGE.cs @@ -0,0 +1,56 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("数据变更日志")] + public class TL_DATA_CHANGE : ITable, IEnable + { + [Required(AllowEmptyStrings = true)] + [Description("日志类型")] + public EnumBaseDataLogType LogType { get; set; } + + [Required(AllowEmptyStrings = true)] + [Description("数据类型")] + [StringLength(50)] + public string DataType { get; set; } + + [Required(AllowEmptyStrings = true)] + [Description("原值")] + public string OldValue { get; set; } + + [Required(AllowEmptyStrings = true)] + [Description("新值")] + public string NewValue { get; set; } + + #region 公共字段 + + [Description("创建人")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } = ""; + + [Description("创建时间")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + + [IsDataGridColum(true, 3)] + [Description("备注")] + public string Remark { get; set; } + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + + public bool Enable { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TL_EXCEPTION.cs b/北京北汽/SCP/Model/DataCenterTables/TL_EXCEPTION.cs new file mode 100644 index 0000000..bd98e06 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TL_EXCEPTION.cs @@ -0,0 +1,48 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("异常日志表")] + public class TL_EXCEPTION : ITable + { + [Description("日志类型")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string LogType { get; set; } + + [Description("异常消息")] + public string ExMessage { get; set; } + + [Description("异常信息")] + public string ExString { get; set; } + + #region 公共字段 + + [Description("创建人")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } = ""; + + [Description("创建时间")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + + [IsDataGridColum(true, 3)] + [Description("备注")] + public string Remark { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TL_LOGIN.cs b/北京北汽/SCP/Model/DataCenterTables/TL_LOGIN.cs new file mode 100644 index 0000000..f3bed57 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TL_LOGIN.cs @@ -0,0 +1,67 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using CK.SCP.Utils; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("登录日志表")] + public class TL_LOGIN : ITable + { + [Description("日志类型")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string Type { get; set; } + + [Description("客户端电脑名称")] + [Required(AllowEmptyStrings = true)] + [StringLength(200)] + public string Client { get; set; } + + [Description("客户端IP")] + [Required(AllowEmptyStrings = true)] + [StringLength(200)] + public string IP { get; set; } + + [Description("会话编号")] + [Required(AllowEmptyStrings = true)] + [StringLength(200)] + public string SessionId { get; set; } + + [Description("信息")] + [StringLength(200)] + public string Message { get; set; } + + //public override string ToString() + //{ + // return EntitiesHelper.GetPropertiesString(this); + //} + + #region 公共字段 + + [Description("创建人")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } = ""; + + [Description("创建时间")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + + [IsDataGridColum(true, 3)] + [Description("备注")] + public string Remark { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_ACCOUNT.cs b/北京北汽/SCP/Model/DataCenterTables/TS_ACCOUNT.cs new file mode 100644 index 0000000..9f74bae --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_ACCOUNT.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("Ŀ")] + public class TS_ACCOUNT : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexAccount", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_BOM.cs b/北京北汽/SCP/Model/DataCenterTables/TS_BOM.cs new file mode 100644 index 0000000..34f5b79 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_BOM.cs @@ -0,0 +1,102 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("BOM")] + public class TS_BOM : IUpdatableTable, ISoftDelete, IDomainSite + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexBom", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string ParentPart { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string ComponentPart { get; set; } + [IsDataGridColum(true, 3)] + [Description("ο")] + [StringLength(50)] + public string Reference { get; set; } + [IsDataGridColum(true, 4)] + [Description("Ч")] + public DateTime StartEffective { get; set; } + [IsDataGridColum(true, 5)] + [Description("ÿ")] + public decimal QuantityPer { get; set; } + [IsDataGridColum(true, 6)] + [Description("ṹ")] + [StringLength(50)] + public string StructureType { get; set; } + [IsDataGridColum(true, 7)] + [Description("Ч")] + public DateTime EndEffective { get; set; } + [IsDataGridColum(true, 8)] + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + [IsDataGridColum(true, 9)] + [Description("Ʒ")] + public decimal Scrap { get; set; } + [IsDataGridColum(true, 10)] + [Description("ǰ")] + public int LeadTimeOffset { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + public int Operation { get; set; } + [IsDataGridColum(true, 12)] + [Description("")] + public int SequenceNumber { get; set; } + [IsDataGridColum(true, 13)] + [Description("Ԥٷֱ")] + public decimal FporecastPercent { get; set; } + [IsDataGridColum(true, 14)] + [Description("")] + [StringLength(50)] + public string OptionGroup { get; set; } + [IsDataGridColum(true, 15)] + [Description("")] + [StringLength(50)] + public string Process { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 17)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 18)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_CODE.cs b/北京北汽/SCP/Model/DataCenterTables/TS_CODE.cs new file mode 100644 index 0000000..90cf6e5 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_CODE.cs @@ -0,0 +1,84 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ͨô")] + public class TS_CODE : IUpdatableTable, ISoftDelete,INotifyPropertyChanged + { + [IsDataGridColum(true, 1)] + [Description("ͨô")] + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexCode", Order = 0, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string Code { get; set; } + + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 4)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 5)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 3)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + + #region IsChecked + + private bool _isChecked = false; + + [NotMapped] + public bool IsChecked + { + get { return _isChecked; } + set + { + _isChecked = value; + NotityPropertyChanged("IsChecked"); + } + } + + #endregion + + #region INotifyPropertyChangedӿ + + public event PropertyChangedEventHandler PropertyChanged; + + public void NotityPropertyChanged(string propertyName) + { + if (PropertyChanged != null) + { + PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + + #endregion + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_CODE_TYPE.cs b/北京北汽/SCP/Model/DataCenterTables/TS_CODE_TYPE.cs new file mode 100644 index 0000000..6ce6960 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_CODE_TYPE.cs @@ -0,0 +1,53 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ͨôͱ")] + public class TS_CODE_TYPE : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexCodeType", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("ͨʹ")] + [StringLength(50)] + public string Code { get; set; } + + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 4)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 5)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 3)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_COLOR.cs b/北京北汽/SCP/Model/DataCenterTables/TS_COLOR.cs new file mode 100644 index 0000000..2877ae3 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_COLOR.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ɫ")] + public class TS_COLOR : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexColor", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_COST_CENTER.cs b/北京北汽/SCP/Model/DataCenterTables/TS_COST_CENTER.cs new file mode 100644 index 0000000..b702dce --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_COST_CENTER.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ɱı")] + public class TS_COST_CENTER : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexCostCenter", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_CUSTOMER.cs b/北京北汽/SCP/Model/DataCenterTables/TS_CUSTOMER.cs new file mode 100644 index 0000000..3b77dff --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_CUSTOMER.cs @@ -0,0 +1,312 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ͻ")] + public class TS_CUSTOMER : IUpdatableTable, ISoftDelete, IDomainSite + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexCustomer", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("ͻ")] + [StringLength(50)] + public string CustomerCode { get; set; } + [IsDataGridColum(true, 2)] + [Description("ͻ")] + [StringLength(50)] + public string CustomerName { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string SearchName { get; set; } + [IsDataGridColum(true, 4)] + [Description("м")] + [StringLength(50)] + public string SecondName { get; set; } + [IsDataGridColum(true, 5)] + [Description("")] + [StringLength(50)] + public string ThirdName { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string GroupName { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string Active { get; set; } + [IsDataGridColum(true, 8)] + [Description("ͻַ")] + [StringLength(50)] + public string Address1 { get; set; } + [IsDataGridColum(true, 9)] + [Description("ͻַ")] + [StringLength(50)] + public string Address2 { get; set; } + [IsDataGridColum(true, 10)] + [Description("ͻַ")] + [StringLength(50)] + public string Address3 { get; set; } + [IsDataGridColum(true, 11)] + [Description("ʱ")] + [StringLength(50)] + public string ZipCode { get; set; } + [IsDataGridColum(true, 12)] + [Description("")] + [StringLength(50)] + public string City { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + [StringLength(50)] + public string Country { get; set; } + [IsDataGridColum(true, 14)] + [Description("绰")] + [StringLength(50)] + public string Telephone { get; set; } + [IsDataGridColum(true, 15)] + [Description("ʡ")] + [StringLength(50)] + public string province { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string County { get; set; } + [IsDataGridColum(true, 17)] + [Description("")] + [StringLength(50)] + public string Fax { get; set; } + [IsDataGridColum(true, 18)] + [Description("Դ")] + [StringLength(50)] + public string LanguageCode { get; set; } + [IsDataGridColum(true, 19)] + [Description("ʼ")] + [StringLength(50)] + public string Email { get; set; } + [IsDataGridColum(true, 20)] + [Description("ַ")] + [StringLength(50)] + public string Internet { get; set; } + [IsDataGridColum(true, 21)] + [Description("˰ַ")] + [StringLength(50)] + public string AddressIsTaxable { get; set; } + [IsDataGridColum(true, 22)] + [Description("˰")] + [StringLength(50)] + public string AddressIsTaxIncluded { get; set; } + [IsDataGridColum(true, 23)] + [Description("˰")] + [StringLength(50)] + public string FederalTax { get; set; } + [IsDataGridColum(true, 24)] + [Description("˰")] + [StringLength(50)] + public string StateTax { get; set; } + [IsDataGridColum(true, 25)] + [Description("˰1")] + [StringLength(50)] + public string MiscTax1 { get; set; } + [IsDataGridColum(true, 26)] + [Description("˰2")] + [StringLength(50)] + public string MiscTax2 { get; set; } + [IsDataGridColum(true, 27)] + [Description("˰3")] + [StringLength(50)] + public string MiscTax3 { get; set; } + [IsDataGridColum(true, 28)] + [Description("˰")] + [StringLength(50)] + public string TaxInCity { get; set; } + [IsDataGridColum(true, 29)] + [Description("˰")] + [StringLength(50)] + public string TaxZone { get; set; } + [IsDataGridColum(true, 30)] + [Description("˰")] + [StringLength(50)] + public string TaxClass { get; set; } + [IsDataGridColum(true, 31)] + [Description("˰;")] + [StringLength(50)] + public string TaxUsage { get; set; } + [IsDataGridColum(true, 32)] + [Description("")] + [StringLength(50)] + public string Title { get; set; } + [IsDataGridColum(true, 33)] + [Description("ϵ")] + [StringLength(50)] + public string ContactName { get; set; } + [IsDataGridColum(true, 34)] + [Description("д")] + [StringLength(50)] + public string Initials { get; set; } + [IsDataGridColum(true, 35)] + [Description("")] + [StringLength(50)] + public string Function { get; set; } + [IsDataGridColum(true, 36)] + [Description("Ա")] + [StringLength(50)] + public string Gender { get; set; } + [IsDataGridColum(true, 37)] + [Description("Ҫϵ")] + [StringLength(50)] + public string ContactIsPrimary { get; set; } + [IsDataGridColum(true, 38)] + [Description("Ҫϵ")] + [StringLength(50)] + public string ContactIsSecondary { get; set; } + [IsDataGridColum(true, 39)] + [Description("")] + [StringLength(50)] + public string Compens { get; set; } + [IsDataGridColum(true, 40)] + [Description("Ʊļ")] + [StringLength(50)] + public string GlProfileInvoice { get; set; } + [IsDataGridColum(true, 41)] + [Description("Ʊݿļ")] + [StringLength(50)] + public string GlProfileCreditNote { get; set; } + [IsDataGridColum(true, 42)] + [Description("Ԥļ")] + [StringLength(50)] + public string GlProfilePrepayment { get; set; } + [IsDataGridColum(true, 43)] + [Description("ۼļ")] + [StringLength(50)] + public string GLProfileDeduction { get; set; } + [IsDataGridColum(true, 44)] + [Description("˿ļ")] + [StringLength(50)] + public string AccountGLProfile { get; set; } + [IsDataGridColum(true, 45)] + [Description("ÿļ")] + [StringLength(50)] + public string FinanceChargeProfile { get; set; } + [IsDataGridColum(true, 46)] + [Description("˻ļ")] + [StringLength(50)] + public string SubAccountProfile { get; set; } + [IsDataGridColum(true, 47)] + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + [IsDataGridColum(true, 48)] + [Description("ͻ")] + [StringLength(50)] + public string Customertype { get; set; } + [IsDataGridColum(true, 49)] + [Description("֧")] + [StringLength(50)] + public string CreditTerms { get; set; } + [IsDataGridColum(true, 50)] + [Description("Ʊ״̬")] + [StringLength(50)] + public string InvoiceStatusCode { get; set; } + + [Description("")] + [StringLength(50)] + public string PaymentGroup { get; set; } + + [Description("˵ϸ")] + [StringLength(50)] + public string BillingSchedule { get; set; } + + [Description("Ʊտ")] + [StringLength(50)] + public string BillPayee { get; set; } + + [Description("ƱȨ")] + [StringLength(50)] + public string InvoicebyAuthorization { get; set; } + [IsDataGridColum(true, 51)] + [Description("Ա")] + [StringLength(50)] + public string SalesPerson { get; set; } + [IsDataGridColum(true, 52)] + [Description("ʽ")] + [StringLength(50)] + public string ShipVia { get; set; } + [IsDataGridColum(true, 53)] + [Description("ת˰")] + [StringLength(50)] + public string Resale { get; set; } + [IsDataGridColum(true, 54)] + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + [IsDataGridColum(true, 55)] + [Description("")] + [StringLength(50)] + public string Region { get; set; } + [IsDataGridColum(true, 56)] + [Description("ۿ۱")] + [StringLength(50)] + public string DiscountTable { get; set; } + [IsDataGridColum(true, 57)] + [Description("̶۸")] + [StringLength(50)] + public string FixfdPrice { get; set; } + [IsDataGridColum(true, 58)] + [Description("ռ˼")] + [StringLength(50)] + public string DayBookSet { get; set; } + [IsDataGridColum(true, 59)] + [Description("иʽ")] + [StringLength(50)] + public string BankFormat { get; set; } + [IsDataGridColum(true, 60)] + [Description("ͻ")] + [StringLength(50)] + public string CustomerBank { get; set; } + [IsDataGridColum(true, 61)] + [Description("")] + [StringLength(50)] + public string OwnBank { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 62)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 63)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 64)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [IsDataGridColum(true, 65)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 66)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_CUSTOMER_PART.cs b/北京北汽/SCP/Model/DataCenterTables/TS_CUSTOMER_PART.cs new file mode 100644 index 0000000..bdc1218 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_CUSTOMER_PART.cs @@ -0,0 +1,68 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ͻ")] + public class TS_CUSTOMER_PART : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexCustomerPart", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("ͻ/﷢")] + [StringLength(50)] + public string CustomerShipto { get; set; } + [IsDataGridColum(true, 2)] + [Description("ͻĿ")] + [StringLength(50)] + public string CustomerPart { get; set; } + [IsDataGridColum(true, 3)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 4)] + [Description("ע")] + [StringLength(50)] + public string Comment { get; set; } + [IsDataGridColum(true, 5)] + [Description("ʾͻ")] + [StringLength(50)] + public string DisplayCustomerPart { get; set; } + [IsDataGridColum(true, 6)] + [Description("ͻϹ̱")] + [StringLength(50)] + public string CustomerPartEcoNbr { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 8)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 9)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 10)] + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_CUSTOMER_TYPE.cs b/北京北汽/SCP/Model/DataCenterTables/TS_CUSTOMER_TYPE.cs new file mode 100644 index 0000000..5c32b18 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_CUSTOMER_TYPE.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ͻͱ")] + public class TS_CUSTOMER_TYPE : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexCustomerType", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_DEPARTMENT.cs b/北京北汽/SCP/Model/DataCenterTables/TS_DEPARTMENT.cs new file mode 100644 index 0000000..7746a3d --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_DEPARTMENT.cs @@ -0,0 +1,60 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ű")] + public class TS_DEPARTMENT : IUpdatableTable, ISoftDelete,IDomainSite + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexDepartMent", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("Ŵ")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 7)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_DOMAIN.cs b/北京北汽/SCP/Model/DataCenterTables/TS_DOMAIN.cs new file mode 100644 index 0000000..567a36e --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_DOMAIN.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ݱ")] + public class TS_DOMAIN : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexDoMain", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_EDI_DATA.cs b/北京北汽/SCP/Model/DataCenterTables/TS_EDI_DATA.cs new file mode 100644 index 0000000..b17d5de --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_EDI_DATA.cs @@ -0,0 +1,86 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("EDIݱ")] + public class TS_EDI_DATA : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexEdiData", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("۶")] + [StringLength(50)] + public string CustomerOrder { get; set; } + [IsDataGridColum(true, 2)] + [Description("﷢")] + [StringLength(50)] + public string ShipFrom { get; set; } + [IsDataGridColum(true, 3)] + [Description("ͻ")] + [StringLength(50)] + public string Customer { get; set; } + [IsDataGridColum(true, 4)] + [Description("ͻ")] + [StringLength(50)] + public string CustomerPart { get; set; } + [IsDataGridColum(true, 5)] + [Description("к")] + public int Line { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string Part { get; set; } + [IsDataGridColum(true, 7)] + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + [IsDataGridColum(true, 8)] + [Description("ͻο")] + [StringLength(50)] + public string CustomerReference { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + public DateTime ReceiveDate { get; set; } + [IsDataGridColum(true, 10)] + [Description("ʱ")] + public DateTime ReceiveTime { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + public DateTime DemandDate { get; set; } + [IsDataGridColum(true, 12)] + [Description("")] + public decimal DemandQuantity { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 14)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 15)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_ENTITY.cs b/北京北汽/SCP/Model/DataCenterTables/TS_ENTITY.cs new file mode 100644 index 0000000..c0d8905 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_ENTITY.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("Ƶλ")] + public class TS_ENTITY : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexEntity", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("Ƶλ")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_LINE.cs b/北京北汽/SCP/Model/DataCenterTables/TS_LINE.cs new file mode 100644 index 0000000..9837306 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_LINE.cs @@ -0,0 +1,99 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("߱")] + public class TS_LINE : IUpdatableTable, ISoftDelete, IDomain + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexLine", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string ProductionLine { get; set; } + [IsDataGridColum(true, 2)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + [IsDataGridColum(true, 3)] + [Description("˵")] + [StringLength(50)] + public string Description { get; set; } + [IsDataGridColum(true, 4)] + [Description("/Сʱ")] + public decimal UnitsHour { get; set; } + [IsDataGridColum(true, 5)] + [Description("дС")] + public bool EnableRunSize { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public decimal NumberOfLines { get; set; } + [IsDataGridColum(true, 7)] + [Description("ʱ仺-")] + public int DurationBuffer { get; set; } + [IsDataGridColum(true, 8)] + [Description("ʱ仺ʱ")] + [StringLength(50)] + public string DurationBufferHMS { get; set; } + [IsDataGridColum(true, 9)] + [Description("ʱ-")] + public int SetupTime { get; set; } + [IsDataGridColum(true, 10)] + [Description("ʱ")] + [StringLength(50)] + public string SetupTimeHMS { get; set; } + [IsDataGridColum(true, 11)] + [Description("Զ̶")] + public bool LnAutofirm { get; set; } + [IsDataGridColum(true, 12)] + [Description("ϴԶ̶")] + public DateTime LnLastAutofirm { get; set; } + [IsDataGridColum(true, 13)] + [Description("ID")] + [StringLength(50)] + public string LnScheduler { get; set; } + [IsDataGridColum(true, 14)] + [Description("޽")] + [StringLength(50)] + public string Dtendlit { get; set; } + [IsDataGridColum(true, 15)] + [Description("ں")] + public int EndNumber { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 17)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 18)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_LINE_PART.cs b/北京北汽/SCP/Model/DataCenterTables/TS_LINE_PART.cs new file mode 100644 index 0000000..f75de2f --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_LINE_PART.cs @@ -0,0 +1,113 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ϵ")] + public class TS_LINE_PART : IUpdatableTable, ISoftDelete, IDomain + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexLinePart", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string ProductionLine { get; set; } + [IsDataGridColum(true, 3)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʼ")] + public DateTime StartDate { get; set; } + [IsDataGridColum(true, 5)] + [Description("/Сʱ")] + public decimal UnitsHour { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public decimal NumberOfLines { get; set; } + [IsDataGridColum(true, 7)] + [Description("ʱ-")] + public int SetupTime { get; set; } + [IsDataGridColum(true, 8)] + [Description("ʱ")] + [StringLength(50)] + public string SetupTimeHMS { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + public bool PrimaryLine { get; set; } + [IsDataGridColum(true, 10)] + [Description("Ա")] + public decimal SetupCrew { get; set; } + [IsDataGridColum(true, 11)] + [Description("С")] + public int SetSize { get; set; } + [IsDataGridColum(true, 12)] + [Description("ȫԱ")] + public decimal RunCrew { get; set; } + [IsDataGridColum(true, 13)] + [Description("С")] + public int RunSize { get; set; } + [IsDataGridColum(true, 14)] + [Description("嵥")] + [StringLength(50)] + public string BomCode { get; set; } + [IsDataGridColum(true, 15)] + [Description("")] + [StringLength(50)] + public string Routing { get; set; } + [IsDataGridColum(true, 16)] + [Description("ID")] + [StringLength(50)] + public string ToolId { get; set; } + [IsDataGridColum(true, 17)] + [Description("˳1")] + [StringLength(50)] + public string RunSequence1 { get; set; } + [IsDataGridColum(true, 18)] + [Description("˳2")] + [StringLength(50)] + public string RunSequence2 { get; set; } + [IsDataGridColum(true, 19)] + [Description("ע")] + public bool Comments { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 20)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 21)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 22)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 23)] + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + [IsDataGridColum(true, 24)] + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_LOCATION.cs b/北京北汽/SCP/Model/DataCenterTables/TS_LOCATION.cs new file mode 100644 index 0000000..171b7fe --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_LOCATION.cs @@ -0,0 +1,101 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("λ")] + public class TS_LOCATION : IUpdatableTable, ISoftDelete, IDomain + { + [IsDataGridColum(true, 1)] + [Description("ص")] + [StringLength(50)] + + public string Site { get; set; } + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexLocation", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 2)] + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 4)] + [Description("״̬")] + [StringLength(50)] + public string InventoryStatus { get; set; } + [IsDataGridColum(true, 5)] + [Description("Ŀ")] + [StringLength(50)] + public string Project { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public DateTime DateCreated { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + public bool Permanent { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + [StringLength(50)] + public string Type { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + public bool SinglePart { get; set; } + [IsDataGridColum(true, 10)] + [Description("/ο")] + public bool SingleLotReference { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + public decimal Capacity { get; set; } + [IsDataGridColum(true, 12)] + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + [IsDataGridColum(true, 13)] + [Description("λ")] + public bool ReservedLocations { get; set; } + [IsDataGridColum(true, 14)] + [Description("ʵַ")] + [StringLength(50)] + public string PhysicalAddress { get; set; } + [IsDataGridColum(true, 15)] + [Description("״̬")] + [StringLength(50)] + public string Status { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 17)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 18)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_MES_DATA.cs b/北京北汽/SCP/Model/DataCenterTables/TS_MES_DATA.cs new file mode 100644 index 0000000..5dc8bf8 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_MES_DATA.cs @@ -0,0 +1,40 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("Mesݱ")] + public class TS_MES_DATA : IUpdatableTable, ISoftDelete + { + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 2)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 3)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_PACK.cs b/北京北汽/SCP/Model/DataCenterTables/TS_PACK.cs new file mode 100644 index 0000000..5b0dc49 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_PACK.cs @@ -0,0 +1,67 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("")] + public class TS_PACK : IUpdatableTable, ISoftDelete, IDomain + { + [IsDataGridColum(true, 1)] + [Description("ص")] + [StringLength(50)] + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexPack", Order = 0, IsUnique = true, IsClustered = false)] + public string Site { get; set; } + [IsDataGridColum(true, 2)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 3)] + [Description("λ")] + [StringLength(50)] + public string UM { get; set; } + [IsDataGridColum(true, 4)] + [Description("üλ")] + [StringLength(50)] + public string AlternateUm { get; set; } + [IsDataGridColum(true, 5)] + [Description("λ")] + public int UmConversion { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 5)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 6)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 7)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_PART_DET.cs b/北京北汽/SCP/Model/DataCenterTables/TS_PART_DET.cs new file mode 100644 index 0000000..4e31fc4 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_PART_DET.cs @@ -0,0 +1,247 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ϸ")] + public class TS_PART_DET : IUpdatableTable, ISoftDelete, IDomain + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexPartDet", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 2)] + [Description("ABC ")] + [StringLength(50)] + public string AbcClass { get; set; } + [IsDataGridColum(true, 3)] + [Description("ſ")] + [StringLength(50)] + public string LotControl { get; set; } + [IsDataGridColum(true, 4)] + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + [IsDataGridColum(true, 5)] + [Description("λ")] + [StringLength(50)] + public string LocationType { get; set; } + [IsDataGridColum(true, 6)] + [Description("Զ")] + public bool AutoMaticLotNumbers { get; set; } + [IsDataGridColum(true, 7)] + [Description("ƽ")] + public int AverageInterval { get; set; } + [IsDataGridColum(true, 8)] + [Description("̵")] + public int CycleCountInterval { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + public int ShelfLife { get; set; } + [IsDataGridColum(true, 10)] + [Description("ؼ")] + public bool KeyPart { get; set; } + [IsDataGridColum(true, 11)] + [Description("ɹջ״̬")] + [StringLength(50)] + public string PoReceiptStatus { get; set; } + [IsDataGridColum(true, 12)] + [Description("Ч")] + public bool RctPoActive { get; set; } + [IsDataGridColum(true, 13)] + [Description("ӹջ״̬")] + [StringLength(50)] + public string WoReceiptStatus { get; set; } + [IsDataGridColum(true, 14)] + [Description("Ч")] + public bool RctWoActive { get; set; } + [IsDataGridColum(true, 15)] + [Description("ǿ涩")] + [StringLength(50)] + public string MemoOrderType { get; set; } + [IsDataGridColum(true, 16)] + [Description("ƻ")] + public bool MasterSchedule { get; set; } + [IsDataGridColum(true, 17)] + [Description("ƻ")] + public bool PlanOrders { get; set; } + [IsDataGridColum(true, 18)] + [Description("ʱ")] + public int TimeFence { get; set; } + [IsDataGridColum(true, 19)] + [Description("")] + [StringLength(50)] + public string OrderPolicy { get; set; } + [IsDataGridColum(true, 20)] + [Description("")] + public decimal OrderQuantity { get; set; } + [IsDataGridColum(true, 21)] + [Description("")] + public int OrderPeriod { get; set; } + [IsDataGridColum(true, 22)] + [Description("ȫ")] + public decimal SafetyStock { get; set; } + [IsDataGridColum(true, 23)] + [Description("ȫǰ")] + public decimal SafetyTime { get; set; } + [IsDataGridColum(true, 23)] + [Description("ٶ")] + public decimal ReorderPoint { get; set; } + [IsDataGridColum(true, 25)] + [Description("ƻ޸")] + [StringLength(50)] + public string PlanningRev { get; set; } + [IsDataGridColum(true, 26)] + [Description("ԭ")] + public bool IssuePolicy { get; set; } + [IsDataGridColum(true, 27)] + [Description("ɹԱ/ƻԱ")] + [StringLength(50)] + public string BuyerPlanner { get; set; } + [IsDataGridColum(true, 28)] + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + [IsDataGridColum(true, 29)] + [Description("ɹص")] + [StringLength(50)] + public string PoSite { get; set; } + [IsDataGridColum(true, 30)] + [Description("ɹ/")] + [StringLength(50)] + public string PurMfg { get; set; } + [IsDataGridColum(true, 31)] + [Description("")] + [StringLength(50)] + public string ConfigurationType { get; set; } + [IsDataGridColum(true, 32)] + [Description("λ")] + [StringLength(50)] + public string InspectionLocation { get; set; } + [IsDataGridColum(true, 33)] + [Description("Ҫ")] + public bool InspectionRequired { get; set; } + [IsDataGridColum(true, 34)] + [Description("ǰ")] + public int InspectionLeadTime { get; set; } + [IsDataGridColum(true, 35)] + [Description("ۼǰ")] + public int CumulativeLeadTime { get; set; } + [IsDataGridColum(true, 36)] + [Description("ǰ")] + public int ManufacturingLedaTime { get; set; } + [IsDataGridColum(true, 37)] + [Description("ɹǰ")] + public int PurchaseLeadTime { get; set; } + [IsDataGridColum(true, 38)] + [Description("ATPʵʩˮƽ")] + [StringLength(50)] + public string AtpEnforcementLevel { get; set; } + [IsDataGridColum(true, 39)] + [Description("ϵATP")] + public bool FamilyATP { get; set; } + [IsDataGridColum(true, 40)] + [Description("ATPˮƽ")] + public int AtpHorizon { get; set; } + [IsDataGridColum(true, 41)] + [Description("1")] + [StringLength(50)] + public string RunSeq1 { get; set; } + [IsDataGridColum(true, 42)] + [Description("2")] + [StringLength(50)] + public string RunSeq2 { get; set; } + [IsDataGridColum(true, 43)] + [Description("")] + public bool Phantom { get; set; } + [IsDataGridColum(true, 44)] + [Description("С")] + public decimal MinimumOrder { get; set; } + [IsDataGridColum(true, 45)] + [Description("")] + public decimal MaximumOrder { get; set; } + [IsDataGridColum(true, 46)] + [Description("")] + public decimal OrderMultiple { get; set; } + [IsDataGridColum(true, 47)] + [Description("ڲĹ")] + public bool OperationBasedYield { get; set; } + [IsDataGridColum(true, 48)] + [Description("")] + public decimal YieldPercent { get; set; } + [IsDataGridColum(true, 49)] + [Description("ʱ")] + [StringLength(50)] + public string RunTime { get; set; } + [IsDataGridColum(true, 50)] + [Description("ʱ")] + public decimal SetupTime { get; set; } + [IsDataGridColum(true, 51)] + [Description("EMT")] + [StringLength(50)] + public string EmtType { get; set; } + [IsDataGridColum(true, 52)] + [Description("EMTԶ")] + public bool AutomaticEmtProcessing { get; set; } + [IsDataGridColum(true, 53)] + [Description("")] + [StringLength(50)] + public string NetWorkCode { get; set; } + [IsDataGridColum(true, 54)] + [Description("̴")] + [StringLength(50)] + public string RoutingCode { get; set; } + [IsDataGridColum(true, 55)] + [Description("嵥/䷽")] + [StringLength(50)] + public string BomFormulaCode { get; set; } + [IsDataGridColum(true, 56)] + [Description("")] + [StringLength(50)] + public string ReplenishmentMethod { get; set; } + [IsDataGridColum(true, 57)] + [Description("Ƿ")] + [StringLength(50)] + public string IsMaster { get; set; } + [IsDataGridColum(true, 58)] + [Description("ɫ")] + [StringLength(50)] + public string PartColor { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 59)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 60)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 61)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 62)] + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + [IsDataGridColum(true, 63)] + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + [IsDataGridColum(true, 64)] + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_PART_MSTR.cs b/北京北汽/SCP/Model/DataCenterTables/TS_PART_MSTR.cs new file mode 100644 index 0000000..b0ddf6b --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_PART_MSTR.cs @@ -0,0 +1,140 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("")] + public class TS_PART_MSTR : IUpdatableTable, ISoftDelete, IDomain + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexPartMstr", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 2)] + [Description("1")] + [StringLength(50)] + public string Desc1 { get; set; } + [IsDataGridColum(true, 3)] + [Description("2")] + [StringLength(50)] + public string Desc2 { get; set; } + [IsDataGridColum(true, 4)] + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + [IsDataGridColum(true, 5)] + [Description("Ʒ")] + [StringLength(50)] + public string ProdLine { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public DateTime AddDate { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string DsgnGroup { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + [StringLength(50)] + public string PromotionGroup { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string PartType { get; set; } + [IsDataGridColum(true, 10)] + [Description("״̬")] + [StringLength(50)] + public string Status { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + [StringLength(50)] + public string Group { get; set; } + [IsDataGridColum(true, 12)] + [Description("ͼֽ")] + [StringLength(50)] + public string Drawing { get; set; } + [IsDataGridColum(true, 13)] + [Description("Ŀ޸")] + [StringLength(50)] + public string PartRevision { get; set; } + [IsDataGridColum(true, 14)] + [Description("ͼֽλ")] + [StringLength(50)] + public string DrawingLocation { get; set; } + [IsDataGridColum(true, 15)] + [Description("С")] + [StringLength(50)] + public string Size { get; set; } + [IsDataGridColum(true, 16)] + [Description("۸ۿ")] + [StringLength(50)] + public string PriceBreakCategory { get; set; } + [IsDataGridColum(true, 17)] + [Description("")] + public bool AuxiliaryMaterial { get; set; } + [IsDataGridColum(true, 18)] + [Description("߽")] + public bool OfflineSettlement { get; set; } + [IsDataGridColum(true, 19)] + [Description("Qȼ")] + [StringLength(50)] + public string Qgrade { get; set; } + [IsDataGridColum(true, 20)] + [Description("")] + [StringLength(50)] + public string WmsPartType { get; set; } + [IsDataGridColum(true, 21)] + [Description("ʽ")] + [StringLength(50)] + public string ManageWay { get; set; } + [IsDataGridColum(true, 22)] + [Description("")] + [StringLength(50)] + public string InventoryCode { get; set; } + [IsDataGridColum(true, 23)] + [Description("ͣ/")] + [StringLength(50)] + public string ManageType { get; set; } + [IsDataGridColum(true, 24)] + [Description("Ƿ")] + [StringLength(50)] + public string InspectType { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 24)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 25)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 27)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_PRODUCT_LINE.cs b/北京北汽/SCP/Model/DataCenterTables/TS_PRODUCT_LINE.cs new file mode 100644 index 0000000..bb492cd --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_PRODUCT_LINE.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("Ʒ")] + public class TS_PRODUCT_LINE : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexPartMstr", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("Ʒ")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("Ӧ˰")] + public bool Taxable { get; set; } + [IsDataGridColum(true, 4)] + [Description("˰")] + public int TaxClass { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 5)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 6)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 7)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_PROJECT.cs b/北京北汽/SCP/Model/DataCenterTables/TS_PROJECT.cs new file mode 100644 index 0000000..667ec33 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_PROJECT.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("Ŀ")] + public class TS_PROJECT : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexProject", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_PURCHASE_PRICE.cs b/北京北汽/SCP/Model/DataCenterTables/TS_PURCHASE_PRICE.cs new file mode 100644 index 0000000..3230438 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_PURCHASE_PRICE.cs @@ -0,0 +1,84 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ɹ۸")] + public class TS_PURCHASE_PRICE : IUpdatableTable, ISoftDelete, IDomain + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexPurchasePrice", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("Ŀ")] + [StringLength(50)] + public string PriceList { get; set; } + [IsDataGridColum(true, 2)] + [Description("˵")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("Ʒ")] + [StringLength(50)] + public string ProductLine { get; set; } + [IsDataGridColum(true, 4)] + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + [IsDataGridColum(true, 5)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 6)] + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + [IsDataGridColum(true, 7)] + [Description("ʼ")] + public DateTime Start { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + public DateTime ExpireDate { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string AmountType { get; set; } + [IsDataGridColum(true, 10)] + [Description("")] + public decimal Amount { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 12)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 13)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_ROUTING.cs b/北京北汽/SCP/Model/DataCenterTables/TS_ROUTING.cs new file mode 100644 index 0000000..ee490eb --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_ROUTING.cs @@ -0,0 +1,132 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ձ")] + public class TS_ROUTING : IUpdatableTable, ISoftDelete, IDomainSite + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexRouting", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("̴")] + [StringLength(50)] + public string RoutingCode { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + public int Operation { get; set; } + [IsDataGridColum(true, 3)] + [Description("ʼ")] + public DateTime StartDate { get; set; } + [IsDataGridColum(true, 4)] + [Description("׼")] + [StringLength(50)] + public string StandardOperration { get; set; } + [IsDataGridColum(true, 5)] + [Description("")] + [StringLength(50)] + public string WorkCenter { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string Machine { get; set; } + [IsDataGridColum(true, 7)] + [Description("˵")] + [StringLength(50)] + public string Description { get; set; } + [IsDataGridColum(true, 8)] + [Description("/")] + public int MachinesPerOperation { get; set; } + [IsDataGridColum(true, 9)] + [Description("ƽмӹ")] + public int OverlapUnits { get; set; } + [IsDataGridColum(true, 10)] + [Description("Ŷʱ")] + public decimal QueueTime { get; set; } + [IsDataGridColum(true, 11)] + [Description("ȴʱ")] + public decimal WaitTime { get; set; } + [IsDataGridColum(true, 12)] + [Description("ֽ׶εĹ")] + public bool MilestoneOperation { get; set; } + [IsDataGridColum(true, 13)] + [Description("תǰ")] + public int SubcontractLt { get; set; } + [IsDataGridColum(true, 14)] + [Description("Ա")] + public decimal SetupCrew { get; set; } + [IsDataGridColum(true, 15)] + [Description("ȫԱ")] + public decimal RunCrew { get; set; } + [IsDataGridColum(true, 16)] + [Description("ʱ")] + public decimal SetupTime { get; set; } + [IsDataGridColum(true, 17)] + [Description("ʱ")] + public decimal RunTime { get; set; } + [IsDataGridColum(true, 18)] + [Description("ƶʱ")] + public decimal MoveTime { get; set; } + [IsDataGridColum(true, 19)] + [Description("")] + public DateTime EndDate { get; set; } + [IsDataGridColum(true, 20)] + [Description("")] + public decimal YieldPercent { get; set; } + [IsDataGridColum(true, 21)] + [Description("ߴ")] + [StringLength(50)] + public string ToolCode { get; set; } + [IsDataGridColum(true, 22)] + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + [IsDataGridColum(true, 23)] + [Description("ֵ")] + public decimal InventoryValue { get; set; } + [IsDataGridColum(true, 24)] + [Description("תɱ")] + public decimal SubcontractCost { get; set; } + [IsDataGridColum(true, 25)] + [Description("ע")] + public bool Comments { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 26)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 27)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 28)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_SALE_PRICE.cs b/北京北汽/SCP/Model/DataCenterTables/TS_SALE_PRICE.cs new file mode 100644 index 0000000..f321d04 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_SALE_PRICE.cs @@ -0,0 +1,84 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ۼ۸")] + public class TS_SALE_PRICE : IUpdatableTable, ISoftDelete, IDomain + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexSalePrice", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("Ŀ")] + [StringLength(50)] + public string PriceList { get; set; } + [IsDataGridColum(true, 2)] + [Description("˵")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("Ʒ")] + [StringLength(50)] + public string ProductLine { get; set; } + [IsDataGridColum(true, 4)] + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + [IsDataGridColum(true, 5)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 6)] + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + [IsDataGridColum(true, 7)] + [Description("ʼ")] + public DateTime Start { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + public DateTime ExpireDate { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string AmountType { get; set; } + [IsDataGridColum(true, 10)] + [Description("")] + public decimal Amount { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 12)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 13)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_SHIFT.cs b/北京北汽/SCP/Model/DataCenterTables/TS_SHIFT.cs new file mode 100644 index 0000000..6761490 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_SHIFT.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ת")] + public class TS_SHIFT : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexShift", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_SITE.cs b/北京北汽/SCP/Model/DataCenterTables/TS_SITE.cs new file mode 100644 index 0000000..29d42a7 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_SITE.cs @@ -0,0 +1,97 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ص")] + public class TS_SITE : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexSite", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 4)] + [Description("Ƶλ")] + [StringLength(50)] + public string Entity { get; set; } + [IsDataGridColum(true, 5)] + [Description("״̬")] + [StringLength(50)] + public string Status { get; set; } + [IsDataGridColum(true, 6)] + [Description("Զɿλ")] + public bool AutoLocation { get; set; } + [IsDataGridColum(true, 7)] + [Description("λ")] + [StringLength(50)] + public string InspLocation { get; set; } + [IsDataGridColum(true, 8)] + [Description("EMTӦ")] + [StringLength(50)] + public string BtbSupplier { get; set; } + [IsDataGridColum(true, 9)] + [Description("ⲿӦ")] + public bool ExtSupplier { get; set; } + [IsDataGridColum(true, 10)] + [Description("תƲĿ")] + [StringLength(50)] + public string XferAcct { get; set; } + [IsDataGridColum(true, 11)] + [Description("תƲ˻")] + [StringLength(50)] + public string XferSub { get; set; } + [IsDataGridColum(true, 12)] + [Description("תƲɱ")] + [StringLength(50)] + public string XferCc { get; set; } + [IsDataGridColum(true, 13)] + [Description("POλ")] + [StringLength(50)] + public string GitLocation { get; set; } + [IsDataGridColum(true, 14)] + [Description("ʹüƻ/ȵĹ̨")] + public bool UsePlanSchedWbs { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 15)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 16)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 17)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_STAND_COST_PRICE.cs b/北京北汽/SCP/Model/DataCenterTables/TS_STAND_COST_PRICE.cs new file mode 100644 index 0000000..056cd9b --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_STAND_COST_PRICE.cs @@ -0,0 +1,69 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("׼ɱ۸")] + public class TS_STAND_COST_PRICE : IUpdatableTable, ISoftDelete, IDomain + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexStandCostPrice", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("Ϻ")] + [StringLength(50)] + public string Part { get; set; } + [IsDataGridColum(true, 2)] + [Description("ϳɱ")] + public int MaterialCost { get; set; } + [IsDataGridColum(true, 3)] + [Description("˹ɱ")] + public int LaborCost { get; set; } + [IsDataGridColum(true, 4)] + [Description("ӳɱ")] + public int BurdenCost { get; set; } + [IsDataGridColum(true, 5)] + [Description("ɱ")] + public int OverheadCost { get; set; } + [IsDataGridColum(true, 6)] + [Description("תɱ")] + public int SubcontrCost { get; set; } + [IsDataGridColum(true, 7)] + [Description("ɱ")] + public int CostSet { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 9)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 10)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_SUB_ACCOUNT.cs b/北京北汽/SCP/Model/DataCenterTables/TS_SUB_ACCOUNT.cs new file mode 100644 index 0000000..8a7cefc --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_SUB_ACCOUNT.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("˻")] + public class TS_SUB_ACCOUNT : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexSubAccount", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("˻")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("˻")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_SUPPLIER.cs b/北京北汽/SCP/Model/DataCenterTables/TS_SUPPLIER.cs new file mode 100644 index 0000000..56d8747 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_SUPPLIER.cs @@ -0,0 +1,309 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("Ӧ̱")] + public class TS_SUPPLIER : IUpdatableTable, ISoftDelete, IDomain + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexSupplier", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("Ӧ̴")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("Ӧ")] + [StringLength(50)] + public string Name { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string SearchName { get; set; } + [IsDataGridColum(true, 4)] + [Description("м")] + [StringLength(50)] + public string SecondName { get; set; } + [IsDataGridColum(true, 5)] + [Description("")] + [StringLength(50)] + public string ThirdName { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string GroupName { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + public bool Active { get; set; } + [IsDataGridColum(true, 8)] + [Description("Ӧ̵ַ")] + [StringLength(50)] + public string Address1 { get; set; } + [IsDataGridColum(true, 9)] + [Description("Ӧ̵ַ")] + [StringLength(50)] + public string Address2 { get; set; } + [IsDataGridColum(true, 10)] + [Description("Ӧ̵ַ")] + [StringLength(50)] + public string Address3 { get; set; } + [IsDataGridColum(true, 11)] + [Description("ʱ")] + public int ZipCode { get; set; } + [IsDataGridColum(true, 12)] + [Description("")] + [StringLength(50)] + public string City { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + [StringLength(50)] + public string Country { get; set; } + [IsDataGridColum(true, 14)] + [Description("绰")] + public int Telephone { get; set; } + [IsDataGridColum(true, 15)] + [Description("ʡ")] + [StringLength(50)] + public string province { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string County { get; set; } + [IsDataGridColum(true, 17)] + [Description("")] + public int Fax { get; set; } + [IsDataGridColum(true, 18)] + [Description("Դ")] + [StringLength(50)] + public string LanguageCode { get; set; } + [IsDataGridColum(true, 19)] + [Description("ʼ")] + public int Email { get; set; } + [IsDataGridColum(true, 20)] + [Description("ַ")] + public int Internet { get; set; } + [IsDataGridColum(true, 21)] + [Description("˰ַ")] + public bool AddressIsTaxable { get; set; } + [IsDataGridColum(true, 22)] + [Description("˰")] + public bool AddressIsTaxIncluded { get; set; } + [IsDataGridColum(true, 23)] + [Description("˰")] + [StringLength(50)] + public string FederalTax { get; set; } + [IsDataGridColum(true, 24)] + [Description("˰")] + [StringLength(50)] + public string StateTax { get; set; } + [IsDataGridColum(true, 25)] + [Description("˰1")] + [StringLength(50)] + public string MiscTax1 { get; set; } + [IsDataGridColum(true, 26)] + [Description("˰2")] + [StringLength(50)] + public string MiscTax2 { get; set; } + [IsDataGridColum(true, 27)] + [Description("˰3")] + [StringLength(50)] + public string MiscTax3 { get; set; } + [IsDataGridColum(true, 28)] + [Description("˰")] + public bool TaxInCity { get; set; } + [IsDataGridColum(true, 29)] + [Description("˰")] + [StringLength(50)] + public string TaxZone { get; set; } + [IsDataGridColum(true, 30)] + [Description("˰")] + public int TaxClass { get; set; } + [IsDataGridColum(true, 31)] + [Description("˰;")] + [StringLength(50)] + public string TaxUsage { get; set; } + [IsDataGridColum(true, 32)] + [Description("")] + [StringLength(50)] + public string Title { get; set; } + [IsDataGridColum(true, 33)] + [Description("ϵ")] + [StringLength(50)] + public string ContactName { get; set; } + [IsDataGridColum(true, 34)] + [Description("д")] + [StringLength(50)] + public string Initials { get; set; } + [IsDataGridColum(true, 35)] + [Description("")] + [StringLength(50)] + public string Function { get; set; } + [IsDataGridColum(true, 36)] + [Description("Ա")] + [StringLength(50)] + public string Gender { get; set; } + [IsDataGridColum(true, 37)] + [Description("Ҫϵ")] + public bool ContactIsPrimary { get; set; } + [IsDataGridColum(true, 38)] + [Description("Ҫϵ")] + public bool ContactIsSecondary { get; set; } + [IsDataGridColum(true, 39)] + [Description("")] + public bool Compens { get; set; } + [IsDataGridColum(true, 40)] + [Description("Ʊļ")] + public int GlProfileInvoice { get; set; } + [IsDataGridColum(true, 41)] + [Description("Ʊݿļ")] + public int GlProfileCreditNote { get; set; } + [IsDataGridColum(true, 42)] + [Description("Ԥļ")] + public int GlProfilePrepayment { get; set; } + [IsDataGridColum(true, 43)] + [Description("˿ļ")] + public int AccountGLProfile { get; set; } + [IsDataGridColum(true, 44)] + [Description("˻ļ")] + public int SubAccountProfile { get; set; } + [IsDataGridColum(true, 45)] + [Description("Ŵ")] + [StringLength(50)] + public string CreditAgencyReference { get; set; } + [IsDataGridColum(true, 46)] + [Description("̻")] + [StringLength(50)] + public string CommerceNumber { get; set; } + [IsDataGridColum(true, 47)] + [Description("TID֪ͨ")] + [StringLength(50)] + public string TidNotice { get; set; } + [IsDataGridColum(true, 48)] + [Description("ⲿͻ")] + [StringLength(50)] + public string ExternalCustomerNumber { get; set; } + [IsDataGridColum(true, 49)] + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + [IsDataGridColum(true, 1505)] + [Description("Ӧ")] + [StringLength(50)] + public string SupplierType { get; set; } + [IsDataGridColum(true, 51)] + [Description("ɹ")] + [StringLength(50)] + public string Purchasetype { get; set; } + [IsDataGridColum(true, 52)] + [Description("֧")] + [StringLength(50)] + public string CreditTerms { get; set; } + [IsDataGridColum(true, 53)] + [Description("Ʊ״̬")] + [StringLength(50)] + public string InvoiceStatusCode { get; set; } + [IsDataGridColum(true, 54)] + [Description("")] + [StringLength(50)] + public string PaymentGroup { get; set; } + [IsDataGridColum(true, 55)] + [Description("ͻ")] + public bool SendRemittance { get; set; } + [IsDataGridColum(true, 56)] + [Description("ָ")] + public bool SplitAccount { get; set; } + [IsDataGridColum(true, 57)] + [Description("ʽ")] + [StringLength(50)] + public string ShipVia { get; set; } + [IsDataGridColum(true, 58)] + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + [IsDataGridColum(true, 59)] + [Description("")] + [StringLength(50)] + public string Carrier { get; set; } + [IsDataGridColum(true, 60)] + [Description("ɹϵ")] + [StringLength(50)] + public string Purchasecontact { get; set; } + [IsDataGridColum(true, 61)] + [Description("ռ˼")] + [StringLength(50)] + public string DayBookSet { get; set; } + [IsDataGridColum(true, 62)] + [Description("幩Ӧ")] + public bool KanBanSupplier { get; set; } + [IsDataGridColum(true, 63)] + [Description("")] + [StringLength(50)] + public string PromotionGroup { get; set; } + [IsDataGridColum(true, 64)] + [Description("ɹԱ")] + [StringLength(50)] + public string Buyer { get; set; } + [IsDataGridColum(true, 65)] + [Description("۸")] + [StringLength(50)] + public string PriceTable { get; set; } + [IsDataGridColum(true, 66)] + [Description("ۿ۱")] + [StringLength(50)] + public string DiscountTable { get; set; } + [IsDataGridColum(true, 67)] + [Description("̶۸")] + public bool FixedPrice { get; set; } + [IsDataGridColum(true, 68)] + [Description("۵۸")] + [StringLength(50)] + public string NonSoPrice { get; set; } + [IsDataGridColum(true, 69)] + [Description("иʽ")] + [StringLength(50)] + public string BankFormat { get; set; } + [IsDataGridColum(true, 70)] + [Description("Ӧ")] + [StringLength(50)] + public string SupplierBank { get; set; } + [IsDataGridColum(true, 71)] + [Description("")] + [StringLength(50)] + public string OwnBank { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 72)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 73)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 74)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_SUPPLIER_PART.cs b/北京北汽/SCP/Model/DataCenterTables/TS_SUPPLIER_PART.cs new file mode 100644 index 0000000..061539d --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_SUPPLIER_PART.cs @@ -0,0 +1,100 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("Ӧ")] + public class TS_SUPPLIER_PART : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexSupplierPart", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [Index("IndexSupplierPart", Order = 1, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 2)] + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + [IsDataGridColum(true, 3)] + [Description("Ӧ")] + [StringLength(50)] + public string SupplierPart { get; set; } + [IsDataGridColum(true, 4)] + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + [IsDataGridColum(true, 5)] + [Description("Ӧǰ")] + public int SupplierLeadTime { get; set; } + [IsDataGridColum(true, 6)] + [Description("ʹÿͻ")] + public bool UseSoReductionPrice { get; set; } + [IsDataGridColum(true, 7)] + [Description("ͻ")] + public decimal SoPriceReduction { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + [IsDataGridColum(true, 9)] + [Description("۵۸")] + public decimal QuotePrice { get; set; } + [IsDataGridColum(true, 10)] + [Description("")] + public DateTime QuoteDate { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + public decimal QuoteQty { get; set; } + [IsDataGridColum(true, 12)] + [Description("Ŀ")] + [StringLength(50)] + public string PriceList { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + [StringLength(50)] + public string Manufacturer { get; set; } + [IsDataGridColum(true, 14)] + [Description("")] + [StringLength(50)] + public string ManufacturerPart { get; set; } + [IsDataGridColum(true, 15)] + [Description("ע")] + [StringLength(50)] + public string Comment { get; set; } + + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 17)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 18)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_SUPPLIER_TYPE.cs b/北京北汽/SCP/Model/DataCenterTables/TS_SUPPLIER_TYPE.cs new file mode 100644 index 0000000..f6bd985 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_SUPPLIER_TYPE.cs @@ -0,0 +1,51 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("Ӧͱ")] + public class TS_SUPPLIER_TYPE : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexSupplierType", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_TEAM.cs b/北京北汽/SCP/Model/DataCenterTables/TS_TEAM.cs new file mode 100644 index 0000000..fb5638b --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_TEAM.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("Ŷӱ")] + public class TS_TEAM : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexTeam", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true,2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_WMS_LOCATION.cs b/北京北汽/SCP/Model/DataCenterTables/TS_WMS_LOCATION.cs new file mode 100644 index 0000000..573d353 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_WMS_LOCATION.cs @@ -0,0 +1,96 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("WMSλ")] + public class TS_WMS_LOCATION : IUpdatableTable, ISoftDelete, IDomainSite + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexWmsLocation", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("ERPλ")] + [StringLength(50)] + public string ErpLocation { get; set; } + [IsDataGridColum(true, 4)] + [Description("")] + [StringLength(50)] + public string Area { get; set; } + [IsDataGridColum(true, 5)] + [Description("״̬")] + [StringLength(50)] + public string InventoryStatus { get; set; } + [IsDataGridColum(true, 6)] + [Description("Ա")] + [StringLength(50)] + public string WarehouseKeeper { get; set; } + [IsDataGridColum(true, 7)] + [Description("ֿ")] + [StringLength(50)] + public string WhseCode { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + public bool IsEnableNegativeStock { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + public bool AutoRemoveZeroStockDetail { get; set; } + [IsDataGridColum(true, 10)] + [Description("")] + public decimal MaxBoxQty { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + public bool IsEnableMix { get; set; } + [IsDataGridColum(true, 12)] + [Description("Ŀ")] + [StringLength(50)] + public string ProjectId { get; set; } + + + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 14)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 15)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TS_WORK_CENTER.cs b/北京北汽/SCP/Model/DataCenterTables/TS_WORK_CENTER.cs new file mode 100644 index 0000000..5341869 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TS_WORK_CENTER.cs @@ -0,0 +1,102 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ı")] + public class TS_WORK_CENTER : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexWorkCenter", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("Ĵ")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string Department { get; set; } + [IsDataGridColum(true, 4)] + [Description("Զ̶")] + public bool AutoFirm { get; set; } + [IsDataGridColum(true, 5)] + [Description("ϴԶ̶")] + public DateTime LastAutoFirm { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string Scheduler { get; set; } + [IsDataGridColum(true, 7)] + [Description("ȴʱ")] + public decimal Queue { get; set; } + [IsDataGridColum(true, 8)] + [Description("ȴʱ")] + public decimal Wait { get; set; } + [IsDataGridColum(true, 9)] + [Description("豸/")] + public int MchOp { get; set; } + [IsDataGridColum(true, 10)] + [Description("Ա")] + public decimal SetupMen { get; set; } + [IsDataGridColum(true, 11)] + [Description("ȫԱ")] + public decimal RunCrew { get; set; } + [IsDataGridColum(true, 12)] + [Description("")] + public decimal MchWkctr { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + public decimal MchBdn { get; set; } + [IsDataGridColum(true, 14)] + [Description("÷")] + public decimal SetupRte { get; set; } + [IsDataGridColum(true, 15)] + [Description("˹")] + public decimal LbrRate { get; set; } + [IsDataGridColum(true, 16)] + [Description("˹")] + public decimal BdnRate { get; set; } + [IsDataGridColum(true, 17)] + [Description("˹")] + public decimal BdnPct { get; set; } + [IsDataGridColum(true, 18)] + [Description("")] + [StringLength(50)] + public string Mch { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 19)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 20)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 21)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_ACCOUNT.cs b/北京北汽/SCP/Model/DataCenterTables/TT_ACCOUNT.cs new file mode 100644 index 0000000..0ed11d5 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_ACCOUNT.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("Ŀ")] + public class TT_ACCOUNT : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true,5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_BOM.cs b/北京北汽/SCP/Model/DataCenterTables/TT_BOM.cs new file mode 100644 index 0000000..0ee36ca --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_BOM.cs @@ -0,0 +1,103 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("BOM")] + + public class TT_BOM : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string ParentPart { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string ComponentPart { get; set; } + [IsDataGridColum(true, 3)] + [Description("ο")] + [StringLength(50)] + public string Reference { get; set; } + [IsDataGridColum(true, 4)] + [Description("Ч")] + public DateTime StartEffective { get; set; } + [IsDataGridColum(true, 5)] + [Description("ÿ")] + public decimal QuantityPer { get; set; } + [IsDataGridColum(true,6)] + [Description("ṹ")] + [StringLength(50)] + public string StructureType { get; set; } + [IsDataGridColum(true, 7)] + [Description("Ч")] + public DateTime EndEffective { get; set; } + [IsDataGridColum(true, 8)] + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + [IsDataGridColum(true, 9)] + [Description("Ʒ")] + public decimal Scrap { get; set; } + [IsDataGridColum(true, 10)] + [Description("ǰ")] + public int LeadTimeOffset { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + public int Operation { get; set; } + [IsDataGridColum(true, 12)] + [Description("")] + public int SequenceNumber { get; set; } + [IsDataGridColum(true, 13)] + [Description("Ԥٷֱ")] + public decimal FporecastPercent { get; set; } + [IsDataGridColum(true, 14)] + [Description("")] + [StringLength(50)] + public string OptionGroup { get; set; } + [IsDataGridColum(true, 15)] + [Description("")] + [StringLength(50)] + public string Process { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 17)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 18)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 19)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 20)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 21)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_CODE.cs b/北京北汽/SCP/Model/DataCenterTables/TT_CODE.cs new file mode 100644 index 0000000..b12f7fe --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_CODE.cs @@ -0,0 +1,60 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ͨô")] + public class TT_CODE : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("ͨô")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 10)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_CODE_TYPE.cs b/北京北汽/SCP/Model/DataCenterTables/TT_CODE_TYPE.cs new file mode 100644 index 0000000..9a82494 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_CODE_TYPE.cs @@ -0,0 +1,59 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ͨôͱ")] + public class TT_CODE_TYPE : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("ͨʹ")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 10)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_COLOR.cs b/北京北汽/SCP/Model/DataCenterTables/TT_COLOR.cs new file mode 100644 index 0000000..b55e670 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_COLOR.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ɫ")] + public class TT_COLOR : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 18)] + [Description("ID")] + public Guid DataID { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 10)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_COST_CENTER.cs b/北京北汽/SCP/Model/DataCenterTables/TT_COST_CENTER.cs new file mode 100644 index 0000000..9f2f677 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_COST_CENTER.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ɱı")] + public class TT_COST_CENTER : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 10)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_CUSTOMER.cs b/北京北汽/SCP/Model/DataCenterTables/TT_CUSTOMER.cs new file mode 100644 index 0000000..e5b7590 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_CUSTOMER.cs @@ -0,0 +1,309 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ͻ")] + public class TT_CUSTOMER : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("ͻ")] + [StringLength(50)] + public string CustomerCode { get; set; } + [IsDataGridColum(true, 2)] + [Description("ͻ")] + [StringLength(50)] + public string CustomerName { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string SearchName { get; set; } + [IsDataGridColum(true, 4)] + [Description("м")] + [StringLength(50)] + public string SecondName { get; set; } + [IsDataGridColum(true, 5)] + [Description("")] + [StringLength(50)] + public string ThirdName { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string GroupName { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string Active { get; set; } + [IsDataGridColum(true, 8)] + [Description("ͻַ")] + [StringLength(50)] + public string Address1 { get; set; } + [IsDataGridColum(true, 9)] + [Description("ͻַ")] + [StringLength(50)] + public string Address2 { get; set; } + [IsDataGridColum(true, 10)] + [Description("ͻַ")] + [StringLength(50)] + public string Address3 { get; set; } + [IsDataGridColum(true, 11)] + [Description("ʱ")] + [StringLength(50)] + public string ZipCode { get; set; } + [IsDataGridColum(true, 12)] + [Description("")] + [StringLength(50)] + public string City { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + [StringLength(50)] + public string Country { get; set; } + [IsDataGridColum(true, 14)] + [Description("绰")] + [StringLength(50)] + public string Telephone { get; set; } + [IsDataGridColum(true, 15)] + [Description("ʡ")] + [StringLength(50)] + public string province { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string County { get; set; } + [IsDataGridColum(true, 17)] + [Description("")] + [StringLength(50)] + public string Fax { get; set; } + [IsDataGridColum(true, 18)] + [Description("Դ")] + [StringLength(50)] + public string LanguageCode { get; set; } + [IsDataGridColum(true, 19)] + [Description("ʼ")] + [StringLength(50)] + public string Email { get; set; } + [IsDataGridColum(true, 20)] + [Description("ַ")] + [StringLength(50)] + public string Internet { get; set; } + [IsDataGridColum(true, 21)] + [Description("˰ַ")] + [StringLength(50)] + public string AddressIsTaxable { get; set; } + [IsDataGridColum(true, 22)] + [Description("˰")] + [StringLength(50)] + public string AddressIsTaxIncluded { get; set; } + [IsDataGridColum(true, 23)] + [Description("˰")] + [StringLength(50)] + public string FederalTax { get; set; } + [IsDataGridColum(true, 24)] + [Description("˰")] + [StringLength(50)] + public string StateTax { get; set; } + [IsDataGridColum(true, 25)] + [Description("˰1")] + [StringLength(50)] + public string MiscTax1 { get; set; } + [IsDataGridColum(true, 26)] + [Description("˰2")] + [StringLength(50)] + public string MiscTax2 { get; set; } + [IsDataGridColum(true, 27)] + [Description("˰3")] + [StringLength(50)] + public string MiscTax3 { get; set; } + [IsDataGridColum(true, 28)] + [Description("˰")] + [StringLength(50)] + public string TaxInCity { get; set; } + [IsDataGridColum(true, 29)] + [Description("˰")] + [StringLength(50)] + public string TaxZone { get; set; } + [IsDataGridColum(true, 30)] + [Description("˰")] + [StringLength(50)] + public string TaxClass { get; set; } + [IsDataGridColum(true, 31)] + [Description("˰;")] + [StringLength(50)] + public string TaxUsage { get; set; } + [IsDataGridColum(true, 32)] + [Description("")] + [StringLength(50)] + public string Title { get; set; } + [IsDataGridColum(true, 33)] + [Description("ϵ")] + [StringLength(50)] + public string ContactName { get; set; } + [IsDataGridColum(true, 34)] + [Description("д")] + [StringLength(50)] + public string Initials { get; set; } + [IsDataGridColum(true, 35)] + [Description("")] + [StringLength(50)] + public string Function { get; set; } + [IsDataGridColum(true, 36)] + [Description("Ա")] + [StringLength(50)] + public string Gender { get; set; } + [IsDataGridColum(true, 37)] + [Description("Ҫϵ")] + [StringLength(50)] + public string ContactIsPrimary { get; set; } + [IsDataGridColum(true, 38)] + [Description("Ҫϵ")] + [StringLength(50)] + public string ContactIsSecondary { get; set; } + [IsDataGridColum(true, 39)] + [Description("")] + [StringLength(50)] + public string Compens { get; set; } + [IsDataGridColum(true, 40)] + [Description("Ʊļ")] + [StringLength(50)] + public string GlProfileInvoice { get; set; } + [IsDataGridColum(true, 41)] + [Description("Ʊݿļ")] + [StringLength(50)] + public string GlProfileCreditNote { get; set; } + [IsDataGridColum(true, 42)] + [Description("Ԥļ")] + [StringLength(50)] + public string GlProfilePrepayment { get; set; } + [IsDataGridColum(true, 43)] + [Description("ۼļ")] + [StringLength(50)] + public string GLProfileDeduction { get; set; } + [IsDataGridColum(true, 44)] + [Description("˿ļ")] + [StringLength(50)] + public string AccountGLProfile { get; set; } + [IsDataGridColum(true, 45)] + [Description("ÿļ")] + [StringLength(50)] + public string FinanceChargeProfile { get; set; } + [IsDataGridColum(true, 46)] + [Description("˻ļ")] + [StringLength(50)] + public string SubAccountProfile { get; set; } + [IsDataGridColum(true, 47)] + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + [IsDataGridColum(true, 48)] + [Description("ͻ")] + [StringLength(50)] + public string Customertype { get; set; } + [IsDataGridColum(true, 49)] + [Description("֧")] + [StringLength(50)] + public string CreditTerms { get; set; } + [IsDataGridColum(true, 50)] + [Description("Ʊ״̬")] + [StringLength(50)] + public string InvoiceStatusCode { get; set; } + + [Description("")] + [StringLength(50)] + public string PaymentGroup { get; set; } + + [Description("˵ϸ")] + [StringLength(50)] + public string BillingSchedule { get; set; } + + [Description("Ʊտ")] + [StringLength(50)] + public string BillPayee { get; set; } + + [Description("ƱȨ")] + [StringLength(50)] + public string InvoicebyAuthorization { get; set; } + [IsDataGridColum(true, 51)] + [Description("Ա")] + [StringLength(50)] + public string SalesPerson { get; set; } + [IsDataGridColum(true, 52)] + [Description("ʽ")] + [StringLength(50)] + public string ShipVia { get; set; } + [IsDataGridColum(true, 53)] + [Description("ת˰")] + [StringLength(50)] + public string Resale { get; set; } + [IsDataGridColum(true, 54)] + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + [IsDataGridColum(true, 55)] + [Description("")] + [StringLength(50)] + public string Region { get; set; } + [IsDataGridColum(true, 56)] + [Description("ۿ۱")] + [StringLength(50)] + public string DiscountTable { get; set; } + [IsDataGridColum(true, 57)] + [Description("̶۸")] + [StringLength(50)] + public string FixfdPrice { get; set; } + [IsDataGridColum(true, 58)] + [Description("ռ˼")] + [StringLength(50)] + public string DayBookSet { get; set; } + [IsDataGridColum(true, 59)] + [Description("иʽ")] + [StringLength(50)] + public string BankFormat { get; set; } + [IsDataGridColum(true, 60)] + [Description("ͻ")] + [StringLength(50)] + public string CustomerBank { get; set; } + [IsDataGridColum(true, 61)] + [Description("")] + [StringLength(50)] + public string OwnBank { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 62)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 63)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 64)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 65)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_CUSTOMER_PART.cs b/北京北汽/SCP/Model/DataCenterTables/TT_CUSTOMER_PART.cs new file mode 100644 index 0000000..59fd0ac --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_CUSTOMER_PART.cs @@ -0,0 +1,74 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ͻ")] + public class TT_CUSTOMER_PART : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("ͻ/﷢")] + [StringLength(50)] + public string CustomerShipto { get; set; } + [IsDataGridColum(true, 2)] + [Description("ͻĿ")] + [StringLength(50)] + public string CustomerPart { get; set; } + [IsDataGridColum(true, 3)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 4)] + [Description("ע")] + [StringLength(50)] + public string Comment { get; set; } + [IsDataGridColum(true, 5)] + [Description("ʾͻ")] + [StringLength(50)] + public string DisplayCustomerPart { get; set; } + [IsDataGridColum(true, 6)] + [Description("ͻϹ̱")] + [StringLength(50)] + public string CustomerPartEcoNbr { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 8)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 9)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 10)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 12)] + [Description("ID")] + public Guid DataID { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 14)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_CUSTOMER_TYPE.cs b/北京北汽/SCP/Model/DataCenterTables/TT_CUSTOMER_TYPE.cs new file mode 100644 index 0000000..e898a83 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_CUSTOMER_TYPE.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ͻͱ")] + public class TT_CUSTOMER_TYPE : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 10)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_DEPARTMENT.cs b/北京北汽/SCP/Model/DataCenterTables/TT_DEPARTMENT.cs new file mode 100644 index 0000000..b6f3462 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_DEPARTMENT.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ű")] + public class TT_DEPARTMENT : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("Ŵ")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 10)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_DOMAIN.cs b/北京北汽/SCP/Model/DataCenterTables/TT_DOMAIN.cs new file mode 100644 index 0000000..74d9745 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_DOMAIN.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ݱ")] + public class TT_DOMAIN : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 10)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_EDI_DATA.cs b/北京北汽/SCP/Model/DataCenterTables/TT_EDI_DATA.cs new file mode 100644 index 0000000..8188c63 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_EDI_DATA.cs @@ -0,0 +1,96 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("EDIݱ")] + public class TT_EDI_DATA : ITaskTable + { + + [IsDataGridColum(true, 1)] + [Description("۶")] + [StringLength(50)] + public string CustomerOrder { get; set; } + [IsDataGridColum(true, 2)] + [Description("﷢")] + [StringLength(50)] + public string ShipFrom { get; set; } + [IsDataGridColum(true, 3)] + [Description("ͻ")] + [StringLength(50)] + public string Customer { get; set; } + [IsDataGridColum(true, 4)] + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexEdiData", Order = 1, IsUnique = true, IsClustered = false)] + [Description("ͻ")] + [StringLength(50)] + public string CustomerPart { get; set; } + [IsDataGridColum(true, 5)] + [Description("к")] + public int Line { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string Part { get; set; } + [IsDataGridColum(true, 7)] + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + [IsDataGridColum(true, 8)] + [Description("ͻο")] + [StringLength(50)] + public string CustomerReference { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + public DateTime ReceiveDate { get; set; } + [IsDataGridColum(true, 10)] + [Description("ʱ")] + public DateTime ReceiveTime { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + public DateTime DemandDate { get; set; } + [IsDataGridColum(true, 12)] + [Description("")] + public decimal DemandQuantity { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 14)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 15)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 17)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 18)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_ENTITY.cs b/北京北汽/SCP/Model/DataCenterTables/TT_ENTITY.cs new file mode 100644 index 0000000..11ee366 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_ENTITY.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("Ƶλ")] + public class TT_ENTITY : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("Ƶλ")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 10)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_LINE.cs b/北京北汽/SCP/Model/DataCenterTables/TT_LINE.cs new file mode 100644 index 0000000..8cdde0d --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_LINE.cs @@ -0,0 +1,99 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("߱")] + public class TT_LINE : ITaskTable + { + + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string ProductionLine { get; set; } + [IsDataGridColum(true, 2)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + [IsDataGridColum(true, 3)] + [Description("˵")] + [StringLength(50)] + public string Description { get; set; } + [IsDataGridColum(true, 4)] + [Description("/Сʱ")] + public decimal UnitsHour { get; set; } + [IsDataGridColum(true, 5)] + [Description("дС")] + public bool EnableRunSize { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public decimal NumberOfLines { get; set; } + [IsDataGridColum(true, 7)] + [Description("ʱ仺-")] + public int DurationBuffer { get; set; } + [IsDataGridColum(true, 8)] + [Description("ʱ仺ʱ")] + [StringLength(50)] + public string DurationBufferHMS { get; set; } + [IsDataGridColum(true, 9)] + [Description("ʱ-")] + public int SetupTime { get; set; } + [IsDataGridColum(true, 10)] + [Description("ʱ")] + [StringLength(50)] + public string SetupTimeHMS { get; set; } + [IsDataGridColum(true, 11)] + [Description("Զ̶")] + public bool LnAutofirm { get; set; } + [IsDataGridColum(true, 12)] + [Description("ϴԶ̶")] + public DateTime LnLastAutofirm { get; set; } + [IsDataGridColum(true, 13)] + [Description("ID")] + [StringLength(50)] + public string LnScheduler { get; set; } + [IsDataGridColum(true, 14)] + [Description("޽")] + [StringLength(50)] + public string Dtendlit { get; set; } + [IsDataGridColum(true, 15)] + [Description("ں")] + public int EndNumber { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 17)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 15)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 17)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 18)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_LINE_PART.cs b/北京北汽/SCP/Model/DataCenterTables/TT_LINE_PART.cs new file mode 100644 index 0000000..54cffdb --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_LINE_PART.cs @@ -0,0 +1,114 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ϵ")] + public class TT_LINE_PART : ITaskTable + { + + [IsDataGridColum(true, 1)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [Index("IndexLinePart", Order = 1, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string ProductionLine { get; set; } + [IsDataGridColum(true, 3)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʼ")] + public DateTime StartDate { get; set; } + [IsDataGridColum(true, 5)] + [Description("/Сʱ")] + public decimal UnitsHour { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public decimal NumberOfLines { get; set; } + [IsDataGridColum(true, 7)] + [Description("ʱ-")] + public int SetupTime { get; set; } + [IsDataGridColum(true, 8)] + [Description("ʱ")] + [StringLength(50)] + public string SetupTimeHMS { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + public bool PrimaryLine { get; set; } + [IsDataGridColum(true, 10)] + [Description("Ա")] + public decimal SetupCrew { get; set; } + [IsDataGridColum(true, 11)] + [Description("С")] + public int SetSize { get; set; } + [IsDataGridColum(true, 12)] + [Description("ȫԱ")] + public decimal RunCrew { get; set; } + [IsDataGridColum(true, 13)] + [Description("С")] + public int RunSize { get; set; } + [IsDataGridColum(true, 14)] + [Description("嵥")] + [StringLength(50)] + public string BomCode { get; set; } + [IsDataGridColum(true, 15)] + [Description("")] + [StringLength(50)] + public string Routing { get; set; } + [IsDataGridColum(true, 16)] + [Description("ID")] + [StringLength(50)] + public string ToolId { get; set; } + [IsDataGridColum(true, 17)] + [Description("˳1")] + [StringLength(50)] + public string RunSequence1 { get; set; } + [IsDataGridColum(true, 18)] + [Description("˳2")] + [StringLength(50)] + public string RunSequence2 { get; set; } + [IsDataGridColum(true, 19)] + [Description("ע")] + public bool Comments { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 20)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 21)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 22)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 23)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 24)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 25)] + [Description("ID")] + public Guid DataID { get; set; } + [IsDataGridColum(true, 26)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_LOCATION.cs b/北京北汽/SCP/Model/DataCenterTables/TT_LOCATION.cs new file mode 100644 index 0000000..e7847cf --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_LOCATION.cs @@ -0,0 +1,102 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("λ")] + public class TT_LOCATION : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("ص")] + [StringLength(50)] + + public string Site { get; set; } + [IsDataGridColum(true, 2)] + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 4)] + [Description("״̬")] + [StringLength(50)] + public string InventoryStatus { get; set; } + [IsDataGridColum(true, 5)] + [Description("Ŀ")] + [StringLength(50)] + public string Project { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public DateTime DateCreated { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + public bool Permanent { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + [StringLength(50)] + public string Type { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + public bool SinglePart { get; set; } + [IsDataGridColum(true, 10)] + [Description("/ο")] + public bool SingleLotReference { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + public decimal Capacity { get; set; } + [IsDataGridColum(true, 12)] + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + [IsDataGridColum(true, 13)] + [Description("λ")] + public bool ReservedLocations { get; set; } + [IsDataGridColum(true, 14)] + [Description("ʵַ")] + [StringLength(50)] + public string PhysicalAddress { get; set; } + [IsDataGridColum(true, 15)] + [Description("״̬")] + [StringLength(50)] + public string Status { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 17)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 18)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 19)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 20)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 21)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_MES_DATA.cs b/北京北汽/SCP/Model/DataCenterTables/TT_MES_DATA.cs new file mode 100644 index 0000000..0e3630a --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_MES_DATA.cs @@ -0,0 +1,49 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("Mesݱ")] + public class TT_MES_DATA : ITaskTable + { + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 2)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 3)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 4)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 5)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 6)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_PACK.cs b/北京北汽/SCP/Model/DataCenterTables/TT_PACK.cs new file mode 100644 index 0000000..dbca182 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_PACK.cs @@ -0,0 +1,66 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("")] + public class TT_PACK : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + [IsDataGridColum(true, 2)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 3)] + [Description("λ")] + [StringLength(50)] + public string UM { get; set; } + [IsDataGridColum(true, 4)] + [Description("üλ")] + [StringLength(50)] + public string AlternateUm { get; set; } + [IsDataGridColum(true, 5)] + [Description("λ")] + public int UmConversion { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 7)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 8)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 10)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 11)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_PART_DET.cs b/北京北汽/SCP/Model/DataCenterTables/TT_PART_DET.cs new file mode 100644 index 0000000..b3f3a1e --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_PART_DET.cs @@ -0,0 +1,254 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ϸ")] + public class TT_PART_DET : ITaskTable + { + + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 2)] + [Description("ABC ")] + [StringLength(50)] + public string AbcClass { get; set; } + [IsDataGridColum(true, 3)] + [Description("ſ")] + [StringLength(50)] + public string LotControl { get; set; } + [IsDataGridColum(true, 4)] + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + [IsDataGridColum(true, 5)] + [Description("λ")] + [StringLength(50)] + public string LocationType { get; set; } + [IsDataGridColum(true, 6)] + [Description("Զ")] + public bool AutoMaticLotNumbers { get; set; } + [IsDataGridColum(true, 7)] + [Description("ƽ")] + public int AverageInterval { get; set; } + [IsDataGridColum(true, 8)] + [Description("̵")] + public int CycleCountInterval { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + public int ShelfLife { get; set; } + [IsDataGridColum(true, 10)] + [Description("ؼ")] + public bool KeyPart { get; set; } + [IsDataGridColum(true, 11)] + [Description("ɹջ״̬")] + [StringLength(50)] + public string PoReceiptStatus { get; set; } + [IsDataGridColum(true, 12)] + [Description("Ч")] + public bool RctPoActive { get; set; } + [IsDataGridColum(true, 13)] + [Description("ӹջ״̬")] + [StringLength(50)] + public string WoReceiptStatus { get; set; } + [IsDataGridColum(true, 14)] + [Description("Ч")] + public bool RctWoActive { get; set; } + [IsDataGridColum(true, 15)] + [Description("ǿ涩")] + [StringLength(50)] + public string MemoOrderType { get; set; } + [IsDataGridColum(true, 16)] + [Description("ƻ")] + public bool MasterSchedule { get; set; } + [IsDataGridColum(true, 17)] + [Description("ƻ")] + public bool PlanOrders { get; set; } + [IsDataGridColum(true, 18)] + [Description("ʱ")] + public int TimeFence { get; set; } + [IsDataGridColum(true, 19)] + [Description("")] + [StringLength(50)] + public string OrderPolicy { get; set; } + [IsDataGridColum(true, 20)] + [Description("")] + public decimal OrderQuantity { get; set; } + [IsDataGridColum(true, 21)] + [Description("")] + public int OrderPeriod { get; set; } + [IsDataGridColum(true, 22)] + [Description("ȫ")] + public decimal SafetyStock { get; set; } + [IsDataGridColum(true, 23)] + [Description("ȫǰ")] + public decimal SafetyTime { get; set; } + [IsDataGridColum(true, 23)] + [Description("ٶ")] + public decimal ReorderPoint { get; set; } + [IsDataGridColum(true, 25)] + [Description("ƻ޸")] + [StringLength(50)] + public string PlanningRev { get; set; } + [IsDataGridColum(true, 26)] + [Description("ԭ")] + public bool IssuePolicy { get; set; } + [IsDataGridColum(true, 27)] + [Description("ɹԱ/ƻԱ")] + [StringLength(50)] + public string BuyerPlanner { get; set; } + [IsDataGridColum(true, 28)] + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + [IsDataGridColum(true, 29)] + [Description("ɹص")] + [StringLength(50)] + public string PoSite { get; set; } + [IsDataGridColum(true, 30)] + [Description("ɹ/")] + [StringLength(50)] + public string PurMfg { get; set; } + [IsDataGridColum(true, 31)] + [Description("")] + [StringLength(50)] + public string ConfigurationType { get; set; } + [IsDataGridColum(true, 32)] + [Description("λ")] + [StringLength(50)] + public string InspectionLocation { get; set; } + [IsDataGridColum(true, 33)] + [Description("Ҫ")] + public bool InspectionRequired { get; set; } + [IsDataGridColum(true, 34)] + [Description("ǰ")] + public int InspectionLeadTime { get; set; } + [IsDataGridColum(true, 35)] + [Description("ۼǰ")] + public int CumulativeLeadTime { get; set; } + [IsDataGridColum(true, 36)] + [Description("ǰ")] + public int ManufacturingLedaTime { get; set; } + [IsDataGridColum(true, 37)] + [Description("ɹǰ")] + public int PurchaseLeadTime { get; set; } + [IsDataGridColum(true, 38)] + [Description("ATPʵʩˮƽ")] + [StringLength(50)] + public string AtpEnforcementLevel { get; set; } + [IsDataGridColum(true, 39)] + [Description("ϵATP")] + public bool FamilyATP { get; set; } + [IsDataGridColum(true, 40)] + [Description("ATPˮƽ")] + public int AtpHorizon { get; set; } + [IsDataGridColum(true, 41)] + [Description("1")] + [StringLength(50)] + public string RunSeq1 { get; set; } + [IsDataGridColum(true, 42)] + [Description("2")] + [StringLength(50)] + public string RunSeq2 { get; set; } + [IsDataGridColum(true, 43)] + [Description("")] + public bool Phantom { get; set; } + [IsDataGridColum(true, 44)] + [Description("С")] + public decimal MinimumOrder { get; set; } + [IsDataGridColum(true, 45)] + [Description("")] + public decimal MaximumOrder { get; set; } + [IsDataGridColum(true, 46)] + [Description("")] + public decimal OrderMultiple { get; set; } + [IsDataGridColum(true, 47)] + [Description("ڲĹ")] + public bool OperationBasedYield { get; set; } + [IsDataGridColum(true, 48)] + [Description("")] + public decimal YieldPercent { get; set; } + [IsDataGridColum(true, 49)] + [Description("ʱ")] + [StringLength(50)] + public string RunTime { get; set; } + [IsDataGridColum(true, 50)] + [Description("ʱ")] + public decimal SetupTime { get; set; } + [IsDataGridColum(true, 51)] + [Description("EMT")] + [StringLength(50)] + public string EmtType { get; set; } + [IsDataGridColum(true, 52)] + [Description("EMTԶ")] + public bool AutomaticEmtProcessing { get; set; } + [IsDataGridColum(true, 53)] + [Description("")] + [StringLength(50)] + public string NetWorkCode { get; set; } + [IsDataGridColum(true, 54)] + [Description("̴")] + [StringLength(50)] + public string RoutingCode { get; set; } + [IsDataGridColum(true, 55)] + [Description("嵥/䷽")] + [StringLength(50)] + public string BomFormulaCode { get; set; } + [IsDataGridColum(true, 56)] + [Description("")] + [StringLength(50)] + public string ReplenishmentMethod { get; set; } + [IsDataGridColum(true, 57)] + [Description("Ƿ")] + [StringLength(50)] + public string IsMaster { get; set; } + [IsDataGridColum(true, 58)] + [Description("ɫ")] + [StringLength(50)] + public string PartColor { get; set; } + + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 59)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 60)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 61)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 62)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 63)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 64)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_PART_MSTR.cs b/北京北汽/SCP/Model/DataCenterTables/TT_PART_MSTR.cs new file mode 100644 index 0000000..a4c4c5f --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_PART_MSTR.cs @@ -0,0 +1,144 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("")] + public class TT_PART_MSTR : ITaskTable + { + + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 2)] + [Description("1")] + [StringLength(50)] + public string Desc1 { get; set; } + [IsDataGridColum(true, 3)] + [Description("2")] + [StringLength(50)] + public string Desc2 { get; set; } + [IsDataGridColum(true, 4)] + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + [IsDataGridColum(true, 5)] + [Description("Ʒ")] + [StringLength(50)] + public string ProdLine { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public DateTime AddDate { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string DsgnGroup { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + [StringLength(50)] + public string PromotionGroup { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string PartType { get; set; } + [IsDataGridColum(true, 10)] + [Description("״̬")] + [StringLength(50)] + public string Status { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + [StringLength(50)] + public string Group { get; set; } + [IsDataGridColum(true, 12)] + [Description("ͼֽ")] + [StringLength(50)] + public string Drawing { get; set; } + [IsDataGridColum(true, 13)] + [Description("Ŀ޸")] + [StringLength(50)] + public string PartRevision { get; set; } + [IsDataGridColum(true, 14)] + [Description("ͼֽλ")] + [StringLength(50)] + public string DrawingLocation { get; set; } + [IsDataGridColum(true, 15)] + [Description("С")] + [StringLength(50)] + public string Size { get; set; } + [IsDataGridColum(true, 16)] + [Description("۸ۿ")] + [StringLength(50)] + public string PriceBreakCategory { get; set; } + [IsDataGridColum(true, 17)] + [Description("")] + public bool AuxiliaryMaterial { get; set; } + [IsDataGridColum(true, 18)] + [Description("߽")] + public bool OfflineSettlement { get; set; } + [IsDataGridColum(true, 19)] + [Description("Qȼ")] + [StringLength(50)] + public string Qgrade { get; set; } + [IsDataGridColum(true, 20)] + [Description("")] + [StringLength(50)] + public string WmsPartType { get; set; } + [IsDataGridColum(true, 21)] + [Description("ʽ")] + [StringLength(50)] + public string ManageWay { get; set; } + [IsDataGridColum(true, 22)] + [Description("")] + [StringLength(50)] + public string InventoryCode { get; set; } + [IsDataGridColum(true, 23)] + [Description("ͣ/")] + [StringLength(50)] + public string ManageType { get; set; } + [IsDataGridColum(true, 24)] + [Description("Ƿ")] + [StringLength(50)] + public string InspectType { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 25)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 26)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 27)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 28)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 29)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 30)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_PRODUCT_LINE.cs b/北京北汽/SCP/Model/DataCenterTables/TT_PRODUCT_LINE.cs new file mode 100644 index 0000000..b736c66 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_PRODUCT_LINE.cs @@ -0,0 +1,64 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("Ʒ")] + public class TT_PRODUCT_LINE : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("Ʒ")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("Ӧ˰")] + public bool Taxable { get; set; } + [IsDataGridColum(true, 4)] + [Description("˰")] + public int TaxClass { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 5)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 6)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 7)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 10)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_PROJECT.cs b/北京北汽/SCP/Model/DataCenterTables/TT_PROJECT.cs new file mode 100644 index 0000000..a00003f --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_PROJECT.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("Ŀ")] + public class TT_PROJECT : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_PURCHASE_PRICE.cs b/北京北汽/SCP/Model/DataCenterTables/TT_PURCHASE_PRICE.cs new file mode 100644 index 0000000..bd4865d --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_PURCHASE_PRICE.cs @@ -0,0 +1,88 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ɹ۸")] + public class TT_PURCHASE_PRICE : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("Ŀ")] + [StringLength(50)] + public string PriceList { get; set; } + [IsDataGridColum(true, 2)] + [Description("˵")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("Ʒ")] + [StringLength(50)] + public string ProductLine { get; set; } + [IsDataGridColum(true, 4)] + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + [IsDataGridColum(true, 5)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 6)] + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + [IsDataGridColum(true, 7)] + [Description("ʼ")] + public DateTime Start { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + public DateTime ExpireDate { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string AmountType { get; set; } + [IsDataGridColum(true, 10)] + [Description("")] + public decimal Amount { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 12)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 13)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 14)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 15)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 16)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_ROUTING.cs b/北京北汽/SCP/Model/DataCenterTables/TT_ROUTING.cs new file mode 100644 index 0000000..8867318 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_ROUTING.cs @@ -0,0 +1,132 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ձ")] + public class TT_ROUTING : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("̴")] + [StringLength(50)] + public string RoutingCode { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + public int Operation { get; set; } + [IsDataGridColum(true, 3)] + [Description("ʼ")] + public DateTime StartDate { get; set; } + [IsDataGridColum(true, 4)] + [Description("׼")] + [StringLength(50)] + public string StandardOperration { get; set; } + [IsDataGridColum(true, 5)] + [Description("")] + [StringLength(50)] + public string WorkCenter { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string Machine { get; set; } + [IsDataGridColum(true, 7)] + [Description("˵")] + [StringLength(50)] + public string Description { get; set; } + [IsDataGridColum(true, 8)] + [Description("/")] + public int MachinesPerOperation { get; set; } + [IsDataGridColum(true, 9)] + [Description("ƽмӹ")] + public int OverlapUnits { get; set; } + [IsDataGridColum(true, 10)] + [Description("Ŷʱ")] + public decimal QueueTime { get; set; } + [IsDataGridColum(true, 11)] + [Description("ȴʱ")] + public decimal WaitTime { get; set; } + [IsDataGridColum(true, 12)] + [Description("ֽ׶εĹ")] + public bool MilestoneOperation { get; set; } + [IsDataGridColum(true, 13)] + [Description("תǰ")] + public int SubcontractLt { get; set; } + [IsDataGridColum(true, 14)] + [Description("Ա")] + public decimal SetupCrew { get; set; } + [IsDataGridColum(true, 15)] + [Description("ȫԱ")] + public decimal RunCrew { get; set; } + [IsDataGridColum(true, 16)] + [Description("ʱ")] + public decimal SetupTime { get; set; } + [IsDataGridColum(true, 17)] + [Description("ʱ")] + public decimal RunTime { get; set; } + [IsDataGridColum(true, 18)] + [Description("ƶʱ")] + public decimal MoveTime { get; set; } + [IsDataGridColum(true, 19)] + [Description("")] + public DateTime EndDate { get; set; } + [IsDataGridColum(true, 20)] + [Description("")] + public decimal YieldPercent { get; set; } + [IsDataGridColum(true, 21)] + [Description("ߴ")] + [StringLength(50)] + public string ToolCode { get; set; } + [IsDataGridColum(true, 22)] + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + [IsDataGridColum(true, 23)] + [Description("ֵ")] + public decimal InventoryValue { get; set; } + [IsDataGridColum(true, 24)] + [Description("תɱ")] + public decimal SubcontractCost { get; set; } + [IsDataGridColum(true, 25)] + [Description("ע")] + public bool Comments { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 26)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 27)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 28)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 29)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 30)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 31)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_SALE_PRICE.cs b/北京北汽/SCP/Model/DataCenterTables/TT_SALE_PRICE.cs new file mode 100644 index 0000000..2bfcc52 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_SALE_PRICE.cs @@ -0,0 +1,89 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ۼ۸")] + public class TT_SALE_PRICE : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("Ŀ")] + [StringLength(50)] + public string PriceList { get; set; } + [IsDataGridColum(true, 2)] + [Description("˵")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("Ʒ")] + [StringLength(50)] + public string ProductLine { get; set; } + [IsDataGridColum(true, 4)] + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + [IsDataGridColum(true, 5)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 6)] + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + [IsDataGridColum(true, 7)] + [Description("ʼ")] + public DateTime Start { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + public DateTime ExpireDate { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string AmountType { get; set; } + [IsDataGridColum(true, 10)] + [Description("")] + public decimal Amount { get; set; } + + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 12)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 13)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 14)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 15)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 16)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_SHIFT.cs b/北京北汽/SCP/Model/DataCenterTables/TT_SHIFT.cs new file mode 100644 index 0000000..d1a6e2d --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_SHIFT.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ת")] + public class TT_SHIFT : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + [IsDataGridColum(true, 5)] + + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_SITE.cs b/北京北汽/SCP/Model/DataCenterTables/TT_SITE.cs new file mode 100644 index 0000000..62db1db --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_SITE.cs @@ -0,0 +1,96 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ص")] + public class TT_SITE : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 4)] + [Description("Ƶλ")] + [StringLength(50)] + public string Entity { get; set; } + [IsDataGridColum(true, 5)] + [Description("״̬")] + [StringLength(50)] + public string Status { get; set; } + [IsDataGridColum(true, 6)] + [Description("Զɿλ")] + public bool AutoLocation { get; set; } + [IsDataGridColum(true, 7)] + [Description("λ")] + [StringLength(50)] + public string InspLocation { get; set; } + [IsDataGridColum(true, 8)] + [Description("EMTӦ")] + [StringLength(50)] + public string BtbSupplier { get; set; } + [IsDataGridColum(true, 9)] + [Description("ⲿӦ")] + public bool ExtSupplier { get; set; } + [IsDataGridColum(true, 10)] + [Description("תƲĿ")] + [StringLength(50)] + public string XferAcct { get; set; } + [IsDataGridColum(true, 11)] + [Description("תƲ˻")] + [StringLength(50)] + public string XferSub { get; set; } + [IsDataGridColum(true, 12)] + [Description("תƲɱ")] + [StringLength(50)] + public string XferCc { get; set; } + [IsDataGridColum(true, 13)] + [Description("POλ")] + [StringLength(50)] + public string GitLocation { get; set; } + [IsDataGridColum(true, 14)] + [Description("ʹüƻ/ȵĹ̨")] + public bool UsePlanSchedWbs { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 15)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 16)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 17)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 18)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 19)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 20)] + [Description("ID")] + public Guid DataID { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_STAND_COST_PRICE.cs b/北京北汽/SCP/Model/DataCenterTables/TT_STAND_COST_PRICE.cs new file mode 100644 index 0000000..74864fc --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_STAND_COST_PRICE.cs @@ -0,0 +1,73 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("׼ɱ۸")] + public class TT_STAND_COST_PRICE : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("Ϻ")] + [StringLength(50)] + public string Part { get; set; } + [IsDataGridColum(true, 2)] + [Description("ϳɱ")] + public int MaterialCost { get; set; } + [IsDataGridColum(true, 3)] + [Description("˹ɱ")] + public int LaborCost { get; set; } + [IsDataGridColum(true, 4)] + [Description("ӳɱ")] + public int BurdenCost { get; set; } + [IsDataGridColum(true, 5)] + [Description("ɱ")] + public int OverheadCost { get; set; } + [IsDataGridColum(true, 6)] + [Description("תɱ")] + public int SubcontrCost { get; set; } + [IsDataGridColum(true, 7)] + [Description("ɱ")] + public int CostSet { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 9)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 10)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 12)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 13)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_SUB_ACCOUNT.cs b/北京北汽/SCP/Model/DataCenterTables/TT_SUB_ACCOUNT.cs new file mode 100644 index 0000000..f9295bb --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_SUB_ACCOUNT.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("˻")] + public class TT_SUB_ACCOUNT : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("˻")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("˻")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_SUPPLIER.cs b/北京北汽/SCP/Model/DataCenterTables/TT_SUPPLIER.cs new file mode 100644 index 0000000..b50fd43 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_SUPPLIER.cs @@ -0,0 +1,313 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("Ӧ̱")] + public class TT_SUPPLIER : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("Ӧ̴")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("Ӧ")] + [StringLength(50)] + public string Name { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string SearchName { get; set; } + [IsDataGridColum(true, 4)] + [Description("м")] + [StringLength(50)] + public string SecondName { get; set; } + [IsDataGridColum(true, 5)] + [Description("")] + [StringLength(50)] + public string ThirdName { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string GroupName { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + public bool Active { get; set; } + [IsDataGridColum(true, 8)] + [Description("Ӧ̵ַ")] + [StringLength(50)] + public string Address1 { get; set; } + [IsDataGridColum(true, 9)] + [Description("Ӧ̵ַ")] + [StringLength(50)] + public string Address2 { get; set; } + [IsDataGridColum(true, 10)] + [Description("Ӧ̵ַ")] + [StringLength(50)] + public string Address3 { get; set; } + [IsDataGridColum(true, 11)] + [Description("ʱ")] + public int ZipCode { get; set; } + [IsDataGridColum(true, 12)] + [Description("")] + [StringLength(50)] + public string City { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + [StringLength(50)] + public string Country { get; set; } + [IsDataGridColum(true, 14)] + [Description("绰")] + public int Telephone { get; set; } + [IsDataGridColum(true, 15)] + [Description("ʡ")] + [StringLength(50)] + public string province { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string County { get; set; } + [IsDataGridColum(true, 17)] + [Description("")] + public int Fax { get; set; } + [IsDataGridColum(true, 18)] + [Description("Դ")] + [StringLength(50)] + public string LanguageCode { get; set; } + [IsDataGridColum(true, 19)] + [Description("ʼ")] + public int Email { get; set; } + [IsDataGridColum(true, 20)] + [Description("ַ")] + public int Internet { get; set; } + [IsDataGridColum(true, 21)] + [Description("˰ַ")] + public bool AddressIsTaxable { get; set; } + [IsDataGridColum(true, 22)] + [Description("˰")] + public bool AddressIsTaxIncluded { get; set; } + [IsDataGridColum(true, 23)] + [Description("˰")] + [StringLength(50)] + public string FederalTax { get; set; } + [IsDataGridColum(true, 24)] + [Description("˰")] + [StringLength(50)] + public string StateTax { get; set; } + [IsDataGridColum(true, 25)] + [Description("˰1")] + [StringLength(50)] + public string MiscTax1 { get; set; } + [IsDataGridColum(true, 26)] + [Description("˰2")] + [StringLength(50)] + public string MiscTax2 { get; set; } + [IsDataGridColum(true, 27)] + [Description("˰3")] + [StringLength(50)] + public string MiscTax3 { get; set; } + [IsDataGridColum(true, 28)] + [Description("˰")] + public bool TaxInCity { get; set; } + [IsDataGridColum(true, 29)] + [Description("˰")] + [StringLength(50)] + public string TaxZone { get; set; } + [IsDataGridColum(true, 30)] + [Description("˰")] + public int TaxClass { get; set; } + [IsDataGridColum(true, 31)] + [Description("˰;")] + [StringLength(50)] + public string TaxUsage { get; set; } + [IsDataGridColum(true, 32)] + [Description("")] + [StringLength(50)] + public string Title { get; set; } + [IsDataGridColum(true, 33)] + [Description("ϵ")] + [StringLength(50)] + public string ContactName { get; set; } + [IsDataGridColum(true, 34)] + [Description("д")] + [StringLength(50)] + public string Initials { get; set; } + [IsDataGridColum(true, 35)] + [Description("")] + [StringLength(50)] + public string Function { get; set; } + [IsDataGridColum(true, 36)] + [Description("Ա")] + [StringLength(50)] + public string Gender { get; set; } + [IsDataGridColum(true, 37)] + [Description("Ҫϵ")] + public bool ContactIsPrimary { get; set; } + [IsDataGridColum(true, 38)] + [Description("Ҫϵ")] + public bool ContactIsSecondary { get; set; } + [IsDataGridColum(true, 39)] + [Description("")] + public bool Compens { get; set; } + [IsDataGridColum(true, 40)] + [Description("Ʊļ")] + public int GlProfileInvoice { get; set; } + [IsDataGridColum(true, 41)] + [Description("Ʊݿļ")] + public int GlProfileCreditNote { get; set; } + [IsDataGridColum(true, 42)] + [Description("Ԥļ")] + public int GlProfilePrepayment { get; set; } + [IsDataGridColum(true, 43)] + [Description("˿ļ")] + public int AccountGLProfile { get; set; } + [IsDataGridColum(true, 44)] + [Description("˻ļ")] + public int SubAccountProfile { get; set; } + [IsDataGridColum(true, 45)] + [Description("Ŵ")] + [StringLength(50)] + public string CreditAgencyReference { get; set; } + [IsDataGridColum(true, 46)] + [Description("̻")] + [StringLength(50)] + public string CommerceNumber { get; set; } + [IsDataGridColum(true, 47)] + [Description("TID֪ͨ")] + [StringLength(50)] + public string TidNotice { get; set; } + [IsDataGridColum(true, 48)] + [Description("ⲿͻ")] + [StringLength(50)] + public string ExternalCustomerNumber { get; set; } + [IsDataGridColum(true, 49)] + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + [IsDataGridColum(true, 1505)] + [Description("Ӧ")] + [StringLength(50)] + public string SupplierType { get; set; } + [IsDataGridColum(true, 51)] + [Description("ɹ")] + [StringLength(50)] + public string Purchasetype { get; set; } + [IsDataGridColum(true, 52)] + [Description("֧")] + [StringLength(50)] + public string CreditTerms { get; set; } + [IsDataGridColum(true, 53)] + [Description("Ʊ״̬")] + [StringLength(50)] + public string InvoiceStatusCode { get; set; } + [IsDataGridColum(true, 54)] + [Description("")] + [StringLength(50)] + public string PaymentGroup { get; set; } + [IsDataGridColum(true, 55)] + [Description("ͻ")] + public bool SendRemittance { get; set; } + [IsDataGridColum(true, 56)] + [Description("ָ")] + public bool SplitAccount { get; set; } + [IsDataGridColum(true, 57)] + [Description("ʽ")] + [StringLength(50)] + public string ShipVia { get; set; } + [IsDataGridColum(true, 58)] + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + [IsDataGridColum(true, 59)] + [Description("")] + [StringLength(50)] + public string Carrier { get; set; } + [IsDataGridColum(true, 60)] + [Description("ɹϵ")] + [StringLength(50)] + public string Purchasecontact { get; set; } + [IsDataGridColum(true, 61)] + [Description("ռ˼")] + [StringLength(50)] + public string DayBookSet { get; set; } + [IsDataGridColum(true, 62)] + [Description("幩Ӧ")] + public bool KanBanSupplier { get; set; } + [IsDataGridColum(true, 63)] + [Description("")] + [StringLength(50)] + public string PromotionGroup { get; set; } + [IsDataGridColum(true, 64)] + [Description("ɹԱ")] + [StringLength(50)] + public string Buyer { get; set; } + [IsDataGridColum(true, 65)] + [Description("۸")] + [StringLength(50)] + public string PriceTable { get; set; } + [IsDataGridColum(true, 66)] + [Description("ۿ۱")] + [StringLength(50)] + public string DiscountTable { get; set; } + [IsDataGridColum(true, 67)] + [Description("̶۸")] + public bool FixedPrice { get; set; } + [IsDataGridColum(true, 68)] + [Description("۵۸")] + [StringLength(50)] + public string NonSoPrice { get; set; } + [IsDataGridColum(true, 69)] + [Description("иʽ")] + [StringLength(50)] + public string BankFormat { get; set; } + [IsDataGridColum(true, 70)] + [Description("Ӧ")] + [StringLength(50)] + public string SupplierBank { get; set; } + [IsDataGridColum(true, 71)] + [Description("")] + [StringLength(50)] + public string OwnBank { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 72)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 73)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 74)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 75)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 76)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 77)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_SUPPLIER_PART.cs b/北京北汽/SCP/Model/DataCenterTables/TT_SUPPLIER_PART.cs new file mode 100644 index 0000000..cec11eb --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_SUPPLIER_PART.cs @@ -0,0 +1,105 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("Ӧ")] + public class TT_SUPPLIER_PART : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 2)] + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + [IsDataGridColum(true, 3)] + [Description("Ӧ")] + [StringLength(50)] + public string SupplierPart { get; set; } + [IsDataGridColum(true, 4)] + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + [IsDataGridColum(true, 5)] + [Description("Ӧǰ")] + public int SupplierLeadTime { get; set; } + [IsDataGridColum(true, 6)] + [Description("ʹÿͻ")] + public bool UseSoReductionPrice { get; set; } + [IsDataGridColum(true, 7)] + [Description("ͻ")] + public decimal SoPriceReduction { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + [IsDataGridColum(true, 9)] + [Description("۵۸")] + public decimal QuotePrice { get; set; } + [IsDataGridColum(true, 10)] + [Description("")] + public DateTime QuoteDate { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + public decimal QuoteQty { get; set; } + [IsDataGridColum(true, 12)] + [Description("Ŀ")] + [StringLength(50)] + public string PriceList { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + [StringLength(50)] + public string Manufacturer { get; set; } + [IsDataGridColum(true, 14)] + [Description("")] + [StringLength(50)] + public string ManufacturerPart { get; set; } + [IsDataGridColum(true, 15)] + [Description("ע")] + [StringLength(50)] + public string Comment { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 17)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 18)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 19)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 20)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 21)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_SUPPLIER_TYPE.cs b/北京北汽/SCP/Model/DataCenterTables/TT_SUPPLIER_TYPE.cs new file mode 100644 index 0000000..8934bd0 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_SUPPLIER_TYPE.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("Ӧͱ")] + public class TT_SUPPLIER_TYPE : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_TEAM.cs b/北京北汽/SCP/Model/DataCenterTables/TT_TEAM.cs new file mode 100644 index 0000000..2f5ecef --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_TEAM.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("Ŷӱ")] + public class TT_TEAM : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_WMS_LOCATION.cs b/北京北汽/SCP/Model/DataCenterTables/TT_WMS_LOCATION.cs new file mode 100644 index 0000000..02560ad --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_WMS_LOCATION.cs @@ -0,0 +1,96 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("WMSλ")] + public class TT_WMS_LOCATION : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("ERPλ")] + [StringLength(50)] + public string ErpLocation { get; set; } + [IsDataGridColum(true, 4)] + [Description("")] + [StringLength(50)] + public string Area { get; set; } + [IsDataGridColum(true, 5)] + [Description("״̬")] + [StringLength(50)] + public string InventoryStatus { get; set; } + [IsDataGridColum(true, 6)] + [Description("Ա")] + [StringLength(50)] + public string WarehouseKeeper { get; set; } + [IsDataGridColum(true, 7)] + [Description("ֿ")] + [StringLength(50)] + public string WhseCode { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + public bool IsEnableNegativeStock { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + public bool AutoRemoveZeroStockDetail { get; set; } + [IsDataGridColum(true, 10)] + [Description("")] + public decimal MaxBoxQty { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + public bool IsEnableMix { get; set; } + [IsDataGridColum(true, 12)] + [Description("Ŀ")] + [StringLength(50)] + public string ProjectId { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [IsDataGridColum(true, 13)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 14)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 15)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 17)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 18)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/TT_WORK_CENTER.cs b/北京北汽/SCP/Model/DataCenterTables/TT_WORK_CENTER.cs new file mode 100644 index 0000000..b783b10 --- /dev/null +++ b/北京北汽/SCP/Model/DataCenterTables/TT_WORK_CENTER.cs @@ -0,0 +1,109 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("ı")] + public class TT_WORK_CENTER : ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("Ĵ")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string Department { get; set; } + [IsDataGridColum(true, 4)] + [Description("Զ̶")] + public bool AutoFirm { get; set; } + [IsDataGridColum(true, 5)] + [Description("ϴԶ̶")] + public DateTime LastAutoFirm { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string Scheduler { get; set; } + [IsDataGridColum(true, 7)] + [Description("ȴʱ")] + public decimal Queue { get; set; } + [IsDataGridColum(true, 8)] + [Description("ȴʱ")] + public decimal Wait { get; set; } + [IsDataGridColum(true, 9)] + [Description("豸/")] + public int MchOp { get; set; } + [IsDataGridColum(true, 10)] + [Description("Ա")] + public decimal SetupMen { get; set; } + [IsDataGridColum(true, 11)] + [Description("ȫԱ")] + public decimal RunCrew { get; set; } + [IsDataGridColum(true, 12)] + [Description("")] + public decimal MchWkctr { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + public decimal MchBdn { get; set; } + [IsDataGridColum(true, 14)] + [Description("÷")] + public decimal SetupRte { get; set; } + [IsDataGridColum(true, 15)] + [Description("˹")] + public decimal LbrRate { get; set; } + [IsDataGridColum(true, 16)] + [Description("˹")] + public decimal BdnRate { get; set; } + [IsDataGridColum(true,17)] + [Description("˹")] + public decimal BdnPct { get; set; } + [IsDataGridColum(true, 18)] + [Description("")] + [StringLength(50)] + public string Mch { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 19)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 20)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 21)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 22)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 23)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 24)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DataCenterTables/name.txt b/北京北汽/SCP/Model/DataCenterTables/name.txt new file mode 100644 index 0000000..70ff882 Binary files /dev/null and b/北京北汽/SCP/Model/DataCenterTables/name.txt differ diff --git a/北京北汽/SCP/Model/DbContextFactory.cs b/北京北汽/SCP/Model/DbContextFactory.cs new file mode 100644 index 0000000..c01519a --- /dev/null +++ b/北京北汽/SCP/Model/DbContextFactory.cs @@ -0,0 +1,82 @@ +using System; +using System.Data.Entity; +using System.Data.SqlClient; +using System.Text; +using CK.SCP.Utils; + + +namespace ChangkeTec.SDMS.Model +{ + public static class DbContextFactory + { + static DbContextFactory() + { + Database.SetInitializer(null); + Database.SetInitializer(null); + } + + + public static DataCenterContext CreateDataCenterInstance() + { + var dbSetting = GlobalConfig.DataCenterDB; + try + { + DataCenterContext db; + var strConn = GetEfConnectionString(dbSetting); + db = new DataCenterContext(strConn); + + return db; + } + catch (SqlException ex) + { + throw new Exception($"系统无法连接到数据库:{dbSetting},请检查配置的服务器,数据库,用户名和密码等信息是否正确。{Environment.NewLine}{ex}"); + } + } + + public static ExchangeCenterContext CreateExchangeCenterInstance() + { + var dbSetting = GlobalConfig.ExchangeCenterDB; + try + { + ExchangeCenterContext db; + var strConn = GetEfConnectionString(dbSetting); + db = new ExchangeCenterContext(strConn); + return db; + } + catch (SqlException ex) + { + throw new Exception($"系统无法连接到数据库:{dbSetting},请检查配置的服务器,数据库,用户名和密码等信息是否正确。{Environment.NewLine}{ex}"); + } + } + + private static string GetEfConnectionString(DbSetting dbSetting) + { + var sbConn = new StringBuilder(); + + if (string.IsNullOrEmpty(dbSetting.密码)) throw new Exception("配置文件错误,请检查"); + switch (dbSetting.数据库类型) + { + case "SQLServer": + sbConn.Append($"Data source ={dbSetting.服务器地址}"); + sbConn.Append(dbSetting.端口 == "0" ? ";" : $",{dbSetting.端口};"); + sbConn.Append($"Initial catalog = {dbSetting.数据库名称};"); + sbConn.Append($"User id = {dbSetting.用户名};"); + sbConn.Append($"Password = {CK.SCP.Utils.EncryptHelper.Decrypt(dbSetting.密码)};"); + sbConn.Append("MultipleActiveResultSets = True;"); + sbConn.Append("persist security info = True;"); + sbConn.Append("App = EntityFramework;"); + break; + case "MySql": + sbConn.Append($"server ={dbSetting.服务器地址};"); + sbConn.Append($"port ={dbSetting.端口};"); + sbConn.Append($"database = {dbSetting.数据库名称};"); + sbConn.Append($"user id = {dbSetting.用户名};"); + sbConn.Append($"password = {EncryptHelper.Decrypt(dbSetting.密码)};"); + sbConn.Append("persistsecurityinfo =True;"); + break; + } + + return sbConn.ToString(); + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/DbSetting.cs b/北京北汽/SCP/Model/DbSetting.cs new file mode 100644 index 0000000..b621989 --- /dev/null +++ b/北京北汽/SCP/Model/DbSetting.cs @@ -0,0 +1,57 @@ +using System.ComponentModel.DataAnnotations; +using ChangkeTec.SDMS.Model.Enums; +using CK.SCP.Utils; + + +namespace ChangkeTec.SDMS.Model +{ + public class DbSetting + { + public DbSetting() + { + #region ly 2019-05-05 + + 数据库类型 = DataBaseType.SQLServer.ToString(); + 服务器地址 = "127.0.0.1"; + 端口 = "1433"; + 数据库名称 = "SDMS"; + 用户名 = "sa"; + 密码 = "5E0AFEB85CA001A3371A9F19E7EC4DFF"; + + #endregion + } + + public DbSetting(DataBaseType type) + { + 数据库类型 = type.ToString(); + 服务器地址 = "127.0.0.1"; + 端口 = "1433"; + 数据库名称 = "SDMS"; + 用户名 = "sa"; + 密码 = "5E0AFEB85CA001A3371A9F19E7EC4DFF"; + } + + [StringLength(50)] + public string 数据库类型 { get; set; } //= Enums.DataBaseType.SQLServer.ToString(); + + [StringLength(50)] + public string 服务器地址 { get; set; } //= "127.0.0.1"; + + [StringLength(50)] + public string 端口 { get; set; } //= "1433"; + + [StringLength(50)] + public string 数据库名称 { get; set; } //= "DB_NAME"; + + [StringLength(50)] + public string 用户名 { get; set; } //= "sa"; + + [StringLength(50)] + public string 密码 { get; set; } //= "5E0AFEB85CA001A3371A9F19E7EC4DFF"; + + //public override string ToString() + //{ + // return EntitiesHelper.GetPropertiesString(this); + //} + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/EntityClassInfo.cs b/北京北汽/SCP/Model/EntityClassInfo.cs new file mode 100644 index 0000000..b2063b4 --- /dev/null +++ b/北京北汽/SCP/Model/EntityClassInfo.cs @@ -0,0 +1,235 @@ +using System.Collections.Generic; + +namespace ChangkeTec.SDMS.Model +{ + public class EntityClassInfo + { + + public List TaList { get; set; } + public List TsList { get; set; } + public List TtList { get; set; } + public List TeaList { get; set; } + public List TedList { get; set; } + public List TesList { get; set; } + public List OnlyTsList { get; set; } + + private Dictionary _nameDict { get; set; } + public EntityClassInfo() + { + InitName(); + InitTaList(); + InitTsList(); + InitTtList(); + InitTeaList(); + InitTedList(); + InitTesList(); + InitOnlyTsList(); + } + + private void InitName() + { + _nameDict = new Dictionary(); + _nameDict.Add("Account", "ACCOUNT"); + _nameDict.Add("Bom", "BOM"); + _nameDict.Add("Code", "CODE"); + _nameDict.Add("CodeType", "CODE_TYPE"); + _nameDict.Add("Color", "COLOR"); + _nameDict.Add("CostCenter", "COST_CENTER"); + _nameDict.Add("Customer", "CUSTOMER"); + _nameDict.Add("CustomerPart", "CUSTOMER_PART"); + _nameDict.Add("CustomerType", "CUSTOMER_TYPE"); + _nameDict.Add("DepartMent", "DEPARTMENT"); + _nameDict.Add("Domain", "DOMAIN"); + _nameDict.Add("EdiData", "EDI_DATA"); + _nameDict.Add("Entity", "ENTITY"); + _nameDict.Add("Line", "LINE"); + _nameDict.Add("LinePart", "LINE_PART"); + _nameDict.Add("Location", "LOCATION"); + _nameDict.Add("MesData", "MES_DATA"); + _nameDict.Add("Pack", "PACK"); + _nameDict.Add("PartDet", "PART_DET"); + _nameDict.Add("PartMstr", "PART_MSTR"); + _nameDict.Add("ProductLine", "PRODUCT_LINE"); + _nameDict.Add("Project", "PROJECT"); + _nameDict.Add("PurchasePrice", "PURCHASE_PRICE"); + _nameDict.Add("Routing", "ROUTING"); + _nameDict.Add("SalePrice", "SALE_PRICE"); + _nameDict.Add("Shift", "SHIFT"); + _nameDict.Add("Site", "SITE"); + _nameDict.Add("StandCostPrice", "STAND_COST_PRICE"); + _nameDict.Add("SubAccount", "SUB_ACCOUNT"); + _nameDict.Add("Supplier", "SUPPLIER"); + _nameDict.Add("SupplierPart", "SUPPLIER_PART"); + _nameDict.Add("SupplierType", "SUPPLIER_TYPE"); + _nameDict.Add("Team", "TEAM"); + _nameDict.Add("WmsLocation", "WMS_LOCATION"); + + _nameDict.Add("WorkCenter", "WORK_CENTER"); + } + + private void InitTedList() + { + TedList = new List() + { + new NameStruct() {ClassName = "Ted_AsnDet", ModelName = "TED_ASN_DET"}, + new NameStruct() {ClassName = "Ted_AsnMstr", ModelName = "TED_ASN_MSTR"}, + new NameStruct() {ClassName = "Ted_Assemble", ModelName = "TED_ASSEMBLE"}, + new NameStruct() {ClassName = "Ted_BkDet", ModelName = "TED_BK_DET"}, + new NameStruct() {ClassName = "Ted_BkMstr", ModelName = "TED_BK_MSTR"}, + new NameStruct() {ClassName = "Ted_FixedDet", ModelName = "TED_FIXED_DET"}, + new NameStruct() {ClassName = "Ted_FixedMstr", ModelName = "TED_FIXED_MSTR"}, + new NameStruct() {ClassName = "Ted_Injection", ModelName = "TED_INJECTION"}, + new NameStruct() {ClassName = "Ted_InvoiceDet", ModelName = "TED_INVOICE_DET"}, + new NameStruct() {ClassName = "Ted_InvoiceMstr", ModelName = "TED_INVOICE_MSTR"}, + new NameStruct() {ClassName = "Ted_IsSunpDet", ModelName = "TED_ISSUNP_DET"}, + new NameStruct() {ClassName = "Ted_IsSunpMstr", ModelName = "TED_ISSUNP_MSTR"}, + new NameStruct() {ClassName = "Ted_KanbanDet", ModelName = "TED_KANBAN_DET"}, + new NameStruct() {ClassName = "Ted_KanbanMstr", ModelName = "TED_KANBAN_MSTR"}, + new NameStruct() {ClassName = "Ted_Led", ModelName = "TED_LED"}, + new NameStruct() {ClassName = "Ted_PoDet", ModelName = "TED_PO_DET"}, + new NameStruct() {ClassName = "Ted_PoMstr", ModelName = "TED_PO_MSTR"}, + new NameStruct() {ClassName = "Ted_RctunpDet", ModelName = "TED_RCTUNP_DET"}, + new NameStruct() {ClassName = "Ted_RctunpMstr", ModelName = "TED_RCTUNP_MSTR"}, + new NameStruct() {ClassName = "Ted_ReceiptDet", ModelName = "TED_RECEIPT_DET"}, + new NameStruct() {ClassName = "Ted_ReceiptMstr", ModelName = "TED_RECEIPT_MSTR"}, + new NameStruct() {ClassName = "Ted_ReturnDet", ModelName = "TED_RETURN_DET"}, + new NameStruct() {ClassName = "Ted_ReturnMstr", ModelName = "TED_RETURN_MSTR"}, + new NameStruct() {ClassName = "Ted_SoDet", ModelName = "TED_SO_DET"}, + new NameStruct() {ClassName = "Ted_SoMstr", ModelName = "TED_SO_MSTR"}, + new NameStruct() {ClassName = "Ted_Spraying", ModelName = "TED_SPRAYING"}, + new NameStruct() {ClassName = "Ted_SprayingRepair", ModelName = "TED_SPRAYING_REPAIR"}, + new NameStruct() {ClassName = "Ted_Stock", ModelName = "TED_STOCK"}, + new NameStruct() {ClassName = "Ted_TransferDet", ModelName = "TED_TRANSFER_DET"}, + new NameStruct() {ClassName = "Ted_TransferMstr", ModelName = "TED_TRANSFER_MSTR"}, + }; + } + + private void InitTeaList() + { + TeaList = new List() + { + new NameStruct() {ClassName = "Tea_Subscribe", ModelName = "TEA_SUBSCRIBE"}, + new NameStruct() {ClassName = "Tea_System", ModelName = "TEA_SYSTEM"}, + new NameStruct() {ClassName = "Tea_Table", ModelName = "TEA_TABLE"}, + new NameStruct() {ClassName = "Tea_Task", ModelName = "TEA_TASK"}, + new NameStruct() {ClassName = "Tea_TaskSub", ModelName = "TEA_TASK_SUB"}, + new NameStruct() {ClassName = "Tea_TaskSubHis", ModelName = "TEA_TASK_SUB_HIS"}, + new NameStruct() {ClassName = "Tea_DataError", ModelName = "TEA_DATA_ERROR_LOG"}, + new NameStruct() {ClassName = "Tea_TaskSubRead", ModelName = "TEA_TASK_SUB_READ_LOG"}, + + }; + } + + private void InitTaList() + { + TaList = new List() + { + new NameStruct() {ClassName = "Ta_Button", ModelName = "TA_BUTTON"}, + new NameStruct() {ClassName = "Ta_Config", ModelName = "TA_CONFIG"}, + new NameStruct() {ClassName = "Ta_Dept", ModelName = "TA_DEPT"}, + new NameStruct() {ClassName = "Ta_Menu", ModelName = "TA_MENU"}, + new NameStruct() {ClassName = "Ta_UserButton", ModelName = "TA_USER_BUTTON"}, + new NameStruct() {ClassName = "Ta_User", ModelName = "TA_USER"}, + + }; + } + + private void InitTsList() + { + TsList = new List() + { + + new NameStruct() {ClassName = "Ta_Task", ModelName = "TA_TASK"}, + new NameStruct() {ClassName = "Ta_TaskHis", ModelName = "TA_TASK_HIS"}, + new NameStruct() {ClassName = "Tl_DataChange", ModelName = "TL_DATA_CHANGE"}, + new NameStruct() {ClassName = "Tl_Exception", ModelName = "TL_EXCEPTION"}, + new NameStruct() {ClassName = "Tl_Login", ModelName = "TL_LOGIN"}, + }; + + foreach (var name in _nameDict) + { + TsList.Add(new NameStruct() + { + ClassName = $"Ts_{name.Key}", + ModelName = $"TS_{name.Value}" + }); + } + + } + + private void InitOnlyTsList() + { + OnlyTsList = new List(); + foreach (var name in _nameDict) + { + OnlyTsList.Add(new NameStruct() + { + ClassName = $"Ts_{name.Key}", + ModelName = $"TS_{name.Value}", + TTModelName=$"TT_{name.Value}", + TTClassName = $"Tt_{name.Key}", + }); + } + } + + + + private void InitTtList() + { + TtList = new List(); + foreach (var name in _nameDict) + { + TtList.Add(new NameStruct() + { + ClassName = $"Tt_{name.Key}", + TSClassName = $"Ts_{name.Key}", + ModelName = $"TT_{name.Value}", + TTModelName = $"TT_{name.Value}", + TSModelName = $"TS_{name.Value}", + TESModelName = $"TES_{name.Value}" + }); + } + + } + + private void InitTesList() + { + TesList = new List(); + foreach (var name in _nameDict) + { + TesList.Add(new NameStruct() + { + ClassName = $"Tes_{name.Key}", + ModelName = $"TES_{name.Value}", + TTClassName = $"Tt_{name.Key}", + }); + } + + } + } + + + public class NameStruct + { + //文件名称 + public string ClassName { get; set; } + + //模型名称 + public string ModelName { get; set; } + + //文件名称 + public string TSClassName { get; set; } + //TS模型名称 + public string TSModelName { get; set; } + + //文件名称 + public string TTClassName { get; set; } + //TT模型名称 + public string TTModelName { get; set; } + + //TES模型名称 + public string TESModelName { get; set; } + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/Enums/DataBaseType.cs b/北京北汽/SCP/Model/Enums/DataBaseType.cs new file mode 100644 index 0000000..1cd6cd1 --- /dev/null +++ b/北京北汽/SCP/Model/Enums/DataBaseType.cs @@ -0,0 +1,10 @@ +namespace ChangkeTec.SDMS.Model.Enums +{ + public enum DataBaseType + { + SQLServer, + MySql, + Oracle, + PostgreSQL + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/Enums/EnumBaseDataLogType.cs b/北京北汽/SCP/Model/Enums/EnumBaseDataLogType.cs new file mode 100644 index 0000000..b558710 --- /dev/null +++ b/北京北汽/SCP/Model/Enums/EnumBaseDataLogType.cs @@ -0,0 +1,13 @@ +using System; + +namespace ChangkeTec.SDMS.Model.Enums +{ + [Serializable] + public enum EnumBaseDataLogType + { + Select = 0, + Add = 1, + Update = 2, + Delete = 3 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/Enums/EnumConfigType.cs b/北京北汽/SCP/Model/Enums/EnumConfigType.cs new file mode 100644 index 0000000..32881c4 --- /dev/null +++ b/北京北汽/SCP/Model/Enums/EnumConfigType.cs @@ -0,0 +1,17 @@ +using System; + +namespace ChangkeTec.SDMS.Model.Enums +{ + /// + /// - + /// + [Serializable] + public enum EnumConfigType + { + STRING = 0, + INT = 1, + FLOAT = 2, + BOOL = 3, + DATETIME = 4 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/Enums/EnumErrorCode.cs b/北京北汽/SCP/Model/Enums/EnumErrorCode.cs new file mode 100644 index 0000000..72d429e --- /dev/null +++ b/北京北汽/SCP/Model/Enums/EnumErrorCode.cs @@ -0,0 +1,21 @@ +using System; +using System.ComponentModel; + +namespace ChangkeTec.SDMS.Model.Enums +{ + [Serializable] + public enum EnumErrorCode + { + [Description("成功")] Success = 0, + [Description("警告")] Warning = 1, + [Description("连接错误")] ErrorConnection = 1001, + [Description("未找到数据")] DataNotFound = 2001, + [Description("数据已存在")] DataAlreadyExist = 2002, + [Description("数据状态错误")] DataStateError = 2003, + [Description("数量错误")] DataQtyError = 2004, + + [Description("发现新零件")] NewCustPart = 4001, + [Description("系统错误")] Exception = -1, + [Description("数据校验失败")] DbEntityValidationException = -2 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/Enums/EnumLoginState.cs b/北京北汽/SCP/Model/Enums/EnumLoginState.cs new file mode 100644 index 0000000..0c8a597 --- /dev/null +++ b/北京北汽/SCP/Model/Enums/EnumLoginState.cs @@ -0,0 +1,11 @@ +using System; + +namespace ChangkeTec.SDMS.Model.Enums +{ + [Serializable] + public enum EnumLoginState + { + Logout = 0, + Login = 1 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/Enums/EnumTableName.cs b/北京北汽/SCP/Model/Enums/EnumTableName.cs new file mode 100644 index 0000000..f1efd74 --- /dev/null +++ b/北京北汽/SCP/Model/Enums/EnumTableName.cs @@ -0,0 +1,130 @@ +namespace ChangkeTec.SDMS.Model.Enums +{ + public enum EnumTableName + { + /// + /// 按钮表 + /// + TA_BUTTON, + + /// + /// 系统参数表 + /// + TA_CONFIG, + + /// + /// 部门表 + /// + TA_DEPT, + + /// + /// 菜单表 + /// + TA_MENU, + + + /// + /// 用户表 + /// + TA_USER, + + /// + /// 用户权限表 + /// + TA_USER_BUTTON, + + + TL_DATA_CHANGE, + TL_EXCEPTION, + TL_OPER, + + /// + /// 通用代码表 + /// + TS_CODE, + /// + /// 通用代码变更表 + /// + TT_CODE, + /// + /// 通用代码类型表 + /// + TS_CODE_TYPE, + /// + /// 通用代码类型表 + /// + TT_CODE_TYPE, + /// + /// 科目表 + /// + TS_ACCOUNT, + /// + /// 科目表变更表 + /// + TT_ACCOUNT, + TS_BOM, + TT_BOM, + TS_COLOR, + TT_COLOR, + TS_COST_CENTER, + TT_COST_CENTER, + TS_CUSTOMER, + TT_CUSTOMER, + TS_CUSTOMER_PART, + TT_CUSTOMER_PART, + TS_CUSTOMER_TYPE, + TT_CUSTOMER_TYPE, + TS_DEPARTMENT, + TT_DEPARTMENT, + TS_DOMAIN, + TT_DOMAIN, + TS_EDI_DATA, + TT_EDI_DATA, + TS_ENTITY, + TT_ENTITY, + TS_LINE, + TT_LINE, + TS_LINE_PART, + TT_LINE_PART, + TS_LOCATION, + TT_LOCATION, + TS_MES_DATA, + TT_MES_DATA, + TS_PACK, + TT_PACK, + TS_PART_DET, + TT_PART_DET, + TS_PART_MSTR, + TT_PART_MSTR, + TS_PRODUCT_LINE, + TT_PRODUCT_LINE, + TS_PROJECT, + TT_PROJECT, + TS_PURCHASE_PRICE, + TT_PURCHASE_PRICE, + TS_ROUTING, + TT_ROUTING, + TS_SALE_PRICE, + TT_SALE_PRICE, + TS_SHIFT, + TT_SHIFT, + TS_SITE, + TT_SITE, + TS_STAND_COST_PRICE, + TT_STAND_COST_PRICE, + TS_SUB_ACCOUNT, + TT_SUB_ACCOUNT, + TS_SUPPLIER, + TT_SUPPLIER, + TS_SUPPLIER_PART, + TT_SUPPLIER_PART, + TS_SUPPLIER_TYPE, + TT_SUPPLIER_TYPE, + TS_TEAM, + TT_TEAM, + TS_WORK_CENTER, + TT_WORK_CENTER, + TS_WMS_LOCATION, + TT_WMS_LOCATION + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/Enums/EnumTaskState.cs b/北京北汽/SCP/Model/Enums/EnumTaskState.cs new file mode 100644 index 0000000..bc30a07 --- /dev/null +++ b/北京北汽/SCP/Model/Enums/EnumTaskState.cs @@ -0,0 +1,25 @@ +using System.ComponentModel; + +namespace ChangkeTec.SDMS.Model.Enums +{ + public enum EnumTaskState + { + + [Description("未读取")] Unread = 0, + [Description("执行中")] Processing = 1, + [Description("成功")] Success = 2, + [Description("失败")] Failed = 3, + [Description("部分失败")] PartialFailed = 4, + [Description("手动设置")] Menual = 5, + [Description("已取消")] Cancelled = 9, + } + + public enum EnumCommandType + { + [Description("读取")] R = 0, //Read + [Description("添加")] A = 1, //Add + [Description("更新")] U = 2, //Update + [Description("添加或更新")] AU = 3, //AddOrUpdate + [Description("删除")] D = 9, //Delete + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/Enums/EnumUserType.cs b/北京北汽/SCP/Model/Enums/EnumUserType.cs new file mode 100644 index 0000000..909fb22 --- /dev/null +++ b/北京北汽/SCP/Model/Enums/EnumUserType.cs @@ -0,0 +1,15 @@ +using System; + +namespace ChangkeTec.SDMS.Model.Enums +{ + /// + /// û-TA_User.UserTye + /// + [Serializable] + public enum EnumUserType + { + Admin = 1, + SuperVisor = 2, + User = 3 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterContext.cs b/北京北汽/SCP/Model/ExchangeCenterContext.cs new file mode 100644 index 0000000..6b202c8 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterContext.cs @@ -0,0 +1,107 @@ +using System.Data.Entity; +using System.Data.Entity.ModelConfiguration.Conventions; +using ChangkeTec.SDMS.Model.ExchangeCenterTables; + +namespace ChangkeTec.SDMS.Model +{ + [DbConfigurationType(typeof(SqlDbConfiguration))] + public class ExchangeCenterContext : DbContext + { + public ExchangeCenterContext() : base("name=ExchangeCenterContext") + { + } + + public ExchangeCenterContext(string strConn) : base(strConn) + { + //Database.SetInitializer(new ExchangeCenterDatabaseInitializer()); + } + + public virtual DbSet TEA_CONFIG { get; set; } + public virtual DbSet TEA_TASK { get; set; } + public virtual DbSet TEA_TASK_SUB { get; set; } + public virtual DbSet TEL_TASK_SUB_HIS { get; set; } + public virtual DbSet TEA_DATA_ERROR_LOG { get; set; } + public virtual DbSet TEA_TASK_SUB_READ_LOG { get; set; } + public virtual DbSet TEA_TABLE { get; set; } + public virtual DbSet TEA_SYSTEM { get; set; } + public virtual DbSet TEA_SUBSCRIBE { get; set; } + public virtual DbSet TES_SUPPLIER { get; set; } + public virtual DbSet TES_CUSTOMER { get; set; } + public virtual DbSet TES_DOMAIN { get; set; } + public virtual DbSet TES_WORK_CENTER { get; set; } + public virtual DbSet TES_SUPPLIER_TYPE { get; set; } + public virtual DbSet TES_SUB_ACCOUNT { get; set; } + public virtual DbSet TES_SITE { get; set; } + public virtual DbSet TES_CODE { get; set; } + public virtual DbSet TES_CODE_TYPE { get; set; } + public virtual DbSet TES_PRODUCT_LINE { get; set; } + public virtual DbSet TES_PROJECT { get; set; } + public virtual DbSet TES_DEPARTMENT { get; set; } + public virtual DbSet TES_ENTITY { get; set; } + public virtual DbSet TES_CUSTOMER_TYPE { get; set; } + public virtual DbSet TES_COST_CENTER { get; set; } + public virtual DbSet TES_ACCOUNT { get; set; } + public virtual DbSet TES_EDI_DATA { get; set; } + public virtual DbSet TES_ROUTING { get; set; } + public virtual DbSet TES_PART_MSTR { get; set; } + public virtual DbSet TES_PART_DET { get; set; } + public virtual DbSet TES_MES_DATA { get; set; } + public virtual DbSet TES_LOCATION { get; set; } + public virtual DbSet TES_WMS_LOCATION { get; set; } + public virtual DbSet TES_LINE { get; set; } + public virtual DbSet TES_COLOR { get; set; } + public virtual DbSet TES_BOM { get; set; } + public virtual DbSet TES_PACK { get; set; } + public virtual DbSet TES_SUPPLIER_PART { get; set; } + public virtual DbSet TES_CUSTOMER_PART { get; set; } + public virtual DbSet TES_LINE_PART { get; set; } + public virtual DbSet TES_PURCHASE_PRICE { get; set; } + public virtual DbSet TES_SALE_PRICE { get; set; } + public virtual DbSet TES_STAND_COST_PRICE { get; set; } + public virtual DbSet TES_TEAM { get; set; } + public virtual DbSet TES_SHIFT { get; set; } + public virtual DbSet TED_TRANSFER_MSTR { get; set; } + public virtual DbSet TED_TRANSFER_DET { get; set; } + public virtual DbSet TED_STOCK { get; set; } + public virtual DbSet TED_RETURN_MSTR { get; set; } + public virtual DbSet TED_RETURN_DET { get; set; } + public virtual DbSet TED_RCTUNP_MSTR { get; set; } + public virtual DbSet TED_RCTUNP_DET { get; set; } + public virtual DbSet TED_RECEIPT_MSTR { get; set; } + public virtual DbSet TED_RECEIPT_DET { get; set; } + public virtual DbSet TED_ISSUNP_MSTR { get; set; } + public virtual DbSet TED_ISSUNP_DET { get; set; } + public virtual DbSet TED_BK_MSTR { get; set; } + public virtual DbSet TED_BK_DET { get; set; } + public virtual DbSet TED_CHECK_MSTR { get; set; } + public virtual DbSet TED_CHECK_DET { get; set; } + public virtual DbSet TED_MRP_MSTR { get; set; } + public virtual DbSet TED_MRP_DET { get; set; } + public virtual DbSet TED_INVOICE_MSTR { get; set; } + public virtual DbSet TED_INVOICE_DET { get; set; } + public virtual DbSet TED_INVOICE_ADD { get; set; } + public virtual DbSet TED_ASN_MSTR { get; set; } + public virtual DbSet TED_ASN_DET { get; set; } + public virtual DbSet TED_INJECTION { get; set; } + public virtual DbSet TED_SPRAYING { get; set; } + public virtual DbSet TED_SPRAYING_REPAIR { get; set; } + public virtual DbSet TED_ASSEMBLE { get; set; } + public virtual DbSet TED_LED { get; set; } + public virtual DbSet TED_FIXED_MSTR { get; set; } + public virtual DbSet TED_FIXED_DET { get; set; } + public virtual DbSet TED_POD_DET { get; set; } + public virtual DbSet TED_PO_MSTR { get; set; } + public virtual DbSet TED_SO_DET { get; set; } + public virtual DbSet TED_SO_MSTR { get; set; } + public virtual DbSet TED_KANBAN_MSTR { get; set; } + public virtual DbSet TED_KANBAN_DET { get; set; } + + + protected override void OnModelCreating(DbModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + modelBuilder.Conventions.Remove(); + modelBuilder.Conventions.Add(new DecimalPropertyConvention(18, 5)); + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterDatabaseInitializer.cs b/北京北汽/SCP/Model/ExchangeCenterDatabaseInitializer.cs new file mode 100644 index 0000000..b6f60db --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterDatabaseInitializer.cs @@ -0,0 +1,137 @@ +using System.Collections.Generic; +using System.Data.Entity; +using System.Data.Entity.Migrations; +using System.Linq; +using ChangkeTec.SDMS.Model.ExchangeCenterTables; +using CK.SCP.Utils; + +namespace ChangkeTec.SDMS.Model +{ + public class ExchangeCenterDatabaseInitializer : DropCreateDatabaseIfModelChanges // DropCreateDatabaseAlways DropCreateDatabaseIfModelChanges + { + protected override void Seed(ExchangeCenterContext db) + { + base.InitializeDatabase(db); + + db.TEA_CONFIG.AddOrUpdate(EcConfigInitializer.ConfigList.ToArray()); + db.TEA_SYSTEM.AddOrUpdate(SystemInitializer.SystemList.ToArray()); + db.TEA_TABLE.AddOrUpdate(TableInitializer.TableList.ToArray()); + db.TEA_SUBSCRIBE.AddOrUpdate(SubscribeInitializer.SubscribeList.ToArray()); + + db.Database.ExecuteSqlCommand(ProcedureInitializer.P_GetAllTables); + + db.SaveChanges(); + base.Seed(db); + + } + + public IEnumerable InitConfigList { get; set; } + + public IEnumerable InitSubscribeList { get; set; } + + public IEnumerable InitTableList { get; set; } + + public IEnumerable InitSystemList { get; set; } + + } + + + public static class EcConfigInitializer + { + public static List ConfigList { get; set; } = new List(); + } + + public static class SystemInitializer + { + public static List SystemList { get; set; } =new List + { + new TEA_SYSTEM{SystemName = "QAD",Password = EncryptHelper.Encrypt("1234qwer"), SystemDesc = "QAD系统",CreateUser = "Init"}, + new TEA_SYSTEM{SystemName = "SCP",Password = EncryptHelper.Encrypt("1234qwer"), SystemDesc = "QAD系统",CreateUser = "Init"}, + new TEA_SYSTEM{SystemName = "WMS",Password = EncryptHelper.Encrypt("1234qwer"), SystemDesc = "QAD系统",CreateUser = "Init",Domain = "DM",Site="ST"}, + new TEA_SYSTEM{SystemName = "MES",Password = EncryptHelper.Encrypt("1234qwer"), SystemDesc = "QAD系统",CreateUser = "Init",Domain = "DM",Site="ST"}, + }; + } + + public static class TableInitializer + { + public static List TableList { get; set; } = new List() + { + new TEA_TABLE {TableName = "TED_ASN_DET", TableDesc = "发货单明细表",}, + new TEA_TABLE {TableName = "TED_ASN_MSTR", TableDesc = "发货单主表",}, + new TEA_TABLE {TableName = "TED_ASSEMBLE", TableDesc = "MES装配信息表",}, + new TEA_TABLE {TableName = "TED_BK_DET", TableDesc = "生产回冲明细表",}, + new TEA_TABLE {TableName = "TED_BK_MSTR", TableDesc = "生产回冲主表",}, + new TEA_TABLE {TableName = "TED_CHECK_DET", TableDesc = "盘点明细表",}, + new TEA_TABLE {TableName = "TED_CHECK_MSTR", TableDesc = "盘点主表",}, + new TEA_TABLE {TableName = "TED_FIXED_DET", TableDesc = "固定资产明细表",}, + new TEA_TABLE {TableName = "TED_FIXED_MSTR", TableDesc = "固定资产主表",}, + new TEA_TABLE {TableName = "TED_INJECTION", TableDesc = "MES注塑信息表",}, + new TEA_TABLE {TableName = "TED_INVOICE_ADD", TableDesc = "发票附加表",}, + new TEA_TABLE {TableName = "TED_INVOICE_DET", TableDesc = "发票明细表",}, + new TEA_TABLE {TableName = "TED_INVOICE_MSTR", TableDesc = "发票主表",}, + new TEA_TABLE {TableName = "TED_ISSUNP_DET", TableDesc = "计划外出库明细表",}, + new TEA_TABLE {TableName = "TED_ISSUNP_MSTR", TableDesc = "计划外出库主表",}, + new TEA_TABLE {TableName = "TED_KANBAN_DET", TableDesc = "看板明细表",}, + new TEA_TABLE {TableName = "TED_KANBAN_MSTR", TableDesc = "看板主表",}, + new TEA_TABLE {TableName = "TED_LED", TableDesc = "MES亮灯信息表",}, + new TEA_TABLE {TableName = "TED_MRP_DET", TableDesc = "MRP明细表",}, + new TEA_TABLE {TableName = "TED_MRP_MSTR", TableDesc = "MRP主表",}, + new TEA_TABLE {TableName = "TED_PO_DET", TableDesc = "采购订单明细表",}, + new TEA_TABLE {TableName = "TED_PO_MSTR", TableDesc = "采购订单主表",}, + new TEA_TABLE {TableName = "TED_RCTUNP_DET", TableDesc = "计划外入库明细表",}, + new TEA_TABLE {TableName = "TED_RCTUNP_MSTR", TableDesc = "计划外入库主表",}, + new TEA_TABLE {TableName = "TED_RECEIPT_DET", TableDesc = "采购收货明细表",}, + new TEA_TABLE {TableName = "TED_RECEIPT_MSTR", TableDesc = "采购收货主表",}, + new TEA_TABLE {TableName = "TED_RETURN_DET", TableDesc = "采购退货明细表",}, + new TEA_TABLE {TableName = "TED_RETURN_MSTR", TableDesc = "采购退货主表",}, + new TEA_TABLE {TableName = "TED_SO_DET", TableDesc = "销售订单明细表",}, + new TEA_TABLE {TableName = "TED_SO_MSTR", TableDesc = "销售订单主表",}, + new TEA_TABLE {TableName = "TED_SPRAYING", TableDesc = "MES喷涂信息表",}, + new TEA_TABLE {TableName = "TED_SPRAYING_REPAIR", TableDesc = "MES点修补信息表",}, + new TEA_TABLE {TableName = "TED_STOCK", TableDesc = "库存表",}, + new TEA_TABLE {TableName = "TED_TRANSFER_DET", TableDesc = "移库明细表",}, + new TEA_TABLE {TableName = "TED_TRANSFER_MSTR", TableDesc = "移库主表",}, + new TEA_TABLE {TableName = "TES_ACCOUNT", TableDesc = "科目表",}, + new TEA_TABLE {TableName = "TES_BOM", TableDesc = "BOM表",}, + new TEA_TABLE {TableName = "TES_CODE", TableDesc = "通用代码表",}, + new TEA_TABLE {TableName = "TES_CODE_TYPE", TableDesc = "通用代码类型表",}, + new TEA_TABLE {TableName = "TES_COLOR", TableDesc = "MES颜色代码表",}, + new TEA_TABLE {TableName = "TES_COST_CENTER", TableDesc = "成本中心表",}, + new TEA_TABLE {TableName = "TES_CUSTOMER", TableDesc = "客户表",}, + new TEA_TABLE {TableName = "TES_CUSTOMER_PART", TableDesc = "客户零件表",}, + new TEA_TABLE {TableName = "TES_CUSTOMER_TYPE", TableDesc = "客户类型表",}, + new TEA_TABLE {TableName = "TES_DEPARTMENT", TableDesc = "部门表",}, + new TEA_TABLE {TableName = "TES_DOMAIN", TableDesc = "域表",}, + new TEA_TABLE {TableName = "TES_EDI_DATA", TableDesc = "EDI数据表",}, + new TEA_TABLE {TableName = "TES_ENTITY", TableDesc = "会计单位表",}, + new TEA_TABLE {TableName = "TES_LINE", TableDesc = "生产线表",}, + new TEA_TABLE {TableName = "TES_LINE_PART", TableDesc = "产线零件关系表",}, + new TEA_TABLE {TableName = "TES_LOCATION", TableDesc = "库位表",}, + new TEA_TABLE {TableName = "TES_MES_DATA", TableDesc = "MES数据表",}, + new TEA_TABLE {TableName = "TES_PACK", TableDesc = "标准包装表",}, + new TEA_TABLE {TableName = "TES_PART_DET", TableDesc = "零件明细表",}, + new TEA_TABLE {TableName = "TES_PART_MSTR", TableDesc = "零件主表",}, + new TEA_TABLE {TableName = "TES_PRODUCT_LINE", TableDesc = "产品类表",}, + new TEA_TABLE {TableName = "TES_PROJECT", TableDesc = "项目表",}, + new TEA_TABLE {TableName = "TES_PURCHASE_PRICE", TableDesc = "采购价格表",}, + new TEA_TABLE {TableName = "TES_ROUTING", TableDesc = "工艺路由表",}, + new TEA_TABLE {TableName = "TES_SALE_PRICE", TableDesc = "销售价格表",}, + new TEA_TABLE {TableName = "TES_SHIFT", TableDesc = "班次表",}, + new TEA_TABLE {TableName = "TES_SITE", TableDesc = "地点表",}, + new TEA_TABLE {TableName = "TES_STAND_COST_PRICE", TableDesc = "标准成本表",}, + new TEA_TABLE {TableName = "TES_SUB_ACCOUNT", TableDesc = "分账户表",}, + new TEA_TABLE {TableName = "TES_SUPPLIER", TableDesc = "供应商表",}, + new TEA_TABLE {TableName = "TES_SUPPLIER_PART", TableDesc = "供应商零件表",}, + new TEA_TABLE {TableName = "TES_SUPPLIER_TYPE", TableDesc = "供应商类型表",}, + new TEA_TABLE {TableName = "TES_TEAM", TableDesc = "班组表",}, + new TEA_TABLE {TableName = "TES_WMS_LOCATION", TableDesc = "WMS库位表",}, + new TEA_TABLE {TableName = "TES_WORK_CENTER", TableDesc = "工作中心表",}, + }; + } + + public static class SubscribeInitializer + { + public static List SubscribeList { get; set; } = new List(); + } + +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TEA_CONFIG.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TEA_CONFIG.cs new file mode 100644 index 0000000..fc4c326 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TEA_CONFIG.cs @@ -0,0 +1,63 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("ϵͳ")] + public class TEA_CONFIG : ITable, IEnable + { + [IsDataGridColum(true, 1)] + [Index("IndexConfig", Order = 0, IsUnique = true, IsClustered = false)] + [Description("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string ConfigName { get; set; } + + [IsDataGridColum(true, 2)] + [Required(AllowEmptyStrings = true)] + [Description("ֵ")] + [StringLength(50)] + public string ConfigValue { get; set; } + + [IsDataGridColum(true, 3)] + [Description("˵")] + [StringLength(500)] + public string ConfigDesc { get; set; } + + + [IsDataGridColum(true, 4)] + [Required(AllowEmptyStrings = true)] + [Description("")] + public EnumConfigType ConfigType { get; set; } = EnumConfigType.STRING; + + #region ֶ + + [Description("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } = ""; + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + + [Description("ע")] + public string Remark { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + + public bool Enable { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TEA_DATA_ERROR_LOG.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TEA_DATA_ERROR_LOG.cs new file mode 100644 index 0000000..567b122 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TEA_DATA_ERROR_LOG.cs @@ -0,0 +1,67 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// ϸ־ + /// + [Description("ϸ־")] + public class TEA_DATA_ERROR_LOG : ITaskTable + { + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string Creator { get; set; } + + [Description("")] + [StringLength(50)] + public string Subscriber { get; set; } + + [Description("ȡ")] + public Guid ReadID { get; set; } + + [Description("ݱ")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + [Description("Ϣ")] + [StringLength(50)] + public string ErrorInfo { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TEA_SUBSCRIBE.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TEA_SUBSCRIBE.cs new file mode 100644 index 0000000..136ec18 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TEA_SUBSCRIBE.cs @@ -0,0 +1,66 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// ı + /// + [Description("ı")] + public class TEA_SUBSCRIBE : IUpdatableTable, IEnable //,IDomainSite + { + [Description("")] + [Index("IndexSubscribe", Order = 0, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string TableName { get; set; } + + [Description("")] + [StringLength(50)] + public string Creator { get; set; } + + [Description("")] + [Index("IndexSubscribe", Order = 1, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string Subscriber { get; set; } + +// [Description("")] +// [StringLength(50)] +// [Description("")] [StringLength(50)] public string Domain { get; set; } +// +// [Description("ص")] +// [StringLength(50)] +// [Description("ص")] [StringLength(50)] public string Site { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [NotMapped] + public bool IsChecked { get; set; } + + public bool Enable { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TEA_SYSTEM.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TEA_SYSTEM.cs new file mode 100644 index 0000000..58f5801 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TEA_SYSTEM.cs @@ -0,0 +1,89 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// ϵͳ + /// + [Description("ϵͳ")] + public class TEA_SYSTEM : IUpdatableTable, IDomainSite, IEnable + { + [IsDataGridColum(true, 1)] + [Description("ϵͳ")] + [Index("IndexSystem", Order = 0, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string SystemName { get; set; } + + [IsDataGridColum(true, 2)] + [Description("ϵͳ")] + [StringLength(50)] + public string SystemDesc { get; set; } + + [Description("")] + [StringLength(50)] + public string Password { get; set; } + + [IsDataGridColum(true, 12)] + [Description("ʼ")] + [StringLength(50)] + public string Email { get; set; } + + [IsDataGridColum(true, 9)] + [Description("ˢʱ")] + [Column(TypeName = "datetime2")] + public DateTime? GetSessionIdTime { get; set; } + + [IsDataGridColum(true, 10)] + [Description("ˢIPַ")] + [StringLength(50)] + public string ClientIp { get; set; } + + [IsDataGridColum(true, 8)] + [Index("IndexUserSessionId", Order = 0, IsUnique = false, IsClustered = false)] + [Description("Ự")] + [StringLength(50)] + public string SessionId { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } = "Init"; + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [NotMapped] + public bool IsChecked { get; set; } + + public bool Enable { get; set; } = true; + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TEA_TABLE.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TEA_TABLE.cs new file mode 100644 index 0000000..06a492b --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TEA_TABLE.cs @@ -0,0 +1,57 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// + /// + [Description("")] + public class TEA_TABLE : IUpdatableTable, IEnable + { + [IsDataGridColum(true, 1)] + [Description("")] + [Index("IndexTable", Order = 0, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string TableName { get; set; } + + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string TableDesc { get; set; } + + [NotMapped] + public bool IsChecked { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } = "Init"; + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + public bool Enable { get; set; } = true; + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TEA_TASK.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TEA_TASK.cs new file mode 100644 index 0000000..c8c6cd3 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TEA_TASK.cs @@ -0,0 +1,75 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// + /// + [Description("")] + public class TEA_TASK : IUpdatableTable, IDomainSite + { + [NotMapped] + [Description("")] + public Guid TaskId => GUID; + + [Description("")] + [StringLength(50)] + public string TableName { get; set; } + + [Description("")] + [StringLength(50)] + public string Creator { get; set; } + + [Description("")] + public int DataCount { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [NotMapped] + public bool IsChecked { get; set; } + + public TEA_TASK_SUB ToTaskSub(string subscribeSubscriber) + { + return new TEA_TASK_SUB + { + TaskID = TaskId, + Creator = Creator, + }; + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TEA_TASK_SUB.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TEA_TASK_SUB.cs new file mode 100644 index 0000000..202f7f3 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TEA_TASK_SUB.cs @@ -0,0 +1,80 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// ı + /// + [Description("ı")] + public class TEA_TASK_SUB : IUpdatableTable + { + [Description("״̬")] + public EnumTaskState TaskState { get; set; } + + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string TableName { get; set; } + + [Description("")] + [StringLength(50)] + public string Creator { get; set; } + + [Description("")] + public int DataCount { get; set; } + + + [Description("")] + [StringLength(50)] + public string Subscriber { get; set; } + + [Description("ʧ")] + public int FailedCount { get; set; } + + [Description("ʧϢ")] + [StringLength(50)] + public string FailedInfo { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [NotMapped] + public bool IsChecked { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TEA_TASK_SUB_HIS.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TEA_TASK_SUB_HIS.cs new file mode 100644 index 0000000..9fa04fb --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TEA_TASK_SUB_HIS.cs @@ -0,0 +1,69 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// ʷ + /// + [Description("ʷ")] + public class TEA_TASK_SUB_HIS : IUpdatableTable + { + [Description("״̬")] + public EnumTaskState TaskState { get; set; } + + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string Creator { get; set; } + + [Description("")] + [StringLength(50)] + public string Subscriber { get; set; } + + [Description("Ϣ")] + [StringLength(50)] + public string ErrorInfo { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [NotMapped] + public bool IsChecked { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TEA_TASK_SUB_READ_LOG.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TEA_TASK_SUB_READ_LOG.cs new file mode 100644 index 0000000..602a2ee --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TEA_TASK_SUB_READ_LOG.cs @@ -0,0 +1,87 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// 读取日志表 + /// + [Description("任务订阅读取日志表")] + public class TEA_TASK_SUB_READ_LOG : ITable, IDomainSite + { + [NotMapped] + [Description("读取编号")] + public Guid ReadId => GUID; + + [Description("任务编号")] + public Guid TaskID { get; set; } + + [Description("表格名称")] + [StringLength(50)] + public string TableName { get; set; } + + [Description("创建者")] + [StringLength(50)] + public string Creator { get; set; } + + [Description("数据行数")] + public int DataCount { get; set; } + + + [Description("订阅者")] + [StringLength(50)] + public string Subscriber { get; set; } + + [Description("失败行数")] + public int FailedCount { get; set; } + + [Description("客户端IP")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string ClientIP { get; set; } + + [Description("失败信息")] + [StringLength(50)] + public string FailedInfo { get; set; } + + [Description("会话编号")] + [Required(AllowEmptyStrings = true)] + [StringLength(200)] + public string SessionId { get; set; } + + [Description("读取时间")] + public DateTime ReadTime { get; set; } = DateTime.Now; + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("创建人")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("创建时间")] + public DateTime CreateTime { get; set; } + + [Description("备注")] + public string Remark { get; set; } + + [Description("修改人")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("修改时间")] + public DateTime? UpdateTime { get; set; } + + [NotMapped] + public bool IsChecked { get; set; } + + public string Domain { get; set; } + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_ASN_DET.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_ASN_DET.cs new file mode 100644 index 0000000..7d40702 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_ASN_DET.cs @@ -0,0 +1,125 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Data.SqlTypes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// ϸ + /// + [Description("ϸ")] + public class TED_ASN_DET : ITaskTable + { + [Description("")] + [StringLength(50)] + public string ASN { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("ɹ")] + public int Line { get; set; } + + [Description("")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("")] + [StringLength(50)] + public string Lot { get; set; } + + [Description("")] + public decimal Qty { get; set; } + + [Description("")] + public decimal PackQty { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("ο")] + [StringLength(50)] + public string Reference { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string SupplierLot { get; set; } + + [Description("")] + [StringLength(50)] + public string WareClass { get; set; } + + [Description("߱")] + [StringLength(50)] + public string WareId { get; set; } + + [Description("ɹ۸")] + public decimal Price { get; set; } + + [Description("ɹλ")] + [StringLength(50)] + public string PoUm { get; set; } + + [Description("洢λ")] + [StringLength(50)] + public string LocUm { get; set; } + + [Description("λת")] + public decimal Conv { get; set; } + + [Description("")] + [StringLength(50)] + public string PartType { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string VendBatch { get; set; } + + [Description("")] + public DateTime ProduceDate { get; set; } + + [Description("ֹ")] + public DateTime DueDate { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_ASN_MSTR.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_ASN_MSTR.cs new file mode 100644 index 0000000..31e1a6b --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_ASN_MSTR.cs @@ -0,0 +1,71 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// + /// + [Description("")] + public class TED_ASN_MSTR : ITaskTable + { + [Description("")] + [StringLength(50)] + public string ASN { get; set; } + + [Description("嵥")] + [StringLength(50)] + public string KanbanBillNum { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("")] + public DateTime ShippingDate { get; set; } + + [Description("ŵ")] + public DateTime PromiseDate { get; set; } + + [Description("Ӧ̱")] + [StringLength(50)] + public string Supplier { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_ASSEMBLE.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_ASSEMBLE.cs new file mode 100644 index 0000000..ed56f44 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_ASSEMBLE.cs @@ -0,0 +1,50 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// MESװϢ + /// + [Description("MESװϢ")] + public class TED_ASSEMBLE : ITaskTable + { + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_BK_DET.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_BK_DET.cs new file mode 100644 index 0000000..927f70e --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_BK_DET.cs @@ -0,0 +1,84 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// سϸ + /// + [Description("سϸ")] + public class TED_BK_DET : ITaskTable + { + [Description("")] + [StringLength(50)] + public string BackFlushBillNum { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("")] + public int Operation { get; set; } + + [Description("")] + [StringLength(50)] + public string Line { get; set; } + + [Description("")] + [StringLength(50)] + public string Lot { get; set; } + + [Description("")] + public decimal Quantity { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_BK_MSTR.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_BK_MSTR.cs new file mode 100644 index 0000000..af33bf9 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_BK_MSTR.cs @@ -0,0 +1,65 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// س + /// + [Description("س")] + public class TED_BK_MSTR : ITaskTable + { + [Description("Ա")] + [StringLength(50)] + public string User { get; set; } + + [Description("")] + [StringLength(50)] + public string BackFlushBillNum { get; set; } + + [Description("")] + public DateTime BkDate { get; set; } + + [Description("ʱ")] + public DateTime BkTime { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_CHECK_DET.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_CHECK_DET.cs new file mode 100644 index 0000000..789db3f --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_CHECK_DET.cs @@ -0,0 +1,71 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("̵ϸ")] + public class TED_CHECK_DET : ITaskTable + { + [Description("")] + [StringLength(50)] + public string CheckBillNum { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("̵")] + public decimal Quantity { get; set; } + + [Description("")] + [StringLength(50)] + public string Lot { get; set; } + + [Description("ο")] + [StringLength(50)] + public string Reference { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_CHECK_MSTR.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_CHECK_MSTR.cs new file mode 100644 index 0000000..8262565 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_CHECK_MSTR.cs @@ -0,0 +1,62 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("̵")] + public class TED_CHECK_MSTR : ITaskTable + { + [Description("Ա")] + [StringLength(50)] + public string User { get; set; } + + [Description("")] + [StringLength(50)] + public string CheckBillNum { get; set; } + + [Description("")] + public DateTime CkDate { get; set; } + + [Description("ʱ")] + public DateTime CkTime { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_FIXED_DET.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_FIXED_DET.cs new file mode 100644 index 0000000..fa6c63e --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_FIXED_DET.cs @@ -0,0 +1,101 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// OA̶ʲϸ + /// + [Description("̶ʲϸ")] + public class TED_FIXED_DET : ITaskTable + { + [Description("̶ʲ")] + [StringLength(50)] + public string FixedBillNum { get; set; } + + + [Description("ʲ")] + [StringLength(50)] + public string Asset { get; set; } + + [Description("ȼ")] + [StringLength(50)] + public string Class { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("Ƶλ")] + [StringLength(50)] + public string Entity { get; set; } + + [Description("ɱ")] + public decimal Cost { get; set; } + + [Description("ֵ")] + public decimal Salvage { get; set; } + + [Description("ֵ")] + public decimal Replacement { get; set; } + + [Description("")] + public DateTime PostDate { get; set; } + + [Description("ʹ")] + public DateTime ServiceDate { get; set; } + + [Description("Ȩ")] + [StringLength(50)] + public string AuthorizationNbr { get; set; } + + [Description("Ŀ")] + [StringLength(50)] + public string BOOK { get; set; } + + [Description("")] + [StringLength(50)] + public string Method { get; set; } + + [Description("")] + public int Life { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_FIXED_MSTR.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_FIXED_MSTR.cs new file mode 100644 index 0000000..0e9bf80 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_FIXED_MSTR.cs @@ -0,0 +1,68 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// OA̶ʲ + /// + [Description("̶ʲ")] + public class TED_FIXED_MSTR : ITaskTable + { + [Description("̶ʲ")] + [StringLength(50)] + public string FixedBillNum { get; set; } + + + [Description("ʲ")] + [StringLength(50)] + public string Asset { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_INJECTION.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_INJECTION.cs new file mode 100644 index 0000000..f5e4130 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_INJECTION.cs @@ -0,0 +1,50 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// MESעϢ + /// + [Description("MESעϢ")] + public class TED_INJECTION : ITaskTable + { + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_INVOICE_ADD.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_INVOICE_ADD.cs new file mode 100644 index 0000000..22d902b --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_INVOICE_ADD.cs @@ -0,0 +1,135 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("Ʊӱ")] + public class TED_INVOICE_ADD : ITaskTable + { + [Description("˻")] + [StringLength(50)] + public string GLCode { get; set; } + + [Description("˻")] + [StringLength(50)] + public string DivisionCode { get; set; } + + [Description("ɱĴ")] + [StringLength(50)] + public string CostCentreCode { get; set; } + + [Description("Ŀ")] + [StringLength(50)] + public string ProjectCode { get; set; } + + [Description("SAF")] + [StringLength(50)] + public string SafStructureCode { get; set; } + + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + + [Description("")] + [StringLength(50)] + public string Rowid { get; set; } + + [Description("")] + [StringLength(50)] + public string ParentRowid { get; set; } + + [Description("˰")] + [StringLength(50)] + public string TaxEnvironment { get; set; } + + [Description("˰;")] + [StringLength(50)] + public string TaxUsage { get; set; } + + [Description("˰ȼ")] + [StringLength(50)] + public string TaxClass { get; set; } + + [Description("ڣtoday")] + public DateTime TaxPointDate { get; set; } + + [Description("˰")] + [StringLength(50)] + public string TaxTransactionType { get; set; } + + [Description("")] + [StringLength(50)] + public string TransactionType { get; set; } + + [Description("״̬")] + [StringLength(50)] + public string Status { get; set; } + + [Description("˰")] + [StringLength(50)] + public string PostingVatInOut { get; set; } + + [Description("˰")] + [StringLength(50)] + public string FromTaxZone { get; set; } + + [Description("˰")] + [StringLength(50)] + public string ToTaxZone { get; set; } + + [Description("˰")] + [StringLength(50)] + public string TaxType { get; set; } + + [Description("˰")] + [StringLength(50)] + public string PostingVatCode { get; set; } + + [Description("׻ҽ")] + public decimal VatDebitTC { get; set; } + + [Description("λҽ")] + public decimal VatDebitLC { get; set; } + + [Description("ҽ")] + public decimal VatDebitCC { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_INVOICE_DET.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_INVOICE_DET.cs new file mode 100644 index 0000000..a9e9222 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_INVOICE_DET.cs @@ -0,0 +1,89 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// Ʊϸ + /// + [Description("Ʊϸ")] + public class TED_INVOICE_DET : ITaskTable + { + [Description("״̬")] + [StringLength(50)] + public string Status { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("к")] + public int Line { get; set; } + + [Description("ջ")] + [StringLength(50)] + public string ReceiveNbr { get; set; } + + [Description("ƥ")] + public decimal MatchQuantity { get; set; } + + [Description("ƥ۸")] + public decimal MatchPrice { get; set; } + + [Description("")] + public bool IsPvodFinished { get; set; } + + [Description("")] + public DateTime UsageDate { get; set; } + + [Description("¼˰")] + public bool IsRecalculateTaxes { get; set; } + + [Description("")] + [StringLength(50)] + public string Rowid { get; set; } + + [Description("")] + [StringLength(50)] + public string ParentRowid { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_INVOICE_MSTR.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_INVOICE_MSTR.cs new file mode 100644 index 0000000..2572770 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_INVOICE_MSTR.cs @@ -0,0 +1,224 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// Ʊ + /// + [Description("Ʊ")] + public class TED_INVOICE_MSTR : ITaskTable + { + [Description("״̬")] + [StringLength(50)] + public string Status { get; set; } + + [Description("")] + public int Invoice_ID { get; set; } + + [Description("Ʊ")] + [StringLength(50)] + public string InvoiceReference { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("ջ")] + [StringLength(50)] + public string ReceiveNbr { get; set; } + + [Description("Ʊ")] + public bool CreateInvoice { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string SupplierName { get; set; } + + [Description("ַ1")] + [StringLength(50)] + public string AddressStreet1 { get; set; } + + [Description("ַ2")] + [StringLength(50)] + public string AddressStreet2 { get; set; } + + [Description("ַ3")] + [StringLength(50)] + public string AddressStreet3 { get; set; } + + [Description("")] + [StringLength(50)] + public string City { get; set; } + + [Description("ʡ")] + [StringLength(50)] + public string StateCode { get; set; } + + [Description("ʱ")] + [StringLength(50)] + public string ZIP { get; set; } + + [Description("ʽ")] + [StringLength(50)] + public string Format { get; set; } + + [Description("")] + [StringLength(50)] + public string Country { get; set; } + + [Description("")] + [StringLength(50)] + public string County { get; set; } + + [Description("")] + public DateTime PostingDate { get; set; } + + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + + [Description("к")] + [StringLength(50)] + public string OwnBank { get; set; } + + [Description("Ʊ")] + public DateTime InvoiceDate { get; set; } + + [Description("֧")] + [StringLength(50)] + public string PaymentCondCode { get; set; } + + [Description("")] + public DateTime InvoiceDueDate { get; set; } + + [Description("Ʊ˻")] + [StringLength(50)] + public string InvoiceControlGLCode { get; set; } + + [Description("Ʊɱ")] + [StringLength(50)] + public string InvoiceCostCentreCode { get; set; } + + [Description("Ʊۿ˻")] + [StringLength(50)] + public string InvoiceDiscountGLCode { get; set; } + + [Description("Ʊۿ۳ɱ")] + [StringLength(50)] + public string InvoiceDiscountCostCentre { get; set; } + + [Description("")] + [StringLength(50)] + public string CompanyCode { get; set; } + + [Description("")] + [StringLength(50)] + public string InvoiceRemark { get; set; } + + [Description("Ʊ")] + [StringLength(50)] + public string InvoiceBankNbr { get; set; } + + [Description("ʽ")] + [StringLength(50)] + public string InvoiceCheckForm { get; set; } + + [Description("Ƿ")] + public bool InvoiceIsHoldAmount { get; set; } + + [Description("TC")] + public decimal InvoiceHoldAmountTC { get; set; } + + [Description("")] + public bool InvoiceIsStatusFinal { get; set; } + + [Description("Ʊ˻")] + [StringLength(50)] + public string InvoiceDivisionCode { get; set; } + + [Description("Ʊۿ۷˻")] + [StringLength(50)] + public string InvoiceDiscountDivision { get; set; } + + [Description("")] + [StringLength(50)] + public string Rowid { get; set; } + + [Description("")] + [StringLength(50)] + public string ParentRowid { get; set; } + + [Description("")] + public int InvoicePostingYear { get; set; } + + [Description("ռ˴")] + [StringLength(50)] + public string JournalCode { get; set; } + + [Description("ƾ֤")] + public int InvoiceVoucher { get; set; } + + [Description("")] + public bool APMatchingIsStatusFinal { get; set; } + + [Description("")] + public int InvoiceRegistrationNbr { get; set; } + + [Description("")] + [StringLength(50)] + public string InvoiceTSMNumber { get; set; } + + [Description("")] + public bool CreateWithAmountIsTax { get; set; } + + [Description("TCƱ")] + public decimal InvoiceAmountTC { get; set; } + + [Description("Ӧ˰")] + public bool InvoiceIsTaxable { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_ISSUNP_DET.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_ISSUNP_DET.cs new file mode 100644 index 0000000..1561a9e --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_ISSUNP_DET.cs @@ -0,0 +1,113 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// ƻϸ + /// + [Description("ƻϸ")] + public class TED_ISSUNP_DET : ITaskTable + { + [Description("")] + [StringLength(50)] + public string UnplanedBillNum { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("")] + public decimal Quantity { get; set; } + + [Description("ת")] + public decimal Conversion { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("")] + [StringLength(50)] + public string Lot { get; set; } + + [Description("ο")] + [StringLength(50)] + public string Reference { get; set; } + + [Description("к")] + [StringLength(50)] + public string Line { get; set; } + + [Description("ͻ")] + [StringLength(50)] + public string CustomerNbr { get; set; } + + [Description("ַ")] + [StringLength(50)] + public string Address { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + + [Description("Ŀ")] + [StringLength(50)] + public string CreditAccount { get; set; } + + [Description("˻")] + [StringLength(50)] + public string SubAccount { get; set; } + + [Description("ɱ")] + [StringLength(50)] + public string CcAccount { get; set; } + + [Description("Ŀ")] + [StringLength(50)] + public string Project { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_ISSUNP_MSTR.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_ISSUNP_MSTR.cs new file mode 100644 index 0000000..7bd1712 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_ISSUNP_MSTR.cs @@ -0,0 +1,65 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// ƻ + /// + [Description("ƻ")] + public class TED_ISSUNP_MSTR : ITaskTable + { + [Description("Ա")] + [StringLength(50)] + public string User { get; set; } + + [Description("")] + [StringLength(50)] + public string UnplanedBillNum { get; set; } + + [Description("")] + public DateTime Date { get; set; } + + [Description("ʱ")] + public DateTime Time { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_KANBAN_DET.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_KANBAN_DET.cs new file mode 100644 index 0000000..27244ea --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_KANBAN_DET.cs @@ -0,0 +1,50 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// Ҫϸ + /// + [Description("ϸ")] + public class TED_KANBAN_DET : ITaskTable + { + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_KANBAN_MSTR.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_KANBAN_MSTR.cs new file mode 100644 index 0000000..0b6e7bd --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_KANBAN_MSTR.cs @@ -0,0 +1,50 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// Ҫ + /// + [Description("")] + public class TED_KANBAN_MSTR : ITaskTable + { + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_LED.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_LED.cs new file mode 100644 index 0000000..735fb0b --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_LED.cs @@ -0,0 +1,50 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// MESϢ + /// + [Description("MESϢ")] + public class TED_LED : ITaskTable + { + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_MRP_DET.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_MRP_DET.cs new file mode 100644 index 0000000..2051f21 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_MRP_DET.cs @@ -0,0 +1,76 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("MRPϸ")] + public class TED_MRP_DET : ITaskTable + { + [Description("汾ID")] + [StringLength(50)] + public string ReleaseId { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("к")] + public int Line { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + + [Description("")] + [StringLength(50)] + public string ShipTo { get; set; } + + [Description("")] + public DateTime DemandDate { get; set; } + + [Description("")] + public decimal DemandQuantity { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_MRP_MSTR.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_MRP_MSTR.cs new file mode 100644 index 0000000..1976bfa --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_MRP_MSTR.cs @@ -0,0 +1,65 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("MRP")] + public class TED_MRP_MSTR : ITaskTable + { + [Description("Ա")] + [StringLength(50)] + public string User { get; set; } + + [Description("汾ID")] + [StringLength(50)] + public string ReleaseId { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("")] + public DateTime Date { get; set; } + + [Description("ʱ")] + public DateTime Time { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_PO_DET.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_PO_DET.cs new file mode 100644 index 0000000..b5fc43d --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_PO_DET.cs @@ -0,0 +1,100 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// ɹϸ + /// + [Description("ɹϸ")] + public class TED_PO_DET : ITaskTable + { + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("ɹ")] + public int Line { get; set; } + + [Description("")] + [StringLength(50)] + public string PoType { get; set; } + + [Description("")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("")] + public decimal Qty { get; set; } + + [Description("δ")] + public decimal QtyOpen { get; set; } + + [Description("")] + public decimal PackQty { get; set; } + + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + + [Description("۸")] + public decimal Price { get; set; } + + [Description("۸")] + [StringLength(50)] + public string PriceList { get; set; } + + [Description("ɹλ")] + [StringLength(50)] + public string PoUm { get; set; } + + [Description("洢λ")] + [StringLength(50)] + public string LocUm { get; set; } + + [Description("λת")] + public decimal Conv { get; set; } + + [Description("ϸ״̬")] + public int Status { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_PO_MSTR.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_PO_MSTR.cs new file mode 100644 index 0000000..9aa9c04 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_PO_MSTR.cs @@ -0,0 +1,98 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// ɹ + /// + [Description("ɹ")] + public class TED_PO_MSTR : ITaskTable + { + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("ģʽ")] + [StringLength(50)] + public string ModeType { get; set; } + + [Description("Ӧ̱")] + [StringLength(50)] + public string Supplier { get; set; } + + [Description("ϵ")] + [StringLength(50)] + public string Contact { get; set; } + + [Description("")] + [StringLength(50)] + public string ShipTo { get; set; } + + [Description("")] + public DateTime OrderDate { get; set; } + + [Description("ֹ")] + public DateTime DueDate { get; set; } + + [Description("ڹ")] + [StringLength(50)] + public string MadeIn { get; set; } + + [Description("Ҫȷ")] + public bool Confirm { get; set; } + + [Description("ɹԱ")] + [StringLength(50)] + public string Buyer { get; set; } + + [Description("ɹԱ绰")] + [StringLength(50)] + public string BuyerPhone { get; set; } + + [Description("ɹ״̬")] + public int Status { get; set; } + + [Description("ճ")] + public bool ScheduledOrder { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_RCTUNP_DET.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_RCTUNP_DET.cs new file mode 100644 index 0000000..b25e522 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_RCTUNP_DET.cs @@ -0,0 +1,113 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// ƻϸ + /// + [Description("ƻϸ")] + public class TED_RCTUNP_DET : ITaskTable + { + [Description("")] + [StringLength(50)] + public string ReceiveBillNum { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("")] + public decimal Quantity { get; set; } + + [Description("ת")] + public decimal Conversion { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("")] + [StringLength(50)] + public string Lot { get; set; } + + [Description("ο")] + [StringLength(50)] + public string Reference { get; set; } + + [Description("к")] + [StringLength(50)] + public string Line { get; set; } + + [Description("ͻ")] + [StringLength(50)] + public string CustomerNbr { get; set; } + + [Description("ַ")] + [StringLength(50)] + public string Address { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + + [Description("Ŀ")] + [StringLength(50)] + public string CreditAccount { get; set; } + + [Description("˻")] + [StringLength(50)] + public string SubAccount { get; set; } + + [Description("ɱ")] + [StringLength(50)] + public string CcAccount { get; set; } + + [Description("Ŀ")] + [StringLength(50)] + public string Project { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_RCTUNP_MSTR.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_RCTUNP_MSTR.cs new file mode 100644 index 0000000..b326c0e --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_RCTUNP_MSTR.cs @@ -0,0 +1,65 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// ƻ + /// + [Description("ƻ")] + public class TED_RCTUNP_MSTR : ITaskTable + { + [Description("Ա")] + [StringLength(50)] + public string User { get; set; } + + [Description("")] + [StringLength(50)] + public string ReceiveBillNum { get; set; } + + [Description("")] + public DateTime Date { get; set; } + + [Description("ʱ")] + public DateTime Time { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_RECEIPT_DET.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_RECEIPT_DET.cs new file mode 100644 index 0000000..141583a --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_RECEIPT_DET.cs @@ -0,0 +1,99 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// ɹջϸ + /// + [Description("ɹջϸ")] + public class TED_RECEIPT_DET : ITaskTable + { + + [Description("ջ")] + [StringLength(50)] + public string ReceiveNbr { get; set; } + + + [Description("˵")] + [StringLength(50)] + public string ASN { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("к")] + public int Line { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("ջ")] + public decimal ReceiveQuantity { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("λ")] + [StringLength(50)] + public string logisticsUm { get; set; } + + [Description("")] + [StringLength(50)] + public string Lot { get; set; } + + [Description("ο")] + [StringLength(50)] + public string Reference { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string SupplierLot { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_RECEIPT_MSTR.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_RECEIPT_MSTR.cs new file mode 100644 index 0000000..1b1539c --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_RECEIPT_MSTR.cs @@ -0,0 +1,77 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// ɹջ + /// + [Description("ɹջ")] + public class TED_RECEIPT_MSTR : ITaskTable + { + [Description("Ա")] + [StringLength(50)] + public string User { get; set; } + + [Description("˵")] + [StringLength(50)] + public string ASN { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + + [Description("ջ")] + [StringLength(50)] + public string ReceiveNbr { get; set; } + + [Description("ջ")] + public DateTime ReceiptDate { get; set; } + + [Description("ʱ")] + public DateTime Time { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_RETURN_DET.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_RETURN_DET.cs new file mode 100644 index 0000000..21b344d --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_RETURN_DET.cs @@ -0,0 +1,99 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// ɹ˻ϸ + /// + [Description("ɹ˻ϸ")] + public class TED_RETURN_DET : ITaskTable + { + + [Description("˻")] + [StringLength(50)] + public string ReturnNbr { get; set; } + + + [Description("˵")] + [StringLength(50)] + public string ASN { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("к")] + public int Line { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("˻")] + public decimal ReturnQuantity { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("λ")] + [StringLength(50)] + public string logisticsUm { get; set; } + + [Description("")] + [StringLength(50)] + public string Lot { get; set; } + + [Description("ο")] + [StringLength(50)] + public string Reference { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string SupplierLot { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_RETURN_MSTR.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_RETURN_MSTR.cs new file mode 100644 index 0000000..2b8f7a0 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_RETURN_MSTR.cs @@ -0,0 +1,77 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// ɹ˻ + /// + [Description("ɹ˻")] + public class TED_RETURN_MSTR : ITaskTable + { + [Description("Ա")] + [StringLength(50)] + public string User { get; set; } + + [Description("˵")] + [StringLength(50)] + public string ASN { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + + [Description("˻")] + [StringLength(50)] + public string ReturnNbr { get; set; } + + [Description("˻")] + public DateTime ReturnDate { get; set; } + + [Description("ʱ")] + public DateTime Time { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_SO_DET.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_SO_DET.cs new file mode 100644 index 0000000..9816bab --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_SO_DET.cs @@ -0,0 +1,94 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// ۶ϸ + /// + [Description("۶ϸ")] + public class TED_SO_DET : ITaskTable + { + [Description("۶")] + [StringLength(50)] + public string SalesOrder { get; set; } + + [Description("к")] + public int Line { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("Ѷ")] + public decimal QuantityOrdered { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("ѷ")] + public decimal QuantityAllocated { get; set; } + + [Description("ѷ")] + public decimal QuantityShipped { get; set; } + + [Description("ҪƱ")] + public decimal QuantityToInvoice { get; set; } + + [Description("")] + [StringLength(50)] + public string ShipType { get; set; } + + [Description("۸")] + [StringLength(50)] + public string Price { get; set; } + + [Description("Ŀ")] + [StringLength(50)] + public string PriceList { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_SO_MSTR.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_SO_MSTR.cs new file mode 100644 index 0000000..c370ca4 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_SO_MSTR.cs @@ -0,0 +1,80 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// ۶ + /// + [Description("۶")] + public class TED_SO_MSTR : ITaskTable + { + [Description("۶")] + [StringLength(50)] + public string SalesOrder { get; set; } + + [Description("")] + [StringLength(50)] + public string SoldTo { get; set; } + + [Description("")] + [StringLength(50)] + public string ShipTo { get; set; } + + [Description("")] + public DateTime OrderDate { get; set; } + + [Description("ֹ")] + public DateTime DueDate { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + + [Description("ճ")] + public bool ScheduledOrder { get; set; } + + [Description("ͻ")] + [StringLength(50)] + public string CustomerName { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_SPRAYING.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_SPRAYING.cs new file mode 100644 index 0000000..50d8b26 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_SPRAYING.cs @@ -0,0 +1,50 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// MESͿϢ + /// + [Description("MESͿϢ")] + public class TED_SPRAYING : ITaskTable + { + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_SPRAYING_REPAIR.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_SPRAYING_REPAIR.cs new file mode 100644 index 0000000..a87c104 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_SPRAYING_REPAIR.cs @@ -0,0 +1,50 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// MES޲Ϣ + /// + [Description("MES޲Ϣ")] + public class TED_SPRAYING_REPAIR : ITaskTable + { + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_STOCK.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_STOCK.cs new file mode 100644 index 0000000..546f4a4 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_STOCK.cs @@ -0,0 +1,83 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// + /// + [Description("")] + public class TED_STOCK : ITaskTable + { + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("")] + [StringLength(50)] + public string Lot { get; set; } + + [Description("ο")] + [StringLength(50)] + public string Reference { get; set; } + + [Description("")] + public decimal Quantity { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("")] + public DateTime Date { get; set; } + + [Description("ʱ")] + public DateTime Time { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_TRANSFER_DET.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_TRANSFER_DET.cs new file mode 100644 index 0000000..4beb394 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_TRANSFER_DET.cs @@ -0,0 +1,91 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// ƿϸ + /// + [Description("ƿϸ")] + public class TED_TRANSFER_DET : ITaskTable + { + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("")] + [StringLength(50)] + public string TransferBillNum { get; set; } + + [Description("ʼص")] + [StringLength(50)] + public string FormSite { get; set; } + + [Description("ʼλ")] + [StringLength(50)] + public string FormLocation { get; set; } + + [Description("ʼ")] + [StringLength(50)] + public string FormLotNbr { get; set; } + + [Description("ʼο")] + [StringLength(50)] + public string FormReference { get; set; } + + [Description("ص")] + [StringLength(50)] + public string ToSite { get; set; } + + [Description("λ")] + [StringLength(50)] + public string ToLocation { get; set; } + + [Description("")] + [StringLength(50)] + public string ToLotNbr { get; set; } + + [Description("ο")] + [StringLength(50)] + public string ToReference { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TED_TRANSFER_MSTR.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TED_TRANSFER_MSTR.cs new file mode 100644 index 0000000..29db20f --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TED_TRANSFER_MSTR.cs @@ -0,0 +1,79 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + /// + /// ƿ + /// + [Description("ƿ")] + public class TED_TRANSFER_MSTR : ITaskTable + { + [Description("Ա")] + [StringLength(50)] + public string User { get; set; } + +// [Description("Ϻ")] +// [StringLength(50)] +// public string PartCode { get; set; } +// +// [Description("")] +// public decimal Quantity { get; set; } + + [Description("")] + [StringLength(50)] + public string TransferBillNum { get; set; } + + [Description("ͻ")] + [StringLength(50)] + public string CustomerNbr { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + + [Description("Ч")] + public DateTime ActiveDate { get; set; } + + [Description("ʱ")] + public DateTime Time { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_ACCOUNT.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_ACCOUNT.cs new file mode 100644 index 0000000..caadd27 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_ACCOUNT.cs @@ -0,0 +1,56 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("Ŀ")] + + public class TES_ACCOUNT : ITaskTable + { + [Description("")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_BOM.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_BOM.cs new file mode 100644 index 0000000..9f28161 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_BOM.cs @@ -0,0 +1,99 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("BOM")] + public class TES_BOM : ITaskTable + { + [Description("")] + [StringLength(50)] + public string ParentPart { get; set; } + + [Description("")] + [StringLength(50)] + public string ComponentPart { get; set; } + + [Description("ο")] + [StringLength(50)] + public string Reference { get; set; } + + [Description("Ч")] + public DateTime StartEffective { get; set; } + + [Description("ÿ")] + public decimal QuantityPer { get; set; } + + [Description("ṹ")] + [StringLength(50)] + public string StructureType { get; set; } + + [Description("Ч")] + public DateTime EndEffective { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + + [Description("Ʒ")] + public decimal Scrap { get; set; } + + [Description("ǰ")] + public int LeadTimeOffset { get; set; } + + [Description("")] + public int Operation { get; set; } + + [Description("")] + public int SequenceNumber { get; set; } + + [Description("Ԥٷֱ")] + public decimal FporecastPercent { get; set; } + + [Description("")] + [StringLength(50)] + public string OptionGroup { get; set; } + + [Description("")] + [StringLength(50)] + public string Process { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_CODE.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_CODE.cs new file mode 100644 index 0000000..0c992d6 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_CODE.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("ͨô")] + public class TES_CODE : ITaskTable + { + [Description("")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_CODE_TYPE.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_CODE_TYPE.cs new file mode 100644 index 0000000..a31c129 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_CODE_TYPE.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("ͨôͱ")] + public class TES_CODE_TYPE : ITaskTable + { + [Description("")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_COLOR.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_COLOR.cs new file mode 100644 index 0000000..4620fc6 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_COLOR.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("MESɫ")] + public class TES_COLOR : ITaskTable + { + [Description("")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_COST_CENTER.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_COST_CENTER.cs new file mode 100644 index 0000000..b1428bf --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_COST_CENTER.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("ɱı")] + public class TES_COST_CENTER : ITaskTable + { + [Description("")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_CUSTOMER.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_CUSTOMER.cs new file mode 100644 index 0000000..53ad953 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_CUSTOMER.cs @@ -0,0 +1,308 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("ͻ")] + public class TES_CUSTOMER : ITaskTable + { + [Description("ͻ")] + [StringLength(50)] + public string CustomerCode { get; set; } + + [Description("ͻ")] + [StringLength(50)] + public string CustomerName { get; set; } + + [Description("")] + [StringLength(50)] + public string SearchName { get; set; } + + [Description("м")] + [StringLength(50)] + public string SecondName { get; set; } + + [Description("")] + [StringLength(50)] + public string ThirdName { get; set; } + + [Description("")] + [StringLength(50)] + public string GroupName { get; set; } + + [Description("")] + [StringLength(50)] + public string Active { get; set; } + + [Description("ͻַ")] + [StringLength(50)] + public string Address1 { get; set; } + + [Description("ͻַ")] + [StringLength(50)] + public string Address2 { get; set; } + + [Description("ͻַ")] + [StringLength(50)] + public string Address3 { get; set; } + + [Description("ʱ")] + [StringLength(50)] + public string ZipCode { get; set; } + + [Description("")] + [StringLength(50)] + public string City { get; set; } + + [Description("")] + [StringLength(50)] + public string Country { get; set; } + + [Description("绰")] + [StringLength(50)] + public string Telephone { get; set; } + + [Description("ʡ")] + [StringLength(50)] + public string province { get; set; } + + [Description("")] + [StringLength(50)] + public string County { get; set; } + + [Description("")] + [StringLength(50)] + public string Fax { get; set; } + + [Description("Դ")] + [StringLength(50)] + public string LanguageCode { get; set; } + + [Description("ʼ")] + [StringLength(50)] + public string Email { get; set; } + + [Description("ַ")] + [StringLength(50)] + public string Internet { get; set; } + + [Description("˰ַ")] + [StringLength(50)] + public string AddressIsTaxable { get; set; } + + [Description("˰")] + [StringLength(50)] + public string AddressIsTaxIncluded { get; set; } + + [Description("˰")] + [StringLength(50)] + public string FederalTax { get; set; } + + [Description("˰")] + [StringLength(50)] + public string StateTax { get; set; } + + [Description("˰1")] + [StringLength(50)] + public string MiscTax1 { get; set; } + + [Description("˰2")] + [StringLength(50)] + public string MiscTax2 { get; set; } + + [Description("˰3")] + [StringLength(50)] + public string MiscTax3 { get; set; } + + [Description("˰")] + [StringLength(50)] + public string TaxInCity { get; set; } + + [Description("˰")] + [StringLength(50)] + public string TaxZone { get; set; } + + [Description("˰")] + [StringLength(50)] + public string TaxClass { get; set; } + + [Description("˰;")] + [StringLength(50)] + public string TaxUsage { get; set; } + + [Description("")] + [StringLength(50)] + public string Title { get; set; } + + [Description("ϵ")] + [StringLength(50)] + public string ContactName { get; set; } + + [Description("д")] + [StringLength(50)] + public string Initials { get; set; } + + [Description("")] + [StringLength(50)] + public string Function { get; set; } + + [Description("Ա")] + [StringLength(50)] + public string Gender { get; set; } + + [Description("Ҫϵ")] + [StringLength(50)] + public string ContactIsPrimary { get; set; } + + [Description("Ҫϵ")] + [StringLength(50)] + public string ContactIsSecondary { get; set; } + + [Description("")] + [StringLength(50)] + public string Compens { get; set; } + + [Description("Ʊļ")] + [StringLength(50)] + public string GlProfileInvoice { get; set; } + + [Description("Ʊݿļ")] + [StringLength(50)] + public string GlProfileCreditNote { get; set; } + + [Description("Ԥļ")] + [StringLength(50)] + public string GlProfilePrepayment { get; set; } + + [Description("ۼļ")] + [StringLength(50)] + public string GLProfileDeduction { get; set; } + + [Description("˿ļ")] + [StringLength(50)] + public string AccountGLProfile { get; set; } + + [Description("ÿļ")] + [StringLength(50)] + public string FinanceChargeProfile { get; set; } + + [Description("˻ļ")] + [StringLength(50)] + public string SubAccountProfile { get; set; } + + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + + [Description("ͻ")] + [StringLength(50)] + public string Customertype { get; set; } + + [Description("֧")] + [StringLength(50)] + public string CreditTerms { get; set; } + + [Description("Ʊ״̬")] + [StringLength(50)] + public string InvoiceStatusCode { get; set; } + + [Description("")] + [StringLength(50)] + public string PaymentGroup { get; set; } + + [Description("˵ϸ")] + [StringLength(50)] + public string BillingSchedule { get; set; } + + [Description("Ʊտ")] + [StringLength(50)] + public string BillPayee { get; set; } + + [Description("ƱȨ")] + [StringLength(50)] + public string InvoicebyAuthorization { get; set; } + + [Description("Ա")] + [StringLength(50)] + public string SalesPerson { get; set; } + + [Description("ʽ")] + [StringLength(50)] + public string ShipVia { get; set; } + + [Description("ת˰")] + [StringLength(50)] + public string Resale { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + + [Description("")] + [StringLength(50)] + public string Region { get; set; } + + [Description("ۿ۱")] + [StringLength(50)] + public string DiscountTable { get; set; } + + [Description("̶۸")] + [StringLength(50)] + public string FixfdPrice { get; set; } + + [Description("ռ˼")] + [StringLength(50)] + public string DayBookSet { get; set; } + + [Description("иʽ")] + [StringLength(50)] + public string BankFormat { get; set; } + + [Description("ͻ")] + [StringLength(50)] + public string CustomerBank { get; set; } + + [Description("")] + [StringLength(50)] + public string OwnBank { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_CUSTOMER_PART.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_CUSTOMER_PART.cs new file mode 100644 index 0000000..e0e3574 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_CUSTOMER_PART.cs @@ -0,0 +1,71 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("ͻ")] + public class TES_CUSTOMER_PART : ITaskTable + { + [Description("ͻ/﷢")] + [StringLength(50)] + public string CustomerShipto { get; set; } + + [Description("ͻĿ")] + [StringLength(50)] + public string CustomerPart { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Comment { get; set; } + + [Description("ʾͻ")] + [StringLength(50)] + public string DisplayCustomerPart { get; set; } + + [Description("ͻϹ̱")] + [StringLength(50)] + public string CustomerPartEcoNbr { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_CUSTOMER_TYPE.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_CUSTOMER_TYPE.cs new file mode 100644 index 0000000..e32ac88 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_CUSTOMER_TYPE.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("ͻͱ")] + public class TES_CUSTOMER_TYPE : ITaskTable + { + [Description("")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_DEPARTMENT.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_DEPARTMENT.cs new file mode 100644 index 0000000..09bb00a --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_DEPARTMENT.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("ű")] + public class TES_DEPARTMENT : ITaskTable + { + [Description("Ŵ")] + [StringLength(50)] + public string DeptCode { get; set; } + + [Description("")] + [StringLength(50)] + public string DeptName { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_DOMAIN.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_DOMAIN.cs new file mode 100644 index 0000000..90d0829 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_DOMAIN.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("")] + public class TES_DOMAIN : ITaskTable + { + [Description("")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_EDI_DATA.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_EDI_DATA.cs new file mode 100644 index 0000000..5be67ae --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_EDI_DATA.cs @@ -0,0 +1,91 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("EDIݱ")] + public class TES_EDI_DATA : ITaskTable + { + [Description("۶")] + [StringLength(50)] + public string SalesOrder { get; set; } + + [Description("﷢")] + [StringLength(50)] + public string ShipFrom { get; set; } + + [Description("ͻ")] + [StringLength(50)] + public string Customer { get; set; } + + [Description("ͻ")] + [StringLength(50)] + public string CustomerPart { get; set; } + + [Description("к")] + public int Line { get; set; } + + [Description("")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("ͻο")] + [StringLength(50)] + public string CustomerReference { get; set; } + + [Description("")] + public DateTime ReceiveDate { get; set; } + + [Description("ʱ")] + public DateTime ReceiveTime { get; set; } + + [Description("")] + public DateTime DemandDate { get; set; } + + [Description("")] + public decimal DemandQuantity { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_ENTITY.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_ENTITY.cs new file mode 100644 index 0000000..40f008a --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_ENTITY.cs @@ -0,0 +1,56 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("Ƶλ")] + public class TES_ENTITY : ITaskTable + { + [Description("Ƶλ")] + [StringLength(50)] + public string Entity { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_LINE.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_LINE.cs new file mode 100644 index 0000000..3179dab --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_LINE.cs @@ -0,0 +1,95 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("߱")] + public class TES_LINE : ITaskTable + { + [Description("")] + [StringLength(50)] + public string ProductionLine { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + [Description("˵")] + [StringLength(50)] + public string Description { get; set; } + + [Description("/Сʱ")] + public decimal UnitsHour { get; set; } + + [Description("дС")] + public bool EnableRunSize { get; set; } + + [Description("")] + public decimal NumberOfLines { get; set; } + + [Description("ʱ仺-")] + public int DurationBuffer { get; set; } + + [Description("ʱ仺ʱ")] + [StringLength(50)] + public string DurationBufferHMS { get; set; } + + [Description("ʱ-")] + public int SetupTime { get; set; } + + [Description("ʱ")] + [StringLength(50)] + public string SetupTimeHMS { get; set; } + + [Description("Զ̶")] + public bool LnAutofirm { get; set; } + + [Description("ϴԶ̶")] + public DateTime LnLastAutofirm { get; set; } + + [Description("ID")] + [StringLength(50)] + public string LnScheduler { get; set; } + + [Description("޽")] + [StringLength(50)] + public string Dtendlit { get; set; } + + [Description("ں")] + public int EndNumber { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_LINE_PART.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_LINE_PART.cs new file mode 100644 index 0000000..3b12ea6 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_LINE_PART.cs @@ -0,0 +1,109 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("ϵ")] + public class TES_LINE_PART : ITaskTable + { + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("")] + [StringLength(50)] + public string ProductionLine { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + [Description("ʼ")] + public DateTime StartDate { get; set; } + + [Description("/Сʱ")] + public decimal UnitsHour { get; set; } + + [Description("")] + public decimal NumberOfLines { get; set; } + + [Description("ʱ-")] + public int SetupTime { get; set; } + + [Description("ʱ")] + [StringLength(50)] + public string SetupTimeHMS { get; set; } + + [Description("")] + public bool PrimaryLine { get; set; } + + [Description("Ա")] + public decimal SetupCrew { get; set; } + + [Description("С")] + public int SetSize { get; set; } + + [Description("ȫԱ")] + public decimal RunCrew { get; set; } + + [Description("С")] + public int RunSize { get; set; } + + [Description("嵥")] + [StringLength(50)] + public string BomCode { get; set; } + + [Description("")] + [StringLength(50)] + public string Routing { get; set; } + + [Description("ID")] + [StringLength(50)] + public string ToolId { get; set; } + + [Description("˳1")] + [StringLength(50)] + public string RunSequence1 { get; set; } + + [Description("˳2")] + [StringLength(50)] + public string RunSequence2 { get; set; } + + [Description("ע")] + public bool Comments { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_LOCATION.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_LOCATION.cs new file mode 100644 index 0000000..a7b79f9 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_LOCATION.cs @@ -0,0 +1,93 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("λ")] + public class TES_LOCATION : ITaskTable + { + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Description("״̬")] + [StringLength(50)] + public string InventoryStatus { get; set; } + + [Description("Ŀ")] + [StringLength(50)] + public string Project { get; set; } + + [Description("")] + public DateTime DateCreated { get; set; } + + [Description("")] + public bool Permanent { get; set; } + + [Description("")] + [StringLength(50)] + public string Type { get; set; } + + [Description("")] + public bool SinglePart { get; set; } + + [Description("/ο")] + public bool SingleLotReference { get; set; } + + [Description("")] + public decimal Capacity { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("λ")] + public bool ReservedLocations { get; set; } + + [Description("ʵַ")] + [StringLength(50)] + public string PhysicalAddress { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_MES_DATA.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_MES_DATA.cs new file mode 100644 index 0000000..d2b038d --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_MES_DATA.cs @@ -0,0 +1,47 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("MESݱ")] + public class TES_MES_DATA : ITaskTable + { + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_PACK.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_PACK.cs new file mode 100644 index 0000000..fb90997 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_PACK.cs @@ -0,0 +1,63 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("׼װ")] + public class TES_PACK : ITaskTable + { + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("üλ")] + [StringLength(50)] + public string AlternateUm { get; set; } + + [Description("λ")] + public int UmConversion { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_PART_DET.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_PART_DET.cs new file mode 100644 index 0000000..59d76ec --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_PART_DET.cs @@ -0,0 +1,240 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("ϸ")] + public class TES_PART_DET : ITaskTable + { + [Description("")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + [Description("ABC ")] + [StringLength(50)] + public string AbcClass { get; set; } + + [Description("ſ")] + [StringLength(50)] + public string LotControl { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("λ")] + [StringLength(50)] + public string LocationType { get; set; } + + [Description("Զ")] + public bool AutoMaticLotNumbers { get; set; } + + [Description("ƽ")] + public int AverageInterval { get; set; } + + [Description("̵")] + public int CycleCountInterval { get; set; } + + [Description("")] + public int ShelfLife { get; set; } + + [Description("ؼ")] + public bool KeyPart { get; set; } + + [Description("ɹջ״̬")] + [StringLength(50)] + public string PoReceiptStatus { get; set; } + + [Description("Ч")] + public bool RctPoActive { get; set; } + + [Description("ӹջ״̬")] + [StringLength(50)] + public string WoReceiptStatus { get; set; } + + [Description("Ч")] + public bool RctWoActive { get; set; } + + [Description("ǿ涩")] + [StringLength(50)] + public string MemoOrderType { get; set; } + + [Description("ƻ")] + public bool MasterSchedule { get; set; } + + [Description("ƻ")] + public bool PlanOrders { get; set; } + + [Description("ʱ")] + public int TimeFence { get; set; } + + [Description("")] + [StringLength(50)] + public string OrderPolicy { get; set; } + + [Description("")] + public decimal OrderQuantity { get; set; } + + [Description("")] + public int OrderPeriod { get; set; } + + [Description("ȫ")] + public decimal SafetyStock { get; set; } + + [Description("ȫǰ")] + public decimal SafetyTime { get; set; } + + [Description("ٶ")] + public decimal ReorderPoint { get; set; } + + [Description("ƻ޸")] + [StringLength(50)] + public string PlanningRev { get; set; } + + [Description("ԭ")] + public bool IssuePolicy { get; set; } + + [Description("ɹԱ/ƻԱ")] + [StringLength(50)] + public string BuyerPlanner { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + + [Description("ɹص")] + [StringLength(50)] + public string PoSite { get; set; } + + [Description("ɹ/")] + [StringLength(50)] + public string PurMfg { get; set; } + + [Description("")] + [StringLength(50)] + public string ConfigurationType { get; set; } + + [Description("λ")] + [StringLength(50)] + public string InspectionLocation { get; set; } + + [Description("Ҫ")] + public bool InspectionRequired { get; set; } + + [Description("ǰ")] + public int InspectionLeadTime { get; set; } + + [Description("ۼǰ")] + public int CumulativeLeadTime { get; set; } + + [Description("ǰ")] + public int ManufacturingLedaTime { get; set; } + + [Description("ɹǰ")] + public int PurchaseLeadTime { get; set; } + + [Description("ATPʵʩˮƽ")] + [StringLength(50)] + public string AtpEnforcementLevel { get; set; } + + [Description("ϵATP")] + public bool FamilyATP { get; set; } + + [Description("ATPˮƽ")] + public int AtpHorizon { get; set; } + + [Description("1")] + [StringLength(50)] + public string RunSeq1 { get; set; } + + [Description("2")] + [StringLength(50)] + public string RunSeq2 { get; set; } + + [Description("")] + public bool Phantom { get; set; } + + [Description("С")] + public decimal MinimumOrder { get; set; } + + [Description("")] + public decimal MaximumOrder { get; set; } + + [Description("")] + public decimal OrderMultiple { get; set; } + + [Description("ڲĹ")] + public bool OperationBasedYield { get; set; } + + [Description("")] + public decimal YieldPercent { get; set; } + + [Description("ʱ")] + [StringLength(50)] + public string RunTime { get; set; } + + [Description("ʱ")] + public decimal SetupTime { get; set; } + + [Description("EMT")] + [StringLength(50)] + public string EmtType { get; set; } + + [Description("EMTԶ")] + public bool AutomaticEmtProcessing { get; set; } + + [Description("")] + [StringLength(50)] + public string NetWorkCode { get; set; } + + [Description("̴")] + [StringLength(50)] + public string RoutingCode { get; set; } + + [Description("嵥/䷽")] + [StringLength(50)] + public string BomFormulaCode { get; set; } + + [Description("")] + [StringLength(50)] + public string ReplenishmentMethod { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_PART_MSTR.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_PART_MSTR.cs new file mode 100644 index 0000000..f8d1f1a --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_PART_MSTR.cs @@ -0,0 +1,142 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("")] + public class TES_PART_MSTR : ITaskTable + { + [Description("")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("1")] + [StringLength(50)] + public string Desc1 { get; set; } + + [Description("2")] + [StringLength(50)] + public string Desc2 { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("Ʒ")] + [StringLength(50)] + public string ProdLine { get; set; } + + [Description("")] + public DateTime AddDate { get; set; } + + [Description("")] + [StringLength(50)] + public string DsgnGroup { get; set; } + + [Description("")] + [StringLength(50)] + public string PromotionGroup { get; set; } + + [Description("")] + [StringLength(50)] + public string PartType { get; set; } + + [Description("״̬")] + [StringLength(50)] + public string Status { get; set; } + + [Description("")] + [StringLength(50)] + public string Group { get; set; } + + [Description("ͼֽ")] + [StringLength(50)] + public string Drawing { get; set; } + + [Description("Ŀ޸")] + [StringLength(50)] + public string PartRevision { get; set; } + + [Description("ͼֽλ")] + [StringLength(50)] + public string DrawingLocation { get; set; } + + [Description("С")] + [StringLength(50)] + public string Size { get; set; } + + [Description("۸ۿ")] + [StringLength(50)] + public string PriceBreakCategory { get; set; } + + [Description("")] + public bool AuxiliaryMaterial { get; set; } + + [Description("߽")] + public bool OfflineSettlement { get; set; } + + [Description("Qȼ")] + [StringLength(50)] + public string Qgrade { get; set; } + + [Description("")] + [StringLength(50)] + public string WmsPartType { get; set; } + + [Description("ʽ")] + [StringLength(50)] + public string ManageWay { get; set; } + + [Description("")] + [StringLength(50)] + public string InventoryCode { get; set; } + + [Description("ͣ/")] + [StringLength(50)] + public string ManageType { get; set; } + + [Description("Ƿ")] + [StringLength(50)] + public string InspectType { get; set; } + + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_PRODUCT_LINE.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_PRODUCT_LINE.cs new file mode 100644 index 0000000..cdf132c --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_PRODUCT_LINE.cs @@ -0,0 +1,61 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("Ʒ")] + public class TES_PRODUCT_LINE : ITaskTable + { + [Description("Ʒ")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Description("Ӧ˰")] + public bool Taxable { get; set; } + + [Description("˰")] + public int TaxClass { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_PROJECT.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_PROJECT.cs new file mode 100644 index 0000000..c0e0590 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_PROJECT.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("Ŀ")] + public class TES_PROJECT : ITaskTable + { + [Description("")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_PURCHASE_PRICE.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_PURCHASE_PRICE.cs new file mode 100644 index 0000000..069e6cf --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_PURCHASE_PRICE.cs @@ -0,0 +1,89 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("ɹ۸")] + public class TES_PURCHASE_PRICE : ITaskTable + { + [Description("Ŀ")] + [StringLength(50)] + public string PriceList { get; set; } + + [Description("˵")] + [StringLength(50)] + public string Desc { get; set; } + + [Description("Ʒ")] + [StringLength(50)] + public string ProductLine { get; set; } + + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("ʼ")] + public DateTime Start { get; set; } + + [Description("")] + public DateTime ExpireDate { get; set; } + + [Description("")] + [StringLength(50)] + public string AmountType { get; set; } + + [Description("")] + public decimal Amount { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + [Description("Ӧ")] + [StringLength(50)] + public string SupplierCode { get; set; } + [Description("Ӧ̽")] + public decimal VendAmount { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_ROUTING.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_ROUTING.cs new file mode 100644 index 0000000..be6936b --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_ROUTING.cs @@ -0,0 +1,129 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("·ɱ")] + public class TES_ROUTING : ITaskTable + { + [Description("̴")] + [StringLength(50)] + public string RoutingCode { get; set; } + + [Description("")] + public int Operation { get; set; } + + [Description("ʼ")] + public DateTime StartDate { get; set; } + + [Description("׼")] + [StringLength(50)] + public string StandardOperration { get; set; } + + [Description("")] + [StringLength(50)] + public string WorkCenter { get; set; } + + [Description("")] + [StringLength(50)] + public string Machine { get; set; } + + [Description("˵")] + [StringLength(50)] + public string Description { get; set; } + + [Description("/")] + public int MachinesPerOperation { get; set; } + + [Description("ƽмӹ")] + public int OverlapUnits { get; set; } + + [Description("Ŷʱ")] + public decimal QueueTime { get; set; } + + [Description("ȴʱ")] + public decimal WaitTime { get; set; } + + [Description("ֽ׶εĹ")] + public bool MilestoneOperation { get; set; } + + [Description("תǰ")] + public int SubcontractLt { get; set; } + + [Description("Ա")] + public decimal SetupCrew { get; set; } + + [Description("ȫԱ")] + public decimal RunCrew { get; set; } + + [Description("ʱ")] + public decimal SetupTime { get; set; } + + [Description("ʱ")] + public decimal RunTime { get; set; } + + [Description("ƶʱ")] + public decimal MoveTime { get; set; } + + [Description("")] + public DateTime EndDate { get; set; } + + [Description("")] + public decimal YieldPercent { get; set; } + + [Description("ߴ")] + [StringLength(50)] + public string ToolCode { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + + [Description("ֵ")] + public decimal InventoryValue { get; set; } + + [Description("תɱ")] + public decimal SubcontractCost { get; set; } + + [Description("ע")] + public bool Comments { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_SALE_PRICE.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_SALE_PRICE.cs new file mode 100644 index 0000000..1f3e8ea --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_SALE_PRICE.cs @@ -0,0 +1,85 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("ۼ۸")] + public class TES_SALE_PRICE : ITaskTable + { + [Description("Ŀ")] + [StringLength(50)] + public string PriceList { get; set; } + + [Description("˵")] + [StringLength(50)] + public string Desc { get; set; } + + [Description("Ʒ")] + [StringLength(50)] + public string ProductLine { get; set; } + + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("ʼ")] + public DateTime Start { get; set; } + + [Description("")] + public DateTime ExpireDate { get; set; } + + [Description("")] + [StringLength(50)] + public string AmountType { get; set; } + + [Description("")] + public decimal Amount { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_SHIFT.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_SHIFT.cs new file mode 100644 index 0000000..6038e93 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_SHIFT.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("α")] + public class TES_SHIFT : ITaskTable + { + [Description("")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_SITE.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_SITE.cs new file mode 100644 index 0000000..2a18755 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_SITE.cs @@ -0,0 +1,92 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("ص")] + public class TES_SITE : ITaskTable + { + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("Ƶλ")] + [StringLength(50)] + public string Entity { get; set; } + + [Description("״̬")] + [StringLength(50)] + public string Status { get; set; } + + [Description("Զɿλ")] + public bool AutoLocation { get; set; } + + [Description("λ")] + [StringLength(50)] + public string InspLocation { get; set; } + + [Description("EMTӦ")] + [StringLength(50)] + public string BtbSupplier { get; set; } + + [Description("ⲿӦ")] + public bool ExtSupplier { get; set; } + + [Description("תƲĿ")] + [StringLength(50)] + public string XferAcct { get; set; } + + [Description("תƲ˻")] + [StringLength(50)] + public string XferSub { get; set; } + + [Description("תƲɱ")] + [StringLength(50)] + public string XferCc { get; set; } + + [Description("POλ")] + [StringLength(50)] + public string GitLocation { get; set; } + + [Description("ʹüƻ/ȵĹ̨")] + public bool UsePlanSchedWbs { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_STAND_COST_PRICE.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_STAND_COST_PRICE.cs new file mode 100644 index 0000000..66af03f --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_STAND_COST_PRICE.cs @@ -0,0 +1,69 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("׼ɱ")] + public class TES_STAND_COST_PRICE : ITaskTable + { + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("ϳɱ")] + public int MaterialCost { get; set; } + + [Description("˹ɱ")] + public int LaborCost { get; set; } + + [Description("ӳɱ")] + public int BurdenCost { get; set; } + + [Description("ɱ")] + public int OverheadCost { get; set; } + + [Description("תɱ")] + public int SubcontrCost { get; set; } + + [Description("ɱ")] + public int CostSet { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_SUB_ACCOUNT.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_SUB_ACCOUNT.cs new file mode 100644 index 0000000..d038722 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_SUB_ACCOUNT.cs @@ -0,0 +1,56 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("˻")] + public class TES_SUB_ACCOUNT : ITaskTable + { + [Description("˻")] + [StringLength(50)] + public string Code { get; set; } + + [Description("˻")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_SUPPLIER.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_SUPPLIER.cs new file mode 100644 index 0000000..f56614d --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_SUPPLIER.cs @@ -0,0 +1,312 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("Ӧ̱")] + public class TES_SUPPLIER : ITaskTable + { + [Description("Ӧ̴")] + [StringLength(50)] + public string SupplierCode { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string SupplierName { get; set; } + + [Description("")] + [StringLength(50)] + public string SearchName { get; set; } + + [Description("м")] + [StringLength(50)] + public string SecondName { get; set; } + + [Description("")] + [StringLength(50)] + public string ThirdName { get; set; } + + [Description("")] + [StringLength(50)] + public string GroupName { get; set; } + + [Description("")] + public bool Active { get; set; } + + [Description("Ӧ̵ַ")] + [StringLength(50)] + public string Address1 { get; set; } + + [Description("Ӧ̵ַ")] + [StringLength(50)] + public string Address2 { get; set; } + + [Description("Ӧ̵ַ")] + [StringLength(50)] + public string Address3 { get; set; } + + [Description("ʱ")] + public int ZipCode { get; set; } + + [Description("")] + [StringLength(50)] + public string City { get; set; } + + [Description("")] + [StringLength(50)] + public string Country { get; set; } + + [Description("绰")] + public int Telephone { get; set; } + + [Description("ʡ")] + [StringLength(50)] + public string province { get; set; } + + [Description("")] + [StringLength(50)] + public string County { get; set; } + + [Description("")] + public int Fax { get; set; } + + [Description("Դ")] + [StringLength(50)] + public string LanguageCode { get; set; } + + [Description("ʼ")] + public int Email { get; set; } + + [Description("ַ")] + public int Internet { get; set; } + + [Description("˰ַ")] + public bool AddressIsTaxable { get; set; } + + [Description("˰")] + public bool AddressIsTaxIncluded { get; set; } + + [Description("˰")] + [StringLength(50)] + public string FederalTax { get; set; } + + [Description("˰")] + [StringLength(50)] + public string StateTax { get; set; } + + [Description("˰1")] + [StringLength(50)] + public string MiscTax1 { get; set; } + + [Description("˰2")] + [StringLength(50)] + public string MiscTax2 { get; set; } + + [Description("˰3")] + [StringLength(50)] + public string MiscTax3 { get; set; } + + [Description("˰")] + public bool TaxInCity { get; set; } + + [Description("˰")] + [StringLength(50)] + public string TaxZone { get; set; } + + [Description("˰")] + public int TaxClass { get; set; } + + [Description("˰;")] + [StringLength(50)] + public string TaxUsage { get; set; } + + [Description("")] + [StringLength(50)] + public string Title { get; set; } + + [Description("ϵ")] + [StringLength(50)] + public string ContactName { get; set; } + + [Description("д")] + [StringLength(50)] + public string Initials { get; set; } + + [Description("")] + [StringLength(50)] + public string Function { get; set; } + + [Description("Ա")] + [StringLength(50)] + public string Gender { get; set; } + + [Description("Ҫϵ")] + public bool ContactIsPrimary { get; set; } + + [Description("Ҫϵ")] + public bool ContactIsSecondary { get; set; } + + [Description("")] + public bool Compens { get; set; } + + [Description("Ʊļ")] + public int GlProfileInvoice { get; set; } + + [Description("Ʊݿļ")] + public int GlProfileCreditNote { get; set; } + + [Description("Ԥļ")] + public int GlProfilePrepayment { get; set; } + + [Description("˿ļ")] + public int AccountGLProfile { get; set; } + + [Description("˻ļ")] + public int SubAccountProfile { get; set; } + + [Description("Ŵ")] + [StringLength(50)] + public string CreditAgencyReference { get; set; } + + [Description("̻")] + [StringLength(50)] + public string CommerceNumber { get; set; } + + [Description("TID֪ͨ")] + [StringLength(50)] + public string TidNotice { get; set; } + + [Description("ⲿͻ")] + [StringLength(50)] + public string ExternalCustomerNumber { get; set; } + + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string SupplierType { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string Purchasetype { get; set; } + + [Description("֧")] + [StringLength(50)] + public string CreditTerms { get; set; } + + [Description("Ʊ״̬")] + [StringLength(50)] + public string InvoiceStatusCode { get; set; } + + [Description("")] + [StringLength(50)] + public string PaymentGroup { get; set; } + + [Description("ͻ")] + public bool SendRemittance { get; set; } + + [Description("ָ")] + public bool SplitAccount { get; set; } + + [Description("ʽ")] + [StringLength(50)] + public string ShipVia { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + + [Description("")] + [StringLength(50)] + public string Carrier { get; set; } + + [Description("ɹϵ")] + [StringLength(50)] + public string Purchasecontact { get; set; } + + [Description("ռ˼")] + [StringLength(50)] + public string DayBookSet { get; set; } + + [Description("幩Ӧ")] + public bool KanBanSupplier { get; set; } + + [Description("")] + [StringLength(50)] + public string PromotionGroup { get; set; } + + [Description("ɹԱ")] + [StringLength(50)] + public string Buyer { get; set; } + + [Description("۸")] + [StringLength(50)] + public string PriceTable { get; set; } + + [Description("ۿ۱")] + [StringLength(50)] + public string DiscountTable { get; set; } + + [Description("̶۸")] + public bool FixedPrice { get; set; } + + [Description("۵۸")] + [StringLength(50)] + public string NonSoPrice { get; set; } + + [Description("иʽ")] + [StringLength(50)] + public string BankFormat { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string SupplierBank { get; set; } + + [Description("")] + [StringLength(50)] + public string OwnBank { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + [Description("Ʊ޶")] + public decimal? Quota { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_SUPPLIER_PART.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_SUPPLIER_PART.cs new file mode 100644 index 0000000..c429ca4 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_SUPPLIER_PART.cs @@ -0,0 +1,101 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("Ӧ")] + public class TES_SUPPLIER_PART : ITaskTable + { + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string SupplierPart { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("Ӧǰ")] + public int SupplierLeadTime { get; set; } + + [Description("ʹÿͻ")] + public bool UseSoReductionPrice { get; set; } + + [Description("ͻ")] + public decimal SoPriceReduction { get; set; } + + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + + [Description("۵۸")] + public decimal QuotePrice { get; set; } + + [Description("")] + public DateTime QuoteDate { get; set; } + + [Description("")] + public decimal QuoteQty { get; set; } + + [Description("Ŀ")] + [StringLength(50)] + public string PriceList { get; set; } + + [Description("")] + [StringLength(50)] + public string Manufacturer { get; set; } + + [Description("")] + [StringLength(50)] + public string ManufacturerPart { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Comment { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_SUPPLIER_TYPE.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_SUPPLIER_TYPE.cs new file mode 100644 index 0000000..ea4a1a5 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_SUPPLIER_TYPE.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("Ӧͱ")] + public class TES_SUPPLIER_TYPE : ITaskTable + { + [Description("")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_TEAM.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_TEAM.cs new file mode 100644 index 0000000..901f372 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_TEAM.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("")] + public class TES_TEAM : ITaskTable + { + [Description("")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_WMS_LOCATION.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_WMS_LOCATION.cs new file mode 100644 index 0000000..3f730b9 --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_WMS_LOCATION.cs @@ -0,0 +1,97 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("WMSλ")] + public class TES_WMS_LOCATION : ITaskTable + { + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Description("ERPλ")] + [StringLength(50)] + public string ErpLocation { get; set; } + + [Description("")] + [StringLength(50)] + public string Area { get; set; } + + [Description("״̬")] + [StringLength(50)] + public string InventoryStatus { get; set; } + + [Description("Ա")] + [StringLength(50)] + public string WarehouseKeeper { get; set; } + + [Description("ֿ")] + [StringLength(50)] + public string WhseCode { get; set; } + + [Description("")] + public bool IsEnableNegativeStock { get; set; } + + [Description("")] + public bool AutoRemoveZeroStockDetail { get; set; } + + [Description("")] + public decimal MaxBoxQty { get; set; } + + [Description("")] + public bool IsEnableMix { get; set; } + + [Description("Ŀ")] + [StringLength(50)] + public string ProjectId { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + + [StringLength(50)] + public string Domain { get; set; } + + [StringLength(50)] + public string Site { get; set; } + + public Guid TaskID { get; set; } + + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/TES_WORK_CENTER.cs b/北京北汽/SCP/Model/ExchangeCenterTables/TES_WORK_CENTER.cs new file mode 100644 index 0000000..479b55e --- /dev/null +++ b/北京北汽/SCP/Model/ExchangeCenterTables/TES_WORK_CENTER.cs @@ -0,0 +1,106 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.ExchangeCenterTables +{ + [Description("ı")] + public class TES_WORK_CENTER : ITaskTable + { + [Description("Ĵ")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Description("")] + [StringLength(50)] + public string Department { get; set; } + + [Description("Զ̶")] + public bool AutoFirm { get; set; } + + [Description("ϴԶ̶")] + public DateTime LastAutoFirm { get; set; } + + [Description("")] + [StringLength(50)] + public string Scheduler { get; set; } + + [Description("ȴʱ")] + public decimal Queue { get; set; } + + [Description("ȴʱ")] + public decimal Wait { get; set; } + + [Description("豸/")] + public int MchOp { get; set; } + + [Description("Ա")] + public decimal SetupMen { get; set; } + + [Description("ȫԱ")] + public decimal RunCrew { get; set; } + + [Description("")] + public decimal MchWkctr { get; set; } + + [Description("")] + public decimal MchBdn { get; set; } + + [Description("÷")] + public decimal SetupRte { get; set; } + + [Description("˹")] + public decimal LbrRate { get; set; } + + [Description("˹")] + public decimal BdnRate { get; set; } + + [Description("˹")] + public decimal BdnPct { get; set; } + + [Description("")] + [StringLength(50)] + public string Mch { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/ExchangeCenterTables/name.txt b/北京北汽/SCP/Model/ExchangeCenterTables/name.txt new file mode 100644 index 0000000..b810980 Binary files /dev/null and b/北京北汽/SCP/Model/ExchangeCenterTables/name.txt differ diff --git a/北京北汽/SCP/Model/GlobalConfig.cs b/北京北汽/SCP/Model/GlobalConfig.cs new file mode 100644 index 0000000..8c8e427 --- /dev/null +++ b/北京北汽/SCP/Model/GlobalConfig.cs @@ -0,0 +1,76 @@ +using System; +using CK.SCP.Utils; + +namespace ChangkeTec.SDMS.Model +{ + public static class GlobalConfig + { + public const string CommonFileName = "通用设置.ini"; + public const string DataCenterDbFileName = "数据中心数据库设置.ini"; + public const string ExchangeCenterDbFileName = "交换中心数据库设置.ini"; + public const string UpdateFileName = "自动更新设置.ini"; + + + private static DbSetting _dcDB; + private static DbSetting _ecDB; + + + public static GlobalSetting Setting = new GlobalSetting(); + + + public static DbSetting DataCenterDB + { + get { return _dcDB ?? (_dcDB = GetConfigValues(DataCenterDbFileName)); } + + set { _dcDB = value; } + } + + public static DbSetting ExchangeCenterDB + { + get { return _ecDB ?? (_ecDB = GetConfigValues(ExchangeCenterDbFileName)); } + + set { _ecDB = value; } + } + + public static T GetConfigValues(string filename) where T : new() + { + var t = new T(); + if (FileHelper.Exists(filename)) + t = JsonHelper.ReadConfigFromFile(filename); + else + throw new Exception($"配置文件【{filename}】丢失,请重新配置"); + + return t; + } + + public static void TestDataCenterDbConnection() + { + try + { + var db = DbContextFactory.CreateDataCenterInstance(); + db.Database.ExecuteSqlCommand("select getdate()"); + } + catch (Exception ex) + { + throw new Exception( + $"系统无法连接到{DataCenterDbFileName} {DataCenterDB.数据库类型}数据库:{DataCenterDB},请检查配置的服务器,数据库,用户名和密码等信息是否正确。" + + ex); + } + } + + public static void TestExchangeCenterDbConnection() + { + try + { + var db = DbContextFactory.CreateExchangeCenterInstance(); + db.Database.ExecuteSqlCommand("select getdate()"); + } + catch (Exception ex) + { + throw new Exception( + $"系统无法连接到{ExchangeCenterDbFileName} {DataCenterDB.数据库类型}数据库:{DataCenterDB},请检查配置的服务器,数据库,用户名和密码等信息是否正确。" + + ex); + } + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/GlobalSetting.cs b/北京北汽/SCP/Model/GlobalSetting.cs new file mode 100644 index 0000000..47c2ed3 --- /dev/null +++ b/北京北汽/SCP/Model/GlobalSetting.cs @@ -0,0 +1,35 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; + +namespace ChangkeTec.SDMS.Model +{ + public class GlobalSetting + { + [Description("单点登录")] + public bool SingleSiteLogin { get; set; } = true; + + [Description("先占优先")] + public bool KeepLogin { get; set; } = true; + + [StringLength(50)] + public string DataCenterSystemName { get; set; } = "SDMS"; + + public bool IsSoftDelete { get; set; } = false; + + [Description("默认密码")] + [StringLength(50)] + public string DefaultPassword { get; set; } = "1234qwer"; + + [Description("会话编号")] + [StringLength(50)] + public string SessionId { get; set; } + + [Description("交换中心地址")] + [StringLength(50)] + public string ExchangeCenterPassword { get; set; } + + [Description("交换中心地址")] + [StringLength(50)] + public string ExchangeCenterUrl { get; set; } = "http://localhost:4290/ExchangeCenterService.asmx"; + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/Model.csproj b/北京北汽/SCP/Model/Model.csproj new file mode 100644 index 0000000..db02482 --- /dev/null +++ b/北京北汽/SCP/Model/Model.csproj @@ -0,0 +1,279 @@ + + + + + Debug + AnyCPU + {A5D5AA45-2210-4B53-82E9-52B58ACB2348} + Library + Properties + ChangkeTec.SDMS.Model + Model + v4.5.2 + 512 + true + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + 6 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll + True + + + ..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll + True + + + ..\DLL\EntityFramework.Utilities.dll + + + ..\packages\LinqKit.1.1.16\lib\net45\LinqKit.dll + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {4C6A951D-AD7F-47CE-B2CE-32C205D8D6BA} + CK.SCP.Utils + + + + \ No newline at end of file diff --git a/北京北汽/SCP/Model/Properties/AssemblyInfo.cs b/北京北汽/SCP/Model/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..6302f09 --- /dev/null +++ b/北京北汽/SCP/Model/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("Model")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Model")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("a5d5aa45-2210-4b53-82e9-52b58acb2348")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/北京北汽/SCP/Model/ServiceResult.cs b/北京北汽/SCP/Model/ServiceResult.cs new file mode 100644 index 0000000..8603ce0 --- /dev/null +++ b/北京北汽/SCP/Model/ServiceResult.cs @@ -0,0 +1,39 @@ +using System.ComponentModel.DataAnnotations; +using CK.SCP.Utils; + +namespace ChangkeTec.SDMS.Model +{ + public class ServiceResult + { + public bool Success { get; set; } + + public string Type { get; set; } + + public string Data { get; set; } + + public string Message { get; set; } + + //public override string ToString() + //{ + // return EntitiesHelper.GetPropertiesString(this); + //} + } + + public class ServiceParam + { + public string Username { get; set; } + + public string SheetCode { get; set; } + + public string CompanyCode { get; set; } + + public string DeptCode { get; set; } + + public string RoleCode { get; set; } + + //public override string ToString() + //{ + // return EntitiesHelper.GetPropertiesString(this); + //} + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/Sql2008ManifestTokenResolver.cs b/北京北汽/SCP/Model/Sql2008ManifestTokenResolver.cs new file mode 100644 index 0000000..03ba832 --- /dev/null +++ b/北京北汽/SCP/Model/Sql2008ManifestTokenResolver.cs @@ -0,0 +1,14 @@ +using System.ComponentModel.DataAnnotations; +using System.Data.Common; +using System.Data.Entity.Infrastructure; + +namespace ChangkeTec.SDMS.Model +{ + public class Sql2008ManifestTokenResolver : IManifestTokenResolver + { + public string ResolveManifestToken(DbConnection connection) + { + return "2008"; + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/SqlDbConfiguration.cs b/北京北汽/SCP/Model/SqlDbConfiguration.cs new file mode 100644 index 0000000..fc848cb --- /dev/null +++ b/北京北汽/SCP/Model/SqlDbConfiguration.cs @@ -0,0 +1,12 @@ +using System.Data.Entity; + +namespace ChangkeTec.SDMS.Model +{ + public class SqlDbConfiguration : DbConfiguration + { + public SqlDbConfiguration() + { + SetManifestTokenResolver(new Sql2008ManifestTokenResolver()); + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Model/TesList_Include.tt b/北京北汽/SCP/Model/TesList_Include.tt new file mode 100644 index 0000000..3d911b0 --- /dev/null +++ b/北京北汽/SCP/Model/TesList_Include.tt @@ -0,0 +1,89 @@ + +<#+ + List ServiceList=new List() + { + new NameStruct(){ClassName="Tea_Subscribe",ModelName="TEA_SUBSCRIBE"}, + new NameStruct(){ClassName="Tea_System",ModelName="TEA_SYSTEM"}, + new NameStruct(){ClassName="Tea_Table",ModelName="TEA_TABLE"}, + new NameStruct(){ClassName="Tea_Task",ModelName="TEA_TASK"}, + new NameStruct(){ClassName="Tea_TaskSub",ModelName="TEA_TASK_SUB"}, + new NameStruct(){ClassName="Tea_TaskSubHis",ModelName="TEA_TASK_SUB_HIS"}, + new NameStruct(){ClassName="Ted_AsnDet",ModelName="TED_ASN_DET"}, + new NameStruct(){ClassName="Ted_AsnMstr",ModelName="TED_ASN_MSTR"}, + new NameStruct(){ClassName="Ted_Assemble",ModelName="TED_ASSEMBLE"}, + new NameStruct(){ClassName="Ted_BkDet",ModelName="TED_BK_DET"}, + new NameStruct(){ClassName="Ted_BkMstr",ModelName="TED_BK_MSTR"}, + new NameStruct(){ClassName="Ted_FixedDet",ModelName="TED_FIXED_DET"}, + new NameStruct(){ClassName="Ted_FixedMstr",ModelName="TED_FIXED_MSTR"}, + new NameStruct(){ClassName="Ted_Injection",ModelName="TED_INJECTION"}, + new NameStruct(){ClassName="Ted_InvoiceDet",ModelName="TED_INVOICE_DET"}, + new NameStruct(){ClassName="Ted_InvoiceMstr",ModelName="TED_INVOICE_MSTR"}, + new NameStruct(){ClassName="Ted_IsSunpDet",ModelName="TED_ISSUNP_DET"}, + new NameStruct(){ClassName="Ted_IsSunpMstr",ModelName="TED_ISSUNP_MSTR"}, + new NameStruct(){ClassName="Ted_KanbanDet",ModelName="TED_KANBAN_DET"}, + new NameStruct(){ClassName="Ted_KanbanMstr",ModelName="TED_KANBAN_MSTR"}, + new NameStruct(){ClassName="Ted_Led",ModelName="TED_LED"}, + new NameStruct(){ClassName="Ted_PoDet",ModelName="TED_PO_DET"}, + new NameStruct(){ClassName="Ted_PoMstr",ModelName="TED_PO_MSTR"}, + new NameStruct(){ClassName="Ted_RctunpDet",ModelName="TED_RCTUNP_DET"}, + new NameStruct(){ClassName="Ted_RctunpMstr",ModelName="TED_RCTUNP_MSTR"}, + new NameStruct(){ClassName="Ted_ReceiptDet",ModelName="TED_RECEIPT_DET"}, + new NameStruct(){ClassName="Ted_ReceiptMstr",ModelName="TED_RECEIPT_MSTR"}, + new NameStruct(){ClassName="Ted_ReturnDet",ModelName="TED_RETURN_DET"}, + new NameStruct(){ClassName="Ted_ReturnMstr",ModelName="TED_RETURN_MSTR"}, + new NameStruct(){ClassName="Ted_SoDet",ModelName="TED_SO_DET"}, + new NameStruct(){ClassName="Ted_SoMstr",ModelName="TED_SO_MSTR"}, + new NameStruct(){ClassName="Ted_Spraying",ModelName="TED_SPRAYING"}, + new NameStruct(){ClassName="Ted_SprayingRepair",ModelName="TED_SPRAYING_REPAIR"}, + new NameStruct(){ClassName="Ted_Stock",ModelName="TED_STOCK"}, + new NameStruct(){ClassName="Ted_TransferDet",ModelName="TED_TRANSFER_DET"}, + new NameStruct(){ClassName="Ted_TransferMstr",ModelName="TED_TRANSFER_MSTR"}, + new NameStruct(){ClassName="Tel_DataError",ModelName="TEL_DATA_ERROR"}, + new NameStruct(){ClassName="Tel_TaskSubRead",ModelName="TEL_TASK_SUB_READ"}, + new NameStruct(){ClassName="Tes_Account",ModelName="TES_ACCOUNT"}, + new NameStruct(){ClassName="Tes_Bom",ModelName="TES_BOM"}, + new NameStruct(){ClassName="Tes_Code",ModelName="TES_CODE"}, + new NameStruct(){ClassName="Tes_CodeType",ModelName="TES_CODE_TYPE"}, + new NameStruct(){ClassName="Tes_Color",ModelName="TES_COLOR"}, + new NameStruct(){ClassName="Tes_CostCenter",ModelName="TES_COST_CENTER"}, + new NameStruct(){ClassName="Tes_Customer",ModelName="TES_CUSTOMER"}, + new NameStruct(){ClassName="Tes_CustomerPart",ModelName="TES_CUSTOMER_PART"}, + new NameStruct(){ClassName="Tes_CustomerType",ModelName="TES_CUSTOMER_TYPE"}, + new NameStruct(){ClassName="Tes_Department",ModelName="TES_DEPARTMENT"}, + new NameStruct(){ClassName="Tes_Domain",ModelName="TES_DOMAIN"}, + new NameStruct(){ClassName="Tes_EdiData",ModelName="TES_EDI_DATA"}, + new NameStruct(){ClassName="Tes_Entity",ModelName="TES_ENTITY"}, + new NameStruct(){ClassName="Tes_Line",ModelName="TES_LINE"}, + new NameStruct(){ClassName="Tes_LinePart",ModelName="TES_LINE_PART"}, + new NameStruct(){ClassName="Tes_Location",ModelName="TES_LOCATION"}, + new NameStruct(){ClassName="Tes_MesData",ModelName="TES_MES_DATA"}, + new NameStruct(){ClassName="Tes_Pack",ModelName="TES_PACK"}, + new NameStruct(){ClassName="Tes_PartDet",ModelName="TES_PART_DET"}, + new NameStruct(){ClassName="Tes_PartMstr",ModelName="TES_PART_MSTR"}, + new NameStruct(){ClassName="Tes_ProductLine",ModelName="TES_PRODUCT_LINE"}, + new NameStruct(){ClassName="Tes_Project",ModelName="TES_PROJECT"}, + new NameStruct(){ClassName="Tes_PurchasePrice",ModelName="TES_PURCHASE_PRICE"}, + new NameStruct(){ClassName="Tes_Routing",ModelName="TES_ROUTING"}, + new NameStruct(){ClassName="Tes_SalePrice",ModelName="TES_SALE_PRICE"}, + new NameStruct(){ClassName="Tes_Shift",ModelName="TES_SHIFT"}, + new NameStruct(){ClassName="Tes_Site",ModelName="TES_SITE"}, + new NameStruct(){ClassName="Tes_StandCostPrice",ModelName="TES_STAND_COST_PRICE"}, + new NameStruct(){ClassName="Tes_SubAccount",ModelName="TES_SUB_ACCOUNT"}, + new NameStruct(){ClassName="Tes_Supplier",ModelName="TES_SUPPLIER"}, + new NameStruct(){ClassName="Tes_SupplierPart",ModelName="TES_SUPPLIER_PART"}, + new NameStruct(){ClassName="Tes_SupplierType",ModelName="TES_SUPPLIER_TYPE"}, + new NameStruct(){ClassName="Tes_Team",ModelName="TES_TEAM"}, + new NameStruct(){ClassName="Tes_WorkCenter",ModelName="TES_WORK_CENTER"}, + }; + + //创建文件类 + public class NameStruct + { + //文件名称 + public string ClassName{get;set;} + //文件名称 + public string ModelName{get;set;} + + } + + #> \ No newline at end of file diff --git a/北京北汽/SCP/Model/packages.config b/北京北汽/SCP/Model/packages.config new file mode 100644 index 0000000..66b8654 --- /dev/null +++ b/北京北汽/SCP/Model/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/北京北汽/SCP/Models/App.config b/北京北汽/SCP/Models/App.config new file mode 100644 index 0000000..134d7fd --- /dev/null +++ b/北京北汽/SCP/Models/App.config @@ -0,0 +1,28 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/北京北汽/SCP/Models/AppBoxEntity/AppBoxContext.cs b/北京北汽/SCP/Models/AppBoxEntity/AppBoxContext.cs new file mode 100644 index 0000000..65dfad3 --- /dev/null +++ b/北京北汽/SCP/Models/AppBoxEntity/AppBoxContext.cs @@ -0,0 +1,104 @@ +using System.Data.Entity; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class AppBoxContext : DbContext + { + public AppBoxContext() : base(EntitiesFactory.GetEfConnectionString(GlobalConfig.AppBoxDatabase)) + { + + } + + public AppBoxContext(string strConn) : base(strConn) + { + + } + + public DbSet Configs { get; set; } + public DbSet Depts { get; set; } + public DbSet Users { get; set; } + public DbSet Roles { get; set; } + public DbSet Titles { get; set; } + public DbSet<Online> Onlines { get; set; } + public DbSet<Log> Logs { get; set; } + public DbSet<Power> Powers { get; set; } + public DbSet<Menu> Menus { get; set; } + public DbSet<TA_ADDRESS> TA_ADDRESS { get; set; } + public DbSet<TA_FACTORY> TA_FACTORY { get; set; } + public DbSet<VenderUsers> VenderUsers { get; set; } + + + protected override void OnModelCreating(DbModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + + modelBuilder.Entity<TA_FACTORY>() + .HasMany(r => r.Users) + .WithMany(u => u.TA_FACTORY) + .Map(x => x.ToTable("FactoryUsers") + .MapLeftKey("FACTORY_ID") + .MapRightKey("UserID")); + + modelBuilder.Entity<Role>() + .HasMany(r => r.Users) + .WithMany(u => u.Roles) + .Map(x => x.ToTable("RoleUsers") + .MapLeftKey("RoleID") + .MapRightKey("UserID")); + + modelBuilder.Entity<Title>() + .HasMany(t => t.Users) + .WithMany(u => u.Titles) + .Map(x => x.ToTable("TitleUsers") + .MapLeftKey("TitleID") + .MapRightKey("UserID")); + + modelBuilder.Entity<Dept>() + .HasOptional(d => d.Parent) + .WithMany(d => d.Children) + .Map(x => x.MapKey("ParentID")); + + modelBuilder.Entity<Dept>() + .HasMany(d => d.Users) + .WithOptional(u => u.Dept) + .Map(x => x.MapKey("DeptID")); + + modelBuilder.Entity<Online>() + .HasRequired(o => o.User) + .WithMany() + .Map(x => x.MapKey("UserID")); + + modelBuilder.Entity<Menu>() + .HasOptional(m => m.Parent) + .WithMany(m => m.Children) + .Map(x => x.MapKey("ParentID")); + + //modelBuilder.Entity<Menu>() + // .HasOptional(m => m.Module) + // .WithMany() + // .Map(x => x.MapKey("ModuleID")); + + //modelBuilder.Entity<Module>() + // .HasMany(m => m.ModulePowers) + // .WithRequired(mp => mp.Module); + + //modelBuilder.Entity<Power>() + // .HasMany(p => p.ModulePowers) + // .WithRequired(mp => mp.Power); + + modelBuilder.Entity<Menu>() + .HasOptional(m => m.ViewPower) + .WithMany() + .Map(x => x.MapKey("ViewPowerID")); + + modelBuilder.Entity<Role>() + .HasMany(r => r.Powers) + .WithMany(p => p.Roles) + .Map(x => x.ToTable("RolePowers") + .MapLeftKey("RoleID") + .MapRightKey("PowerID")); + + + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/AppBoxEntity/AppBoxDatabaseInitializer.cs b/北京北汽/SCP/Models/AppBoxEntity/AppBoxDatabaseInitializer.cs new file mode 100644 index 0000000..ea78572 --- /dev/null +++ b/北京北汽/SCP/Models/AppBoxEntity/AppBoxDatabaseInitializer.cs @@ -0,0 +1,686 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity; +using System.Linq; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class AppBoxDatabaseInitializer : DropCreateDatabaseIfModelChanges<AppBoxContext> // DropCreateDatabaseAlways<AppBoxContext> DropCreateDatabaseIfModelChanges<AppBoxContext> + { + protected override void Seed(AppBoxContext context) + { + GetConfigs().ForEach(c => context.Configs.Add(c)); + GetDepts().ForEach(d => context.Depts.Add(d)); + GetUsers().ForEach(u => context.Users.Add(u)); + + GetRoles().ForEach(r => context.Roles.Add(r)); + GetPowers().ForEach(p => context.Powers.Add(p)); + GetTitles().ForEach(t => context.Titles.Add(t)); + + context.SaveChanges(); + // 添加菜单时需要指定ViewPower,所以上面需要先保存到数据库 + GetMenus(context).ForEach(m => context.Menus.Add(m)); + } + + private static List<Menu> GetMenus(AppBoxContext context) + { + var menus = new List<Menu> { + new Menu + { + Name = "系统管理", + SortIndex = 1, + Remark = "顶级菜单", + Children = new List<Menu> { + new Menu + { + Name = "用户管理", + SortIndex = 10, + Remark = "二级菜单", + NavigateUrl = "~/admin/user.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CoreUserView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "职称管理", + SortIndex = 20, + Remark = "二级菜单", + NavigateUrl = "~/admin/title.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CoreTitleView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "职称用户管理", + SortIndex = 30, + Remark = "二级菜单", + NavigateUrl = "~/admin/title_user.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CoreTitleUserView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "部门管理", + SortIndex = 40, + Remark = "二级菜单", + NavigateUrl = "~/admin/dept.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CoreDeptView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "部门用户管理", + SortIndex = 50, + Remark = "二级菜单", + NavigateUrl = "~/admin/dept_user.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CoreDeptUserView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "角色管理", + SortIndex = 60, + Remark = "二级菜单", + NavigateUrl = "~/admin/role.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CoreRoleView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "角色用户管理", + SortIndex = 70, + Remark = "二级菜单", + NavigateUrl = "~/admin/role_user.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CoreRoleUserView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "权限管理", + SortIndex = 80, + Remark = "二级菜单", + NavigateUrl = "~/admin/power.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CorePowerView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "角色权限管理", + SortIndex = 90, + Remark = "二级菜单", + NavigateUrl = "~/admin/role_power.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CoreRolePowerView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "菜单管理", + SortIndex = 100, + Remark = "二级菜单", + NavigateUrl = "~/admin/menu.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CoreMenuView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "在线统计", + SortIndex = 110, + Remark = "二级菜单", + NavigateUrl = "~/admin/online.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CoreOnlineView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "系统配置", + SortIndex = 120, + Remark = "二级菜单", + NavigateUrl = "~/admin/config.aspx", + ImageUrl = "~/res/icon/tag_blue.png", + ViewPower = context.Powers.Where(p => p.Name == "CoreConfigView").FirstOrDefault<Power>() + }, + new Menu + { + Name = "用户设置", + SortIndex = 130, + Remark = "二级菜单", + NavigateUrl = "~/admin/profile.aspx", + ImageUrl = "~/res/icon/tag_blue.png" + } + } + } + }; + + return menus; + } + + + private static List<Title> GetTitles() + { + var titles = new List<Title>() + { + new Title() + { + Name = "总经理" + }, + new Title() + { + Name = "部门经理" + }, + new Title() + { + Name = "高级工程师" + }, + new Title() + { + Name = "工程师" + } + }; + + return titles; + } + + private static List<Power> GetPowers() + { + var powers = new List<Power> + { + new Power + { + Name = "CoreUserView", + Title = "浏览用户列表", + GroupName = "CoreUser" + }, + new Power + { + Name = "CoreUserNew", + Title = "新增用户", + GroupName = "CoreUser" + }, + new Power + { + Name = "CoreUserEdit", + Title = "编辑用户", + GroupName = "CoreUser" + }, + new Power + { + Name = "CoreUserDelete", + Title = "删除用户", + GroupName = "CoreUser" + }, + new Power + { + Name = "CoreUserChangePassword", + Title = "修改用户登陆密码", + GroupName = "CoreUser" + }, + new Power + { + Name = "CoreRoleView", + Title = "浏览角色列表", + GroupName = "CoreRole" + }, + new Power + { + Name = "CoreRoleNew", + Title = "新增角色", + GroupName = "CoreRole" + }, + new Power + { + Name = "CoreRoleEdit", + Title = "编辑角色", + GroupName = "CoreRole" + }, + new Power + { + Name = "CoreRoleDelete", + Title = "删除角色", + GroupName = "CoreRole" + }, + new Power + { + Name = "CoreRoleUserView", + Title = "浏览角色用户列表", + GroupName = "CoreRoleUser" + }, + new Power + { + Name = "CoreRoleUserNew", + Title = "向角色添加用户", + GroupName = "CoreRoleUser" + }, + new Power + { + Name = "CoreRoleUserDelete", + Title = "从角色中删除用户", + GroupName = "CoreRoleUser" + }, + new Power + { + Name = "CoreOnlineView", + Title = "浏览在线用户列表", + GroupName = "CoreOnline" + }, + new Power + { + Name = "CoreConfigView", + Title = "浏览全局配置参数", + GroupName = "CoreConfig" + }, + new Power + { + Name = "CoreConfigEdit", + Title = "修改全局配置参数", + GroupName = "CoreConfig" + }, + new Power + { + Name = "CoreMenuView", + Title = "浏览菜单列表", + GroupName = "CoreMenu" + }, + new Power + { + Name = "CoreMenuNew", + Title = "新增菜单", + GroupName = "CoreMenu" + }, + new Power + { + Name = "CoreMenuEdit", + Title = "编辑菜单", + GroupName = "CoreMenu" + }, + new Power + { + Name = "CoreMenuDelete", + Title = "删除菜单", + GroupName = "CoreMenu" + }, + new Power + { + Name = "CoreLogView", + Title = "浏览日志列表", + GroupName = "CoreLog" + }, + new Power + { + Name = "CoreLogDelete", + Title = "删除日志", + GroupName = "CoreLog" + }, + new Power + { + Name = "CoreTitleView", + Title = "浏览职务列表", + GroupName = "CoreTitle" + }, + new Power + { + Name = "CoreTitleNew", + Title = "新增职务", + GroupName = "CoreTitle" + }, + new Power + { + Name = "CoreTitleEdit", + Title = "编辑职务", + GroupName = "CoreTitle" + }, + new Power + { + Name = "CoreTitleDelete", + Title = "删除职务", + GroupName = "CoreTitle" + }, + new Power + { + Name = "CoreTitleUserView", + Title = "浏览职务用户列表", + GroupName = "CoreTitleUser" + }, + new Power + { + Name = "CoreTitleUserNew", + Title = "向职务添加用户", + GroupName = "CoreTitleUser" + }, + new Power + { + Name = "CoreTitleUserDelete", + Title = "从职务中删除用户", + GroupName = "CoreTitleUser" + }, + new Power + { + Name = "CoreDeptView", + Title = "浏览部门列表", + GroupName = "CoreDept" + }, + new Power + { + Name = "CoreDeptNew", + Title = "新增部门", + GroupName = "CoreDept" + }, + new Power + { + Name = "CoreDeptEdit", + Title = "编辑部门", + GroupName = "CoreDept" + }, + new Power + { + Name = "CoreDeptDelete", + Title = "删除部门", + GroupName = "CoreDept" + }, + new Power + { + Name = "CoreDeptUserView", + Title = "浏览部门用户列表", + GroupName = "CoreDeptUser" + }, + new Power + { + Name = "CoreDeptUserNew", + Title = "向部门添加用户", + GroupName = "CoreDeptUser" + }, + new Power + { + Name = "CoreDeptUserDelete", + Title = "从部门中删除用户", + GroupName = "CoreDeptUser" + }, + new Power + { + Name = "CorePowerView", + Title = "浏览权限列表", + GroupName = "CorePower" + }, + new Power + { + Name = "CorePowerNew", + Title = "新增权限", + GroupName = "CorePower" + }, + new Power + { + Name = "CorePowerEdit", + Title = "编辑权限", + GroupName = "CorePower" + }, + new Power + { + Name = "CorePowerDelete", + Title = "删除权限", + GroupName = "CorePower" + }, + new Power + { + Name = "CoreRolePowerView", + Title = "浏览角色权限列表", + GroupName = "CoreRolePower" + }, + new Power + { + Name = "CoreRolePowerEdit", + Title = "编辑角色权限", + GroupName = "CoreRolePower" + } + }; + + return powers; + } + + private static List<Role> GetRoles() + { + var roles = new List<Role>() + { + new Role() + { + Name = "系统管理员", + Remark = "" + }, + new Role() + { + Name = "部门管理员", + Remark = "" + }, + new Role() + { + Name = "项目经理", + Remark = "" + }, + new Role() + { + Name = "开发经理", + Remark = "" + }, + new Role() + { + Name = "开发人员", + Remark = "" + }, + new Role() + { + Name = "后勤人员", + Remark = "" + }, + new Role() + { + Name = "外包人员", + Remark = "" + } + }; + + return roles; + } + + private static List<User> GetUsers() + { + string[] USER_NAMES = { "男", "童光喜", "男", "方原柏", "女", "祝春亚", "男", "涂辉", "男", "舒兆国", "男", "熊忠文", "男", "徐吉琳", "男", "方金海", "男", "包卫峰", "女", "靖小燕", "男", "杨习斌", "男", "徐长旺", "男", "聂建雄", "男", "周敦友", "男", "陈友庭", "女", "陆静芳", "男", "袁国柱", "女", "骆新桂", "男", "许治国", "男", "马先加", "男", "赵恢川", "男", "柯常胜", "男", "黄国鹏", "男", "柯尊北", "男", "刘海云", "男", "罗清波", "男", "张业权", "女", "丁溯鋆", "男", "吴俊", "男", "郑江", "男", "李亚华", "男", "石光富", "男", "谭志洪", "男", "胡中生", "男", "董龙剑", "男", "陈红", "男", "汪海平", "男", "彭道洲", "女", "尹莉君", "男", "占耀玲", "男", "付杰", "男", "王红艳", "男", "邝兴", "男", "饶玮", "男", "王方胜", "男", "陈劲松", "男", "邓庆华", "男", "王石林", "男", "胡俊明", "男", "索相龙", "男", "陈海军", "男", "吴文涛", "女", "熊望梅", "女", "段丽华", "女", "胡莎莎", "男", "徐友安", "男", "肖诗涛", "男", "王闯", "男", "余兴龙", "男", "芦荫杰", "男", "丁金富", "男", "谭军令", "女", "鄢旭燕", "男", "田坤", "男", "夏德胜", "男", "喻显发", "男", "马兴宝", "男", "孙学涛", "男", "陶云成", "男", "马远健", "男", "田华", "男", "聂子森", "男", "郑永军", "男", "余昌平", "男", "陶俊华", "男", "李小林", "男", "李荣宝", "男", "梅盈凯", "男", "张元群", "男", "郝新华", "男", "刘红涛", "男", "向志强", "男", "伍小峰", "男", "胡勇民", "男", "黄定祥", "女", "高红香", "男", "刘军", "男", "叶松", "男", "易俊林", "男", "张威", "男", "刘卫华", "男", "李浩", "男", "李寿庚", "男", "涂洋", "男", "曹晶", "男", "陈辉", "女", "彭博", "男", "严雪冰", "男", "刘青", "女", "印媛", "男", "吴道雄", "男", "邓旻", "男", "陈骏", "男", "崔波", "男", "韩静颐", "男", "严安勇", "男", "刘攀", "女", "刘艳", "女", "孙昕", "女", "郑新", "女", "徐睿", "女", "李月杰", "男", "吕焱鑫", "女", "刘沈", "男", "朱绍军", "女", "马茜", "女", "唐蕾", "女", "刘姣", "女", "于芳", "男", "吴健", "女", "张丹梅", "女", "王燕", "女", "贾兆梅", "男", "程柏漠", "男", "程辉", "女", "任明慧", "女", "焦莹", "女", "马淑娟", "男", "徐涛", "男", "孙庆国", "男", "刘胜", "女", "傅广凤", "男", "袁弘", "男", "高令旭", "男", "栾树权", "女", "申霞", "女", "韩文萍", "女", "隋艳", "男", "邢海洲", "女", "王宁", "女", "陈晶", "女", "吕翠", "女", "刘少敏", "女", "刘少君", "男", "孔鹏", "女", "张冰", "女", "王芳", "男", "万世忠", "女", "徐凡", "女", "张玉梅", "女", "何莉", "女", "时会云", "女", "王玉杰", "女", "谭素英", "女", "李艳红", "女", "刘素莉", "男", "王旭海", "女", "安丽梅", "女", "姚露", "女", "贾颖", "女", "曹微", "男", "黄经华", "女", "陈玉华", "女", "姜媛", "女", "魏立平", "女", "张萍", "男", "来辉", "女", "陈秀玫", "男", "石岩", "男", "王洪捍", "男", "张树军", "女", "李亚琴", "女", "王凤", "女", "王珊华", "女", "杨丹丹", "女", "教黎明", "女", "修晶", "女", "丁晓霞", "女", "张丽", "女", "郭素兰", "女", "徐艳丽", "女", "任子英", "女", "胡雁", "女", "彭洪亮", "女", "高玉珍", "女", "王玉姝", "男", "郑伟", "女", "姜春玲", "女", "张伟", "女", "王颖", "女", "金萍", "男", "孙望", "男", "闫宝东", "男", "周相永", "女", "杨美娜", "女", "欧立新", "女", "刘宝霞", "女", "刘艳杰", "女", "宋艳平", "男", "李克", "女", "梁翠", "女", "宗宏伟", "女", "刘国伟", "女", "敖志敏", "女", "尹玲" }; + string[] EMAIL_NAMES = { "qq.com", "gmail.com", "163.com", "126.com", "outlook.com", "foxmail.com" }; + + var users = new List<User>(); + var rdm = new Random(); + + for (int i = 0, count = USER_NAMES.Length; i < count; i += 2) + { + string gender = USER_NAMES[i]; + string chineseName = USER_NAMES[i + 1]; + string userName = "user" + i.ToString(); + + users.Add(new User + { + Name = userName, + Gender = gender, + Password = PasswordUtil.CreateDbPassword(userName), + ChineseName = chineseName, + Email = userName + "@" + EMAIL_NAMES[rdm.Next(0, EMAIL_NAMES.Length)], + Enabled = true, + CreateTime = DateTime.Now + }); + } + + // 添加超级管理员 + users.Add(new User + { + Name = "admin", + Gender = "男", + Password = PasswordUtil.CreateDbPassword("admin"), + ChineseName = "超级管理员", + Email = "admin@examples.com", + Enabled = true, + CreateTime = DateTime.Now + }); + + return users; + } + + + private static List<Dept> GetDepts() + { + var depts = new List<Dept> { + new Dept + { + Name = "研发部", + SortIndex = 1, + Remark = "顶级部门", + Children = new List<Dept> { + new Dept + { + Name = "开发部", + SortIndex = 1, + Remark = "二级部门" + }, + new Dept + { + Name = "测试部", + SortIndex = 2, + Remark = "二级部门" + } + } + }, + new Dept + { + Name = "销售部", + SortIndex = 2, + Remark = "顶级部门", + Children = new List<Dept> { + new Dept + { + Name = "直销部", + SortIndex = 1, + Remark = "二级部门" + }, + new Dept + { + Name = "渠道部", + SortIndex = 2, + Remark = "二级部门" + } + } + }, + new Dept + { + Name = "客服部", + SortIndex = 3, + Remark = "顶级部门", + Children = new List<Dept> { + new Dept + { + Name = "实施部", + SortIndex = 1, + Remark = "二级部门" + }, + new Dept + { + Name = "售后服务部", + SortIndex = 2, + Remark = "二级部门" + }, + new Dept + { + Name = "大客户服务部", + SortIndex = 3, + Remark = "二级部门" + } + } + }, + new Dept + { + Name = "财务部", + SortIndex = 4, + Remark = "顶级部门" + }, + new Dept + { + Name = "行政部", + SortIndex = 5, + Remark = "顶级部门", + Children = new List<Dept> { + new Dept + { + Name = "人事部", + SortIndex = 1, + Remark = "二级部门" + }, + new Dept + { + Name = "后勤部", + SortIndex = 2, + Remark = "二级部门" + }, + new Dept + { + Name = "运输部", + SortIndex = 3, + Remark = "二级部门", + Children = new List<Dept>{ + new Dept{ + Name = "省内运输部", + SortIndex = 1, + Remark = "三级部门", + }, + new Dept{ + Name = "国内运输部", + SortIndex = 2, + Remark = "三级部门", + }, + new Dept{ + Name = "国际运输部", + SortIndex = 3, + Remark = "三级部门", + } + } + } + } + } + }; + + return depts; + } + + private static List<Config> GetConfigs() + { + var configs = new List<Config> { + new Config + { + ConfigKey = "Title", + ConfigValue = "AppBox - 通用权限管理框架", + Remark = "网站的标题" + }, + new Config + { + ConfigKey = "PageSize", + ConfigValue = "20", + Remark = "表格每页显示的个数" + }, + new Config + { + ConfigKey = "MenuType", + ConfigValue = "tree", + Remark = "左侧菜单样式" + }, + new Config + { + ConfigKey = "Theme", + ConfigValue = "Neptune", + Remark = "网站主题" + }, + new Config + { + ConfigKey = "HelpList", + ConfigValue = "[{\"Text\":\"万年历\",\"Icon\":\"Calendar\",\"ID\":\"wannianli\",\"URL\":\"~/admin/help/wannianli.htm\"},{\"Text\":\"科学计算器\",\"Icon\":\"Calculator\",\"ID\":\"jisuanqi\",\"URL\":\"~/admin/help/jisuanqi.htm\"},{\"Text\":\"系统帮助\",\"Icon\":\"Help\",\"ID\":\"help\",\"URL\":\"~/admin/help/help.htm\"}]", + Remark = "帮助下拉列表的JSON字符串" + } + }; + + return configs; + } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/AppBoxEntity/Config.cs b/北京北汽/SCP/Models/AppBoxEntity/Config.cs new file mode 100644 index 0000000..4defeaa --- /dev/null +++ b/北京北汽/SCP/Models/AppBoxEntity/Config.cs @@ -0,0 +1,19 @@ +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class Config : IKeyID + { + [Key] + public int ID { get; set; } + + [Required, StringLength(50)] + public string ConfigKey { get; set; } + + [Required, StringLength(4000)] + public string ConfigValue { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/AppBoxEntity/Dept.cs b/北京北汽/SCP/Models/AppBoxEntity/Dept.cs new file mode 100644 index 0000000..38ec31b --- /dev/null +++ b/北京北汽/SCP/Models/AppBoxEntity/Dept.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class Dept : ICustomTree, IKeyID, ICloneable + { + [Key] + public int ID { get; set; } + + [Required, StringLength(50)] + public string Name { get; set; } + + [Required] + public int SortIndex { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + + + + public virtual Dept Parent { get; set; } + public virtual ICollection<Dept> Children { get; set; } + + + public virtual ICollection<User> Users { get; set; } + + + + /// <summary> + /// 菜单在树形结构中的层级(从0开始) + /// </summary> + [NotMapped] + public int TreeLevel { get; set; } + + /// <summary> + /// 是否可用(默认true),在模拟树的下拉列表中使用 + /// </summary> + [NotMapped] + public bool Enabled { get; set; } + + /// <summary> + /// 是否叶子节点(默认true) + /// </summary> + [NotMapped] + public bool IsTreeLeaf { get; set; } + + + public object Clone() + { + Dept dept = new Dept + { + ID = ID, + Name = Name, + Remark = Remark, + SortIndex = SortIndex, + TreeLevel = TreeLevel, + Enabled = Enabled, + IsTreeLeaf = IsTreeLeaf + }; + return dept; + } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/AppBoxEntity/ExcelImportEntity/APPBOX_USER_EXCEL.cs b/北京北汽/SCP/Models/AppBoxEntity/ExcelImportEntity/APPBOX_USER_EXCEL.cs new file mode 100644 index 0000000..d8be529 --- /dev/null +++ b/北京北汽/SCP/Models/AppBoxEntity/ExcelImportEntity/APPBOX_USER_EXCEL.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.AppBoxEntity.ExcelImportEntity +{ + public class APPBOX_USER_EXCEL + { + public string 登录名称 {set;get;} + public string 密码 {set;get;} + public string 电子邮件 {set;get;} + public string 性别 {set;get;} + public string 姓名 {set;get;} + public string 英文名称 {set;get;} + public string QQ {set;get;} + public string 办公电话 {set;get;} + public string 家庭电话 {set;get;} + public string 移动电话 {set;get;} + public string 单位地址 {set;get;} + public string 供应商编号{set;get;} + public string 备注 {set;get;} + public string 所属地点 { set; get; } + + } +} diff --git a/北京北汽/SCP/Models/AppBoxEntity/ICustomTree.cs b/北京北汽/SCP/Models/AppBoxEntity/ICustomTree.cs new file mode 100644 index 0000000..f210148 --- /dev/null +++ b/北京北汽/SCP/Models/AppBoxEntity/ICustomTree.cs @@ -0,0 +1,25 @@ +namespace CK.SCP.Models.AppBoxEntity +{ + public interface ICustomTree + { + /// <summary> + /// 名称 + /// </summary> + string Name { get; set; } + + /// <summary> + /// 菜单在树形结构中的层级(从0开始) + /// </summary> + int TreeLevel { get; set; } + + /// <summary> + /// 是否可用(默认true),在模拟树的下拉列表中使用 + /// </summary> + bool Enabled { get; set; } + + /// <summary> + /// 是否叶子节点(默认true) + /// </summary> + bool IsTreeLeaf { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/AppBoxEntity/IKeyID.cs b/北京北汽/SCP/Models/AppBoxEntity/IKeyID.cs new file mode 100644 index 0000000..195ea0d --- /dev/null +++ b/北京北汽/SCP/Models/AppBoxEntity/IKeyID.cs @@ -0,0 +1,8 @@ +namespace CK.SCP.Models.AppBoxEntity +{ + public interface IKeyID + { + int ID { get; set; } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/AppBoxEntity/Log.cs b/北京北汽/SCP/Models/AppBoxEntity/Log.cs new file mode 100644 index 0000000..dde1f17 --- /dev/null +++ b/北京北汽/SCP/Models/AppBoxEntity/Log.cs @@ -0,0 +1,26 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class Log : IKeyID + { + [Key] + public int ID { get; set; } + + [StringLength(20)] + public string Level { get; set; } + + [StringLength(200)] + public string Logger { get; set; } + + [StringLength(4000)] + public string Message { get; set; } + + [StringLength(4000)] + public string Exception { get; set; } + + public DateTime LogTime { get; set; } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/AppBoxEntity/Menu.cs b/北京北汽/SCP/Models/AppBoxEntity/Menu.cs new file mode 100644 index 0000000..5be6f46 --- /dev/null +++ b/北京北汽/SCP/Models/AppBoxEntity/Menu.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class Menu : ICustomTree, IKeyID, ICloneable + { + [Key] + public int ID { get; set; } + + [Required, StringLength(50)] + public string Name { get; set; } + + [StringLength(200)] + public string ImageUrl { get; set; } + + [StringLength(200)] + public string NavigateUrl { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + + [Required] + public int SortIndex { get; set; } + + + public virtual Menu Parent { get; set; } + public virtual ICollection<Menu> Children { get; set; } + + + + public virtual Power ViewPower {get; set;} + + + + + /// <summary> + /// 菜单在树形结构中的层级(从0开始) + /// </summary> + [NotMapped] + public int TreeLevel { get; set; } + + /// <summary> + /// 是否可用(默认true),在模拟树的下拉列表中使用 + /// </summary> + [NotMapped] + public bool Enabled { get; set; } + + /// <summary> + /// 是否叶子节点(默认true) + /// </summary> + [NotMapped] + public bool IsTreeLeaf { get; set; } + + + public object Clone() + { + Menu menu = new Menu { + ID = ID, + Name = Name, + ImageUrl = ImageUrl, + NavigateUrl = NavigateUrl, + Remark = Remark, + SortIndex = SortIndex, + TreeLevel = TreeLevel, + Enabled = Enabled, + IsTreeLeaf = IsTreeLeaf + }; + return menu; + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/AppBoxEntity/Online.cs b/北京北汽/SCP/Models/AppBoxEntity/Online.cs new file mode 100644 index 0000000..f2c7a82 --- /dev/null +++ b/北京北汽/SCP/Models/AppBoxEntity/Online.cs @@ -0,0 +1,23 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class Online : IKeyID + { + [Key] + public int ID { get; set; } + + [StringLength(50)] + public string IPAdddress { get; set; } + + public DateTime LoginTime { get; set; } + + public DateTime? UpdateTime { get; set; } + + + public virtual User User { get; set; } + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/AppBoxEntity/PasswordUtil.cs b/北京北汽/SCP/Models/AppBoxEntity/PasswordUtil.cs new file mode 100644 index 0000000..4ccace8 --- /dev/null +++ b/北京北汽/SCP/Models/AppBoxEntity/PasswordUtil.cs @@ -0,0 +1,119 @@ +using System; +using System.Security.Cryptography; + +namespace CK.SCP.Models.AppBoxEntity +{ + /// <summary> + /// û룬ȽǷһµ + /// </summary> + public class PasswordUtil + { + #region field & constructor + + //private static readonly Log _log = new Log(typeof(PasswordUtil)); + + private const int saltLength = 4; + + public PasswordUtil() { } + + #endregion + + /// <summary> + /// ԱûǷͼܺһ + /// </summary> + /// <param name="dbPassword">ݿеܺ</param> + /// <param name="userPassword">û</param> + /// <returns></returns> + public static bool ComparePasswords(string dbPassword,string userPassword) + { + byte[] dbPwd = Convert.FromBase64String(dbPassword); + + byte[] hashedPwd = HashString(userPassword); + + if(dbPwd.Length ==0 || hashedPwd.Length ==0 || dbPwd.Length !=hashedPwd.Length + saltLength) + { + return false; + } + + byte[] saltValue = new byte[saltLength]; + // int saltOffset = dbPwd.Length - hashedPwd.Length; + int saltOffset = hashedPwd.Length; + for (int i = 0; i < saltLength; i++) + saltValue[i] = dbPwd[saltOffset + i]; + + byte[] saltedPassword = CreateSaltedPassword(saltValue, hashedPwd); + + // compare the values + return CompareByteArray(dbPwd, saltedPassword); + + + } + + /// <summary> + /// ûݿ + /// </summary> + /// <param name="password"></param> + /// <returns></returns> + public static string CreateDbPassword(string userPassword) + { + byte[] unsaltedPassword = HashString(userPassword); + + //Create a salt value + byte[] saltValue = new byte[saltLength]; + RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider(); + rng.GetBytes(saltValue); + + byte[] saltedPassword = CreateSaltedPassword(saltValue, unsaltedPassword); + + return Convert.ToBase64String(saltedPassword); + + } + + #region ˽к + /// <summary> + /// һַϣ + /// </summary> + /// <param name="str"></param> + /// <returns></returns> + private static byte[] HashString(string str) + { + byte[] pwd = System.Text.Encoding.UTF8.GetBytes(str); + + SHA1 sha1 = SHA1.Create(); + byte[] saltedPassword = sha1.ComputeHash(pwd); + return saltedPassword; + } + private static bool CompareByteArray(byte[] array1, byte[] array2) + { + if (array1.Length != array2.Length) + return false; + for (int i = 0; i < array1.Length; i++) + { + if (array1[i] != array2[i]) + return false; + } + return true; + } + // create a salted password given the salt value + private static byte[] CreateSaltedPassword(byte[] saltValue, byte[] unsaltedPassword) + { + // add the salt to the hash + byte[] rawSalted = new byte[unsaltedPassword.Length + saltValue.Length]; + unsaltedPassword.CopyTo(rawSalted,0); + saltValue.CopyTo(rawSalted,unsaltedPassword.Length); + + //Create the salted hash + SHA1 sha1 = SHA1.Create(); + byte[] saltedPassword = sha1.ComputeHash(rawSalted); + + // add the salt value to the salted hash + byte[] dbPassword = new byte[saltedPassword.Length + saltValue.Length]; + saltedPassword.CopyTo(dbPassword,0); + saltValue.CopyTo(dbPassword,saltedPassword.Length); + + return dbPassword; + } + #endregion + + } +} diff --git a/北京北汽/SCP/Models/AppBoxEntity/Power.cs b/北京北汽/SCP/Models/AppBoxEntity/Power.cs new file mode 100644 index 0000000..76bef50 --- /dev/null +++ b/北京北汽/SCP/Models/AppBoxEntity/Power.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class Power : IKeyID + { + [Key] + public int ID { get; set; } + + [Required, StringLength(50)] + public string Name { get; set; } + + [StringLength(50)] + public string GroupName { get; set; } + + [StringLength(200)] + public string Title { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + + + public virtual ICollection<Role> Roles { get; set; } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/AppBoxEntity/Role.cs b/北京北汽/SCP/Models/AppBoxEntity/Role.cs new file mode 100644 index 0000000..e2b46e7 --- /dev/null +++ b/北京北汽/SCP/Models/AppBoxEntity/Role.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class Role : IKeyID + { + [Key] + public int ID { get; set; } + + [Required, StringLength(50)] + public string Name { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + + + public virtual ICollection<User> Users { get; set; } + + + public virtual ICollection<Power> Powers { get; set; } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/AppBoxEntity/RoleUsers.cs b/北京北汽/SCP/Models/AppBoxEntity/RoleUsers.cs new file mode 100644 index 0000000..9b0e35f --- /dev/null +++ b/北京北汽/SCP/Models/AppBoxEntity/RoleUsers.cs @@ -0,0 +1,15 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class RoleUsers + { + [Key] + public int RoleID { get; set; } + + [Key] + public int UserID { get; set; } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/AppBoxEntity/TA_ADDRESS.cs b/北京北汽/SCP/Models/AppBoxEntity/TA_ADDRESS.cs new file mode 100644 index 0000000..8a95be1 --- /dev/null +++ b/北京北汽/SCP/Models/AppBoxEntity/TA_ADDRESS.cs @@ -0,0 +1,43 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.AppBoxEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + using CK.SCP.Models.AppBoxEntity; + + public partial class TA_ADDRESS:IKeyID + { + + [StringLength(50)] + public string ADDRESS_NO { get; set; } + [StringLength(50)] + public string REGION { get; set; } + [StringLength(50)] + public string ACCOUNTING_UNIT { get; set; } + [StringLength(50)] + public string ADDRESS_DESCRIPTION { get; set; } + [Key] + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int ID { get; set; } + [StringLength(50)] + public string FactoryId { get; set; } + [StringLength(50)] + public string EXTEND2 { get; set; } + [StringLength(50)] + public string EXTEND3 { get; set; } + [StringLength(50)] + public string EXTEND4 { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/AppBoxEntity/TA_FACTORY.cs b/北京北汽/SCP/Models/AppBoxEntity/TA_FACTORY.cs new file mode 100644 index 0000000..ddbd348 --- /dev/null +++ b/北京北汽/SCP/Models/AppBoxEntity/TA_FACTORY.cs @@ -0,0 +1,48 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.AppBoxEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + using CK.SCP.Models.ScpEntity; + + public partial class TA_FACTORY:RecordEntity,IKeyID + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int ID { get; set; } + + + [StringLength(50)] + public string FactoryId { get; set; } + [StringLength(50)] + public string FactoryName { get; set; } + [StringLength(50)] + public string ErpSite { get; set; } + [StringLength(50)] + public string ErpDomain { get; set; } + [StringLength(50)] + public string Address { get; set; } + [StringLength(50)] + public string ZipCode { get; set; } + public int State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + [StringLength(50)] + public string Tel { get; set; } + [StringLength(50)] + public string Fax { get; set; } + public virtual ICollection<User> Users { get; set; } + + + } +} diff --git a/北京北汽/SCP/Models/AppBoxEntity/Title.cs b/北京北汽/SCP/Models/AppBoxEntity/Title.cs new file mode 100644 index 0000000..8927aed --- /dev/null +++ b/北京北汽/SCP/Models/AppBoxEntity/Title.cs @@ -0,0 +1,23 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class Title : IKeyID + { + [Key] + public int ID { get; set; } + + [Required, StringLength(50)] + public string Name { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + + + public virtual ICollection<User> Users { get; set; } + + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/AppBoxEntity/User.cs b/北京北汽/SCP/Models/AppBoxEntity/User.cs new file mode 100644 index 0000000..adccd72 --- /dev/null +++ b/北京北汽/SCP/Models/AppBoxEntity/User.cs @@ -0,0 +1,108 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.ScpEntity; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class User : IKeyID + { + [Key] + public int ID { get; set; } + + [Required, StringLength(50)] + public string Name { get; set; } + + [Required, StringLength(100)] + public string Email { get; set; } + + [Required, StringLength(50)] + public string Password { get; set; } + + [Required] + public bool Enabled { get; set; } + + [StringLength(10)] + public string Gender { get; set; } + + [StringLength(100)] + public string ChineseName { get; set; } + + [StringLength(100)] + public string EnglishName { get; set; } + + [StringLength(200)] + public string Photo { get; set; } + + [StringLength(50)] + public string QQ { get; set; } + + [StringLength(100)] + public string CompanyEmail { get; set; } + + [StringLength(50)] + public string OfficePhone { get; set; } + + [StringLength(50)] + public string OfficePhoneExt { get; set; } + + [StringLength(50)] + public string HomePhone { get; set; } + + [StringLength(50)] + public string CellPhone { get; set; } + + [StringLength(500)] + public string Address { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + + [StringLength(500)] + public string SupplierCode { get; set; } + + [NotMapped] + [StringLength(500)] + public string VendName { get; set; } + + [StringLength(50)] + public string IdentityCard { get; set; } + + + + + public DateTime? Birthday { get; set; } + public DateTime? TakeOfficeTime { get; set; } + public DateTime? LastLoginTime { get; set; } + public DateTime? CreateTime { get; set; } + + public virtual ICollection<TA_FACTORY> TA_FACTORY { get; set; } + /* + public virtual ICollection<FACTORY_ADDRESS> FACTORY_ADDRESS { get; set; } + */ + public virtual ICollection<Role> Roles { get; set; } + public virtual ICollection<Title> Titles { get; set; } + + public virtual Dept Dept { get; set; } + + [NotMapped] + public List<string> VenderList { set; get; } + [NotMapped] + public List<string> FactoryList { set; get; } + [NotMapped] + public List<string> PowerList { set; get; } + [NotMapped] + public List<string> RoleList { set; get; } + [NotMapped] + public Dictionary<string,string> ConfigList { set; get; } + + [NotMapped] + public List<string> SubSiteList { set; get; } + [NotMapped] + public string UsedDomain { set; get; } + + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/AppBoxEntity/VenderUsers.cs b/北京北汽/SCP/Models/AppBoxEntity/VenderUsers.cs new file mode 100644 index 0000000..bb408a8 --- /dev/null +++ b/北京北汽/SCP/Models/AppBoxEntity/VenderUsers.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.AppBoxEntity +{ + public class VenderUsers + { + [Key] + public int Id { set; get; } + public int UserId { set; get; } + [Required, StringLength(50)] + public string VenderId { set; get; } + + + } +} diff --git a/北京北汽/SCP/Models/Attributes/BaseTableValidation.cs b/北京北汽/SCP/Models/Attributes/BaseTableValidation.cs new file mode 100644 index 0000000..6163b45 --- /dev/null +++ b/北京北汽/SCP/Models/Attributes/BaseTableValidation.cs @@ -0,0 +1,13 @@ +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.Attributes +{ + public class BaseTableValidation + { + public static ValidationResult IsNullOrEmpty(string value, string error) + { + if (string.IsNullOrEmpty(value)) return new ValidationResult(error); + return ValidationResult.Success; + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Attributes/ColumnSource.cs b/北京北汽/SCP/Models/Attributes/ColumnSource.cs new file mode 100644 index 0000000..bb31bac --- /dev/null +++ b/北京北汽/SCP/Models/Attributes/ColumnSource.cs @@ -0,0 +1,61 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.Attributes +{ + /// <summary> + /// 列来源属于 + /// </summary> + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] + public class ColumnSource : Attribute + { + /// <summary> + /// </summary> + /// <param name="sourceType">列来源。ENUM:枚举数据源.TABLE表数据源(外键关系)</param> + /// <param name="typeName">来源数据源类型</param> + /// <param name="columnNames"> + /// sourceType为TABLE时,columName是对应表中的列名 + /// columnNames[0]: ValueMember ,colums[1]:DisplayMember + public ColumnSource(ColumnSourceType sourceType, Type typeName, string[] columnNames = null, + string selector = null) + { + SourceType = sourceType; + TypeName = typeName; + ColumnNames = columnNames; + Selector = selector; + } + + + public ColumnSourceType SourceType { get; } + + /// <summary>获取或设置属性映射到的列的从零开始的顺序。</summary> + /// <returns>列的顺序。</returns> + public Type TypeName { get; } + + /// <summary>获取或设置该属性映射到的列的数据库提供程序特定的数据类型。</summary> + /// <returns>属性将映射到的列的数据库提供程序特定数据类型。</returns> + [StringLength(50)] + public string[] ColumnNames { get; } + + [StringLength(50)] + public string Selector { get; set; } + } + + public enum ColumnSourceType + { + /// <summary> + /// 枚举数据源 + /// </summary> + ENUM = 1, + + /// <summary> + /// 表数据源 + /// </summary> + TABLE = 2, + + /// <summary> + /// bool类型 + /// </summary> + Boolean = 4 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Attributes/Converter.cs b/北京北汽/SCP/Models/Attributes/Converter.cs new file mode 100644 index 0000000..d83e60a --- /dev/null +++ b/北京北汽/SCP/Models/Attributes/Converter.cs @@ -0,0 +1,21 @@ +using System; + +namespace CK.SCP.Models.Attributes +{ + /// <summary> + /// Converter属性 + /// </summary> + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] + public class ConverterAttribute : Attribute + { + public ConverterAttribute(Type converterType) + { + ConverterType = converterType; + } + + /// <summary> + /// Converter类型 + /// </summary> + public Type ConverterType { get; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Attributes/DataGridColum.cs b/北京北汽/SCP/Models/Attributes/DataGridColum.cs new file mode 100644 index 0000000..0631220 --- /dev/null +++ b/北京北汽/SCP/Models/Attributes/DataGridColum.cs @@ -0,0 +1,19 @@ +using System; + +namespace CK.SCP.Models.Attributes +{ + /// <summary> + /// 是否在DataGrid中显示 + /// </summary> + public class IsDataGridColum : Attribute + { + public IsDataGridColum(bool isShow, int displayOrder) + { + IsShowInDataGrid = isShow; + DisplayOrder = displayOrder; + } + + public bool IsShowInDataGrid { get; set; } + public int DisplayOrder { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Attributes/Unique.cs b/北京北汽/SCP/Models/Attributes/Unique.cs new file mode 100644 index 0000000..ab2da48 --- /dev/null +++ b/北京北汽/SCP/Models/Attributes/Unique.cs @@ -0,0 +1,14 @@ +using System; + +namespace CK.SCP.Models.Attributes +{ + public class Unique : Attribute + { + public Unique(bool isUnique) + { + IsUnique = isUnique; + } + + public bool IsUnique { get; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Base/IData.cs b/北京北汽/SCP/Models/Base/IData.cs new file mode 100644 index 0000000..3daa1a1 --- /dev/null +++ b/北京北汽/SCP/Models/Base/IData.cs @@ -0,0 +1,11 @@ +using System; +using System.ComponentModel; + +namespace CK.SCP.Models.Base +{ + public interface IData : ITaskTable + { + [Description("数据编号")] + Guid DataID { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Base/IDomain.cs b/北京北汽/SCP/Models/Base/IDomain.cs new file mode 100644 index 0000000..f43f6b3 --- /dev/null +++ b/北京北汽/SCP/Models/Base/IDomain.cs @@ -0,0 +1,10 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Base +{ + public interface IDomain + { + [Description("域")] + string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Base/IDomainSite.cs b/北京北汽/SCP/Models/Base/IDomainSite.cs new file mode 100644 index 0000000..82c3654 --- /dev/null +++ b/北京北汽/SCP/Models/Base/IDomainSite.cs @@ -0,0 +1,10 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Base +{ + public interface IDomainSite : IDomain + { + [Description("地点")] + string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Base/ISoftDelete.cs b/北京北汽/SCP/Models/Base/ISoftDelete.cs new file mode 100644 index 0000000..176c3a9 --- /dev/null +++ b/北京北汽/SCP/Models/Base/ISoftDelete.cs @@ -0,0 +1,10 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Base +{ + public interface ISoftDelete + { + [Description("软删除")] + bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Base/ITable.cs b/北京北汽/SCP/Models/Base/ITable.cs new file mode 100644 index 0000000..fdb451d --- /dev/null +++ b/北京北汽/SCP/Models/Base/ITable.cs @@ -0,0 +1,27 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.Base +{ + public interface ITable + { + [Key] + [Description("主键")] + Guid GUID { get; set; } + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Description("自增长编号")] + int UID { get; set; } + + [Description("创建人")] + string CreateUser { get; set; } + + [Description("创建时间")] + DateTime CreateTime { get; set; } + + [Description("备注")] + string Remark { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Base/ITaskTable.cs b/北京北汽/SCP/Models/Base/ITaskTable.cs new file mode 100644 index 0000000..04849ce --- /dev/null +++ b/北京北汽/SCP/Models/Base/ITaskTable.cs @@ -0,0 +1,21 @@ +using System; +using System.ComponentModel; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.Base +{ + public interface ITaskTable : ITable, IDomainSite + { + [Description("任务编号")] + Guid TaskID { get; set; } + + /// <summary> + /// A:Add,R:Read,U:Update,D:Delete + /// </summary> + [Description("命令类型")] + string CommandType { get; set; } + + [Description("数据编号")] + Guid DataID { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Base/IUpdatableTable.cs b/北京北汽/SCP/Models/Base/IUpdatableTable.cs new file mode 100644 index 0000000..016ddea --- /dev/null +++ b/北京北汽/SCP/Models/Base/IUpdatableTable.cs @@ -0,0 +1,16 @@ +using System; + +namespace CK.SCP.Models.Base +{ + public interface IUpdatableTable : ITable + { + string UpdateUser { get; set; } + + DateTime? UpdateTime { get; set; } + } + + public interface IEnable + { + bool Enable { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/BillHelper.cs b/北京北汽/SCP/Models/BillHelper.cs new file mode 100644 index 0000000..244b753 --- /dev/null +++ b/北京北汽/SCP/Models/BillHelper.cs @@ -0,0 +1,17 @@ +using System; +using System.Linq; +using ChangKeTec.Wms.Models.Wms; +using CK.SCP.Models; + +namespace ChangKeTec.Wms.Models +{ + public class BillHelper + { + public static DateTime? GetBillTime( string billNum) + { + WmsEntities db = EntitiesFactory.CreateWmsInstance(); + var bill = db.TB_BILL.FirstOrDefault(p => p.BillNum == billNum); + return bill?.BillTime; + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/CK.SCP.Models.csproj b/北京北汽/SCP/Models/CK.SCP.Models.csproj new file mode 100644 index 0000000..6b7e46e --- /dev/null +++ b/北京北汽/SCP/Models/CK.SCP.Models.csproj @@ -0,0 +1,752 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{74DCE5F2-A501-45F2-B4F9-494AA1867226}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>CK.SCP.Models</RootNamespace> + <AssemblyName>CK.SCP.Models</AssemblyName> + <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> + <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath> + </Reference> + <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> + <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath> + </Reference> + <Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net20\Newtonsoft.Json.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.ComponentModel.DataAnnotations" /> + <Reference Include="System.Core" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Runtime.Serialization" /> + <Reference Include="System.Security" /> + <Reference Include="System.Web" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="AppBoxEntity\AppBoxContext.cs" /> + <Compile Include="AppBoxEntity\AppBoxDatabaseInitializer.cs" /> + <Compile Include="AppBoxEntity\Config.cs" /> + <Compile Include="AppBoxEntity\Dept.cs" /> + <Compile Include="AppBoxEntity\ExcelImportEntity\APPBOX_USER_EXCEL.cs" /> + <Compile Include="AppBoxEntity\RoleUsers.cs" /> + <Compile Include="AppBoxEntity\TA_ADDRESS.cs" /> + <Compile Include="AppBoxEntity\ICustomTree.cs" /> + <Compile Include="AppBoxEntity\IKeyID.cs" /> + <Compile Include="AppBoxEntity\Log.cs" /> + <Compile Include="AppBoxEntity\Menu.cs" /> + <Compile Include="AppBoxEntity\Online.cs" /> + <Compile Include="AppBoxEntity\PasswordUtil.cs" /> + <Compile Include="AppBoxEntity\Power.cs" /> + <Compile Include="AppBoxEntity\Role.cs" /> + <Compile Include="AppBoxEntity\Title.cs" /> + <Compile Include="AppBoxEntity\User.cs" /> + <Compile Include="AppBoxEntity\VenderUsers.cs" /> + <Compile Include="Attributes\BaseTableValidation.cs" /> + <Compile Include="Attributes\ColumnSource.cs" /> + <Compile Include="Attributes\Converter.cs" /> + <Compile Include="Attributes\DataGridColum.cs" /> + <Compile Include="Attributes\Unique.cs" /> + <Compile Include="Base\IData.cs" /> + <Compile Include="Base\IDomain.cs" /> + <Compile Include="Base\IDomainSite.cs" /> + <Compile Include="Base\ISoftDelete.cs" /> + <Compile Include="Base\ITable.cs" /> + <Compile Include="Base\ITaskTable.cs" /> + <Compile Include="Base\IUpdatableTable.cs" /> + <Compile Include="BillHelper.cs" /> + <Compile Include="DataCenterContext.cs" /> + <Compile Include="DataCenterTables\TA_BUTTON.cs" /> + <Compile Include="DataCenterTables\TA_CONFIG.cs" /> + <Compile Include="DataCenterTables\TA_DEPT.cs" /> + <Compile Include="DataCenterTables\TA_MENU.cs" /> + <Compile Include="DataCenterTables\TA_TABLE.cs" /> + <Compile Include="DataCenterTables\TA_TASK.cs" /> + <Compile Include="DataCenterTables\TA_TASK_HIS.cs" /> + <Compile Include="DataCenterTables\TA_USER.cs" /> + <Compile Include="DataCenterTables\TA_USER_BUTTON.cs" /> + <Compile Include="DataCenterTables\TA_USER_MENU.cs" /> + <Compile Include="DataCenterTables\TA_USER_TABLE.cs" /> + <Compile Include="DataCenterTables\TL_DATA_CHANGE.cs" /> + <Compile Include="DataCenterTables\TL_EXCEPTION.cs" /> + <Compile Include="DataCenterTables\TL_LOGIN.cs" /> + <Compile Include="DataCenterTables\TS_ACCOUNT.cs" /> + <Compile Include="DataCenterTables\TS_BOM.cs" /> + <Compile Include="DataCenterTables\TS_CODE.cs" /> + <Compile Include="DataCenterTables\TS_CODE_TYPE.cs" /> + <Compile Include="DataCenterTables\TS_COLOR.cs" /> + <Compile Include="DataCenterTables\TS_COST_CENTER.cs" /> + <Compile Include="DataCenterTables\TS_CUSTOMER.cs" /> + <Compile Include="DataCenterTables\TS_CUSTOMER_PART.cs" /> + <Compile Include="DataCenterTables\TS_CUSTOMER_TYPE.cs" /> + <Compile Include="DataCenterTables\TS_DEPARTMENT.cs" /> + <Compile Include="DataCenterTables\TS_DOMAIN.cs" /> + <Compile Include="DataCenterTables\TS_EDI_DATA.cs" /> + <Compile Include="DataCenterTables\TS_ENTITY.cs" /> + <Compile Include="DataCenterTables\TS_LINE.cs" /> + <Compile Include="DataCenterTables\TS_LINE_PART.cs" /> + <Compile Include="DataCenterTables\TS_LOCATION.cs" /> + <Compile Include="DataCenterTables\TS_MES_DATA.cs" /> + <Compile Include="DataCenterTables\TS_PACK.cs" /> + <Compile Include="DataCenterTables\TS_PART_DET.cs" /> + <Compile Include="DataCenterTables\TS_PART_MSTR.cs" /> + <Compile Include="DataCenterTables\TS_PRODUCT_LINE.cs" /> + <Compile Include="DataCenterTables\TS_PROJECT.cs" /> + <Compile Include="DataCenterTables\TS_PURCHASE_PRICE.cs" /> + <Compile Include="DataCenterTables\TS_ROUTING.cs" /> + <Compile Include="DataCenterTables\TS_SALE_PRICE.cs" /> + <Compile Include="DataCenterTables\TS_SHIFT.cs" /> + <Compile Include="DataCenterTables\TS_SITE.cs" /> + <Compile Include="DataCenterTables\TS_STAND_COST_PRICE.cs" /> + <Compile Include="DataCenterTables\TS_SUB_ACCOUNT.cs" /> + <Compile Include="DataCenterTables\TS_SUPPLIER.cs" /> + <Compile Include="DataCenterTables\TS_SUPPLIER_PART.cs" /> + <Compile Include="DataCenterTables\TS_SUPPLIER_TYPE.cs" /> + <Compile Include="DataCenterTables\TS_TEAM.cs" /> + <Compile Include="DataCenterTables\TS_WMS_LOCATION.cs" /> + <Compile Include="DataCenterTables\TS_WORK_CENTER.cs" /> + <Compile Include="DataCenterTables\TT_ACCOUNT.cs" /> + <Compile Include="DataCenterTables\TT_BOM.cs" /> + <Compile Include="DataCenterTables\TT_CODE.cs" /> + <Compile Include="DataCenterTables\TT_CODE_TYPE.cs" /> + <Compile Include="DataCenterTables\TT_COLOR.cs" /> + <Compile Include="DataCenterTables\TT_COST_CENTER.cs" /> + <Compile Include="DataCenterTables\TT_CUSTOMER.cs" /> + <Compile Include="DataCenterTables\TT_CUSTOMER_PART.cs" /> + <Compile Include="DataCenterTables\TT_CUSTOMER_TYPE.cs" /> + <Compile Include="DataCenterTables\TT_DEPARTMENT.cs" /> + <Compile Include="DataCenterTables\TT_DOMAIN.cs" /> + <Compile Include="DataCenterTables\TT_EDI_DATA.cs" /> + <Compile Include="DataCenterTables\TT_ENTITY.cs" /> + <Compile Include="DataCenterTables\TT_LINE.cs" /> + <Compile Include="DataCenterTables\TT_LINE_PART.cs" /> + <Compile Include="DataCenterTables\TT_LOCATION.cs" /> + <Compile Include="DataCenterTables\TT_MES_DATA.cs" /> + <Compile Include="DataCenterTables\TT_PACK.cs" /> + <Compile Include="DataCenterTables\TT_PART_DET.cs" /> + <Compile Include="DataCenterTables\TT_PART_MSTR.cs" /> + <Compile Include="DataCenterTables\TT_PRODUCT_LINE.cs" /> + <Compile Include="DataCenterTables\TT_PROJECT.cs" /> + <Compile Include="DataCenterTables\TT_PURCHASE_PRICE.cs" /> + <Compile Include="DataCenterTables\TT_ROUTING.cs" /> + <Compile Include="DataCenterTables\TT_SALE_PRICE.cs" /> + <Compile Include="DataCenterTables\TT_SHIFT.cs" /> + <Compile Include="DataCenterTables\TT_SITE.cs" /> + <Compile Include="DataCenterTables\TT_STAND_COST_PRICE.cs" /> + <Compile Include="DataCenterTables\TT_SUB_ACCOUNT.cs" /> + <Compile Include="DataCenterTables\TT_SUPPLIER.cs" /> + <Compile Include="DataCenterTables\TT_SUPPLIER_PART.cs" /> + <Compile Include="DataCenterTables\TT_SUPPLIER_TYPE.cs" /> + <Compile Include="DataCenterTables\TT_TEAM.cs" /> + <Compile Include="DataCenterTables\TT_WMS_LOCATION.cs" /> + <Compile Include="DataCenterTables\TT_WORK_CENTER.cs" /> + <Compile Include="DbSetting.cs" /> + <Compile Include="DecimalPrecisionAttribute.cs" /> + <Compile Include="EntitiesFactory.cs" /> + <Compile Include="EntitiesHelper.cs" /> + <Compile Include="Enums\CellType.cs" /> + <Compile Include="Enums\ConnState.cs" /> + <Compile Include="Enums\DistributionType.cs" /> + <Compile Include="Enums\EnumBaseDataLogType.cs" /> + <Compile Include="Enums\EnumBillState.cs" /> + <Compile Include="Enums\EnumBillType.cs" /> + <Compile Include="Enums\EnumCheckResult.cs" /> + <Compile Include="Enums\EnumCheckState.cs" /> + <Compile Include="Enums\EnumConfigType.cs" /> + <Compile Include="Enums\EnumCqbmptProcess.cs" /> + <Compile Include="Enums\EnumErrorCode.cs" /> + <Compile Include="Enums\EnumFormState.cs" /> + <Compile Include="Enums\EnumInjectionState.cs" /> + <Compile Include="Enums\EnumLoginState.cs" /> + <Compile Include="Enums\EnumManageType.cs" /> + <Compile Include="Enums\EnumPaintState.cs" /> + <Compile Include="Enums\EnumPartKind.cs" /> + <Compile Include="Enums\EnumPartType.cs" /> + <Compile Include="Enums\EnumStockState.cs" /> + <Compile Include="Enums\EnumStoreArea.cs" /> + <Compile Include="Enums\EnumSubBillType.cs" /> + <Compile Include="Enums\EnumTableName.cs" /> + <Compile Include="Enums\EnumTaskState.cs" /> + <Compile Include="Enums\EnumUserType.cs" /> + <Compile Include="Enums\EqptState.cs" /> + <Compile Include="Enums\ErrorCode.cs" /> + <Compile Include="Enums\InspectResult.cs" /> + <Compile Include="Enums\InvoiceState.cs" /> + <Compile Include="Enums\Item_Type.cs" /> + <Compile Include="Enums\MachineState.cs" /> + <Compile Include="Enums\OrderState.cs" /> + <Compile Include="Enums\OrderType.cs" /> + <Compile Include="Enums\PaintType.cs" /> + <Compile Include="Enums\PlanState.cs" /> + <Compile Include="Enums\BillType.cs" /> + <Compile Include="Enums\CollectionStepFinish.cs" /> + <Compile Include="Enums\ControlType.cs" /> + <Compile Include="Enums\DataBaseType.cs" /> + <Compile Include="Enums\DataState.cs" /> + <Compile Include="Enums\ProjectName.cs" /> + <Compile Include="Enums\ReceiveBillType.cs" /> + <Compile Include="Enums\SCP_ENUM.cs.cs" /> + <Compile Include="Enums\ShipState.cs" /> + <Compile Include="Enums\TransType.cs" /> + <Compile Include="Enums\UniApiState.cs" /> + <Compile Include="Enums\EquipmentState.cs" /> + <Compile Include="Enums\ErpInterfaceType.cs" /> + <Compile Include="Enums\GroupType.cs" /> + <Compile Include="Enums\InspectionType.cs" /> + <Compile Include="Enums\InspectType.cs" /> + <Compile Include="Enums\InventoryState.cs" /> + <Compile Include="Enums\LocType.cs" /> + <Compile Include="Enums\LoginState.cs" /> + <Compile Include="Enums\LogType.cs" /> + <Compile Include="Enums\ManageType.cs" /> + <Compile Include="Enums\ManufactureProcedureType.cs" /> + <Compile Include="Enums\NotifyType.cs" /> + <Compile Include="Enums\OperateType.cs" /> + <Compile Include="Enums\PartKind.cs" /> + <Compile Include="Enums\PartState.cs" /> + <Compile Include="Enums\PartType.cs" /> + <Compile Include="Enums\PlanDayState.cs" /> + <Compile Include="Enums\PortalType.cs" /> + <Compile Include="Enums\PrintType.cs" /> + <Compile Include="Enums\Project.cs" /> + <Compile Include="Enums\ResultCode.cs" /> + <Compile Include="Enums\ServiceType.cs" /> + <Compile Include="Enums\StockState.cs" /> + <Compile Include="Enums\StockWhereType.cs" /> + <Compile Include="Enums\StopLineType.cs" /> + <Compile Include="Enums\StoreArea.cs" /> + <Compile Include="Enums\SubBillType.cs" /> + <Compile Include="Enums\UniApiType.cs" /> + <Compile Include="Enums\VinState.cs" /> + <Compile Include="Enums\WhseType.cs" /> + <Compile Include="Enums\WorkLineType.cs" /> + <Compile Include="ExchangeCenterContext.cs" /> + <Compile Include="ExchangeCenterTables\TEA_CONFIG.cs" /> + <Compile Include="ExchangeCenterTables\TEA_DATA_ERROR_LOG.cs" /> + <Compile Include="ExchangeCenterTables\TEA_SUBSCRIBE.cs" /> + <Compile Include="ExchangeCenterTables\TEA_SYSTEM.cs" /> + <Compile Include="ExchangeCenterTables\TEA_TABLE.cs" /> + <Compile Include="ExchangeCenterTables\TEA_TASK.cs" /> + <Compile Include="ExchangeCenterTables\TEA_TASK_SUB.cs" /> + <Compile Include="ExchangeCenterTables\TEA_TASK_SUB_HIS.cs" /> + <Compile Include="ExchangeCenterTables\TEA_TASK_SUB_READ_LOG.cs" /> + <Compile Include="ExchangeCenterTables\TED_ASN_DET.cs" /> + <Compile Include="ExchangeCenterTables\TED_ASN_MSTR.cs" /> + <Compile Include="ExchangeCenterTables\TED_ASSEMBLE.cs" /> + <Compile Include="ExchangeCenterTables\TED_BASE.cs" /> + <Compile Include="ExchangeCenterTables\TED_BK_DET.cs" /> + <Compile Include="ExchangeCenterTables\TED_BK_MSTR.cs" /> + <Compile Include="ExchangeCenterTables\TED_CHECK_DET.cs" /> + <Compile Include="ExchangeCenterTables\TED_CHECK_MSTR.cs" /> + <Compile Include="ExchangeCenterTables\TED_FIXED_DET.cs" /> + <Compile Include="ExchangeCenterTables\TED_FIXED_MSTR.cs" /> + <Compile Include="ExchangeCenterTables\TED_INJECTION.cs" /> + <Compile Include="ExchangeCenterTables\TED_INVOICE_ADD.cs" /> + <Compile Include="ExchangeCenterTables\TED_INVOICE_DET.cs" /> + <Compile Include="ExchangeCenterTables\TED_INVOICE_MSTR.cs" /> + <Compile Include="ExchangeCenterTables\TED_ISSUNP_DET.cs" /> + <Compile Include="ExchangeCenterTables\TED_ISSUNP_MSTR.cs" /> + <Compile Include="ExchangeCenterTables\TED_KANBAN_DET.cs" /> + <Compile Include="ExchangeCenterTables\TED_KANBAN_MSTR.cs" /> + <Compile Include="ExchangeCenterTables\TED_LED.cs" /> + <Compile Include="ExchangeCenterTables\TED_MRP_DET.cs" /> + <Compile Include="ExchangeCenterTables\TED_MRP_MSTR.cs" /> + <Compile Include="ExchangeCenterTables\TED_PO_DET.cs" /> + <Compile Include="ExchangeCenterTables\TED_PO_MSTR.cs" /> + <Compile Include="ExchangeCenterTables\TED_PPOD_DET.cs" /> + <Compile Include="ExchangeCenterTables\TED_RCTUNP_DET.cs" /> + <Compile Include="ExchangeCenterTables\TED_RCTUNP_MSTR.cs" /> + <Compile Include="ExchangeCenterTables\TED_RECEIPT_DET.cs" /> + <Compile Include="ExchangeCenterTables\TED_RECEIPT_MSTR.cs" /> + <Compile Include="ExchangeCenterTables\TED_RETURN_DET.cs" /> + <Compile Include="ExchangeCenterTables\TED_RETURN_MSTR.cs" /> + <Compile Include="ExchangeCenterTables\TED_SO_DET.cs" /> + <Compile Include="ExchangeCenterTables\TED_SO_MSTR.cs" /> + <Compile Include="ExchangeCenterTables\TED_SPRAYING.cs" /> + <Compile Include="ExchangeCenterTables\TED_SPRAYING_REPAIR.cs" /> + <Compile Include="ExchangeCenterTables\TED_STOCK.cs" /> + <Compile Include="ExchangeCenterTables\TED_TRANSFER_DET.cs" /> + <Compile Include="ExchangeCenterTables\TED_TRANSFER_MSTR.cs" /> + <Compile Include="ExchangeCenterTables\TES_ACCOUNT.cs" /> + <Compile Include="ExchangeCenterTables\TES_BOM.cs" /> + <Compile Include="ExchangeCenterTables\TES_CODE.cs" /> + <Compile Include="ExchangeCenterTables\TES_CODE_TYPE.cs" /> + <Compile Include="ExchangeCenterTables\TES_COLOR.cs" /> + <Compile Include="ExchangeCenterTables\TES_COST_CENTER.cs" /> + <Compile Include="ExchangeCenterTables\TES_CUSTOMER.cs" /> + <Compile Include="ExchangeCenterTables\TES_CUSTOMER_PART.cs" /> + <Compile Include="ExchangeCenterTables\TES_CUSTOMER_TYPE.cs" /> + <Compile Include="ExchangeCenterTables\TES_DEPARTMENT.cs" /> + <Compile Include="ExchangeCenterTables\TES_DOMAIN.cs" /> + <Compile Include="ExchangeCenterTables\TES_EDI_DATA.cs" /> + <Compile Include="ExchangeCenterTables\TES_ENTITY.cs" /> + <Compile Include="ExchangeCenterTables\TES_LINE.cs" /> + <Compile Include="ExchangeCenterTables\TES_LINE_PART.cs" /> + <Compile Include="ExchangeCenterTables\TES_LOCATION.cs" /> + <Compile Include="ExchangeCenterTables\TES_MES_DATA.cs" /> + <Compile Include="ExchangeCenterTables\TES_PACK.cs" /> + <Compile Include="ExchangeCenterTables\TES_PART_DET.cs" /> + <Compile Include="ExchangeCenterTables\TES_PART_MSTR.cs" /> + <Compile Include="ExchangeCenterTables\TES_PRODUCT_LINE.cs" /> + <Compile Include="ExchangeCenterTables\TES_PROJECT.cs" /> + <Compile Include="ExchangeCenterTables\TES_PURCHASE_PRICE.cs" /> + <Compile Include="ExchangeCenterTables\TES_ROUTING.cs" /> + <Compile Include="ExchangeCenterTables\TES_SALE_PRICE.cs" /> + <Compile Include="ExchangeCenterTables\TES_SHIFT.cs" /> + <Compile Include="ExchangeCenterTables\TES_SITE.cs" /> + <Compile Include="ExchangeCenterTables\TES_STAND_COST_PRICE.cs" /> + <Compile Include="ExchangeCenterTables\TES_SUB_ACCOUNT.cs" /> + <Compile Include="ExchangeCenterTables\TES_SUPPLIER.cs" /> + <Compile Include="ExchangeCenterTables\TES_SUPPLIER_PART.cs" /> + <Compile Include="ExchangeCenterTables\TES_SUPPLIER_TYPE.cs" /> + <Compile Include="ExchangeCenterTables\TES_TEAM.cs" /> + <Compile Include="ExchangeCenterTables\TES_WMS_LOCATION.cs" /> + <Compile Include="ExchangeCenterTables\TES_WORK_CENTER.cs" /> + <Compile Include="GlobalConfig.cs" /> + <Compile Include="ScpCache.cs" /> + <Compile Include="ScpEntity\ExcelExportEnttity\SCP_ARRIVE_DETAIL_EXPORT.cs" /> + <Compile Include="ScpEntity\ExcelExportEnttity\SCP_ARRIVE_EXPORT.cs" /> + <Compile Include="ScpEntity\ExcelExportEnttity\SCP_FORECAST_EXPORT.cs" /> + <Compile Include="ScpEntity\ExcelExportEnttity\SCP_MOLDSHARING_EXPORT.cs" /> + <Compile Include="ScpEntity\ExcelExportEnttity\SCP_PART_EXPORT.cs" /> + <Compile Include="ScpEntity\ExcelExportEnttity\SCP_PO_REPORT.cs" /> + <Compile Include="ScpEntity\ExcelExportEnttity\SCP_PRICE_EXPORT.cs" /> + <Compile Include="ScpEntity\ExcelExportEnttity\SCP_VENDER_EXPORT.cs" /> + <Compile Include="ScpEntity\ExcelExportEnttity\SCP_VENDER_PART_EXPORT.cs" /> + <Compile Include="ScpEntity\ExcelImportEntity\SCP_ASN_EXCEL.cs" /> + <Compile Include="ScpEntity\ExcelImportEntity\SCP_PRICE_EXCEL.cs" /> + <Compile Include="ScpEntity\TA_LOGINNUMBER.cs" /> + <Compile Include="ScpEntity\TA_MoldSharing.cs" /> + <Compile Include="ScpEntity\TA_MOLDSHARING_INVOICE.cs" /> + <Compile Include="ScpEntity\TB_ADDRESS.cs" /> + <Compile Include="ScpEntity\TB_Code.cs" /> + <Compile Include="ScpEntity\TB_PALLETS.cs" /> + <Compile Include="ScpEntity\TA_VENDER_EXTEND.cs" /> + <Compile Include="ScpEntity\TB_PO_PLAN.cs" /> + <Compile Include="ScpEntity\TB_RECEIVE_DETAIL_QAD.cs" /> + <Compile Include="ScpEntity\TB_RECEIVE_QAD.cs" /> + <Compile Include="ScpEntity\V_FORECAST_REPORT.cs" /> + <Compile Include="ScpEntity\SCP_OTD_EXPORT.cs" /> + <Compile Include="ScpEntity\TB_FORECAST.cs" /> + <Compile Include="ScpEntity\SCP_SQE.cs" /> + <Compile Include="ScpEntity\TB_PRICE.cs" /> + <Compile Include="ScpEntity\TB_RETURN.cs" /> + <Compile Include="ScpEntity\TB_QUALITY.cs" /> + <Compile Include="ScpEntity\EntityCondition.cs" /> + <Compile Include="ScpEntity\ExcelExportEnttity\SCP_ASK_DETAIL_EXPORT.cs" /> + <Compile Include="ScpEntity\ExcelExportEnttity\SCP_ASK_EXPORT.cs" /> + <Compile Include="ScpEntity\ExcelExportEnttity\SCP_ASN_DETAIL_EXPORT.cs" /> + <Compile Include="ScpEntity\ExcelExportEnttity\SCP_ASN_EXPORT.cs" /> + <Compile Include="ScpEntity\ExcelExportEnttity\SCP_INVOICE_DETAIL_EXPORT.cs" /> + <Compile Include="ScpEntity\ExcelExportEnttity\SCP_PALLET_EXPORT.cs" /> + <Compile Include="ScpEntity\ExcelExportEnttity\SCP_PO_DETAIL_EXPORT.cs" /> + <Compile Include="ScpEntity\ExcelExportEnttity\SCP_INVOICE_EXPORT.cs" /> + <Compile Include="ScpEntity\ExcelExportEnttity\SCP_PO_EXPORT.cs" /> + <Compile Include="ScpEntity\ExcelImportEntity\SCP_CONTRACT_EXCEL.cs" /> + <Compile Include="ScpEntity\ExcelImportEntity\SCP_PO_EXCEL.cs" /> + <Compile Include="ScpEntity\QadOrder.cs" /> + <Compile Include="ScpEntity\RecordEntity.cs" /> + <Compile Include="ScpEntity\TA_BillNoType.cs" /> + <Compile Include="AppBoxEntity\TA_FACTORY.cs" /> + <Compile Include="ScpEntity\TB_PALLET.cs" /> + <Compile Include="ScpEntity\TB_PALLET_DETAIL.cs" /> + <Compile Include="ScpEntity\TS_BARCODE_CUSTOM.cs" /> + <Compile Include="ScpEntity\TS_BARCODE_RULE_CUSTOM.cs" /> + <Compile Include="ScpEntity\V_ARRIVE_PRINT.cs" /> + <Compile Include="ScpEntity\V_Pie_Chart.cs" /> + <Compile Include="ScpEntity\V_SUPPLIERS_REGUALARLY.cs" /> + <Compile Include="ScpEntity\V_TA_MOLDSHARING.cs" /> + <Compile Include="ScpEntity\V_TA_VENDER.cs" /> + <Compile Include="ScpEntity\TB_FACTORY.cs" /> + <Compile Include="ScpEntity\TA_INFO.cs" /> + <Compile Include="ScpEntity\TA_LANGUAGE.cs" /> + <Compile Include="ScpEntity\TA_Part_User.cs" /> + <Compile Include="ScpEntity\TA_REVICE_PORT.cs" /> + <Compile Include="ScpEntity\TA_VEND_USER.cs" /> + <Compile Include="ScpEntity\TB_ASK.cs" /> + <Compile Include="ScpEntity\TB_ASK_DETAIL.cs" /> + <Compile Include="ScpEntity\TB_ASN.cs" /> + <Compile Include="ScpEntity\TB_ASN_DETAIL.cs" /> + <Compile Include="ScpEntity\TB_CONTRACT.cs" /> + <Compile Include="ScpEntity\TB_CONTRACT_DETAIL.cs" /> + <Compile Include="ScpEntity\TB_CONTRACT_DETAIL_PRICE.cs" /> + <Compile Include="ScpEntity\TB_PENING_ITEMS.cs" /> + <Compile Include="ScpEntity\TB_PLAN.cs" /> + <Compile Include="ScpEntity\TB_PlanMonth.cs" /> + <Compile Include="ScpEntity\TB_PLAN_DETAIL.cs" /> + <Compile Include="ScpEntity\TB_PO.cs" /> + <Compile Include="ScpEntity\TB_PO_DETAIL.cs" /> + <Compile Include="ScpEntity\TB_PRINT_COUNT.cs" /> + <Compile Include="ScpEntity\TB_PublicData.cs" /> + <Compile Include="ScpEntity\TB_ARRIVE.cs" /> + <Compile Include="ScpEntity\TB_ARRIVE_DETAIL.cs" /> + <Compile Include="ScpEntity\TB_REJECT.cs" /> + <Compile Include="ScpEntity\TB_REJECT_DETAIL.cs" /> + <Compile Include="ScpEntity\TS_BARCODE_RULE.cs" /> + <Compile Include="ScpEntity\V_ASN_PRINT.cs" /> + <Compile Include="ScpEntity\V_BillShip.cs" /> + <Compile Include="ScpEntity\V_BillShipDetail.cs" /> + <Compile Include="ScpEntity\V_INFO.cs" /> + <Compile Include="ScpEntity\V_PlanMonth.cs" /> + <Compile Include="ScpEntity\V_ReportReceive.cs" /> + <Compile Include="ScpEntity\V_Stock.cs" /> + <Compile Include="ScpEntity\V_TA_LANGUAGE.cs" /> + <Compile Include="ScpEntity\V_TA_VEND_PART.cs" /> + <Compile Include="ScpEntity\V_TB_ARRIVE.cs" /> + <Compile Include="ScpEntity\V_TB_ARRIVE_DETAIL.cs" /> + <Compile Include="ScpEntity\V_TB_ASK.cs" /> + <Compile Include="ScpEntity\V_TB_ASK_DETAIL_PACKAGE.cs" /> + <Compile Include="ScpEntity\V_TB_FORECAST.cs" /> + <Compile Include="ScpEntity\V_TB_INCOMOLETE_DETAIL.cs" /> + <Compile Include="ScpEntity\V_TB_INVOICE_ASK.cs" /> + <Compile Include="ScpEntity\V_TB_PALLET.cs" /> + <Compile Include="ScpEntity\V_TB_PALLET_DETAIL .cs" /> + <Compile Include="ScpEntity\V_TB_INCOMPLETE_ASK.cs" /> + <Compile Include="ScpEntity\V_TB_ASK_DETAIL.cs" /> + <Compile Include="ScpEntity\V_TB_ASN.cs" /> + <Compile Include="ScpEntity\V_TB_ASN_DETAIL.cs" /> + <Compile Include="ScpEntity\V_TB_ASN_DETAILL_VIEW.cs" /> + <Compile Include="ScpEntity\V_TB_INVOICE.cs" /> + <Compile Include="ScpEntity\V_TB_PO.cs" /> + <Compile Include="ScpEntity\V_TB_PO_DETAIL.cs" /> + <Compile Include="ScpEntity\V_TB_PO_DETAIL_CQ.cs" /> + <Compile Include="ScpEntity\V_TB_PRICE_DETAIL.cs" /> + <Compile Include="ScpEntity\V_TB_PRICE.cs" /> + <Compile Include="ScpEntity\V_TB_PRICE_TemporaryPrice.cs" /> + <Compile Include="ScpEntity\V_TB_RETURN.cs" /> + <Compile Include="ScpEntity\V_TB_QUALITY.cs" /> + <Compile Include="ScpEntity\V_TB_RECEIVE.cs" /> + <Compile Include="ScpEntity\V_TB_RECEIVE_DETAIL.cs" /> + <Compile Include="ScpEntity\V_TB_RECEIVE_INVOICE.cs" /> + <Compile Include="ScpEntity\V_TB_RECEIVE_LIST.cs" /> + <Compile Include="ScpEntity\V_TB_REJECT.cs" /> + <Compile Include="ScpEntity\V_TB_REJECT_DETAIL.cs" /> + <Compile Include="ScpEntity\V_TIMELY_DELIVERY.cs" /> + <Compile Include="ScpException.cs" /> + <Compile Include="ScpEntities.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="ScpEntity\TA_BILLTYPE.cs" /> + <Compile Include="ScpEntity\TA_CONFIG.cs" /> + <Compile Include="ScpEntity\TA_PART.cs" /> + <Compile Include="ScpEntity\TA_VENDER.cs" /> + <Compile Include="ScpEntity\TA_VEND_PART.cs" /> + <Compile Include="ScpEntity\TB_INVOICE.cs" /> + <Compile Include="ScpEntity\TB_INVOICE_DETAIL.cs" /> + <Compile Include="ScpEntity\TB_RECEIVE.cs" /> + <Compile Include="ScpEntity\TB_RECEIVE_DETAIL.cs" /> + <Compile Include="ScpEntity\TL_BASEDATA.cs" /> + <Compile Include="ScpEntity\TL_BILL.cs" /> + <Compile Include="ScpEntity\TL_OPER.cs" /> + <Compile Include="ScpEntity\TS_BARCODE.cs" /> + <Compile Include="ScpEntity\TS_STOCK.cs" /> + <Compile Include="ScpEntity\TS_UNI_API.cs" /> + <Compile Include="ScpEntity\TS_UNI_API_HIS.cs" /> + <Compile Include="ScpEntity\TT_CURRENCY.cs" /> + <Compile Include="ScpEntity\TT_PROJECT.cs" /> + <Compile Include="ScpEntity\TT_UNIT.cs" /> + <Compile Include="ScpEntity\TA_FACTORY_CONFIG.cs" /> + <Compile Include="StockIn.cs" /> + <Compile Include="StockOut.cs" /> + <Compile Include="UniApiEntity\xxqad_ppod_det .cs" /> + <Compile Include="UniApiEntity\xxwms_qua_det.cs" /> + <Compile Include="UniApiEntity\IControlTable.cs" /> + <Compile Include="UniApiEntity\IDataTable.cs" /> + <Compile Include="UniApiEntity\ITable.cs" /> + <Compile Include="UniApiEntity\QadTableName.cs" /> + <Compile Include="UniApiEntity\UniApiEntities.cs" /> + <Compile Include="UniApiEntity\UniInterfaceExtention.cs" /> + <Compile Include="UniApiEntity\xxbom_code_mstr.cs" /> + <Compile Include="UniApiEntity\xxbom_ctrl.cs" /> + <Compile Include="UniApiEntity\xxbom_ps_mstr.cs" /> + <Compile Include="UniApiEntity\xxbom_pt_mstr.cs" /> + <Compile Include="UniApiEntity\xxbom_ro_mstr.cs" /> + <Compile Include="UniApiEntity\xxmes_ctrl.cs" /> + <Compile Include="UniApiEntity\xxqad_cm_mstr.cs" /> + <Compile Include="UniApiEntity\xxqad_ctrl.cs" /> + <Compile Include="UniApiEntity\xxqad_ld_det.cs" /> + <Compile Include="UniApiEntity\xxqad_line_mstr.cs" /> + <Compile Include="UniApiEntity\xxqad_loc_det.cs" /> + <Compile Include="UniApiEntity\xxqad_pod_det.cs" /> + <Compile Include="UniApiEntity\xxqad_pprice_det.cs" /> + <Compile Include="UniApiEntity\xxqad_prh_det.cs" /> + <Compile Include="UniApiEntity\xxqad_ps_mstr.cs" /> + <Compile Include="UniApiEntity\xxqad_pt_mstr.cs" /> + <Compile Include="UniApiEntity\xxqad_repsch_det.cs" /> + <Compile Include="UniApiEntity\xxqad_ro_mstr.cs" /> + <Compile Include="UniApiEntity\xxqad_sche_mstr.cs" /> + <Compile Include="UniApiEntity\xxqad_sct_det.cs" /> + <Compile Include="UniApiEntity\xxqad_sod_det.cs" /> + <Compile Include="UniApiEntity\xxqad_sprice_det.cs" /> + <Compile Include="UniApiEntity\xxqad_vd_mstr.cs" /> + <Compile Include="UniApiEntity\xxqad_vp_mstr.cs" /> + <Compile Include="UniApiEntity\xxscm_ctrl.cs" /> + <Compile Include="UniApiEntity\xxscm_inv_det.cs" /> + <Compile Include="UniApiEntity\xxscm_pod_det.cs" /> + <Compile Include="UniApiEntity\xxscm_tx_det.cs" /> + <Compile Include="UniApiEntity\xxscm_tx_mstr.cs" /> + <Compile Include="UniApiEntity\xxwms_arv_det.cs" /> + <Compile Include="UniApiEntity\xxwms_bk_mstr.cs" /> + <Compile Include="UniApiEntity\xxwms_ctrl.cs" /> + <Compile Include="UniApiEntity\xxwms_iss_det.cs" /> + <Compile Include="UniApiEntity\xxwms_ld_det.cs" /> + <Compile Include="UniApiEntity\xxwms_rct_det.cs" /> + <Compile Include="UniApiEntity\xxwms_rc_det.cs" /> + <Compile Include="UniApiEntity\xxwms_review_det.cs" /> + <Compile Include="UniApiEntity\xxwms_rt_det.cs" /> + <Compile Include="UniApiEntity\xxwms_soiss_det.cs" /> + <Compile Include="UniApiEntity\xxwms_tag_det.cs" /> + <Compile Include="UniApiEntity\xxwms_tr_det.cs" /> + <Compile Include="ScpEntity\V_TB_INVOICE_DETAIL.cs" /> + <Compile Include="ScpEntity\V_TA_CONFIG.cs" /> + <Compile Include="VinStockIn.cs" /> + <Compile Include="WmsCache.cs" /> + <Compile Include="WmsConfig.cs" /> + <Compile Include="WmsEntity\CqbmptFilterInfo.cs" /> + <Compile Include="WmsEntity\DecimalPrecisionAttributeConvention.cs" /> + <Compile Include="WmsEntity\EDI_ASN_DETAIL.cs" /> + <Compile Include="WmsEntity\StockWhereCondition.cs" /> + <Compile Include="WmsEntity\TableSchema.cs" /> + <Compile Include="WmsEntity\TableSchema1.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>TableSchema.tt</DependentUpon> + </Compile> + <Compile Include="WmsEntity\TA_BILLTYPE.cs" /> + <Compile Include="WmsEntity\TA_BOM.cs" /> + <Compile Include="WmsEntity\TA_CELL.cs" /> + <Compile Include="WmsEntity\TA_CELL_PART.cs" /> + <Compile Include="WmsEntity\TA_CONFIG.cs" /> + <Compile Include="WmsEntity\TA_CUSTOMER.cs" /> + <Compile Include="WmsEntity\TA_CUST_BOM.cs" /> + <Compile Include="WmsEntity\TA_CUST_PART.cs" /> + <Compile Include="WmsEntity\TA_DELIVER_DEST.cs" /> + <Compile Include="WmsEntity\TA_DEST_LOC.cs" /> + <Compile Include="WmsEntity\TA_ERP_LOC.cs" /> + <Compile Include="WmsEntity\TA_ERP_STANDARD_COST.cs" /> + <Compile Include="WmsEntity\TA_OTHER_INOUT_REASON.cs" /> + <Compile Include="WmsEntity\TA_PART.cs" /> + <Compile Include="WmsEntity\TA_PARTGROUP_INSPECTER.cs" /> + <Compile Include="WmsEntity\TA_PART_UNIT_CONVERSION.cs" /> + <Compile Include="WmsEntity\TA_PAYMENT_DAY.cs" /> + <Compile Include="WmsEntity\TA_PURCHASE_PRICE.cs" /> + <Compile Include="WmsEntity\TA_SALE_PRICE.cs" /> + <Compile Include="WmsEntity\TA_STORE_GROUP.cs" /> + <Compile Include="WmsEntity\TA_STORE_LOCATION.cs" /> + <Compile Include="WmsEntity\TA_STORE_WHSE.cs" /> + <Compile Include="WmsEntity\TA_TEAM.cs" /> + <Compile Include="WmsEntity\TA_VENDER.cs" /> + <Compile Include="WmsEntity\TA_VEND_PART.cs" /> + <Compile Include="WmsEntity\TA_WORKLINE.cs" /> + <Compile Include="WmsEntity\TB_ATTACHMENT.cs"> + <DependentUpon>TableSchema.tt</DependentUpon> + </Compile> + <Compile Include="WmsEntity\TB_BILL.cs" /> + <Compile Include="WmsEntity\TB_CHECK.cs" /> + <Compile Include="WmsEntity\TB_CHECK_DETAIL.cs" /> + <Compile Include="WmsEntity\TB_CHECK_LOC.cs" /> + <Compile Include="WmsEntity\TB_CONTAINER_INOUT.cs" /> + <Compile Include="WmsEntity\TB_DELIVER_ASK.cs" /> + <Compile Include="WmsEntity\TB_DELIVER_PLAN.cs" /> + <Compile Include="WmsEntity\TB_DETAIL.cs" /> + <Compile Include="WmsEntity\TB_EQPT_LOAD.cs" /> + <Compile Include="WmsEntity\TB_INSPECT.cs" /> + <Compile Include="WmsEntity\TB_INSPECT_FAIL.cs" /> + <Compile Include="WmsEntity\TB_MATERIAL_ASK.cs" /> + <Compile Include="WmsEntity\TB_MATERIAL_BACK.cs" /> + <Compile Include="WmsEntity\TB_MATERIAL_RECEIVE.cs" /> + <Compile Include="WmsEntity\TB_MATERIAL_RETURN.cs" /> + <Compile Include="WmsEntity\TB_OFFICE_OUT.cs" /> + <Compile Include="WmsEntity\TB_OFFICE_RECIVE.cs" /> + <Compile Include="WmsEntity\TB_OM_PLAN.cs" /> + <Compile Include="WmsEntity\TB_OTHER_INOUT.cs" /> + <Compile Include="WmsEntity\TB_OTHER_INOUT_SHEET.cs" /> + <Compile Include="WmsEntity\TB_PACK_UNPACK.cs" /> + <Compile Include="WmsEntity\TB_PICK_FACT.cs" /> + <Compile Include="WmsEntity\TB_PICK_INVOICE.cs"> + <DependentUpon>TableSchema.tt</DependentUpon> + </Compile> + <Compile Include="WmsEntity\TB_PICK_PLAN.cs" /> + <Compile Include="WmsEntity\TB_PRODUCE_PLAN.cs" /> + <Compile Include="WmsEntity\TB_PRODUCT_RECEIVE.cs" /> + <Compile Include="WmsEntity\TB_PRODUCT_REPAIR.cs" /> + <Compile Include="WmsEntity\TB_PRODUCT_RETURN.cs" /> + <Compile Include="WmsEntity\TB_PRODUCT_SELL.cs" /> + <Compile Include="WmsEntity\TB_STOCK_MOVE.cs" /> + <Compile Include="WmsEntity\TF_ASN.cs" /> + <Compile Include="WmsEntity\TF_ASN_DETAIL.cs" /> + <Compile Include="WmsEntity\TF_PO.cs" /> + <Compile Include="WmsEntity\TF_PO_DETAIL.cs" /> + <Compile Include="WmsEntity\TF_SO.cs" /> + <Compile Include="WmsEntity\TF_SO_DETAIL.cs" /> + <Compile Include="WmsEntity\TL_BASEDATA.cs" /> + <Compile Include="WmsEntity\TL_BILL.cs" /> + <Compile Include="WmsEntity\TL_EXCEPTION.cs" /> + <Compile Include="WmsEntity\TL_INTERFACE.cs" /> + <Compile Include="WmsEntity\TL_OPER.cs" /> + <Compile Include="WmsEntity\TL_TRANSACTION.cs" /> + <Compile Include="WmsEntity\TM_CQBMPT_AQLSTANDARD.cs" /> + <Compile Include="WmsEntity\TM_CQBMPT_INJECTION_MACHINE.cs" /> + <Compile Include="WmsEntity\TM_CQBMPT_INJECTION_REPORT.cs" /> + <Compile Include="WmsEntity\TM_CQBMPT_INJECTION_TANK.cs" /> + <Compile Include="WmsEntity\TM_CQBMPT_PAINT_FAILEDREASON.cs" /> + <Compile Include="WmsEntity\TM_CQBMPT_PART_RELATION.cs" /> + <Compile Include="WmsEntity\TM_CQBMPT_PRODUCE_PLAN.cs" /> + <Compile Include="WmsEntity\TM_CQBMPT_SCAN_LOG.cs" /> + <Compile Include="WmsEntity\TM_CQBMPT_TRACEBACK.cs" /> + <Compile Include="WmsEntity\TM_TJANTOLIN_ASK.cs" /> + <Compile Include="WmsEntity\TM_TJANTOLIN_MATERIAL_INIT.cs" /> + <Compile Include="WmsEntity\TM_TJANTOLIN_PICK.cs" /> + <Compile Include="WmsEntity\TM_TJANTOLIN_PRODUCE_PLAN.cs" /> + <Compile Include="WmsEntity\TR_BALANCE_COMPARE.cs" /> + <Compile Include="WmsEntity\TR_BALANCE_COMPARE_PART.cs" /> + <Compile Include="WmsEntity\TR_BALANCE_COMPARE_VIN.cs" /> + <Compile Include="WmsEntity\TS_BARCODE.cs" /> + <Compile Include="WmsEntity\TS_BARCODE_RULE.cs" /> + <Compile Include="WmsEntity\TS_CONTAINER.cs" /> + <Compile Include="WmsEntity\TS_EQUIPMENT.cs" /> + <Compile Include="WmsEntity\TS_EQUIPMENT_BARCODE.cs" /> + <Compile Include="WmsEntity\TS_ERP_STOCK.cs" /> + <Compile Include="WmsEntity\TS_LINE_ROTATE.cs" /> + <Compile Include="WmsEntity\TS_NOTIFY.cs" /> + <Compile Include="WmsEntity\TS_PART_WHSE_STOCK.cs" /> + <Compile Include="WmsEntity\TS_SEQ_DETAIL.cs" /> + <Compile Include="WmsEntity\TS_SORT_BILL.cs" /> + <Compile Include="WmsEntity\TS_SORT_DETAIL.cs" /> + <Compile Include="WmsEntity\TS_STOCK_CUST.cs" /> + <Compile Include="WmsEntity\TS_STOCK_DETAIL.cs" /> + <Compile Include="WmsEntity\TS_STOCK_FREEZE.cs" /> + <Compile Include="WmsEntity\TS_TRACEBACK.cs" /> + <Compile Include="WmsEntity\TS_TRACEBACK_MATERIAL.cs" /> + <Compile Include="WmsEntity\TS_UNI_API.cs" /> + <Compile Include="WmsEntity\TS_UNI_API_HIS.cs" /> + <Compile Include="WmsEntity\TS_UNKNOW_CUSTPART.cs" /> + <Compile Include="WmsEntity\TS_VIN.cs" /> + <Compile Include="WmsEntity\TS_VIN_HIS.cs" /> + <Compile Include="WmsEntity\TS_VIN_PART.cs" /> + <Compile Include="WmsEntity\TS_VIN_PART_MOVE.cs" /> + <Compile Include="WmsEntity\TS_VIN_STOCK.cs" /> + <Compile Include="WmsEntity\TT_CONTAINER_TYPE.cs" /> + <Compile Include="WmsEntity\TT_CURRENCY.cs" /> + <Compile Include="WmsEntity\TT_FAIL_TYPE.cs" /> + <Compile Include="WmsEntity\TT_PART_GROUP.cs" /> + <Compile Include="WmsEntity\TT_PROJECT.cs" /> + <Compile Include="WmsEntity\TT_SHIFT.cs" /> + <Compile Include="WmsEntity\TT_UNIT.cs" /> + <Compile Include="WmsEntity\VB_INSPECT.cs" /> + <Compile Include="WmsEntity\VB_STOCK_MOVE.cs" /> + <Compile Include="WmsEntity\VIEW_ASN.cs" /> + <Compile Include="WmsEntity\VIEW_ASN_DETAIL.cs" /> + <Compile Include="WmsEntity\VIEW_BASEDATA_LOG.cs" /> + <Compile Include="WmsEntity\VIEW_BILL.cs" /> + <Compile Include="WmsEntity\VIEW_BILL_LOG.cs" /> + <Compile Include="WmsEntity\VIEW_CalOverdue_DAYS.cs" /> + <Compile Include="WmsEntity\VIEW_CQWKSAFEQTY.cs" /> + <Compile Include="WmsEntity\VIEW_DELIVER_PICK_SUM.cs" /> + <Compile Include="WmsEntity\VIEW_DELIVER_PLAN.cs" /> + <Compile Include="WmsEntity\VIEW_EQPT_LOAD.cs" /> + <Compile Include="WmsEntity\VIEW_INSPECT.cs" /> + <Compile Include="WmsEntity\VIEW_INTERFACE.cs" /> + <Compile Include="WmsEntity\VIEW_INTERFACE_HIS.cs" /> + <Compile Include="WmsEntity\VIEW_INVENTORY_DETAIL.cs" /> + <Compile Include="WmsEntity\VIEW_INVENTORY_LOC.cs" /> + <Compile Include="WmsEntity\VIEW_MATERIAL_ASK.cs" /> + <Compile Include="WmsEntity\VIEW_MATERIAL_BACK.cs" /> + <Compile Include="WmsEntity\VIEW_MATERIAL_RECEIVE.cs" /> + <Compile Include="WmsEntity\VIEW_MATERIAL_RETURN.cs" /> + <Compile Include="WmsEntity\VIEW_NOTIFY.cs" /> + <Compile Include="WmsEntity\VIEW_OM_PLAN.cs" /> + <Compile Include="WmsEntity\VIEW_OPER_LOG.cs" /> + <Compile Include="WmsEntity\VIEW_OTHER_INOUT.cs" /> + <Compile Include="WmsEntity\VIEW_PACK_UNPACK.cs" /> + <Compile Include="WmsEntity\VIEW_PICK_FACT.cs" /> + <Compile Include="WmsEntity\VIEW_PICK_PLAN.cs" /> + <Compile Include="WmsEntity\VIEW_PO.cs" /> + <Compile Include="WmsEntity\VIEW_PO_DETAIL.cs" /> + <Compile Include="WmsEntity\VIEW_PRODUCE_PLAN.cs" /> + <Compile Include="WmsEntity\VIEW_PRODUCT_DETAIL.cs" /> + <Compile Include="WmsEntity\VIEW_PRODUCT_RECEIVE.cs" /> + <Compile Include="WmsEntity\VIEW_PRODUCT_REPAIR.cs" /> + <Compile Include="WmsEntity\VIEW_PRODUCT_RETURN.cs" /> + <Compile Include="WmsEntity\VIEW_PRODUCT_SELL.cs" /> + <Compile Include="WmsEntity\VIEW_SEQ_DETAIL.cs" /> + <Compile Include="WmsEntity\VIEW_SO.cs" /> + <Compile Include="WmsEntity\VIEW_SORT_BILL.cs" /> + <Compile Include="WmsEntity\VIEW_SORT_DETAIL.cs" /> + <Compile Include="WmsEntity\VIEW_SO_DETAIL.cs" /> + <Compile Include="WmsEntity\VIEW_STOCK.cs" /> + <Compile Include="WmsEntity\VIEW_STOCKDETAIL_DAYS.cs" /> + <Compile Include="WmsEntity\VIEW_STOCK_DETAIL.cs" /> + <Compile Include="WmsEntity\VIEW_STOCK_DETAIL_SUM.cs" /> + <Compile Include="WmsEntity\VIEW_STOCK_FREEZE.cs" /> + <Compile Include="WmsEntity\VIEW_STOCK_GROUP.cs" /> + <Compile Include="WmsEntity\VIEW_STOCK_MOVE.cs" /> + <Compile Include="WmsEntity\VIEW_STOCK_VEND.cs" /> + <Compile Include="WmsEntity\VIEW_STORE_WHSE.cs" /> + <Compile Include="WmsEntity\VIEW_TRANSACTION.cs" /> + <Compile Include="WmsEntity\VS_STOCK.cs" /> + <Compile Include="WmsEntity\VS_STOCK_CONVERSION.cs" /> + <Compile Include="WmsEntity\VS_STOCK_DETAIL.cs" /> + <Compile Include="WmsEntity\WmsEntities.cs" /> + <Compile Include="WmsEntity\WmsExtention.cs" /> + <Compile Include="WmsException.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="App.config" /> + <None Include="packages.config" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Utils\CK.SCP.Utils.csproj"> + <Project>{4c6a951d-ad7f-47ce-b2ce-32c205d8d6ba}</Project> + <Name>CK.SCP.Utils</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <Content Include="..\SCP\Admin\default.aspx"> + <Link>default.aspx</Link> + <SubType>ASPXCodeBehind</SubType> + </Content> + <Content Include="WmsEntity\TableSchema.tt"> + <Generator>TextTemplatingFileGenerator</Generator> + <LastGenOutput>TableSchema1.cs</LastGenOutput> + </Content> + </ItemGroup> + <ItemGroup> + <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" /> + </ItemGroup> + <ItemGroup> + <Folder Include="WmsEntity\HyAntolin\" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project> \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterContext.cs b/北京北汽/SCP/Models/DataCenterContext.cs new file mode 100644 index 0000000..6825570 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterContext.cs @@ -0,0 +1,115 @@ +using System.Data.Entity; +using System.Data.Entity.ModelConfiguration.Conventions; +using CK.SCP.Models.DataCenterTables; + +namespace CK.SCP.Models +{ + [DbConfigurationType(typeof(SqlDbConfiguration))] + public class DataCenterContext : DbContext + { + public DataCenterContext() : base("name=DataCenterContext") + { + + } + + public DataCenterContext(string strConn) : base(strConn) + { + //Database.SetInitializer(new DataCenterDatabaseInitializer()); + } + + public virtual DbSet<TA_BUTTON> TA_BUTTON { get; set; } + public virtual DbSet<TA_DEPT> TA_DEPT { get; set; } + public virtual DbSet<TA_MENU> TA_MENU { get; set; } + public virtual DbSet<TA_USER> TA_USER { get; set; } + public virtual DbSet<TA_USER_BUTTON> TA_USER_BUTTON { get; set; } + public virtual DbSet<TA_USER_MENU> TA_USER_MENU { get; set; } + public virtual DbSet<TA_USER_TABLE> TA_USER_TABLE { get; set; } + public virtual DbSet<TA_CONFIG> TA_CONFIG { get; set; } + public virtual DbSet<TL_DATA_CHANGE> TL_DATA_CHANGE { get; set; } + public virtual DbSet<TL_LOGIN> TL_LOGIN { get; set; } + public virtual DbSet<TL_EXCEPTION> TL_EXCEPTION { get; set; } + public virtual DbSet<TS_EDI_DATA> TS_EDI_DATA { get; set; } + public virtual DbSet<TT_EDI_DATA> TT_EDI_DATA { get; set; } + public virtual DbSet<TA_TABLE> TA_TABLE { get; set; } + public virtual DbSet<TA_TASK> TA_TASK { get; set; } + public virtual DbSet<TA_TASK_HIS> TA_TASK_HIS { get; set; } + public virtual DbSet<TS_SUPPLIER> TS_SUPPLIER { get; set; } + public virtual DbSet<TS_CUSTOMER> TS_CUSTOMER { get; set; } + public virtual DbSet<TS_DOMAIN> TS_DOMAIN { get; set; } + public virtual DbSet<TS_WORK_CENTER> TS_WORK_CENTER { get; set; } + public virtual DbSet<TS_SUPPLIER_TYPE> TS_SUPPLIER_TYPE { get; set; } + public virtual DbSet<TS_SUB_ACCOUNT> TS_SUB_ACCOUNT { get; set; } + public virtual DbSet<TS_SITE> TS_SITE { get; set; } + public virtual DbSet<TS_CODE_TYPE> TS_CODE_TYPE { get; set; } + public virtual DbSet<TS_CODE> TS_CODE { get; set; } + public virtual DbSet<TS_PRODUCT_LINE> TS_PRODUCT_LINE { get; set; } + public virtual DbSet<TS_PROJECT> TS_PROJECT { get; set; } + public virtual DbSet<TS_DEPARTMENT> TS_DEPARTMENT { get; set; } + public virtual DbSet<TS_ENTITY> TS_ENTITY { get; set; } + public virtual DbSet<TS_CUSTOMER_TYPE> TS_CUSTOMER_TYPE { get; set; } + public virtual DbSet<TS_COST_CENTER> TS_COST_CENTER { get; set; } + public virtual DbSet<TS_ACCOUNT> TS_ACCOUNT { get; set; } + public virtual DbSet<TS_ROUTING> TS_ROUTING { get; set; } + public virtual DbSet<TS_PART_MSTR> TS_PART_MSTR { get; set; } + public virtual DbSet<TS_PART_DET> TS_PART_DET { get; set; } + public virtual DbSet<TS_MES_DATA> TS_MES_DATA { get; set; } + public virtual DbSet<TS_LOCATION> TS_LOCATION { get; set; } + public virtual DbSet<TS_LINE> TS_LINE { get; set; } + public virtual DbSet<TS_COLOR> TS_COLOR { get; set; } + public virtual DbSet<TS_BOM> TS_BOM { get; set; } + public virtual DbSet<TS_PACK> TS_PACK { get; set; } + public virtual DbSet<TS_SUPPLIER_PART> TS_SUPPLIER_PART { get; set; } + public virtual DbSet<TS_CUSTOMER_PART> TS_CUSTOMER_PART { get; set; } + public virtual DbSet<TS_LINE_PART> TS_LINE_PART { get; set; } + public virtual DbSet<TS_PURCHASE_PRICE> TS_PURCHASE_PRICE { get; set; } + public virtual DbSet<TS_SALE_PRICE> TS_SALE_PRICE { get; set; } + public virtual DbSet<TS_STAND_COST_PRICE> TS_STAND_COST_PRICE { get; set; } + public virtual DbSet<TS_TEAM> TS_TEAM { get; set; } + public virtual DbSet<TS_SHIFT> TS_SHIFT { get; set; } + public virtual DbSet<TS_WMS_LOCATION> TS_WMS_LOCATION { get; set; } + public virtual DbSet<TT_SUPPLIER> TT_SUPPLIER { get; set; } + public virtual DbSet<TT_CUSTOMER> TT_CUSTOMER { get; set; } + public virtual DbSet<TT_DOMAIN> TT_DOMAIN { get; set; } + public virtual DbSet<TT_WORK_CENTER> TT_WORK_CENTER { get; set; } + public virtual DbSet<TT_SUPPLIER_TYPE> TT_SUPPLIER_TYPE { get; set; } + public virtual DbSet<TT_SUB_ACCOUNT> TT_SUB_ACCOUNT { get; set; } + public virtual DbSet<TT_SITE> TT_SITE { get; set; } + public virtual DbSet<TT_CODE_TYPE> TT_CODE_TYPE { get; set; } + public virtual DbSet<TT_CODE> TT_CODE { get; set; } + public virtual DbSet<TT_PRODUCT_LINE> TT_PRODUCT_LINE { get; set; } + public virtual DbSet<TT_PROJECT> TT_PROJECT { get; set; } + public virtual DbSet<TT_DEPARTMENT> TT_DEPARTMENT { get; set; } + public virtual DbSet<TT_ENTITY> TT_ENTITY { get; set; } + public virtual DbSet<TT_CUSTOMER_TYPE> TT_CUSTOMER_TYPE { get; set; } + public virtual DbSet<TT_COST_CENTER> TT_COST_CENTER { get; set; } + public virtual DbSet<TT_ACCOUNT> TT_ACCOUNT { get; set; } + public virtual DbSet<TT_ROUTING> TT_ROUTING { get; set; } + public virtual DbSet<TT_PART_MSTR> TT_PART_MSTR { get; set; } + public virtual DbSet<TT_PART_DET> TT_PART_DET { get; set; } + public virtual DbSet<TT_MES_DATA> TT_MES_DATA { get; set; } + public virtual DbSet<TT_LOCATION> TT_LOCATION { get; set; } + public virtual DbSet<TT_LINE> TT_LINE { get; set; } + public virtual DbSet<TT_COLOR> TT_COLOR { get; set; } + public virtual DbSet<TT_BOM> TT_BOM { get; set; } + public virtual DbSet<TT_PACK> TT_PACK { get; set; } + public virtual DbSet<TT_SUPPLIER_PART> TT_SUPPLIER_PART { get; set; } + public virtual DbSet<TT_CUSTOMER_PART> TT_CUSTOMER_PART { get; set; } + public virtual DbSet<TT_LINE_PART> TT_LINE_PART { get; set; } + public virtual DbSet<TT_PURCHASE_PRICE> TT_PURCHASE_PRICE { get; set; } + public virtual DbSet<TT_SALE_PRICE> TT_SALE_PRICE { get; set; } + public virtual DbSet<TT_STAND_COST_PRICE> TT_STAND_COST_PRICE { get; set; } + public virtual DbSet<TT_TEAM> TT_TEAM { get; set; } + public virtual DbSet<TT_SHIFT> TT_SHIFT { get; set; } + public virtual DbSet<TT_WMS_LOCATION> TT_WMS_LOCATION { get; set; } + + + + protected override void OnModelCreating(DbModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + + modelBuilder.Conventions.Remove<DecimalPropertyConvention>(); + modelBuilder.Conventions.Add(new DecimalPropertyConvention(18, 5)); + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TA_BUTTON.cs b/北京北汽/SCP/Models/DataCenterTables/TA_BUTTON.cs new file mode 100644 index 0000000..e74271b --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TA_BUTTON.cs @@ -0,0 +1,65 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ť")] + public class TA_BUTTON : IUpdatableTable, IEnable + { + [Index("IndexButton", Order = 0, IsUnique = true, IsClustered = false)] + [Description("ť")] + [Column] + [Required] + [StringLength(50)] + public string ButtonCode { get; set; } + + [Description("ť")] + [Required] + [StringLength(50)] + public string ButtonName { get; set; } + + [Index("IndexButton", Order = 1, IsUnique = true, IsClustered = false)] + [Description("")] + [Required] + [StringLength(50)] + public string TableName { get; set; } + + [Description("ť˳")] + public int ButtonOrder { get; set; } + + #region ֶ + + [Description("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } = ""; + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } = DateTime.Now; + + + [Description("ע")] + public string Remark { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + + public bool Enable { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TA_CONFIG.cs b/北京北汽/SCP/Models/DataCenterTables/TA_CONFIG.cs new file mode 100644 index 0000000..ccc3f36 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TA_CONFIG.cs @@ -0,0 +1,63 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ϵͳ")] + public class TA_CONFIG : ITable, IEnable + { + [IsDataGridColum(true, 1)] + [Index("IndexConfig", Order = 0, IsUnique = true, IsClustered = false)] + [Description("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string ConfigName { get; set; } + + [IsDataGridColum(true, 2)] + [Required(AllowEmptyStrings = true)] + [Description("ֵ")] + [StringLength(50)] + public string ConfigValue { get; set; } + + [IsDataGridColum(true, 3)] + [Description("˵")] + [StringLength(500)] + public string ConfigDesc { get; set; } + + + [IsDataGridColum(true, 4)] + [Required(AllowEmptyStrings = true)] + [Description("")] + public EnumConfigType ConfigType { get; set; } = EnumConfigType.STRING; + + #region ֶ + + [Description("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } = ""; + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + + [Description("ע")] + public string Remark { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + + public bool Enable { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TA_DEPT.cs b/北京北汽/SCP/Models/DataCenterTables/TA_DEPT.cs new file mode 100644 index 0000000..3d9e00b --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TA_DEPT.cs @@ -0,0 +1,65 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ű")] + public class TA_DEPT : IUpdatableTable, IEnable,IDomainSite + { + [IsDataGridColum(true, 1)] + [Description("ű")] + [Required(ErrorMessage = "űŲΪ.")] + [Index("IndexDept", Order = 0, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string DeptCode { get; set; } + + [IsDataGridColum(true, 2)] + [Description("")] + [Required(ErrorMessage = "ƲΪ.")] + [StringLength(50)] + public string DeptName { get; set; } + + [Description("Ƿѡ")] + [NotMapped] + public bool IsChecked { get; set; } + + #region ֶ + + [Description("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } = ""; + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } = DateTime.Now; + + + [IsDataGridColum(true, 3)] + [Description("ע")] + public string Remark { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + + public bool Enable { get; set; } + public string Domain { get; set; } + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TA_MENU.cs b/北京北汽/SCP/Models/DataCenterTables/TA_MENU.cs new file mode 100644 index 0000000..b3f50a0 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TA_MENU.cs @@ -0,0 +1,74 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("菜单表")] + public class TA_MENU : IUpdatableTable, IEnable + { + [Description("菜单编号")] + [Required] + [Index("IndexMenu", Order = 0, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string MenuCode { get; set; } + + [Description("菜单名称")] + [Required] + [StringLength(50)] + public string MenuName { get; set; } + + [Description("上级菜单")] + [Required] + [StringLength(50)] + public string ParentCode { get; set; } + + [Description("显示顺序")] + public int DisplayOrder { get; set; } + + [Description("图标名称")] + [Required] + [StringLength(50)] + public string IconName { get; set; } + + [Description("菜单级别")] + public int Level { get; set; } + + [Description("是否选中")] + [NotMapped] + public bool IsChecked { get; set; } + + #region 公共字段 + + [Description("创建人")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("创建时间")] + public DateTime CreateTime { get; set; } + + [Description("修改人")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("修改时间")] + public DateTime? UpdateTime { get; set; } + + + [Description("备注")] + public string Remark { get; set; } + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + + public bool Enable { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TA_TABLE.cs b/北京北汽/SCP/Models/DataCenterTables/TA_TABLE.cs new file mode 100644 index 0000000..6f0ea7b --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TA_TABLE.cs @@ -0,0 +1,61 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("Ϣ")] + public class TA_TABLE : IUpdatableTable, IEnable + { + [IsDataGridColum(true, 1)] + [Description("")] + [Required(ErrorMessage = "űŲΪ.")] + [Index("IndexDept", Order = 0, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string TableCode { get; set; } + + [IsDataGridColum(true, 2)] + [Description("")] + [Required(ErrorMessage = "ƲΪ.")] + [StringLength(50)] + public string TableName { get; set; } + + [Description("Ƿѡ")] + [NotMapped] + public bool IsChecked { get; set; } + + #region ֶ + + [Description("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + #endregion + + public bool Enable { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TA_TASK.cs b/北京北汽/SCP/Models/DataCenterTables/TA_TASK.cs new file mode 100644 index 0000000..f885684 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TA_TASK.cs @@ -0,0 +1,69 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("")] + public class TA_TASK : IUpdatableTable, ISoftDelete + { + [NotMapped] + [Description("")] + public Guid TaskID => GUID; + + + [Description("״̬")] + public EnumTaskState TaskState { get; set; } = EnumTaskState.Unread; + + [Description("")] + [StringLength(50)] + public string TableName { get; set; } + + [Description("")] + [StringLength(50)] + public string Creator { get; set; } + + [Description("")] + public int DataCount { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + + [Key] + [Description("")] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TA_TASK_HIS.cs b/北京北汽/SCP/Models/DataCenterTables/TA_TASK_HIS.cs new file mode 100644 index 0000000..570b638 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TA_TASK_HIS.cs @@ -0,0 +1,72 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ʷ")] + /// <summary> + /// ʷ + /// </summary> + public class TA_TASK_HIS : IUpdatableTable, ISoftDelete + { + [NotMapped] + [Description("")] + public Guid TaskId => GUID; + + + [Description("״̬")] + public EnumTaskState TaskState { get; set; } + + [Description("")] + [StringLength(50)] + public string TableName { get; set; } + + [Description("")] + [StringLength(50)] + public string Creator { get; set; } + + [Description("")] + public int DataCount { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + + [Key] + [Description("")] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TA_USER.cs b/北京北汽/SCP/Models/DataCenterTables/TA_USER.cs new file mode 100644 index 0000000..e3dd79c --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TA_USER.cs @@ -0,0 +1,135 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("û")] + public class TA_USER : IUpdatableTable, ISoftDelete, IEnable, INotifyPropertyChanged + { + [IsDataGridColum(true, 1)] + [Description("û")] + [Required(ErrorMessage = "ûΪ")] + [Index("IndexUser", Order = 0, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string UserName { get; set; } + + [IsDataGridColum(true, 2)] + [Description("")] + [Required(ErrorMessage = "벻Ϊ")] + [StringLength(50)] + public string Password { get; set; } + + [IsDataGridColum(true, 3)] + [Description("ʵ")] + [StringLength(50)] + public string TrueName { get; set; } + + [IsDataGridColum(true, 7)] + [ColumnSource(ColumnSourceType.TABLE, typeof(TA_DEPT), + new[] {"DeptCode", "DeptName"})] //, "CompanyDeptSelector" + [Description("ű")] + [Required(ErrorMessage = "űŲΪ")] + [StringLength(50)] + public string DeptCode { get; set; } + + [ColumnSource(ColumnSourceType.ENUM, typeof(EnumUserType))] + [IsDataGridColum(true, 5)] + [Description("û")] + public EnumUserType UserType { get; set; } = EnumUserType.Admin; + + + [IsDataGridColum(true, 12)] + [Description("ʼ")] + [StringLength(50)] + public string Email { get; set; } + + [IsDataGridColum(true, 13)] + [Description("ϵ绰1")] + [StringLength(50)] + public string Phone1 { get; set; } + + [IsDataGridColum(true, 14)] + [Description("ϵ绰2")] + [StringLength(50)] + public string Phone2 { get; set; } + + [IsDataGridColum(true, 9)] + [Description("¼ʱ")] + [Column(TypeName = "datetime2")] + public DateTime? LastLoginTime { get; set; } + + [IsDataGridColum(true, 10)] + [Description("¼IPַ")] + [StringLength(50)] + public string LastLoginIp { get; set; } + + [IsDataGridColum(true, 11)] + [Description("¼")] + [StringLength(50)] + public string LastLoginClient { get; set; } + + [IsDataGridColum(true, 8)] + [Index("IndexUserSessionId", Order = 0, IsUnique = false, IsClustered = false)] + [Description("Ự")] + [StringLength(50)] + public string SessionId { get; set; } + + + [Description("ɾ")] + public bool IsDeleted { get; set; } + + [Description("Ƿ")] + public bool Enable { get; set; } + + #region ֶ + + [Description("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } = ""; + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } = ""; + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } = DateTime.Now; + + + [IsDataGridColum(true, 15)] + [Description("ע")] + public string Remark { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + + + #region INotifyPropertyChangedӿ + + public event PropertyChangedEventHandler PropertyChanged; + + public void NotityPropertyChanged(string propertyName) + { + if (PropertyChanged != null) + { + PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + + #endregion + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TA_USER_BUTTON.cs b/北京北汽/SCP/Models/DataCenterTables/TA_USER_BUTTON.cs new file mode 100644 index 0000000..4967480 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TA_USER_BUTTON.cs @@ -0,0 +1,63 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ûťȨ")] + public class TA_USER_BUTTON : IUpdatableTable, IEnable + { + [Description("û")] + [Required(AllowEmptyStrings = true)] + [Index("IndexUserButton", Order = 0, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string UserName { get; set; } + + [Description("")] + [Required(AllowEmptyStrings = true)] + [Index("IndexUserButton", Order = 1, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string TableName { get; set; } + + + [Description("ť")] + [Required(AllowEmptyStrings = true)] + [Index("IndexUserButton", Order = 2, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string ButtonCode { get; set; } + + #region ֶ + + [Description("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } = ""; + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } = DateTime.Now; + + + [Description("ע")] + public string Remark { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + + public bool Enable { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TA_USER_MENU.cs b/北京北汽/SCP/Models/DataCenterTables/TA_USER_MENU.cs new file mode 100644 index 0000000..f3efb2c --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TA_USER_MENU.cs @@ -0,0 +1,57 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("û˵Ȩ")] + public class TA_USER_MENU : IUpdatableTable, IEnable + { + [Description("û")] + [Required(AllowEmptyStrings = true)] + [Index("IndexUserMenu", Order = 0, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string UserName { get; set; } + + + [Description("˵")] + [Required(AllowEmptyStrings = true)] + [Index("IndexUserMenu", Order = 1, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string MenuCode { get; set; } + + #region ֶ + + [Description("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } = DateTime.Now; + + + [Description("ע")] + public string Remark { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + + public bool Enable { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TA_USER_TABLE.cs b/北京北汽/SCP/Models/DataCenterTables/TA_USER_TABLE.cs new file mode 100644 index 0000000..4e03578 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TA_USER_TABLE.cs @@ -0,0 +1,57 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ûȨ")] + public class TA_USER_TABLE : IUpdatableTable, IEnable + { + [Description("û")] + [Required(AllowEmptyStrings = true)] + [Index("IndexUserTable", Order = 0, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string UserName { get; set; } + + + [Description("")] + [Required(AllowEmptyStrings = true)] + [Index("IndexUserTable", Order = 1, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string TableName { get; set; } + + #region ֶ + + [Description("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } = DateTime.Now; + + + [Description("ע")] + public string Remark { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + + public bool Enable { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TL_DATA_CHANGE.cs b/北京北汽/SCP/Models/DataCenterTables/TL_DATA_CHANGE.cs new file mode 100644 index 0000000..bf2ff17 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TL_DATA_CHANGE.cs @@ -0,0 +1,56 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("数据变更日志")] + public class TL_DATA_CHANGE : ITable, IEnable + { + [Required(AllowEmptyStrings = true)] + [Description("日志类型")] + public EnumBaseDataLogType LogType { get; set; } + + [Required(AllowEmptyStrings = true)] + [Description("数据类型")] + [StringLength(50)] + public string DataType { get; set; } + + [Required(AllowEmptyStrings = true)] + [Description("原值")] + public string OldValue { get; set; } + + [Required(AllowEmptyStrings = true)] + [Description("新值")] + public string NewValue { get; set; } + + #region 公共字段 + + [Description("创建人")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } = ""; + + [Description("创建时间")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + + [IsDataGridColum(true, 3)] + [Description("备注")] + public string Remark { get; set; } + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + + public bool Enable { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TL_EXCEPTION.cs b/北京北汽/SCP/Models/DataCenterTables/TL_EXCEPTION.cs new file mode 100644 index 0000000..5ee9e85 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TL_EXCEPTION.cs @@ -0,0 +1,48 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("异常日志表")] + public class TL_EXCEPTION : ITable + { + [Description("日志类型")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string LogType { get; set; } + + [Description("异常消息")] + public string ExMessage { get; set; } + + [Description("异常信息")] + public string ExString { get; set; } + + #region 公共字段 + + [Description("创建人")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } = ""; + + [Description("创建时间")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + + [IsDataGridColum(true, 3)] + [Description("备注")] + public string Remark { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TL_LOGIN.cs b/北京北汽/SCP/Models/DataCenterTables/TL_LOGIN.cs new file mode 100644 index 0000000..80be20c --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TL_LOGIN.cs @@ -0,0 +1,67 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Utils; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("登录日志表")] + public class TL_LOGIN : ITable + { + [Description("日志类型")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string Type { get; set; } + + [Description("客户端电脑名称")] + [Required(AllowEmptyStrings = true)] + [StringLength(200)] + public string Client { get; set; } + + [Description("客户端IP")] + [Required(AllowEmptyStrings = true)] + [StringLength(200)] + public string IP { get; set; } + + [Description("会话编号")] + [Required(AllowEmptyStrings = true)] + [StringLength(200)] + public string SessionId { get; set; } + + [Description("信息")] + [StringLength(200)] + public string Message { get; set; } + + //public override string ToString() + //{ + // return EntitiesHelper.GetPropertiesString(this); + //} + + #region 公共字段 + + [Description("创建人")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } = ""; + + [Description("创建时间")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + + [IsDataGridColum(true, 3)] + [Description("备注")] + public string Remark { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_ACCOUNT.cs b/北京北汽/SCP/Models/DataCenterTables/TS_ACCOUNT.cs new file mode 100644 index 0000000..7e21d07 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_ACCOUNT.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("Ŀ")] + public class TS_ACCOUNT : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexAccount", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_BOM.cs b/北京北汽/SCP/Models/DataCenterTables/TS_BOM.cs new file mode 100644 index 0000000..84f8dac --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_BOM.cs @@ -0,0 +1,102 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("BOM")] + public class TS_BOM : IUpdatableTable, ISoftDelete, IDomainSite + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexBom", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string ParentPart { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string ComponentPart { get; set; } + [IsDataGridColum(true, 3)] + [Description("ο")] + [StringLength(50)] + public string Reference { get; set; } + [IsDataGridColum(true, 4)] + [Description("Ч")] + public DateTime StartEffective { get; set; } + [IsDataGridColum(true, 5)] + [Description("ÿ")] + public decimal QuantityPer { get; set; } + [IsDataGridColum(true, 6)] + [Description("ṹ")] + [StringLength(50)] + public string StructureType { get; set; } + [IsDataGridColum(true, 7)] + [Description("Ч")] + public DateTime EndEffective { get; set; } + [IsDataGridColum(true, 8)] + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + [IsDataGridColum(true, 9)] + [Description("Ʒ")] + public decimal Scrap { get; set; } + [IsDataGridColum(true, 10)] + [Description("ǰ")] + public int LeadTimeOffset { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + public int Operation { get; set; } + [IsDataGridColum(true, 12)] + [Description("")] + public int SequenceNumber { get; set; } + [IsDataGridColum(true, 13)] + [Description("Ԥٷֱ")] + public decimal FporecastPercent { get; set; } + [IsDataGridColum(true, 14)] + [Description("")] + [StringLength(50)] + public string OptionGroup { get; set; } + [IsDataGridColum(true, 15)] + [Description("")] + [StringLength(50)] + public string Process { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 17)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 18)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_CODE.cs b/北京北汽/SCP/Models/DataCenterTables/TS_CODE.cs new file mode 100644 index 0000000..85322f5 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_CODE.cs @@ -0,0 +1,84 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ͨô")] + public class TS_CODE : IUpdatableTable, ISoftDelete,INotifyPropertyChanged + { + [IsDataGridColum(true, 1)] + [Description("ͨô")] + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexCode", Order = 0, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string Code { get; set; } + + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 4)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 5)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 3)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + + #region IsChecked + + private bool _isChecked = false; + + [NotMapped] + public bool IsChecked + { + get { return _isChecked; } + set + { + _isChecked = value; + NotityPropertyChanged("IsChecked"); + } + } + + #endregion + + #region INotifyPropertyChangedӿ + + public event PropertyChangedEventHandler PropertyChanged; + + public void NotityPropertyChanged(string propertyName) + { + if (PropertyChanged != null) + { + PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + + #endregion + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_CODE_TYPE.cs b/北京北汽/SCP/Models/DataCenterTables/TS_CODE_TYPE.cs new file mode 100644 index 0000000..0dc67cc --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_CODE_TYPE.cs @@ -0,0 +1,53 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ͨôͱ")] + public class TS_CODE_TYPE : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexCodeType", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("ͨʹ")] + [StringLength(50)] + public string Code { get; set; } + + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 4)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 5)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 3)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_COLOR.cs b/北京北汽/SCP/Models/DataCenterTables/TS_COLOR.cs new file mode 100644 index 0000000..180a085 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_COLOR.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ɫ")] + public class TS_COLOR : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexColor", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_COST_CENTER.cs b/北京北汽/SCP/Models/DataCenterTables/TS_COST_CENTER.cs new file mode 100644 index 0000000..c8ca932 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_COST_CENTER.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ɱı")] + public class TS_COST_CENTER : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexCostCenter", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_CUSTOMER.cs b/北京北汽/SCP/Models/DataCenterTables/TS_CUSTOMER.cs new file mode 100644 index 0000000..0d53d11 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_CUSTOMER.cs @@ -0,0 +1,312 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ͻ")] + public class TS_CUSTOMER : IUpdatableTable, ISoftDelete, IDomainSite + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexCustomer", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("ͻ")] + [StringLength(50)] + public string CustomerCode { get; set; } + [IsDataGridColum(true, 2)] + [Description("ͻ")] + [StringLength(50)] + public string CustomerName { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string SearchName { get; set; } + [IsDataGridColum(true, 4)] + [Description("м")] + [StringLength(50)] + public string SecondName { get; set; } + [IsDataGridColum(true, 5)] + [Description("")] + [StringLength(50)] + public string ThirdName { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string GroupName { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string Active { get; set; } + [IsDataGridColum(true, 8)] + [Description("ͻַ")] + [StringLength(50)] + public string Address1 { get; set; } + [IsDataGridColum(true, 9)] + [Description("ͻַ")] + [StringLength(50)] + public string Address2 { get; set; } + [IsDataGridColum(true, 10)] + [Description("ͻַ")] + [StringLength(50)] + public string Address3 { get; set; } + [IsDataGridColum(true, 11)] + [Description("ʱ")] + [StringLength(50)] + public string ZipCode { get; set; } + [IsDataGridColum(true, 12)] + [Description("")] + [StringLength(50)] + public string City { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + [StringLength(50)] + public string Country { get; set; } + [IsDataGridColum(true, 14)] + [Description("绰")] + [StringLength(50)] + public string Telephone { get; set; } + [IsDataGridColum(true, 15)] + [Description("ʡ")] + [StringLength(50)] + public string province { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string County { get; set; } + [IsDataGridColum(true, 17)] + [Description("")] + [StringLength(50)] + public string Fax { get; set; } + [IsDataGridColum(true, 18)] + [Description("Դ")] + [StringLength(50)] + public string LanguageCode { get; set; } + [IsDataGridColum(true, 19)] + [Description("ʼ")] + [StringLength(50)] + public string Email { get; set; } + [IsDataGridColum(true, 20)] + [Description("ַ")] + [StringLength(50)] + public string Internet { get; set; } + [IsDataGridColum(true, 21)] + [Description("˰ַ")] + [StringLength(50)] + public string AddressIsTaxable { get; set; } + [IsDataGridColum(true, 22)] + [Description("˰")] + [StringLength(50)] + public string AddressIsTaxIncluded { get; set; } + [IsDataGridColum(true, 23)] + [Description("˰")] + [StringLength(50)] + public string FederalTax { get; set; } + [IsDataGridColum(true, 24)] + [Description("˰")] + [StringLength(50)] + public string StateTax { get; set; } + [IsDataGridColum(true, 25)] + [Description("˰1")] + [StringLength(50)] + public string MiscTax1 { get; set; } + [IsDataGridColum(true, 26)] + [Description("˰2")] + [StringLength(50)] + public string MiscTax2 { get; set; } + [IsDataGridColum(true, 27)] + [Description("˰3")] + [StringLength(50)] + public string MiscTax3 { get; set; } + [IsDataGridColum(true, 28)] + [Description("˰")] + [StringLength(50)] + public string TaxInCity { get; set; } + [IsDataGridColum(true, 29)] + [Description("˰")] + [StringLength(50)] + public string TaxZone { get; set; } + [IsDataGridColum(true, 30)] + [Description("˰")] + [StringLength(50)] + public string TaxClass { get; set; } + [IsDataGridColum(true, 31)] + [Description("˰;")] + [StringLength(50)] + public string TaxUsage { get; set; } + [IsDataGridColum(true, 32)] + [Description("")] + [StringLength(50)] + public string Title { get; set; } + [IsDataGridColum(true, 33)] + [Description("ϵ")] + [StringLength(50)] + public string ContactName { get; set; } + [IsDataGridColum(true, 34)] + [Description("д")] + [StringLength(50)] + public string Initials { get; set; } + [IsDataGridColum(true, 35)] + [Description("")] + [StringLength(50)] + public string Function { get; set; } + [IsDataGridColum(true, 36)] + [Description("Ա")] + [StringLength(50)] + public string Gender { get; set; } + [IsDataGridColum(true, 37)] + [Description("Ҫϵ")] + [StringLength(50)] + public string ContactIsPrimary { get; set; } + [IsDataGridColum(true, 38)] + [Description("Ҫϵ")] + [StringLength(50)] + public string ContactIsSecondary { get; set; } + [IsDataGridColum(true, 39)] + [Description("")] + [StringLength(50)] + public string Compens { get; set; } + [IsDataGridColum(true, 40)] + [Description("Ʊļ")] + [StringLength(50)] + public string GlProfileInvoice { get; set; } + [IsDataGridColum(true, 41)] + [Description("Ʊݿļ")] + [StringLength(50)] + public string GlProfileCreditNote { get; set; } + [IsDataGridColum(true, 42)] + [Description("Ԥļ")] + [StringLength(50)] + public string GlProfilePrepayment { get; set; } + [IsDataGridColum(true, 43)] + [Description("ۼļ")] + [StringLength(50)] + public string GLProfileDeduction { get; set; } + [IsDataGridColum(true, 44)] + [Description("˿ļ")] + [StringLength(50)] + public string AccountGLProfile { get; set; } + [IsDataGridColum(true, 45)] + [Description("ÿļ")] + [StringLength(50)] + public string FinanceChargeProfile { get; set; } + [IsDataGridColum(true, 46)] + [Description("˻ļ")] + [StringLength(50)] + public string SubAccountProfile { get; set; } + [IsDataGridColum(true, 47)] + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + [IsDataGridColum(true, 48)] + [Description("ͻ")] + [StringLength(50)] + public string Customertype { get; set; } + [IsDataGridColum(true, 49)] + [Description("֧")] + [StringLength(50)] + public string CreditTerms { get; set; } + [IsDataGridColum(true, 50)] + [Description("Ʊ״̬")] + [StringLength(50)] + public string InvoiceStatusCode { get; set; } + + [Description("")] + [StringLength(50)] + public string PaymentGroup { get; set; } + + [Description("˵ϸ")] + [StringLength(50)] + public string BillingSchedule { get; set; } + + [Description("Ʊտ")] + [StringLength(50)] + public string BillPayee { get; set; } + + [Description("ƱȨ")] + [StringLength(50)] + public string InvoicebyAuthorization { get; set; } + [IsDataGridColum(true, 51)] + [Description("Ա")] + [StringLength(50)] + public string SalesPerson { get; set; } + [IsDataGridColum(true, 52)] + [Description("ʽ")] + [StringLength(50)] + public string ShipVia { get; set; } + [IsDataGridColum(true, 53)] + [Description("ת˰")] + [StringLength(50)] + public string Resale { get; set; } + [IsDataGridColum(true, 54)] + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + [IsDataGridColum(true, 55)] + [Description("")] + [StringLength(50)] + public string Region { get; set; } + [IsDataGridColum(true, 56)] + [Description("ۿ۱")] + [StringLength(50)] + public string DiscountTable { get; set; } + [IsDataGridColum(true, 57)] + [Description("̶۸")] + [StringLength(50)] + public string FixfdPrice { get; set; } + [IsDataGridColum(true, 58)] + [Description("ռ˼")] + [StringLength(50)] + public string DayBookSet { get; set; } + [IsDataGridColum(true, 59)] + [Description("иʽ")] + [StringLength(50)] + public string BankFormat { get; set; } + [IsDataGridColum(true, 60)] + [Description("ͻ")] + [StringLength(50)] + public string CustomerBank { get; set; } + [IsDataGridColum(true, 61)] + [Description("")] + [StringLength(50)] + public string OwnBank { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 62)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 63)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 64)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [IsDataGridColum(true, 65)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 66)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_CUSTOMER_PART.cs b/北京北汽/SCP/Models/DataCenterTables/TS_CUSTOMER_PART.cs new file mode 100644 index 0000000..622a2f2 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_CUSTOMER_PART.cs @@ -0,0 +1,68 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ͻ")] + public class TS_CUSTOMER_PART : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexCustomerPart", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("ͻ/﷢")] + [StringLength(50)] + public string CustomerShipto { get; set; } + [IsDataGridColum(true, 2)] + [Description("ͻĿ")] + [StringLength(50)] + public string CustomerPart { get; set; } + [IsDataGridColum(true, 3)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 4)] + [Description("ע")] + [StringLength(50)] + public string Comment { get; set; } + [IsDataGridColum(true, 5)] + [Description("ʾͻ")] + [StringLength(50)] + public string DisplayCustomerPart { get; set; } + [IsDataGridColum(true, 6)] + [Description("ͻϹ̱")] + [StringLength(50)] + public string CustomerPartEcoNbr { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 8)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 9)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 10)] + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_CUSTOMER_TYPE.cs b/北京北汽/SCP/Models/DataCenterTables/TS_CUSTOMER_TYPE.cs new file mode 100644 index 0000000..4aba711 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_CUSTOMER_TYPE.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ͻͱ")] + public class TS_CUSTOMER_TYPE : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexCustomerType", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_DEPARTMENT.cs b/北京北汽/SCP/Models/DataCenterTables/TS_DEPARTMENT.cs new file mode 100644 index 0000000..960f178 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_DEPARTMENT.cs @@ -0,0 +1,60 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ű")] + public class TS_DEPARTMENT : IUpdatableTable, ISoftDelete,IDomainSite + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexDepartMent", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("Ŵ")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 7)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_DOMAIN.cs b/北京北汽/SCP/Models/DataCenterTables/TS_DOMAIN.cs new file mode 100644 index 0000000..c54f4dc --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_DOMAIN.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ݱ")] + public class TS_DOMAIN : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexDoMain", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_EDI_DATA.cs b/北京北汽/SCP/Models/DataCenterTables/TS_EDI_DATA.cs new file mode 100644 index 0000000..34c6fac --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_EDI_DATA.cs @@ -0,0 +1,86 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("EDIݱ")] + public class TS_EDI_DATA : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexEdiData", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("۶")] + [StringLength(50)] + public string CustomerOrder { get; set; } + [IsDataGridColum(true, 2)] + [Description("﷢")] + [StringLength(50)] + public string ShipFrom { get; set; } + [IsDataGridColum(true, 3)] + [Description("ͻ")] + [StringLength(50)] + public string Customer { get; set; } + [IsDataGridColum(true, 4)] + [Description("ͻ")] + [StringLength(50)] + public string CustomerPart { get; set; } + [IsDataGridColum(true, 5)] + [Description("к")] + public int Line { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string Part { get; set; } + [IsDataGridColum(true, 7)] + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + [IsDataGridColum(true, 8)] + [Description("ͻο")] + [StringLength(50)] + public string CustomerReference { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + public DateTime ReceiveDate { get; set; } + [IsDataGridColum(true, 10)] + [Description("ʱ")] + public DateTime ReceiveTime { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + public DateTime DemandDate { get; set; } + [IsDataGridColum(true, 12)] + [Description("")] + public decimal DemandQuantity { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 14)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 15)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_ENTITY.cs b/北京北汽/SCP/Models/DataCenterTables/TS_ENTITY.cs new file mode 100644 index 0000000..956d334 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_ENTITY.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("Ƶλ")] + public class TS_ENTITY : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexEntity", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("Ƶλ")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_LINE.cs b/北京北汽/SCP/Models/DataCenterTables/TS_LINE.cs new file mode 100644 index 0000000..e0da8c5 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_LINE.cs @@ -0,0 +1,99 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("߱")] + public class TS_LINE : IUpdatableTable, ISoftDelete, IDomain + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexLine", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string ProductionLine { get; set; } + [IsDataGridColum(true, 2)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + [IsDataGridColum(true, 3)] + [Description("˵")] + [StringLength(50)] + public string Description { get; set; } + [IsDataGridColum(true, 4)] + [Description("/Сʱ")] + public decimal UnitsHour { get; set; } + [IsDataGridColum(true, 5)] + [Description("дС")] + public bool EnableRunSize { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public decimal NumberOfLines { get; set; } + [IsDataGridColum(true, 7)] + [Description("ʱ仺-")] + public int DurationBuffer { get; set; } + [IsDataGridColum(true, 8)] + [Description("ʱ仺ʱ")] + [StringLength(50)] + public string DurationBufferHMS { get; set; } + [IsDataGridColum(true, 9)] + [Description("ʱ-")] + public int SetupTime { get; set; } + [IsDataGridColum(true, 10)] + [Description("ʱ")] + [StringLength(50)] + public string SetupTimeHMS { get; set; } + [IsDataGridColum(true, 11)] + [Description("Զ̶")] + public bool LnAutofirm { get; set; } + [IsDataGridColum(true, 12)] + [Description("ϴԶ̶")] + public DateTime LnLastAutofirm { get; set; } + [IsDataGridColum(true, 13)] + [Description("ID")] + [StringLength(50)] + public string LnScheduler { get; set; } + [IsDataGridColum(true, 14)] + [Description("޽")] + [StringLength(50)] + public string Dtendlit { get; set; } + [IsDataGridColum(true, 15)] + [Description("ں")] + public int EndNumber { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 17)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 18)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_LINE_PART.cs b/北京北汽/SCP/Models/DataCenterTables/TS_LINE_PART.cs new file mode 100644 index 0000000..2c6846b --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_LINE_PART.cs @@ -0,0 +1,113 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ϵ")] + public class TS_LINE_PART : IUpdatableTable, ISoftDelete, IDomain + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexLinePart", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string ProductionLine { get; set; } + [IsDataGridColum(true, 3)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʼ")] + public DateTime StartDate { get; set; } + [IsDataGridColum(true, 5)] + [Description("/Сʱ")] + public decimal UnitsHour { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public decimal NumberOfLines { get; set; } + [IsDataGridColum(true, 7)] + [Description("ʱ-")] + public int SetupTime { get; set; } + [IsDataGridColum(true, 8)] + [Description("ʱ")] + [StringLength(50)] + public string SetupTimeHMS { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + public bool PrimaryLine { get; set; } + [IsDataGridColum(true, 10)] + [Description("Ա")] + public decimal SetupCrew { get; set; } + [IsDataGridColum(true, 11)] + [Description("С")] + public int SetSize { get; set; } + [IsDataGridColum(true, 12)] + [Description("ȫԱ")] + public decimal RunCrew { get; set; } + [IsDataGridColum(true, 13)] + [Description("С")] + public int RunSize { get; set; } + [IsDataGridColum(true, 14)] + [Description("嵥")] + [StringLength(50)] + public string BomCode { get; set; } + [IsDataGridColum(true, 15)] + [Description("")] + [StringLength(50)] + public string Routing { get; set; } + [IsDataGridColum(true, 16)] + [Description("ID")] + [StringLength(50)] + public string ToolId { get; set; } + [IsDataGridColum(true, 17)] + [Description("˳1")] + [StringLength(50)] + public string RunSequence1 { get; set; } + [IsDataGridColum(true, 18)] + [Description("˳2")] + [StringLength(50)] + public string RunSequence2 { get; set; } + [IsDataGridColum(true, 19)] + [Description("ע")] + public bool Comments { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 20)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 21)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 22)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 23)] + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + [IsDataGridColum(true, 24)] + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_LOCATION.cs b/北京北汽/SCP/Models/DataCenterTables/TS_LOCATION.cs new file mode 100644 index 0000000..5b72c63 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_LOCATION.cs @@ -0,0 +1,101 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("λ")] + public class TS_LOCATION : IUpdatableTable, ISoftDelete, IDomain + { + [IsDataGridColum(true, 1)] + [Description("ص")] + [StringLength(50)] + + public string Site { get; set; } + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexLocation", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 2)] + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 4)] + [Description("״̬")] + [StringLength(50)] + public string InventoryStatus { get; set; } + [IsDataGridColum(true, 5)] + [Description("Ŀ")] + [StringLength(50)] + public string Project { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public DateTime DateCreated { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + public bool Permanent { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + [StringLength(50)] + public string Type { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + public bool SinglePart { get; set; } + [IsDataGridColum(true, 10)] + [Description("/ο")] + public bool SingleLotReference { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + public decimal Capacity { get; set; } + [IsDataGridColum(true, 12)] + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + [IsDataGridColum(true, 13)] + [Description("λ")] + public bool ReservedLocations { get; set; } + [IsDataGridColum(true, 14)] + [Description("ʵַ")] + [StringLength(50)] + public string PhysicalAddress { get; set; } + [IsDataGridColum(true, 15)] + [Description("״̬")] + [StringLength(50)] + public string Status { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 17)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 18)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_MES_DATA.cs b/北京北汽/SCP/Models/DataCenterTables/TS_MES_DATA.cs new file mode 100644 index 0000000..b136857 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_MES_DATA.cs @@ -0,0 +1,40 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("Mesݱ")] + public class TS_MES_DATA : IUpdatableTable, ISoftDelete + { + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 2)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 3)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_PACK.cs b/北京北汽/SCP/Models/DataCenterTables/TS_PACK.cs new file mode 100644 index 0000000..efe3d55 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_PACK.cs @@ -0,0 +1,67 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("")] + public class TS_PACK : IUpdatableTable, ISoftDelete, IDomain + { + [IsDataGridColum(true, 1)] + [Description("ص")] + [StringLength(50)] + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexPack", Order = 0, IsUnique = true, IsClustered = false)] + public string Site { get; set; } + [IsDataGridColum(true, 2)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 3)] + [Description("λ")] + [StringLength(50)] + public string UM { get; set; } + [IsDataGridColum(true, 4)] + [Description("üλ")] + [StringLength(50)] + public string AlternateUm { get; set; } + [IsDataGridColum(true, 5)] + [Description("λ")] + public int UmConversion { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 5)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 6)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 7)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_PART_DET.cs b/北京北汽/SCP/Models/DataCenterTables/TS_PART_DET.cs new file mode 100644 index 0000000..c485c5f --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_PART_DET.cs @@ -0,0 +1,247 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ϸ")] + public class TS_PART_DET : IUpdatableTable, ISoftDelete, IDomain + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexPartDet", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 2)] + [Description("ABC ")] + [StringLength(50)] + public string AbcClass { get; set; } + [IsDataGridColum(true, 3)] + [Description("ſ")] + [StringLength(50)] + public string LotControl { get; set; } + [IsDataGridColum(true, 4)] + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + [IsDataGridColum(true, 5)] + [Description("λ")] + [StringLength(50)] + public string LocationType { get; set; } + [IsDataGridColum(true, 6)] + [Description("Զ")] + public bool AutoMaticLotNumbers { get; set; } + [IsDataGridColum(true, 7)] + [Description("ƽ")] + public int AverageInterval { get; set; } + [IsDataGridColum(true, 8)] + [Description("̵")] + public int CycleCountInterval { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + public int ShelfLife { get; set; } + [IsDataGridColum(true, 10)] + [Description("ؼ")] + public bool KeyPart { get; set; } + [IsDataGridColum(true, 11)] + [Description("ɹջ״̬")] + [StringLength(50)] + public string PoReceiptStatus { get; set; } + [IsDataGridColum(true, 12)] + [Description("Ч")] + public bool RctPoActive { get; set; } + [IsDataGridColum(true, 13)] + [Description("ӹջ״̬")] + [StringLength(50)] + public string WoReceiptStatus { get; set; } + [IsDataGridColum(true, 14)] + [Description("Ч")] + public bool RctWoActive { get; set; } + [IsDataGridColum(true, 15)] + [Description("ǿ涩")] + [StringLength(50)] + public string MemoOrderType { get; set; } + [IsDataGridColum(true, 16)] + [Description("ƻ")] + public bool MasterSchedule { get; set; } + [IsDataGridColum(true, 17)] + [Description("ƻ")] + public bool PlanOrders { get; set; } + [IsDataGridColum(true, 18)] + [Description("ʱ")] + public int TimeFence { get; set; } + [IsDataGridColum(true, 19)] + [Description("")] + [StringLength(50)] + public string OrderPolicy { get; set; } + [IsDataGridColum(true, 20)] + [Description("")] + public decimal OrderQuantity { get; set; } + [IsDataGridColum(true, 21)] + [Description("")] + public int OrderPeriod { get; set; } + [IsDataGridColum(true, 22)] + [Description("ȫ")] + public decimal SafetyStock { get; set; } + [IsDataGridColum(true, 23)] + [Description("ȫǰ")] + public decimal SafetyTime { get; set; } + [IsDataGridColum(true, 23)] + [Description("ٶ")] + public decimal ReorderPoint { get; set; } + [IsDataGridColum(true, 25)] + [Description("ƻ޸")] + [StringLength(50)] + public string PlanningRev { get; set; } + [IsDataGridColum(true, 26)] + [Description("ԭ")] + public bool IssuePolicy { get; set; } + [IsDataGridColum(true, 27)] + [Description("ɹԱ/ƻԱ")] + [StringLength(50)] + public string BuyerPlanner { get; set; } + [IsDataGridColum(true, 28)] + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + [IsDataGridColum(true, 29)] + [Description("ɹص")] + [StringLength(50)] + public string PoSite { get; set; } + [IsDataGridColum(true, 30)] + [Description("ɹ/")] + [StringLength(50)] + public string PurMfg { get; set; } + [IsDataGridColum(true, 31)] + [Description("")] + [StringLength(50)] + public string ConfigurationType { get; set; } + [IsDataGridColum(true, 32)] + [Description("λ")] + [StringLength(50)] + public string InspectionLocation { get; set; } + [IsDataGridColum(true, 33)] + [Description("Ҫ")] + public bool InspectionRequired { get; set; } + [IsDataGridColum(true, 34)] + [Description("ǰ")] + public int InspectionLeadTime { get; set; } + [IsDataGridColum(true, 35)] + [Description("ۼǰ")] + public int CumulativeLeadTime { get; set; } + [IsDataGridColum(true, 36)] + [Description("ǰ")] + public int ManufacturingLedaTime { get; set; } + [IsDataGridColum(true, 37)] + [Description("ɹǰ")] + public int PurchaseLeadTime { get; set; } + [IsDataGridColum(true, 38)] + [Description("ATPʵʩˮƽ")] + [StringLength(50)] + public string AtpEnforcementLevel { get; set; } + [IsDataGridColum(true, 39)] + [Description("ϵATP")] + public bool FamilyATP { get; set; } + [IsDataGridColum(true, 40)] + [Description("ATPˮƽ")] + public int AtpHorizon { get; set; } + [IsDataGridColum(true, 41)] + [Description("1")] + [StringLength(50)] + public string RunSeq1 { get; set; } + [IsDataGridColum(true, 42)] + [Description("2")] + [StringLength(50)] + public string RunSeq2 { get; set; } + [IsDataGridColum(true, 43)] + [Description("")] + public bool Phantom { get; set; } + [IsDataGridColum(true, 44)] + [Description("С")] + public decimal MinimumOrder { get; set; } + [IsDataGridColum(true, 45)] + [Description("")] + public decimal MaximumOrder { get; set; } + [IsDataGridColum(true, 46)] + [Description("")] + public decimal OrderMultiple { get; set; } + [IsDataGridColum(true, 47)] + [Description("ڲĹ")] + public bool OperationBasedYield { get; set; } + [IsDataGridColum(true, 48)] + [Description("")] + public decimal YieldPercent { get; set; } + [IsDataGridColum(true, 49)] + [Description("ʱ")] + [StringLength(50)] + public string RunTime { get; set; } + [IsDataGridColum(true, 50)] + [Description("ʱ")] + public decimal SetupTime { get; set; } + [IsDataGridColum(true, 51)] + [Description("EMT")] + [StringLength(50)] + public string EmtType { get; set; } + [IsDataGridColum(true, 52)] + [Description("EMTԶ")] + public bool AutomaticEmtProcessing { get; set; } + [IsDataGridColum(true, 53)] + [Description("")] + [StringLength(50)] + public string NetWorkCode { get; set; } + [IsDataGridColum(true, 54)] + [Description("̴")] + [StringLength(50)] + public string RoutingCode { get; set; } + [IsDataGridColum(true, 55)] + [Description("嵥/䷽")] + [StringLength(50)] + public string BomFormulaCode { get; set; } + [IsDataGridColum(true, 56)] + [Description("")] + [StringLength(50)] + public string ReplenishmentMethod { get; set; } + [IsDataGridColum(true, 57)] + [Description("Ƿ")] + [StringLength(50)] + public string IsMaster { get; set; } + [IsDataGridColum(true, 58)] + [Description("ɫ")] + [StringLength(50)] + public string PartColor { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 59)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 60)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 61)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 62)] + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + [IsDataGridColum(true, 63)] + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + [IsDataGridColum(true, 64)] + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_PART_MSTR.cs b/北京北汽/SCP/Models/DataCenterTables/TS_PART_MSTR.cs new file mode 100644 index 0000000..54ed280 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_PART_MSTR.cs @@ -0,0 +1,140 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("")] + public class TS_PART_MSTR : IUpdatableTable, ISoftDelete, IDomain + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexPartMstr", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 2)] + [Description("1")] + [StringLength(50)] + public string Desc1 { get; set; } + [IsDataGridColum(true, 3)] + [Description("2")] + [StringLength(50)] + public string Desc2 { get; set; } + [IsDataGridColum(true, 4)] + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + [IsDataGridColum(true, 5)] + [Description("Ʒ")] + [StringLength(50)] + public string ProdLine { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public DateTime AddDate { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string DsgnGroup { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + [StringLength(50)] + public string PromotionGroup { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string PartType { get; set; } + [IsDataGridColum(true, 10)] + [Description("״̬")] + [StringLength(50)] + public string Status { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + [StringLength(50)] + public string Group { get; set; } + [IsDataGridColum(true, 12)] + [Description("ͼֽ")] + [StringLength(50)] + public string Drawing { get; set; } + [IsDataGridColum(true, 13)] + [Description("Ŀ޸")] + [StringLength(50)] + public string PartRevision { get; set; } + [IsDataGridColum(true, 14)] + [Description("ͼֽλ")] + [StringLength(50)] + public string DrawingLocation { get; set; } + [IsDataGridColum(true, 15)] + [Description("С")] + [StringLength(50)] + public string Size { get; set; } + [IsDataGridColum(true, 16)] + [Description("۸ۿ")] + [StringLength(50)] + public string PriceBreakCategory { get; set; } + [IsDataGridColum(true, 17)] + [Description("")] + public bool AuxiliaryMaterial { get; set; } + [IsDataGridColum(true, 18)] + [Description("߽")] + public bool OfflineSettlement { get; set; } + [IsDataGridColum(true, 19)] + [Description("Qȼ")] + [StringLength(50)] + public string Qgrade { get; set; } + [IsDataGridColum(true, 20)] + [Description("")] + [StringLength(50)] + public string WmsPartType { get; set; } + [IsDataGridColum(true, 21)] + [Description("ʽ")] + [StringLength(50)] + public string ManageWay { get; set; } + [IsDataGridColum(true, 22)] + [Description("")] + [StringLength(50)] + public string InventoryCode { get; set; } + [IsDataGridColum(true, 23)] + [Description("ͣ/")] + [StringLength(50)] + public string ManageType { get; set; } + [IsDataGridColum(true, 24)] + [Description("Ƿ")] + [StringLength(50)] + public string InspectType { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 24)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 25)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 27)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_PRODUCT_LINE.cs b/北京北汽/SCP/Models/DataCenterTables/TS_PRODUCT_LINE.cs new file mode 100644 index 0000000..3485af9 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_PRODUCT_LINE.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("Ʒ")] + public class TS_PRODUCT_LINE : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexPartMstr", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("Ʒ")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("Ӧ˰")] + public bool Taxable { get; set; } + [IsDataGridColum(true, 4)] + [Description("˰")] + public int TaxClass { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 5)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 6)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 7)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_PROJECT.cs b/北京北汽/SCP/Models/DataCenterTables/TS_PROJECT.cs new file mode 100644 index 0000000..41bf2e1 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_PROJECT.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("Ŀ")] + public class TS_PROJECT : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexProject", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_PURCHASE_PRICE.cs b/北京北汽/SCP/Models/DataCenterTables/TS_PURCHASE_PRICE.cs new file mode 100644 index 0000000..ce8a328 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_PURCHASE_PRICE.cs @@ -0,0 +1,84 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ɹ۸")] + public class TS_PURCHASE_PRICE : IUpdatableTable, ISoftDelete, IDomain + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexPurchasePrice", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("Ŀ")] + [StringLength(50)] + public string PriceList { get; set; } + [IsDataGridColum(true, 2)] + [Description("˵")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("Ʒ")] + [StringLength(50)] + public string ProductLine { get; set; } + [IsDataGridColum(true, 4)] + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + [IsDataGridColum(true, 5)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 6)] + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + [IsDataGridColum(true, 7)] + [Description("ʼ")] + public DateTime Start { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + public DateTime ExpireDate { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string AmountType { get; set; } + [IsDataGridColum(true, 10)] + [Description("")] + public decimal Amount { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 12)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 13)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_ROUTING.cs b/北京北汽/SCP/Models/DataCenterTables/TS_ROUTING.cs new file mode 100644 index 0000000..45baf11 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_ROUTING.cs @@ -0,0 +1,132 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ձ")] + public class TS_ROUTING : IUpdatableTable, ISoftDelete, IDomainSite + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexRouting", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("̴")] + [StringLength(50)] + public string RoutingCode { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + public int Operation { get; set; } + [IsDataGridColum(true, 3)] + [Description("ʼ")] + public DateTime StartDate { get; set; } + [IsDataGridColum(true, 4)] + [Description("׼")] + [StringLength(50)] + public string StandardOperration { get; set; } + [IsDataGridColum(true, 5)] + [Description("")] + [StringLength(50)] + public string WorkCenter { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string Machine { get; set; } + [IsDataGridColum(true, 7)] + [Description("˵")] + [StringLength(50)] + public string Description { get; set; } + [IsDataGridColum(true, 8)] + [Description("/")] + public int MachinesPerOperation { get; set; } + [IsDataGridColum(true, 9)] + [Description("ƽмӹ")] + public int OverlapUnits { get; set; } + [IsDataGridColum(true, 10)] + [Description("Ŷʱ")] + public decimal QueueTime { get; set; } + [IsDataGridColum(true, 11)] + [Description("ȴʱ")] + public decimal WaitTime { get; set; } + [IsDataGridColum(true, 12)] + [Description("ֽ׶εĹ")] + public bool MilestoneOperation { get; set; } + [IsDataGridColum(true, 13)] + [Description("תǰ")] + public int SubcontractLt { get; set; } + [IsDataGridColum(true, 14)] + [Description("Ա")] + public decimal SetupCrew { get; set; } + [IsDataGridColum(true, 15)] + [Description("ȫԱ")] + public decimal RunCrew { get; set; } + [IsDataGridColum(true, 16)] + [Description("ʱ")] + public decimal SetupTime { get; set; } + [IsDataGridColum(true, 17)] + [Description("ʱ")] + public decimal RunTime { get; set; } + [IsDataGridColum(true, 18)] + [Description("ƶʱ")] + public decimal MoveTime { get; set; } + [IsDataGridColum(true, 19)] + [Description("")] + public DateTime EndDate { get; set; } + [IsDataGridColum(true, 20)] + [Description("")] + public decimal YieldPercent { get; set; } + [IsDataGridColum(true, 21)] + [Description("ߴ")] + [StringLength(50)] + public string ToolCode { get; set; } + [IsDataGridColum(true, 22)] + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + [IsDataGridColum(true, 23)] + [Description("ֵ")] + public decimal InventoryValue { get; set; } + [IsDataGridColum(true, 24)] + [Description("תɱ")] + public decimal SubcontractCost { get; set; } + [IsDataGridColum(true, 25)] + [Description("ע")] + public bool Comments { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 26)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 27)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 28)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_SALE_PRICE.cs b/北京北汽/SCP/Models/DataCenterTables/TS_SALE_PRICE.cs new file mode 100644 index 0000000..3a6023f --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_SALE_PRICE.cs @@ -0,0 +1,84 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ۼ۸")] + public class TS_SALE_PRICE : IUpdatableTable, ISoftDelete, IDomain + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexSalePrice", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("Ŀ")] + [StringLength(50)] + public string PriceList { get; set; } + [IsDataGridColum(true, 2)] + [Description("˵")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("Ʒ")] + [StringLength(50)] + public string ProductLine { get; set; } + [IsDataGridColum(true, 4)] + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + [IsDataGridColum(true, 5)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 6)] + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + [IsDataGridColum(true, 7)] + [Description("ʼ")] + public DateTime Start { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + public DateTime ExpireDate { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string AmountType { get; set; } + [IsDataGridColum(true, 10)] + [Description("")] + public decimal Amount { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 12)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 13)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_SHIFT.cs b/北京北汽/SCP/Models/DataCenterTables/TS_SHIFT.cs new file mode 100644 index 0000000..9920911 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_SHIFT.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ת")] + public class TS_SHIFT : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexShift", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_SITE.cs b/北京北汽/SCP/Models/DataCenterTables/TS_SITE.cs new file mode 100644 index 0000000..2709d5d --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_SITE.cs @@ -0,0 +1,97 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ص")] + public class TS_SITE : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexSite", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 4)] + [Description("Ƶλ")] + [StringLength(50)] + public string Entity { get; set; } + [IsDataGridColum(true, 5)] + [Description("״̬")] + [StringLength(50)] + public string Status { get; set; } + [IsDataGridColum(true, 6)] + [Description("Զɿλ")] + public bool AutoLocation { get; set; } + [IsDataGridColum(true, 7)] + [Description("λ")] + [StringLength(50)] + public string InspLocation { get; set; } + [IsDataGridColum(true, 8)] + [Description("EMTӦ")] + [StringLength(50)] + public string BtbSupplier { get; set; } + [IsDataGridColum(true, 9)] + [Description("ⲿӦ")] + public bool ExtSupplier { get; set; } + [IsDataGridColum(true, 10)] + [Description("תƲĿ")] + [StringLength(50)] + public string XferAcct { get; set; } + [IsDataGridColum(true, 11)] + [Description("תƲ˻")] + [StringLength(50)] + public string XferSub { get; set; } + [IsDataGridColum(true, 12)] + [Description("תƲɱ")] + [StringLength(50)] + public string XferCc { get; set; } + [IsDataGridColum(true, 13)] + [Description("POλ")] + [StringLength(50)] + public string GitLocation { get; set; } + [IsDataGridColum(true, 14)] + [Description("ʹüƻ/ȵĹ̨")] + public bool UsePlanSchedWbs { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 15)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 16)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 17)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_STAND_COST_PRICE.cs b/北京北汽/SCP/Models/DataCenterTables/TS_STAND_COST_PRICE.cs new file mode 100644 index 0000000..0d964bf --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_STAND_COST_PRICE.cs @@ -0,0 +1,69 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("׼ɱ۸")] + public class TS_STAND_COST_PRICE : IUpdatableTable, ISoftDelete, IDomain + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexStandCostPrice", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("Ϻ")] + [StringLength(50)] + public string Part { get; set; } + [IsDataGridColum(true, 2)] + [Description("ϳɱ")] + public int MaterialCost { get; set; } + [IsDataGridColum(true, 3)] + [Description("˹ɱ")] + public int LaborCost { get; set; } + [IsDataGridColum(true, 4)] + [Description("ӳɱ")] + public int BurdenCost { get; set; } + [IsDataGridColum(true, 5)] + [Description("ɱ")] + public int OverheadCost { get; set; } + [IsDataGridColum(true, 6)] + [Description("תɱ")] + public int SubcontrCost { get; set; } + [IsDataGridColum(true, 7)] + [Description("ɱ")] + public int CostSet { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 9)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 10)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_SUB_ACCOUNT.cs b/北京北汽/SCP/Models/DataCenterTables/TS_SUB_ACCOUNT.cs new file mode 100644 index 0000000..c633764 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_SUB_ACCOUNT.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("˻")] + public class TS_SUB_ACCOUNT : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexSubAccount", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("˻")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("˻")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_SUPPLIER.cs b/北京北汽/SCP/Models/DataCenterTables/TS_SUPPLIER.cs new file mode 100644 index 0000000..3c5dfa7 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_SUPPLIER.cs @@ -0,0 +1,309 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("Ӧ̱")] + public class TS_SUPPLIER : IUpdatableTable, ISoftDelete, IDomain + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexSupplier", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("Ӧ̴")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("Ӧ")] + [StringLength(50)] + public string Name { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string SearchName { get; set; } + [IsDataGridColum(true, 4)] + [Description("м")] + [StringLength(50)] + public string SecondName { get; set; } + [IsDataGridColum(true, 5)] + [Description("")] + [StringLength(50)] + public string ThirdName { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string GroupName { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + public bool Active { get; set; } + [IsDataGridColum(true, 8)] + [Description("Ӧ̵ַ")] + [StringLength(50)] + public string Address1 { get; set; } + [IsDataGridColum(true, 9)] + [Description("Ӧ̵ַ")] + [StringLength(50)] + public string Address2 { get; set; } + [IsDataGridColum(true, 10)] + [Description("Ӧ̵ַ")] + [StringLength(50)] + public string Address3 { get; set; } + [IsDataGridColum(true, 11)] + [Description("ʱ")] + public int ZipCode { get; set; } + [IsDataGridColum(true, 12)] + [Description("")] + [StringLength(50)] + public string City { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + [StringLength(50)] + public string Country { get; set; } + [IsDataGridColum(true, 14)] + [Description("绰")] + public int Telephone { get; set; } + [IsDataGridColum(true, 15)] + [Description("ʡ")] + [StringLength(50)] + public string province { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string County { get; set; } + [IsDataGridColum(true, 17)] + [Description("")] + public int Fax { get; set; } + [IsDataGridColum(true, 18)] + [Description("Դ")] + [StringLength(50)] + public string LanguageCode { get; set; } + [IsDataGridColum(true, 19)] + [Description("ʼ")] + public int Email { get; set; } + [IsDataGridColum(true, 20)] + [Description("ַ")] + public int Internet { get; set; } + [IsDataGridColum(true, 21)] + [Description("˰ַ")] + public bool AddressIsTaxable { get; set; } + [IsDataGridColum(true, 22)] + [Description("˰")] + public bool AddressIsTaxIncluded { get; set; } + [IsDataGridColum(true, 23)] + [Description("˰")] + [StringLength(50)] + public string FederalTax { get; set; } + [IsDataGridColum(true, 24)] + [Description("˰")] + [StringLength(50)] + public string StateTax { get; set; } + [IsDataGridColum(true, 25)] + [Description("˰1")] + [StringLength(50)] + public string MiscTax1 { get; set; } + [IsDataGridColum(true, 26)] + [Description("˰2")] + [StringLength(50)] + public string MiscTax2 { get; set; } + [IsDataGridColum(true, 27)] + [Description("˰3")] + [StringLength(50)] + public string MiscTax3 { get; set; } + [IsDataGridColum(true, 28)] + [Description("˰")] + public bool TaxInCity { get; set; } + [IsDataGridColum(true, 29)] + [Description("˰")] + [StringLength(50)] + public string TaxZone { get; set; } + [IsDataGridColum(true, 30)] + [Description("˰")] + public int TaxClass { get; set; } + [IsDataGridColum(true, 31)] + [Description("˰;")] + [StringLength(50)] + public string TaxUsage { get; set; } + [IsDataGridColum(true, 32)] + [Description("")] + [StringLength(50)] + public string Title { get; set; } + [IsDataGridColum(true, 33)] + [Description("ϵ")] + [StringLength(50)] + public string ContactName { get; set; } + [IsDataGridColum(true, 34)] + [Description("д")] + [StringLength(50)] + public string Initials { get; set; } + [IsDataGridColum(true, 35)] + [Description("")] + [StringLength(50)] + public string Function { get; set; } + [IsDataGridColum(true, 36)] + [Description("Ա")] + [StringLength(50)] + public string Gender { get; set; } + [IsDataGridColum(true, 37)] + [Description("Ҫϵ")] + public bool ContactIsPrimary { get; set; } + [IsDataGridColum(true, 38)] + [Description("Ҫϵ")] + public bool ContactIsSecondary { get; set; } + [IsDataGridColum(true, 39)] + [Description("")] + public bool Compens { get; set; } + [IsDataGridColum(true, 40)] + [Description("Ʊļ")] + public int GlProfileInvoice { get; set; } + [IsDataGridColum(true, 41)] + [Description("Ʊݿļ")] + public int GlProfileCreditNote { get; set; } + [IsDataGridColum(true, 42)] + [Description("Ԥļ")] + public int GlProfilePrepayment { get; set; } + [IsDataGridColum(true, 43)] + [Description("˿ļ")] + public int AccountGLProfile { get; set; } + [IsDataGridColum(true, 44)] + [Description("˻ļ")] + public int SubAccountProfile { get; set; } + [IsDataGridColum(true, 45)] + [Description("Ŵ")] + [StringLength(50)] + public string CreditAgencyReference { get; set; } + [IsDataGridColum(true, 46)] + [Description("̻")] + [StringLength(50)] + public string CommerceNumber { get; set; } + [IsDataGridColum(true, 47)] + [Description("TID֪ͨ")] + [StringLength(50)] + public string TidNotice { get; set; } + [IsDataGridColum(true, 48)] + [Description("ⲿͻ")] + [StringLength(50)] + public string ExternalCustomerNumber { get; set; } + [IsDataGridColum(true, 49)] + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + [IsDataGridColum(true, 1505)] + [Description("Ӧ")] + [StringLength(50)] + public string SupplierType { get; set; } + [IsDataGridColum(true, 51)] + [Description("ɹ")] + [StringLength(50)] + public string Purchasetype { get; set; } + [IsDataGridColum(true, 52)] + [Description("֧")] + [StringLength(50)] + public string CreditTerms { get; set; } + [IsDataGridColum(true, 53)] + [Description("Ʊ״̬")] + [StringLength(50)] + public string InvoiceStatusCode { get; set; } + [IsDataGridColum(true, 54)] + [Description("")] + [StringLength(50)] + public string PaymentGroup { get; set; } + [IsDataGridColum(true, 55)] + [Description("ͻ")] + public bool SendRemittance { get; set; } + [IsDataGridColum(true, 56)] + [Description("ָ")] + public bool SplitAccount { get; set; } + [IsDataGridColum(true, 57)] + [Description("ʽ")] + [StringLength(50)] + public string ShipVia { get; set; } + [IsDataGridColum(true, 58)] + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + [IsDataGridColum(true, 59)] + [Description("")] + [StringLength(50)] + public string Carrier { get; set; } + [IsDataGridColum(true, 60)] + [Description("ɹϵ")] + [StringLength(50)] + public string Purchasecontact { get; set; } + [IsDataGridColum(true, 61)] + [Description("ռ˼")] + [StringLength(50)] + public string DayBookSet { get; set; } + [IsDataGridColum(true, 62)] + [Description("幩Ӧ")] + public bool KanBanSupplier { get; set; } + [IsDataGridColum(true, 63)] + [Description("")] + [StringLength(50)] + public string PromotionGroup { get; set; } + [IsDataGridColum(true, 64)] + [Description("ɹԱ")] + [StringLength(50)] + public string Buyer { get; set; } + [IsDataGridColum(true, 65)] + [Description("۸")] + [StringLength(50)] + public string PriceTable { get; set; } + [IsDataGridColum(true, 66)] + [Description("ۿ۱")] + [StringLength(50)] + public string DiscountTable { get; set; } + [IsDataGridColum(true, 67)] + [Description("̶۸")] + public bool FixedPrice { get; set; } + [IsDataGridColum(true, 68)] + [Description("۵۸")] + [StringLength(50)] + public string NonSoPrice { get; set; } + [IsDataGridColum(true, 69)] + [Description("иʽ")] + [StringLength(50)] + public string BankFormat { get; set; } + [IsDataGridColum(true, 70)] + [Description("Ӧ")] + [StringLength(50)] + public string SupplierBank { get; set; } + [IsDataGridColum(true, 71)] + [Description("")] + [StringLength(50)] + public string OwnBank { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 72)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 73)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 74)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_SUPPLIER_PART.cs b/北京北汽/SCP/Models/DataCenterTables/TS_SUPPLIER_PART.cs new file mode 100644 index 0000000..f12e627 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_SUPPLIER_PART.cs @@ -0,0 +1,100 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("Ӧ")] + public class TS_SUPPLIER_PART : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexSupplierPart", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [Index("IndexSupplierPart", Order = 1, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 2)] + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + [IsDataGridColum(true, 3)] + [Description("Ӧ")] + [StringLength(50)] + public string SupplierPart { get; set; } + [IsDataGridColum(true, 4)] + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + [IsDataGridColum(true, 5)] + [Description("Ӧǰ")] + public int SupplierLeadTime { get; set; } + [IsDataGridColum(true, 6)] + [Description("ʹÿͻ")] + public bool UseSoReductionPrice { get; set; } + [IsDataGridColum(true, 7)] + [Description("ͻ")] + public decimal SoPriceReduction { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + [IsDataGridColum(true, 9)] + [Description("۵۸")] + public decimal QuotePrice { get; set; } + [IsDataGridColum(true, 10)] + [Description("")] + public DateTime QuoteDate { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + public decimal QuoteQty { get; set; } + [IsDataGridColum(true, 12)] + [Description("Ŀ")] + [StringLength(50)] + public string PriceList { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + [StringLength(50)] + public string Manufacturer { get; set; } + [IsDataGridColum(true, 14)] + [Description("")] + [StringLength(50)] + public string ManufacturerPart { get; set; } + [IsDataGridColum(true, 15)] + [Description("ע")] + [StringLength(50)] + public string Comment { get; set; } + + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 17)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 18)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_SUPPLIER_TYPE.cs b/北京北汽/SCP/Models/DataCenterTables/TS_SUPPLIER_TYPE.cs new file mode 100644 index 0000000..93bd211 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_SUPPLIER_TYPE.cs @@ -0,0 +1,51 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("Ӧͱ")] + public class TS_SUPPLIER_TYPE : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexSupplierType", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_TEAM.cs b/北京北汽/SCP/Models/DataCenterTables/TS_TEAM.cs new file mode 100644 index 0000000..44a30de --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_TEAM.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("Ŷӱ")] + public class TS_TEAM : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexTeam", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true,2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_WMS_LOCATION.cs b/北京北汽/SCP/Models/DataCenterTables/TS_WMS_LOCATION.cs new file mode 100644 index 0000000..b3f26be --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_WMS_LOCATION.cs @@ -0,0 +1,96 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("WMSλ")] + public class TS_WMS_LOCATION : IUpdatableTable, ISoftDelete, IDomainSite + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexWmsLocation", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("ERPλ")] + [StringLength(50)] + public string ErpLocation { get; set; } + [IsDataGridColum(true, 4)] + [Description("")] + [StringLength(50)] + public string Area { get; set; } + [IsDataGridColum(true, 5)] + [Description("״̬")] + [StringLength(50)] + public string InventoryStatus { get; set; } + [IsDataGridColum(true, 6)] + [Description("Ա")] + [StringLength(50)] + public string WarehouseKeeper { get; set; } + [IsDataGridColum(true, 7)] + [Description("ֿ")] + [StringLength(50)] + public string WhseCode { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + public bool IsEnableNegativeStock { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + public bool AutoRemoveZeroStockDetail { get; set; } + [IsDataGridColum(true, 10)] + [Description("")] + public decimal MaxBoxQty { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + public bool IsEnableMix { get; set; } + [IsDataGridColum(true, 12)] + [Description("Ŀ")] + [StringLength(50)] + public string ProjectId { get; set; } + + + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 14)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 15)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TS_WORK_CENTER.cs b/北京北汽/SCP/Models/DataCenterTables/TS_WORK_CENTER.cs new file mode 100644 index 0000000..2c552d7 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TS_WORK_CENTER.cs @@ -0,0 +1,102 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ı")] + public class TS_WORK_CENTER : IUpdatableTable, ISoftDelete + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexWorkCenter", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("Ĵ")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string Department { get; set; } + [IsDataGridColum(true, 4)] + [Description("Զ̶")] + public bool AutoFirm { get; set; } + [IsDataGridColum(true, 5)] + [Description("ϴԶ̶")] + public DateTime LastAutoFirm { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string Scheduler { get; set; } + [IsDataGridColum(true, 7)] + [Description("ȴʱ")] + public decimal Queue { get; set; } + [IsDataGridColum(true, 8)] + [Description("ȴʱ")] + public decimal Wait { get; set; } + [IsDataGridColum(true, 9)] + [Description("豸/")] + public int MchOp { get; set; } + [IsDataGridColum(true, 10)] + [Description("Ա")] + public decimal SetupMen { get; set; } + [IsDataGridColum(true, 11)] + [Description("ȫԱ")] + public decimal RunCrew { get; set; } + [IsDataGridColum(true, 12)] + [Description("")] + public decimal MchWkctr { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + public decimal MchBdn { get; set; } + [IsDataGridColum(true, 14)] + [Description("÷")] + public decimal SetupRte { get; set; } + [IsDataGridColum(true, 15)] + [Description("˹")] + public decimal LbrRate { get; set; } + [IsDataGridColum(true, 16)] + [Description("˹")] + public decimal BdnRate { get; set; } + [IsDataGridColum(true, 17)] + [Description("˹")] + public decimal BdnPct { get; set; } + [IsDataGridColum(true, 18)] + [Description("")] + [StringLength(50)] + public string Mch { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 19)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 20)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 21)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_ACCOUNT.cs b/北京北汽/SCP/Models/DataCenterTables/TT_ACCOUNT.cs new file mode 100644 index 0000000..07869f6 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_ACCOUNT.cs @@ -0,0 +1,59 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ExchangeCenterTables; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("Ŀ")] + public class TT_ACCOUNT : TED_BASE, ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true,5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_BOM.cs b/北京北汽/SCP/Models/DataCenterTables/TT_BOM.cs new file mode 100644 index 0000000..db1f658 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_BOM.cs @@ -0,0 +1,103 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("BOM")] + + public class TT_BOM : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string ParentPart { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string ComponentPart { get; set; } + [IsDataGridColum(true, 3)] + [Description("ο")] + [StringLength(50)] + public string Reference { get; set; } + [IsDataGridColum(true, 4)] + [Description("Ч")] + public DateTime StartEffective { get; set; } + [IsDataGridColum(true, 5)] + [Description("ÿ")] + public decimal QuantityPer { get; set; } + [IsDataGridColum(true,6)] + [Description("ṹ")] + [StringLength(50)] + public string StructureType { get; set; } + [IsDataGridColum(true, 7)] + [Description("Ч")] + public DateTime EndEffective { get; set; } + [IsDataGridColum(true, 8)] + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + [IsDataGridColum(true, 9)] + [Description("Ʒ")] + public decimal Scrap { get; set; } + [IsDataGridColum(true, 10)] + [Description("ǰ")] + public int LeadTimeOffset { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + public int Operation { get; set; } + [IsDataGridColum(true, 12)] + [Description("")] + public int SequenceNumber { get; set; } + [IsDataGridColum(true, 13)] + [Description("Ԥٷֱ")] + public decimal FporecastPercent { get; set; } + [IsDataGridColum(true, 14)] + [Description("")] + [StringLength(50)] + public string OptionGroup { get; set; } + [IsDataGridColum(true, 15)] + [Description("")] + [StringLength(50)] + public string Process { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 17)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 18)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 19)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 20)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 21)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_CODE.cs b/北京北汽/SCP/Models/DataCenterTables/TT_CODE.cs new file mode 100644 index 0000000..daf9328 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_CODE.cs @@ -0,0 +1,60 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ͨô")] + public class TT_CODE : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("ͨô")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 10)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_CODE_TYPE.cs b/北京北汽/SCP/Models/DataCenterTables/TT_CODE_TYPE.cs new file mode 100644 index 0000000..f06d850 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_CODE_TYPE.cs @@ -0,0 +1,59 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ͨôͱ")] + public class TT_CODE_TYPE : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("ͨʹ")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 10)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_COLOR.cs b/北京北汽/SCP/Models/DataCenterTables/TT_COLOR.cs new file mode 100644 index 0000000..92a99d4 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_COLOR.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ɫ")] + public class TT_COLOR : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 18)] + [Description("ID")] + public Guid DataID { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 10)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_COST_CENTER.cs b/北京北汽/SCP/Models/DataCenterTables/TT_COST_CENTER.cs new file mode 100644 index 0000000..8ef17b7 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_COST_CENTER.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ɱı")] + public class TT_COST_CENTER : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 10)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_CUSTOMER.cs b/北京北汽/SCP/Models/DataCenterTables/TT_CUSTOMER.cs new file mode 100644 index 0000000..5a60e40 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_CUSTOMER.cs @@ -0,0 +1,309 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ͻ")] + public class TT_CUSTOMER : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("ͻ")] + [StringLength(50)] + public string CustomerCode { get; set; } + [IsDataGridColum(true, 2)] + [Description("ͻ")] + [StringLength(50)] + public string CustomerName { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string SearchName { get; set; } + [IsDataGridColum(true, 4)] + [Description("м")] + [StringLength(50)] + public string SecondName { get; set; } + [IsDataGridColum(true, 5)] + [Description("")] + [StringLength(50)] + public string ThirdName { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string GroupName { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string Active { get; set; } + [IsDataGridColum(true, 8)] + [Description("ͻַ")] + [StringLength(50)] + public string Address1 { get; set; } + [IsDataGridColum(true, 9)] + [Description("ͻַ")] + [StringLength(50)] + public string Address2 { get; set; } + [IsDataGridColum(true, 10)] + [Description("ͻַ")] + [StringLength(50)] + public string Address3 { get; set; } + [IsDataGridColum(true, 11)] + [Description("ʱ")] + [StringLength(50)] + public string ZipCode { get; set; } + [IsDataGridColum(true, 12)] + [Description("")] + [StringLength(50)] + public string City { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + [StringLength(50)] + public string Country { get; set; } + [IsDataGridColum(true, 14)] + [Description("绰")] + [StringLength(50)] + public string Telephone { get; set; } + [IsDataGridColum(true, 15)] + [Description("ʡ")] + [StringLength(50)] + public string province { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string County { get; set; } + [IsDataGridColum(true, 17)] + [Description("")] + [StringLength(50)] + public string Fax { get; set; } + [IsDataGridColum(true, 18)] + [Description("Դ")] + [StringLength(50)] + public string LanguageCode { get; set; } + [IsDataGridColum(true, 19)] + [Description("ʼ")] + [StringLength(50)] + public string Email { get; set; } + [IsDataGridColum(true, 20)] + [Description("ַ")] + [StringLength(50)] + public string Internet { get; set; } + [IsDataGridColum(true, 21)] + [Description("˰ַ")] + [StringLength(50)] + public string AddressIsTaxable { get; set; } + [IsDataGridColum(true, 22)] + [Description("˰")] + [StringLength(50)] + public string AddressIsTaxIncluded { get; set; } + [IsDataGridColum(true, 23)] + [Description("˰")] + [StringLength(50)] + public string FederalTax { get; set; } + [IsDataGridColum(true, 24)] + [Description("˰")] + [StringLength(50)] + public string StateTax { get; set; } + [IsDataGridColum(true, 25)] + [Description("˰1")] + [StringLength(50)] + public string MiscTax1 { get; set; } + [IsDataGridColum(true, 26)] + [Description("˰2")] + [StringLength(50)] + public string MiscTax2 { get; set; } + [IsDataGridColum(true, 27)] + [Description("˰3")] + [StringLength(50)] + public string MiscTax3 { get; set; } + [IsDataGridColum(true, 28)] + [Description("˰")] + [StringLength(50)] + public string TaxInCity { get; set; } + [IsDataGridColum(true, 29)] + [Description("˰")] + [StringLength(50)] + public string TaxZone { get; set; } + [IsDataGridColum(true, 30)] + [Description("˰")] + [StringLength(50)] + public string TaxClass { get; set; } + [IsDataGridColum(true, 31)] + [Description("˰;")] + [StringLength(50)] + public string TaxUsage { get; set; } + [IsDataGridColum(true, 32)] + [Description("")] + [StringLength(50)] + public string Title { get; set; } + [IsDataGridColum(true, 33)] + [Description("ϵ")] + [StringLength(50)] + public string ContactName { get; set; } + [IsDataGridColum(true, 34)] + [Description("д")] + [StringLength(50)] + public string Initials { get; set; } + [IsDataGridColum(true, 35)] + [Description("")] + [StringLength(50)] + public string Function { get; set; } + [IsDataGridColum(true, 36)] + [Description("Ա")] + [StringLength(50)] + public string Gender { get; set; } + [IsDataGridColum(true, 37)] + [Description("Ҫϵ")] + [StringLength(50)] + public string ContactIsPrimary { get; set; } + [IsDataGridColum(true, 38)] + [Description("Ҫϵ")] + [StringLength(50)] + public string ContactIsSecondary { get; set; } + [IsDataGridColum(true, 39)] + [Description("")] + [StringLength(50)] + public string Compens { get; set; } + [IsDataGridColum(true, 40)] + [Description("Ʊļ")] + [StringLength(50)] + public string GlProfileInvoice { get; set; } + [IsDataGridColum(true, 41)] + [Description("Ʊݿļ")] + [StringLength(50)] + public string GlProfileCreditNote { get; set; } + [IsDataGridColum(true, 42)] + [Description("Ԥļ")] + [StringLength(50)] + public string GlProfilePrepayment { get; set; } + [IsDataGridColum(true, 43)] + [Description("ۼļ")] + [StringLength(50)] + public string GLProfileDeduction { get; set; } + [IsDataGridColum(true, 44)] + [Description("˿ļ")] + [StringLength(50)] + public string AccountGLProfile { get; set; } + [IsDataGridColum(true, 45)] + [Description("ÿļ")] + [StringLength(50)] + public string FinanceChargeProfile { get; set; } + [IsDataGridColum(true, 46)] + [Description("˻ļ")] + [StringLength(50)] + public string SubAccountProfile { get; set; } + [IsDataGridColum(true, 47)] + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + [IsDataGridColum(true, 48)] + [Description("ͻ")] + [StringLength(50)] + public string Customertype { get; set; } + [IsDataGridColum(true, 49)] + [Description("֧")] + [StringLength(50)] + public string CreditTerms { get; set; } + [IsDataGridColum(true, 50)] + [Description("Ʊ״̬")] + [StringLength(50)] + public string InvoiceStatusCode { get; set; } + + [Description("")] + [StringLength(50)] + public string PaymentGroup { get; set; } + + [Description("˵ϸ")] + [StringLength(50)] + public string BillingSchedule { get; set; } + + [Description("Ʊտ")] + [StringLength(50)] + public string BillPayee { get; set; } + + [Description("ƱȨ")] + [StringLength(50)] + public string InvoicebyAuthorization { get; set; } + [IsDataGridColum(true, 51)] + [Description("Ա")] + [StringLength(50)] + public string SalesPerson { get; set; } + [IsDataGridColum(true, 52)] + [Description("ʽ")] + [StringLength(50)] + public string ShipVia { get; set; } + [IsDataGridColum(true, 53)] + [Description("ת˰")] + [StringLength(50)] + public string Resale { get; set; } + [IsDataGridColum(true, 54)] + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + [IsDataGridColum(true, 55)] + [Description("")] + [StringLength(50)] + public string Region { get; set; } + [IsDataGridColum(true, 56)] + [Description("ۿ۱")] + [StringLength(50)] + public string DiscountTable { get; set; } + [IsDataGridColum(true, 57)] + [Description("̶۸")] + [StringLength(50)] + public string FixfdPrice { get; set; } + [IsDataGridColum(true, 58)] + [Description("ռ˼")] + [StringLength(50)] + public string DayBookSet { get; set; } + [IsDataGridColum(true, 59)] + [Description("иʽ")] + [StringLength(50)] + public string BankFormat { get; set; } + [IsDataGridColum(true, 60)] + [Description("ͻ")] + [StringLength(50)] + public string CustomerBank { get; set; } + [IsDataGridColum(true, 61)] + [Description("")] + [StringLength(50)] + public string OwnBank { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 62)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 63)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 64)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 65)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_CUSTOMER_PART.cs b/北京北汽/SCP/Models/DataCenterTables/TT_CUSTOMER_PART.cs new file mode 100644 index 0000000..29d9461 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_CUSTOMER_PART.cs @@ -0,0 +1,74 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ͻ")] + public class TT_CUSTOMER_PART : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("ͻ/﷢")] + [StringLength(50)] + public string CustomerShipto { get; set; } + [IsDataGridColum(true, 2)] + [Description("ͻĿ")] + [StringLength(50)] + public string CustomerPart { get; set; } + [IsDataGridColum(true, 3)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 4)] + [Description("ע")] + [StringLength(50)] + public string Comment { get; set; } + [IsDataGridColum(true, 5)] + [Description("ʾͻ")] + [StringLength(50)] + public string DisplayCustomerPart { get; set; } + [IsDataGridColum(true, 6)] + [Description("ͻϹ̱")] + [StringLength(50)] + public string CustomerPartEcoNbr { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 8)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 9)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 10)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 12)] + [Description("ID")] + public Guid DataID { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 14)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_CUSTOMER_TYPE.cs b/北京北汽/SCP/Models/DataCenterTables/TT_CUSTOMER_TYPE.cs new file mode 100644 index 0000000..5d2a498 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_CUSTOMER_TYPE.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ͻͱ")] + public class TT_CUSTOMER_TYPE : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 10)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_DEPARTMENT.cs b/北京北汽/SCP/Models/DataCenterTables/TT_DEPARTMENT.cs new file mode 100644 index 0000000..7d0ddf3 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_DEPARTMENT.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ű")] + public class TT_DEPARTMENT : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("Ŵ")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 10)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_DOMAIN.cs b/北京北汽/SCP/Models/DataCenterTables/TT_DOMAIN.cs new file mode 100644 index 0000000..30f56c5 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_DOMAIN.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ݱ")] + public class TT_DOMAIN : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 10)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_EDI_DATA.cs b/北京北汽/SCP/Models/DataCenterTables/TT_EDI_DATA.cs new file mode 100644 index 0000000..f1509b9 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_EDI_DATA.cs @@ -0,0 +1,96 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("EDIݱ")] + public class TT_EDI_DATA : TED_BASE,ITaskTable + { + + [IsDataGridColum(true, 1)] + [Description("۶")] + [StringLength(50)] + public string CustomerOrder { get; set; } + [IsDataGridColum(true, 2)] + [Description("﷢")] + [StringLength(50)] + public string ShipFrom { get; set; } + [IsDataGridColum(true, 3)] + [Description("ͻ")] + [StringLength(50)] + public string Customer { get; set; } + [IsDataGridColum(true, 4)] + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexEdiData", Order = 1, IsUnique = true, IsClustered = false)] + [Description("ͻ")] + [StringLength(50)] + public string CustomerPart { get; set; } + [IsDataGridColum(true, 5)] + [Description("к")] + public int Line { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string Part { get; set; } + [IsDataGridColum(true, 7)] + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + [IsDataGridColum(true, 8)] + [Description("ͻο")] + [StringLength(50)] + public string CustomerReference { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + public DateTime ReceiveDate { get; set; } + [IsDataGridColum(true, 10)] + [Description("ʱ")] + public DateTime ReceiveTime { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + public DateTime DemandDate { get; set; } + [IsDataGridColum(true, 12)] + [Description("")] + public decimal DemandQuantity { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 14)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 15)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 17)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 18)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_ENTITY.cs b/北京北汽/SCP/Models/DataCenterTables/TT_ENTITY.cs new file mode 100644 index 0000000..e236438 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_ENTITY.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("Ƶλ")] + public class TT_ENTITY : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("Ƶλ")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 10)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_LINE.cs b/北京北汽/SCP/Models/DataCenterTables/TT_LINE.cs new file mode 100644 index 0000000..2f47177 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_LINE.cs @@ -0,0 +1,99 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("߱")] + public class TT_LINE : ITaskTable + { + + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string ProductionLine { get; set; } + [IsDataGridColum(true, 2)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + [IsDataGridColum(true, 3)] + [Description("˵")] + [StringLength(50)] + public string Description { get; set; } + [IsDataGridColum(true, 4)] + [Description("/Сʱ")] + public decimal UnitsHour { get; set; } + [IsDataGridColum(true, 5)] + [Description("дС")] + public bool EnableRunSize { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public decimal NumberOfLines { get; set; } + [IsDataGridColum(true, 7)] + [Description("ʱ仺-")] + public int DurationBuffer { get; set; } + [IsDataGridColum(true, 8)] + [Description("ʱ仺ʱ")] + [StringLength(50)] + public string DurationBufferHMS { get; set; } + [IsDataGridColum(true, 9)] + [Description("ʱ-")] + public int SetupTime { get; set; } + [IsDataGridColum(true, 10)] + [Description("ʱ")] + [StringLength(50)] + public string SetupTimeHMS { get; set; } + [IsDataGridColum(true, 11)] + [Description("Զ̶")] + public bool LnAutofirm { get; set; } + [IsDataGridColum(true, 12)] + [Description("ϴԶ̶")] + public DateTime LnLastAutofirm { get; set; } + [IsDataGridColum(true, 13)] + [Description("ID")] + [StringLength(50)] + public string LnScheduler { get; set; } + [IsDataGridColum(true, 14)] + [Description("޽")] + [StringLength(50)] + public string Dtendlit { get; set; } + [IsDataGridColum(true, 15)] + [Description("ں")] + public int EndNumber { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 17)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 15)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 17)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 18)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_LINE_PART.cs b/北京北汽/SCP/Models/DataCenterTables/TT_LINE_PART.cs new file mode 100644 index 0000000..8ef9fe3 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_LINE_PART.cs @@ -0,0 +1,114 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ϵ")] + public class TT_LINE_PART : TED_BASE,ITaskTable + { + + [IsDataGridColum(true, 1)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [Index("IndexLinePart", Order = 1, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string ProductionLine { get; set; } + [IsDataGridColum(true, 3)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʼ")] + public DateTime StartDate { get; set; } + [IsDataGridColum(true, 5)] + [Description("/Сʱ")] + public decimal UnitsHour { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public decimal NumberOfLines { get; set; } + [IsDataGridColum(true, 7)] + [Description("ʱ-")] + public int SetupTime { get; set; } + [IsDataGridColum(true, 8)] + [Description("ʱ")] + [StringLength(50)] + public string SetupTimeHMS { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + public bool PrimaryLine { get; set; } + [IsDataGridColum(true, 10)] + [Description("Ա")] + public decimal SetupCrew { get; set; } + [IsDataGridColum(true, 11)] + [Description("С")] + public int SetSize { get; set; } + [IsDataGridColum(true, 12)] + [Description("ȫԱ")] + public decimal RunCrew { get; set; } + [IsDataGridColum(true, 13)] + [Description("С")] + public int RunSize { get; set; } + [IsDataGridColum(true, 14)] + [Description("嵥")] + [StringLength(50)] + public string BomCode { get; set; } + [IsDataGridColum(true, 15)] + [Description("")] + [StringLength(50)] + public string Routing { get; set; } + [IsDataGridColum(true, 16)] + [Description("ID")] + [StringLength(50)] + public string ToolId { get; set; } + [IsDataGridColum(true, 17)] + [Description("˳1")] + [StringLength(50)] + public string RunSequence1 { get; set; } + [IsDataGridColum(true, 18)] + [Description("˳2")] + [StringLength(50)] + public string RunSequence2 { get; set; } + [IsDataGridColum(true, 19)] + [Description("ע")] + public bool Comments { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 20)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 21)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 22)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 23)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 24)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 25)] + [Description("ID")] + public Guid DataID { get; set; } + [IsDataGridColum(true, 26)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_LOCATION.cs b/北京北汽/SCP/Models/DataCenterTables/TT_LOCATION.cs new file mode 100644 index 0000000..0f35880 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_LOCATION.cs @@ -0,0 +1,103 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ExchangeCenterTables; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("λ")] + public class TT_LOCATION : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("ص")] + [StringLength(50)] + + public string Site { get; set; } + [IsDataGridColum(true, 2)] + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 4)] + [Description("״̬")] + [StringLength(50)] + public string InventoryStatus { get; set; } + [IsDataGridColum(true, 5)] + [Description("Ŀ")] + [StringLength(50)] + public string Project { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public DateTime DateCreated { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + public bool Permanent { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + [StringLength(50)] + public string Type { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + public bool SinglePart { get; set; } + [IsDataGridColum(true, 10)] + [Description("/ο")] + public bool SingleLotReference { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + public decimal Capacity { get; set; } + [IsDataGridColum(true, 12)] + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + [IsDataGridColum(true, 13)] + [Description("λ")] + public bool ReservedLocations { get; set; } + [IsDataGridColum(true, 14)] + [Description("ʵַ")] + [StringLength(50)] + public string PhysicalAddress { get; set; } + [IsDataGridColum(true, 15)] + [Description("״̬")] + [StringLength(50)] + public string Status { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 17)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 18)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 19)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 20)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 21)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_MES_DATA.cs b/北京北汽/SCP/Models/DataCenterTables/TT_MES_DATA.cs new file mode 100644 index 0000000..e38ebf1 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_MES_DATA.cs @@ -0,0 +1,49 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("Mesݱ")] + public class TT_MES_DATA : TED_BASE,ITaskTable + { + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 2)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 3)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 4)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 5)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 6)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_PACK.cs b/北京北汽/SCP/Models/DataCenterTables/TT_PACK.cs new file mode 100644 index 0000000..98a7359 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_PACK.cs @@ -0,0 +1,66 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("")] + public class TT_PACK : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + [IsDataGridColum(true, 2)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 3)] + [Description("λ")] + [StringLength(50)] + public string UM { get; set; } + [IsDataGridColum(true, 4)] + [Description("üλ")] + [StringLength(50)] + public string AlternateUm { get; set; } + [IsDataGridColum(true, 5)] + [Description("λ")] + public int UmConversion { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 7)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 8)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 10)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 11)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_PART_DET.cs b/北京北汽/SCP/Models/DataCenterTables/TT_PART_DET.cs new file mode 100644 index 0000000..fd68cff --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_PART_DET.cs @@ -0,0 +1,254 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ϸ")] + public class TT_PART_DET : TED_BASE,ITaskTable + { + + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 2)] + [Description("ABC ")] + [StringLength(50)] + public string AbcClass { get; set; } + [IsDataGridColum(true, 3)] + [Description("ſ")] + [StringLength(50)] + public string LotControl { get; set; } + [IsDataGridColum(true, 4)] + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + [IsDataGridColum(true, 5)] + [Description("λ")] + [StringLength(50)] + public string LocationType { get; set; } + [IsDataGridColum(true, 6)] + [Description("Զ")] + public bool AutoMaticLotNumbers { get; set; } + [IsDataGridColum(true, 7)] + [Description("ƽ")] + public int AverageInterval { get; set; } + [IsDataGridColum(true, 8)] + [Description("̵")] + public int CycleCountInterval { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + public int ShelfLife { get; set; } + [IsDataGridColum(true, 10)] + [Description("ؼ")] + public bool KeyPart { get; set; } + [IsDataGridColum(true, 11)] + [Description("ɹջ״̬")] + [StringLength(50)] + public string PoReceiptStatus { get; set; } + [IsDataGridColum(true, 12)] + [Description("Ч")] + public bool RctPoActive { get; set; } + [IsDataGridColum(true, 13)] + [Description("ӹջ״̬")] + [StringLength(50)] + public string WoReceiptStatus { get; set; } + [IsDataGridColum(true, 14)] + [Description("Ч")] + public bool RctWoActive { get; set; } + [IsDataGridColum(true, 15)] + [Description("ǿ涩")] + [StringLength(50)] + public string MemoOrderType { get; set; } + [IsDataGridColum(true, 16)] + [Description("ƻ")] + public bool MasterSchedule { get; set; } + [IsDataGridColum(true, 17)] + [Description("ƻ")] + public bool PlanOrders { get; set; } + [IsDataGridColum(true, 18)] + [Description("ʱ")] + public int TimeFence { get; set; } + [IsDataGridColum(true, 19)] + [Description("")] + [StringLength(50)] + public string OrderPolicy { get; set; } + [IsDataGridColum(true, 20)] + [Description("")] + public decimal OrderQuantity { get; set; } + [IsDataGridColum(true, 21)] + [Description("")] + public int OrderPeriod { get; set; } + [IsDataGridColum(true, 22)] + [Description("ȫ")] + public decimal SafetyStock { get; set; } + [IsDataGridColum(true, 23)] + [Description("ȫǰ")] + public decimal SafetyTime { get; set; } + [IsDataGridColum(true, 23)] + [Description("ٶ")] + public decimal ReorderPoint { get; set; } + [IsDataGridColum(true, 25)] + [Description("ƻ޸")] + [StringLength(50)] + public string PlanningRev { get; set; } + [IsDataGridColum(true, 26)] + [Description("ԭ")] + public bool IssuePolicy { get; set; } + [IsDataGridColum(true, 27)] + [Description("ɹԱ/ƻԱ")] + [StringLength(50)] + public string BuyerPlanner { get; set; } + [IsDataGridColum(true, 28)] + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + [IsDataGridColum(true, 29)] + [Description("ɹص")] + [StringLength(50)] + public string PoSite { get; set; } + [IsDataGridColum(true, 30)] + [Description("ɹ/")] + [StringLength(50)] + public string PurMfg { get; set; } + [IsDataGridColum(true, 31)] + [Description("")] + [StringLength(50)] + public string ConfigurationType { get; set; } + [IsDataGridColum(true, 32)] + [Description("λ")] + [StringLength(50)] + public string InspectionLocation { get; set; } + [IsDataGridColum(true, 33)] + [Description("Ҫ")] + public bool InspectionRequired { get; set; } + [IsDataGridColum(true, 34)] + [Description("ǰ")] + public int InspectionLeadTime { get; set; } + [IsDataGridColum(true, 35)] + [Description("ۼǰ")] + public int CumulativeLeadTime { get; set; } + [IsDataGridColum(true, 36)] + [Description("ǰ")] + public int ManufacturingLedaTime { get; set; } + [IsDataGridColum(true, 37)] + [Description("ɹǰ")] + public int PurchaseLeadTime { get; set; } + [IsDataGridColum(true, 38)] + [Description("ATPʵʩˮƽ")] + [StringLength(50)] + public string AtpEnforcementLevel { get; set; } + [IsDataGridColum(true, 39)] + [Description("ϵATP")] + public bool FamilyATP { get; set; } + [IsDataGridColum(true, 40)] + [Description("ATPˮƽ")] + public int AtpHorizon { get; set; } + [IsDataGridColum(true, 41)] + [Description("1")] + [StringLength(50)] + public string RunSeq1 { get; set; } + [IsDataGridColum(true, 42)] + [Description("2")] + [StringLength(50)] + public string RunSeq2 { get; set; } + [IsDataGridColum(true, 43)] + [Description("")] + public bool Phantom { get; set; } + [IsDataGridColum(true, 44)] + [Description("С")] + public decimal MinimumOrder { get; set; } + [IsDataGridColum(true, 45)] + [Description("")] + public decimal MaximumOrder { get; set; } + [IsDataGridColum(true, 46)] + [Description("")] + public decimal OrderMultiple { get; set; } + [IsDataGridColum(true, 47)] + [Description("ڲĹ")] + public bool OperationBasedYield { get; set; } + [IsDataGridColum(true, 48)] + [Description("")] + public decimal YieldPercent { get; set; } + [IsDataGridColum(true, 49)] + [Description("ʱ")] + [StringLength(50)] + public string RunTime { get; set; } + [IsDataGridColum(true, 50)] + [Description("ʱ")] + public decimal SetupTime { get; set; } + [IsDataGridColum(true, 51)] + [Description("EMT")] + [StringLength(50)] + public string EmtType { get; set; } + [IsDataGridColum(true, 52)] + [Description("EMTԶ")] + public bool AutomaticEmtProcessing { get; set; } + [IsDataGridColum(true, 53)] + [Description("")] + [StringLength(50)] + public string NetWorkCode { get; set; } + [IsDataGridColum(true, 54)] + [Description("̴")] + [StringLength(50)] + public string RoutingCode { get; set; } + [IsDataGridColum(true, 55)] + [Description("嵥/䷽")] + [StringLength(50)] + public string BomFormulaCode { get; set; } + [IsDataGridColum(true, 56)] + [Description("")] + [StringLength(50)] + public string ReplenishmentMethod { get; set; } + [IsDataGridColum(true, 57)] + [Description("Ƿ")] + [StringLength(50)] + public string IsMaster { get; set; } + [IsDataGridColum(true, 58)] + [Description("ɫ")] + [StringLength(50)] + public string PartColor { get; set; } + + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 59)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 60)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 61)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 62)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 63)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 64)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_PART_MSTR.cs b/北京北汽/SCP/Models/DataCenterTables/TT_PART_MSTR.cs new file mode 100644 index 0000000..5a2d6ad --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_PART_MSTR.cs @@ -0,0 +1,144 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("")] + public class TT_PART_MSTR : TED_BASE,ITaskTable + { + + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 2)] + [Description("1")] + [StringLength(50)] + public string Desc1 { get; set; } + [IsDataGridColum(true, 3)] + [Description("2")] + [StringLength(50)] + public string Desc2 { get; set; } + [IsDataGridColum(true, 4)] + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + [IsDataGridColum(true, 5)] + [Description("Ʒ")] + [StringLength(50)] + public string ProdLine { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public DateTime AddDate { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string DsgnGroup { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + [StringLength(50)] + public string PromotionGroup { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string PartType { get; set; } + [IsDataGridColum(true, 10)] + [Description("״̬")] + [StringLength(50)] + public string Status { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + [StringLength(50)] + public string Group { get; set; } + [IsDataGridColum(true, 12)] + [Description("ͼֽ")] + [StringLength(50)] + public string Drawing { get; set; } + [IsDataGridColum(true, 13)] + [Description("Ŀ޸")] + [StringLength(50)] + public string PartRevision { get; set; } + [IsDataGridColum(true, 14)] + [Description("ͼֽλ")] + [StringLength(50)] + public string DrawingLocation { get; set; } + [IsDataGridColum(true, 15)] + [Description("С")] + [StringLength(50)] + public string Size { get; set; } + [IsDataGridColum(true, 16)] + [Description("۸ۿ")] + [StringLength(50)] + public string PriceBreakCategory { get; set; } + [IsDataGridColum(true, 17)] + [Description("")] + public bool AuxiliaryMaterial { get; set; } + [IsDataGridColum(true, 18)] + [Description("߽")] + public bool OfflineSettlement { get; set; } + [IsDataGridColum(true, 19)] + [Description("Qȼ")] + [StringLength(50)] + public string Qgrade { get; set; } + [IsDataGridColum(true, 20)] + [Description("")] + [StringLength(50)] + public string WmsPartType { get; set; } + [IsDataGridColum(true, 21)] + [Description("ʽ")] + [StringLength(50)] + public string ManageWay { get; set; } + [IsDataGridColum(true, 22)] + [Description("")] + [StringLength(50)] + public string InventoryCode { get; set; } + [IsDataGridColum(true, 23)] + [Description("ͣ/")] + [StringLength(50)] + public string ManageType { get; set; } + [IsDataGridColum(true, 24)] + [Description("Ƿ")] + [StringLength(50)] + public string InspectType { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 25)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 26)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 27)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 28)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 29)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 30)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_PRODUCT_LINE.cs b/北京北汽/SCP/Models/DataCenterTables/TT_PRODUCT_LINE.cs new file mode 100644 index 0000000..44dab7a --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_PRODUCT_LINE.cs @@ -0,0 +1,64 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("Ʒ")] + public class TT_PRODUCT_LINE : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("Ʒ")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("Ӧ˰")] + public bool Taxable { get; set; } + [IsDataGridColum(true, 4)] + [Description("˰")] + public int TaxClass { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 5)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 6)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 7)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 10)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_PROJECT.cs b/北京北汽/SCP/Models/DataCenterTables/TT_PROJECT.cs new file mode 100644 index 0000000..5695baf --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_PROJECT.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("Ŀ")] + public class TT_PROJECT : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_PURCHASE_PRICE.cs b/北京北汽/SCP/Models/DataCenterTables/TT_PURCHASE_PRICE.cs new file mode 100644 index 0000000..957621f --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_PURCHASE_PRICE.cs @@ -0,0 +1,88 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ɹ۸")] + public class TT_PURCHASE_PRICE : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("Ŀ")] + [StringLength(50)] + public string PriceList { get; set; } + [IsDataGridColum(true, 2)] + [Description("˵")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("Ʒ")] + [StringLength(50)] + public string ProductLine { get; set; } + [IsDataGridColum(true, 4)] + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + [IsDataGridColum(true, 5)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 6)] + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + [IsDataGridColum(true, 7)] + [Description("ʼ")] + public DateTime Start { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + public DateTime ExpireDate { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string AmountType { get; set; } + [IsDataGridColum(true, 10)] + [Description("")] + public decimal Amount { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 12)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 13)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 14)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 15)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 16)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_ROUTING.cs b/北京北汽/SCP/Models/DataCenterTables/TT_ROUTING.cs new file mode 100644 index 0000000..950879b --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_ROUTING.cs @@ -0,0 +1,132 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ձ")] + public class TT_ROUTING : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("̴")] + [StringLength(50)] + public string RoutingCode { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + public int Operation { get; set; } + [IsDataGridColum(true, 3)] + [Description("ʼ")] + public DateTime StartDate { get; set; } + [IsDataGridColum(true, 4)] + [Description("׼")] + [StringLength(50)] + public string StandardOperration { get; set; } + [IsDataGridColum(true, 5)] + [Description("")] + [StringLength(50)] + public string WorkCenter { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string Machine { get; set; } + [IsDataGridColum(true, 7)] + [Description("˵")] + [StringLength(50)] + public string Description { get; set; } + [IsDataGridColum(true, 8)] + [Description("/")] + public int MachinesPerOperation { get; set; } + [IsDataGridColum(true, 9)] + [Description("ƽмӹ")] + public int OverlapUnits { get; set; } + [IsDataGridColum(true, 10)] + [Description("Ŷʱ")] + public decimal QueueTime { get; set; } + [IsDataGridColum(true, 11)] + [Description("ȴʱ")] + public decimal WaitTime { get; set; } + [IsDataGridColum(true, 12)] + [Description("ֽ׶εĹ")] + public bool MilestoneOperation { get; set; } + [IsDataGridColum(true, 13)] + [Description("תǰ")] + public int SubcontractLt { get; set; } + [IsDataGridColum(true, 14)] + [Description("Ա")] + public decimal SetupCrew { get; set; } + [IsDataGridColum(true, 15)] + [Description("ȫԱ")] + public decimal RunCrew { get; set; } + [IsDataGridColum(true, 16)] + [Description("ʱ")] + public decimal SetupTime { get; set; } + [IsDataGridColum(true, 17)] + [Description("ʱ")] + public decimal RunTime { get; set; } + [IsDataGridColum(true, 18)] + [Description("ƶʱ")] + public decimal MoveTime { get; set; } + [IsDataGridColum(true, 19)] + [Description("")] + public DateTime EndDate { get; set; } + [IsDataGridColum(true, 20)] + [Description("")] + public decimal YieldPercent { get; set; } + [IsDataGridColum(true, 21)] + [Description("ߴ")] + [StringLength(50)] + public string ToolCode { get; set; } + [IsDataGridColum(true, 22)] + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + [IsDataGridColum(true, 23)] + [Description("ֵ")] + public decimal InventoryValue { get; set; } + [IsDataGridColum(true, 24)] + [Description("תɱ")] + public decimal SubcontractCost { get; set; } + [IsDataGridColum(true, 25)] + [Description("ע")] + public bool Comments { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 26)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 27)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 28)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 29)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 30)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 31)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_SALE_PRICE.cs b/北京北汽/SCP/Models/DataCenterTables/TT_SALE_PRICE.cs new file mode 100644 index 0000000..5098f77 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_SALE_PRICE.cs @@ -0,0 +1,89 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ۼ۸")] + public class TT_SALE_PRICE : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("Ŀ")] + [StringLength(50)] + public string PriceList { get; set; } + [IsDataGridColum(true, 2)] + [Description("˵")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("Ʒ")] + [StringLength(50)] + public string ProductLine { get; set; } + [IsDataGridColum(true, 4)] + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + [IsDataGridColum(true, 5)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 6)] + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + [IsDataGridColum(true, 7)] + [Description("ʼ")] + public DateTime Start { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + public DateTime ExpireDate { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + [StringLength(50)] + public string AmountType { get; set; } + [IsDataGridColum(true, 10)] + [Description("")] + public decimal Amount { get; set; } + + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 12)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 13)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 14)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 15)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 16)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_SHIFT.cs b/北京北汽/SCP/Models/DataCenterTables/TT_SHIFT.cs new file mode 100644 index 0000000..238ed3b --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_SHIFT.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ת")] + public class TT_SHIFT : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + [IsDataGridColum(true, 5)] + + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_SITE.cs b/北京北汽/SCP/Models/DataCenterTables/TT_SITE.cs new file mode 100644 index 0000000..cc7cf59 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_SITE.cs @@ -0,0 +1,96 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ص")] + public class TT_SITE : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + [IsDataGridColum(true, 4)] + [Description("Ƶλ")] + [StringLength(50)] + public string Entity { get; set; } + [IsDataGridColum(true, 5)] + [Description("״̬")] + [StringLength(50)] + public string Status { get; set; } + [IsDataGridColum(true, 6)] + [Description("Զɿλ")] + public bool AutoLocation { get; set; } + [IsDataGridColum(true, 7)] + [Description("λ")] + [StringLength(50)] + public string InspLocation { get; set; } + [IsDataGridColum(true, 8)] + [Description("EMTӦ")] + [StringLength(50)] + public string BtbSupplier { get; set; } + [IsDataGridColum(true, 9)] + [Description("ⲿӦ")] + public bool ExtSupplier { get; set; } + [IsDataGridColum(true, 10)] + [Description("תƲĿ")] + [StringLength(50)] + public string XferAcct { get; set; } + [IsDataGridColum(true, 11)] + [Description("תƲ˻")] + [StringLength(50)] + public string XferSub { get; set; } + [IsDataGridColum(true, 12)] + [Description("תƲɱ")] + [StringLength(50)] + public string XferCc { get; set; } + [IsDataGridColum(true, 13)] + [Description("POλ")] + [StringLength(50)] + public string GitLocation { get; set; } + [IsDataGridColum(true, 14)] + [Description("ʹüƻ/ȵĹ̨")] + public bool UsePlanSchedWbs { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 15)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 16)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 17)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 18)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 19)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 20)] + [Description("ID")] + public Guid DataID { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_STAND_COST_PRICE.cs b/北京北汽/SCP/Models/DataCenterTables/TT_STAND_COST_PRICE.cs new file mode 100644 index 0000000..0685cf8 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_STAND_COST_PRICE.cs @@ -0,0 +1,73 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("׼ɱ۸")] + public class TT_STAND_COST_PRICE : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("Ϻ")] + [StringLength(50)] + public string Part { get; set; } + [IsDataGridColum(true, 2)] + [Description("ϳɱ")] + public int MaterialCost { get; set; } + [IsDataGridColum(true, 3)] + [Description("˹ɱ")] + public int LaborCost { get; set; } + [IsDataGridColum(true, 4)] + [Description("ӳɱ")] + public int BurdenCost { get; set; } + [IsDataGridColum(true, 5)] + [Description("ɱ")] + public int OverheadCost { get; set; } + [IsDataGridColum(true, 6)] + [Description("תɱ")] + public int SubcontrCost { get; set; } + [IsDataGridColum(true, 7)] + [Description("ɱ")] + public int CostSet { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 9)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 10)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 12)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 13)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_SUB_ACCOUNT.cs b/北京北汽/SCP/Models/DataCenterTables/TT_SUB_ACCOUNT.cs new file mode 100644 index 0000000..751b255 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_SUB_ACCOUNT.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("˻")] + public class TT_SUB_ACCOUNT : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("˻")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("˻")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_SUPPLIER.cs b/北京北汽/SCP/Models/DataCenterTables/TT_SUPPLIER.cs new file mode 100644 index 0000000..30eeb97 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_SUPPLIER.cs @@ -0,0 +1,313 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("Ӧ̱")] + public class TT_SUPPLIER : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("Ӧ̴")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("Ӧ")] + [StringLength(50)] + public string Name { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string SearchName { get; set; } + [IsDataGridColum(true, 4)] + [Description("м")] + [StringLength(50)] + public string SecondName { get; set; } + [IsDataGridColum(true, 5)] + [Description("")] + [StringLength(50)] + public string ThirdName { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string GroupName { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + public bool Active { get; set; } + [IsDataGridColum(true, 8)] + [Description("Ӧ̵ַ")] + [StringLength(50)] + public string Address1 { get; set; } + [IsDataGridColum(true, 9)] + [Description("Ӧ̵ַ")] + [StringLength(50)] + public string Address2 { get; set; } + [IsDataGridColum(true, 10)] + [Description("Ӧ̵ַ")] + [StringLength(50)] + public string Address3 { get; set; } + [IsDataGridColum(true, 11)] + [Description("ʱ")] + public int ZipCode { get; set; } + [IsDataGridColum(true, 12)] + [Description("")] + [StringLength(50)] + public string City { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + [StringLength(50)] + public string Country { get; set; } + [IsDataGridColum(true, 14)] + [Description("绰")] + public int Telephone { get; set; } + [IsDataGridColum(true, 15)] + [Description("ʡ")] + [StringLength(50)] + public string province { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string County { get; set; } + [IsDataGridColum(true, 17)] + [Description("")] + public int Fax { get; set; } + [IsDataGridColum(true, 18)] + [Description("Դ")] + [StringLength(50)] + public string LanguageCode { get; set; } + [IsDataGridColum(true, 19)] + [Description("ʼ")] + public int Email { get; set; } + [IsDataGridColum(true, 20)] + [Description("ַ")] + public int Internet { get; set; } + [IsDataGridColum(true, 21)] + [Description("˰ַ")] + public bool AddressIsTaxable { get; set; } + [IsDataGridColum(true, 22)] + [Description("˰")] + public bool AddressIsTaxIncluded { get; set; } + [IsDataGridColum(true, 23)] + [Description("˰")] + [StringLength(50)] + public string FederalTax { get; set; } + [IsDataGridColum(true, 24)] + [Description("˰")] + [StringLength(50)] + public string StateTax { get; set; } + [IsDataGridColum(true, 25)] + [Description("˰1")] + [StringLength(50)] + public string MiscTax1 { get; set; } + [IsDataGridColum(true, 26)] + [Description("˰2")] + [StringLength(50)] + public string MiscTax2 { get; set; } + [IsDataGridColum(true, 27)] + [Description("˰3")] + [StringLength(50)] + public string MiscTax3 { get; set; } + [IsDataGridColum(true, 28)] + [Description("˰")] + public bool TaxInCity { get; set; } + [IsDataGridColum(true, 29)] + [Description("˰")] + [StringLength(50)] + public string TaxZone { get; set; } + [IsDataGridColum(true, 30)] + [Description("˰")] + public int TaxClass { get; set; } + [IsDataGridColum(true, 31)] + [Description("˰;")] + [StringLength(50)] + public string TaxUsage { get; set; } + [IsDataGridColum(true, 32)] + [Description("")] + [StringLength(50)] + public string Title { get; set; } + [IsDataGridColum(true, 33)] + [Description("ϵ")] + [StringLength(50)] + public string ContactName { get; set; } + [IsDataGridColum(true, 34)] + [Description("д")] + [StringLength(50)] + public string Initials { get; set; } + [IsDataGridColum(true, 35)] + [Description("")] + [StringLength(50)] + public string Function { get; set; } + [IsDataGridColum(true, 36)] + [Description("Ա")] + [StringLength(50)] + public string Gender { get; set; } + [IsDataGridColum(true, 37)] + [Description("Ҫϵ")] + public bool ContactIsPrimary { get; set; } + [IsDataGridColum(true, 38)] + [Description("Ҫϵ")] + public bool ContactIsSecondary { get; set; } + [IsDataGridColum(true, 39)] + [Description("")] + public bool Compens { get; set; } + [IsDataGridColum(true, 40)] + [Description("Ʊļ")] + public int GlProfileInvoice { get; set; } + [IsDataGridColum(true, 41)] + [Description("Ʊݿļ")] + public int GlProfileCreditNote { get; set; } + [IsDataGridColum(true, 42)] + [Description("Ԥļ")] + public int GlProfilePrepayment { get; set; } + [IsDataGridColum(true, 43)] + [Description("˿ļ")] + public int AccountGLProfile { get; set; } + [IsDataGridColum(true, 44)] + [Description("˻ļ")] + public int SubAccountProfile { get; set; } + [IsDataGridColum(true, 45)] + [Description("Ŵ")] + [StringLength(50)] + public string CreditAgencyReference { get; set; } + [IsDataGridColum(true, 46)] + [Description("̻")] + [StringLength(50)] + public string CommerceNumber { get; set; } + [IsDataGridColum(true, 47)] + [Description("TID֪ͨ")] + [StringLength(50)] + public string TidNotice { get; set; } + [IsDataGridColum(true, 48)] + [Description("ⲿͻ")] + [StringLength(50)] + public string ExternalCustomerNumber { get; set; } + [IsDataGridColum(true, 49)] + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + [IsDataGridColum(true, 1505)] + [Description("Ӧ")] + [StringLength(50)] + public string SupplierType { get; set; } + [IsDataGridColum(true, 51)] + [Description("ɹ")] + [StringLength(50)] + public string Purchasetype { get; set; } + [IsDataGridColum(true, 52)] + [Description("֧")] + [StringLength(50)] + public string CreditTerms { get; set; } + [IsDataGridColum(true, 53)] + [Description("Ʊ״̬")] + [StringLength(50)] + public string InvoiceStatusCode { get; set; } + [IsDataGridColum(true, 54)] + [Description("")] + [StringLength(50)] + public string PaymentGroup { get; set; } + [IsDataGridColum(true, 55)] + [Description("ͻ")] + public bool SendRemittance { get; set; } + [IsDataGridColum(true, 56)] + [Description("ָ")] + public bool SplitAccount { get; set; } + [IsDataGridColum(true, 57)] + [Description("ʽ")] + [StringLength(50)] + public string ShipVia { get; set; } + [IsDataGridColum(true, 58)] + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + [IsDataGridColum(true, 59)] + [Description("")] + [StringLength(50)] + public string Carrier { get; set; } + [IsDataGridColum(true, 60)] + [Description("ɹϵ")] + [StringLength(50)] + public string Purchasecontact { get; set; } + [IsDataGridColum(true, 61)] + [Description("ռ˼")] + [StringLength(50)] + public string DayBookSet { get; set; } + [IsDataGridColum(true, 62)] + [Description("幩Ӧ")] + public bool KanBanSupplier { get; set; } + [IsDataGridColum(true, 63)] + [Description("")] + [StringLength(50)] + public string PromotionGroup { get; set; } + [IsDataGridColum(true, 64)] + [Description("ɹԱ")] + [StringLength(50)] + public string Buyer { get; set; } + [IsDataGridColum(true, 65)] + [Description("۸")] + [StringLength(50)] + public string PriceTable { get; set; } + [IsDataGridColum(true, 66)] + [Description("ۿ۱")] + [StringLength(50)] + public string DiscountTable { get; set; } + [IsDataGridColum(true, 67)] + [Description("̶۸")] + public bool FixedPrice { get; set; } + [IsDataGridColum(true, 68)] + [Description("۵۸")] + [StringLength(50)] + public string NonSoPrice { get; set; } + [IsDataGridColum(true, 69)] + [Description("иʽ")] + [StringLength(50)] + public string BankFormat { get; set; } + [IsDataGridColum(true, 70)] + [Description("Ӧ")] + [StringLength(50)] + public string SupplierBank { get; set; } + [IsDataGridColum(true, 71)] + [Description("")] + [StringLength(50)] + public string OwnBank { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 72)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 73)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 74)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 75)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 76)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 77)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_SUPPLIER_PART.cs b/北京北汽/SCP/Models/DataCenterTables/TT_SUPPLIER_PART.cs new file mode 100644 index 0000000..a768558 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_SUPPLIER_PART.cs @@ -0,0 +1,105 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("Ӧ")] + public class TT_SUPPLIER_PART : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + [IsDataGridColum(true, 2)] + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + [IsDataGridColum(true, 3)] + [Description("Ӧ")] + [StringLength(50)] + public string SupplierPart { get; set; } + [IsDataGridColum(true, 4)] + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + [IsDataGridColum(true, 5)] + [Description("Ӧǰ")] + public int SupplierLeadTime { get; set; } + [IsDataGridColum(true, 6)] + [Description("ʹÿͻ")] + public bool UseSoReductionPrice { get; set; } + [IsDataGridColum(true, 7)] + [Description("ͻ")] + public decimal SoPriceReduction { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + [IsDataGridColum(true, 9)] + [Description("۵۸")] + public decimal QuotePrice { get; set; } + [IsDataGridColum(true, 10)] + [Description("")] + public DateTime QuoteDate { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + public decimal QuoteQty { get; set; } + [IsDataGridColum(true, 12)] + [Description("Ŀ")] + [StringLength(50)] + public string PriceList { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + [StringLength(50)] + public string Manufacturer { get; set; } + [IsDataGridColum(true, 14)] + [Description("")] + [StringLength(50)] + public string ManufacturerPart { get; set; } + [IsDataGridColum(true, 15)] + [Description("ע")] + [StringLength(50)] + public string Comment { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 17)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 18)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 19)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 20)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 21)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_SUPPLIER_TYPE.cs b/北京北汽/SCP/Models/DataCenterTables/TT_SUPPLIER_TYPE.cs new file mode 100644 index 0000000..dc9ac4b --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_SUPPLIER_TYPE.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("Ӧͱ")] + public class TT_SUPPLIER_TYPE : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_TEAM.cs b/北京北汽/SCP/Models/DataCenterTables/TT_TEAM.cs new file mode 100644 index 0000000..3ce49a2 --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_TEAM.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("Ŷӱ")] + public class TT_TEAM : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 4)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 5)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 7)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 8)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_WMS_LOCATION.cs b/北京北汽/SCP/Models/DataCenterTables/TT_WMS_LOCATION.cs new file mode 100644 index 0000000..165284a --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_WMS_LOCATION.cs @@ -0,0 +1,96 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("WMSλ")] + public class TT_WMS_LOCATION : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("ERPλ")] + [StringLength(50)] + public string ErpLocation { get; set; } + [IsDataGridColum(true, 4)] + [Description("")] + [StringLength(50)] + public string Area { get; set; } + [IsDataGridColum(true, 5)] + [Description("״̬")] + [StringLength(50)] + public string InventoryStatus { get; set; } + [IsDataGridColum(true, 6)] + [Description("Ա")] + [StringLength(50)] + public string WarehouseKeeper { get; set; } + [IsDataGridColum(true, 7)] + [Description("ֿ")] + [StringLength(50)] + public string WhseCode { get; set; } + [IsDataGridColum(true, 8)] + [Description("")] + public bool IsEnableNegativeStock { get; set; } + [IsDataGridColum(true, 9)] + [Description("")] + public bool AutoRemoveZeroStockDetail { get; set; } + [IsDataGridColum(true, 10)] + [Description("")] + public decimal MaxBoxQty { get; set; } + [IsDataGridColum(true, 11)] + [Description("")] + public bool IsEnableMix { get; set; } + [IsDataGridColum(true, 12)] + [Description("Ŀ")] + [StringLength(50)] + public string ProjectId { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [IsDataGridColum(true, 13)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 14)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 15)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 16)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 17)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 18)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/TT_WORK_CENTER.cs b/北京北汽/SCP/Models/DataCenterTables/TT_WORK_CENTER.cs new file mode 100644 index 0000000..e2d433b --- /dev/null +++ b/北京北汽/SCP/Models/DataCenterTables/TT_WORK_CENTER.cs @@ -0,0 +1,109 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables +{ + [Description("ı")] + public class TT_WORK_CENTER : TED_BASE,ITaskTable + { + [IsDataGridColum(true, 1)] + [Description("Ĵ")] + [StringLength(50)] + public string Code { get; set; } + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + [IsDataGridColum(true, 3)] + [Description("")] + [StringLength(50)] + public string Department { get; set; } + [IsDataGridColum(true, 4)] + [Description("Զ̶")] + public bool AutoFirm { get; set; } + [IsDataGridColum(true, 5)] + [Description("ϴԶ̶")] + public DateTime LastAutoFirm { get; set; } + [IsDataGridColum(true, 6)] + [Description("")] + [StringLength(50)] + public string Scheduler { get; set; } + [IsDataGridColum(true, 7)] + [Description("ȴʱ")] + public decimal Queue { get; set; } + [IsDataGridColum(true, 8)] + [Description("ȴʱ")] + public decimal Wait { get; set; } + [IsDataGridColum(true, 9)] + [Description("豸/")] + public int MchOp { get; set; } + [IsDataGridColum(true, 10)] + [Description("Ա")] + public decimal SetupMen { get; set; } + [IsDataGridColum(true, 11)] + [Description("ȫԱ")] + public decimal RunCrew { get; set; } + [IsDataGridColum(true, 12)] + [Description("")] + public decimal MchWkctr { get; set; } + [IsDataGridColum(true, 13)] + [Description("")] + public decimal MchBdn { get; set; } + [IsDataGridColum(true, 14)] + [Description("÷")] + public decimal SetupRte { get; set; } + [IsDataGridColum(true, 15)] + [Description("˹")] + public decimal LbrRate { get; set; } + [IsDataGridColum(true, 16)] + [Description("˹")] + public decimal BdnRate { get; set; } + [IsDataGridColum(true,17)] + [Description("˹")] + public decimal BdnPct { get; set; } + [IsDataGridColum(true, 18)] + [Description("")] + [StringLength(50)] + public string Mch { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 19)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 20)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 21)] + [Description("ע")] + public string Remark { get; set; } + [IsDataGridColum(true, 22)] + [Description("")] + public Guid TaskID { get; set; } + [IsDataGridColum(true, 23)] + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + [IsDataGridColum(true, 24)] + [Description("ID")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DataCenterTables/name.txt b/北京北汽/SCP/Models/DataCenterTables/name.txt new file mode 100644 index 0000000..70ff882 Binary files /dev/null and b/北京北汽/SCP/Models/DataCenterTables/name.txt differ diff --git a/北京北汽/SCP/Models/DbSetting.cs b/北京北汽/SCP/Models/DbSetting.cs new file mode 100644 index 0000000..7534d6e --- /dev/null +++ b/北京北汽/SCP/Models/DbSetting.cs @@ -0,0 +1,28 @@ +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models +{ + public class DbSetting + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + public DbSetting() { } + + public DbSetting(DataBaseType type) + { + ݿ = type.ToString(); + } + + public string ݿ { get; set; } = Enums.DataBaseType.SQLServer.ToString(); + + public string ַ { get; set; } = "127.0.0.1"; + public string ˿ { get; set; } = "1433"; + public string ݿ { get; set; } = "DB_NAME"; + public string û { get; set; } = "sa"; + public string { get; set; } = "5E0AFEB85CA001A3371A9F19E7EC4DFF"; + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/DecimalPrecisionAttribute.cs b/北京北汽/SCP/Models/DecimalPrecisionAttribute.cs new file mode 100644 index 0000000..915ec62 --- /dev/null +++ b/北京北汽/SCP/Models/DecimalPrecisionAttribute.cs @@ -0,0 +1,52 @@ +using System; + +namespace ChangKeTec.Wms.Models +{ + /// <summary> + /// <para>自定义Decimal类型的精度属性</para> + /// </summary> + [AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = false)] + public sealed class DecimalPrecisionAttribute : Attribute + { + + #region Field + private byte _precision = 18; + public byte _scale = 4; + #endregion + + #region Construct + /// <summary> + /// <para>自定义Decimal类型的精确度属性</para> + /// </summary> + /// <param name="precision">precision + /// <para>精度(默认18)</para></param> + /// <param name="scale">scale + /// <para>小数位数(默认4)</para></param> + public DecimalPrecisionAttribute(byte precision = 18, byte scale = 4) + { + Precision = precision; + Scale = scale; + } + #endregion + + #region Property + /// <summary> + /// 精确度(默认18) + /// </summary> + public byte Precision + { + get { return this._precision; } + set { this._precision = value; } + } + + /// <summary> + /// 保留位数(默认4) + /// </summary> + public byte Scale + { + get { return this._scale; } + set { this._scale = value; } + } + #endregion + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/EntitiesFactory.cs b/北京北汽/SCP/Models/EntitiesFactory.cs new file mode 100644 index 0000000..a9acbcf --- /dev/null +++ b/北京北汽/SCP/Models/EntitiesFactory.cs @@ -0,0 +1,221 @@ +using System; +using System.Data.Entity; +using System.Data.Entity.Core; +using System.Data.Entity.Core.EntityClient; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CK.SCP.Models.AppBoxEntity; +using CK.SCP.Models.Enums; +using CK.SCP.Models.UniApiEntity; +using CK.SCP.Utils; +using ChangKeTec.Wms.Models.Wms; +using CK.SCP.Models.DataCenterTables; +using System.ComponentModel; + +namespace CK.SCP.Models +{ + + public class LogModel : INotifyPropertyChanged + { + public string LogTime { get; set; } + public string LogMessage { get; set; } + public string TaskState { get; set; } + public string TableName { get; set; } + public string TaskId { get; set; } + public event PropertyChangedEventHandler PropertyChanged; + public void NotityPropertyChanged(string propertyName) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + } + } + + + public static class EntitiesFactory + { + static EntitiesFactory() + { + Database.SetInitializer<ScpEntities>(null); + Database.SetInitializer<WmsEntities>(null); + Database.SetInitializer<UniApiEntities>(null); + Database.SetInitializer<DataCenterContext>(null); + Database.SetInitializer<ExchangeCenterContext>(null); + } + + public static ScpEntities CreateScpInstance() + { + try + { + var strConn = GetEfConnectionString(GlobalConfig.ScpDatabase); + var db = new ScpEntities(strConn); + return db; + } + catch (SqlException ex) + { + throw new Exception($"ϵͳ޷ӵݿ:{GlobalConfig.ScpDatabase}õķ,ݿ,ûϢǷȷ" + Environment.NewLine + ex); + } + + } + + public static UniApiEntities CreateUniApiInstance() + { + try + { + //var strConn = setting == null ? GetEfConnectionString("UniApi") : GetEfConnectionString(setting); + var strConn = GetEfConnectionString(GlobalConfig.UniApiDatabase); + var db = new UniApiEntities(strConn); + return db; + } + catch (SqlException ex) + { + throw new Exception($"ϵͳ޷ӵݿ:{GlobalConfig.UniApiDatabase}õķ,ݿ,ûϢǷȷ" + Environment.NewLine + ex); + } + } + + public static AppBoxContext CreateAppBoxInstance() + { + try + { + //var strConn = setting == null ? GetEfConnectionString("UniApi") : GetEfConnectionString(setting); + var strConn = GetEfConnectionString(GlobalConfig.AppBoxDatabase); + var db = new AppBoxContext(strConn); + return db; + } + catch (SqlException ex) + { + throw new Exception($"ϵͳ޷ӵݿ:{GlobalConfig.AppBoxDatabase}õķ,ݿ,ûϢǷȷ" + Environment.NewLine + ex); + } + } + + public static WmsEntities CreateWmsInstance() + { + try + { + //var strConn = setting == null ? GetEfConnectionString("Wms") : GetEfConnectionString(setting); + + var strConn = GetEfConnectionString(GlobalConfig.WmsDatabase); + var db = new WmsEntities(strConn); + return db; + } + catch (SqlException ex) + { + throw new Exception($"ϵͳ޷ӵݿ:{GlobalConfig.WmsDatabase}õķ,ݿ,ûϢǷȷ" + Environment.NewLine + ex); + } + + } + + public static DataCenterContext CreateDataCenterInstance() + { + var dbSetting = GlobalConfig.DataCenterDB; + try + { + DataCenterContext db; + var strConn = GetEfConnectionString(dbSetting); + db = new DataCenterContext(strConn); + + return db; + } + catch (SqlException ex) + { + throw new Exception($"ϵͳ޷ӵݿ:{dbSetting}õķ,ݿ,ûϢǷȷ{Environment.NewLine}{ex}"); + } + } + + public static ExchangeCenterContext CreateExchangeCenterInstance() + { + var dbSetting = GlobalConfig.ExchangeCenterDB; + try + { + ExchangeCenterContext db; + var strConn = GetEfConnectionString(dbSetting); + db = new ExchangeCenterContext(strConn); + return db; + } + catch (SqlException ex) + { + throw new Exception($"ϵͳ޷ӵݿ:{dbSetting}õķ,ݿ,ûϢǷȷ{Environment.NewLine}{ex}"); + } + } + + + + + public static string GetEfConnectionString(DbSetting dbSetting) + { + var sbConn = new StringBuilder(); + + if (string.IsNullOrEmpty(dbSetting.)) + { + throw new Exception("ļ"); + } + switch (dbSetting.ݿ) + { + case "SQLServer": + sbConn.Append($"Data source ={dbSetting.ַ}"); + sbConn.Append(dbSetting.˿ == "0" ? ";" : $",{dbSetting.˿};"); + sbConn.Append($"Initial catalog = {dbSetting.ݿ};"); + sbConn.Append($"User id = {dbSetting.û};"); + sbConn.Append($"Password = {EncryptHelper.Decrypt(dbSetting.)};"); + sbConn.Append("MultipleActiveResultSets = True;"); + sbConn.Append("persist security info = True;"); + sbConn.Append("App = EntityFramework;"); + break; + case "MySql": + sbConn.Append($"server ={dbSetting.ַ};"); + sbConn.Append($"port ={dbSetting.˿};"); + sbConn.Append($"database = {dbSetting.ݿ};"); + sbConn.Append($"user id = {dbSetting.û};"); + sbConn.Append($"password = {EncryptHelper.Decrypt(dbSetting.)};"); + sbConn.Append("persistsecurityinfo =True;"); + break; + } + // LogHelper.Write(sbConn.ToString()); + return sbConn.ToString(); + } + + public static void SaveDb(DbContext db) + { + try + { + db.SaveChanges(); + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//ʵ֤쳣 + { + var sb = new StringBuilder(); + + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("{0}ֶΣ{1}Ϣ{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "ֶ֤ʧ" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//ͻ쳣 + { + + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + + + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + + + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/EntitiesHelper.cs b/北京北汽/SCP/Models/EntitiesHelper.cs new file mode 100644 index 0000000..a0269da --- /dev/null +++ b/北京北汽/SCP/Models/EntitiesHelper.cs @@ -0,0 +1,162 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity; +using System.Linq; +using System.Linq.Expressions; +using System.Reflection; +using System.Text; + +namespace CK.SCP.Models +{ + public static class EntitiesHelper + { + + + public static string GetPropertiesString<T>(T t,bool withName = true) + { + var peroperties = t.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance); + var sb = new StringBuilder(); + foreach (var property in peroperties) + { + if (withName) + sb.Append($"{property.Name}:"); + sb.Append($"{property.GetValue(t)},"); + } + return sb.ToString(); + } + + + + public static List<T> GetData<T, TKey>(DbContext db, Expression<Func<T, T>> select, + Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order) + where T : class + { + var list = db.Set<T>() + .Where(@where) + .OrderBy(order) + .Select(@select).ToList(); + return list; + } + + + public static List<dynamic> GetData<T, TKey>(DbContext db, Expression<Func<T, dynamic>> select, + Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order, out int count) + where T : class + { + count = db.Set<T>().Where(@where).Count(); + var list = db.Set<T>() + .Where(@where) + .OrderBy(order) + .Select(@select).ToList(); + return list; + + } + + public static List<dynamic> GetPagedDataAsc<T, TKey>(DbContext db, Expression<Func<T, dynamic>> select, + Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order, int pageIndex, int pageSize, out int total) + where T : class + { + total = db.Set<T>().Where(@where).Count(); + var list = db.Set<T>() + .Where(@where) + .OrderBy(order) + .Select(@select) + .Skip((pageIndex - 1) * pageSize) + .Take(pageSize).ToList(); + return list; + + } + + public static List<T> GetPagedDataAsc<T, TKey>(DbContext db, Expression<Func<T, T>> select, + Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order, int pageIndex, int pageSize, out int total) + where T : class + { + total = db.Set<T>().Where(@where.Compile()).AsQueryable().Count(); + var list = db.Set<T>() + .Where(@where.Compile()).AsQueryable() + .OrderBy(order) + .Select(@select) + .Skip((pageIndex - 1) * pageSize) + .Take(pageSize).ToList(); + return list; + + } + + public static List<T> GetPagedDataAsc<T, TKey>(List<T> sourceList, Expression<Func<T, T>> select, + Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order, int pageIndex, int pageSize, out int total) + where T : class + { + List<T> list = null; + total = 0; + try + { + total = sourceList.Where(where.Compile()).AsQueryable().Count(); + + + } + catch (Exception e) + { + Console.WriteLine(e); + } + try + { + list = sourceList.Where(@where.Compile()).AsQueryable() + .OrderBy(order) + .Select(@select) + .Skip((pageIndex - 1) * pageSize) + .Take(pageSize).ToList(); + } + catch (Exception e) + { + Console.WriteLine(e); + } + + return list; + + } + + + public static List<dynamic> GetPagedDataDesc<T, TKey>(DbContext db, Expression<Func<T, dynamic>> select, + Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order, int pageIndex, int pageSize, out int total) + where T : class + { + total = db.Set<T>().Where(@where).Count(); + var list = db.Set<T>() + .Where(@where) + .OrderByDescending(order) + .Select(@select) + .Skip((pageIndex - 1) * pageSize) + .Take(pageSize).ToList(); + return list; + } + + public static List<T> GetPagedDataDesc<T, TKey>(DbContext db, Expression<Func<T, T>> select, + Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order, int pageIndex, int pageSize, out int total) + where T : class + { + total = db.Set<T>().Where(@where).Count(); + var list = db.Set<T>() + .Where(@where) + .OrderByDescending(order) + .Select(@select) + .Skip((pageIndex - 1) * pageSize) + .Take(pageSize).ToList(); + return list; + } + + public static List<T> GetPagedDataDesc<T, TKey>(List<T> sourceList, Expression<Func<T, T>> select, + Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order, int pageIndex, int pageSize, out int total) + where T : class + { + total = sourceList.Where(@where.Compile()).AsQueryable().Count(); + var list = sourceList + .Where(@where.Compile()).AsQueryable() + .OrderByDescending(order) + .Select(@select) + .Skip((pageIndex - 1) * pageSize) + .Take(pageSize).ToList(); + return list; + + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/BillType.cs b/北京北汽/SCP/Models/Enums/BillType.cs new file mode 100644 index 0000000..41aa8b4 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/BillType.cs @@ -0,0 +1,158 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum BillType + { + [Description("原料收货")] + MaterialReceive = 101, + [Description("原料入库")] + MaterialIn = 102, + [Description("原料出库")] + MaterialDeliver = 103, + [Description("生产叫料")] + MaterialAsk = 104, + [Description("原料退货")] + MatertialReturn = 105, + [Description("生产退库")] + MaterialBack = 106, + + + [Description("委外出库")] + OutsourceDeliver = 109, + + // [Description("原料退货")] + // MaterialBack = 105, + // [Description("生产退库")] + // MaterialReturn = 106, + + [Description("成品收货")] + ProductReceive = 201, + [Description("成品入库")] + ProductIn = 202, + [Description("成品发货")] + DeliverPlan = 204, + [Description("客户退货")] + ProductReturn = 205, + [Description("成品顺序发货")] + ProductSortedDeliver = 206, + [Description("成品销售")] + ProductSell = 207, + [Description("成品返修")] + ProductRepair = 208, + + [Description("委外入库")] + OutsourceReceive = 209, + + + [Description("其它入库")] + OtherIn = 300, + [Description("其它出库")] + OtherOut = 301, + [Description("移库")] + StockMove = 302, + [Description("打包")] + StockPack = 303, + [Description("拆包")] + StockUnpack = 304, + [Description("盘点计划")] + InventoryPlan = 305, + [Description("结算比对")] + BalanceCompare = 307, + [Description("盘点库位")] + InventoryLoc = 306, + + [Description("器具初始化")] + EqptRecover = 401, + [Description("器具保养")] + EqptMaintain = 402, + [Description("器具报废")] + EqptScrap = 403, + [Description("码托")] + EqptLoad = 404, + + [Description("JIS收货")] + VinReceive = 501, + [Description("JIS发货")] + VinDeliver = 502, + [Description("JIS销售")] + VinSell = 503, + + [Description("报检")] + Inspect = 601, + [Description("追溯")] + TraceBack = 602, + [Description("备货单")] + PickPlan = 603, + [Description("发料单")] + PickFact = 604, + [Description("生产计划")] + ProducePlan = 605, + [Description("生产订单")] + ManuOrder = 607, + [Description("不合格品单")] + UnqualifiedProd = 608, + [Description("设备点检模板")] + CheckModeEquipment = 609, + [Description("设备点检单")] + CheckBillEquipment = 610, + [Description("产品点检模板")] + CheckModeProduct = 611, + [Description("产品点检单")] + CheckBillProduct = 612, + [Description("首检模板")] + SpotInspectFirstMode = 613, + [Description("首检单")] + SpotInspectionFirst = 615, + [Description("巡检模板")] + SpotInspectMedMode = 616, + [Description("巡检单")] + SpotInspectionMed = 617, + [Description("末检模板")] + SpotInspectLastMode = 618, + [Description("末检单")] + SpotInspectionLast = 619, + [Description("停线单")] + LineStopBill = 620, + [Description("产线识别码")] + WorkLineDoc = 621, + [Description("工位识别码")] + WorkStationDoc = 622, + [Description("路由识别码")] + RouteDoc = 623, + [Description("工位拆解识别码")] + RouteBOMDoc = 624, + [Description("参数识别码")] + RoutePDoc = 625, + [Description("工位部件识别码")] + MachinePart = 626, + [Description("停线发通知编号")] + LineStopNoticeBill = 627, + [Description("停线预计处理编号")] + LineStopPrepareBill = 628, + [Description("措施编号")] + LineStopMeasureBill = 629, + [Description("点检表编号")] + CheckCode = 630, + + ReHandleVin = 701, + [Description("采购订单")] + PuchaseOrder = 702, + [Description("发货单")] + AsnOrder = 703, + [Description("销售订单")] + SaleOrder = 704, + + + [Description("确认订单")] + PO = 704, + [Description("收货")] + Receive = 704, + [Description("条码")] + BarCode = 704, + [Description("发票")] + Invoice = 704, + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/CellType.cs b/北京北汽/SCP/Models/Enums/CellType.cs new file mode 100644 index 0000000..a97fbe9 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/CellType.cs @@ -0,0 +1,16 @@ +using System.ComponentModel; + +namespace ChangKeTec.Wms.Models.Enums +{ + public enum CellType + { + [Description("生产位置")] + RAW = 1, + [Description("完工位置")] + FG = 2, + [Description("销售位置")] + SALE = 3, + [Description("委外位置")] + OS = 4, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/CollectionStepFinish.cs b/北京北汽/SCP/Models/Enums/CollectionStepFinish.cs new file mode 100644 index 0000000..998377c --- /dev/null +++ b/北京北汽/SCP/Models/Enums/CollectionStepFinish.cs @@ -0,0 +1,11 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum CollectionStepFinish + { + [Description("零件扫条码")] ScanPartBarCode = 1, + [Description("机器复位信号")] ScanMachineReset = 2, + [Description("专用计数设备")] counters = 3 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/ConnState.cs b/北京北汽/SCP/Models/Enums/ConnState.cs new file mode 100644 index 0000000..cdf9d01 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/ConnState.cs @@ -0,0 +1,8 @@ +namespace ChangKeTec.Wms.Models.Enums +{ + public enum ConnState + { + 断开 = 0, + 连接 = 1, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/ControlType.cs b/北京北汽/SCP/Models/Enums/ControlType.cs new file mode 100644 index 0000000..d84d0a5 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/ControlType.cs @@ -0,0 +1,16 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum ControlType + { + [Description("ǩ")] + Tab = 0, + [Description("Ⱥ")] + Grp = 1, + [Description("")] + Ctn = 2, + [Description("˵")] + Itm = 3, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/DataBaseType.cs b/北京北汽/SCP/Models/Enums/DataBaseType.cs new file mode 100644 index 0000000..1a1097c --- /dev/null +++ b/北京北汽/SCP/Models/Enums/DataBaseType.cs @@ -0,0 +1,10 @@ +namespace CK.SCP.Models.Enums +{ + public enum DataBaseType + { + SQLServer, + MySql, + Oracle, + PostgreSQL, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/DataState.cs b/北京北汽/SCP/Models/Enums/DataState.cs new file mode 100644 index 0000000..f3f2710 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/DataState.cs @@ -0,0 +1,29 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum DataState + { + [Description("无效")] + Disabled = 0, + [Description("有效")] + Enabled = 1, + } + + public enum FormState + { + [Description("开放")] + 开放 = 1, + [Description("关闭")] + 关闭 = 0, + + } + + public enum BillState + { + Cancel = -1, + New = 0, + Process = 1, + Finish = 2, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/DistributionType.cs b/北京北汽/SCP/Models/Enums/DistributionType.cs new file mode 100644 index 0000000..1a92ff3 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/DistributionType.cs @@ -0,0 +1,14 @@ +using System.ComponentModel; + +namespace ChangKeTec.Wms.Models.Enums +{ + public enum EnumDistributionType + { + [Description("")] + = 0, + [Description("JIT")] + JIT =1, + [Description("JIS")] + JIS =2, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EnumBaseDataLogType.cs b/北京北汽/SCP/Models/Enums/EnumBaseDataLogType.cs new file mode 100644 index 0000000..19516ba --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EnumBaseDataLogType.cs @@ -0,0 +1,13 @@ +using System; + +namespace CK.SCP.Models +{ + [Serializable] + public enum EnumBaseDataLogType + { + Select = 0, + Add = 1, + Update = 2, + Delete = 3 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EnumBillState.cs b/北京北汽/SCP/Models/Enums/EnumBillState.cs new file mode 100644 index 0000000..5433afe --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EnumBillState.cs @@ -0,0 +1,22 @@ +using System.ComponentModel; + +namespace ChangKeTec.Wms.Models.Enums +{ + public enum EnumBillState + { + [Description("作废")] + 作废 = -1, + [Description("新增")] + 新增 = 0, + [Description("正在处理")] + 正在处理 = 1, + [Description("完成")] + 完成 = 2, + [Description("失败")] + 失败 = 3, + [Description("已接收")] + 已接收 = 4, + [Description("已结算")] + 已结算 = 5, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EnumBillType.cs b/北京北汽/SCP/Models/Enums/EnumBillType.cs new file mode 100644 index 0000000..3f12dfd --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EnumBillType.cs @@ -0,0 +1,136 @@ +using System.ComponentModel; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace ChangKeTec.Wms.Models.Enums +{ + [JsonConverter(typeof(StringEnumConverter))] + + public enum EnumBillType + { + [Description("原料收货")] + MaterialReceive=101, + [Description("原料入库")] + MaterialIn = 102, + [Description("原料出库")] + MaterialDeliver=103, + [Description("生产叫料")] + MaterialAsk=104, + [Description("原料退货")] + MatertialReturn = 105, + [Description("生产退库")] + MaterialBack = 106, + + + [Description("委外出库")] + OutsourceDeliver = 109, + + // [Description("原料退货")] + // MaterialBack = 105, + // [Description("生产退库")] + // MaterialReturn = 106, + [Description("成品按器具收货")] + ProductReceiveByEqpt = 230, + [Description("成品负收货")] + ProductRecycle = 200, + [Description("成品收货")] + ProductReceive = 201, + [Description("成品入库")] + ProductIn=202, + [Description("发运计划")] + DeliverPlan = 203, + [Description("发运申请")] + DeliverAsk = 204, + [Description("客户退货")] + ProductReturn = 205, + [Description("成品顺序发货")] + ProductSortedDeliver = 206, + [Description("成品校验发货")] + ProductBatchDeliver = 216, + [Description("成品发货")] + ProductDeliver = 210, + + [Description("成品销售")] + ProductSell = 207, + [Description("成品返修")] + ProductRepair = 208, + + [Description("委外入库")] + OutsourceReceive = 209, + + [Description("发往中转库")] + SendToTransit = 220, + + [Description("中转库接收")] + TransitReceive = 221, + [Description("中转库发出")] + TransitSendOut = 222, + + [Description("中转库退回")] + TransitReject = 223, + [Description("接收中转库退货")] + TransitRejectReceive = 224, + + [Description("其它入库")] + OtherIn = 300, + [Description("其它出库")] + OtherOut = 301, + [Description("移库")] + StockMove = 302, + [Description("打包")] + StockPack = 303, + [Description("拆包")] + StockUnpack = 304, + [Description("盘点")] + CheckPlan = 305, + [Description("盘点库位")] + CheckLoc = 306, + [Description("结算比对")] + BalanceCompare = 307, + [Description("标签盘点")] + TagCheck = 308, + + [Description("器具初始化")] + EqptRecover = 401, + [Description("器具保养")] + EqptMaintain = 402, + [Description("器具报废")] + EqptScrap = 403, + [Description("码托")] + EqptLoad = 404, + + [Description("JIS收货")] + VinReceive = 501, + [Description("JIS发货")] + VinDeliver = 502, + [Description("JIS销售")] + VinSell = 503, + + [Description("报检")] + Inspect =601, + [Description("追溯")] + TraceBack = 602, + [Description("备货单")] + PickPlan = 603, + [Description("发料单")] + PickFact = 604, + [Description("生产计划")] + ProducePlan = 605, + [Description("委外计划")] + OutsourcePlan = 606, + + ReHandleVin = 701, + [Description("采购订单")] + PuchaseOrder = 702, + [Description("发货单")] + AsnOrder = 703, + [Description("销售订单")] + SaleOrder = 704, + + [Description("机台绑定料筒")] + TankUpdate = 902, + MachineUpdate = 901, + + None = 0, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EnumCheckResult.cs b/北京北汽/SCP/Models/Enums/EnumCheckResult.cs new file mode 100644 index 0000000..5c74195 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EnumCheckResult.cs @@ -0,0 +1,9 @@ +namespace ChangKeTec.Wms.Models.Enums +{ + public enum EnumCheckResult + { + 未盘点 =-1, + 有差异=1, + 盘平=0, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EnumCheckState.cs b/北京北汽/SCP/Models/Enums/EnumCheckState.cs new file mode 100644 index 0000000..87ff233 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EnumCheckState.cs @@ -0,0 +1,25 @@ +using System.ComponentModel; + +namespace ChangKeTec.Wms.Models.Enums +{ + public enum EnumCheckState + { + //状态 0:新增 1:已初盘 2:已重盘 3:已调整库存 -1:已取消 + [Description("未盘点")] + 未盘点 = 0, + [Description("盘点中")] + 盘点中 = 1, + [Description("初盘完成")] + 初盘完成 = 2, + [Description("重盘完成")] + 重盘完成 = 3, + [Description("监盘完成")] + 监盘完成 = 4, + [Description("库存调整完成")] + 库存调整完成 = 5, + [Description("接口数据生成")] + 接口数据生成 = 6, + [Description("作废")] + 作废 = -1 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EnumConfigType.cs b/北京北汽/SCP/Models/Enums/EnumConfigType.cs new file mode 100644 index 0000000..45d9615 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EnumConfigType.cs @@ -0,0 +1,17 @@ +using System; + +namespace CK.SCP.Models +{ + /// <summary> + /// - + /// </summary> + [Serializable] + public enum EnumConfigType + { + STRING = 0, + INT = 1, + FLOAT = 2, + BOOL = 3, + DATETIME = 4 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EnumCqbmptProcess.cs b/北京北汽/SCP/Models/Enums/EnumCqbmptProcess.cs new file mode 100644 index 0000000..2c181d2 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EnumCqbmptProcess.cs @@ -0,0 +1,10 @@ +namespace ChangKeTec.Wms.Models.Enums +{ + public enum EnumCqbmptProcess + { + 注塑 =1, + 喷涂 =2, + 预装 =3, + 装配 =4, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EnumErrorCode.cs b/北京北汽/SCP/Models/Enums/EnumErrorCode.cs new file mode 100644 index 0000000..b3191b7 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EnumErrorCode.cs @@ -0,0 +1,21 @@ +using System; +using System.ComponentModel; + +namespace CK.SCP.Models +{ + [Serializable] + public enum EnumErrorCode + { + [Description("成功")] Success = 0, + [Description("警告")] Warning = 1, + [Description("连接错误")] ErrorConnection = 1001, + [Description("未找到数据")] DataNotFound = 2001, + [Description("数据已存在")] DataAlreadyExist = 2002, + [Description("数据状态错误")] DataStateError = 2003, + [Description("数量错误")] DataQtyError = 2004, + + [Description("发现新零件")] NewCustPart = 4001, + [Description("系统错误")] Exception = -1, + [Description("数据校验失败")] DbEntityValidationException = -2 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EnumFormState.cs b/北京北汽/SCP/Models/Enums/EnumFormState.cs new file mode 100644 index 0000000..730ed32 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EnumFormState.cs @@ -0,0 +1,13 @@ +using System.ComponentModel; + +namespace ChangKeTec.Wms.Models.Enums +{ + public enum EnumFormState + { + [Description("开放")] + 开放 = 1, + [Description("关闭")] + 关闭 = 0, + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EnumInjectionState.cs b/北京北汽/SCP/Models/Enums/EnumInjectionState.cs new file mode 100644 index 0000000..23fe929 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EnumInjectionState.cs @@ -0,0 +1,37 @@ +namespace ChangKeTec.Wms.Models.Enums +{ + public enum EnumInjectionState + { + 标签作废 = -1, + 合格 = 1, + 市场件 = 2, + 报废 = 3, + } + + public enum EnumPaintState + { + 上线 = 0, + 合格 = 1, + 需要抛光 = 2, + 需要打磨 = 3, + 报废 = -1, + 待定 = 9, + } + + public enum EnumCqbmptState + { + 标签作废 = -1, + 待检 = 0, + 合格 = 1, + //注塑 1X + 市场件 = 12, + 报废 = 3, + //喷涂 2X + 需要抛光 = 22, + 需要打磨 = 23, + 待判定 = 9, + + + } + +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EnumLoginState.cs b/北京北汽/SCP/Models/Enums/EnumLoginState.cs new file mode 100644 index 0000000..ffc21ac --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EnumLoginState.cs @@ -0,0 +1,11 @@ +using System; + +namespace CK.SCP.Models +{ + [Serializable] + public enum EnumLoginState + { + Logout = 0, + Login = 1 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EnumManageType.cs b/北京北汽/SCP/Models/Enums/EnumManageType.cs new file mode 100644 index 0000000..d379e81 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EnumManageType.cs @@ -0,0 +1,12 @@ +using System.ComponentModel; + +namespace ChangKeTec.Wms.Models.Enums +{ + public enum EnumManageType + { + [Description("批量")] + 批量 =0, + [Description("单包装")] + 单包装 =1 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EnumPaintState.cs b/北京北汽/SCP/Models/Enums/EnumPaintState.cs new file mode 100644 index 0000000..7e0bc97 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EnumPaintState.cs @@ -0,0 +1,4 @@ +namespace ChangKeTec.Wms.Models.Enums +{ + +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EnumPartKind.cs b/北京北汽/SCP/Models/Enums/EnumPartKind.cs new file mode 100644 index 0000000..00e965f --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EnumPartKind.cs @@ -0,0 +1,16 @@ +using System.ComponentModel; + +namespace ChangKeTec.Wms.Models.Enums +{ + public enum EnumPartKind + { + [Description("ܳ")] + FG, + [Description("ԭ")] + RAW, + [Description("Ʒ")] + SUB, + [Description("")] + AST, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EnumPartType.cs b/北京北汽/SCP/Models/Enums/EnumPartType.cs new file mode 100644 index 0000000..e2d75d3 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EnumPartType.cs @@ -0,0 +1,28 @@ +using System.ComponentModel; + +namespace ChangKeTec.Wms.Models.Enums +{ + + + public enum EnumPartType + { + [Description("ɹ")] + B = 0, + [Description("")] + M = 1, + [Description("ί")] + S = 2, +// [Description("ͻָ")] +// D = 2, +// [Description("ͻָ")] +// DN = 21, +// [Description("ͻָ")] +// DY = 22, +// [Description("ί")] +// S = 3, +// [Description("˾ɹ")] +// Y = 4 + } + + +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EnumStockState.cs b/北京北汽/SCP/Models/Enums/EnumStockState.cs new file mode 100644 index 0000000..16eead4 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EnumStockState.cs @@ -0,0 +1,31 @@ +using System.ComponentModel; + +namespace ChangKeTec.Wms.Models.Enums +{ + public enum EnumStockState + { + [Description("生产报废")] + 生产报废 = -4, + [Description("过期")] + 过期 = -3, + [Description("其它报废")] + 其它报废 =-2, + [Description("待检")] + 隔离 = -1, + [Description("待检")] + 待检 = 0, + [Description("返修合格")] + 返修合格 =1, + [Description("合格")] + 合格 =2, + [Description("已配送")] + 已发货 = 3, + + } + public enum EnumCqbmptJisDataState + { + 待执行 = 0, + 成功 = 1, + 失败 = 2 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EnumStoreArea.cs b/北京北汽/SCP/Models/Enums/EnumStoreArea.cs new file mode 100644 index 0000000..909690c --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EnumStoreArea.cs @@ -0,0 +1,39 @@ +using System.ComponentModel; + +namespace ChangKeTec.Wms.Models.Enums +{ + public enum EnumStoreArea + { + [Description("RAW-原料区")] + RAW = 11, + [Description("WIP-线边区")] + WIP = 21, + [Description("FG-成品区")] + FG = 12, + [Description("SALE-销售区")] + SALE = 13, + [Description("HOLD-隔离区")] + HOLD = 22, + [Description("ROAD-在途区")] + ROAD = 14, + [Description("OTHER-盘点差异区")] + OTHER = 15, + [Description("SCRAP-废品区")] + SCRAP = 23, + [Description("SUB-半成品区")] + SUB = 16, + [Description("HF-半成品区")] + HF = 16, + [Description("INSPECT-待检区")] + INSPECT = 0, + [Description("OS-委外区")] + OS = 17, + [Description("INVALID-不合格品区")] + INVALID = 24, + [Description("AST-备品区")] + AST = 30, + [Description("OW-外库区")] + OW = 40, + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EnumSubBillType.cs b/北京北汽/SCP/Models/Enums/EnumSubBillType.cs new file mode 100644 index 0000000..c1c03c1 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EnumSubBillType.cs @@ -0,0 +1,62 @@ +using System.ComponentModel; + +namespace ChangKeTec.Wms.Models.Enums +{ + public enum EnumSubBillType + { + [Description("无")] + 无 = 0, + //其它出入库-出库 + [Description("其它出库")] + 其它出库 = 30101, + [Description("报废销毁")] + 报废销毁=30199, + + //其它出入库-入库 + [Description("其它入库")] + 其它入库 = 30001, + + + //移库 + [Description("全部")] + 全部 = 30201, + [Description("制造件")] + 制造件 = 30204, + [Description("采购件")] + 采购件 = 30205, + [Description("中转")] + 中转 = 30206, + [Description("委外")] + 委外 = 30207, + + //打包 + [Description("半成品码托")] + 半成品码托 = 40401, + [Description("成品码托")] + 成品码托 = 40402, + + //采购收货 + [Description("直接收货单")] + 直接收货 = 10100, + [Description("订单收货单")] + 订单收货 = 10101, + [Description("ASN收货单")] + ASN收货 = 10102, + [Description("JIT收货单")] + JIT收货 = 10103, + + 注塑 = 40101, + 喷涂 = 40201, + 预装 = 40300, + 总装 = 40301, + + + [Description("临时盘点")] + 临时盘点=40304, + [Description("计划盘点")] + 计划盘点=40305, + [Description("标签盘点")] + 标签盘点 = 40306, + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EnumTableName.cs b/北京北汽/SCP/Models/Enums/EnumTableName.cs new file mode 100644 index 0000000..b8710cd --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EnumTableName.cs @@ -0,0 +1,130 @@ +namespace CK.SCP.Models +{ + public enum EnumTableName + { + /// <summary> + /// 按钮表 + /// </summary> + TA_BUTTON, + + /// <summary> + /// 系统参数表 + /// </summary> + TA_CONFIG, + + /// <summary> + /// 部门表 + /// </summary> + TA_DEPT, + + /// <summary> + /// 菜单表 + /// </summary> + TA_MENU, + + + /// <summary> + /// 用户表 + /// </summary> + TA_USER, + + /// <summary> + /// 用户权限表 + /// </summary> + TA_USER_BUTTON, + + + TL_DATA_CHANGE, + TL_EXCEPTION, + TL_OPER, + + /// <summary> + /// 通用代码表 + /// </summary> + TS_CODE, + /// <summary> + /// 通用代码变更表 + /// </summary> + TT_CODE, + /// <summary> + /// 通用代码类型表 + /// </summary> + TS_CODE_TYPE, + /// <summary> + /// 通用代码类型表 + /// </summary> + TT_CODE_TYPE, + /// <summary> + /// 科目表 + /// </summary> + TS_ACCOUNT, + /// <summary> + /// 科目表变更表 + /// </summary> + TT_ACCOUNT, + TS_BOM, + TT_BOM, + TS_COLOR, + TT_COLOR, + TS_COST_CENTER, + TT_COST_CENTER, + TS_CUSTOMER, + TT_CUSTOMER, + TS_CUSTOMER_PART, + TT_CUSTOMER_PART, + TS_CUSTOMER_TYPE, + TT_CUSTOMER_TYPE, + TS_DEPARTMENT, + TT_DEPARTMENT, + TS_DOMAIN, + TT_DOMAIN, + TS_EDI_DATA, + TT_EDI_DATA, + TS_ENTITY, + TT_ENTITY, + TS_LINE, + TT_LINE, + TS_LINE_PART, + TT_LINE_PART, + TS_LOCATION, + TT_LOCATION, + TS_MES_DATA, + TT_MES_DATA, + TS_PACK, + TT_PACK, + TS_PART_DET, + TT_PART_DET, + TS_PART_MSTR, + TT_PART_MSTR, + TS_PRODUCT_LINE, + TT_PRODUCT_LINE, + TS_PROJECT, + TT_PROJECT, + TS_PURCHASE_PRICE, + TT_PURCHASE_PRICE, + TS_ROUTING, + TT_ROUTING, + TS_SALE_PRICE, + TT_SALE_PRICE, + TS_SHIFT, + TT_SHIFT, + TS_SITE, + TT_SITE, + TS_STAND_COST_PRICE, + TT_STAND_COST_PRICE, + TS_SUB_ACCOUNT, + TT_SUB_ACCOUNT, + TS_SUPPLIER, + TT_SUPPLIER, + TS_SUPPLIER_PART, + TT_SUPPLIER_PART, + TS_SUPPLIER_TYPE, + TT_SUPPLIER_TYPE, + TS_TEAM, + TT_TEAM, + TS_WORK_CENTER, + TT_WORK_CENTER, + TS_WMS_LOCATION, + TT_WMS_LOCATION + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EnumTaskState.cs b/北京北汽/SCP/Models/Enums/EnumTaskState.cs new file mode 100644 index 0000000..f27c97d --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EnumTaskState.cs @@ -0,0 +1,25 @@ +using System.ComponentModel; + +namespace CK.SCP.Models +{ + public enum EnumTaskState + { + + [Description("未读取")] Unread = 0, + [Description("执行中")] Processing = 1, + [Description("成功")] Success = 2, + [Description("失败")] Failed = 3, + [Description("部分失败")] PartialFailed = 4, + [Description("手动设置")] Menual = 5, + [Description("已取消")] Cancelled = 9, + } + + public enum EnumCommandType + { + [Description("读取")] R = 0, //Read + [Description("添加")] A = 1, //Add + [Description("更新")] U = 2, //Update + [Description("添加或更新")] AU = 3, //AddOrUpdate + [Description("删除")] D = 9, //Delete + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EnumUserType.cs b/北京北汽/SCP/Models/Enums/EnumUserType.cs new file mode 100644 index 0000000..6f4bb55 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EnumUserType.cs @@ -0,0 +1,15 @@ +using System; + +namespace CK.SCP.Models +{ + /// <summary> + /// û-TA_User.UserTye + /// </summary> + [Serializable] + public enum EnumUserType + { + Admin = 1, + SuperVisor = 2, + User = 3 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EqptState.cs b/北京北汽/SCP/Models/Enums/EqptState.cs new file mode 100644 index 0000000..73c099e --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EqptState.cs @@ -0,0 +1,13 @@ +namespace ChangKeTec.Wms.Models.Enums +{ + public enum EqptState + { + 空闲, + 使用中, + 已发出, + 维护中, + 已损坏 + } + + +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/EquipmentState.cs b/北京北汽/SCP/Models/Enums/EquipmentState.cs new file mode 100644 index 0000000..89b17d0 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/EquipmentState.cs @@ -0,0 +1,11 @@ +namespace CK.SCP.Models.Enums +{ + public enum EquipmentState + { + Idle, + InUsed, + Sent, + Maintaining, + Scraped + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/ErpInterfaceType.cs b/北京北汽/SCP/Models/Enums/ErpInterfaceType.cs new file mode 100644 index 0000000..269dcae --- /dev/null +++ b/北京北汽/SCP/Models/Enums/ErpInterfaceType.cs @@ -0,0 +1,19 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum ErpInterfaceType + { + [Description("移库")] + TR, + [Description("回冲")] + BK, + MaterialIn, + MaterialOut, + ProductIn, + ProductOut, + [Description("销售")] + SH, + RCT + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/ErrorCode.cs b/北京北汽/SCP/Models/Enums/ErrorCode.cs new file mode 100644 index 0000000..a82d390 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/ErrorCode.cs @@ -0,0 +1,32 @@ +using System.ComponentModel; + +namespace ChangKeTec.Wms.Models.Enums +{ + public enum ErrorCode + { + [Description("成功")] + Success = 0, + [Description("警告")] + Warning = 1, + [Description("连接错误")] + ErrorConnection = 1001, + [Description("未找到数据")] + DataNotFound = 2001, + [Description("数据已存在")] + DataAlreadyExist = 2002, + [Description("数据状态错误")] + DataStateError = 2003, + [Description("数量错误")] + DataQtyError=2004, + + [Description("发现新零件")] + NewCustPart = 4001, + [Description("系统错误")] + Exception=-1, + [Description("数据校验失败")] + DbEntityValidationException=-2, + + [Description("库存不足")] + StockNotEnough, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/GroupType.cs b/北京北汽/SCP/Models/Enums/GroupType.cs new file mode 100644 index 0000000..6e668a0 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/GroupType.cs @@ -0,0 +1,15 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum GroupType + { + [Description("λ")] + Shelf = 0, + [Description("λ")] + Ground = 1, + [Description("߱߻")] + Wip = 2, + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/InspectResult.cs b/北京北汽/SCP/Models/Enums/InspectResult.cs new file mode 100644 index 0000000..a712372 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/InspectResult.cs @@ -0,0 +1,19 @@ +using System.ComponentModel; + +namespace ChangKeTec.Wms.Models.Enums +{ + public enum InspectResult + { + [Description("让步接收")] + 让步接收 = 3, + [Description("合格")] + 合格 = 2, + [Description("挑选使用")] + 挑选使用 = 1, + [Description("待检")] + 待检 = 0, + [Description("不合格")] + 不合格 = -1, + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/InspectType.cs b/北京北汽/SCP/Models/Enums/InspectType.cs new file mode 100644 index 0000000..68fb327 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/InspectType.cs @@ -0,0 +1,14 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum InspectType + { + [Description("")] + No = 0, + [Description("ȫ")] + All = 1, + [Description("")] + Partial = 2 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/InspectionType.cs b/北京北汽/SCP/Models/Enums/InspectionType.cs new file mode 100644 index 0000000..86e3c94 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/InspectionType.cs @@ -0,0 +1,14 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum InspectionType + { + //[Description("未知")] Unknow = 0, + [Description("首检")] InspectionFirst = 1, + [Description("巡检")] InspectionMed = 2, + [Description("末检")] InspectionLast = 3, + [Description("设备点检")] CheckEquipment = 4, + [Description("产品点检")] CheckProduction = 5, + } +} diff --git a/北京北汽/SCP/Models/Enums/InventoryState.cs b/北京北汽/SCP/Models/Enums/InventoryState.cs new file mode 100644 index 0000000..b2559a4 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/InventoryState.cs @@ -0,0 +1,19 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum InventoryState + { + //状态 0:新建 1:已初盘 2:已重盘 3:已生成接口 -1:已取消 + [Description("新建")] + New = 0, + [Description("已初盘")] + Checked = 1, + [Description("已重盘")] + ReChecked = 2, + [Description("已生成接口")] + ToErp = 3, + [Description("取消")] + Cancelled = -1 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/InvoiceState.cs b/北京北汽/SCP/Models/Enums/InvoiceState.cs new file mode 100644 index 0000000..b821dd0 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/InvoiceState.cs @@ -0,0 +1,6 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/Item_Type.cs b/北京北汽/SCP/Models/Enums/Item_Type.cs new file mode 100644 index 0000000..c33fac5 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/Item_Type.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.Enums +{ + +} diff --git a/北京北汽/SCP/Models/Enums/LocType.cs b/北京北汽/SCP/Models/Enums/LocType.cs new file mode 100644 index 0000000..ac74d6d --- /dev/null +++ b/北京北汽/SCP/Models/Enums/LocType.cs @@ -0,0 +1,15 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum LocType + { + [Description("存储库位")] + Store = 0, + [Description("线边库位")] + Wip = 1, + [Description("功能库位")] + Functional = 2, + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/LogType.cs b/北京北汽/SCP/Models/Enums/LogType.cs new file mode 100644 index 0000000..25f7647 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/LogType.cs @@ -0,0 +1,17 @@ +namespace CK.SCP.Models.Enums +{ + public enum LogType + { + Login, + Logout, + BillCreate, + BillModify, + BillDelete, + BillCancel, + BaseDataCreate, + BaseDataModify, + BaseDataDisable, + BaseDataDelete, + StockMove + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/LoginState.cs b/北京北汽/SCP/Models/Enums/LoginState.cs new file mode 100644 index 0000000..2a665fb --- /dev/null +++ b/北京北汽/SCP/Models/Enums/LoginState.cs @@ -0,0 +1,16 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum LoginState + { + [Description("登录失败,未知原因")] + Fault = 0, + [Description("登录成功")] + OK = 1, + [Description("错误的用户名或密码,登录失败!")] + BadCode = 2, + [Description("登录失败,尝试次数太多。稍后再试。")] + Itm = 3, + } +} diff --git a/北京北汽/SCP/Models/Enums/MachineState.cs b/北京北汽/SCP/Models/Enums/MachineState.cs new file mode 100644 index 0000000..7c6ea57 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/MachineState.cs @@ -0,0 +1,7 @@ +namespace ChangKeTec.Wms.Models.Enums +{ + public enum MachineState + { + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/ManageType.cs b/北京北汽/SCP/Models/Enums/ManageType.cs new file mode 100644 index 0000000..abef2c3 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/ManageType.cs @@ -0,0 +1,12 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum ManageType + { + [Description("批量")] + Batch =0, + [Description("单包装")] + SinglePack =1 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/ManufactureProcedureType.cs b/北京北汽/SCP/Models/Enums/ManufactureProcedureType.cs new file mode 100644 index 0000000..1f31cda --- /dev/null +++ b/北京北汽/SCP/Models/Enums/ManufactureProcedureType.cs @@ -0,0 +1,18 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + + public enum ManufactureProcedureType + { + [Description("批量生产")] + Ordinary = 1, + [Description("试制")] + TrialManufacture = 2, + [Description("拆解返修")] + Disassembly = 3, + [Description("小修理")] + Replace = 4 + + } +} diff --git a/北京北汽/SCP/Models/Enums/NotifyType.cs b/北京北汽/SCP/Models/Enums/NotifyType.cs new file mode 100644 index 0000000..303be2f --- /dev/null +++ b/北京北汽/SCP/Models/Enums/NotifyType.cs @@ -0,0 +1,24 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum NotifyType + { + [Description("新增备料单")] + MaterialAsk=0, + [Description("未知客户物料号")] + UnknowCustPart=1, + [Description("新增检验单")] + Inspect=2, + [Description("新增生产计划单")] + ProducePlan=3, + [Description("新增发货计划单")] + DeliverPlan=4, + [Description("新增盘点计划单")] + InventoryPlan=5, + [Description("新增委外计划单")] + OmPlan=6, + [Description("VIN处理错误")] + VinError=7, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/OperateType.cs b/北京北汽/SCP/Models/Enums/OperateType.cs new file mode 100644 index 0000000..018e43d --- /dev/null +++ b/北京北汽/SCP/Models/Enums/OperateType.cs @@ -0,0 +1,11 @@ +namespace CK.SCP.Models.Enums +{ + public enum OperateType + { + Add, + Update, + Delete, + Cancel, + Finish + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/OrderState.cs b/北京北汽/SCP/Models/Enums/OrderState.cs new file mode 100644 index 0000000..6ab2cdc --- /dev/null +++ b/北京北汽/SCP/Models/Enums/OrderState.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.Enums +{ + public enum OrderState + { + [Description("日程订单")] + New = 1, + [Description("离散订单")] + Release = 2, + } + + +} diff --git a/北京北汽/SCP/Models/Enums/OrderType.cs b/北京北汽/SCP/Models/Enums/OrderType.cs new file mode 100644 index 0000000..c54dbc5 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/OrderType.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.Enums +{ + public enum OrderType + { + [Description("日程订单")] + New = 0, + [Description("离散订单")] + Release = 1, + + } + public enum OrderStatus + { + [Description("新建")] + New = 0, + [Description("发布")] + Publish = 1, + [Description("取消发布")] + Cancel = 2, + + } +} diff --git a/北京北汽/SCP/Models/Enums/PaintType.cs b/北京北汽/SCP/Models/Enums/PaintType.cs new file mode 100644 index 0000000..24e8673 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/PaintType.cs @@ -0,0 +1,10 @@ +namespace ChangKeTec.Wms.Models.Enums +{ + public enum EnumCqbmptPartType + { + 正常件=0, + 调试件=1, + 测试件试验件=2, + 评审件=3, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/PartKind.cs b/北京北汽/SCP/Models/Enums/PartKind.cs new file mode 100644 index 0000000..ee93769 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/PartKind.cs @@ -0,0 +1,14 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum PartKind + { + [Description("ܳ")] + FG, + [Description("ԭ")] + RAW, + [Description("Ʒ")] + SUB + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/PartState.cs b/北京北汽/SCP/Models/Enums/PartState.cs new file mode 100644 index 0000000..151be4e --- /dev/null +++ b/北京北汽/SCP/Models/Enums/PartState.cs @@ -0,0 +1,17 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum PartState + { + [Description("Actived")] + A, + [Description("Designing")] + D, + [Description("Hold")] + H, + [Description("Noneactived")] + N + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/PartType.cs b/北京北汽/SCP/Models/Enums/PartType.cs new file mode 100644 index 0000000..97d2ee7 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/PartType.cs @@ -0,0 +1,24 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + + + public enum PartType + { + [Description("ɹ")] + B = 0, + [Description("Ƽ")] + M = 1, + [Description("ͻָ")] + D = 2, + [Description("ͻָ")] + DN = 21, + [Description("ͻָ")] + DY = 22, + [Description("ί")] + S = 3, + [Description("˾ɹ")] + Y = 4 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/PlanDayState.cs b/北京北汽/SCP/Models/Enums/PlanDayState.cs new file mode 100644 index 0000000..394c567 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/PlanDayState.cs @@ -0,0 +1,23 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + + public enum PlanDayState + { + [Description("取消")] + Cancelled = -1, + [Description("新建")] + New = 0, + [Description("提交")] + Handling = 1, + [Description("已分配工单")] + Assigned = 2, + [Description("禁止自动分配工单")] + AssignDisable = 3, + [Description("完成")] + Finished = 4, + [Description("失败")] + Failed = 5, + } +} diff --git a/北京北汽/SCP/Models/Enums/PlanState.cs b/北京北汽/SCP/Models/Enums/PlanState.cs new file mode 100644 index 0000000..b635c97 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/PlanState.cs @@ -0,0 +1,144 @@ +using System; +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum PlanState + { + [Description("新建")] + New = 0, + [Description("发布")] + Release = 1, + [Description("已确认")] + Confirm = 2, + [Description("已发货")] + Ship = 3, + [Description("已收货")] + Receive = 4, + [Description("已完成")] + Complete = 5, + [Description("强制完结")] + CompleteForce = 6, + [Description("已作废")] + Reject = -1, + } + +/* public class F_StatePlan + { + public static int New = 0; + public static int Release = 1; + public static int Confirm = 2; + public static int Ship = 3; + public static int Receive = 4; + public static int Complete = 5; + public static int CompleteForce = 6; + public static int Reject = -1; + + public static string GetName(object State) + { + string ret = ""; + + if (Convert.ToInt32(State) == New) ret = "新建"; + if (Convert.ToInt32(State) == Release) ret = "发布"; + if (Convert.ToInt32(State) == Confirm) ret = "已确认"; + if (Convert.ToInt32(State) == Ship) ret = "已发货"; + if (Convert.ToInt32(State) == Receive) ret = "已收货"; + if (Convert.ToInt32(State) == Complete) ret = "已完成"; + if (Convert.ToInt32(State) == CompleteForce) ret = "强制完结"; + if (Convert.ToInt32(State) == Reject) ret = "已作废"; + + + return ret; + } + + } + public class F_StateShip + { + public static int New = 0; + public static int Ship = 1; + public static int Receive = 2; + public static int Reject = -1; + + public static string GetName(object State) + { + string ret = ""; + + if (Convert.ToInt32(State) == New) ret = "新建"; + if (Convert.ToInt32(State) == Ship) ret = "已发货"; + if (Convert.ToInt32(State) == Receive) ret = "已收货"; + if (Convert.ToInt32(State) == Reject) ret = "已作废"; + + + return ret; + } + + + + + + } + public class F_StateReceive + { + public static int Receive = 0; + public static int Check = 1; + public static int Invoice = 2; + + public static string GetName(object State) + { + string ret = ""; + + if (Convert.ToInt32(State) == Receive) ret = "已收货"; + if (Convert.ToInt32(State) == Check) ret = "审核通过"; + if (Convert.ToInt32(State) == Invoice) ret = "已开票"; + + return ret; + } + + } + + public class F_StateReceiveType + { + public static int Receive = 1; + public static int Return = 2; + + public static string GetName(object State) + { + string ret = ""; + + if (Convert.ToInt32(State) == Receive) ret = "收货单"; + if (Convert.ToInt32(State) == Return) ret = "退货单"; + + return ret; + } + + } + + public class F_StateInvoice + { + public static int New = 0; + public static int Apply = 1; + public static int CheckFail = 2; + public static int CheckSuccess = 3; + public static int Mail = 4; + public static int FinanceReceive = 5; + public static int FinanceFail = 6; + public static int Reject = -1; + + public static string GetName(object State) + { + string ret = ""; + + if (Convert.ToInt32(State) == New) ret = "新建"; + if (Convert.ToInt32(State) == Apply) ret = "供应商申请"; + if (Convert.ToInt32(State) == CheckFail) ret = "采购审核退回"; + if (Convert.ToInt32(State) == CheckSuccess) ret = "采购审核通过"; + if (Convert.ToInt32(State) == Mail) ret = "发票寄出"; + if (Convert.ToInt32(State) == FinanceFail) ret = "财务退回"; + if (Convert.ToInt32(State) == FinanceReceive) ret = "财务收票"; + if (Convert.ToInt32(State) == Reject) ret = "发票作废"; + + return ret; + } + + }*/ +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/PortalType.cs b/北京北汽/SCP/Models/Enums/PortalType.cs new file mode 100644 index 0000000..3667b93 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/PortalType.cs @@ -0,0 +1,16 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum PortalType + { + [Description("ͻ")] + WinForm = 0, + [Description("վ")] + Web = 1, + [Description("ֳ")] + Pda = 2, + [Description("")] + Other = 3, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/PrintType.cs b/北京北汽/SCP/Models/Enums/PrintType.cs new file mode 100644 index 0000000..e93da16 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/PrintType.cs @@ -0,0 +1,12 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + //public enum PrintType + //{ + // [Description("直接打印")] + // Print=0, + // [Description("打印预览")] + // PrintPreview=1 + //} +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/Project.cs b/北京北汽/SCP/Models/Enums/Project.cs new file mode 100644 index 0000000..caa4dc0 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/Project.cs @@ -0,0 +1,15 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum Project + { + [Description("CKPT")] + X261CC = 0, + [Description("DP")] + X261CDC = 1, + [Description("CNSL")] + X261CCC = 2, + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/ProjectName.cs b/北京北汽/SCP/Models/Enums/ProjectName.cs new file mode 100644 index 0000000..e5a0d71 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/ProjectName.cs @@ -0,0 +1,17 @@ +namespace CK.SCP.Models.Enums +{ + public enum ProjectName + { + 锦州锦恒, + 常熟安通林, + 常熟安通林海虞专用, + 天津安通林, + 成都安通林, + 北京安通林, + + 天津迪安, + 长春繁荣, + 重庆北汽模塑, + 江苏锦恒, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/ReceiveBillType.cs b/北京北汽/SCP/Models/Enums/ReceiveBillType.cs new file mode 100644 index 0000000..b69905f --- /dev/null +++ b/北京北汽/SCP/Models/Enums/ReceiveBillType.cs @@ -0,0 +1,12 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum ReceiveBillType + { + [Description("收货单")] + Receive = 1, + [Description("退货单")] + Reject = 2, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/ResultCode.cs b/北京北汽/SCP/Models/Enums/ResultCode.cs new file mode 100644 index 0000000..db87c27 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/ResultCode.cs @@ -0,0 +1,32 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum ResultCode + { + [Description("成功")] + Success = 0, + [Description("警告")] + Warning = 1, + [Description("连接错误")] + ErrorConnection = 1001, + [Description("未找到数据")] + DataNotFound = 2001, + [Description("数据已存在")] + DataAlreadyExist = 2002, + [Description("数据状态错误")] + DataStateError = 2003, + [Description("数量错误")] + DataQtyError=2004, + + [Description("发现新零件")] + NewCustPart = 4001, + [Description("系统错误")] + Exception=-1, + [Description("数据校验失败")] + DbEntityValidationException=-2, + + [Description("库存不足")] + StockNotEnough, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/SCP_ENUM.cs.cs b/北京北汽/SCP/Models/Enums/SCP_ENUM.cs.cs new file mode 100644 index 0000000..361dba4 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/SCP_ENUM.cs.cs @@ -0,0 +1,311 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.Enums +{ + public enum EnumReviewType + { + [Description("报废")] + SCRAP = 0, + [Description("退货")] + REJECT = 1, + [Description("索赔")] + CLAIM = 2, + } + public enum EnumReviewSite + { + [Description("发泡")] + Foaming = 10, + [Description("包覆")] + Coating = 10, + [Description("装配")] + Assembly = 10, + [Description("退货")] + Reject = 10, + [Description("第三方仓库")] + ThirdParty = 10, + [Description("客户处")] + Customer = 10, + [Description("供应商(退货)")] + VenderReject = 10, + [Description("供应商索赔(过程&客退)")] + VenderClaim = 10, + } + public enum DB_CONNECTION + { + [Description("数据中心")] + DataCenterDB = 0, + [Description("交换中心")] + ExchangeCenterDB = 1, + [Description("SCP")] + ScpDB = 2, + [Description("角色服务器")] + AppBoxDB = 3, + [Description("QAD交换中心")] + UniApiDB = 4, + [Description("WmsDatabase")] + WmsDB = 5, + + } + + public enum PENDING_STATE + { + [Description("代办")] + WAITING=0, + [Description("已办")] + COMPLETED = 1, + + } + public enum PENDING_MESSAGE_TYPE + { + [Description("新合同订单")] + NEW_CONTRACT_PO = 101, + [Description("新离散订单")] + NEW_PO = 102, + [Description("新要货看板")] + NEW_ASK = 103, + [Description("新收货单")] + NEW_RECVICE = 104, + [Description("采购审核通过")] + PO_AUDIT_PASS = 105, + [Description("采购审核退回")] + PO_AUDIT_BACK = 106, + [Description("财务审核通过")] + FC_AUDIT_PASS = 107, + [Description("财务审核退回")] + FC_AUDIT_BACK = 108, + [Description("财务收票")] + FC_END = 109, + [Description("新发货单")] + NEW_ASN = 110, + [Description("申请开发票")] + APPLY_INVOICE = 111, + [Description("发票寄出")] + SEND_INVOICE = 112 + } + + public enum PoState + { + [Description("关闭")] + Close = 0, + [Description("开放")] + Open = 1, + + } + public enum BillModType + { + [Description("日程订单")] + Contract = 1, + [Description("离散订单")] + Non_Contract = 2, + + } + public enum AskState + { + [Description("新建")] + New = 0, + [Description("发布")] + Release = 1, + [Description("已确认")] + Confirm = 2, + [Description("已发货")] + Ship = 3, + [Description("已收货")] + Receive = 4, + [Description("已完成")] + Complete = 5, + [Description("强制完结")] + CompleteForce = 6, + [Description("已作废")] + Reject = -1, + [Description("取消已确认")] + NoConfirm = 7, + + + } + public enum AsnState + { + [Description("新建")] + New = 0, + [Description("已发货")] + Ship = 3, + [Description("已收货")] + Receive = 4, + [Description("已作废")] + Reject = -1, + [Description("异常待处理")] + Exception = -2, + + } + + public enum ReceiveState + { + [Description("已收货")] + Receive = 0, + [Description("审核通过")] + Check = 1, + [Description("待开票")] + Invoice = 2, + [Description("报废退货单")] + Reject = -1, + + } + public enum RejectState + { + [Description("已拒收")] + NoReceive = 0, + [Description("审核通过")] + Check = 1, + + } + public enum ArriveState + { + [Description("不合格")] + NotRight = 0, + [Description("合格")] + OK = 1, + + } + public enum ArriveBillType + { + [Description("收货单")] + Receive = 0, + [Description("退货单")] + Reject = 1, + + } + public enum InvoiceState + { + [Description("新建")] + New = 0, + [Description("供应商申请")] + Apply= 1, + [Description("采购审核退回")] + CheckFail = 2, + [Description("采购审核通过")] + CheckSuccess = 3, + [Description("发票寄出")] + Mail = 4, + [Description("财务收票")] + FinanceReceive = 5, + [Description("财务退回")] + FinanceFail = 6, + [Description("财务手工收票")] + CustomReceive = 8, + [Description("发票作废")] + Reject = -1, + } + public enum LoginNumer + { + [Description("成功登录")] + Sussess = 0, + [Description("登录失败")] + Faile = 1, + } + + public enum ConfigState + { + [Description("工厂参数")] + FactoryParms = 101, + [Description("全局参数")] + GlobalParms = 102, + + } + + + public enum PrintType + { + [Description("发货单标签")] + ASN = 1, + [Description("发货单")] + BAR_CODE =2, + [Description("托盘")] + Pallet_CODE = 3, + + } + public enum PalletType + { + [Description("")] + ASN = 1, + [Description("发货单")] + BAR_CODE = 2, + + } + public enum PalletState + { + [Description("新建")] + New = 0, + [Description("发布")] + Release = 1, + [Description("已确认")] + Confirm = 2, + [Description("已发货")] + Ship = 3, + [Description("已收货")] + Receive = 4, + [Description("已完成")] + Complete = 5, + [Description("强制完结")] + CompleteForce = 6, + [Description("已作废")] + Reject = -1, + [Description("取消已确认")] + NoConfirm = 7, + + + } + + public enum ForecastState + { + [Description("新建")] + New = 0, + [Description("已确认")] + Confirm = 1, + [Description("已作废")] + Reject = -1, + } + public enum PriceState + { + [Description("新建")] + New = 0, + [Description("采购确认")] + PConfirm = 1, + [Description("财务确认")] + FConfirm = 2, + [Description("已作废")] + Reject = -1, + + } + + public enum Domain + { + [Description("BJBMPT")] + 北京北汽模朔= 0, + [Description("CNS")] + 常熟安通林 = 1, + [Description("0210")] + 沈阳锦恒 = 2, + [Description("BJCAIAI")] + 北京安通林 = 3, + [Description("CQBIM")] + 重庆北汽模朔 = 4, + + + } + public enum PoPlanType + { + [Description("MRP计划")] + New = 0, + [Description("MRP需求")] + Release = 1, + [Description("自己定义计划")] + Confirm = 2, + + } + + +} diff --git a/北京北汽/SCP/Models/Enums/ServiceType.cs b/北京北汽/SCP/Models/Enums/ServiceType.cs new file mode 100644 index 0000000..0313904 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/ServiceType.cs @@ -0,0 +1,52 @@ +namespace CK.SCP.Models.Enums +{ + public enum ServiceType + { + GetConfigList, + GetWhseList, + GetAreaList, + GetGroupList, + GetLocList, + GetPartList, + GetVendPartList, + GetCustPartList, + GetSupplierList, + GetCustomerList, + GetShiftList, + GetTeamList, + GetWorklineList, + GetBomList, + + GetBarcode, + + GetLocByLocCode, + GetPartByPartCode, + GetPartByErpPartCode, + GetCustPartByCustPartCode, + GetPoByCode, + GetAsnByCode, + GetProducePlanByCode, + GetSoByCode, + GetEqptByCode, + + GetStock, + GetStockList, + + GetBill, + GetBillList, + GetSourceBill, + + AddBill, + StartBill, + + InventoryLoc, + FinishBill, + GetInventoryLoc, + GetStockDetailList, + CancelBill, + GetOtscById, + GetPdaPowerMenu, + GetSubBillTypeList, + UnlockLoc + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/ShipState.cs b/北京北汽/SCP/Models/Enums/ShipState.cs new file mode 100644 index 0000000..3c04fd9 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/ShipState.cs @@ -0,0 +1,16 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum ShipState + { + [Description("新建")] + New = 0, + [Description("已发货")] + Ship =1, + [Description("已收货")] + Receive = 2, + [Description("已作废")] + Reject = -1, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/StockState.cs b/北京北汽/SCP/Models/Enums/StockState.cs new file mode 100644 index 0000000..0c1b1c4 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/StockState.cs @@ -0,0 +1,18 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum StockState + { + [Description("待检")] + Inspect=0, + [Description("合格")] + Valid = 1, + [Description("不合格")] + InValid = 2, + [Description("过期")] + Overdue = 3, + [Description("待判定")] + Hold = 4, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/StockWhereType.cs b/北京北汽/SCP/Models/Enums/StockWhereType.cs new file mode 100644 index 0000000..6d4d2ef --- /dev/null +++ b/北京北汽/SCP/Models/Enums/StockWhereType.cs @@ -0,0 +1,11 @@ +namespace CK.SCP.Models.Enums +{ + public enum StockWhereType + { + BarCode, + LocCode, + BarCodeAndLocCode, + EqptCode, + PartCode + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/StopLineType.cs b/北京北汽/SCP/Models/Enums/StopLineType.cs new file mode 100644 index 0000000..268dcad --- /dev/null +++ b/北京北汽/SCP/Models/Enums/StopLineType.cs @@ -0,0 +1,26 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + /// <summary> + /// 停线类型。也就是停线原因。 + /// </summary> + public enum StopLineType + { + [Description("质量问题")] QA = 1, + [Description("设备问题")] EQ = 2, + [Description("缺料")] Mat = 3, + [Description("工艺设计问题")] ProcessDesign = 4, + } + + /// <summary> + /// 停线事故等级。枚举值必须从小到大排列.以后要改的话,必须注意。要逐级触发系统动作的。 + /// </summary> + public enum StopLineLevel + { + [Description("轻度")] Minimum = 100, + [Description("一般")] Commonly = 200, + [Description("严重")] Serious = 300, + [Description("重大")] Weighty = 400, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/StoreArea.cs b/北京北汽/SCP/Models/Enums/StoreArea.cs new file mode 100644 index 0000000..22eb637 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/StoreArea.cs @@ -0,0 +1,32 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum StoreArea + { + [Description("原料库")] + RAW=11, + [Description("线边库")] + WIP=21, + [Description("成品库")] + FG=12, + [Description("销售库")] + SALE=13, + [Description("隔离库")] + HOLD=22, + [Description("在途库")] + ROAD=14, + [Description("其它库")] + OTHER=15, + [Description("废品库")] + SCRAP=23, + [Description("半成品库")] + HF=16, + [Description("待检库")] + INSPECT=0, + [Description("委外库")] + OS = 17, + [Description("备品库")] + AST + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/SubBillType.cs b/北京北汽/SCP/Models/Enums/SubBillType.cs new file mode 100644 index 0000000..9c2eb90 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/SubBillType.cs @@ -0,0 +1,56 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum SubBillType + { + //其它出入库-出库 + [Description("其它出库")] + OtherOut = 30101, + //[Description("原料退货")] + //ReturnToSupplier=30102, + [Description("盘盈单")] + InventoryProfit = 30103, + [Description("报废销毁")] + ScrapDestroy=30104, + + //其它出入库-入库 + [Description("其它入库")] + OtherIn = 30111, + //[Description("销售退货")] + //ProductReturn=30112, + [Description("盘亏单")] + InventoryLoss=30113, + + //其它出入库-移库 + [Description("成品隔离")] + ProductUndecide = 30131, + //[Description("成品返修")] + //ProductRepair = 30132, + [Description("成品报废")] + ProductScrap = 30133, + //[Description("生产退库")] + //BackToStore = 30134, + + + //移库 + [Description("移库单")] + StockMove = 30201, + [Description("原料入库单")] + MaterialStockIn = 30202, + [Description("成品入库单")] + ProductStockIn = 30203, + [Description("成品出库单")] + ProductStockOut = 30204, + [Description("原料出库单")] + PartPickFact = 30205, + + + //采购收货 + [Description("订单收货单")] + PoReceive = 10101, + [Description("ASN收货单")] + AsnReceive = 10102, + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/TransType.cs b/北京北汽/SCP/Models/Enums/TransType.cs new file mode 100644 index 0000000..055b568 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/TransType.cs @@ -0,0 +1,9 @@ +namespace ChangKeTec.Wms.Models.Enums +{ + public enum TransType + { + In=1, + Out=-1, + None=0 + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/UniApiState.cs b/北京北汽/SCP/Models/Enums/UniApiState.cs new file mode 100644 index 0000000..6d61d04 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/UniApiState.cs @@ -0,0 +1,10 @@ +namespace CK.SCP.Models.Enums +{ + public enum UniApiState + { + 待执行 = 0, + 成功 = 1, + 失败 = 2, + 其它 = 9, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/UniApiType.cs b/北京北汽/SCP/Models/Enums/UniApiType.cs new file mode 100644 index 0000000..07133f6 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/UniApiType.cs @@ -0,0 +1,18 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum UniApiType + { + [Description("订单")] + PO, + [Description("收货")] + Receive, + [Description("条码")] + BarCode, + [Description("发票")] + Invoice, + [Description("价格单")] + Price, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/VinState.cs b/北京北汽/SCP/Models/Enums/VinState.cs new file mode 100644 index 0000000..e022093 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/VinState.cs @@ -0,0 +1,22 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum VinState + { + [Description("已收货")] + Received = 0, + [Description("部分收货")] + Partial = 111, + [Description("已发货")] + Delivered = 222, + [Description("销售中")] + Selling = 300, + [Description("已销售")] + Sold = 333, + [Description("已比对")] + Balanced = 999, + [Description("不存在数据")] + DataNotFound = -1, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/WhseType.cs b/北京北汽/SCP/Models/Enums/WhseType.cs new file mode 100644 index 0000000..273ed72 --- /dev/null +++ b/北京北汽/SCP/Models/Enums/WhseType.cs @@ -0,0 +1,12 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum WhseType + { + [Description("ֿ")] + ProduceWhse = 0, + [Description("ֿ")] + ThirdWhse = 1, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Enums/WorkLineType.cs b/北京北汽/SCP/Models/Enums/WorkLineType.cs new file mode 100644 index 0000000..9f0891d --- /dev/null +++ b/北京北汽/SCP/Models/Enums/WorkLineType.cs @@ -0,0 +1,11 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.Enums +{ + public enum WorkLineType + { + [Description("װ")] + Assemble = 0, + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterContext.cs b/北京北汽/SCP/Models/ExchangeCenterContext.cs new file mode 100644 index 0000000..8efd38b --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterContext.cs @@ -0,0 +1,113 @@ +using System.Data.Entity; +using System.Data.Entity.ModelConfiguration.Conventions; +using CK.SCP.Models.ExchangeCenterTables; + +namespace CK.SCP.Models +{ + [DbConfigurationType(typeof(SqlDbConfiguration))] + public class ExchangeCenterContext : DbContext + { + public ExchangeCenterContext() : base("name=ExchangeCenterContext") + { + + + } + + public ExchangeCenterContext(string strConn) : base(strConn) + { + + + //Database.SetInitializer(new ExchangeCenterDatabaseInitializer()); + } + + public virtual DbSet<TEA_CONFIG> TEA_CONFIG { get; set; } + public virtual DbSet<TEA_TASK> TEA_TASK { get; set; } + public virtual DbSet<TEA_TASK_SUB> TEA_TASK_SUB { get; set; } + public virtual DbSet<TEA_TASK_SUB_HIS> TEA_TASK_SUB_HIS { get; set; } + public virtual DbSet<TEA_DATA_ERROR_LOG> TEA_DATA_ERROR_LOG { get; set; } + public virtual DbSet<TEA_TASK_SUB_READ_LOG> TEA_TASK_SUB_READ_LOG { get; set; } + public virtual DbSet<TEA_TABLE> TEA_TABLE { get; set; } + public virtual DbSet<TEA_SYSTEM> TEA_SYSTEM { get; set; } + public virtual DbSet<TEA_SUBSCRIBE> TEA_SUBSCRIBE { get; set; } + public virtual DbSet<TES_SUPPLIER> TES_SUPPLIER { get; set; } + public virtual DbSet<TES_CUSTOMER> TES_CUSTOMER { get; set; } + public virtual DbSet<TES_DOMAIN> TES_DOMAIN { get; set; } + public virtual DbSet<TES_WORK_CENTER> TES_WORK_CENTER { get; set; } + public virtual DbSet<TES_SUPPLIER_TYPE> TES_SUPPLIER_TYPE { get; set; } + public virtual DbSet<TED_PPOD_DET> TED_PPOD_DET { get; set; } + public virtual DbSet<TES_SUB_ACCOUNT> TES_SUB_ACCOUNT { get; set; } + public virtual DbSet<TES_SITE> TES_SITE { get; set; } + public virtual DbSet<TES_CODE> TES_CODE { get; set; } + public virtual DbSet<TES_CODE_TYPE> TES_CODE_TYPE { get; set; } + public virtual DbSet<TES_PRODUCT_LINE> TES_PRODUCT_LINE { get; set; } + public virtual DbSet<TES_PROJECT> TES_PROJECT { get; set; } + public virtual DbSet<TES_DEPARTMENT> TES_DEPARTMENT { get; set; } + public virtual DbSet<TES_ENTITY> TES_ENTITY { get; set; } + public virtual DbSet<TES_CUSTOMER_TYPE> TES_CUSTOMER_TYPE { get; set; } + public virtual DbSet<TES_COST_CENTER> TES_COST_CENTER { get; set; } + public virtual DbSet<TES_ACCOUNT> TES_ACCOUNT { get; set; } + public virtual DbSet<TES_EDI_DATA> TES_EDI_DATA { get; set; } + public virtual DbSet<TES_ROUTING> TES_ROUTING { get; set; } + public virtual DbSet<TES_PART_MSTR> TES_PART_MSTR { get; set; } + public virtual DbSet<TES_PART_DET> TES_PART_DET { get; set; } + public virtual DbSet<TES_MES_DATA> TES_MES_DATA { get; set; } + public virtual DbSet<TES_LOCATION> TES_LOCATION { get; set; } + public virtual DbSet<TES_WMS_LOCATION> TES_WMS_LOCATION { get; set; } + public virtual DbSet<TES_LINE> TES_LINE { get; set; } + public virtual DbSet<TES_COLOR> TES_COLOR { get; set; } + public virtual DbSet<TES_BOM> TES_BOM { get; set; } + public virtual DbSet<TES_PACK> TES_PACK { get; set; } + public virtual DbSet<TES_SUPPLIER_PART> TES_SUPPLIER_PART { get; set; } + public virtual DbSet<TES_CUSTOMER_PART> TES_CUSTOMER_PART { get; set; } + public virtual DbSet<TES_LINE_PART> TES_LINE_PART { get; set; } + public virtual DbSet<TES_PURCHASE_PRICE> TES_PURCHASE_PRICE { get; set; } + public virtual DbSet<TES_SALE_PRICE> TES_SALE_PRICE { get; set; } + public virtual DbSet<TES_STAND_COST_PRICE> TES_STAND_COST_PRICE { get; set; } + public virtual DbSet<TES_TEAM> TES_TEAM { get; set; } + public virtual DbSet<TES_SHIFT> TES_SHIFT { get; set; } + public virtual DbSet<TED_TRANSFER_MSTR> TED_TRANSFER_MSTR { get; set; } + public virtual DbSet<TED_TRANSFER_DET> TED_TRANSFER_DET { get; set; } + public virtual DbSet<TED_STOCK> TED_STOCK { get; set; } + public virtual DbSet<TED_RETURN_MSTR> TED_RETURN_MSTR { get; set; } + public virtual DbSet<TED_RETURN_DET> TED_RETURN_DET { get; set; } + public virtual DbSet<TED_RCTUNP_MSTR> TED_RCTUNP_MSTR { get; set; } + public virtual DbSet<TED_RCTUNP_DET> TED_RCTUNP_DET { get; set; } + public virtual DbSet<TED_RECEIPT_MSTR> TED_RECEIPT_MSTR { get; set; } + public virtual DbSet<TED_RECEIPT_DET> TED_RECEIPT_DET { get; set; } + public virtual DbSet<TED_ISSUNP_MSTR> TED_ISSUNP_MSTR { get; set; } + public virtual DbSet<TED_ISSUNP_DET> TED_ISSUNP_DET { get; set; } + public virtual DbSet<TED_BK_MSTR> TED_BK_MSTR { get; set; } + public virtual DbSet<TED_BK_DET> TED_BK_DET { get; set; } + public virtual DbSet<TED_CHECK_MSTR> TED_CHECK_MSTR { get; set; } + public virtual DbSet<TED_CHECK_DET> TED_CHECK_DET { get; set; } + public virtual DbSet<TED_MRP_MSTR> TED_MRP_MSTR { get; set; } + public virtual DbSet<TED_MRP_DET> TED_MRP_DET { get; set; } + public virtual DbSet<TED_INVOICE_MSTR> TED_INVOICE_MSTR { get; set; } + public virtual DbSet<TED_INVOICE_DET> TED_INVOICE_DET { get; set; } + public virtual DbSet<TED_INVOICE_ADD> TED_INVOICE_ADD { get; set; } + public virtual DbSet<TED_ASN_MSTR> TED_ASN_MSTR { get; set; } + + public virtual DbSet<TED_ASN_DET> TED_ASN_DET { get; set; } + public virtual DbSet<TED_INJECTION> TED_INJECTION { get; set; } + public virtual DbSet<TED_SPRAYING> TED_SPRAYING { get; set; } + public virtual DbSet<TED_SPRAYING_REPAIR> TED_SPRAYING_REPAIR { get; set; } + public virtual DbSet<TED_ASSEMBLE> TED_ASSEMBLE { get; set; } + public virtual DbSet<TED_LED> TED_LED { get; set; } + public virtual DbSet<TED_FIXED_MSTR> TED_FIXED_MSTR { get; set; } + public virtual DbSet<TED_FIXED_DET> TED_FIXED_DET { get; set; } + public virtual DbSet<TED_PO_DET> TED_POD_DET { get; set; } + public virtual DbSet<TED_PO_MSTR> TED_PO_MSTR { get; set; } + public virtual DbSet<TED_SO_DET> TED_SO_DET { get; set; } + public virtual DbSet<TED_SO_MSTR> TED_SO_MSTR { get; set; } + public virtual DbSet<TED_KANBAN_MSTR> TED_KANBAN_MSTR { get; set; } + public virtual DbSet<TED_KANBAN_DET> TED_KANBAN_DET { get; set; } + + + protected override void OnModelCreating(DbModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + modelBuilder.Conventions.Remove<DecimalPropertyConvention>(); + modelBuilder.Conventions.Add(new DecimalPropertyConvention(18, 5)); + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TEA_CONFIG.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TEA_CONFIG.cs new file mode 100644 index 0000000..53634a0 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TEA_CONFIG.cs @@ -0,0 +1,63 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("ϵͳ")] + public class TEA_CONFIG : ITable, IEnable + { + [IsDataGridColum(true, 1)] + [Index("IndexConfig", Order = 0, IsUnique = true, IsClustered = false)] + [Description("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string ConfigName { get; set; } + + [IsDataGridColum(true, 2)] + [Required(AllowEmptyStrings = true)] + [Description("ֵ")] + [StringLength(50)] + public string ConfigValue { get; set; } + + [IsDataGridColum(true, 3)] + [Description("˵")] + [StringLength(500)] + public string ConfigDesc { get; set; } + + + [IsDataGridColum(true, 4)] + [Required(AllowEmptyStrings = true)] + [Description("")] + public EnumConfigType ConfigType { get; set; } = EnumConfigType.STRING; + + #region ֶ + + [Description("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateUser { get; set; } = ""; + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + + [Description("ע")] + public string Remark { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + #endregion + + public bool Enable { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TEA_DATA_ERROR_LOG.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TEA_DATA_ERROR_LOG.cs new file mode 100644 index 0000000..cf76011 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TEA_DATA_ERROR_LOG.cs @@ -0,0 +1,67 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// ϸ־ + /// </summary> + [Description("ϸ־")] + public class TEA_DATA_ERROR_LOG : TED_BASE,ITaskTable + { + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string Creator { get; set; } + + [Description("")] + [StringLength(50)] + public string Subscriber { get; set; } + + [Description("ȡ")] + public Guid ReadID { get; set; } + + [Description("ݱ")] + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + [Description("Ϣ")] + [StringLength(50)] + public string ErrorInfo { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TEA_SUBSCRIBE.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TEA_SUBSCRIBE.cs new file mode 100644 index 0000000..b89190f --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TEA_SUBSCRIBE.cs @@ -0,0 +1,66 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// ı + /// </summary> + [Description("ı")] + public class TEA_SUBSCRIBE : IUpdatableTable, IEnable //,IDomainSite + { + [Description("")] + [Index("IndexSubscribe", Order = 0, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string TableName { get; set; } + + [Description("")] + [StringLength(50)] + public string Creator { get; set; } + + [Description("")] + [Index("IndexSubscribe", Order = 1, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string Subscriber { get; set; } + +// [Description("")] +// [StringLength(50)] +// [Description("")] [StringLength(50)] public string Domain { get; set; } +// +// [Description("ص")] +// [StringLength(50)] +// [Description("ص")] [StringLength(50)] public string Site { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [NotMapped] + public bool IsChecked { get; set; } + + public bool Enable { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TEA_SYSTEM.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TEA_SYSTEM.cs new file mode 100644 index 0000000..761c607 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TEA_SYSTEM.cs @@ -0,0 +1,89 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// ϵͳ + /// </summary> + [Description("ϵͳ")] + public class TEA_SYSTEM : IUpdatableTable, IDomainSite, IEnable + { + [IsDataGridColum(true, 1)] + [Description("ϵͳ")] + [Index("IndexSystem", Order = 0, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string SystemName { get; set; } + + [IsDataGridColum(true, 2)] + [Description("ϵͳ")] + [StringLength(50)] + public string SystemDesc { get; set; } + + [Description("")] + [StringLength(50)] + public string Password { get; set; } + + [IsDataGridColum(true, 12)] + [Description("ʼ")] + [StringLength(50)] + public string Email { get; set; } + + [IsDataGridColum(true, 9)] + [Description("ˢʱ")] + [Column(TypeName = "datetime2")] + public DateTime? GetSessionIdTime { get; set; } + + [IsDataGridColum(true, 10)] + [Description("ˢIPַ")] + [StringLength(50)] + public string ClientIp { get; set; } + + [IsDataGridColum(true, 8)] + [Index("IndexUserSessionId", Order = 0, IsUnique = false, IsClustered = false)] + [Description("Ự")] + [StringLength(50)] + public string SessionId { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } = "Init"; + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [NotMapped] + public bool IsChecked { get; set; } + + public bool Enable { get; set; } = true; + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TEA_TABLE.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TEA_TABLE.cs new file mode 100644 index 0000000..0a5a424 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TEA_TABLE.cs @@ -0,0 +1,57 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Attributes; +using CK.SCP.Models.Base; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// + /// </summary> + [Description("")] + public class TEA_TABLE : IUpdatableTable, IEnable + { + [IsDataGridColum(true, 1)] + [Description("")] + [Index("IndexTable", Order = 0, IsUnique = true, IsClustered = false)] + [StringLength(50)] + public string TableName { get; set; } + + [IsDataGridColum(true, 2)] + [Description("")] + [StringLength(50)] + public string TableDesc { get; set; } + + [NotMapped] + public bool IsChecked { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } = "Init"; + + [Description("ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + public bool Enable { get; set; } = true; + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TEA_TASK.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TEA_TASK.cs new file mode 100644 index 0000000..16b40e1 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TEA_TASK.cs @@ -0,0 +1,75 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// + /// </summary> + [Description("")] + public class TEA_TASK : IUpdatableTable, IDomainSite + { + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string TableName { get; set; } + + [Description("")] + [StringLength(50)] + public string Creator { get; set; } + + [Description("")] + public int DataCount { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + [Description("Ƿ")] + public bool IsMasterSlave { get; set; } + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [NotMapped] + public bool IsChecked { get; set; } + + public TEA_TASK_SUB ToTaskSub(string subscribeSubscriber) + { + return new TEA_TASK_SUB + { + TaskID = TaskID, + Creator = Creator, + }; + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TEA_TASK_SUB.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TEA_TASK_SUB.cs new file mode 100644 index 0000000..9e429e1 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TEA_TASK_SUB.cs @@ -0,0 +1,93 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; +using System.Collections.Generic; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// ı + /// </summary> + [Description("ı")] + public class TEA_TASK_SUB : IUpdatableTable + { + [Description("״̬")] + public EnumTaskState TaskState { get; set; } + + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string TableName { get; set; } + + [Description("")] + [StringLength(50)] + public string Creator { get; set; } + + [Description("")] + public int DataCount { get; set; } + + + [Description("")] + [StringLength(50)] + public string Subscriber { get; set; } + + [Description("ʧ")] + public int FailedCount { get; set; } + + [Description("ʧϢ")] + [StringLength(50)] + public string FailedInfo { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [NotMapped] + public bool IsChecked { get; set; } + + + + [NotMapped] + public List<EnumTaskState> TaskList{ get; set; } + [NotMapped] + public DateTime? BeginTime { get; set; } + [NotMapped] + public DateTime? EndTime { get; set; } + + [NotMapped] + public string TaskIDStr { set; get; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TEA_TASK_SUB_HIS.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TEA_TASK_SUB_HIS.cs new file mode 100644 index 0000000..76163c2 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TEA_TASK_SUB_HIS.cs @@ -0,0 +1,69 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// ʷ + /// </summary> + [Description("ʷ")] + public class TEA_TASK_SUB_HIS : IUpdatableTable + { + [Description("״̬")] + public EnumTaskState TaskState { get; set; } + + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string Creator { get; set; } + + [Description("")] + [StringLength(50)] + public string Subscriber { get; set; } + + [Description("Ϣ")] + [StringLength(50)] + public string ErrorInfo { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [NotMapped] + public bool IsChecked { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TEA_TASK_SUB_READ_LOG.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TEA_TASK_SUB_READ_LOG.cs new file mode 100644 index 0000000..3bd8611 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TEA_TASK_SUB_READ_LOG.cs @@ -0,0 +1,87 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// 读取日志表 + /// </summary> + [Description("任务订阅读取日志表")] + public class TEA_TASK_SUB_READ_LOG : ITable, IDomainSite + { + [NotMapped] + [Description("读取编号")] + public Guid ReadId => GUID; + + [Description("任务编号")] + public Guid TaskID { get; set; } + + [Description("表格名称")] + [StringLength(50)] + public string TableName { get; set; } + + [Description("创建者")] + [StringLength(50)] + public string Creator { get; set; } + + [Description("数据行数")] + public int DataCount { get; set; } + + + [Description("订阅者")] + [StringLength(50)] + public string Subscriber { get; set; } + + [Description("失败行数")] + public int FailedCount { get; set; } + + [Description("客户端IP")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string ClientIP { get; set; } + + [Description("失败信息")] + [StringLength(50)] + public string FailedInfo { get; set; } + + [Description("会话编号")] + [Required(AllowEmptyStrings = true)] + [StringLength(200)] + public string SessionId { get; set; } + + [Description("读取时间")] + public DateTime ReadTime { get; set; } = DateTime.Now; + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("创建人")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("创建时间")] + public DateTime CreateTime { get; set; } + + [Description("备注")] + public string Remark { get; set; } + + [Description("修改人")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("修改时间")] + public DateTime? UpdateTime { get; set; } + + [NotMapped] + public bool IsChecked { get; set; } + + public string Domain { get; set; } + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_ASN_DET.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_ASN_DET.cs new file mode 100644 index 0000000..9b7ce2c --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_ASN_DET.cs @@ -0,0 +1,125 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Data.SqlTypes; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// ϸ + /// </summary> + [Description("ϸ")] + public class TED_ASN_DET : TED_BASE,ITaskTable + { + [Description("")] + [StringLength(50)] + public string ASN { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("ɹ")] + public int Line { get; set; } + + [Description("")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("")] + [StringLength(50)] + public string Lot { get; set; } + + [Description("")] + public decimal Qty { get; set; } + + [Description("")] + public decimal PackQty { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("ο")] + [StringLength(50)] + public string Reference { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string SupplierLot { get; set; } + + [Description("")] + [StringLength(50)] + public string WareClass { get; set; } + + [Description("߱")] + [StringLength(50)] + public string WareId { get; set; } + + [Description("ɹ۸")] + public decimal Price { get; set; } + + [Description("ɹλ")] + [StringLength(50)] + public string PoUm { get; set; } + + [Description("洢λ")] + [StringLength(50)] + public string LocUm { get; set; } + + [Description("λת")] + public decimal Conv { get; set; } + + [Description("")] + [StringLength(50)] + public string PartType { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string VendBatch { get; set; } + + [Description("")] + public DateTime ProduceDate { get; set; } + + [Description("ֹ")] + public DateTime DueDate { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_ASN_MSTR.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_ASN_MSTR.cs new file mode 100644 index 0000000..a2e5128 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_ASN_MSTR.cs @@ -0,0 +1,72 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// + /// </summary> + [Description("")] + public class TED_ASN_MSTR : TED_BASE,ITaskTable + { + [Description("")] + [StringLength(50)] + public string ASN { get; set; } + + [Description("嵥")] + [StringLength(50)] + public string KanbanBillNum { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("")] + public DateTime ShippingDate { get; set; } + + [Description("ŵ")] + public DateTime PromiseDate { get; set; } + + [Description("Ӧ̱")] + [StringLength(50)] + public string Supplier { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_ASSEMBLE.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_ASSEMBLE.cs new file mode 100644 index 0000000..8679a0d --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_ASSEMBLE.cs @@ -0,0 +1,50 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// MESװϢ + /// </summary> + [Description("MESװϢ")] + public class TED_ASSEMBLE : TED_BASE,ITaskTable + { + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_BASE.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_BASE.cs new file mode 100644 index 0000000..2969a1d --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_BASE.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + public class TED_BASE + { + } +} diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_BK_DET.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_BK_DET.cs new file mode 100644 index 0000000..ad63ff7 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_BK_DET.cs @@ -0,0 +1,86 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// سϸ + /// </summary> + [Description("سϸ")] + public class TED_BK_DET : TED_BASE,ITaskTable + { + [Description("")] + [StringLength(50)] + public string BackFlushBillNum { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("")] + public int Operation { get; set; } + + [Description("")] + [StringLength(50)] + public string Line { get; set; } + + [Description("")] + [StringLength(50)] + public string Lot { get; set; } + + [Description("")] + public decimal Quantity { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + public string BKType { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_BK_MSTR.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_BK_MSTR.cs new file mode 100644 index 0000000..1ce0eb9 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_BK_MSTR.cs @@ -0,0 +1,65 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// س + /// </summary> + [Description("س")] + public class TED_BK_MSTR : TED_BASE,ITaskTable + { + [Description("Ա")] + [StringLength(50)] + public string User { get; set; } + + [Description("")] + [StringLength(50)] + public string BackFlushBillNum { get; set; } + + [Description("")] + public DateTime BkDate { get; set; } + + [Description("ʱ")] + public DateTime BkTime { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_CHECK_DET.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_CHECK_DET.cs new file mode 100644 index 0000000..47ef391 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_CHECK_DET.cs @@ -0,0 +1,71 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("̵ϸ")] + public class TED_CHECK_DET : TED_BASE,ITaskTable + { + [Description("")] + [StringLength(50)] + public string CheckBillNum { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("̵")] + public decimal Quantity { get; set; } + + [Description("")] + [StringLength(50)] + public string Lot { get; set; } + + [Description("ο")] + [StringLength(50)] + public string Reference { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_CHECK_MSTR.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_CHECK_MSTR.cs new file mode 100644 index 0000000..2895515 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_CHECK_MSTR.cs @@ -0,0 +1,62 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("̵")] + public class TED_CHECK_MSTR : TED_BASE,ITaskTable + { + [Description("Ա")] + [StringLength(50)] + public string User { get; set; } + + [Description("")] + [StringLength(50)] + public string CheckBillNum { get; set; } + + [Description("")] + public DateTime CkDate { get; set; } + + [Description("ʱ")] + public DateTime CkTime { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_FIXED_DET.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_FIXED_DET.cs new file mode 100644 index 0000000..85c51d3 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_FIXED_DET.cs @@ -0,0 +1,101 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// OA̶ʲϸ + /// </summary> + [Description("̶ʲϸ")] + public class TED_FIXED_DET : TED_BASE,ITaskTable + { + [Description("̶ʲ")] + [StringLength(50)] + public string FixedBillNum { get; set; } + + + [Description("ʲ")] + [StringLength(50)] + public string Asset { get; set; } + + [Description("ȼ")] + [StringLength(50)] + public string Class { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("Ƶλ")] + [StringLength(50)] + public string Entity { get; set; } + + [Description("ɱ")] + public decimal Cost { get; set; } + + [Description("ֵ")] + public decimal Salvage { get; set; } + + [Description("ֵ")] + public decimal Replacement { get; set; } + + [Description("")] + public DateTime PostDate { get; set; } + + [Description("ʹ")] + public DateTime ServiceDate { get; set; } + + [Description("Ȩ")] + [StringLength(50)] + public string AuthorizationNbr { get; set; } + + [Description("Ŀ")] + [StringLength(50)] + public string BOOK { get; set; } + + [Description("")] + [StringLength(50)] + public string Method { get; set; } + + [Description("")] + public int Life { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_FIXED_MSTR.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_FIXED_MSTR.cs new file mode 100644 index 0000000..6a1ad57 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_FIXED_MSTR.cs @@ -0,0 +1,68 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// OA̶ʲ + /// </summary> + [Description("̶ʲ")] + public class TED_FIXED_MSTR : TED_BASE,ITaskTable + { + [Description("̶ʲ")] + [StringLength(50)] + public string FixedBillNum { get; set; } + + + [Description("ʲ")] + [StringLength(50)] + public string Asset { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_INJECTION.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_INJECTION.cs new file mode 100644 index 0000000..1d5a6b1 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_INJECTION.cs @@ -0,0 +1,50 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// MESעϢ + /// </summary> + [Description("MESעϢ")] + public class TED_INJECTION : TED_BASE,ITaskTable + { + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_INVOICE_ADD.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_INVOICE_ADD.cs new file mode 100644 index 0000000..fe46191 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_INVOICE_ADD.cs @@ -0,0 +1,135 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("Ʊӱ")] + public class TED_INVOICE_ADD : TED_BASE,ITaskTable + { + [Description("˻")] + [StringLength(50)] + public string GLCode { get; set; } + + [Description("˻")] + [StringLength(50)] + public string DivisionCode { get; set; } + + [Description("ɱĴ")] + [StringLength(50)] + public string CostCentreCode { get; set; } + + [Description("Ŀ")] + [StringLength(50)] + public string ProjectCode { get; set; } + + [Description("SAF")] + [StringLength(50)] + public string SafStructureCode { get; set; } + + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + + [Description("")] + [StringLength(50)] + public string Rowid { get; set; } + + [Description("")] + [StringLength(50)] + public string ParentRowid { get; set; } + + [Description("˰")] + [StringLength(50)] + public string TaxEnvironment { get; set; } + + [Description("˰;")] + [StringLength(50)] + public string TaxUsage { get; set; } + + [Description("˰ȼ")] + [StringLength(50)] + public string TaxClass { get; set; } + + [Description("ڣtoday")] + public DateTime TaxPointDate { get; set; } + + [Description("˰")] + [StringLength(50)] + public string TaxTransactionType { get; set; } + + [Description("")] + [StringLength(50)] + public string TransactionType { get; set; } + + [Description("״̬")] + [StringLength(50)] + public string Status { get; set; } + + [Description("˰")] + [StringLength(50)] + public string PostingVatInOut { get; set; } + + [Description("˰")] + [StringLength(50)] + public string FromTaxZone { get; set; } + + [Description("˰")] + [StringLength(50)] + public string ToTaxZone { get; set; } + + [Description("˰")] + [StringLength(50)] + public string TaxType { get; set; } + + [Description("˰")] + [StringLength(50)] + public string PostingVatCode { get; set; } + + [Description("׻ҽ")] + public decimal VatDebitTC { get; set; } + + [Description("λҽ")] + public decimal VatDebitLC { get; set; } + + [Description("ҽ")] + public decimal VatDebitCC { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_INVOICE_DET.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_INVOICE_DET.cs new file mode 100644 index 0000000..cdefa5b --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_INVOICE_DET.cs @@ -0,0 +1,100 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// Ʊϸ + /// </summary> + [Description("Ʊϸ")] + public class TED_INVOICE_DET : TED_BASE,ITaskTable + { + [Description("״̬")] + [StringLength(50)] + public string Status { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("к")] + public int Line { get; set; } + + [Description("ջ")] + [StringLength(50)] + public string ReceiveNbr { get; set; } + + [Description("ƥ")] + public decimal MatchQuantity { get; set; } + + [Description("ƥ۸")] + public decimal MatchPrice { get; set; } + + [Description("")] + public bool IsPvodFinished { get; set; } + + [Description("")] + public DateTime UsageDate { get; set; } + + [Description("¼˰")] + public bool IsRecalculateTaxes { get; set; } + + [Description("")] + [StringLength(50)] + public string Rowid { get; set; } + + [Description("")] + [StringLength(50)] + public string ParentRowid { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + [Description("˰")] + [StringLength(50)] + public string Tax { get; set; } + + [Description("")] + [StringLength(24)] + public string PartCode { get; set; } + + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_INVOICE_MSTR.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_INVOICE_MSTR.cs new file mode 100644 index 0000000..d64c269 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_INVOICE_MSTR.cs @@ -0,0 +1,275 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// Ʊ + /// </summary> + [Description("Ʊ")] + public class TED_INVOICE_MSTR : TED_BASE,ITaskTable + { + + + + + + + + + [Description("״̬")] + [StringLength(50)] + public string Status { get; set; } + + [Description("")] + public int Invoice_ID { get; set; } + + [Description("Ʊ")] + [StringLength(50)] + public string InvoiceReference { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("ջ")] + [StringLength(50)] + public string ReceiveNbr { get; set; } + + [Description("Ʊ")] + public bool CreateInvoice { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string SupplierName { get; set; } + + [Description("ַ1")] + [StringLength(50)] + public string AddressStreet1 { get; set; } + + [Description("ַ2")] + [StringLength(50)] + public string AddressStreet2 { get; set; } + + [Description("ַ3")] + [StringLength(50)] + public string AddressStreet3 { get; set; } + + [Description("")] + [StringLength(50)] + public string City { get; set; } + + [Description("ʡ")] + [StringLength(50)] + public string StateCode { get; set; } + + [Description("ʱ")] + [StringLength(50)] + public string ZIP { get; set; } + + [Description("ʽ")] + [StringLength(50)] + public string Format { get; set; } + + [Description("")] + [StringLength(50)] + public string Country { get; set; } + + [Description("")] + [StringLength(50)] + public string County { get; set; } + + [Description("")] + public DateTime PostingDate { get; set; } + + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + + [Description("к")] + [StringLength(50)] + public string OwnBank { get; set; } + + [Description("Ʊ")] + public DateTime InvoiceDate { get; set; } + + [Description("֧")] + [StringLength(50)] + public string PaymentCondCode { get; set; } + + [Description("")] + public DateTime InvoiceDueDate { get; set; } + + [Description("Ʊ˻")] + [StringLength(50)] + public string InvoiceControlGLCode { get; set; } + + [Description("Ʊɱ")] + [StringLength(50)] + public string InvoiceCostCentreCode { get; set; } + + [Description("Ʊۿ˻")] + [StringLength(50)] + public string InvoiceDiscountGLCode { get; set; } + + [Description("Ʊۿ۳ɱ")] + [StringLength(50)] + public string InvoiceDiscountCostCentre { get; set; } + + [Description("")] + [StringLength(50)] + public string CompanyCode { get; set; } + + [Description("")] + [StringLength(50)] + public string InvoiceRemark { get; set; } + + [Description("Ʊ")] + [StringLength(50)] + public string InvoiceBankNbr { get; set; } + + [Description("ʽ")] + [StringLength(50)] + public string InvoiceCheckForm { get; set; } + + [Description("Ƿ")] + public bool InvoiceIsHoldAmount { get; set; } + + [Description("TC")] + public decimal InvoiceHoldAmountTC { get; set; } + + [Description("")] + public bool InvoiceIsStatusFinal { get; set; } + + [Description("Ʊ˻")] + [StringLength(50)] + public string InvoiceDivisionCode { get; set; } + + [Description("Ʊۿ۷˻")] + [StringLength(50)] + public string InvoiceDiscountDivision { get; set; } + + [Description("")] + [StringLength(50)] + public string Rowid { get; set; } + + [Description("")] + [StringLength(50)] + public string ParentRowid { get; set; } + + [Description("")] + public int InvoicePostingYear { get; set; } + + [Description("ռ˴")] + [StringLength(50)] + public string JournalCode { get; set; } + + [Description("ƾ֤")] + public int InvoiceVoucher { get; set; } + + [Description("")] + public bool APMatchingIsStatusFinal { get; set; } + + [Description("")] + public int InvoiceRegistrationNbr { get; set; } + + [Description("")] + [StringLength(50)] + public string InvoiceTSMNumber { get; set; } + + [Description("")] + public bool CreateWithAmountIsTax { get; set; } + + [Description("TCƱ")] + public decimal InvoiceAmountTC { get; set; } + + [Description("Ӧ˰")] + public bool InvoiceIsTaxable { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + + /// <summary> + /// Ʊ + /// </summary> + public string CInvoiceReference { get; set; } + + + /// <summary> + /// Ʊ + /// </summary> + public string CInvoiceDescription { get; set; } + + /// <summary> + /// Ʊ + /// </summary> + public string CInvoiceType { get; set; } + /// <summary> + /// ɱ + /// </summary> + public string CInvoiceCostCenterCode { get; set; } + /// <summary> + /// ˻ + /// </summary> + public string CInvoiceDivisionCode { get; set; } + + + + + + + + + + + + + + + + + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_ISSUNP_DET.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_ISSUNP_DET.cs new file mode 100644 index 0000000..c308fab --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_ISSUNP_DET.cs @@ -0,0 +1,113 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// ƻϸ + /// </summary> + [Description("ƻϸ")] + public class TED_ISSUNP_DET : TED_BASE,ITaskTable + { + [Description("")] + [StringLength(50)] + public string UnplanedBillNum { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("")] + public decimal Quantity { get; set; } + + [Description("ת")] + public decimal Conversion { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("")] + [StringLength(50)] + public string Lot { get; set; } + + [Description("ο")] + [StringLength(50)] + public string Reference { get; set; } + + [Description("к")] + [StringLength(50)] + public string Line { get; set; } + + [Description("ͻ")] + [StringLength(50)] + public string CustomerNbr { get; set; } + + [Description("ַ")] + [StringLength(50)] + public string Address { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + + [Description("Ŀ")] + [StringLength(50)] + public string CreditAccount { get; set; } + + [Description("˻")] + [StringLength(50)] + public string SubAccount { get; set; } + + [Description("ɱ")] + [StringLength(50)] + public string CcAccount { get; set; } + + [Description("Ŀ")] + [StringLength(50)] + public string Project { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_ISSUNP_MSTR.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_ISSUNP_MSTR.cs new file mode 100644 index 0000000..c7877c2 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_ISSUNP_MSTR.cs @@ -0,0 +1,65 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// ƻ + /// </summary> + [Description("ƻ")] + public class TED_ISSUNP_MSTR : TED_BASE,ITaskTable + { + [Description("Ա")] + [StringLength(50)] + public string User { get; set; } + + [Description("")] + [StringLength(50)] + public string UnplanedBillNum { get; set; } + + [Description("")] + public DateTime Date { get; set; } + + [Description("ʱ")] + public DateTime Time { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_KANBAN_DET.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_KANBAN_DET.cs new file mode 100644 index 0000000..fc03104 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_KANBAN_DET.cs @@ -0,0 +1,50 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// Ҫϸ + /// </summary> + [Description("ϸ")] + public class TED_KANBAN_DET : TED_BASE,ITaskTable + { + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_KANBAN_MSTR.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_KANBAN_MSTR.cs new file mode 100644 index 0000000..84e1c1b --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_KANBAN_MSTR.cs @@ -0,0 +1,50 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// Ҫ + /// </summary> + [Description("")] + public class TED_KANBAN_MSTR : TED_BASE,ITaskTable + { + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_LED.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_LED.cs new file mode 100644 index 0000000..8d62f69 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_LED.cs @@ -0,0 +1,50 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// MESϢ + /// </summary> + [Description("MESϢ")] + public class TED_LED : TED_BASE,ITaskTable + { + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_MRP_DET.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_MRP_DET.cs new file mode 100644 index 0000000..ecffb56 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_MRP_DET.cs @@ -0,0 +1,76 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("MRPϸ")] + public class TED_MRP_DET : TED_BASE,ITaskTable + { + [Description("汾ID")] + [StringLength(50)] + public string ReleaseId { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("к")] + public int Line { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + + [Description("")] + [StringLength(50)] + public string ShipTo { get; set; } + + [Description("")] + public DateTime DemandDate { get; set; } + + [Description("")] + public decimal DemandQuantity { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_MRP_MSTR.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_MRP_MSTR.cs new file mode 100644 index 0000000..97307c3 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_MRP_MSTR.cs @@ -0,0 +1,65 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("MRP")] + public class TED_MRP_MSTR : TED_BASE,ITaskTable + { + [Description("Ա")] + [StringLength(50)] + public string User { get; set; } + + [Description("汾ID")] + [StringLength(50)] + public string ReleaseId { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("")] + public DateTime Date { get; set; } + + [Description("ʱ")] + public DateTime Time { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_PO_DET.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_PO_DET.cs new file mode 100644 index 0000000..b228e6a --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_PO_DET.cs @@ -0,0 +1,132 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// ɹϸ + /// </summary> + [Description("ɹϸ")] + public class TED_PO_DET : TED_BASE,ITaskTable + { + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("ɹ")] + public int Line { get; set; } + + [Description("")] + [StringLength(50)] + public string PoType { get; set; } + [Description("")] + public DateTime DueDate { get; set; } + + [Description("")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("")] + public decimal Qty { get; set; } + + [Description("δ")] + public decimal QtyOpen { get; set; } + + [Description("")] + public decimal PackQty { get; set; } + + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + + [Description("۸")] + public decimal Price { get; set; } + + [Description("ɹλ")] + [StringLength(50)] + public string PoUm { get; set; } + + [Description("洢λ")] + [StringLength(50)] + public string LocUm { get; set; } + + [Description("λת")] + public decimal Conv { get; set; } + + [Description("ϸ״̬")] + public int Status { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + [Description("ʼʱ")] + public DateTime StartDate { get; set; } + [Description("ʱ")] + public DateTime EndDate { get; set; } + [Description("ӹ")] + [StringLength(50)] + public string Workorderlot { get; set; } + [Description("")] + public int Operation { get; set; } + [Description("λ")] + [StringLength(8)] + public string Location { get; set; } + [Description("̶")] + public int Firmdays { get; set; } + [Description("ճ")] + public int Scheduledays { get; set; } + [Description("ճ")] + public int Scheduleweeks { get; set; } + [Description("ճ")] + public int Schedulemonth { get; set; } + [Description("Ӧ")] + [StringLength(50)] + public string Supplieritem { get; set; } + [Description("ʽ")] + [StringLength(2)] + public string Dliverypatterncode { get; set; } + [Description("ʱʽ")] + [StringLength(2)] + public string Deliverytimecode { get; set; } + [Description("")] + public int Transportdays { get; set; } + [Description("۸")] + [StringLength(50)] + public string Pricelist { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_PO_MSTR.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_PO_MSTR.cs new file mode 100644 index 0000000..51cdc89 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_PO_MSTR.cs @@ -0,0 +1,107 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// ɹ + /// </summary> + [Description("ɹ")] + public class TED_PO_MSTR : TED_BASE,ITaskTable + { + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("ģʽ")] + [StringLength(50)] + public string ModeType { get; set; } + + [Description("Ӧ̱")] + [StringLength(50)] + public string Supplier { get; set; } + + [Description("ϵ")] + [StringLength(50)] + public string Contact { get; set; } + + [Description("")] + [StringLength(50)] + public string ShipTo { get; set; } + + [Description("")] + public DateTime OrderDate { get; set; } + + [Description("ֹ")] + public DateTime DueDate { get; set; } + public DateTime StartDate { get; set; } + + public DateTime EndDate { get; set; } + + [Description("ڹ")] + [StringLength(50)] + public string MadeIn { get; set; } + + [Description("Ҫȷ")] + public bool Confirm { get; set; } + + [Description("ɹԱ")] + [StringLength(50)] + public string Buyer { get; set; } + + [Description("ɹԱ绰")] + [StringLength(50)] + public string BuyerPhone { get; set; } + + [Description("ɹ״̬")] + public int Status { get; set; } + + [Description("ճ")] + public bool ScheduledOrder { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + [Description("۸")] + [StringLength(50)] + public string Pricelist { get; set; } + [Description("˰")] + [StringLength(50)] + public string Taxclass { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_PPOD_DET.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_PPOD_DET.cs new file mode 100644 index 0000000..428144e --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_PPOD_DET.cs @@ -0,0 +1,136 @@ +using CK.SCP.Models.Base; +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// QAD采购计划 + /// </summary> + [Description("QAD采购计划")] + public class TED_PPOD_DET : ITaskTable + { + + + [StringLength(50)] + [Description("计划单号")] + public string Ppod_Nbr { get; set; } + + [Description("计划单据行")] + public int Ppod_Line { get; set; } + + [StringLength(50)] + [Description("计划单-Rev")] + public string Ppod_Rev { get; set; } + + [StringLength(50)] + [Description("零件号")] + public string Ppod_Part { get; set; } + + [StringLength(50)] + [Description("描述")] + public string Ppod_Desc { get; set; } + + [StringLength(50)] + [Description("计划类型")] + public string Ppod_Type { get; set; } + + [StringLength(50)] + [Description("批号")] + public string Pod_Wolot { get; set; } + + [Description("价格1")] + public decimal Ppod_pricum { get; set; } + + [Description("价格2")] + public decimal Ppod_reccum { get; set; } + + [Description("订单-Ord")] + public decimal Ppod_qty_ord { get; set; } + + [Description("订单-Std")] + public decimal Ppod_Qty_Std { get; set; } + + [Description("计划日期")] + public DateTime Ppod_Due_Date { get; set; } + + [Description("库存单位")] + [StringLength(50)] + public string Ppod_Loc_Um { get; set; } + + [Description("采购单位")] + [StringLength(50)] + public string Ppod_Um { get; set; } + + [Description("转换率")] + public decimal Ppod_Um_Conv { get; set; } + + [Description("供应商")] + [StringLength(50)] + public string Ppod_Vend { get; set; } + + [Description("采购人")] + [StringLength(50)] + public string Ppod_Buyer { get; set; } + + [Description("采购人电话")] + [StringLength(50)] + public string Ppod_Buyer_Phone { get; set; } + + [Description("项目")] + [StringLength(50)] + public string Ppod_Prj { get; set; } + + [Description("计划")] + [StringLength(50)] + public string Ppod_Plan { get; set; } + + + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + + + [Description("创建人")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("创建时间")] + public DateTime CreateTime { get; set; } + + [Description("备注")] + public string Remark { get; set; } + + [Index("IndexExPpodDet", Order = 0, IsUnique = false, IsClustered = false)] + [Description("任务编号")] + public Guid TaskID { get; set; } + + [Description("命令类型")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("域")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("地点")] + [StringLength(50)] + public string Site { get; set; } + + //[Description("最后一笔收货单号")] + //[StringLength(50)] + //public string LastRece { get; set; } + //[Description("欠交数量")] + //public decimal OutstandQty { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_RCTUNP_DET.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_RCTUNP_DET.cs new file mode 100644 index 0000000..afe9072 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_RCTUNP_DET.cs @@ -0,0 +1,113 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// ƻϸ + /// </summary> + [Description("ƻϸ")] + public class TED_RCTUNP_DET : TED_BASE,ITaskTable + { + [Description("")] + [StringLength(50)] + public string ReceiveBillNum { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("")] + public decimal Quantity { get; set; } + + [Description("ת")] + public decimal Conversion { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("")] + [StringLength(50)] + public string Lot { get; set; } + + [Description("ο")] + [StringLength(50)] + public string Reference { get; set; } + + [Description("к")] + [StringLength(50)] + public string Line { get; set; } + + [Description("ͻ")] + [StringLength(50)] + public string CustomerNbr { get; set; } + + [Description("ַ")] + [StringLength(50)] + public string Address { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + + [Description("Ŀ")] + [StringLength(50)] + public string CreditAccount { get; set; } + + [Description("˻")] + [StringLength(50)] + public string SubAccount { get; set; } + + [Description("ɱ")] + [StringLength(50)] + public string CcAccount { get; set; } + + [Description("Ŀ")] + [StringLength(50)] + public string Project { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_RCTUNP_MSTR.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_RCTUNP_MSTR.cs new file mode 100644 index 0000000..ba0197f --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_RCTUNP_MSTR.cs @@ -0,0 +1,65 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// ƻ + /// </summary> + [Description("ƻ")] + public class TED_RCTUNP_MSTR : TED_BASE,ITaskTable + { + [Description("Ա")] + [StringLength(50)] + public string User { get; set; } + + [Description("")] + [StringLength(50)] + public string ReceiveBillNum { get; set; } + + [Description("")] + public DateTime Date { get; set; } + + [Description("ʱ")] + public DateTime Time { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_RECEIPT_DET.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_RECEIPT_DET.cs new file mode 100644 index 0000000..0d1431a --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_RECEIPT_DET.cs @@ -0,0 +1,178 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// ɹջϸ + /// </summary> + [Description("ɹջϸ")] + public class TED_RECEIPT_DET : TED_BASE,ITaskTable + { + [Description("˵")] + [StringLength(50)] + public string ASN { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("ջ")] + [StringLength(50)] + public string ReceiveNbr { get; set; } + + + [Description("к")] + public int Line { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("ջ")] + public decimal ReceiveQuantity { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("λ")] + [StringLength(50)] + public string logisticsUm { get; set; } + + [Description("")] + [StringLength(50)] + public string Lot { get; set; } + + [Description("ο")] + [StringLength(50)] + public string Reference { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string SupplierLot { get; set; } + + + //2019-07-05 LIUYU + [Description("Currency")] + [StringLength(3)] + public string Currency { get; set; } + + [Description("Currencyamount")] + public decimal? Currencyamount { get; set; } + + [Description("Exchangerate")] + public decimal? Exchangerate { get; set; } + + [Description("Exchangerate2")] + public decimal? Exchangerate2 { get; set; } + + [Description("Exchangeratetype")] + [StringLength(50)] + public string Exchangeratetype { get; set; } + + + [Description("WorkOrderID")] + [StringLength(8)] + public string WorkOrderID { get; set; } + + [Description("posite")] + [StringLength(8)] + public string Posite { get; set; } + + [Description("posite")] + public decimal? Purchasecost { get; set; } + + [Description("purchasestandardcost")] + public decimal? Purchasestandardcost { get; set; } + + [Description("receipttype")] + [StringLength(1)] + public string receipttype { get; set; } + + [Description("returnreason")] + [StringLength(8)] + public string Returnreason { get; set; } + + [Description("requestby")] + [StringLength(8)] + public string Requestby { get; set; } + + [Description("shipto")] + [StringLength(8)] + public string Shipto { get; set; } + + [Description("taxat")] + [StringLength(3)] + public string taxat { get; set; } + + [Description("taxenvironment")] + [StringLength(8)] + public string Taxenvironment { get; set; } + + [Description("taxin")] + [StringLength(8)] + public string taxin { get; set; } + + [Description("taxusage")] + [StringLength(8)] + public string Taxusage { get; set; } + + [Description("taxclass")] + [StringLength(8)] + public string Taxclass { get; set; } + + [Description("purchasetype")] + [StringLength(8)] + public string Purchasetype { get; set; } + + [Description("umconversion")] + public decimal? Umconversion { get; set; } + + + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Index("IndexExReceipt", Order = 0, IsUnique = false, IsClustered = false)] + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_RECEIPT_MSTR.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_RECEIPT_MSTR.cs new file mode 100644 index 0000000..22d840d --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_RECEIPT_MSTR.cs @@ -0,0 +1,77 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// ɹջ + /// </summary> + [Description("ɹջ")] + public class TED_RECEIPT_MSTR : TED_BASE,ITaskTable + { + [Description("Ա")] + [StringLength(50)] + public string User { get; set; } + + [Description("˵")] + [StringLength(50)] + public string ASN { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + + [Description("ջ")] + [StringLength(50)] + public string ReceiveNbr { get; set; } + + [Description("ջ")] + public DateTime ReceiptDate { get; set; } + + [Description("ʱ")] + public DateTime Time { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_RETURN_DET.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_RETURN_DET.cs new file mode 100644 index 0000000..28ada2c --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_RETURN_DET.cs @@ -0,0 +1,126 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// ɹ˻ϸ + /// </summary> + [Description("ɹ˻ϸ")] + public class TED_RETURN_DET : TED_BASE,ITaskTable + { + + + + + + + + + + + + + + + + + + + + + + + + + + + [NotMapped] + + [Description("˻")] + [StringLength(50)] + public string ReturnNbr { get; set; } + + + [Description("˵")] + [StringLength(50)] + public string ASN { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("к")] + public int Line { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("˻")] + public decimal ReturnQuantity { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("λ")] + [StringLength(50)] + public string logisticsUm { get; set; } + + [Description("")] + [StringLength(50)] + public string Lot { get; set; } + + [Description("ο")] + [StringLength(50)] + public string Reference { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string SupplierLot { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_RETURN_MSTR.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_RETURN_MSTR.cs new file mode 100644 index 0000000..27eb037 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_RETURN_MSTR.cs @@ -0,0 +1,77 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// ɹ˻ + /// </summary> + [Description("ɹ˻")] + public class TED_RETURN_MSTR : TED_BASE,ITaskTable + { + [Description("Ա")] + [StringLength(50)] + public string User { get; set; } + + [Description("˵")] + [StringLength(50)] + public string ASN { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + + [Description("˻")] + [StringLength(50)] + public string ReturnNbr { get; set; } + + [Description("˻")] + public DateTime ReturnDate { get; set; } + + [Description("ʱ")] + public DateTime Time { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_SO_DET.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_SO_DET.cs new file mode 100644 index 0000000..c1b2df6 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_SO_DET.cs @@ -0,0 +1,94 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// ۶ϸ + /// </summary> + [Description("۶ϸ")] + public class TED_SO_DET : TED_BASE,ITaskTable + { + [Description("۶")] + [StringLength(50)] + public string SalesOrder { get; set; } + + [Description("к")] + public int Line { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("Ѷ")] + public decimal QuantityOrdered { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("ѷ")] + public decimal QuantityAllocated { get; set; } + + [Description("ѷ")] + public decimal QuantityShipped { get; set; } + + [Description("ҪƱ")] + public decimal QuantityToInvoice { get; set; } + + [Description("")] + [StringLength(50)] + public string ShipType { get; set; } + + [Description("۸")] + [StringLength(50)] + public string Price { get; set; } + + [Description("Ŀ")] + [StringLength(50)] + public string PriceList { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_SO_MSTR.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_SO_MSTR.cs new file mode 100644 index 0000000..5c14acf --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_SO_MSTR.cs @@ -0,0 +1,80 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// ۶ + /// </summary> + [Description("۶")] + public class TED_SO_MSTR : TED_BASE,ITaskTable + { + [Description("۶")] + [StringLength(50)] + public string SalesOrder { get; set; } + + [Description("")] + [StringLength(50)] + public string SoldTo { get; set; } + + [Description("")] + [StringLength(50)] + public string ShipTo { get; set; } + + [Description("")] + public DateTime OrderDate { get; set; } + + [Description("ֹ")] + public DateTime DueDate { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + + [Description("ճ")] + public bool ScheduledOrder { get; set; } + + [Description("ͻ")] + [StringLength(50)] + public string CustomerName { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_SPRAYING.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_SPRAYING.cs new file mode 100644 index 0000000..d6407e6 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_SPRAYING.cs @@ -0,0 +1,50 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// MESͿϢ + /// </summary> + [Description("MESͿϢ")] + public class TED_SPRAYING : TED_BASE,ITaskTable + { + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_SPRAYING_REPAIR.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_SPRAYING_REPAIR.cs new file mode 100644 index 0000000..1c7943f --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_SPRAYING_REPAIR.cs @@ -0,0 +1,50 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// MES޲Ϣ + /// </summary> + [Description("MES޲Ϣ")] + public class TED_SPRAYING_REPAIR : TED_BASE,ITaskTable + { + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_STOCK.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_STOCK.cs new file mode 100644 index 0000000..46143f6 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_STOCK.cs @@ -0,0 +1,83 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// + /// </summary> + [Description("")] + public class TED_STOCK : TED_BASE,ITaskTable + { + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("")] + [StringLength(50)] + public string Lot { get; set; } + + [Description("ο")] + [StringLength(50)] + public string Reference { get; set; } + + [Description("")] + public decimal Quantity { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("")] + public DateTime Date { get; set; } + + [Description("ʱ")] + public DateTime Time { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_TRANSFER_DET.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_TRANSFER_DET.cs new file mode 100644 index 0000000..b790c64 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_TRANSFER_DET.cs @@ -0,0 +1,91 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// ƿϸ + /// </summary> + [Description("ƿϸ")] + public class TED_TRANSFER_DET : TED_BASE,ITaskTable + { + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("")] + [StringLength(50)] + public string TransferBillNum { get; set; } + + [Description("ʼص")] + [StringLength(50)] + public string FormSite { get; set; } + + [Description("ʼλ")] + [StringLength(50)] + public string FormLocation { get; set; } + + [Description("ʼ")] + [StringLength(50)] + public string FormLotNbr { get; set; } + + [Description("ʼο")] + [StringLength(50)] + public string FormReference { get; set; } + + [Description("ص")] + [StringLength(50)] + public string ToSite { get; set; } + + [Description("λ")] + [StringLength(50)] + public string ToLocation { get; set; } + + [Description("")] + [StringLength(50)] + public string ToLotNbr { get; set; } + + [Description("ο")] + [StringLength(50)] + public string ToReference { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TED_TRANSFER_MSTR.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TED_TRANSFER_MSTR.cs new file mode 100644 index 0000000..7370211 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TED_TRANSFER_MSTR.cs @@ -0,0 +1,79 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + /// <summary> + /// ƿ + /// </summary> + [Description("ƿ")] + public class TED_TRANSFER_MSTR : TED_BASE,ITaskTable + { + [Description("Ա")] + [StringLength(50)] + public string User { get; set; } + +// [Description("Ϻ")] +// [StringLength(50)] +// public string PartCode { get; set; } +// +// [Description("")] +// public decimal Quantity { get; set; } + + [Description("")] + [StringLength(50)] + public string TransferBillNum { get; set; } + + [Description("ͻ")] + [StringLength(50)] + public string CustomerNbr { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + + [Description("Ч")] + public DateTime ActiveDate { get; set; } + + [Description("ʱ")] + public DateTime Time { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_ACCOUNT.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_ACCOUNT.cs new file mode 100644 index 0000000..f02cbc3 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_ACCOUNT.cs @@ -0,0 +1,56 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("Ŀ")] + + public class TES_ACCOUNT : TED_BASE,ITaskTable + { + [Description("")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_BOM.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_BOM.cs new file mode 100644 index 0000000..3bd59f4 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_BOM.cs @@ -0,0 +1,99 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("BOM")] + public class TES_BOM : TED_BASE,ITaskTable + { + [Description("")] + [StringLength(50)] + public string ParentPart { get; set; } + + [Description("")] + [StringLength(50)] + public string ComponentPart { get; set; } + + [Description("ο")] + [StringLength(50)] + public string Reference { get; set; } + + [Description("Ч")] + public DateTime StartEffective { get; set; } + + [Description("ÿ")] + public decimal QuantityPer { get; set; } + + [Description("ṹ")] + [StringLength(50)] + public string StructureType { get; set; } + + [Description("Ч")] + public string EndEffective { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + + [Description("Ʒ")] + public decimal Scrap { get; set; } + + [Description("ǰ")] + public int LeadTimeOffset { get; set; } + + [Description("")] + public int Operation { get; set; } + + [Description("")] + public int SequenceNumber { get; set; } + + [Description("Ԥٷֱ")] + public decimal FporecastPercent { get; set; } + + [Description("")] + [StringLength(50)] + public string OptionGroup { get; set; } + + [Description("")] + [StringLength(50)] + public string Process { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_CODE.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_CODE.cs new file mode 100644 index 0000000..1ab6a97 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_CODE.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("ͨô")] + public class TES_CODE : TED_BASE,ITaskTable + { + [Description("")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_CODE_TYPE.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_CODE_TYPE.cs new file mode 100644 index 0000000..50345bd --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_CODE_TYPE.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("ͨôͱ")] + public class TES_CODE_TYPE : TED_BASE,ITaskTable + { + [Description("")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_COLOR.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_COLOR.cs new file mode 100644 index 0000000..56f0e81 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_COLOR.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("MESɫ")] + public class TES_COLOR : TED_BASE,ITaskTable + { + [Description("")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_COST_CENTER.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_COST_CENTER.cs new file mode 100644 index 0000000..ea8c1e0 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_COST_CENTER.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("ɱı")] + public class TES_COST_CENTER : TED_BASE,ITaskTable + { + [Description("")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_CUSTOMER.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_CUSTOMER.cs new file mode 100644 index 0000000..463f050 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_CUSTOMER.cs @@ -0,0 +1,308 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("ͻ")] + public class TES_CUSTOMER : TED_BASE,ITaskTable + { + [Description("ͻ")] + [StringLength(50)] + public string CustomerCode { get; set; } + + [Description("ͻ")] + [StringLength(50)] + public string CustomerName { get; set; } + + [Description("")] + [StringLength(50)] + public string SearchName { get; set; } + + [Description("м")] + [StringLength(50)] + public string SecondName { get; set; } + + [Description("")] + [StringLength(50)] + public string ThirdName { get; set; } + + [Description("")] + [StringLength(50)] + public string GroupName { get; set; } + + [Description("")] + [StringLength(50)] + public string Active { get; set; } + + [Description("ͻַ")] + [StringLength(50)] + public string Address1 { get; set; } + + [Description("ͻַ")] + [StringLength(50)] + public string Address2 { get; set; } + + [Description("ͻַ")] + [StringLength(50)] + public string Address3 { get; set; } + + [Description("ʱ")] + [StringLength(50)] + public string ZipCode { get; set; } + + [Description("")] + [StringLength(50)] + public string City { get; set; } + + [Description("")] + [StringLength(50)] + public string Country { get; set; } + + [Description("绰")] + [StringLength(50)] + public string Telephone { get; set; } + + [Description("ʡ")] + [StringLength(50)] + public string province { get; set; } + + [Description("")] + [StringLength(50)] + public string County { get; set; } + + [Description("")] + [StringLength(50)] + public string Fax { get; set; } + + [Description("Դ")] + [StringLength(50)] + public string LanguageCode { get; set; } + + [Description("ʼ")] + [StringLength(50)] + public string Email { get; set; } + + [Description("ַ")] + [StringLength(50)] + public string Internet { get; set; } + + [Description("˰ַ")] + [StringLength(50)] + public string AddressIsTaxable { get; set; } + + [Description("˰")] + [StringLength(50)] + public string AddressIsTaxIncluded { get; set; } + + [Description("˰")] + [StringLength(50)] + public string FederalTax { get; set; } + + [Description("˰")] + [StringLength(50)] + public string StateTax { get; set; } + + [Description("˰1")] + [StringLength(50)] + public string MiscTax1 { get; set; } + + [Description("˰2")] + [StringLength(50)] + public string MiscTax2 { get; set; } + + [Description("˰3")] + [StringLength(50)] + public string MiscTax3 { get; set; } + + [Description("˰")] + [StringLength(50)] + public string TaxInCity { get; set; } + + [Description("˰")] + [StringLength(50)] + public string TaxZone { get; set; } + + [Description("˰")] + [StringLength(50)] + public string TaxClass { get; set; } + + [Description("˰;")] + [StringLength(50)] + public string TaxUsage { get; set; } + + [Description("")] + [StringLength(50)] + public string Title { get; set; } + + [Description("ϵ")] + [StringLength(50)] + public string ContactName { get; set; } + + [Description("д")] + [StringLength(50)] + public string Initials { get; set; } + + [Description("")] + [StringLength(50)] + public string Function { get; set; } + + [Description("Ա")] + [StringLength(50)] + public string Gender { get; set; } + + [Description("Ҫϵ")] + [StringLength(50)] + public string ContactIsPrimary { get; set; } + + [Description("Ҫϵ")] + [StringLength(50)] + public string ContactIsSecondary { get; set; } + + [Description("")] + [StringLength(50)] + public string Compens { get; set; } + + [Description("Ʊļ")] + [StringLength(50)] + public string GlProfileInvoice { get; set; } + + [Description("Ʊݿļ")] + [StringLength(50)] + public string GlProfileCreditNote { get; set; } + + [Description("Ԥļ")] + [StringLength(50)] + public string GlProfilePrepayment { get; set; } + + [Description("ۼļ")] + [StringLength(50)] + public string GLProfileDeduction { get; set; } + + [Description("˿ļ")] + [StringLength(50)] + public string AccountGLProfile { get; set; } + + [Description("ÿļ")] + [StringLength(50)] + public string FinanceChargeProfile { get; set; } + + [Description("˻ļ")] + [StringLength(50)] + public string SubAccountProfile { get; set; } + + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + + [Description("ͻ")] + [StringLength(50)] + public string Customertype { get; set; } + + [Description("֧")] + [StringLength(50)] + public string CreditTerms { get; set; } + + [Description("Ʊ״̬")] + [StringLength(50)] + public string InvoiceStatusCode { get; set; } + + [Description("")] + [StringLength(50)] + public string PaymentGroup { get; set; } + + [Description("˵ϸ")] + [StringLength(50)] + public string BillingSchedule { get; set; } + + [Description("Ʊտ")] + [StringLength(50)] + public string BillPayee { get; set; } + + [Description("ƱȨ")] + [StringLength(50)] + public string InvoicebyAuthorization { get; set; } + + [Description("Ա")] + [StringLength(50)] + public string SalesPerson { get; set; } + + [Description("ʽ")] + [StringLength(50)] + public string ShipVia { get; set; } + + [Description("ת˰")] + [StringLength(50)] + public string Resale { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Remarks { get; set; } + + [Description("")] + [StringLength(50)] + public string Region { get; set; } + + [Description("ۿ۱")] + [StringLength(50)] + public string DiscountTable { get; set; } + + [Description("̶۸")] + [StringLength(50)] + public string FixfdPrice { get; set; } + + [Description("ռ˼")] + [StringLength(50)] + public string DayBookSet { get; set; } + + [Description("иʽ")] + [StringLength(50)] + public string BankFormat { get; set; } + + [Description("ͻ")] + [StringLength(50)] + public string CustomerBank { get; set; } + + [Description("")] + [StringLength(50)] + public string OwnBank { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_CUSTOMER_PART.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_CUSTOMER_PART.cs new file mode 100644 index 0000000..7c7f102 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_CUSTOMER_PART.cs @@ -0,0 +1,71 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("ͻ")] + public class TES_CUSTOMER_PART : TED_BASE,ITaskTable + { + [Description("ͻ/﷢")] + [StringLength(50)] + public string CustomerShipto { get; set; } + + [Description("ͻĿ")] + [StringLength(50)] + public string CustomerPart { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Comment { get; set; } + + [Description("ʾͻ")] + [StringLength(50)] + public string DisplayCustomerPart { get; set; } + + [Description("ͻϹ̱")] + [StringLength(50)] + public string CustomerPartEcoNbr { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_CUSTOMER_TYPE.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_CUSTOMER_TYPE.cs new file mode 100644 index 0000000..839843d --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_CUSTOMER_TYPE.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("ͻͱ")] + public class TES_CUSTOMER_TYPE : TED_BASE,ITaskTable + { + [Description("")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_DEPARTMENT.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_DEPARTMENT.cs new file mode 100644 index 0000000..7479baa --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_DEPARTMENT.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("ű")] + public class TES_DEPARTMENT : TED_BASE,ITaskTable + { + [Description("Ŵ")] + [StringLength(50)] + public string DeptCode { get; set; } + + [Description("")] + [StringLength(50)] + public string DeptName { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_DOMAIN.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_DOMAIN.cs new file mode 100644 index 0000000..cc2e041 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_DOMAIN.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("")] + public class TES_DOMAIN : TED_BASE,ITaskTable + { + [Description("")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_EDI_DATA.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_EDI_DATA.cs new file mode 100644 index 0000000..9f44dfd --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_EDI_DATA.cs @@ -0,0 +1,91 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("EDIݱ")] + public class TES_EDI_DATA : TED_BASE,ITaskTable + { + [Description("۶")] + [StringLength(50)] + public string SalesOrder { get; set; } + + [Description("﷢")] + [StringLength(50)] + public string ShipFrom { get; set; } + + [Description("ͻ")] + [StringLength(50)] + public string Customer { get; set; } + + [Description("ͻ")] + [StringLength(50)] + public string CustomerPart { get; set; } + + [Description("к")] + public int Line { get; set; } + + [Description("")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("ɹ")] + [StringLength(50)] + public string PurchaseOrder { get; set; } + + [Description("ͻο")] + [StringLength(50)] + public string CustomerReference { get; set; } + + [Description("")] + public DateTime ReceiveDate { get; set; } + + [Description("ʱ")] + public DateTime ReceiveTime { get; set; } + + [Description("")] + public DateTime DemandDate { get; set; } + + [Description("")] + public decimal DemandQuantity { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_ENTITY.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_ENTITY.cs new file mode 100644 index 0000000..efed3dd --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_ENTITY.cs @@ -0,0 +1,56 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("Ƶλ")] + public class TES_ENTITY : TED_BASE,ITaskTable + { + [Description("Ƶλ")] + [StringLength(50)] + public string Entity { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_LINE.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_LINE.cs new file mode 100644 index 0000000..99a7164 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_LINE.cs @@ -0,0 +1,95 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("߱")] + public class TES_LINE : TED_BASE,ITaskTable + { + [Description("")] + [StringLength(50)] + public string ProductionLine { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + [Description("˵")] + [StringLength(50)] + public string Description { get; set; } + + [Description("/Сʱ")] + public decimal UnitsHour { get; set; } + + [Description("дС")] + public bool EnableRunSize { get; set; } + + [Description("")] + public decimal NumberOfLines { get; set; } + + [Description("ʱ仺-")] + public int DurationBuffer { get; set; } + + [Description("ʱ仺ʱ")] + [StringLength(50)] + public string DurationBufferHMS { get; set; } + + [Description("ʱ-")] + public int SetupTime { get; set; } + + [Description("ʱ")] + [StringLength(50)] + public string SetupTimeHMS { get; set; } + + [Description("Զ̶")] + public bool LnAutofirm { get; set; } + + [Description("ϴԶ̶")] + public DateTime LnLastAutofirm { get; set; } + + [Description("ID")] + [StringLength(50)] + public string LnScheduler { get; set; } + + [Description("޽")] + [StringLength(50)] + public string Dtendlit { get; set; } + + [Description("ں")] + public int EndNumber { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_LINE_PART.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_LINE_PART.cs new file mode 100644 index 0000000..a6a2de4 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_LINE_PART.cs @@ -0,0 +1,109 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("ϵ")] + public class TES_LINE_PART : TED_BASE,ITaskTable + { + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("")] + [StringLength(50)] + public string ProductionLine { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + [Description("ʼ")] + public DateTime StartDate { get; set; } + + [Description("/Сʱ")] + public decimal UnitsHour { get; set; } + + [Description("")] + public decimal NumberOfLines { get; set; } + + [Description("ʱ-")] + public int SetupTime { get; set; } + + [Description("ʱ")] + [StringLength(50)] + public string SetupTimeHMS { get; set; } + + [Description("")] + public bool PrimaryLine { get; set; } + + [Description("Ա")] + public decimal SetupCrew { get; set; } + + [Description("С")] + public int SetSize { get; set; } + + [Description("ȫԱ")] + public decimal RunCrew { get; set; } + + [Description("С")] + public int RunSize { get; set; } + + [Description("嵥")] + [StringLength(50)] + public string BomCode { get; set; } + + [Description("")] + [StringLength(50)] + public string Routing { get; set; } + + [Description("ID")] + [StringLength(50)] + public string ToolId { get; set; } + + [Description("˳1")] + [StringLength(50)] + public string RunSequence1 { get; set; } + + [Description("˳2")] + [StringLength(50)] + public string RunSequence2 { get; set; } + + [Description("ע")] + public bool Comments { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_LOCATION.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_LOCATION.cs new file mode 100644 index 0000000..1916cbc --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_LOCATION.cs @@ -0,0 +1,93 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("λ")] + public class TES_LOCATION : TED_BASE,ITaskTable + { + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Description("״̬")] + [StringLength(50)] + public string InventoryStatus { get; set; } + + [Description("Ŀ")] + [StringLength(50)] + public string Project { get; set; } + + [Description("")] + public DateTime DateCreated { get; set; } + + [Description("")] + public bool Permanent { get; set; } + + [Description("")] + [StringLength(50)] + public string Type { get; set; } + + [Description("")] + public bool SinglePart { get; set; } + + [Description("/ο")] + public bool SingleLotReference { get; set; } + + [Description("")] + public decimal Capacity { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("λ")] + public bool ReservedLocations { get; set; } + + [Description("ʵַ")] + [StringLength(50)] + public string PhysicalAddress { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_MES_DATA.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_MES_DATA.cs new file mode 100644 index 0000000..8d53539 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_MES_DATA.cs @@ -0,0 +1,47 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("MESݱ")] + public class TES_MES_DATA : TED_BASE,ITaskTable + { + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_PACK.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_PACK.cs new file mode 100644 index 0000000..f0acbc7 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_PACK.cs @@ -0,0 +1,63 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("׼װ")] + public class TES_PACK : TED_BASE,ITaskTable + { + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("üλ")] + [StringLength(50)] + public string AlternateUm { get; set; } + + [Description("λ")] + public int UmConversion { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_PART_DET.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_PART_DET.cs new file mode 100644 index 0000000..db645f2 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_PART_DET.cs @@ -0,0 +1,240 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("ϸ")] + public class TES_PART_DET : TED_BASE,ITaskTable + { + [Description("")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + [Description("ABC ")] + [StringLength(50)] + public string AbcClass { get; set; } + + [Description("ſ")] + [StringLength(50)] + public string LotControl { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("λ")] + [StringLength(50)] + public string LocationType { get; set; } + + [Description("Զ")] + public bool AutoMaticLotNumbers { get; set; } + + [Description("ƽ")] + public int AverageInterval { get; set; } + + [Description("̵")] + public int CycleCountInterval { get; set; } + + [Description("")] + public int ShelfLife { get; set; } + + [Description("ؼ")] + public bool KeyPart { get; set; } + + [Description("ɹջ״̬")] + [StringLength(50)] + public string PoReceiptStatus { get; set; } + + [Description("Ч")] + public bool RctPoActive { get; set; } + + [Description("ӹջ״̬")] + [StringLength(50)] + public string WoReceiptStatus { get; set; } + + [Description("Ч")] + public bool RctWoActive { get; set; } + + [Description("ǿ涩")] + [StringLength(50)] + public string MemoOrderType { get; set; } + + [Description("ƻ")] + public bool MasterSchedule { get; set; } + + [Description("ƻ")] + public bool PlanOrders { get; set; } + + [Description("ʱ")] + public int TimeFence { get; set; } + + [Description("")] + [StringLength(50)] + public string OrderPolicy { get; set; } + + [Description("")] + public decimal OrderQuantity { get; set; } + + [Description("")] + public int OrderPeriod { get; set; } + + [Description("ȫ")] + public decimal SafetyStock { get; set; } + + [Description("ȫǰ")] + public decimal SafetyTime { get; set; } + + [Description("ٶ")] + public decimal ReorderPoint { get; set; } + + [Description("ƻ޸")] + [StringLength(50)] + public string PlanningRev { get; set; } + + [Description("ԭ")] + public bool IssuePolicy { get; set; } + + [Description("ɹԱ/ƻԱ")] + [StringLength(50)] + public string BuyerPlanner { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + + [Description("ɹص")] + [StringLength(50)] + public string PoSite { get; set; } + + [Description("ɹ/")] + [StringLength(50)] + public string PurMfg { get; set; } + + [Description("")] + [StringLength(50)] + public string ConfigurationType { get; set; } + + [Description("λ")] + [StringLength(50)] + public string InspectionLocation { get; set; } + + [Description("Ҫ")] + public bool InspectionRequired { get; set; } + + [Description("ǰ")] + public int InspectionLeadTime { get; set; } + + [Description("ۼǰ")] + public int CumulativeLeadTime { get; set; } + + [Description("ǰ")] + public int ManufacturingLedaTime { get; set; } + + [Description("ɹǰ")] + public int PurchaseLeadTime { get; set; } + + [Description("ATPʵʩˮƽ")] + [StringLength(50)] + public string AtpEnforcementLevel { get; set; } + + [Description("ϵATP")] + public bool FamilyATP { get; set; } + + [Description("ATPˮƽ")] + public int AtpHorizon { get; set; } + + [Description("1")] + [StringLength(50)] + public string RunSeq1 { get; set; } + + [Description("2")] + [StringLength(50)] + public string RunSeq2 { get; set; } + + [Description("")] + public bool Phantom { get; set; } + + [Description("С")] + public decimal MinimumOrder { get; set; } + + [Description("")] + public decimal MaximumOrder { get; set; } + + [Description("")] + public decimal OrderMultiple { get; set; } + + [Description("ڲĹ")] + public bool OperationBasedYield { get; set; } + + [Description("")] + public decimal YieldPercent { get; set; } + + [Description("ʱ")] + [StringLength(50)] + public string RunTime { get; set; } + + [Description("ʱ")] + public decimal SetupTime { get; set; } + + [Description("EMT")] + [StringLength(50)] + public string EmtType { get; set; } + + [Description("EMTԶ")] + public bool AutomaticEmtProcessing { get; set; } + + [Description("")] + [StringLength(50)] + public string NetWorkCode { get; set; } + + [Description("̴")] + [StringLength(50)] + public string RoutingCode { get; set; } + + [Description("嵥/䷽")] + [StringLength(50)] + public string BomFormulaCode { get; set; } + + [Description("")] + [StringLength(50)] + public string ReplenishmentMethod { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_PART_MSTR.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_PART_MSTR.cs new file mode 100644 index 0000000..0d82540 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_PART_MSTR.cs @@ -0,0 +1,230 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("")] + public class TES_PART_MSTR : TED_BASE,ITaskTable + { + [Key] + public System.Guid GUID { get; set; } + public string PartCode { get; set; } + public string Desc1 { get; set; } + public string Desc2 { get; set; } + public string Um { get; set; } + public string ProdLine { get; set; } + public Nullable<System.DateTime> AddDate { get; set; } + public string DsgnGroup { get; set; } + public string PromotionGroup { get; set; } + public string PartType { get; set; } + public string Status { get; set; } + public string Group { get; set; } + public string Drawing { get; set; } + public string PartRevision { get; set; } + public string DrawingLocation { get; set; } + public string Size { get; set; } + public string PriceBreakCategory { get; set; } + public bool AuxiliaryMaterial { get; set; } + public Nullable<bool> OfflineSettlement { get; set; } + public string Qgrade { get; set; } + public int WmsPartType { get; set; } + public string ManageWay { get; set; } + public string InventoryCode { get; set; } + public string ManageType { get; set; } + public Nullable<int> InspectType { get; set; } + public int UID { get; set; } + public string CreateUser { get; set; } + public System.DateTime CreateTime { get; set; } + public string Remark { get; set; } + public System.Guid TaskID { get; set; } + public string CommandType { get; set; } + public System.Guid DataID { get; set; } + public string Domain { get; set; } + public string Site { get; set; } + + + + + + + + //[Key] + //public System.Guid GUID { get; set; } = Guid.NewGuid(); + //public string PartCode { get; set; } + //public string Desc1 { get; set; } + //public string Desc2 { get; set; } + //public string Um { get; set; } + //public string ProdLine { get; set; } + //public Nullable<System.DateTime> AddDate { get; set; } + //public string DsgnGroup { get; set; } + //public string PromotionGroup { get; set; } + //public string PartType { get; set; } + //public string Status { get; set; } + //public string Group { get; set; } + //public string Drawing { get; set; } + //public string PartRevision { get; set; } + //public string DrawingLocation { get; set; } + //public string Size { get; set; } + //public string PriceBreakCategory { get; set; } + //public bool AuxiliaryMaterial { get; set; } + //public Nullable<bool> OfflineSettlement { get; set; } + //public string Qgrade { get; set; } + //public int WmsPartType { get; set; } + //public string ManageWay { get; set; } + //public string InventoryCode { get; set; } + //public string ManageType { get; set; } + //public Nullable<bool> InspectType { get; set; } + //public int UID { get; set; } + //public string CreateUser { get; set; } + //public System.DateTime CreateTime { get; set; } + //public string Remark { get; set; } + //public System.Guid TaskID { get; set; } + //public string CommandType { get; set; } + //public System.Guid DataID { get; set; } + //public string Domain { get; set; } + //public string Site { get; set; } + + + + + + + + + + + + //[Description("")] + //[StringLength(50)] + //public string PartCode { get; set; } + + //[Description("1")] + //[StringLength(50)] + //public string Desc1 { get; set; } + + //[Description("2")] + //[StringLength(50)] + //public string Desc2 { get; set; } + + //[Description("λ")] + //[StringLength(50)] + //public string Um { get; set; } + + //[Description("Ʒ")] + //[StringLength(50)] + //public string ProdLine { get; set; } + + //[Description("")] + //public DateTime? AddDate { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string DsgnGroup { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string PromotionGroup { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string PartType { get; set; } + + //[Description("״̬")] + //[StringLength(50)] + //public string Status { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string Group { get; set; } + + //[Description("ͼֽ")] + //[StringLength(50)] + //public string Drawing { get; set; } + + //[Description("Ŀ޸")] + //[StringLength(50)] + //public string PartRevision { get; set; } + + //[Description("ͼֽλ")] + //[StringLength(50)] + //public string DrawingLocation { get; set; } + + //[Description("С")] + //[StringLength(50)] + //public string Size { get; set; } + + //[Description("۸ۿ")] + //[StringLength(50)] + //public string PriceBreakCategory { get; set; } + + //[Description("")] + //public bool AuxiliaryMaterial { get; set; } + + //[Description("߽")] + //public bool OfflineSettlement { get; set; } + + //[Description("Qȼ")] + //[StringLength(50)] + //public string Qgrade { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string WmsPartType { get; set; } + + //[Description("ʽ")] + //[StringLength(50)] + //public string ManageWay { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string InventoryCode { get; set; } + + //[Description("ͣ/")] + //[StringLength(50)] + //public string ManageType { get; set; } + + //[Description("Ƿ")] + //[StringLength(50)] + //public string InspectType { get; set; } + + + + //[Key] + //public Guid GUID { get; set; } = Guid.NewGuid(); + + //[DatabaseGenerated(DatabaseGeneratedOption.Identity)] + //public int UID { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string CreateUser { get; set; } + + //[Description("ʱ")] + //public DateTime CreateTime { get; set; } + + + //[Description("ע")] + //public string Remark { get; set; } + + //[Description("")] + //public Guid TaskID { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string CommandType { get; set; } + + //public Guid DataID { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string Domain { get; set; } + + //[Description("ص")] + //[StringLength(50)] + //public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_PRODUCT_LINE.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_PRODUCT_LINE.cs new file mode 100644 index 0000000..fef3762 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_PRODUCT_LINE.cs @@ -0,0 +1,61 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("Ʒ")] + public class TES_PRODUCT_LINE : TED_BASE,ITaskTable + { + [Description("Ʒ")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Description("Ӧ˰")] + public bool Taxable { get; set; } + + [Description("˰")] + public int TaxClass { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_PROJECT.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_PROJECT.cs new file mode 100644 index 0000000..5fa8c68 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_PROJECT.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("Ŀ")] + public class TES_PROJECT : TED_BASE,ITaskTable + { + [Description("")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_PURCHASE_PRICE.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_PURCHASE_PRICE.cs new file mode 100644 index 0000000..9f33dd3 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_PURCHASE_PRICE.cs @@ -0,0 +1,89 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("ɹ۸")] + public class TES_PURCHASE_PRICE : TED_BASE,ITaskTable + { + [Description("Ŀ")] + [StringLength(50)] + public string PriceList { get; set; } + + [Description("˵")] + [StringLength(50)] + public string Desc { get; set; } + + [Description("Ʒ")] + [StringLength(50)] + public string ProductLine { get; set; } + + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("ʼ")] + public DateTime Start { get; set; } + + [Description("")] + public DateTime ExpireDate { get; set; } + + [Description("")] + [StringLength(50)] + public string AmountType { get; set; } + + [Description("")] + public decimal Amount { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + [Description("Ӧ")] + [StringLength(50)] + public string SupplierCode { get; set; } + [Description("Ӧ̽")] + public decimal VendAmount { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_ROUTING.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_ROUTING.cs new file mode 100644 index 0000000..d011ed9 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_ROUTING.cs @@ -0,0 +1,129 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("·ɱ")] + public class TES_ROUTING : TED_BASE,ITaskTable + { + [Description("̴")] + [StringLength(50)] + public string RoutingCode { get; set; } + + [Description("")] + public int Operation { get; set; } + + [Description("ʼ")] + public DateTime StartDate { get; set; } + + [Description("׼")] + [StringLength(50)] + public string StandardOperration { get; set; } + + [Description("")] + [StringLength(50)] + public string WorkCenter { get; set; } + + [Description("")] + [StringLength(50)] + public string Machine { get; set; } + + [Description("˵")] + [StringLength(50)] + public string Description { get; set; } + + [Description("/")] + public int MachinesPerOperation { get; set; } + + [Description("ƽмӹ")] + public int OverlapUnits { get; set; } + + [Description("Ŷʱ")] + public decimal QueueTime { get; set; } + + [Description("ȴʱ")] + public decimal WaitTime { get; set; } + + [Description("ֽ׶εĹ")] + public bool MilestoneOperation { get; set; } + + [Description("תǰ")] + public int SubcontractLt { get; set; } + + [Description("Ա")] + public decimal SetupCrew { get; set; } + + [Description("ȫԱ")] + public decimal RunCrew { get; set; } + + [Description("ʱ")] + public decimal SetupTime { get; set; } + + [Description("ʱ")] + public decimal RunTime { get; set; } + + [Description("ƶʱ")] + public decimal MoveTime { get; set; } + + [Description("")] + public DateTime EndDate { get; set; } + + [Description("")] + public decimal YieldPercent { get; set; } + + [Description("ߴ")] + [StringLength(50)] + public string ToolCode { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + + [Description("ֵ")] + public decimal InventoryValue { get; set; } + + [Description("תɱ")] + public decimal SubcontractCost { get; set; } + + [Description("ע")] + public bool Comments { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_SALE_PRICE.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_SALE_PRICE.cs new file mode 100644 index 0000000..8742ff4 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_SALE_PRICE.cs @@ -0,0 +1,85 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("ۼ۸")] + public class TES_SALE_PRICE : TED_BASE,ITaskTable + { + [Description("Ŀ")] + [StringLength(50)] + public string PriceList { get; set; } + + [Description("˵")] + [StringLength(50)] + public string Desc { get; set; } + + [Description("Ʒ")] + [StringLength(50)] + public string ProductLine { get; set; } + + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("ʼ")] + public DateTime Start { get; set; } + + [Description("")] + public DateTime ExpireDate { get; set; } + + [Description("")] + [StringLength(50)] + public string AmountType { get; set; } + + [Description("")] + public decimal Amount { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_SHIFT.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_SHIFT.cs new file mode 100644 index 0000000..5d965d6 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_SHIFT.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("α")] + public class TES_SHIFT : TED_BASE,ITaskTable + { + [Description("")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_SITE.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_SITE.cs new file mode 100644 index 0000000..dee77e9 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_SITE.cs @@ -0,0 +1,92 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("ص")] + public class TES_SITE : TED_BASE,ITaskTable + { + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("Ƶλ")] + [StringLength(50)] + public string Entity { get; set; } + + [Description("״̬")] + [StringLength(50)] + public string Status { get; set; } + + [Description("Զɿλ")] + public bool AutoLocation { get; set; } + + [Description("λ")] + [StringLength(50)] + public string InspLocation { get; set; } + + [Description("EMTӦ")] + [StringLength(50)] + public string BtbSupplier { get; set; } + + [Description("ⲿӦ")] + public bool ExtSupplier { get; set; } + + [Description("תƲĿ")] + [StringLength(50)] + public string XferAcct { get; set; } + + [Description("תƲ˻")] + [StringLength(50)] + public string XferSub { get; set; } + + [Description("תƲɱ")] + [StringLength(50)] + public string XferCc { get; set; } + + [Description("POλ")] + [StringLength(50)] + public string GitLocation { get; set; } + + [Description("ʹüƻ/ȵĹ̨")] + public bool UsePlanSchedWbs { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_STAND_COST_PRICE.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_STAND_COST_PRICE.cs new file mode 100644 index 0000000..3040f64 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_STAND_COST_PRICE.cs @@ -0,0 +1,69 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("׼ɱ")] + public class TES_STAND_COST_PRICE : TED_BASE,ITaskTable + { + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("ϳɱ")] + public int MaterialCost { get; set; } + + [Description("˹ɱ")] + public int LaborCost { get; set; } + + [Description("ӳɱ")] + public int BurdenCost { get; set; } + + [Description("ɱ")] + public int OverheadCost { get; set; } + + [Description("תɱ")] + public int SubcontrCost { get; set; } + + [Description("ɱ")] + public int CostSet { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_SUB_ACCOUNT.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_SUB_ACCOUNT.cs new file mode 100644 index 0000000..4ade148 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_SUB_ACCOUNT.cs @@ -0,0 +1,56 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("˻")] + public class TES_SUB_ACCOUNT : TED_BASE,ITaskTable + { + [Description("˻")] + [StringLength(50)] + public string Code { get; set; } + + [Description("˻")] + [StringLength(50)] + public string Desc { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_SUPPLIER.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_SUPPLIER.cs new file mode 100644 index 0000000..0c9ae83 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_SUPPLIER.cs @@ -0,0 +1,388 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("Ӧ̱")] + public class TES_SUPPLIER : TED_BASE + { + //[Description("Ӧ̴")] + //[StringLength(50)] + //public string SupplierCode { get; set; } + + //[Description("Ӧ")] + //[StringLength(50)] + //public string SupplierName { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string SearchName { get; set; } + + //[Description("м")] + //[StringLength(50)] + //public string SecondName { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string ThirdName { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string GroupName { get; set; } + + //[Description("")] + //public bool Active { get; set; } + + //[Description("Ӧ̵ַ")] + //[StringLength(50)] + //public string Address1 { get; set; } + + //[Description("Ӧ̵ַ")] + //[StringLength(50)] + //public string Address2 { get; set; } + + //[Description("Ӧ̵ַ")] + //[StringLength(50)] + //public string Address3 { get; set; } + + //[Description("ʱ")] + //public int ZipCode { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string City { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string Country { get; set; } + + //[Description("绰")] + //public int Telephone { get; set; } + + //[Description("ʡ")] + //[StringLength(50)] + //public string province { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string County { get; set; } + + //[Description("")] + //public int Fax { get; set; } + + //[Description("Դ")] + //[StringLength(50)] + //public string LanguageCode { get; set; } + + //[Description("ʼ")] + //public int Email { get; set; } + + //[Description("ַ")] + //public int Internet { get; set; } + + //[Description("˰ַ")] + //public bool AddressIsTaxable { get; set; } + + //[Description("˰")] + //public bool AddressIsTaxIncluded { get; set; } + + //[Description("˰")] + //[StringLength(50)] + //public string FederalTax { get; set; } + + //[Description("˰")] + //[StringLength(50)] + //public string StateTax { get; set; } + + //[Description("˰1")] + //[StringLength(50)] + //public string MiscTax1 { get; set; } + + //[Description("˰2")] + //[StringLength(50)] + //public string MiscTax2 { get; set; } + + //[Description("˰3")] + //[StringLength(50)] + //public string MiscTax3 { get; set; } + + //[Description("˰")] + //public bool TaxInCity { get; set; } + + //[Description("˰")] + //[StringLength(50)] + //public string TaxZone { get; set; } + + //[Description("˰")] + //public int TaxClass { get; set; } + + //[Description("˰;")] + //[StringLength(50)] + //public string TaxUsage { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string Title { get; set; } + + //[Description("ϵ")] + //[StringLength(50)] + //public string ContactName { get; set; } + + //[Description("д")] + //[StringLength(50)] + //public string Initials { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string Function { get; set; } + + //[Description("Ա")] + //[StringLength(50)] + //public string Gender { get; set; } + + //[Description("Ҫϵ")] + //public bool ContactIsPrimary { get; set; } + + //[Description("Ҫϵ")] + //public bool ContactIsSecondary { get; set; } + + //[Description("")] + //public bool Compens { get; set; } + + //[Description("Ʊļ")] + //public int GlProfileInvoice { get; set; } + + //[Description("Ʊݿļ")] + //public int GlProfileCreditNote { get; set; } + + //[Description("Ԥļ")] + //public int GlProfilePrepayment { get; set; } + + //[Description("˿ļ")] + //public int AccountGLProfile { get; set; } + + //[Description("˻ļ")] + //public int SubAccountProfile { get; set; } + + //[Description("Ŵ")] + //[StringLength(50)] + //public string CreditAgencyReference { get; set; } + + //[Description("̻")] + //[StringLength(50)] + //public string CommerceNumber { get; set; } + + //[Description("TID֪ͨ")] + //[StringLength(50)] + //public string TidNotice { get; set; } + + //[Description("ⲿͻ")] + //[StringLength(50)] + //public string ExternalCustomerNumber { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string Currency { get; set; } + + //[Description("Ӧ")] + //[StringLength(50)] + //public string SupplierType { get; set; } + + //[Description("ɹ")] + //[StringLength(50)] + //public string Purchasetype { get; set; } + + //[Description("֧")] + //[StringLength(50)] + //public string CreditTerms { get; set; } + + //[Description("Ʊ״̬")] + //[StringLength(50)] + //public string InvoiceStatusCode { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string PaymentGroup { get; set; } + + //[Description("ͻ")] + //public bool SendRemittance { get; set; } + + //[Description("ָ")] + //public bool SplitAccount { get; set; } + + //[Description("ʽ")] + //[StringLength(50)] + //public string ShipVia { get; set; } + + //[Description("ע")] + //[StringLength(50)] + //public string Remarks { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string Carrier { get; set; } + + //[Description("ɹϵ")] + //[StringLength(50)] + //public string Purchasecontact { get; set; } + + //[Description("ռ˼")] + //[StringLength(50)] + //public string DayBookSet { get; set; } + + //[Description("幩Ӧ")] + //public bool KanBanSupplier { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string PromotionGroup { get; set; } + + //[Description("ɹԱ")] + //[StringLength(50)] + //public string Buyer { get; set; } + + //[Description("۸")] + //[StringLength(50)] + //public string PriceTable { get; set; } + + //[Description("ۿ۱")] + //[StringLength(50)] + //public string DiscountTable { get; set; } + + //[Description("̶۸")] + //public bool FixedPrice { get; set; } + + //[Description("۵۸")] + //[StringLength(50)] + //public string NonSoPrice { get; set; } + + //[Description("иʽ")] + //[StringLength(50)] + //public string BankFormat { get; set; } + + //[Description("Ӧ")] + //[StringLength(50)] + //public string SupplierBank { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string OwnBank { get; set; } + + + //[Key] + //public Guid GUID { get; set; } = Guid.NewGuid(); + + //[DatabaseGenerated(DatabaseGeneratedOption.Identity)] + //public int UID { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string CreateUser { get; set; } + + //[Description("ʱ")] + //public DateTime CreateTime { get; set; } + + + //[Description("ע")] + //public string Remark { get; set; } + + //[Description("")] + //public Guid TaskID { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string CommandType { get; set; } + + //public Guid DataID { get; set; } + + //[Description("")] + //[StringLength(50)] + //public string Domain { get; set; } + + //[Description("ص")] + //[StringLength(50)] + //public string Site { get; set; } + + + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + public string SupplierCode { get; set; } + public string SupplierName { get; set; } + public string SearchName { get; set; } + public string SecondName { get; set; } + public string ThirdName { get; set; } + public string GroupName { get; set; } + public bool Active { get; set; } + public string Address1 { get; set; } + public string Address2 { get; set; } + public string Address3 { get; set; } + public int ZipCode { get; set; } + public string City { get; set; } + public string Country { get; set; } + public int Telephone { get; set; } + public string province { get; set; } + public string County { get; set; } + public int Fax { get; set; } + public string LanguageCode { get; set; } + public int Email { get; set; } + public int Internet { get; set; } + public bool AddressIsTaxable { get; set; } + public bool AddressIsTaxIncluded { get; set; } + public string FederalTax { get; set; } + public string StateTax { get; set; } + public string MiscTax1 { get; set; } + public string MiscTax2 { get; set; } + public string MiscTax3 { get; set; } + public bool TaxInCity { get; set; } + public string TaxZone { get; set; } + public int TaxClass { get; set; } + public string TaxUsage { get; set; } + public bool Compens { get; set; } + public string GlProfileInvoice { get; set; } + public string GlProfileCreditNote { get; set; } + public string GlProfilePrepayment { get; set; } + public string AccountGLProfile { get; set; } + public string SubAccountProfile { get; set; } + public string CreditAgencyReference { get; set; } + public string CommerceNumber { get; set; } + public string TidNotice { get; set; } + public string ExternalCustomerNumber { get; set; } + public string Currency { get; set; } + public string SupplierType { get; set; } + public string Purchasetype { get; set; } + public string CreditTerms { get; set; } + public string InvoiceStatusCode { get; set; } + public string PaymentGroup { get; set; } + public bool SendRemittance { get; set; } + public bool SplitAccount { get; set; } + public string ShipVia { get; set; } + public string Remarks { get; set; } + public string Carrier { get; set; } + public string Purchasecontact { get; set; } + public string DayBookSet { get; set; } + public bool KanBanSupplier { get; set; } + public string PromotionGroup { get; set; } + public string Buyer { get; set; } + public string PriceTable { get; set; } + public string DiscountTable { get; set; } + public bool FixedPrice { get; set; } + public string NonSoPrice { get; set; } + public int UID { get; set; } + public string CreateUser { get; set; } + public System.DateTime CreateTime { get; set; } + public string Remark { get; set; } + public System.Guid TaskID { get; set; } + public string CommandType { get; set; } + public System.Guid DataID { get; set; } + public string Domain { get; set; } + public string Site { get; set; } + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_SUPPLIER_PART.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_SUPPLIER_PART.cs new file mode 100644 index 0000000..706bed9 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_SUPPLIER_PART.cs @@ -0,0 +1,101 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("Ӧ")] + public class TES_SUPPLIER_PART : TED_BASE,ITaskTable + { + [Description("Ϻ")] + [StringLength(50)] + public string PartCode { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string Supplier { get; set; } + + [Description("Ӧ")] + [StringLength(50)] + public string SupplierPart { get; set; } + + [Description("λ")] + [StringLength(50)] + public string Um { get; set; } + + [Description("Ӧǰ")] + public int SupplierLeadTime { get; set; } + + [Description("ʹÿͻ")] + public bool UseSoReductionPrice { get; set; } + + [Description("ͻ")] + public decimal SoPriceReduction { get; set; } + + [Description("")] + [StringLength(50)] + public string Currency { get; set; } + + [Description("۵۸")] + public decimal QuotePrice { get; set; } + + [Description("")] + public DateTime QuoteDate { get; set; } + + [Description("")] + public decimal QuoteQty { get; set; } + + [Description("Ŀ")] + [StringLength(50)] + public string PriceList { get; set; } + + [Description("")] + [StringLength(50)] + public string Manufacturer { get; set; } + + [Description("")] + [StringLength(50)] + public string ManufacturerPart { get; set; } + + [Description("ע")] + [StringLength(50)] + public string Comment { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_SUPPLIER_TYPE.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_SUPPLIER_TYPE.cs new file mode 100644 index 0000000..86a926e --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_SUPPLIER_TYPE.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("Ӧͱ")] + public class TES_SUPPLIER_TYPE : TED_BASE,ITaskTable + { + [Description("")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_TEAM.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_TEAM.cs new file mode 100644 index 0000000..c72c140 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_TEAM.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("")] + public class TES_TEAM : TED_BASE,ITaskTable + { + [Description("")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_WMS_LOCATION.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_WMS_LOCATION.cs new file mode 100644 index 0000000..a2041ad --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_WMS_LOCATION.cs @@ -0,0 +1,97 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("WMSλ")] + public class TES_WMS_LOCATION : TED_BASE,ITaskTable + { + [Description("λ")] + [StringLength(50)] + public string Location { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Description("ERPλ")] + [StringLength(50)] + public string ErpLocation { get; set; } + + [Description("")] + [StringLength(50)] + public string Area { get; set; } + + [Description("״̬")] + [StringLength(50)] + public string InventoryStatus { get; set; } + + [Description("Ա")] + [StringLength(50)] + public string WarehouseKeeper { get; set; } + + [Description("ֿ")] + [StringLength(50)] + public string WhseCode { get; set; } + + [Description("")] + public bool IsEnableNegativeStock { get; set; } + + [Description("")] + public bool AutoRemoveZeroStockDetail { get; set; } + + [Description("")] + public decimal MaxBoxQty { get; set; } + + [Description("")] + public bool IsEnableMix { get; set; } + + [Description("Ŀ")] + [StringLength(50)] + public string ProjectId { get; set; } + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + + [StringLength(50)] + public string Domain { get; set; } + + [StringLength(50)] + public string Site { get; set; } + + public Guid TaskID { get; set; } + + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TES_WORK_CENTER.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TES_WORK_CENTER.cs new file mode 100644 index 0000000..e4d6c3e --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TES_WORK_CENTER.cs @@ -0,0 +1,106 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using CK.SCP.Models.Base; +using CK.SCP.Models.Enums; + +namespace CK.SCP.Models.ExchangeCenterTables +{ + [Description("ı")] + public class TES_WORK_CENTER : TED_BASE,ITaskTable + { + [Description("Ĵ")] + [StringLength(50)] + public string Code { get; set; } + + [Description("")] + [StringLength(50)] + public string Desc { get; set; } + + [Description("")] + [StringLength(50)] + public string Department { get; set; } + + [Description("Զ̶")] + public bool AutoFirm { get; set; } + + [Description("ϴԶ̶")] + public DateTime LastAutoFirm { get; set; } + + [Description("")] + [StringLength(50)] + public string Scheduler { get; set; } + + [Description("ȴʱ")] + public decimal Queue { get; set; } + + [Description("ȴʱ")] + public decimal Wait { get; set; } + + [Description("豸/")] + public int MchOp { get; set; } + + [Description("Ա")] + public decimal SetupMen { get; set; } + + [Description("ȫԱ")] + public decimal RunCrew { get; set; } + + [Description("")] + public decimal MchWkctr { get; set; } + + [Description("")] + public decimal MchBdn { get; set; } + + [Description("÷")] + public decimal SetupRte { get; set; } + + [Description("˹")] + public decimal LbrRate { get; set; } + + [Description("˹")] + public decimal BdnRate { get; set; } + + [Description("˹")] + public decimal BdnPct { get; set; } + + [Description("")] + [StringLength(50)] + public string Mch { get; set; } + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + + [Description("ע")] + public string Remark { get; set; } + + [Description("")] + public Guid TaskID { get; set; } + + [Description("")] + [StringLength(50)] + public string CommandType { get; set; } + + public Guid DataID { get; set; } + + [Description("")] + [StringLength(50)] + public string Domain { get; set; } + + [Description("ص")] + [StringLength(50)] + public string Site { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/TS_PART_MSTR.cs b/北京北汽/SCP/Models/ExchangeCenterTables/TS_PART_MSTR.cs new file mode 100644 index 0000000..033d526 --- /dev/null +++ b/北京北汽/SCP/Models/ExchangeCenterTables/TS_PART_MSTR.cs @@ -0,0 +1,207 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangkeTec.SDMS.Model.Attributes; +using ChangkeTec.SDMS.Model.Base; +using ChangkeTec.SDMS.Model.Enums; + +namespace ChangkeTec.SDMS.Model.DataCenterTables +{ + [Description("")] + public class TS_PART_MSTR : IUpdatableTable, ISoftDelete, IDomain,INotifyPropertyChanged + { + [Required(ErrorMessage = "벻Ϊ")] + [Index("IndexPartMstr", Order = 0, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 1)] + [Description("*")] + [StringLength(50)] + public string PartCode { get; set; } + + [ColumnSource(ColumnSourceType.TABLE, typeof(TS_DOMAIN), new[] { "Code", "Desc" })] + [Required(ErrorMessage = "Ϊ")] + [Index("IndexPartMstr", Order = 1, IsUnique = true, IsClustered = false)] + [IsDataGridColum(true, 28)] + [Description("*")] + [StringLength(50)] + public string Domain { get; set; } + + [IsDataGridColum(true, 2)] + [Description("1")] + [StringLength(24)] + public string Desc1 { get; set; } + [IsDataGridColum(true, 3)] + [Description("2")] + [StringLength(24)] + public string Desc2 { get; set; } + + [Required(ErrorMessage = "λΪ")] + [ColumnSource(ColumnSourceType.TABLE, typeof(TS_CODE), new[] { "Code", "Desc" })] + [IsDataGridColum(true, 4)] + [Description("λ*")] + [StringLength(50)] + public string Um { get; set; } + + [Required(ErrorMessage = "Ʒ಻Ϊ")] + [ColumnSource(ColumnSourceType.TABLE, typeof(TS_PRODUCT_LINE), new[] { "Code", "Desc" })] + [IsDataGridColum(true, 5)] + [Description("Ʒ*")] + [StringLength(50)] + public string ProdLine { get; set; } + + [IsDataGridColum(true, 6)] + [Description("*")] + public DateTime? AddDate { get; set; } + + //[Required(ErrorMessage = "鲻Ϊ")] + [ColumnSource(ColumnSourceType.TABLE, typeof(TS_CODE), new[] { "Code", "Desc" })] + [IsDataGridColum(true, 6)] + [Description("*")] + [StringLength(50)] + public string DsgnGroup { get; set; } + + //[Required(ErrorMessage = "鲻Ϊ")] + [ColumnSource(ColumnSourceType.TABLE, typeof(TS_CODE), new[] { "Code", "Desc" })] + [IsDataGridColum(true, 8)] + [Description("*")] + [StringLength(50)] + public string PromotionGroup { get; set; } + + [Required(ErrorMessage = "ͲΪ")] + [ColumnSource(ColumnSourceType.TABLE, typeof(TS_CODE), new[] { "Code", "Desc" })] + [IsDataGridColum(true, 9)] + [Description("*")] + [StringLength(50)] + public string PartType { get; set; } + + [Required(ErrorMessage = "״̬Ϊ")] + [ColumnSource(ColumnSourceType.TABLE, typeof(TS_CODE), new[] { "Code", "Desc" })] + [IsDataGridColum(true, 10)] + [Description("״̬*")] + [StringLength(50)] + public string Status { get; set; } + + + [ColumnSource(ColumnSourceType.TABLE, typeof(TS_CODE), new[] { "Code", "Desc" })] + [IsDataGridColum(true, 11)] + [Description("*")] + [StringLength(50)] + public string Group { get; set; } + [IsDataGridColum(true, 12)] + [Description("ͼֽ")] + [StringLength(50)] + public string Drawing { get; set; } + [IsDataGridColum(true, 13)] + [Description("Ŀ޸")] + [StringLength(50)] + public string PartRevision { get; set; } + [IsDataGridColum(true, 14)] + [Description("ͼֽλ")] + [StringLength(50)] + public string DrawingLocation { get; set; } + [IsDataGridColum(true, 15)] + [Description("С")] + [StringLength(50)] + public string Size { get; set; } + [IsDataGridColum(true, 16)] + [Description("۸ۿ")] + [StringLength(50)] + public string PriceBreakCategory { get; set; } + [IsDataGridColum(true, 17)] + [Description("")] + public bool AuxiliaryMaterial { get; set; } + + [IsDataGridColum(true, 18)] + [Description("߽")] + public bool OfflineSettlement { get; set; } = false; + [IsDataGridColum(true, 19)] + [Description("Qȼ")] + [StringLength(50)] + public string Qgrade { get; set; } + + [Required(ErrorMessage = "಻Ϊ")] + [ColumnSource(ColumnSourceType.ENUM, typeof(EnumPartKind))] + [IsDataGridColum(true, 20)] + [Description("*")] + public EnumPartKind WmsPartType { get; set; } = EnumPartKind.RAW; + [IsDataGridColum(true, 21)] + [Description("ʽ")] + [StringLength(50)] + public string ManageWay { get; set; } + [IsDataGridColum(true, 22)] + [Description("")] + [StringLength(50)] + public string InventoryCode { get; set; } + + [IsDataGridColum(true, 23)] + [Description("ͣ/")] + [StringLength(50)] + public string ManageType { get; set; } = ""; + + [ColumnSource(ColumnSourceType.ENUM, typeof(EnumInspectType))] + [Required(ErrorMessage = "Ƿ鲻Ϊ")] + [IsDataGridColum(true, 24)] + [Description("Ƿ*")] + public EnumInspectType InspectType { get; set; } = EnumInspectType.ȫ; + + + [Key] + public Guid GUID { get; set; } = Guid.NewGuid(); + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [IsDataGridColum(true, 24)] + [Description("")] + [StringLength(50)] + public string CreateUser { get; set; } + [IsDataGridColum(true, 25)] + [Description("ʱ")] + public DateTime CreateTime { get; set; } + + [IsDataGridColum(true, 27)] + [Description("ע")] + public string Remark { get; set; } + + [Description("޸")] + [StringLength(50)] + public string UpdateUser { get; set; } + + [Description("޸ʱ")] + public DateTime? UpdateTime { get; set; } + + [Description("ɾ")] + public bool IsDeleted { get; set; } + + #region IsChecked + + private bool _isChecked = false; + + [NotMapped] + public bool IsChecked + { + get => _isChecked; + set + { + _isChecked = value; + NotityPropertyChanged("IsChecked"); + } + } + + #endregion + + #region INotifyPropertyChanged + + public event PropertyChangedEventHandler PropertyChanged; + + public void NotityPropertyChanged(string propertyName) + { + if (PropertyChanged != null) + { + PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + + #endregion + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ExchangeCenterTables/name.txt b/北京北汽/SCP/Models/ExchangeCenterTables/name.txt new file mode 100644 index 0000000..b810980 Binary files /dev/null and b/北京北汽/SCP/Models/ExchangeCenterTables/name.txt differ diff --git a/北京北汽/SCP/Models/GlobalConfig.cs b/北京北汽/SCP/Models/GlobalConfig.cs new file mode 100644 index 0000000..c2a24b7 --- /dev/null +++ b/北京北汽/SCP/Models/GlobalConfig.cs @@ -0,0 +1,101 @@ +using System; +using CK.SCP.Utils; +namespace CK.SCP.Models +{ + + public static class GlobalConfig + { + public const string ScpDbFileName = "Scp数据库设置.ini"; + public const string AppBoxDbFileName = "AppBox数据库设置.ini"; + public const string UniApiDbFileName = "接口数据库设置.ini"; + public const string UniApiConfigFileName = "ERP接口设置.ini"; + public const string DurationFileName = "执行周期设置.ini"; + public const string UpdateFileName = "自动更新设置.ini"; + + public const string WmsDbFileName = "Wms数据库设置.ini"; + + public const string CommonFileName = "通用设置.ini"; + public const string DataCenterDbFileName = "数据中心数据库设置.ini"; + public const string ExchangeCenterDbFileName = "交换中心数据库设置.ini"; + + + + private static DbSetting _dcDB; + private static DbSetting _ecDB; + + + + + private static DbSetting _scpDatabase; + private static DbSetting _appboxDatabase; + private static DbSetting _uniApiDatabase; + private static DbSetting _wmsDatabase; + + + + + + public static DbSetting DataCenterDB + { + get { return _dcDB ?? (_dcDB = GetConfigValues<DbSetting>(DataCenterDbFileName)); } + + set { _dcDB = value; } + } + + public static DbSetting ExchangeCenterDB + { + get { return _ecDB ?? (_ecDB = GetConfigValues<DbSetting>(ExchangeCenterDbFileName)); } + + set { _ecDB = value; } + } + + + + + + public static DbSetting ScpDatabase + { + get { return _scpDatabase ?? (_scpDatabase = GetConfigValues<DbSetting>(ScpDbFileName)); } + + set { _scpDatabase = value; } + } + + public static DbSetting AppBoxDatabase + { + get { return _appboxDatabase ?? (_appboxDatabase = GetConfigValues<DbSetting>(AppBoxDbFileName)); } + + set { _appboxDatabase = value; } + } + + public static DbSetting UniApiDatabase + { + get { return _uniApiDatabase ?? (_uniApiDatabase = GetConfigValues<DbSetting>(UniApiDbFileName)); } + + set { _uniApiDatabase = value; } + } + public static DbSetting WmsDatabase + { + get { return _wmsDatabase ?? (_wmsDatabase = GetConfigValues<DbSetting>(WmsDbFileName)); } + + set { _wmsDatabase = value; } + } + + + public static T GetConfigValues<T>(string filename) where T : new() + { + T t = new T(); + if (FileHelper.Exists(filename)) + { + t = JsonHelper.ReadConfigFromFile<T>(filename); + } + else + { + throw new Exception($"配置文件{filename}丢失,请重新配置"); + } + + return t; + } + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/Properties/AssemblyInfo.cs b/北京北汽/SCP/Models/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..ca3a552 --- /dev/null +++ b/北京北汽/SCP/Models/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("Model")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Model")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("74dce5f2-a501-45f2-b4f9-494aa1867226")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/北京北汽/SCP/Models/SCPException.cs b/北京北汽/SCP/Models/SCPException.cs new file mode 100644 index 0000000..dbc606c --- /dev/null +++ b/北京北汽/SCP/Models/SCPException.cs @@ -0,0 +1,50 @@ +using System; +using System.Text; +using CK.SCP.Models.Enums; +using CK.SCP.Utils; + +namespace CK.SCP.Models +{ + [Serializable] //声明为可序列化的 因为要写入文件中 + public class ScpException : ApplicationException //由用户程序引发,用于派生自定义的异常类型 + { + private const string SP = ";"; + // private ResultCode _code; + // private string _indexString; + public ResultCode Code { get; set; } + public string IndexString { get; set; } + + /// <summary> + /// 默认构造函数 + /// </summary> + public ScpException() + { + } + + public ScpException(ResultCode code, string indexString = null, string message = null, ScpException inner = null) + : base(message, inner) + { + Code = code; + IndexString = indexString; + } + + public ScpException(string message) + { +// throw new NotImplementedException(); + } + + // public WmsException(System.Runtime.Serialization.SerializationInfo info, + // System.Runtime.Serialization.StreamingContext context) : base(info, context) + // { + // _indexString = info.GetString(IndexString); + // } + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append(EnumHelper.GetDescription(Code) + SP); + sb.Append(IndexString + SP); + sb.Append(Message + SP); + return sb.ToString(); + } + } +} diff --git a/北京北汽/SCP/Models/ScpCache.cs b/北京北汽/SCP/Models/ScpCache.cs new file mode 100644 index 0000000..418392a --- /dev/null +++ b/北京北汽/SCP/Models/ScpCache.cs @@ -0,0 +1,322 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using CK.SCP.Models.AppBoxEntity; +using CK.SCP.Models.Enums; +using CK.SCP.Models.ScpEntity; +using CK.SCP.Utils; + +namespace CK.SCP.Models +{ + public static class ScpCache + { + private static readonly ScpEntities ScpDb = EntitiesFactory.CreateScpInstance(); + private static readonly AppBoxContext Db = EntitiesFactory.CreateAppBoxInstance(); + private static List<TA_VENDER> _vendList; + private static List<TA_PART> _PartList; + private static List<User> _usersList; + private static List<TB_RECEIVE> _ReceiveList; + private static List<TB_FACTORY> _FactoryList; + private static List<TA_REVICE_PORT> _PortList; + private static ScpConfig _config; + public static ScpConfig Config + + { + get { return _config ?? (_config = GetConfig(ScpDb)); } + set { _config = value; } + } + + private static ScpConfig GetConfig(ScpEntities db) + { + var config = new ScpConfig(); + var peroperties = config.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance); + var configList = GetDbConfigList(db); + foreach (var pi in peroperties) + { + var piName = pi.Name.ToUpper(); + foreach (var cfg in configList) + { + if (cfg.ParamName != piName) continue; + var value = ListHelper.ConvertToType(cfg.ParamValue, pi.PropertyType); + if (!pi.CanWrite) continue; + try + { + pi.SetValue(config, value, null); + break; + } + catch (Exception ex) + { + MessageHelper.ShowError(ex); + throw; + } + } + } + return config; + } + + private static void SetConfig(ScpEntities db, ScpConfig config) + { + + var peroperties = config.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance); + var configList = GetDbConfigList(db); + foreach (var pi in peroperties) + { + var piName = pi.Name.ToUpper(); + if (configList.Any(p => p.ParamName.ToUpper() == piName)) continue; + var cfg = new TA_CONFIG + { + ParamName = piName, + ParamValue = pi.GetValue(Config, null) ==null?"": pi.GetValue(Config, null).ToString(), + State = 1, + Remark = piName, + }; + db.TA_CONFIG.Add(cfg); + } + EntitiesFactory.SaveDb(db); + } + + public static List<TA_CONFIG> GetDbConfigList(ScpEntities db) + { + return db.TA_CONFIG.OrderByDescending(p => p.UID).ToList(); + } + public static void Refresh(ScpEntities db) + { + try + { + Config = GetConfig(db); + SetConfig(db, Config); + } + catch(Exception ex) + { + throw new Exception( + $"系统无法连接到{GlobalConfig.ScpDatabase.数据库类型}数据库:{GlobalConfig.ScpDatabase.服务器地址},请检查配置的服务器,数据库,用户名和密码等信息是否正确。"); + } + + } + public static string GetVendFax(string vendId) + { + return VenderList.SingleOrDefault(p => p.VendId == vendId)?.Fax ?? string.Empty; + } + public static List<TA_VENDER> GetVendNameList(List<string> p_list, string p_site) + { + + IQueryable<TA_VENDER> query = ScpDb.TA_VENDER; + if (p_list.Count > 0) + { + query = query.Where(p => p_list.Contains(p.VendId)); + } + if (!string.IsNullOrEmpty(p_site)) + { + query = query.Where(p => p.Site == p_site); + } + return query.ToList(); + + + + + } + + public static string GetVendPhone(string vendId) + { + return VenderList.SingleOrDefault(p => p.VendId == vendId)?.Phone ?? string.Empty; + } + + public static string GetVendName(string vendId) + { + return VenderList.SingleOrDefault(p => p.VendId == vendId)?.VendName ?? string.Empty; + } + public static string GetFactoryNameByCode(string p_factoryId) + { + return FactoryList.FirstOrDefault(p => p.FactoryId == p_factoryId)?.FactoryName ?? string.Empty; + } + public static string GetPartDesc(string wmsDataPartCode) + { + return ""; + } + public static string GetRevicePort(string p_code) + { + var _rev = PortList.SingleOrDefault(p => p.PORT_NO == p_code)?.PORT_DESCRIPTION ?? string.Empty; + return _rev; + } + + public static string GetVendFax(string vendId, string p_site) + { + return VenderList.SingleOrDefault(p => p.VendId == vendId && p.Site == p_site)?.Fax ?? string.Empty; + } + + public static string GetVendPhone(string vendId,string p_site) + { + return VenderList.SingleOrDefault(p => p.VendId == vendId && p.Site==p_site)?.Phone ?? string.Empty; + } + public static string GetVendName(string vendId,string p_site) + { + return VenderList.SingleOrDefault(p => p.VendId == vendId && p.Site==p_site)?.VendName ?? string.Empty; + } + public static string GetFactoryNameByCode(string p_factoryId,string p_site) + { + return FactoryList.SingleOrDefault(p => p.FactoryId == p_factoryId )?.FactoryName ?? string.Empty; + } + public static string GetPartDesc(string wmsDataPartCode,string p_site) + { + return ""; + } + public static string GetRevicePort(string p_code,string p_site) + { + var _rev = PortList.SingleOrDefault(p => p.PORT_NO == p_code)?.PORT_DESCRIPTION ?? string.Empty; + return _rev; + } + + public static string GetVendIDByUser(string name,string p_site) + { + return UsersList.SingleOrDefault(p => p.Name == name )?.SupplierCode ?? string.Empty; + } + public static string GetResourceByKey(string p_key,string p_languageType="CH") + { + string _str = p_key; + var _lag=LangauageList.Where(p => p.CH == p_key).FirstOrDefault(); + if (_lag != null) + { + switch (p_languageType) + { + case "EN": + _str = _lag.EN; + break; + case "DE": + _str = _lag.DE; + break; + } + } + return _str; + } + + public static DateTime GetServerTime() + { + return DateTime.Now; + } + public static List<TA_VENDER> VenderList + { + get + { + if (_vendList == null || _vendList.Count == 0) + { + _vendList = ScpDb.TA_VENDER.ToList(); + } + return _vendList; + } + set { _vendList = value; } + } + + + + + public static List<TA_REVICE_PORT> PortList + { + get + { + if (_PortList == null || _PortList.Count == 0) + { + _PortList = ScpDb.TA_REVICE_PORT.ToList(); + } + return _PortList; + } + set { _PortList = value; } + } + public static List<TB_FACTORY> FactoryList + { + get + { + + _FactoryList = ScpDb.TB_FACTORY.ToList(); + + return _FactoryList; + } + set { _FactoryList = value; } + } + + + private static List<TA_LANGUAGE> _LangauageList; + public static List<TA_LANGUAGE> LangauageList + { + get + { + if (_LangauageList == null || _LangauageList.Count == 0) + { + _LangauageList = ScpDb.TA_LANGUAGE.ToList(); + } + return _LangauageList; + } + + } + + + + + public static List<User> UsersList + { + get + { + if (_usersList == null || _usersList.Count == 0) + { + _usersList = Db.Users.ToList(); + } + return _usersList; + } + set { _usersList = value; } + } + public static List<TA_PART> PartList + { + get + { + if (_PartList == null || _PartList.Count == 0) + { + _PartList = ScpDb.TA_PART.ToList(); + } + return _PartList; + } + set { _PartList = value; } + } + public static string GetPartDesc1(string partCode) + { + var _ta = PartList.SingleOrDefault(p => p.PartCode == partCode); + if (_ta != null) + { + return _ta.PartDesc1 + _ta.PartDesc2; + } + return PartList.SingleOrDefault(p => p.PartCode == partCode )?.PartDesc1 ?? string.Empty+ PartList.SingleOrDefault(p => p.PartCode == partCode)?.PartDesc2 ?? string.Empty; + } + + + public static string GetPartDesc1(string partCode,string p_site) + { + var _ta = PartList.SingleOrDefault(p => p.PartCode == partCode && p.Site==p_site); + if (_ta != null) + { + return _ta.PartDesc1 + _ta.PartDesc2; + } + return PartList.SingleOrDefault(p => p.PartCode == partCode)?.PartDesc1 ?? string.Empty + PartList.SingleOrDefault(p => p.PartCode == partCode)?.PartDesc2 ?? string.Empty; + } + + + } + public class ScpConfig + { + public string QAD域 { get; set; } = "BJINTIER"; + public string QAD地点 { get; set; } = "BJCIAI"; + public string WMS接口数据流水号格式 { get; set; } = "yyMMdd_HHmmssffff"; + + public string 项目名称 { get; set; } = "锦恒项目"; + public string WMS用户名 { get; set; } = "W"; + + public string SCP用户名 { get; set; } = "SCP"; + public string SCP接口数据流水号格式 { get; set; } = "yyMMdd_HHmmssffff"; + + + public string 条码分隔符 { get; set; } = ".";//"1"; + public bool 条码包含供应商简称 { get; set; } = false; + + public string 二维码格式 { get; set; } = "1"; + public string 条码序列号格式 { get; set; } = "000000"; + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ScpEntities.cs b/北京北汽/SCP/Models/ScpEntities.cs new file mode 100644 index 0000000..40bfcde --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntities.cs @@ -0,0 +1,313 @@ +using System.Data.Entity; +using CK.SCP.Models.ScpEntity; + +namespace CK.SCP.Models +{ + + + public class SqlDbConfiguration : DbConfiguration + { + public SqlDbConfiguration() + { + this.SetManifestTokenResolver(new Sql2008ManifestTokenResolver()); + } + } + public class Sql2008ManifestTokenResolver : System.Data.Entity.Infrastructure.IManifestTokenResolver + { + public string ResolveManifestToken(System.Data.Common.DbConnection connection) + { + return "2008"; + } + } + + + public partial class ScpEntities : DbContext + { + public ScpEntities() + : base("name=ScpEntities") + { + this.Database.CommandTimeout = 120; + } + public ScpEntities(string strConn) + : base(strConn) + { + + } + + public virtual DbSet<TA_BILLTYPE> TA_BILLTYPE { get; set; } + public virtual DbSet<TA_CONFIG> TA_CONFIG { get; set; } + public virtual DbSet<TA_PART> TA_PART { get; set; } + public virtual DbSet<TB_PO_PLAN> TB_PO_PLAN { get; set; } + public virtual DbSet<TB_FACTORY> TB_FACTORY { get; set; } + public virtual DbSet<TA_VEND_PART> TA_VEND_PART { get; set; } + public virtual DbSet<TA_VENDER> TA_VENDER { get; set; } + public virtual DbSet<TB_ARRIVE> TB_ARRIVE { get; set; } + public virtual DbSet<TB_ARRIVE_DETAIL> TB_ARRIVE_DETAIL { get; set; } + public virtual DbSet<TB_INVOICE> TB_INVOICE { get; set; } + public virtual DbSet<TB_INVOICE_DETAIL> TB_INVOICE_DETAIL { get; set; } + public virtual DbSet<TB_RECEIVE> TB_RECEIVE { get; set; } + public virtual DbSet<TB_RECEIVE_DETAIL> TB_RECEIVE_DETAIL { get; set; } + public virtual DbSet<TB_REJECT> TB_REJECT { get; set; } + public virtual DbSet<TB_REJECT_DETAIL> TB_REJECT_DETAIL { get; set; } + public virtual DbSet<TA_FACTORY_CONFIG> TA_FACTORY_CONFIG { get; set; } + public virtual DbSet<TL_BASEDATA> TL_BASEDATA { get; set; } + public virtual DbSet<TL_BILL> TL_BILL { get; set; } + public virtual DbSet<TL_OPER> TL_OPER { get; set; } + public virtual DbSet<TS_BARCODE> TS_BARCODE { get; set; } + public virtual DbSet<TS_STOCK> TS_STOCK { get; set; } + public virtual DbSet<TS_UNI_API> TS_UNI_API { get; set; } + public virtual DbSet<TS_UNI_API_HIS> TS_UNI_API_HIS { get; set; } + public virtual DbSet<TT_CURRENCY> TT_CURRENCY { get; set; } + public virtual DbSet<TT_PROJECT> TT_PROJECT { get; set; } + public virtual DbSet<TT_UNIT> TT_UNIT { get; set; } + + public virtual DbSet<V_ReceiveReport> V_ReceiveReport { get; set; } + public virtual DbSet<V_PlanMonth> V_PlanMonth { get; set; } + public virtual DbSet<TB_PlanMonth> TB_PlanMonth { get; set; } + public virtual DbSet<V_Stock> V_Stock { get; set; } + public virtual DbSet<V_INFO> V_INFO { get; set; } + public virtual DbSet<TA_INFO> TA_Info { get; set; } + public virtual DbSet<TB_PublicData> TB_PublicData { get; set; } + public virtual DbSet<TA_BillNoType> TA_BillNoType { get; set; } + public virtual DbSet<TA_VEND_USER> TA_VEND_USER { get; set; } + public virtual DbSet<TA_Part_User> TA_Part_User { get; set; } + public virtual DbSet<TA_REVICE_PORT> TA_REVICE_PORT { get; set; } + public virtual DbSet<TB_PENING_ITEMS> TB_PENING_ITEMS { get; set; } + public virtual DbSet<TB_ASK> TB_ASK { get; set; } + public virtual DbSet<V_TB_ASK> V_TB_ASK { get; set; } + public virtual DbSet<TB_ASK_DETAIL> TB_ASK_DETAIL { get; set; } + public virtual DbSet<V_TB_ASK_DETAIL> V_TB_ASK_DETAIL { get; set; } + public virtual DbSet<TB_PO> TB_PO { get; set; } + public virtual DbSet<TB_PO_DETAIL> TB_PO_DETAIL { get; set; } + public virtual DbSet<TB_ASN> TB_ASN { get; set; } + public virtual DbSet<TB_ASN_DETAIL> TB_ASN_DETAIL { get; set; } + public virtual DbSet<TB_ADDRESS> TB_ADDRESS { get; set; } + public virtual DbSet<V_TB_PO> V_TB_PO { get; set; } + public virtual DbSet<V_TB_PO_DETAIL> V_TB_PO_DETAIL { get; set; } + public virtual DbSet<V_TB_PO_DETAIL_CQ> V_TB_PO_DETAIL_CQ { get; set; } + public virtual DbSet<V_TB_ASN> V_TB_ASN { get; set; } + public virtual DbSet<V_TB_ASN_DETAIL> V_TB_ASN_DETAIL { get; set; } + public virtual DbSet<TA_LANGUAGE> TA_LANGUAGE { get; set; } + public virtual DbSet<TA_LOGINNUMBER> TA_LOGINNUMBER { get; set; } + public virtual DbSet<TB_CONTRACT> TB_CONTRACT { get; set; } + public virtual DbSet<TB_CONTRACT_DETAIL> TB_CONTRACT_DETAIL { get; set; } + public virtual DbSet<TB_CONTRACT_DETAIL_PRICE> TB_CONTRACT_DETAIL_PRICE { get; set; } + public virtual DbSet<V_TB_RECEIVE> V_TB_RECEIVE { get; set; } + public virtual DbSet<V_TB_RECEIVE_DETAIL> V_TB_RECEIVE_DETAIL { get; set; } + public virtual DbSet<V_TB_ARRIVE> V_TB_ARRIVE { get; set; } + public virtual DbSet<V_TB_ARRIVE_DETAIL> V_TB_ARRIVE_DETAIL { get; set; } + public virtual DbSet<V_TB_REJECT> V_TB_REJECT { get; set; } + public virtual DbSet<V_TB_REJECT_DETAIL> V_TB_REJECT_DETAIL { get; set; } + public virtual DbSet<TS_BARCODE_RULE> TS_BARCODE_RULE { get; set; } + public virtual DbSet<V_TB_INVOICE_DETAIL> V_TB_INVOICE_DETAIL { get; set; } + public virtual DbSet<V_TB_INVOICE> V_TB_INVOICE { get; set; } + //public virtual DbSet<V_TB_INVOICE_DETAIL_RED> V_TB_INVOICE_DETAIL_RED { get; set; } + //public virtual DbSet<V_TB_INVOICE_RED> V_TB_INVOICE_RED { get; set; } + public virtual DbSet<V_TB_RECEIVE_LIST> V_TB_RECEIVE_LIST { get; set; } + public virtual DbSet<TB_PRINT_COUNT> TB_PRINT_COUNT { get; set; } + public virtual DbSet<V_TB_ASN_DETAIL_VIEW> V_TB_ASN_DETAIL_VIEW { get; set; } + //public virtual DbSet<xxqad_vd_mstr> xxqad_vd_mstr { get; set; } + public virtual DbSet<V_TA_VENDER> V_TA_VENDER { get; set; } + public virtual DbSet<V_TB_INCOMPLETE_ASK> V_TB_INCOMPLETE_ASK { get; set; } + public virtual DbSet<V_TB_INCOMOLETE_DETAIL> V_TB_INCOMOLETE_DETAIL { get; set; } + public virtual DbSet<V_TB_PALLET_DETAIL> V_TB_PALLET_DETAIL { get; set; } + public virtual DbSet<V_TB_PALLET> V_TB_PALLET { get; set; } + public virtual DbSet<TB_PALLET_DETAIL> TB_PALLET_DETAIL { get; set; } + public virtual DbSet<TB_PALLET> TB_PALLET { get; set; } + public virtual DbSet<TB_PALLETS> TB_PALLETS { get; set; } + public virtual DbSet<TB_QUALITY> TB_QUALITY { get; set; } + public virtual DbSet<V_TB_QUALITY> V_TB_QUALITY { get; set; } + public virtual DbSet<V_TB_RETURN> V_TB_RETURN { get; set; } + public virtual DbSet<TB_RETURN> TB_RETURN { get; set; } + public virtual DbSet<V_TB_INVOICE_ASK> V_TB_INVOICE_ASK { get; set; } + public virtual DbSet<V_TB_ASK_DETAIL_PACKAGE> V_TB_ASK_DETAIL_PACKAGE { get; set; } + public virtual DbSet<TS_BARCODE_RULE_CUSTOM> TS_BARCODE_RULE_CUSTOM { get; set; } + + public virtual DbSet<TS_BARCODE_CUSTOM> TS_BARCODE_CUSTOM { get; set; } + + public virtual DbSet<V_TA_VEND_PART> V_TA_VEND_PART { get; set; } + public virtual DbSet<TB_PRICE> TB_PRICE { get; set; } + public virtual DbSet<V_TB_PRICE> V_TB_PRICE { get; set; } + public virtual DbSet<V_TB_PRICE_TemporaryPrice> V_TB_PRICE_TemporaryPrice { get; set; } + public virtual DbSet<TB_FORECAST> TB_FORECAST { get; set; } + + public virtual DbSet<V_TB_PRICE_DETAIL> V_TB_PRICE_DETAIL { get; set; } + + public virtual DbSet<V_TB_FORECAST> V_TB_FORECAST { get; set; } + public virtual DbSet<TA_MOLDSHARING> TA_MoldSharing { get; set; } + public virtual DbSet<V_TA_MOLDSHARING> V_TA_MOLDSHARING { get; set; } + public virtual DbSet<TA_MOLDSHARING_INVOICE> TA_MoldSharing_Invoice { get; set; } + + + public virtual DbSet<TB_RECEIVE_QAD> TB_RECEIVE_QAD { get; set; } + public virtual DbSet<TB_RECEIVE_DETAIL_QAD> TB_RECEIVE_DETAIL_QAD { get; set; } + + + + public virtual DbSet<TM_HYANTOLIN_REVIEW> TM_HYANTOLIN_REVIEW { get; set; } + + public virtual DbSet<TB_CLAIM_APPEND> TB_CLAIM_APPEND { get; set; } + + public virtual DbSet<V_TM_HYANTOLIN_REVIEW> V_TM_HYANTOLIN_REVIEW { get; set; } + + public virtual DbSet<V_TB_PO_PLAN_DETAIL> V_TB_PO_PLAN_DETAIL { get; set; } + public virtual DbSet<TB_PO_PLAN_EXTEND> TB_PO_PLAN_EXTEND { get; set; } + + public virtual DbSet<V_TB_PO_PLAN_EXTEND> V_TB_PO_PLAN_EXTEND { get; set; } + + + + + public virtual DbSet<V_TB_ASK_RECEIVE> V_TB_ASK_RECEIVE { get; set; } + + public virtual DbSet<TB_ASK_RECEIVE> TB_ASK_RECEIVE { get; set; } + public virtual DbSet<TB_UNCOMPLETE_TEMPASK> TB_UNCOMPLETE_TEMPASK { get; set; } + + + protected override void OnModelCreating(DbModelBuilder modelBuilder) + { + modelBuilder.Entity<TA_REVICE_PORT>() + .Property(e => e.PORT_NO) + .IsUnicode(false); + modelBuilder.Entity<TA_BILLTYPE>() + .Property(e => e.Sep) + .IsUnicode(false); + modelBuilder.Entity<TA_PART>() + .Property(e => e.State) + .IsUnicode(false); + modelBuilder.Entity<TA_VEND_PART>() + .Property(e => e.VendPackQty) + .HasPrecision(18, 2); + modelBuilder.Entity<TB_PRICE>() + .Property(e => e.Amt) + .HasPrecision(18, 5); + modelBuilder.Entity<V_TB_PRICE>() + .Property(e => e.Amt) + .HasPrecision(18, 5); + modelBuilder.Entity<TA_VENDER>() + .Property(e => e.VendAbbCode) + .IsUnicode(false); + modelBuilder.Entity<V_TB_PO_DETAIL>() + .Property(e => e.PackQty) + .HasPrecision(19, 2); + modelBuilder.Entity<V_TB_PO_DETAIL>() + .Property(e => e.ReceivedQty) + .HasPrecision(19, 2); + modelBuilder.Entity<V_TB_ASK_DETAIL>() + .Property(e => e.PackQty) + .HasPrecision(19, 2); + modelBuilder.Entity<V_TB_ASK_DETAIL>() + .Property(e => e.AskQty) + .HasPrecision(19, 2); + modelBuilder.Entity<V_TB_ASN_DETAIL>() + .Property(e => e.PackQty) + .HasPrecision(19, 2); + modelBuilder.Entity<V_TB_ASN_DETAIL>() + .Property(e => e.Qty) + .HasPrecision(19, 2); + modelBuilder.Entity<TB_RECEIVE_DETAIL_QAD>() + .Property(e => e.StdCost) + .HasPrecision(18, 5); + modelBuilder.Entity<TB_RECEIVE_DETAIL_QAD>() + .Property(e => e.PurCost) + .HasPrecision(18, 5); + + + modelBuilder.Entity<TL_BASEDATA>() + .Property(e => e.LogType) + .IsUnicode(false); + + modelBuilder.Entity<TL_BASEDATA>() + .Property(e => e.DataType) + .IsUnicode(false); + + modelBuilder.Entity<TL_OPER>() + .Property(e => e.LogType) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.BarCode) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.FullBarCode) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.PartCode) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.VendPartCode) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.Batch) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.ProduceDate) + .HasPrecision(3); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.SerialNum) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.Qty) + .HasPrecision(19, 2); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.BillNum) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.VendId) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.PackQty) + .HasPrecision(19, 2); + + modelBuilder.Entity<TS_STOCK>() + .Property(e => e.Qty) + .HasPrecision(19, 2); + + modelBuilder.Entity<TS_UNI_API>() + .Property(e => e.Qty) + .HasPrecision(18, 2); + + + + modelBuilder.Entity<TS_UNI_API>() + .Property(e => e.Qty) + .HasPrecision(18,5); + + modelBuilder.Entity<TS_UNI_API_HIS>() + .Property(e => e.Qty) + .HasPrecision(18, 2); + modelBuilder.Entity<TS_UNI_API>() + .Property(e => e.Price) + .HasPrecision(18, 5); + modelBuilder.Entity<TS_UNI_API>() + .Property(e => e.TaxAmt) + .HasPrecision(18, 5); + modelBuilder.Entity<TS_UNI_API>() + .Property(e => e.Tax) + .HasPrecision(18, 2); + modelBuilder.Entity<TS_UNI_API>() + .Property(e => e.PackQty) + .HasPrecision(18, 5); + + + + modelBuilder.Entity<TB_RECEIVE_DETAIL_QAD>() + .Property(e => e.Rate) + .HasPrecision(18, 5); + modelBuilder.Entity<TB_RECEIVE_DETAIL_QAD>() + .Property(e => e.CurAmt) + .HasPrecision(18, 5); + + } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/EntityCondition.cs b/北京北汽/SCP/Models/ScpEntity/EntityCondition.cs new file mode 100644 index 0000000..f0c0ad2 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/EntityCondition.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + +} diff --git a/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_ARRIVE_DETAIL_EXPORT.cs b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_ARRIVE_DETAIL_EXPORT.cs new file mode 100644 index 0000000..a062364 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_ARRIVE_DETAIL_EXPORT.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity +{ + public class SCP_ARRIVE_DETAIL_EXPORT + { + public string 单据号 { get; set; } //"ArrvBillNum" + public string 发货单号 { get; set; } //"AsnBillNum" + public string 订单号 { get; set; } //"PoBillNum" + public string 订单行 { get; set; }//"PoLine" + public string 零件号 { get; set; } //"PartCode" + public string 零件名称 { get; set; } //"PartDesc1" + public string 单位 { get; set; } //"Unit" + public string 数量 { get; set; } //"Qty" + public string 时间 { get; set; } //"ShipTime" + public string 备注 { get; set; } //"Remark" + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_ARRIVE_EXPORT.cs b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_ARRIVE_EXPORT.cs new file mode 100644 index 0000000..3abf88e --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_ARRIVE_EXPORT.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity +{ + public class SCP_ARRIVE_EXPORT + { + public string 状态 { get; set; } //"State_DESC" + public string 单据类型 { get; set; } //"BillType_DESC" + public string 到货单号 { get; set; } //"ArrvBillNum" + public string 发货单号 { get; set; }//"AsnBillNum" + public string 要货看板号 { get; set; } //"AskBillNum" + public string 订单号 { get; set; } //"PoBillNum" + public string 供应商 { get; set; } //"VendName" + public string 供应商编码 { get; set; } //"VendId" + public string 地点 { get; set; } //"SubSite" + public string 地点名称 { get; set; } //"Site_Desc" + public string 到货日期 { get; set; } //"ShipTime" + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_ASK_DETAIL_EXPORT.cs b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_ASK_DETAIL_EXPORT.cs new file mode 100644 index 0000000..d930460 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_ASK_DETAIL_EXPORT.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity +{ + public class SCP_ASK_DETAIL_EXPORT + { + //public string 状态 {get;set;} //"State" + public string 要货单号 { get; set; } //"AskBillNum" + public string 行号 {get;set;} //"PoLine" + public string 零件名称 {get;set;} //"PartDesc1" + public string 零件号 {get;set;} //"PartCode" + public string 单位 {get;set;} //"PoUnit" + public string 标包数量 {get;set;} //"PackQty" + public string 币种 { get; set; } //"CurrencyDesc" + public string 价格 { get; set; } //"Price" + public string 要货数量 {get;set;} //"AskQty" + public string 说明 { get; set; } //"ReMark" + public string 供应商 { get; set; } + public string 订货日期 { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_ASK_EXPORT.cs b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_ASK_EXPORT.cs new file mode 100644 index 0000000..7e42212 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_ASK_EXPORT.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity +{ + public class SCP_ASK_EXPORT + { + public string 状态 { get; set; }//"State_DESC" + public string 单据类型 { get; set; }//"ModType_DESC + public string 要货单号 { get; set; }// "AskBillNum" + public string 订单号 { get; set; }// "PoBillNum" + public string ERP订单号 { get; set; }// "ErpBillNum" + public string 供应商 { get; set; }// "VendName" + public string 发布人 { get; set; }// "Contacter" + public string 订货日期 { get; set; }// "BeginTime" + public string 到货日期 { get; set; }// "EndTime" + public string 地点 { get; set; }// "Site_Desc" + public string 收货人 { get; set; }// "Buyer" + public string 收货电话 { get; set; }//"BuyerPhone" + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_ASN_DETAIL_EXPORT.cs b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_ASN_DETAIL_EXPORT.cs new file mode 100644 index 0000000..7ddce59 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_ASN_DETAIL_EXPORT.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity +{ + public class SCP_ASN_DETAIL_EXPORT + { + + public string 发货单号 { get; set; } //"AsnBillNum" + public string 标包数量 { get; set; }//"PackQty" + public string 发货数量 {get;set;} //"Qty" + public string 零件编号 {get;set;} //"PartCode" + public string 零件名称 {get;set;} //"PartDesc1" + public string 币种 {get;set;} //"CurrencyDesc" + public string 批次 {get;set;} //"Batch" + public string 供应商批次{get;set;} //"VendBatch" + public string 生产日期 {get;set;} //"ProduceDate" + public string 单位 {get;set;} //"PoUnit" + public string 价格 {get;set; } //"Price" + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_ASN_EXPORT.cs b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_ASN_EXPORT.cs new file mode 100644 index 0000000..a516c4e --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_ASN_EXPORT.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity +{ + public class SCP_ASN_EXPORT + { + public string 状态 {get;set;} //"State_DESC" + public string 发货单号{get;set;} //"AsnBillNum" + public string 车牌号 {get;set;} //"PlateNumber" + public string 供应商 {get;set;}//"VendName" + public string 订单号 {get;set;} //"PoBillNum" + public string 发货时间{get;set;} //"ShipTime" + public string 发货人 {get;set;} //"ShipUser" + public string 收货时间{get;set;} //"ReceiveTime" + public string 收货人 {get;set;} //"ReceiveUser" + public string 发往地点{get;set;} //"Site_Desc" + public string 备注 {get;set;} //"Remark" + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_FORECAST_EXPORT.cs b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_FORECAST_EXPORT.cs new file mode 100644 index 0000000..548d418 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_FORECAST_EXPORT.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity +{ + public class SCP_FORECAST_EXPORT + { + public string 零件编号 { get; set; } + public string 月份 { get; set; } + public string 预测1 { get; set; } + public string 预测2 { get; set; } + public string 预测3 { get; set; } + public string 供应商编码 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_INVOICE_DETAIL_EXPORT.cs b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_INVOICE_DETAIL_EXPORT.cs new file mode 100644 index 0000000..372f792 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_INVOICE_DETAIL_EXPORT.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity +{ + public class SCP_INVOICE_DETAIL_EXPORT + { + public string 发票编号 { set; get; } + public string 金税票号 { set; get; } + public string 项目编号 { get; set; } + public string 订单号 { get; set; }//PoBillNum + public string 订单行 { get; set; }//PoLineNum + public string 发货单 { get; set; }//AsnBillNum + public string 零件号 { get; set; }//PoBillNum + public string 零件名称 { get; set; }//PartDesc1 + + public string 币种 { get; set; }//Currency + public string 单价 { get; set; }//Price + public string 要货日期 { get; set; }//BeginTime + public string 折扣价格 { get; set; }//DiscountPrice + public string 折扣备注 { get; set; }//DiscountRemark + public string 开票数量 { get; set; }//Qty + public string 备注 { get; set; }//Remark + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_INVOICE_EXPORT.cs b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_INVOICE_EXPORT.cs new file mode 100644 index 0000000..8053372 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_INVOICE_EXPORT.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity +{ + public class SCP_INVOICE_EXPORT + { + + public string 状态 {get;set;}// "State_DESC", + public string 发票单号 { get;set; }// "InvcBillNum + public string 金税票号 { get;set; }// "InvoiceNum", + public string 供应商 { get;set; }// "VendName", + public string 金额 { get;set; }// "Amount", + public string 税率 { get;set; }// "Tax", + public string 税额 { get;set; }// "TaxAmount", + public string 折扣金额 { get;set; }// "ContractPrice", + public string 税额调整 { get;set; }// "BlancePrice", + public string 开票金额 { get;set; }// "Total", + public string 创建时间 { get; set; }// "CreateTime", + public string 快递单号 { get; set; }// "ExpressNum", + public string 备注 { get; set; } // "Remark", + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_MOLDSHARING_EXPORT.cs b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_MOLDSHARING_EXPORT.cs new file mode 100644 index 0000000..8375216 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_MOLDSHARING_EXPORT.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity +{ + public class SCP_MOLDSHARING_EXPORT + { + public string 供应商编码 { get; set; } + public string 零件编码 { get; set; } + public string 价格 { get; set; } + public string 分摊数量 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_PALLET_EXPORT.cs b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_PALLET_EXPORT.cs new file mode 100644 index 0000000..82bb3f2 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_PALLET_EXPORT.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity +{ + public class SCP_PALLET_EXPORT + { + public string 订单号 { get; set; } //"PoBillNum" + public string 发货单号 { get; set; } //"AsnBillNum" + public string 托盘号 { get; set; } //"PlateNumber" + public string 托盘名 { get; set; } + public string 供应商 { get; set; }//"VendName" + public string 数量 { get; set; } + public string 零件名称 { get; set; } + public string 零件编号 { get; set; } + public string 包装数量 { get; set; } + public string 单位 { get; set; } + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_PART_EXPORT.cs b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_PART_EXPORT.cs new file mode 100644 index 0000000..ced653a --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_PART_EXPORT.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity +{ + public class SCP_PART_EXPORT + { + public string 零件编号 { get; set; } + public string 零件名称 { get; set; } + public string 项目编号 { get; set; } + public string 单位 { get; set; } + public string 状态 { get; set; } + public string 域 { get; set; } + public string 备注 { get; set; } + public string 零件类型 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_PO_DETAIL_EXPORT.cs b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_PO_DETAIL_EXPORT.cs new file mode 100644 index 0000000..4a77e1d --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_PO_DETAIL_EXPORT.cs @@ -0,0 +1,108 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity +{ + public class SCP_PO_DETAIL_EXPORT + { + + public string 状态 { get; set; } //State_DESC + public string 订单编号 { get; set; } //PoBillNum + public string 行号 { get; set; } //PoLine + public string 零件名 { get; set; } //PartDesc1" + public string 零件编 { get; set; } //PartCode + public string 订单数 { get; set; } //PlanQty" + public string 已要数 { get; set; } //TempQty" + public string 发货数 { get; set; } //ShippedQty" + public string 收货数 { get; set; } //ReceivedQty" + public string 退货数 { get; set; } //RejectQty" + public string 到货日期 { get; set; } //EndTime" + public string 单位 {get;set; } //PoUnit" + public string 供应商名称 { get; set; } + public string 供应商编码 { get; set; } + + } + public class SCP_PO_DETAIL_EXPORT_MODEL + { + public string 项目编号 { get; set; } + public string 订单编号 { get; set; } //PoBillNum + public string 行号 { get; set; } //PoLine + public string 零件名 { get; set; } //PartDesc1" + public string 零件编码 { get; set; } //PartCode + public string 供应商 { get; set; } //PartDesc1" + public string 供应商编码 { get; set; } //PartCode + public string 订单数 { get; set; } //PlanQty" + public string 订货日期 { set; get; } + public string 到货日期 { get; set; } //EndTime" + public string 单位 { get; set; } //PoUnit" + public string 计划员 { get; set; } + public string 计划员电话 { get; set; } + public string 价格 { set; get; } + public string 币种 { set; get; } + public string 域名 { get; set; } //PoUnit" + public string 地点 { get; set; } + public string 收货口 { get; set; } + + + public string 备注 { get; set; } + + + + + + + + + + + + + + + + + + + + } + public class SCP_PO_EXPORT_IMPORT_MODEL + { + public string 地点 { get; set; } + public string 域 { get; set; } + public string 订单编号 { get; set; } + public string 行号 { get; set; } + public string 零件号 { get; set; } + public string 数量 { get; set; } + public string 单位 { get; set; } + public string 单价 { get; set; } + public string 供应商编号 { get; set; } + public string 订单创建时间 { set; get; } + public string 联系人 { get; set; } + public string 采购员 { get; set; } + public string 采购员电话 { get; set; } + public string 要求到货日期 { get; set; } + public string 备注 { get; set; } + public string 币种 { set; get; } + public string 订单类型 { get; set; } + public string 税率 { get; set; } + public string 加工单号 { get; set; } + public string 工序 { get; set; } + public string 库位 { get; set; } + public string 固定天数 { get; set; } + public string 日程天数 { get; set; } + public string 日程周数 { get; set; } + public string 日程月数 { get; set; } + public string 供应商零件 { get; set; } + public string 发货样式 { get; set; } + public string 发货时间样式 { get; set; } + public string 运输周期 { get; set; } + public string 零件开始时间 { get; set; } + public string 零件截至日期 { get; set; } + public string 订单开始时间 { get; set; } + public string 订单截至日期 { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_PO_EXPORT.cs b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_PO_EXPORT.cs new file mode 100644 index 0000000..93a3bb8 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_PO_EXPORT.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity +{ + public class SCP_PO_EXPORT + { + public string 状态 {get;set;}// "State_DESC", + public string 订单类型 {get;set;}// "ModType_DESC + public string 订单编号 {get;set;}// "PoBillNum", + public string Erp订单编号{get;set;}// "ErpBillNum", + public string 供应商编码 {get;set;}// "VendId", + public string 供应商名称 {get;set;}// "VendName", + public string 订货日期 {get;set;}// "BeginTime", + public string 收货地点 {get;set;}// "Site", + public string 收货人 {get;set;}// "Buyer", + public string 收货人电话 {get;set;}// "BuyerPhone", + public string 备注 { get; set; } // "Remark", + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_PO_REPORT.cs b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_PO_REPORT.cs new file mode 100644 index 0000000..7959376 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_PO_REPORT.cs @@ -0,0 +1,112 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity +{ + public class SCP_PO_REPORT + { + public string PoBillNum { get; set; } + public string AskBillNum { get; set; } + + public string VendId { get; set; } + + public string Remark { get; set; } + + + public string VendName { get; set; } + + public string VendAddress { get; set; } + + + public string Site_Desc { get; set; } + + public string SubSite { get; set; } + + + public string TotalPrice { get; set; } + + public string AuditTime { get; set; } + + public string Auditor { get; set; } + + public String VendPhone { get; set; } + + public String ContectPhone { get; set; } + + public string FactoryName { get; set; } + public string MaterialPlanner { get; set; } + + + + } + public class SCP_PO_REPORT_DETAIL + { + + public string SubTotal { set; get; } + + + public string PoBillNum { get; set; } + public int PoLine { get; set; } + + public string PartCode { get; set; } + + public string VendPartCode { get; set; } + + public decimal? ShippedQty { get; set; } + public decimal ReceivedQty { get; set; } + + public decimal RejectQty { get; set; } + + public decimal ArriveQty { get; set; } + + public decimal InvoiceQty { get; set; } + + public decimal OnRoadQty { get; set; } + public DateTime BeginTime { get; set; } + public DateTime EndTime { get; set; } + + public string PoUnit { get; set; } + + public string LocUnit { get; set; } + public decimal Price { get; set; } + + public string Currency { get; set; } + public decimal PackQty { get; set; } + public decimal UnConv { get; set; } + + public string DockCode { get; set; } + public int State { get; set; } + + public string Remark { get; set; } + + + public string PartDesc1 { get; set; } + + public string CurrencyDesc { get; set; } + + public string Site { get; set; } + + + public string PartDesc2 { get; set; } + + + public string AskBillNum { get; set; } + public decimal AskQty { get; set; } + + public string VendId { get; set; } + public string ReceivedPort { get; set; } + public string ReceivedPort_Desc { get; set; } + + + public decimal? ReduceQty { get; set; } + + public string SubSite { get; set; } + + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_PRICE_EXPORT.cs b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_PRICE_EXPORT.cs new file mode 100644 index 0000000..f543b02 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_PRICE_EXPORT.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity +{ + public class SCP_PRICE_EXPORT + { + public string 状态 { get; set; } + public string 标识 { get; set; } + public string 供应商编号 { get; set; } + public string 零件编码 { get; set; } + public string 开始时间 { get; set; } + public string 结束时间 { get; set; } + public string 币种 { get; set; } + public string 单位 { get; set; } + public string 备注 { get; set; } + public string 零件基础价格 { get; set; } + public string 域 { get; set; } + public string 地点 { get; set; } + public string 累计分摊价格 { get; set; } + public string 累计分摊数量 { get; set; } + public string 是否临时价格 { get; set; } + public string 零件最新价格 { get; set; } + public string 最新开始时间 { get; set; } + public string 最新结束时间 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_VENDER_EXPORT.cs b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_VENDER_EXPORT.cs new file mode 100644 index 0000000..f9f67b2 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_VENDER_EXPORT.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity +{ + public class SCP_VENDER_EXPORT + { + public string 供应商编号 { get; set; } + public string 供应商名称 { get; set; } + public string 供应商缩写 { get; set; } + public string 供应商类型 { get; set; } + public string 国家 { get; set; } + public string 城市 { get; set; } + public string 币种 { get; set; } + public string 地址 { get; set; } + public string 邮编 { get; set; } + public string 联系人 { get; set; } + public string 电话 { get; set; } + public string 传真 { get; set; } + public string 电子邮件 { get; set; } + public string 状态 { get; set; } + public string 备注 { get; set; } + public string 税率 { get; set; } + public string 域 { get; set; } + public string 收货地址 { get; set; } + public string 收货人信息 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_VENDER_PART_EXPORT.cs b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_VENDER_PART_EXPORT.cs new file mode 100644 index 0000000..f76a9bb --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/ExcelExportEnttity/SCP_VENDER_PART_EXPORT.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity +{ + public class SCP_VENDER_PART_EXPORT + { + + public string 供应商代码{ get; set; } + public string 零件号 { get; set; } + public string 零件名称 { get; set; } + public string 供应商零件号{ get; set; } + public string 标包数 { get; set; } + public string 单位 { get; set; } + public string 小包装数 { get; set; } + public string 托盘包装数 { get; set; } + public string 域 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/ExcelImportEntity/SCP_ASN_EXCEL.cs b/北京北汽/SCP/Models/ScpEntity/ExcelImportEntity/SCP_ASN_EXCEL.cs new file mode 100644 index 0000000..4788d61 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/ExcelImportEntity/SCP_ASN_EXCEL.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity.ExcelImportEntity +{ + public class SCP_ASN_EXCEL + { + public string 采购订单号 { get; set; } + public string 收货单号 { get; set; } + public string 零件编号 { get; set; } + public string 行号 { get; set; } + public string 供应商编码 { get; set; } + public string 批次 { get; set; } + public string 供应商批次 { get; set; } + public string 数量 { get; set; } + public string 单位 { get; set; } + public string 标包数 { get; set; } + public string 价格 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/ExcelImportEntity/SCP_CONTRACT_EXCEL.cs b/北京北汽/SCP/Models/ScpEntity/ExcelImportEntity/SCP_CONTRACT_EXCEL.cs new file mode 100644 index 0000000..d2792d4 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/ExcelImportEntity/SCP_CONTRACT_EXCEL.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity.ExcelImportEntity +{ + public class SCP_CONTRACT_EXCEL + { + public string 合同编号 {set;get;} + public string 类型 {set;get;} + public string 供应商代码 {set;get;} + public string 供应商名称 {set;get;} + public string 供应商物料号 {set;get;} + public string 物料描述 {set;get;} + public string 单位 {set;get;} + public string 开始日期 {set;get;} + public string 结束日期 {set;get;} + public string 最小起订量1 {set;get;} + public string 价格1 {set;get;} + public string 最小起订量2 {set;get;} + public string 价格2 {set;get;} + public string 最小起订量3 {set;get;} + public string 价格3 {set;get;} + public string 最小起订量4 {set;get;} + public string 价格4 { set; get; } + + + + } + + public class SCP_CONTRACT_EXCEL_COMPARE: IEqualityComparer<SCP_CONTRACT_EXCEL> + { + public bool Equals(SCP_CONTRACT_EXCEL x, SCP_CONTRACT_EXCEL y) + { + return x.供应商物料号 == y.供应商物料号 && x.物料描述 == y.物料描述; + } + + public int GetHashCode(SCP_CONTRACT_EXCEL obj) + { + return obj.合同编号.GetHashCode(); + } + } + + +} diff --git a/北京北汽/SCP/Models/ScpEntity/ExcelImportEntity/SCP_PO_EXCEL.cs b/北京北汽/SCP/Models/ScpEntity/ExcelImportEntity/SCP_PO_EXCEL.cs new file mode 100644 index 0000000..e2a1830 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/ExcelImportEntity/SCP_PO_EXCEL.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity.ExcelImportEntity +{ + + + + public class SCP_PO_EXCEL + { + public string 分组编号 {set;get;} + public string QAD订单号 {set;get;} + public string 行号 { set; get; } + public string 供应商编号 {set;get;} + public string 图号 {set;get;} + public string 订货日期 {set;get;} + public string 要求到货日期 {set;get;} + public string 零件号 {set;get;} + public string 产品名称 {set;get;} + public string 要货地点 {set;get;} + public string 交货联系人 {set;get;} + public string 交货联系人电话 {set;get;} + public string 数量 {set;get;} + public string 单位 {set;get;} + public string 价格 { set; get; } + public string 币种 {set;get;} + //public string 是否免费 {set;get;} + //public string 是否批量 {set;get;} + //public string 是否紧急要货 {set;get;} + + + + + } + public class SCP_PO_DETAIL_IMPORT_MODEL + { + + public string 订单编号 { get; set; } //PoBillNum + public string 行号 { get; set; } //PoLine + public string 零件名 { get; set; } //PartDesc1" + public string 零件编 { get; set; } //PartCode + public string 订单数 { get; set; } //PlanQty" + public string 到货日期 { get; set; } //EndTime" + public string 单位 { get; set; } //PoUnit" + public string 域名 { get; set; } //PoUnit" + public string 站点 { get; set; } + } + +} diff --git a/北京北汽/SCP/Models/ScpEntity/ExcelImportEntity/SCP_PRICE_EXCEL.cs b/北京北汽/SCP/Models/ScpEntity/ExcelImportEntity/SCP_PRICE_EXCEL.cs new file mode 100644 index 0000000..b9601df --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/ExcelImportEntity/SCP_PRICE_EXCEL.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity.ExcelImportEntity +{ + public class SCP_PRICE_EXCEL + { + public string 供应商编码 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/QadOrder.cs b/北京北汽/SCP/Models/ScpEntity/QadOrder.cs new file mode 100644 index 0000000..fa3b2b8 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/QadOrder.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public class QadOrder + { + [Key] + public decimal ID { get; set; } + + [StringLength(50)] + public string BillNo { get; set; } + + [StringLength(50)] + public string SupplierCode { get; set; } + + public DateTime StartDate { get; set; } + + public DateTime EndDate { get; set; } + + + [StringLength(50)] + public string Address { get; set; } + + + [StringLength(50)] + public string ProductCode { get; set; } + + + public decimal Qty { get; set; } + + + [StringLength(50)] + public string PartName { get; set; } + + + [StringLength(50)] + public string VendName { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/RecordEntity.cs b/北京北汽/SCP/Models/ScpEntity/RecordEntity.cs new file mode 100644 index 0000000..8d4dee7 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/RecordEntity.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + [Serializable] + public class RecordEntity + { + public RecordEntity() + { + UserInAddress = new List<string>(); + UserInVendIds = new List<string>(); + BillStateList = new List<int>(); + } + public System.DateTime CreateTime { get; set; } + + [StringLength(50)] + public string CreateUser { get; set; } + public Nullable<System.DateTime> UpdateTime { get; set; } + [StringLength(50)] + public string UpdateUser { get; set; } + [StringLength(50)] + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + public System.Guid GUID { get; set; } + [NotMapped] + public List<string> UserInAddress { set; get; } + [NotMapped] + public List<string> UserInSubSite { set; get; } + + [NotMapped] + public List<string> UserInVendIds { set; get; } + + + [NotMapped] + public List<int> BillStateList { set; get; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/SCP_OTD_EXPORT.cs b/北京北汽/SCP/Models/ScpEntity/SCP_OTD_EXPORT.cs new file mode 100644 index 0000000..ec2fecb --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/SCP_OTD_EXPORT.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public class InvoiceCreateQueryParm + { + public string ReceiveID { set; get; } + public string VendId { set; get; } + public string Modify { set; get; } + public string IsAll { set; get; } + public string Tax { set; get; } + public string CJ { set; get; } + public string TZ { set; get; } + + + } + public class SCP_OTD_EXPORT + { + public string VendId { get; set; } //供应商编号 + public string VendName { get; set; }//供应商名称 + public string PartCode { get; set; } //零件号 + public string PartName { get; set; } //零件名 + public decimal ArriveQty { get; set; } //到货数量 + public decimal AskQty { get; set; } //订单要货数量 + public decimal Qty { get; set; }//差额 + public decimal NntimelyQty { get; set; } //不及时数量 + public decimal OTD { get; set; } // + public decimal ArriveOTD { get; set; }//到货率 + public Nullable<System.DateTime> BeginTime { get; set; }//开始时间 + public Nullable<System.DateTime> EndTime { get; set; } //结束时间 + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/SCP_SQE.cs b/北京北汽/SCP/Models/ScpEntity/SCP_SQE.cs new file mode 100644 index 0000000..3ca4dd0 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/SCP_SQE.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public class SCP_TB_SQE + { + public string VendName + { set; get; } + public string VendId + { set; get; } + public decimal FailQty { get; set; } + public decimal RecQty { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TA_BILLTYPE.cs b/北京北汽/SCP/Models/ScpEntity/TA_BILLTYPE.cs new file mode 100644 index 0000000..f4b17ce --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TA_BILLTYPE.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TA_BILLTYPE + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int BillType { get; set; } + + [Required] + [StringLength(50)] + public string TypeName { get; set; } + + [Required] + [StringLength(50)] + public string TypeDesc { get; set; } + + public int State { get; set; } + + [Required] + [StringLength(50)] + public string Prefix { get; set; } + + [Required] + [StringLength(500)] + public string BillNumRule { get; set; } + + public int LastNumber { get; set; } + + [StringLength(50)] + public string LastBillNum { get; set; } + + public DateTime LastBillTime { get; set; } + + [StringLength(500)] + public string PrintTemplateFileName { get; set; } + + [StringLength(500)] + public string ImportTemplateFileName { get; set; } + + [StringLength(50)] + public string Sep { get; set; } + + public int PaperOrientation { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TA_BillNoType.cs b/北京北汽/SCP/Models/ScpEntity/TA_BillNoType.cs new file mode 100644 index 0000000..04fe0de --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TA_BillNoType.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public class TA_BillNoType + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int ID { get; set; } + + public int? sYear { get; set; } + public int? sMonth { get; set; } + public int? sDay { get; set; } + public int? sValue { get; set; } + + [StringLength(50)] + public string Prefix { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TA_CONFIG.cs b/北京北汽/SCP/Models/ScpEntity/TA_CONFIG.cs new file mode 100644 index 0000000..cce6416 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TA_CONFIG.cs @@ -0,0 +1,24 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TA_CONFIG + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string ParamName { get; set; } + + [Required] + [StringLength(50)] + public string ParamValue { get; set; } + + public int? State { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TA_FACTORY_CONFIG.cs b/北京北汽/SCP/Models/ScpEntity/TA_FACTORY_CONFIG.cs new file mode 100644 index 0000000..8d6bca7 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TA_FACTORY_CONFIG.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class TA_FACTORY_CONFIG + { + [Key] + public long UID { get; set; } + public string FactoryId { get; set; } + public int ConfigId { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TA_Info.cs b/北京北汽/SCP/Models/ScpEntity/TA_Info.cs new file mode 100644 index 0000000..bf17706 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TA_Info.cs @@ -0,0 +1,42 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class TA_INFO + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int ID { get; set; } + + + [StringLength(50)] + public string FactoryCode { get; set; } + + [StringLength(50)] + public string InfoType { get; set; } + + public string SupplierCode { get; set; } + public string SupplierName { get; set; } + [StringLength(50)] + public string Title { get; set; } + + + public string Content { get; set; } + + public DateTime AddTime { get; set; } + + [StringLength(500)] + public string UserName { get; set; } + + [StringLength(50)] + public string Enable { get; set; } + + public DateTime ReadTime { get; set; } + [StringLength(50)] + public string FileName { get; set; } + [StringLength(50)] + public string FileNameMD5 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TA_LANGUAGE.cs b/北京北汽/SCP/Models/ScpEntity/TA_LANGUAGE.cs new file mode 100644 index 0000000..494c646 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TA_LANGUAGE.cs @@ -0,0 +1,37 @@ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + + public partial class TA_LANGUAGE + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [StringLength(200)] + public string GUID { get; set; } + [StringLength(200)] + public string CH { get; set; } + [StringLength(200)] + public string EN { get; set; } + [StringLength(200)] + public string RU { get; set; } + [StringLength(200)] + public string DE { get; set; } + [StringLength(200)] + public string FR { get; set; } + [StringLength(200)] + public string EL { get; set; } + [StringLength(200)] + public string AR { get; set; } + [StringLength(200)] + public string JP { get; set; } + + public bool IsDeleted { get; set; } + } + +} diff --git a/北京北汽/SCP/Models/ScpEntity/TA_LOGINNUMBER.cs b/北京北汽/SCP/Models/ScpEntity/TA_LOGINNUMBER.cs new file mode 100644 index 0000000..4e7c2f8 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TA_LOGINNUMBER.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TA_LOGINNUMBER + { + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [Key] + public string Name { get; set; } + + public string Time { get; set; } + public int Number { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TA_MOLDSHARING_INVOICE.cs b/北京北汽/SCP/Models/ScpEntity/TA_MOLDSHARING_INVOICE.cs new file mode 100644 index 0000000..9fddca5 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TA_MOLDSHARING_INVOICE.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public class TA_MOLDSHARING_INVOICE + { + [Key] + public long UID { set; get; } + public long MoldSharingId { set; get; } + [Required, StringLength(50)] + public string InvcBillNum { set; get; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TA_MoldSharing.cs b/北京北汽/SCP/Models/ScpEntity/TA_MoldSharing.cs new file mode 100644 index 0000000..b1f6813 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TA_MoldSharing.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TA_MOLDSHARING + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + public long UID { get; set; } + [StringLength(50)] + public string VendId { get; set; } + [StringLength(50)] + public string PartCode { get; set; } + [StringLength(50)] + public string Site { get; set; } + public System.DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public Nullable<System.DateTime> UpdateTime { get; set; } + [StringLength(50)] + public string UpdateUser { get; set; } + public decimal? Qty { get; set; } + public decimal? Count { get; set; } + [Column(TypeName = "money")] + public decimal? Price { get; set; } + [Column(TypeName = "money")] + public decimal? TotalPrice { get; set; } + public bool IsDeleted { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TA_PART.cs b/北京北汽/SCP/Models/ScpEntity/TA_PART.cs new file mode 100644 index 0000000..7549f8b --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TA_PART.cs @@ -0,0 +1,74 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TA_PART + { + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + [Key] + [Column(Order =0)] + [StringLength(50)] + public string PartCode { get; set; } + + [Required] + [StringLength(50)] + public string ErpPartCode { get; set; } + +// [Required] + public string PartDesc1 { get; set; } + +// [Required] + public string PartDesc2 { get; set; } + +// [Required] + [StringLength(50)] + public string ProjectId { get; set; } + + [Required] + [StringLength(50)] + public string Unit { get; set; } + +// [Required] + [StringLength(50)] + public string PartGroup { get; set; } + + [Required] + [StringLength(10)] + public string State { get; set; } + + [StringLength(100)] + public string Configuration { get; set; } + + public int ValidityDays { get; set; } + + [StringLength(50)] + public string ReceivePort { get; set; } + + [StringLength(50)] + public string PalletSize { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + [Key] + [Column(Order =1)] + [StringLength(50)] + public string Site { get; set; } + + + public string Qlevel{ get; set; } + + public bool? Ischeck { get; set; } + [NotMapped] + public string FactoryName => ScpCache.GetFactoryNameByCode(Site); + + [NotMapped] + public string ReceivedPort_Desc => ScpCache.GetRevicePort(ReceivePort); + public string SubSite { get; set; } + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TA_Part_User.cs b/北京北汽/SCP/Models/ScpEntity/TA_Part_User.cs new file mode 100644 index 0000000..f9f40c4 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TA_Part_User.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Data.Entity; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public class TA_Part_User + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [StringLength(50)] + public string PartCode { get; set; } + + [StringLength(50)] + public string UserName { get; set; } + + [NotMapped] + [DisplayName("零件名称")] + public string PartName => ScpCache.GetPartDesc1(PartCode); + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TA_REVICE_PORT.cs b/北京北汽/SCP/Models/ScpEntity/TA_REVICE_PORT.cs new file mode 100644 index 0000000..4a79eb1 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TA_REVICE_PORT.cs @@ -0,0 +1,39 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public class TA_REVICE_PORT + { + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + + public string PORT_NO { get; set; } + [StringLength(50)] + public string PORT_DESCRIPTION { get; set; } + [StringLength(50)] + public string FACTORY_NAME { get; set; } + [StringLength(50)] + public string FACTORY_ID { get; set; } + [StringLength(50)] + public string EXTEND1 { get; set; } + + [StringLength(50)] + public string EXTEND2 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TA_VENDER.cs b/北京北汽/SCP/Models/ScpEntity/TA_VENDER.cs new file mode 100644 index 0000000..3df6b41 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TA_VENDER.cs @@ -0,0 +1,83 @@ +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class TA_VENDER + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [Column(Order =0)] + [StringLength(50)] + public string VendId { get; set; } + + [Required] + [StringLength(50)] + public string VendName { get; set; } + + [Required] + [StringLength(50)] + public string VendAbbCode { get; set; } + + [StringLength(50)] + public string VendType { get; set; } + + [StringLength(50)] + public string Country { get; set; } + + [StringLength(50)] + public string City { get; set; } + + [StringLength(50)] + public string Currency { get; set; } + + [StringLength(200)] + public string Address { get; set; } + + [StringLength(50)] + public string ZipCode { get; set; } + + [StringLength(50)] + public string Contacter { get; set; } + + [StringLength(50)] + public string Phone { get; set; } + + [StringLength(50)] + public string Fax { get; set; } + + [StringLength(50)] + public string Email { get; set; } + + public int State { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + + + public decimal? Tax { get; set; } + /// <summary> + /// ޶ + /// </summary> + public decimal? Quota { get; set; } + [NotMapped] + public List<string> UserInAddress { set; get; } + + [NotMapped] + public List<string> UserInVendIds { set; get; } + [Key] + [Column(Order =1)] + [StringLength(50)] + public string Site { get; set; } + + public int? ReceiveTimeScope { set; get; } + [NotMapped] + public string FactoryName => ScpCache.GetFactoryNameByCode(Site); + + public string SubSite { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TA_VENDER_EXTEND.cs b/北京北汽/SCP/Models/ScpEntity/TA_VENDER_EXTEND.cs new file mode 100644 index 0000000..e6ee8dc --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TA_VENDER_EXTEND.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public class TA_VENDER_EXTEND + { + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string VendId { get; set;} + public decimal InvAmt { get; set; } + [Key] + [Column(Order = 1)] + [StringLength(50)] + + public string Site { get; set; } + public string Extend1 { get; set; } + public string Extend2 { get; set; } + public string Extend3 { get; set; } + public string Extend4 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TA_VEND_PART.cs b/北京北汽/SCP/Models/ScpEntity/TA_VEND_PART.cs new file mode 100644 index 0000000..26cf8c1 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TA_VEND_PART.cs @@ -0,0 +1,58 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TA_VEND_PART : RecordEntity + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + + public long UID { get; set; } + [Key] + [Column(Order = 1)] + [StringLength(50)] + + public string VendId { get; set; } + [Key] + [Column(Order =2)] + [StringLength(50)] + public string PartCode { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string Site { get; set; } + + [StringLength(50)] + public string VendPartCode { get; set; } + + public decimal VendPackQty { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + public int State { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + + + public int? TransportationTime { get; set; } + + + public decimal? MinPackQty { get; set; } + + public decimal? PalletPackQty { get; set; } + + [NotMapped] + [DisplayName("Ӧ")] + public string VendName => ScpCache.GetVendName(VendId); + + [NotMapped] + [DisplayName("")] + public string PartName => ScpCache.GetVendName(PartCode); + + public string SubSite { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TA_VEND_USER.cs b/北京北汽/SCP/Models/ScpEntity/TA_VEND_USER.cs new file mode 100644 index 0000000..ad2aa1e --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TA_VEND_USER.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public class TA_VEND_USER + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [StringLength(50)] + public string VendId { get; set; } + + [StringLength(50)] + public string UserName { get; set; } + + [NotMapped] + [DisplayName("供应商名称")] + public string VendName => ScpCache.GetVendName(VendId); + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_ADDRESS.cs b/北京北汽/SCP/Models/ScpEntity/TB_ADDRESS.cs new file mode 100644 index 0000000..3dce978 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_ADDRESS.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TB_ADDRESS + { + [Key] + public long UID { get; set; } + public string Address { get; set; } + public string NamePone { get; set; } + } + } diff --git a/北京北汽/SCP/Models/ScpEntity/TB_ARRIVE.cs b/北京北汽/SCP/Models/ScpEntity/TB_ARRIVE.cs new file mode 100644 index 0000000..cb6e255 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_ARRIVE.cs @@ -0,0 +1,41 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TB_ARRIVE + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + public long UID { get; set; } + [StringLength(50)] + public string ArrvBillNum { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + [StringLength(50)] + public string AsnBillNum { get; set; } + [StringLength(50)] + public string Site { get; set; } + [StringLength(50)] + public string VendId { get; set; } + public DateTime ShipTime { get; set; } + public int State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + public DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public bool IsDeleted { get; set; } + public Guid GUID { get; set; } + [StringLength(50)] + public string OperName { get; set; } + public int BillType { get; set; } + + public string SubSite { get; set; } + + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_ARRIVE_DETAIL.cs b/北京北汽/SCP/Models/ScpEntity/TB_ARRIVE_DETAIL.cs new file mode 100644 index 0000000..cee81c1 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_ARRIVE_DETAIL.cs @@ -0,0 +1,46 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TB_ARRIVE_DETAIL + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + public long UID { get; set; } + [StringLength(50)] + public string ArrvBillNum { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + public int PoLine { get; set; } + [StringLength(50)] + public string PartCode { get; set; } + [StringLength(50)] + public string Batch { get; set; } + public decimal Qty { get; set; } + [StringLength(50)] + public string DockCode { get; set; } + public int State { get; set; } + [StringLength(500)] + public string Remark { get; set; } + public DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public bool IsDeleted { get; set; } + + public Guid GUID { get; set; } + + public int BillType { get; set; } + [StringLength(50)] + public string VendBatch { get; set; } + [StringLength(50)] + public string PoUnit { get; set; } + [StringLength(50)] + public string LocUnit { get; set; } + public string SubSite { get; set; } + public string Site { get; set; } + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_ASK.cs b/北京北汽/SCP/Models/ScpEntity/TB_ASK.cs new file mode 100644 index 0000000..4d18cb6 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_ASK.cs @@ -0,0 +1,42 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + [Serializable] + public partial class TB_ASK:RecordEntity + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [Key] + [StringLength(50)] + public string AskBillNum { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + [StringLength(50)] + public string VendId { get; set; } + [StringLength(50)] + public string Site { get; set; } + + public int State { get; set; } + [StringLength(200)] + public string Remark { get; set; } + public int ModType { get; set; } + + public DateTime BeginTime {get;set;} + public DateTime? EndTime {get;set;} + public string ErpBillNum{get;set;} + public string Buyer {get;set;} + public string BuyerPhone { get; set; } + [StringLength(50)] + public string ReceivedPort { get; set; } + public string SubSite { get; set; } + public string Extend1 { get; set; } + public string Extend2 { get; set; } + public string Extend3 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_ASK_DETAIL.cs b/北京北汽/SCP/Models/ScpEntity/TB_ASK_DETAIL.cs new file mode 100644 index 0000000..44f41c8 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_ASK_DETAIL.cs @@ -0,0 +1,58 @@ + + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + [Serializable] + public partial class TB_ASK_DETAIL:RecordEntity + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + [StringLength(50)] + public string AskBillNum { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + public int PoLine { get; set; } + [StringLength(50)] + public string PartCode { get; set; } + public decimal AskQty { get; set; } + public decimal ShippedQty { get; set; } + [Column(TypeName = "money")] + public decimal Price { get; set; } + public decimal ReceivedQty { get; set; } + [Column(TypeName = "money")] + public decimal TempQty { get; set; } + public Nullable<System.DateTime> BeginTime { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + [StringLength(50)] + public string PoUnit { get; set; } + [StringLength(50)] + public string LocUnit { get; set; } + public decimal PackQty { get; set; } + public decimal UnConv { get; set; } + [StringLength(50)] + public string DockCode { get; set; } + public int State { get; set; } + [StringLength(200)] + public string Remark { get; set; } + + public string Currency { get; set; } + + public string ReceivedPort { get; set; } + + + public decimal? ReduceQty { get; set; } + public string SubSite { get; set; } + public string Site { get; set; } + public string Extend1 { get; set; } + public string Extend2 { get; set; } + public string Extend3 { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_ASN.cs b/北京北汽/SCP/Models/ScpEntity/TB_ASN.cs new file mode 100644 index 0000000..42bca59 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_ASN.cs @@ -0,0 +1,110 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class V_TB_PO_PLAN_EXTEND + { + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + public long UID { get; set; } + public string Domain { get; set; } + + public string PartCode { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + public string PoBillNum { get; set; } + public string Site { get; set; } + public string AskBillNum { get; set; } + public string Version { get; set; } + + public string PartDesc { get; set; } + + public decimal PlanQty { get; set; } + public string PoUnit { get; set; } + public int PoLine { get; set; } + public string VendId { get; set; } + + public string ProjectId { get; set; } + public string IsPlan { get; set; } + + [NotMapped] + public List<string> UserInAddress { set; get; } + + [NotMapped] + public List<string> UserInVendIds { set; get; } + + + [NotMapped] + public List<int> BillStateList { set; get; } + + [NotMapped] + public DateTime? EndTime_Begin { set; get; } + [NotMapped] + public DateTime? EndTime_End { set; get; } + } + public partial class V_TB_PO_PLAN_DETAIL + { + [Key] + public long UID { get; set; } + public string PoBillNum { get; set; } + public string VendId { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + public string PartCode { get; set; } + public string AskBillNum { get; set; } + public string Version { get; set; } + public string Domain { get; set; } + public decimal PlanQty { get; set; } + public string PoUnit { get; set; } + + } + public partial class TB_ASN:RecordEntity + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [StringLength(50)] + [Key] + public string AsnBillNum { get; set; } + [StringLength(50)] + public string AskBillNum { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + [StringLength(50)] + public string VendId { get; set; } + [StringLength(50)] + public string Site { get; set; } + public int State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + + public DateTime? ShipTime { get; set; } + [StringLength(50)] + public string ShipUser { get; set; } + public DateTime? ReceiveTime { get; set; } + [StringLength(50)] + public string ReceiveUser { get; set; } + + public decimal? Price { get; set; } + [StringLength(50)] + public string Currency { get; set; } + [StringLength(50)] + public string PlateNumber { get; set; } + [StringLength(50)] + public string ReceivedPort { get; set; } + public string SubSite { get; set; } + public string Extend1 { get; set; } + public string Extend2{ get; set; } + public string Extend3 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_ASN_DETAIL.cs b/北京北汽/SCP/Models/ScpEntity/TB_ASN_DETAIL.cs new file mode 100644 index 0000000..48d71c9 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_ASN_DETAIL.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class TB_ASN_DETAIL:RecordEntity + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + public long UID { get; set; } + [StringLength(50)] + public string AsnBillNum { get; set; } + public decimal Price { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + public int PoLine { get; set; } + [StringLength(50)] + public string PartCode { get; set; } + [StringLength(50)] + public string Batch { get; set; } + public DateTime? ProduceDate { get; set; } + [StringLength(50)] + public string VendBatch { get; set; } + public decimal Qty { get; set; } + [StringLength(50)] + public string PoUnit { get; set; } + [StringLength(50)] + public string LocUnit { get; set; } + public decimal PackQty { get; set; } + public decimal UnConv { get; set; } + [StringLength(50)] + public string DockCode { get; set; } + public int? State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + + [StringLength(50)] + public string Currency { get; set; } + + public DateTime? EndTime { get; set; } + [StringLength(50)] + public string ReceivedPort { get; set; } + public string Site { get; set; } + public string SubSite { get; set; } + public string Extend1 { get; set; } + public string Extend2 { get; set; } + public string Extend3 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_CONTRACT.cs b/北京北汽/SCP/Models/ScpEntity/TB_CONTRACT.cs new file mode 100644 index 0000000..56997e8 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_CONTRACT.cs @@ -0,0 +1,41 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class TB_CONTRACT + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [StringLength(50)] + public string ContractNo { get; set; } + [StringLength(50)] + public string VendId { get; set; } + [StringLength(50)] + public string VendName { get; set; } + public DateTime? CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public DateTime? UpdateTime { get; set; } + [StringLength(50)] + public string UpdateUser { get; set; } + [StringLength(50)] + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + [Key] + [StringLength(50)] + public string BillNo { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_CONTRACT_DETAIL.cs b/北京北汽/SCP/Models/ScpEntity/TB_CONTRACT_DETAIL.cs new file mode 100644 index 0000000..b0b6e9c --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_CONTRACT_DETAIL.cs @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class TB_CONTRACT_DETAIL + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [StringLength(50)] + public string BillNo { get; set; } + [StringLength(50)] + public string ContractNo { get; set; } + [StringLength(50)] + public string PartCode { get; set; } + [StringLength(50)] + public string PartName { get; set; } + [StringLength(50)] + public string Unit { get; set; } + public DateTime? CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public DateTime? UpdateTime { get; set; } + [StringLength(50)] + public string UpdateUser { get; set; } + [StringLength(50)] + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_CONTRACT_DETAIL_PRICE.cs b/北京北汽/SCP/Models/ScpEntity/TB_CONTRACT_DETAIL_PRICE.cs new file mode 100644 index 0000000..4e9f437 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_CONTRACT_DETAIL_PRICE.cs @@ -0,0 +1,45 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class TB_CONTRACT_DETAIL_PRICE + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [StringLength(50)] + public string VendId { get; set; } + [StringLength(50)] + public string BillNo { get; set; } + [StringLength(50)] + public string ContractNo { get; set; } + [StringLength(50)] + public string PartCode { get; set; } + public int QtyBegin { get; set; } + public int QtyEnd { get; set; } + public decimal Price { get; set; } + public DateTime? BeginTime { get; set; } + public DateTime? EndTime { get; set; } + public DateTime? CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public DateTime? UpdateTime { get; set; } + [StringLength(50)] + public string UpdateUser { get; set; } + [StringLength(50)] + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_Code.cs b/北京北汽/SCP/Models/ScpEntity/TB_Code.cs new file mode 100644 index 0000000..6c18bf4 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_Code.cs @@ -0,0 +1,11 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TB_Code + { + public int code; + public string msg; + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ScpEntity/TB_FACTORY.cs b/北京北汽/SCP/Models/ScpEntity/TB_FACTORY.cs new file mode 100644 index 0000000..f5dbad6 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_FACTORY.cs @@ -0,0 +1,56 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + using CK.SCP.Models.ScpEntity; + + public partial class TB_FACTORY + { + + public System.DateTime CreateTime { get; set; } + + [StringLength(50)] + public string CreateUser { get; set; } + public Nullable<System.DateTime> UpdateTime { get; set; } + [StringLength(50)] + public string UpdateUser { get; set; } + [StringLength(50)] + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + [Key] + public System.Guid GUID { get; set; } + + [StringLength(50)] + public string FactoryId { get; set; } + [StringLength(50)] + public string FactoryName { get; set; } + [StringLength(50)] + public string ErpSite { get; set; } + [StringLength(50)] + public string ErpDomain { get; set; } + [StringLength(50)] + public string Address { get; set; } + [StringLength(50)] + public string ZipCode { get; set; } + public int State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + [StringLength(50)] + public string Tel{ get; set; } + [StringLength(50)] + public string Fax { get; set; } + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_FORECAST.cs b/北京北汽/SCP/Models/ScpEntity/TB_FORECAST.cs new file mode 100644 index 0000000..30adbde --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_FORECAST.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + [Serializable] + public partial class TB_FORECAST : RecordEntity + { + /// <summary> + /// UID + /// </summary> + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + /// <summary> + /// 零件编号 + /// </summary> + [StringLength(50)] + public string PartCode { get; set; } + /// <summary> + /// 供应商编号 + /// </summary> + public string VendId { get; set; } + /// <summary> + /// N+1 + /// </summary> + public decimal MonthQty1 { get; set; } + /// <summary> + /// N+2 + /// </summary> + public decimal MonthQty2 { get; set; } + /// <summary> + /// N+3 + /// </summary> + public decimal MonthQty3 { get; set; } + /// <summary> + /// 月份 + /// </summary> + public string Month { get; set; } + /// <summary> + /// 状态 + /// </summary> + public int State { get; set; } + /// <summary> + /// 地点 + /// </summary> + [StringLength(50)] + public string Site { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_INVOICE.cs b/北京北汽/SCP/Models/ScpEntity/TB_INVOICE.cs new file mode 100644 index 0000000..552d255 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_INVOICE.cs @@ -0,0 +1,65 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TB_INVOICE:RecordEntity + { + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + public long UID { get; set; } + + [StringLength(50)] + public string InvcBillNum { get; set; } + [StringLength(50)] + public string Site { get; set; } + [StringLength(50)] + public string InvoiceNum { get; set; } + [StringLength(50)] + public string ExpressNum { get; set; } + [StringLength(50)] + public string VendId { get; set; } + public decimal? Tax { get; set; } + public int State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + + public decimal? ContractPrice { get; set; } + public decimal? BlancePrice { get; set; } + public decimal? DiscountPrice { get; set; } + [StringLength(50)] + public string DiscountRemark { get; set; } + public bool IsRed { get; set; } + public string SubSite { get; set; } + /// <summary> + /// Ʊ + /// </summary> + public string CInvoiceReference { get; set; } + + + /// <summary> + /// Ʊ + /// </summary> + public string CInvoiceDescription { get; set; } + + /// <summary> + /// Ʊ + /// </summary> + public string CInvoiceType { get; set; } + /// <summary> + /// ɱ + /// </summary> + public string CInvoiceCostCenterCode { get; set; } + /// <summary> + /// ˻ + /// </summary> + public string CInvoiceDivisionCode { get; set; } + + + public DateTime? PostingDate { get; set; } + public DateTime? StartTime { get; set; } + public DateTime? EndTimeb { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_INVOICE_DETAIL.cs b/北京北汽/SCP/Models/ScpEntity/TB_INVOICE_DETAIL.cs new file mode 100644 index 0000000..4cc47c9 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_INVOICE_DETAIL.cs @@ -0,0 +1,60 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TB_INVOICE_DETAIL:RecordEntity + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + public long UID { get; set; } + [StringLength(50)] + public string InvcBillNum { get; set; } + [StringLength(50)] + public string RecvBillNum { get; set; } + [StringLength(50)] + public string AsnBillNum { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int PoLineNum { get; set; } + [StringLength(50)] + public string PartCode { get; set; } + [StringLength(50)] + public string Batch { get; set; } + [Column(TypeName = "date")] + public DateTime ProduceDate { get; set; } + [StringLength(50)] + public string VendBatch { get; set; } + [Column(TypeName = "money")] + public decimal Qty { get; set; } + [StringLength(50)] + public string PoUnit { get; set; } + [Column(TypeName = "money")] + public decimal Price { get; set; } + [StringLength(50)] + public string Currency { get; set; } + [Column(TypeName = "money")] + public decimal PackQty { get; set; } + public int State { get; set; } + public string Remark { get; set; } + [Column(TypeName = "date")] + public Nullable<System.DateTime> BeginTime { get; set; } + public decimal? ContractPrice { get; set; } + public decimal? BlancePrice { get; set; } + [Column(TypeName = "money")] + public decimal? DiscountPrice { get; set; } + [StringLength(50)] + public string DiscountRemark { get; set; } + public Nullable<System.Boolean> IsRed { get; set; } + public string Site { get; set; } + public string SubSite { get; set; } + + public int TemporaryPrice { set; get; } + + + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_PALLET.cs b/北京北汽/SCP/Models/ScpEntity/TB_PALLET.cs new file mode 100644 index 0000000..a381b3e --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_PALLET.cs @@ -0,0 +1,56 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.ComponentModel; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + + public partial class TB_PALLET : RecordEntity + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [StringLength(50)] + [Key] + public string AsnBillNum { get; set; } + + [StringLength(50)] + public string PalletNum { get; set; } + + [StringLength(50)] + public string AskBillNum { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + [StringLength(50)] + public string VendId { get; set; } + [StringLength(50)] + public string Site { get; set; } + public int State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + + public DateTime? ShipTime { get; set; } + [StringLength(50)] + public string ShipUser { get; set; } + public DateTime? ReceiveTime { get; set; } + [StringLength(50)] + public string ReceiveUser { get; set; } + + public decimal? Price { get; set; } + [StringLength(50)] + public string Currency { get; set; } + [StringLength(50)] + public string PlateNumber { get; set; } + [StringLength(50)] + public string ReceivedPort { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_PALLETS.cs b/北京北汽/SCP/Models/ScpEntity/TB_PALLETS.cs new file mode 100644 index 0000000..fe9a351 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_PALLETS.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TB_PALLETS + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + public long UID { get; set; } + [StringLength(50)] + public string AsnBillNum { get; set; } + public string PalletNum { get; set; } + public string PartCode { get; set; } + public string Batch { get; set; } + public string VendId { get; set; } + public int Box { get; set; } + public decimal Qty { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_PALLET_DETAIL.cs b/北京北汽/SCP/Models/ScpEntity/TB_PALLET_DETAIL.cs new file mode 100644 index 0000000..219d259 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_PALLET_DETAIL.cs @@ -0,0 +1,56 @@ + + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class TB_PALLET_DETAIL : RecordEntity + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + public long UID { get; set; } + [StringLength(50)] + public string AsnBillNum { get; set; } + public decimal Price { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + [StringLength(50)] + public string PalletNum { get; set; } + public int PoLine { get; set; } + [StringLength(50)] + public string PartCode { get; set; } + [StringLength(50)] + public string Batch { get; set; } + public DateTime? ProduceDate { get; set; } + [StringLength(50)] + public string VendBatch { get; set; } + + public decimal Qty { get; set; } + [StringLength(50)] + public string PoUnit { get; set; } + [StringLength(50)] + public string LocUnit { get; set; } + public decimal PackQty { get; set; } + public decimal UnConv { get; set; } + [StringLength(50)] + public string DockCode { get; set; } + public int? State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + + [StringLength(50)] + public string Currency { get; set; } + + public DateTime? EndTime { get; set; } + [StringLength(50)] + public string ReceivedPort { get; set; } + + + + } +} + diff --git a/北京北汽/SCP/Models/ScpEntity/TB_PENING_ITEMS.cs b/北京北汽/SCP/Models/ScpEntity/TB_PENING_ITEMS.cs new file mode 100644 index 0000000..cd9eead --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_PENING_ITEMS.cs @@ -0,0 +1,74 @@ + +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + public partial class TB_PENING_ITEMS + { + public TB_PENING_ITEMS() + { + UserInAddress = new List<string>(); + UserInVendIds = new List<string>(); + } + + [Column(Order = 0)] + [StringLength(50)] + public string ITEM_NO { get; set; } + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [StringLength(50)] + public string ITEM_CONTENT { get; set; } + + + public int ITEM_TYPE { get; set; } + + [StringLength(50)] + public string SENDER { get; set; } + + + public System.DateTime SENDING_TIME { get; set; } + + public int MESSAGE_STATE { get; set; } + + public int ITEM_STATE { get; set; } + [StringLength(100)] + public string ITEM_ADDRESS { get; set; } + [StringLength(50)] + public string RENEWER { get; set; } + public Nullable<System.DateTime> RENEW_TIME { get; set; } + public string MEMO { get; set; } + [StringLength(50)] + public string ORDER_NO { get; set; } + [StringLength(50)] + public string SEND_NO { get; set; } + [StringLength(50)] + public string INVOICE_NO { get; set; } + [StringLength(50)] + public string ROLE_NAME { get; set; } + [StringLength(50)] + public string VEND_ID { get; set; } + [StringLength(50)] + public string USER_ID { get; set; } + + public Guid GUID{ get; set; } + [StringLength(50)] + public string EXTEND5 { get; set; } + [NotMapped] + public List<string> UserInAddress { set; get; } + + [NotMapped] + + public List<string> UserInVendIds { set; get; } + [NotMapped] + public List<string> UserInRoles { set; get; } + + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_PLAN.cs b/北京北汽/SCP/Models/ScpEntity/TB_PLAN.cs new file mode 100644 index 0000000..5be6a4d --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_PLAN.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class TB_PLAN:RecordEntity + { + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + public string PlanId { get; set; } + public string PlanName { get; set; } + public string ErpPlanId { get; set; } + public string Version { get; set; } + public string VendId { get; set; } + public string Site { get; set; } + public int PlanType { get; set; } + public int State { get; set; } + public string Remark { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_PLAN_DETAIL.cs b/北京北汽/SCP/Models/ScpEntity/TB_PLAN_DETAIL.cs new file mode 100644 index 0000000..f14abb7 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_PLAN_DETAIL.cs @@ -0,0 +1,24 @@ + + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class TB_PLAN_DETAIL:RecordEntity + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + public string PlanId { get; set; } + public string PlanPieriod { get; set; } + public System.DateTime BeginDate { get; set; } + public System.DateTime EndDate { get; set; } + public string PartCode { get; set; } + public decimal Qty { get; set; } + public int State { get; set; } + public string Remark { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_PO.cs b/北京北汽/SCP/Models/ScpEntity/TB_PO.cs new file mode 100644 index 0000000..b3d22cc --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_PO.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class TB_PO:RecordEntity + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [Key] + [StringLength(50)] + public string PoBillNum { get; set; } + [StringLength(50)] + public string ErpBillNum { get; set; } + [StringLength(50)] + public string VendId { get; set; } + public int? ModType { get; set; } + [StringLength(50)] + public string Contacter { get; set; } + + // [Key] + + [StringLength(50)] + public string Site { get; set; } + [StringLength(50)] + public string Buyer { get; set; } + [StringLength(50)] + public string BuyerPhone { get; set; } + public int State { get; set; } + [StringLength(200)] + public string Remark { get; set; } + + public DateTime? BeginTime { get; set; } + + public DateTime? EndTime { get; set; } + + [NotMapped] + public string ReceivedPort { get; set; } + public string SubSite { get; set; } + [StringLength(50)] + public string Pricelist { get; set; } + [StringLength(50)] + public string Taxclass { get; set; } + } + + + + +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_PO_DETAIL.cs b/北京北汽/SCP/Models/ScpEntity/TB_PO_DETAIL.cs new file mode 100644 index 0000000..d3b0dd3 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_PO_DETAIL.cs @@ -0,0 +1,97 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class TB_PO_DETAIL:RecordEntity + { + + + + + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + + + [StringLength(50)] + public string PoBillNum { get; set; } + public int PoLine { get; set; } + + public Nullable<System.DateTime> BeginTime { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + + [Required] + [StringLength(50)] + public string PartCode { get; set; } + + [Column(TypeName = "money")] + public decimal ShippedQty { get; set; } + + [Column(TypeName = "money")] + public decimal ReceivedQty { get; set; } + + [Column(TypeName = "money")] + public decimal? RejectQty { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + [StringLength(50)] + public string LocUnit { get; set; } + + [Column(TypeName = "money")] + public decimal Price { get; set; } + + [StringLength(50)] + public string Currency { get; set; } + + public decimal PlanQty { get; set; } + [Column(TypeName = "money")] + public decimal PackQty { get; set; } + [Column(TypeName = "money")] + public decimal? TempQty { get; set; } + + public int State { get; set; } + + [StringLength(200)] + public string Remark { get; set; } + public decimal UnConv { get; set; } + [StringLength(50)] + public string DockCode { get; set; } + + public string SubSite { get; set; } + + public string Site { get; set; } + public int Workorderlot { get; set; } + [StringLength(50)] + public string PoType { get; set; } + public int Operation { get; set; } + [StringLength(8)] + public string Location { get; set; } + public int Firmdays { get; set; } + public int Scheduledays { get; set; } + public int Scheduleweeks { get; set; } + public int Schedulemonth { get; set; } + [StringLength(50)] + public string Supplieritem { get; set; } + [StringLength(2)] + public string Dliverypatterncode { get; set; } + [StringLength(2)] + public string Deliverytimecode { get; set; } + public int Transportdays { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_PO_PLAN.cs b/北京北汽/SCP/Models/ScpEntity/TB_PO_PLAN.cs new file mode 100644 index 0000000..7d84dfb --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_PO_PLAN.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TB_PO_PLAN : RecordEntity + { + + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [Key] + [Column(Order = 0)] + public string PoBillNum { get; set; } + [Key] + [Column(Order = 1)] + public string Domain { get; set; } + [Key] + [Column(Order = 5)] + public string Site { get; set; } + [Key] + [Column(Order = 2)] + public DateTime EndTime { get; set; } + + [Key] + [Column(Order = 3)] + public string PartCode { get; set; } + + [Key] + [Column(Order = 4)] + public string Version { get; set; } + + public string ErpBillNum { get; set; } + public string VendId { get; set; } + public Nullable<int> PlanType { get; set; } + public string Contacter { get; set; } + + public string Buyer { get; set; } + + public System.DateTime BeginTime { get; set; } + public string BuyerPhone { get; set; } + public int State { get; set; } + public int PoLine { get; set; } + + + + public decimal PlanQty { get; set; } + public string PoUnit { get; set; } + public string LocUnit { get; set; } + public decimal Price { get; set; } + public string Currency { get; set; } + public decimal PackQty { get; set; } + public decimal UnConv { get; set; } + public string DockCode { get; set; } + public string Remark { get; set; } + + + + public string Extend1 { get; set; } + public string Extend2 { get; set; } + public string Extend3 { get; set; } + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_PRICE.cs b/北京北汽/SCP/Models/ScpEntity/TB_PRICE.cs new file mode 100644 index 0000000..a68f9e5 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_PRICE.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models; + +namespace CK.SCP.Models.ScpEntity +{ + + public partial class TB_PRICE //RecordEntity + { + [Key] + public int UID { get; set; } + public string VendId { get; set; } + public string Site { get; set; } + public string SubSite { get; set; } + public string PartCode { get; set; } + public Nullable<System.DateTime> StartTime { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + public string Curr { get; set; } + public string Unit { get; set; } + [DecimalPrecision(18, 5)] + public decimal Amt { get; set; } + public string Remarks { get; set; } + /// <summary> + /// 状态(已用) + /// </summary> + public string Extend1 { get; set; } + public string Extend2 { get; set; } + public string Extend3 { get; set; } + public int TemporaryPrice { get; set; } + /// <summary> + /// 状态 + /// </summary> + public int State { get; set; } + public string Creator { get; set; } + [NotMapped] + public List<string> UserInAddress { set; get; } + + [NotMapped] + public List<string> UserInVendIds { set; get; } + /// <summary> + /// 是否传接口 1是 + /// </summary> + public int IsPost { set; get; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_PRINT_COUNT.cs b/北京北汽/SCP/Models/ScpEntity/TB_PRINT_COUNT.cs new file mode 100644 index 0000000..0117a66 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_PRINT_COUNT.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + public partial class TB_PRINT_COUNT + { + public string BillNo { get; set; } + public int PrintCount { get; set; } + public int PrintType { get; set; } + [Key] + public int UID { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_PlanMonth.cs b/北京北汽/SCP/Models/ScpEntity/TB_PlanMonth.cs new file mode 100644 index 0000000..e3692c9 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_PlanMonth.cs @@ -0,0 +1,37 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class TB_PlanMonth + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int ID { get; set; } + + [StringLength(50)] + public string Code { get; set; } + + [StringLength(50)] + public string SupplierCode { get; set; } + + public DateTime AddTime { get; set; } + + public DateTime? SendTime { get; set; } + + + [StringLength(50)] + public string Name { get; set; } + + [StringLength(50)] + public string Ver { get; set; } + + public string FileName { get; set; } + + public string UserName { get; set; } + + public string IsSend { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_PublicData.cs b/北京北汽/SCP/Models/ScpEntity/TB_PublicData.cs new file mode 100644 index 0000000..d77945f --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_PublicData.cs @@ -0,0 +1,37 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class TB_PublicData + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int ID { get; set; } + + + [StringLength(50)] + public string Code { get; set; } + + [StringLength(50)] + public string Name { get; set; } + + + [StringLength(50)] + public string Ver { get; set; } + + [StringLength(50)] + public string FileName { get; set; } + + public DateTime AddTime { get; set; } + + [StringLength(500)] + public string UserName { get; set; } + + [NotMapped] + public string UploadUser { get; set; } + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_QUALITY.cs b/北京北汽/SCP/Models/ScpEntity/TB_QUALITY.cs new file mode 100644 index 0000000..4f8fbca --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_QUALITY.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TB_QUALITY:RecordEntity + { + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + public long UID { get; set; } + + public string Type { get; set; } + public string Barcode { get; set; } + public string Loccode { get; set; } + public string Pobillnum { get; set; } + public decimal Poline { get; set; } + public string Inspecttype { get; set; } + public string Partcode { get; set; } + public string Batch { get; set; } + public decimal ReceiveQty { get; set; } + public decimal SampleQty { get; set; } + public decimal Inspqty { get; set; } + public decimal Passqty { get; set; } + public decimal Failqty { get; set; } + public decimal Crackqty { get; set; } + public string Inspresult { get; set; } + public string Failreason { get; set; } + public string Vendid { get; set; } + public string Vendbatch { get; set; } + public string state { get; set; } + public System.DateTime Billtime { get; set; } + public string Domain { get; set; } + public string Site { get; set; } + public string By1 { get; set; } + public string By2 { get; set; } + public string By3 { get; set; } + public string QualityNo { get; set; } + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_RECEIVE.cs b/北京北汽/SCP/Models/ScpEntity/TB_RECEIVE.cs new file mode 100644 index 0000000..9967fae --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_RECEIVE.cs @@ -0,0 +1,38 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TB_RECEIVE + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + public long UID { get; set; } + [StringLength(50)] + public string RecvBillNum { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + [StringLength(50)] + public string AsnBillNum { get; set; } + [StringLength(50)] + public string Site { get; set; } + [StringLength(50)] + public string VendId { get; set; } + public DateTime ShipTime { get; set; } + public int State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + public DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public bool IsDeleted { get; set; } + public Guid GUID { get; set; } + [StringLength(50)] + public string OperName { get; set; } + public int BillType { get; set; } + public string SubSite { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_RECEIVE_DETAIL.cs b/北京北汽/SCP/Models/ScpEntity/TB_RECEIVE_DETAIL.cs new file mode 100644 index 0000000..110c2b9 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_RECEIVE_DETAIL.cs @@ -0,0 +1,75 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TB_RECEIVE_DETAIL + { + + + + + + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + public long UID { get; set; } + [StringLength(50)] + public string RecvBillNum { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + public int PoLine { get; set; } + [StringLength(50)] + public string PartCode { get; set; } + [StringLength(50)] + public string Batch { get; set; } + public decimal Qty { get; set; } + [StringLength(50)] + public string DockCode { get; set; } + public int State { get; set; } + [StringLength(500)] + public string Remark { get; set; } + public DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public bool IsDeleted { get; set; } + public Guid GUID { get; set; } + public int BillType { get; set; } + [StringLength(50)] + public string VendBatch { get; set; } + [StringLength(50)] + public string PoUnit { get; set; } + [StringLength(50)] + public string LocUnit { get; set; } + public string Site { get; set; } + public string SubSite { get; set; } + + + + + public string Currency { get; set; } + public Nullable<decimal> Currencyamount { get; set; } + public string ExchangeRate { get; set; } + public string ExchangeRate1 { get; set; } + public string WorkOrderID { get; set; } + public string POSite { get; set; } + public Nullable<decimal> POCost { get; set; } + public Nullable<decimal> POStandardCost { get; set; } + public string ReceiptType { get; set; } + public string ReturnReasonCode { get; set; } + public string Requestedby { get; set; } + public string ShipTo { get; set; } + public Nullable<decimal> Tax { get; set; } + public string TaxEnvironment { get; set; } + public string TaxIn { get; set; } + public string TaxUsage { get; set; } + public string TaxClass { get; set; } + public string PurchaseType { get; set; } + public string ExchangeRateType { get; set; } + public Nullable<decimal> UMConversion { get; set; } + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_RECEIVE_DETAIL_QAD.cs b/北京北汽/SCP/Models/ScpEntity/TB_RECEIVE_DETAIL_QAD.cs new file mode 100644 index 0000000..76ada35 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_RECEIVE_DETAIL_QAD.cs @@ -0,0 +1,64 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TB_RECEIVE_DETAIL_QAD + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + public long UID { get; set; } + [StringLength(50)] + public string RecvBillNum { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + public int PoLine { get; set; } + [StringLength(50)] + public string PartCode { get; set; } + [StringLength(50)] + public string Batch { get; set; } + public decimal Qty { get; set; } + [StringLength(50)] + public string DockCode { get; set; } + public int State { get; set; } + [StringLength(500)] + public string Remark { get; set; } + public DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public bool IsDeleted { get; set; } + + public Guid GUID { get; set; } + + public int BillType { get; set; } + [StringLength(50)] + public string VendBatch { get; set; } + [StringLength(50)] + public string PoUnit { get; set; } + [StringLength(50)] + public string LocUnit { get; set; } + + public string ErpRecvBillNum { get; set; } + + /// <summary> + /// ɹ + /// </summary> + public decimal? PurCost { get; set; } + /// <summary> + /// ɱ + /// </summary> + public decimal? StdCost { get; set; } + + public string Site { get; set; } + + public decimal? Rate { get; set; } + + + public decimal? CurAmt { get; set; } + + public decimal? Tax { get; set; } + + public string SubSite { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_RECEIVE_QAD.cs b/北京北汽/SCP/Models/ScpEntity/TB_RECEIVE_QAD.cs new file mode 100644 index 0000000..bc82c92 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_RECEIVE_QAD.cs @@ -0,0 +1,46 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TB_RECEIVE_QAD + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + public long UID { get; set; } + [StringLength(50)] + public string RecvBillNum { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + [StringLength(50)] + public string AsnBillNum { get; set; } + [StringLength(50)] + public string Site { get; set; } + [StringLength(50)] + public string VendId { get; set; } + public DateTime ShipTime { get; set; } + public int State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + public DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public bool IsDeleted { get; set; } + public Guid GUID { get; set; } + [StringLength(50)] + public string OperName { get; set; } + public int BillType { get; set; } + + public string ErpRecvBillNum { get; set; } + + + public decimal? Tax { get; set; } + + public string SubSite { get; set; } + + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_REJECT.cs b/北京北汽/SCP/Models/ScpEntity/TB_REJECT.cs new file mode 100644 index 0000000..bfb93c5 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_REJECT.cs @@ -0,0 +1,36 @@ +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class TB_REJECT + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + public long UID { get; set; } + [StringLength(50)] + public string RjctBillNum { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + [StringLength(50)] + public string AsnBillNum { get; set; } + [StringLength(50)] + public string Site { get; set; } + [StringLength(50)] + public string VendId { get; set; } + public DateTime ShipTime { get; set; } + public int State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + public DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public bool IsDeleted { get; set; } + public Guid GUID { get; set; } + [StringLength(50)] + public string OperName { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_REJECT_DETAIL.cs b/北京北汽/SCP/Models/ScpEntity/TB_REJECT_DETAIL.cs new file mode 100644 index 0000000..bcbc3a7 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_REJECT_DETAIL.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Data.Entity.Spatial; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TB_REJECT_DETAIL + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + public long UID { get; set; } + [StringLength(50)] + public string RjctBillNum { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + public int PoLine { get; set; } + [StringLength(50)] + public string PartCode { get; set; } + [StringLength(50)] + public string Batch { get; set; } + public decimal Qty { get; set; } + public int State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + public DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public bool IsDeleted { get; set; } + public Guid GUID { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TB_RETURN.cs b/北京北汽/SCP/Models/ScpEntity/TB_RETURN.cs new file mode 100644 index 0000000..dc5b27f --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TB_RETURN.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TB_RETURN:RecordEntity + { + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + public long UID { get; set; } + + public string Type { get; set; } + public string Barcode { get; set; } + public string Loccode { get; set; } + public string Pobillnum { get; set; } + public decimal Poline { get; set; } + public string Inspecttype { get; set; } + public string Partcode { get; set; } + public string Batch { get; set; } + public decimal ReceiveQty { get; set; } + public decimal SampleQty { get; set; } + public decimal Inspqty { get; set; } + public decimal Passqty { get; set; } + public decimal Failqty { get; set; } + public decimal Crackqty { get; set; } + public string Inspresult { get; set; } + public string Failreason { get; set; } + public string Vendid { get; set; } + public string Vendbatch { get; set; } + public string state { get; set; } + public System.DateTime Billtime { get; set; } + public string Domain { get; set; } + public string Site { get; set; } + public string By1 { get; set; } + public string By2 { get; set; } + public string By3 { get; set; } + public string QualityNo { get; set; } + + public decimal RejectQty { get; set; } + + public string RejectBillNum { get; set; } + public string AsnBillNum { get; set; } + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TL_BASEDATA.cs b/北京北汽/SCP/Models/ScpEntity/TL_BASEDATA.cs new file mode 100644 index 0000000..f8b8f15 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TL_BASEDATA.cs @@ -0,0 +1,36 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TL_BASEDATA + { + [Key] + public long UID { get; set; } + + [Required] + [StringLength(80)] + public string OperName { get; set; } + + public DateTime LogTime { get; set; } + + [Required] + [StringLength(50)] + public string LogType { get; set; } + + [Required] + [StringLength(50)] + public string DataType { get; set; } + + [Required] + [StringLength(4000)] + public string OldValue { get; set; } + + [Required] + [StringLength(4000)] + public string NewValue { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TL_BILL.cs b/北京北汽/SCP/Models/ScpEntity/TL_BILL.cs new file mode 100644 index 0000000..dae515d --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TL_BILL.cs @@ -0,0 +1,29 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TL_BILL + { + [Key] + public long UID { get; set; } + + [Required] + [StringLength(80)] + public string OperName { get; set; } + + public DateTime LogTime { get; set; } + + [Required] + [StringLength(50)] + public string LogType { get; set; } + + [Required] + [StringLength(50)] + public string BillNum { get; set; } + + public int BillType { get; set; } + + public string Message { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TL_OPER.cs b/北京北汽/SCP/Models/ScpEntity/TL_OPER.cs new file mode 100644 index 0000000..8aee705 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TL_OPER.cs @@ -0,0 +1,31 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TL_OPER + { + [Key] + public long UID { get; set; } + + [Required] + [StringLength(80)] + public string OperCode { get; set; } + + [Required] + [StringLength(50)] + public string OperName { get; set; } + + public DateTime LogTime { get; set; } + + [Required] + [StringLength(50)] + public string LogType { get; set; } + + [Required] + [StringLength(200)] + public string LogSite { get; set; } + + public string Message { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TS_BARCODE.cs b/北京北汽/SCP/Models/ScpEntity/TS_BARCODE.cs new file mode 100644 index 0000000..084e314 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TS_BARCODE.cs @@ -0,0 +1,102 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TS_BARCODE + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + + [StringLength(50)] + public string BarCode { get; set; } + + [Required] + [StringLength(500)] + public string FullBarCode { get; set; } + + [Required] + [StringLength(50)] + public string PartCode { get; set; } + + [StringLength(50)] + public string VendPartCode { get; set; } + + [Required] + [StringLength(50)] + public string Batch { get; set; } + + [Column(TypeName = "datetime2")] + public DateTime ProduceDate { get; set; } + + public int ManageType { get; set; } + + [Required] + [StringLength(50)] + public string SerialNum { get; set; } + + [Column(TypeName = "money")] + public decimal Qty { get; set; } + + public int BarCodeType { get; set; } + + [Required] + [StringLength(50)] + public string BillNum { get; set; } + + public int PoBillLine { get; set; } + + [StringLength(50)] + public string VendId { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + [Column(TypeName = "money")] + public decimal PackQty { get; set; } + + [Required] + [StringLength(50)] + public string CreateOper { get; set; } + + public DateTime CreateTime { get; set; } + + public int State { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + + public string PoUnit { get; set; } + public string LocUnit { get; set; } + + + public string Site { get; set; } + public string Qlevel { get; set; } + public string QMark { get; set; } + public string ProjectId { get; set; } + + public string PoBillNum { get; set; } + + + + [DisplayName("Ӧ")] + public string VendName => ScpCache.GetVendName(VendId,Site); + + + [DisplayName("")] + + + public string PartDesc => ScpCache.GetPartDesc1(PartCode,Site); + + [DisplayName("")] + public string PartName => ScpCache.GetPartDesc1(PartCode,Site); + [NotMapped] + public List<long> UIDList { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TS_BARCODE_CUSTOM.cs b/北京北汽/SCP/Models/ScpEntity/TS_BARCODE_CUSTOM.cs new file mode 100644 index 0000000..28f4afc --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TS_BARCODE_CUSTOM.cs @@ -0,0 +1,102 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TS_BARCODE_CUSTOM + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + + [StringLength(50)] + public string BarCode { get; set; } + + [Required] + [StringLength(500)] + public string FullBarCode { get; set; } + + [Required] + [StringLength(50)] + public string PartCode { get; set; } + + [StringLength(50)] + public string VendPartCode { get; set; } + + [Required] + [StringLength(50)] + public string Batch { get; set; } + + [Column(TypeName = "datetime2")] + public DateTime ProduceDate { get; set; } + + public int ManageType { get; set; } + + [Required] + [StringLength(50)] + public string SerialNum { get; set; } + + [Column(TypeName = "money")] + public decimal Qty { get; set; } + + public int BarCodeType { get; set; } + + [Required] + [StringLength(50)] + public string BillNum { get; set; } + + public int PoBillLine { get; set; } + + [StringLength(50)] + public string VendId { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + [Column(TypeName = "money")] + public decimal PackQty { get; set; } + + [Required] + [StringLength(50)] + public string CreateOper { get; set; } + + public DateTime CreateTime { get; set; } + + public int State { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + + public string PoUnit { get; set; } + public string LocUnit { get; set; } + + + public string Site { get; set; } + public string Qlevel { get; set; } + public string QMark { get; set; } + public string ProjectId { get; set; } + + public string PoBillNum { get; set; } + + + + [DisplayName("Ӧ")] + public string VendName => ScpCache.GetVendName(VendId,Site); + + + [DisplayName("")] + + + public string PartDesc => ScpCache.GetPartDesc1(PartCode,Site); + + [DisplayName("")] + public string PartName => ScpCache.GetPartDesc1(PartCode,Site); + [NotMapped] + public List<long> UIDList { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TS_BARCODE_RULE.cs b/北京北汽/SCP/Models/ScpEntity/TS_BARCODE_RULE.cs new file mode 100644 index 0000000..7d0683d --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TS_BARCODE_RULE.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TS_BARCODE_RULE + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string PartCode { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string RuleBatch { get; set; } + + public int LastNumber { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(500)] + public string LastBarCode { get; set; } + + public DateTime LastTime { get; set; } + + public int State { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TS_BARCODE_RULE_CUSTOM.cs b/北京北汽/SCP/Models/ScpEntity/TS_BARCODE_RULE_CUSTOM.cs new file mode 100644 index 0000000..d9d50cf --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TS_BARCODE_RULE_CUSTOM.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TS_BARCODE_RULE_CUSTOM + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string PartCode { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string RuleBatch { get; set; } + + public int LastNumber { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(500)] + public string LastBarCode { get; set; } + + public DateTime LastTime { get; set; } + + public int State { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TS_STOCK.cs b/北京北汽/SCP/Models/ScpEntity/TS_STOCK.cs new file mode 100644 index 0000000..2c77dd3 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TS_STOCK.cs @@ -0,0 +1,63 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TS_STOCK + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + public long UID { get; set; } + + [Column(Order = 0)] + [StringLength(50)] + public string BarCode { get; set; } + + [Column(Order = 1)] + [StringLength(50)] + public string LocCode { get; set; } + + [Required] + [StringLength(50)] + public string PartCode { get; set; } + + [Required] + [StringLength(50)] + public string Batch { get; set; } + + [Column(Order = 2)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int State { get; set; } + + [StringLength(50)] + public string VendId { get; set; } + + [Column(TypeName = "money")] + public decimal Qty { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + [Column(TypeName = "date")] + public DateTime ReceiveDate { get; set; } + + [Column(TypeName = "date")] + public DateTime ProduceDate { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + [StringLength(50)] + public string Site { get; set; } + [StringLength(50)] + public string LocUnit { get; set; } + public DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public DateTime UpdateTIme { get; set; } + [StringLength(50)] + public string UpdateUser { get; set; } + [StringLength(20)] + public string Domain { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TS_UNI_API.cs b/北京北汽/SCP/Models/ScpEntity/TS_UNI_API.cs new file mode 100644 index 0000000..6be9b27 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TS_UNI_API.cs @@ -0,0 +1,127 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TS_UNI_API + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string InterfaceType { get; set; } + + [StringLength(50)] + public string TableName { get; set; } + + public int? BillType { get; set; } + + public int? SubBillType { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string BillNum { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string PartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string Batch { get; set; } + + public decimal Qty { get; set; } + + public int State { get; set; } + + [StringLength(50)] + public string CreateOper { get; set; } + + public DateTime CreateTime { get; set; } + + public DateTime PutTime { get; set; } + + [StringLength(50)] + public string VendId { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + [StringLength(50)] + public string LocUnit { get; set; } + + public DateTime ValidDate { get; set; } + + [StringLength(50)] + public string ErpBillNum { get; set; } + + public int ErpLineNum { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + [StringLength(50)] + public string SourceBillNum { get; set; } + + public decimal PackQty { get; set; } + public decimal Price { get; set; } + public string Barcode { get; set; } + public string Currency { get; set; } + public decimal UmConv { get; set; } + public string Attn { get; set; } + public string Buyer { get; set; } + public string BuyerPhone { get; set; } + public string ModType { get; set; } + public string Invoice { get; set; } + public decimal TaxAmt { get; set; } + public string Receiver { get; set; } + public decimal Tax { get; set; } + public string Site { get; set; } + public string Domain { get; set; } + public string Extend1 { get; set; } + public string Extend2 { get; set; } + + public TS_UNI_API_HIS ToHis() + { + return new TS_UNI_API_HIS + { + InterfaceType = InterfaceType, + TableName = TableName, + BillType = BillType, + SubBillType = SubBillType, + BillNum = BillNum, + PartCode = PartCode, + Batch = Batch, + Qty = Qty, + State = State, + CreateOper = CreateOper, + CreateTime = CreateTime, + PutTime = PutTime, + VendId = VendId, + PoUnit = PoUnit, + LocUnit = LocUnit, + ValidDate = ValidDate, + ErpBillNum = ErpBillNum, + ErpLineNum = ErpLineNum, + VendBatch = VendBatch, + SourceBillNum = SourceBillNum, + PackQty = PackQty, + Price = Price, + Barcode = Barcode, + Currency = Currency, + UmConv = UmConv, + Attn = Attn, + Buyer = Buyer, + BuyerPhone = BuyerPhone, + ModType = ModType, + Invoice = Invoice, + TaxAmt = TaxAmt, + Receiver = Receiver, + Taxt = Tax, + }; + } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TS_UNI_API_HIS.cs b/北京北汽/SCP/Models/ScpEntity/TS_UNI_API_HIS.cs new file mode 100644 index 0000000..1d5a642 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TS_UNI_API_HIS.cs @@ -0,0 +1,89 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TS_UNI_API_HIS + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string InterfaceType { get; set; } + + [StringLength(50)] + public string TableName { get; set; } + + public int? BillType { get; set; } + + public int? SubBillType { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string BillNum { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string PartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string Batch { get; set; } + + public decimal Qty { get; set; } + + public int State { get; set; } + + [StringLength(50)] + public string CreateOper { get; set; } + + public DateTime CreateTime { get; set; } + + public DateTime PutTime { get; set; } + + [StringLength(50)] + public string VendId { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + [StringLength(50)] + public string LocUnit { get; set; } + + public DateTime ValidDate { get; set; } + + [StringLength(50)] + public string ErpBillNum { get; set; } + + public int ErpLineNum { get; set; } + + [StringLength(50)] + public string EqptCode { get; set; } + + [StringLength(50)] + public string EqptType { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + [StringLength(50)] + public string SourceBillNum { get; set; } + + public decimal PackQty { get; set; } + public decimal Price { get; set; } + public string Barcode { get; set; } + public string Currency { get; set; } + public decimal UmConv { get; set; } + public string Attn { get; set; } + public string Buyer { get; set; } + public string BuyerPhone { get; set; } + public string ModType { get; set; } + public string Invoice { get; set; } + public decimal TaxAmt { get; set; } + public string Receiver { get; set; } + public decimal Taxt { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TT_CURRENCY.cs b/北京北汽/SCP/Models/ScpEntity/TT_CURRENCY.cs new file mode 100644 index 0000000..950097f --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TT_CURRENCY.cs @@ -0,0 +1,21 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TT_CURRENCY + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string Currency { get; set; } + + [StringLength(50)] + public string CurrencyDesc { get; set; } + + [StringLength(50)] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TT_PROJECT.cs b/北京北汽/SCP/Models/ScpEntity/TT_PROJECT.cs new file mode 100644 index 0000000..9a59851 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TT_PROJECT.cs @@ -0,0 +1,22 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TT_PROJECT + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string ProjectId { get; set; } + + [Required] + [StringLength(50)] + public string ProjectName { get; set; } + + [StringLength(50)] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/TT_UNIT.cs b/北京北汽/SCP/Models/ScpEntity/TT_UNIT.cs new file mode 100644 index 0000000..bfd8719 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/TT_UNIT.cs @@ -0,0 +1,18 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class TT_UNIT + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string Unit { get; set; } + + [StringLength(200)] + public string Remak { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_ARRIVE_PRINT.cs b/北京北汽/SCP/Models/ScpEntity/V_ARRIVE_PRINT.cs new file mode 100644 index 0000000..b32aeeb --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_ARRIVE_PRINT.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_ARRIVE_PRINT + { + public string Site { get; set; } + public string FileNo{get;set;} + public string DeliveryNo{get;set;} + public string ChineseAddress{get;set;} + public string EnglishAddress{get;set;} + public string SupplierNo{get;set;} + public string SupplierName{get;set;} + public string SupplierContacter{get;set;} + public string SupplierPhone => ScpCache.GetVendPhone(SupplierNo,Site); + public string SupplierFax => ScpCache.GetVendFax(SupplierNo); + public string DueDeliveryDate{get;set;} + public string MaterialPlanner{get;set;} + public string CAAIPhone{get;set;} + public string CAAIFax { get; set; } + public string ShipTimeDate { get; set; } + public string MaterialPhone { get; set; } + public string STDCOUNT { get; set; } + + } + + public class V_ARRIVE_PRINT_DETAIL + { + public string PartNo { get; set; } + public string PartDesc { get; set; } + public string Unit { get; set; } + public string STD { get; set; } + public string Boxes { get; set; } + public string DeliverQty { get; set; } + public string ReceiveQty { get; set; } + public string PoNo { get; set; } + public string LineNO { get; set; } + public string Memo { get; set; } + public string DockCode { get; set; } + public string DockCode_Desc => ScpCache.PortList.Where(p => p.PORT_NO == DockCode).FirstOrDefault() == null ? "" : ScpCache.PortList.Where(p => p.PORT_NO == DockCode).FirstOrDefault().PORT_DESCRIPTION; + public string SpecialState { get; set; } + public string ArriveState { get; set; } + public string VendBatch { get; set; } + public string ProduecDate { get; set; } + } + +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_ASN_PRINT.cs b/北京北汽/SCP/Models/ScpEntity/V_ASN_PRINT.cs new file mode 100644 index 0000000..d1e6b9b --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_ASN_PRINT.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_ASN_PRINT + { + public string Site { get; set; } + public string FileNo{get;set;} + public string DeliveryNo{get;set;} + public string ChineseAddress{get;set;} + public string EnglishAddress{get;set;} + public string SupplierNo{get;set;} + public string SupplierName{get;set;} + public string SupplierContacter{get;set;} + public string SupplierPhone => ScpCache.GetVendPhone(SupplierNo,Site); + public string SupplierFax => ScpCache.GetVendFax(SupplierNo,Site); + public string DueDeliveryDate{get;set;} + public string MaterialPlanner{get;set;} + public string CAAIPhone{get;set;} + public string CAAIFax { get; set; } + + + } + + public class V_ASN_PRINT_DETAIL + { + public string PartNo { get; set; } + public string PartDesc { get; set; } + public string Unit { get; set; } + public string STD { get; set; } + public string Boxes { get; set; } + public string DeliverQty { get; set; } + public string ReceiveQty { get; set; } + public string PoNo { get; set; } + public string LineNO { get; set; } + public string Memo { get; set; } + public string DockCode { get; set; } + public string Batch { get; set; } + + public string ProjectId { get; set; } + public string DockCode_Desc => ScpCache.PortList.Where(p => p.PORT_NO == DockCode).FirstOrDefault() == null ? "" : ScpCache.PortList.Where(p => p.PORT_NO == DockCode).FirstOrDefault().PORT_DESCRIPTION; + + } + +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_BillShip.cs b/北京北汽/SCP/Models/ScpEntity/V_BillShip.cs new file mode 100644 index 0000000..2a0db19 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_BillShip.cs @@ -0,0 +1,93 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_BillShip + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string Bill { get; set; } + + public DateTime BillTime { get; set; } + + [Required] + [StringLength(50)] + public string PoBillNum { get; set; } + + [Required] + [StringLength(50)] + public string VendId { get; set; } + + [Required] + [StringLength(50)] + public string OperName { get; set; } + + public DateTime ShipTime { get; set; } + + public int State { get; set; } + + [StringLength(50)] + public string Remark { get; set; } + + public DateTime? ReceiveTime { get; set; } + + [StringLength(50)] + public string ModType { get; set; } + + [Column(TypeName = "date")] + public DateTime? DueDate { get; set; } + + [StringLength(50)] + public string Contacter { get; set; } + + [StringLength(50)] + public string ShipToSite { get; set; } + + [StringLength(50)] + public string Buyer { get; set; } + + [StringLength(50)] + public string BuyerPhone { get; set; } + + + [Required] + [StringLength(50)] + public string VendName { get; set; } + + [Required] + [StringLength(2)] + public string VendAbbCode { get; set; } + + [StringLength(50)] + public string VendType { get; set; } + + [StringLength(50)] + public string Country { get; set; } + + [StringLength(50)] + public string City { get; set; } + + [StringLength(50)] + public string Currency { get; set; } + + [StringLength(200)] + public string Address { get; set; } + + [StringLength(50)] + public string ZipCode { get; set; } + + [StringLength(50)] + public string Phone { get; set; } + + [StringLength(50)] + public string Fax { get; set; } + + [StringLength(50)] + public string Email { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_BillShipDetail.cs b/北京北汽/SCP/Models/ScpEntity/V_BillShipDetail.cs new file mode 100644 index 0000000..9c6b10b --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_BillShipDetail.cs @@ -0,0 +1,132 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_BillShipDetail + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string BillNum { get; set; } + + + [StringLength(50)] + public string PoBillNum { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int PoLineNum { get; set; } + + [StringLength(50)] + public string PartCode { get; set; } + + + [StringLength(50)] + public string Batch { get; set; } + + [Column(TypeName = "date")] + public DateTime ProduceDate { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + [Column(TypeName = "money")] + public decimal BillQty { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + [StringLength(50)] + public string LocUnit { get; set; } + + [Column(TypeName = "money")] + public decimal Price { get; set; } + + [StringLength(50)] + public string Currency { get; set; } + + [Column(TypeName = "money")] + public decimal PackQty { get; set; } + + public int State { get; set; } + + + + public int? BillType { get; set; } + + public DateTime? BillTime { get; set; } + + + + [Required] + [StringLength(50)] + public string AsnBillNum { get; set; } + + [Required] + [StringLength(50)] + public string VendId { get; set; } + + [Required] + [StringLength(50)] + public string OperName { get; set; } + + public DateTime? ShipTime { get; set; } + + public DateTime? ReceiveTime { get; set; } + + [StringLength(50)] + public string Remark { get; set; } + + + [StringLength(50)] + public string AsnBillNUm { get; set; } + + + [Column(TypeName = "money")] + public decimal? ReceivedQty { get; set; } + + [Required] + [StringLength(50)] + public string ErpPartCode { get; set; } + + [Required] + public string PartDesc1 { get; set; } + + [Required] + public string PartDesc2 { get; set; } + + [Required] + [StringLength(50)] + public string ProjectId { get; set; } + + [Required] + [StringLength(50)] + public string Unit { get; set; } + + [Required] + [StringLength(50)] + public string PartGroup { get; set; } + + + + [StringLength(100)] + public string Configuration { get; set; } + + public int? ValidityDays { get; set; } + + [StringLength(50)] + public string ReceivePort { get; set; } + + [StringLength(50)] + public string PalletSize { get; set; } + + //收货数量 + [Column(TypeName = "money")] + public decimal? Expr15 { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_FORECAST_REPORT.cs b/北京北汽/SCP/Models/ScpEntity/V_FORECAST_REPORT.cs new file mode 100644 index 0000000..48f387c --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_FORECAST_REPORT.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_FORECAST_REPORT + { + public string VendId { get; set; } //供应商编号 + public string PartCode { get; set; } //零件号 + public decimal AskQty { get; set; } //订单要货数量 + public int Month { get; set; } //月份 + public decimal MonthQty1 { get; set; } //N+1 + public decimal MonthQty2 { get; set; } //N+2 + public decimal MonthQty3 { get; set; } //N+3 + [NotMapped] + public string VendName => ScpCache.GetVendName(VendId);//供应商名称 + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_Info.cs b/北京北汽/SCP/Models/ScpEntity/V_Info.cs new file mode 100644 index 0000000..17e94a8 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_Info.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_INFO + { + + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int ID { get; set; } + + + [StringLength(50)] + public string FactoryCode { get; set; } + + [StringLength(50)] + public string InfoType { get; set; } + + + [StringLength(50)] + public string FactoryName { get; set; } + + public string SupplierCode { get; set; } + public string SupplierName { get; set; } + + [StringLength(50)] + public string VendName { get; set; } + + [StringLength(50)] + public string Title { get; set; } + + + public string Content { get; set; } + + public DateTime AddTime { get; set; } + + [StringLength(500)] + public string UserName { get; set; } + + [StringLength(50)] + public string Enable { get; set; } + + public DateTime ReadTime { get; set; } + [StringLength(50)] + public string FileName { get; set; } + [StringLength(50)] + public string FileNameMD5 { get; set; } + + [NotMapped] + public List<string> UserInAddress { set; get; } + + [NotMapped] + public List<string> UserInVendIds { set; get; } + + + [NotMapped] + public List<int> BillStateList { set; get; } + + + + + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_Pie_Chart.cs b/北京北汽/SCP/Models/ScpEntity/V_Pie_Chart.cs new file mode 100644 index 0000000..05d1d9b --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_Pie_Chart.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + + +namespace CK.SCP.Models.ScpEntity +{ + public class V_Pie_Chart + { + public string ShipTime { get; set; } + + public string RecTime { get; set; } + public decimal Qty { get; set; } + public int flag { get; set; } + public List<string> UserInVendIds { set; get; } + public List<string> UserInAddress { set; get; } + public string Site { get; set; } + public string VendId { get; set; } + public string VendName { get; set; } + public string ProjectId { get; set; } + public string ShipUser { get; set; } + public string ReceiveUser { get; set; } + public DateTime BeginTime { get; set; } + + public DateTime EndTime { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_PlanMonth.cs b/北京北汽/SCP/Models/ScpEntity/V_PlanMonth.cs new file mode 100644 index 0000000..e158ae2 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_PlanMonth.cs @@ -0,0 +1,37 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_PlanMonth + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int ID { get; set; } + + [StringLength(50)] + public string Code { get; set; } + + [StringLength(50)] + public string SupplierCode { get; set; } + + public DateTime AddTime { get; set; } + + public DateTime? SendTime { get; set; } + + [StringLength(50)] + public string Name { get; set; } + + [StringLength(50)] + public string Ver { get; set; } + + public string FileName { get; set; } + + public string UserName { get; set; } + + public string IsSend { get; set; } + + public string VendName { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_ReportReceive.cs b/北京北汽/SCP/Models/ScpEntity/V_ReportReceive.cs new file mode 100644 index 0000000..5782b1d --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_ReportReceive.cs @@ -0,0 +1,92 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_ReceiveReport + { + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string BillNum { get; set; } + + [StringLength(50)] + public string PoBillNum { get; set; } + + + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int PoLineNum { get; set; } + + [StringLength(50)] + public string PartCode { get; set; } + + + [StringLength(50)] + public string Batch { get; set; } + + [Column(TypeName = "date")] + public DateTime ProduceDate { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + [Column(TypeName = "money")] + public decimal BillQty { get; set; } + + [Column(TypeName = "money")] + public decimal ReceivedQty { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + [StringLength(50)] + public string LocUnit { get; set; } + + [Column(TypeName = "money")] + public decimal Price { get; set; } + + [StringLength(50)] + public string Currency { get; set; } + + [Column(TypeName = "money")] + public decimal PackQty { get; set; } + + public int State { get; set; } + + + public int BillType { get; set; } + + public DateTime BillTime { get; set; } + + + + [Required] + [StringLength(50)] + public string AsnBillNum { get; set; } + + [Required] + [StringLength(50)] + public string VendId { get; set; } + + [Required] + [StringLength(50)] + public string OperName { get; set; } + + public DateTime ShipTime { get; set; } + + public DateTime ReceiveTime { get; set; } + + + [StringLength(50)] + public string Remark { get; set; } + + + [StringLength(50)] + public string VendName { get; set; } + + [StringLength(50)] + public string PartDesc1 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_SUPPLIERS_REGUALARLY.cs b/北京北汽/SCP/Models/ScpEntity/V_SUPPLIERS_REGUALARLY.cs new file mode 100644 index 0000000..1876fa3 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_SUPPLIERS_REGUALARLY.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class V_SUPPLIERS_REGUALARLY + { + public Nullable<decimal> Regularly { get; set; } + public string PoBillNum { get; set; } + public string AsnBillNum { get; set; } + public string PartCode { get; set; } + public string PartDesc1 { get; set; } + public decimal Qty { get; set; } + public Nullable<decimal> AskQty { get; set; } + public string AskBillNum { get; set; } + public int PoLine { get; set; } + public string RecvBillNum { get; set; } + public string ProjectId { get; set; } + public Nullable<decimal> ReciveSumQty { get; set; } + public string VendId { get; set; } + public string VendName { get; set; } + public string Site { get; set; } + + public DateTime? ShipTime{ get; set; } + + public DateTime? RecTime { get; set; } + + public int ReceiveTimeScope { get; set; } + public int Scope { get; set; } + [NotMapped] + public List<string> UserInAddress { set; get; } + + [NotMapped] + public List<string> UserInVendIds { set; get; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_Stock.cs b/北京北汽/SCP/Models/ScpEntity/V_Stock.cs new file mode 100644 index 0000000..0792548 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_Stock.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_Stock + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string BarCode { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(500)] + public string LocCode { get; set; } + + [Required] + [StringLength(50)] + public string PartCode { get; set; } + + [StringLength(50)] + public string VendId { get; set; } + + [Required] + [StringLength(50)] + public string Batch { get; set; } + + [Column(TypeName = "datetime2")] + public DateTime? ProduceDate { get; set; } + + [Column(TypeName = "datetime2")] + public DateTime? ReceiveDate { get; set; } + + [Required] + public decimal? Qty { get; set; } + + [Key] + [Column(Order = 2)] + public int state { get; set; } + + [Required] + [StringLength(50)] + public string Remark { get; set; } + + [Required] + [StringLength(50)] + public string PartDesc1 { get; set; } + + [NotMapped] + public List<string> UserInVendIds { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TA_CONFIG.cs b/北京北汽/SCP/Models/ScpEntity/V_TA_CONFIG.cs new file mode 100644 index 0000000..8571fbc --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TA_CONFIG.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace WpfApplication1 +{ + using System; + using System.Collections.Generic; + + public partial class V_TA_CONFIG + { + public string FactoryId { get; set; } + public int ConfigId { get; set; } + public int UID { get; set; } + public string ParamName { get; set; } + public string ParamValue { get; set; } + public int State { get; set; } + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TA_LANGUAGE.cs b/北京北汽/SCP/Models/ScpEntity/V_TA_LANGUAGE.cs new file mode 100644 index 0000000..8e30cd0 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TA_LANGUAGE.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_TA_LANGUAGE + { + [StringLength(50)] + public string GUID { get; set; } + [StringLength(50)] + public string CH { get; set; } + [StringLength(50)] + public string LAN { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TA_MOLDSHARING.cs b/北京北汽/SCP/Models/ScpEntity/V_TA_MOLDSHARING.cs new file mode 100644 index 0000000..3c86a78 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TA_MOLDSHARING.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class V_TA_MOLDSHARING + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + public long UID { get; set; } + [StringLength(50)] + public string VendId { get; set; } + [StringLength(50)] + public string PartCode { get; set; } + [StringLength(50)] + public string VendName { get; set; } + [StringLength(50)] + public string PartName { get; set; } + [StringLength(50)] + public string Site { get; set; } + public System.DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public Nullable<System.DateTime> UpdateTime { get; set; } + [StringLength(50)] + public string UpdateUser { get; set; } + public decimal? Qty { get; set; } + public decimal? Count { get; set; } + [Column(TypeName = "money")] + public decimal? Price { get; set; } + [Column(TypeName = "money")] + public decimal? TotalPrice { get; set; } + public bool IsDeleted { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TA_VENDER.cs b/北京北汽/SCP/Models/ScpEntity/V_TA_VENDER.cs new file mode 100644 index 0000000..e9b20a9 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TA_VENDER.cs @@ -0,0 +1,28 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_TA_VENDER + { + [Key] + [StringLength(50)] + public string VendId { get; set; } + + [StringLength(50)] + public string VendName { get; set; } + + [StringLength(50)] + public string Site { get; set; } + + [NotMapped] + public string ShippedQty { get; set; } + + [NotMapped] + public string ArriveQty { get; set; } + + [NotMapped] + public string Promptness { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TA_VEND_PART.cs b/北京北汽/SCP/Models/ScpEntity/V_TA_VEND_PART.cs new file mode 100644 index 0000000..537f0cc --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TA_VEND_PART.cs @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + using System.Linq; + using System.Text; + using System.Threading.Tasks; + + public partial class V_TA_VEND_PART + { + [Key] + public long UID { get; set; } + public string VendId { get; set; } + public string PartCode { get; set; } + public string VendPartCode { get; set; } + public decimal VendPackQty { get; set; } + public string PoUnit { get; set; } + public string Site { get; set; } + public Nullable<decimal> PalletPackQty { get; set; } + public Nullable<decimal> MinPackQty { get; set; } + public Nullable<int> TransportationTime { get; set; } + public string VendName { get; set; } + public string PartDesc1 { get; set; } + public string PartDesc2 { get; set; } + public string ProjectId { get; set; } + [NotMapped] + public string PartDesc { get; set; } + [NotMapped] + public List<string> UserInAddress { set; get; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_ARRIVE.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_ARRIVE.cs new file mode 100644 index 0000000..90c4989 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_ARRIVE.cs @@ -0,0 +1,68 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class V_TB_ARRIVE + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [StringLength(50)] + public string ArrvBillNum { get; set; } + [StringLength(50)] + public string AskBillNum { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + [StringLength(50)] + public string AsnBillNum { get; set; } + [StringLength(50)] + public string Site { get; set; } + [StringLength(50)] + public string SubSite { get; set; } + [StringLength(50)] + public string VendId { get; set; } + public DateTime ShipTime { get; set; } + public int State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + public DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public bool IsDeleted { get; set; } + [StringLength(50)] + public string VendName { get; set; } + [StringLength(50)] + public string OperName { get; set; } + [StringLength(50)] + public string Site_Desc { get; set; } + [StringLength(50)] + public string State_DESC { get; set; } + + public Guid Guid { get; set; } + public string BillType_DESC { get; set; } + public int BillType { get; set; } + [NotMapped] + public List<string> UserInAddress { set; get; } + [NotMapped] + public List<string> UserInSubSite { set; get; } + [NotMapped] + public List<string> UserInVendIds { set; get; } + [NotMapped] + public DateTime? BeginTime { get; set; } + [NotMapped] + public DateTime? EndTime { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_ARRIVE_DETAIL.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_ARRIVE_DETAIL.cs new file mode 100644 index 0000000..4782468 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_ARRIVE_DETAIL.cs @@ -0,0 +1,69 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class V_TB_ARRIVE_DETAIL + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [StringLength(50)] + public string ArrvBillNum { get; set; } + public int PoLine { get; set; } + [StringLength(50)] + public string PartCode { get; set; } + [StringLength(50)] + public string Batch { get; set; } + public decimal Qty { get; set; } + [StringLength(50)] + public string DockCode { get; set; } + [StringLength(50)] + public string Remark { get; set; } + public DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public bool IsDeleted { get; set; } + [StringLength(50)] + public string AsnBillNum { get; set; } + [StringLength(50)] + public string Site { get; set; } + [StringLength(50)] + public string SubSite { get; set; } + [StringLength(50)] + public string VendId { get; set; } + public DateTime? ShipTime { get; set; } + [StringLength(50)] + public string OperName { get; set; } + [StringLength(50)] + public string PartDesc1 { get; set; } + public int State { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + + public Guid Guid { get; set; } + [StringLength(50)] + public string Unit { get; set; } + [StringLength(50)] + public string VendBatch { get; set; } + [StringLength(50)] + public string PoUnit { get; set; } + [StringLength(50)] + public string LocUnit { get; set; } + public string BillType_DESC { get; set; } + [NotMapped] + public string ProjectId { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_ASK.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_ASK.cs new file mode 100644 index 0000000..67bd3e3 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_ASK.cs @@ -0,0 +1,83 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class V_TB_ASK :RecordEntity + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + [Key] + [StringLength(50)] + public string AskBillNum { get; set; } + [StringLength(50)] + public string VendId { get; set; } + [StringLength(50)] + public string Site { get; set; } + [StringLength(50)] + public string Buyer { get; set; } + [StringLength(50)] + public string BuyerPhone { get; set; } + public int? State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + + [StringLength(50)] + public string VendName { get; set; } + [StringLength(50)] + public string State_DESC { get; set; } + [StringLength(50)] + public string ModType_DESC { get; set; } + + public int ModType { get; set; } + + + [StringLength(50)] + public string ErpBillNum { get; set; } + + + public DateTime? BeginTime { get; set; } + + public DateTime? EndTime { get; set; } + + public string SubSite { get; set; } + public Nullable<decimal> Total { get; set; } + #region 条件 + [NotMapped] + public string Batch { get; set; } + + [NotMapped] + public DateTime? ShipTime { get; set; } + [NotMapped] + public string ShipUser { get; set; } + [NotMapped] + public DateTime? ReceiveTime { get; set; } + [NotMapped] + public string ReceiveUser { get; set; } + + [StringLength(50)] + public string Site_Desc { get; set; } + + public string ReceivedPort { get; set; } + [NotMapped] + public string Flag { get; set; } + [NotMapped] + public string Month { get; set; } + [NotMapped] + public bool IsComplete { get; set; } + #endregion + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_ASK_DETAIL.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_ASK_DETAIL.cs new file mode 100644 index 0000000..353f6fc --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_ASK_DETAIL.cs @@ -0,0 +1,117 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + [Serializable] + public partial class V_TB_ASK_DETAIL:RecordEntity + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + public int PoLine { get; set; } + [StringLength(50)] + public string PartCode { get; set; } + [StringLength(50)] + public string VendPartCode { get; set; } + [NotMapped] + public decimal? ShippedQty { get; set; } + public decimal ReceivedQty { get; set; } + [NotMapped] + public decimal RejectQty { get; set; } + [NotMapped] + public decimal ArriveQty { get; set; } + [NotMapped] + public decimal InvoiceQty { get; set; } + [NotMapped] + public decimal OnRoadQty { get; set; } + public DateTime? BeginTime { get; set; } + public DateTime? EndTime { get; set; } + [StringLength(50)] + public string PoUnit { get; set; } + [StringLength(50)] + public string LocUnit { get; set; } + public decimal Price { get; set; } + [StringLength(50)] + public string Currency { get; set; } + public decimal PackQty { get; set; } + public decimal UnConv { get; set; } + [StringLength(50)] + public string DockCode { get; set; } + public int State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + + [StringLength(50)] + public string PartDesc1 { get; set; } + [StringLength(50)] + public string CurrencyDesc { get; set; } + [StringLength(50)] + public string Site { get; set; } + [StringLength(50)] + public string VendName { get; set; } + [StringLength(50)] + public string PartDesc2 { get; set; } + + [StringLength(50)] + public string AskBillNum { get; set; } + public decimal AskQty { get; set; } + [StringLength(50)] + public string VendId { get; set; } + public string ReceivedPort { get; set; } + public string ReceivedPort_Desc { get; set; } + + + public decimal? ReduceQty { get; set; } + + public string SubSite { get; set; } + + + + public int ValidityDays { get; set; } + [NotMapped] + [Column(TypeName = "money")] + public decimal? TempQty { get; set; } + [NotMapped] + [Column(TypeName = "money")] + public decimal CanQty { get; set; } + + + [NotMapped] + public decimal? ContractPrice { get; set; } + [NotMapped] + public decimal? BlancePrice { get; set; } + + + #region 条件 + [NotMapped] + public string VendBatch { get; set; } + [NotMapped] + public string Batch { get; set; } + [NotMapped] + public DateTime? ShipTime { get; set; } + [NotMapped] + public string ShipUser { get; set; } + [NotMapped] + public DateTime? ReceiveTime { get; set; } + [NotMapped] + public string ReceiveUser { get; set; } + [NotMapped] + public DateTime ProduceDate { get; set; } + public string Extend1 { get; set; } + #endregion + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_ASK_DETAIL_PACKAGE.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_ASK_DETAIL_PACKAGE.cs new file mode 100644 index 0000000..c981c64 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_ASK_DETAIL_PACKAGE.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + + [Serializable] + public partial class V_TB_ASK_DETAIL_PACKAGE + { + [Key] + public long UID { get; set; } + public string PoBillNum { get; set; } + public int PoLine { get; set; } + public string PartCode { get; set; } + public decimal ReceivedQty { get; set; } + public Nullable<System.DateTime> BeginTime { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + public string PoUnit { get; set; } + public string LocUnit { get; set; } + public decimal Price { get; set; } + public string Currency { get; set; } + public Nullable<decimal> PackQty { get; set; } + public decimal UnConv { get; set; } + public string DockCode { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public Nullable<System.DateTime> UpdateTime { get; set; } + public string UpdateUser { get; set; } + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + public System.Guid GUID { get; set; } + public string PartDesc1 { get; set; } + public string CurrencyDesc { get; set; } + public string Site { get; set; } + public string VendName { get; set; } + public string PartDesc2 { get; set; } + public string AskBillNum { get; set; } + public decimal AskQty { get; set; } + public string VendId { get; set; } + public string ReceivedPort { get; set; } + public string ReceivedPort_Desc { get; set; } + public Nullable<decimal> ReduceQty { get; set; } + public int ValidityDays { get; set; } + public Nullable<int> State { get; set; } + public Nullable<decimal> MinPackQty { get; set; } + public Nullable<decimal> PalletPackQty { get; set; } + [NotMapped] + public string Batch { set; get; } + [NotMapped] + public DateTime ProduceDate { set; get; } + [NotMapped] + public decimal? Qty { set; get; } + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_ASN.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_ASN.cs new file mode 100644 index 0000000..478f2b2 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_ASN.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class V_TB_ASN:RecordEntity + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [Key] + [StringLength(50)] + public string AsnBillNum { get; set; } + [StringLength(50)] + public string AskBillNum { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + [StringLength(50)] + public string VendId { get; set; } + public int? State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + + public DateTime? ShipTime { get; set; } + [StringLength(50)] + public string ShipUser { get; set; } + public DateTime? ReceiveTime { get; set; } + [StringLength(50)] + public string ReceiveUser { get; set; } + + [StringLength(50)] + public string ErpBillNum { get; set; } + public int? ModType { get; set; } + //[StringLength(50)] + //public string Contacter { get; set; } + [StringLength(50)] + public string Buyer { get; set; } + [StringLength(50)] + public string BuyerPhone { get; set; } + [StringLength(50)] + public string VendName { get; set; } + [StringLength(50)] + public string ModType_DESC { get; set; } + [StringLength(50)] + public string Site { get; set; } + [StringLength(50)] + public string State_DESC { get; set; } + + [StringLength(50)] + public string PlateNumber { get; set; } + + [StringLength(50)] + public string Site_Desc { get; set; } + + public string ReceivedPort { get; set; } + + public string SubSite { get; set; } + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_ASN_DETAIL.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_ASN_DETAIL.cs new file mode 100644 index 0000000..0bc2196 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_ASN_DETAIL.cs @@ -0,0 +1,102 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class V_TB_ASN_DETAIL: RecordEntity + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + public int PoLine { get; set; } + [StringLength(50)] + public string PartCode { get; set; } + [StringLength(50)] + public string VendPartCode { get; set; } + [StringLength(50)] + public string PoUnit { get; set; } + [StringLength(50)] + public string LocUnit { get; set; } + public decimal Price { get; set; } + [StringLength(50)] + public string Currency { get; set; } + public decimal PackQty { get; set; } + public decimal UnConv { get; set; } + [StringLength(50)] + public string DockCode { get; set; } + public int? State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + public DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public DateTime? UpdateTime { get; set; } + [StringLength(50)] + public string UpdateUser { get; set; } + [StringLength(50)] + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + [StringLength(50)] + public string PartDesc1 { get; set; } + [StringLength(50)] + public string CurrencyDesc { get; set; } + [StringLength(50)] + public string Site { get; set; } + [StringLength(50)] + public string VendName { get; set; } + [StringLength(50)] + public string PartDesc2 { get; set; } + [StringLength(50)] + public string AsnBillNum { get; set; } + public decimal Qty { get; set; } + public DateTime? EndTime { get; set; } + [StringLength(50)] + public string VendBatch { get; set; } + public DateTime? ProduceDate { get; set; } + [StringLength(50)] + public string Batch { get; set; } + [StringLength(50)] + public string VendId { get; set; } + [StringLength(50)] + public string AskBillNum { get; set; } + + public Guid Guid { set; get; } + public string ReceivedPort { get; set; } + public string ReceivedPort_Desc { get; set; } + [NotMapped] + [Column(TypeName = "money")] + public decimal CanQty { get; set; } + [NotMapped] + public decimal FailQty { get; set; } + [NotMapped] + public string FailReason { get; set; } + [NotMapped] + public string RejectBillNum { get; set; } + [NotMapped] + public decimal RejectQty { get; set; } + [NotMapped] + public string SQE_BeginTime { get; set; } + [NotMapped] + public string SQE_EndTime { get; set; } + /// <summary> + /// 可退货数量 + /// </summary> + [NotMapped] + public decimal CanRejectQty { get; set; } + public string SubSite { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_ASN_DETAILL_VIEW.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_ASN_DETAILL_VIEW.cs new file mode 100644 index 0000000..5215b5a --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_ASN_DETAILL_VIEW.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + using Utils; + + public partial class V_TB_ASN_DETAIL_VIEW:RecordEntity + { + [Key] + public long UID { get; set; } + public string PoBillNum { get; set; } + public int PoLine { get; set; } + public string PartCode { get; set; } + public string PoUnit { get; set; } + public string LocUnit { get; set; } + public decimal Price { get; set; } + public string Currency { get; set; } + public decimal PackQty { get; set; } + public decimal UnConv { get; set; } + public string DockCode { get; set; } + public Nullable<int> State { get; set; } + public string Remark { get; set; } + public string PartDesc1 { get; set; } + public string CurrencyDesc { get; set; } + public string Site { get; set; } + public string SubSite { get; set; } + public string VendName { get; set; } + public string PartDesc2 { get; set; } + public string AsnBillNum { get; set; } + public decimal Qty { get; set; } + public string VendBatch { get; set; } + public Nullable<System.DateTime> ProduceDate { get; set; } + public string Batch { get; set; } + public string VendId { get; set; } + public string AskBillNum { get; set; } + public string Site_Desc { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + public string ReceivedPort { get; set; } + public string ReceivedPort_Desc { get; set; } + public string PlateNumber { get; set; } + public string Expr1 { get; set; } + public Nullable<System.DateTime> ShipTime { get; set; } + public string ShipUser { get; set; } + public Nullable<System.DateTime> ReceiveTime { get; set; } + public string ReceiveUser { get; set; } + + public int? ASN_STATE { get; set; } + + + + + //public string 单据类型名称 => EnumHelper.GetDescription((BillType)单据类型); + //public string ASN_DESC=> EnumHelper.GetDescription((BillType)单据类型); + [NotMapped] + public Nullable<System.DateTime> ReceiveTimeBegin { get; set; } + [NotMapped] + public Nullable<System.DateTime> ReceiveTimeEnd { get; set; } + + [NotMapped] + public Nullable<System.DateTime> ShipTimeBegin { get; set; } + [NotMapped] + public Nullable<System.DateTime> ShipTimeEnd { get; set; } + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_FORECAST.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_FORECAST.cs new file mode 100644 index 0000000..2619dcf --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_FORECAST.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_TB_FORECAST : RecordEntity + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [StringLength(50)] + public string PartCode { get; set; } + [StringLength(50)] + public string VendId { get; set; } + public int? State { get; set; } + public decimal MonthQty1 { get; set; } + public decimal MonthQty2 { get; set; } + public decimal MonthQty3 { get; set; } + public string Month { get; set; } + [StringLength(50)] + public string State_DESC { get; set; } + [StringLength(50)] + public string Site { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_INCOMOLETE_DETAIL.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_INCOMOLETE_DETAIL.cs new file mode 100644 index 0000000..c53460d --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_INCOMOLETE_DETAIL.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + [Serializable] + public partial class V_TB_INCOMOLETE_DETAIL + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + public string PoBillNum { get; set; } + [StringLength(50)] + public string AskBillNum { get; set; } + [StringLength(50)] + public string PartCode { get; set; } + public string PartDesc1 { get; set; } + public int PoLine { get; set; } + public decimal AskQty { get; set; } + public decimal rec { get; set; } + public decimal arr { get; set; } + public decimal askdelete { get; set; } + + public decimal num { get; set; } //未发货数量 + [NotMapped] + + public DateTime? BeginTime { get; set; } + + public DateTime? EndTime { get; set; } + public DateTime? CreateTime { get; set; } + public int ValidityDays { get; set; } + public string Buyer { get; set; } + public string VendName { get; set; } + public string VendId { get; set; } + [NotMapped] + public DateTime? BeginTimeEnd { get; set; } + + [NotMapped] + public DateTime? BeginTimeStart { get; set; } + + [NotMapped] + public DateTime? EndTimeEnd { get; set; } + + [NotMapped] + public DateTime? EndTimeStart { get; set; } + + public decimal Price { get; set; } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_INCOMPLETE_ASK.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_INCOMPLETE_ASK.cs new file mode 100644 index 0000000..199f300 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_INCOMPLETE_ASK.cs @@ -0,0 +1,62 @@ +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + [Serializable] + public partial class V_TB_INCOMPLETE_ASK : RecordEntity + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + public string PoBillNum { get; set; } + [StringLength(50)] + public string AskBillNum { get; set; } + [StringLength(50)] + public string PartCode { get; set; } + public string PartDesc1 { get; set; } + public int PoLine { get; set; } + public decimal Qty { get; set; } + public decimal AskQty { get; set; } + public decimal ReduceQty { get; set; } + public decimal Number { get; set; } //未发货数量 + [NotMapped] + public decimal InvoiceQty { get; set; }//已开票数量 + [NotMapped] + public decimal RejectQty { get; set; }//退货数量 + [NotMapped] + public decimal ArriveQty { get; set; }//到货数量 + [NotMapped] + public decimal ReceivedQty { get; set; }//合格数量 + [NotMapped] + public decimal OnRoadQty { get; set; }//在途数量 + public DateTime? BeginTime { get; set; } + + public DateTime? EndTime { get; set; } + + public int ValidityDays { get; set; } + + public string Site { get; set; } + public string SubSite { get; set; } + public string Buyer { get; set; } + public string VendId { get; set; } + [NotMapped] + public int SendState { get; set; } + [NotMapped] + public int DayState { get; set; } + + [NotMapped] + public DateTime? BeginTimeEnd { get; set; } + + [NotMapped] + public DateTime? BeginTimeStart { get; set; } + + [NotMapped] + public DateTime? EndTimeEnd { get; set; } + + [NotMapped] + public DateTime? EndTimeStart { get; set; } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_INVOICE.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_INVOICE.cs new file mode 100644 index 0000000..e49e570 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_INVOICE.cs @@ -0,0 +1,117 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + [Serializable] + public partial class V_TB_INVOICE + { + [Key] + public long UID { get; set; } + public string InvcBillNum { get; set; } + public string VendId { get; set; } + public string VendName { get; set; } + + public string InvoiceNum { get; set; } + public int State { get; set; } + public string Remark { get; set; } + public Nullable<decimal> Tax { get; set; } + public Nullable<decimal> TaxAmount { get; set; } + public Nullable<decimal> Amount { get; set; } + public Nullable<decimal> Total { get; set; } + public string ExpressNum { get; set; } + public System.DateTime? CreateTime { get; set; } + public string CreateUser { get; set; } + public Nullable<System.DateTime> UpdateTime { get; set; } + public string UpdateUser { get; set; } + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + public System.Guid GUID { get; set; } + public string Site { get; set; } + public string SubSite { get; set; } + + public string State_DESC { get; set; } + + [NotMapped] + public List<string> UserInAddress { set; get; } + + + [NotMapped] + public List<string> UserInSubSite { set; get; } + + + [NotMapped] + public List<string> UserInVendIds { set; get; } + + + [NotMapped] + public List<int> BillStateList { set; get; } + + [NotMapped] + + public DateTime BeginTime{set;get;} + [NotMapped] + public DateTime EndTime { set; get; } + [NotMapped] + + public List<string> InvoiceList { set; get; } + + public decimal? ContractPrice { set; get; } + public decimal? BlancePrice { set; get; } + public decimal? DiscountPrice { get; set; } + [StringLength(50)] + public string DiscountRemark { get; set; } + public bool IsRed { get; set; } + /// <summary> + /// 采购价 + /// </summary> + public decimal? PurCost { get; set; } + /// <summary> + /// 成本价 + /// </summary> + public decimal? StdCost { get; set; } + + + public decimal? MoldSharingPrice { get; set; } //分摊价格 + + + /// <summary> + /// 发票号 + /// </summary> + public string CInvoiceReference { get; set; } + + + /// <summary> + /// 发票描述 + /// </summary> + public string CInvoiceDescription { get; set; } + + /// <summary> + /// 发票类型 + /// </summary> + public string CInvoiceType { get; set; } + /// <summary> + /// 成本中心 + /// </summary> + public string CInvoiceCostCenterCode { get; set; } + /// <summary> + /// 分账户 + /// </summary> + public string CInvoiceDivisionCode { get; set; } + + + public DateTime? PostingDate { get; set; } + public DateTime? StartTime { get; set; } + public DateTime? EndTimeb { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_INVOICE_ASK.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_INVOICE_ASK.cs new file mode 100644 index 0000000..1a4ef70 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_INVOICE_ASK.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public partial class V_TB_INVOICE_ASK + { + [Key] + public long UID { get; set; } + public int PoLine { get; set; } + public string PartCode { get; set; } + public decimal InvoiceQty { get; set; } + [StringLength(50)] + public string RecvBillNum { get; set; } + + public string Remark { get; set; } + public int BillType { get; set; } + public int State { get; set; } + public string SubSite { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_INVOICE_DETAIL.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_INVOICE_DETAIL.cs new file mode 100644 index 0000000..775ab23 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_INVOICE_DETAIL.cs @@ -0,0 +1,83 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class V_TB_INVOICE_DETAIL:RecordEntity + { + [Key] + public long UID { get; set; } + public string InvcBillNum { get; set; } + public string PoBillNum { get; set; } + public int PoLineNum { get; set; } + public string AsnBillNum { get; set; } + public string PartCode { get; set; } + public string Batch { get; set; } + public Nullable<System.DateTime> ProduceDate { get; set; } + public string VendBatch { get; set; } + public decimal Qty { get; set; } + public string PoUnit { get; set; } + [Column(TypeName = "money")] + public decimal Price { get; set; } + public string Currency { get; set; } + public Nullable<decimal> PackQty { get; set; } + public Nullable<int> State { get; set; } + public string InvoiceNum { get; set; } + public string ExpressNum { get; set; } + public string VendId { get; set; } + public string CurrencyDesc { get; set; } + public string Site { get; set; } + public string SubSite { get; set; } + public Nullable<decimal> Tax { get; set; } + public string RecvBillNum { get; set; } + public string PartDesc1 { get; set; } + public string Remark { get; set; } + public Nullable<System.DateTime> BeginTime { get; set; } + + [NotMapped] + public decimal CanQty { get; set; } + public decimal? ContractPrice { set; get; } + public decimal? BlancePrice { set; get; } + [Column(TypeName = "money")] + public decimal? DiscountPrice { get; set; } + [StringLength(50)] + public string DiscountRemark { get; set; } + public bool IsRed { get; set; } + + public string ProjectId { get; set; } + + [NotMapped] + public bool IsCheck { get; set; } + [NotMapped] + public String VendName { get; set; } + /// <summary> + /// Erp收货单 + /// </summary> + public String ErpRecvBillNum { get; set; } + + /// <summary> + /// 采购价 + /// </summary> + public decimal? PurCost { get; set; } + /// <summary> + /// 成本价 + /// </summary> + public decimal? StdCost { get; set; } + /// <summary> + /// 是否临时价格 + /// </summary> + public int TemporaryPrice { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_PALLET.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_PALLET.cs new file mode 100644 index 0000000..fbab041 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_PALLET.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class V_TB_PALLET : RecordEntity + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + [StringLength(50)] + public string AsnBillNum { get; set; } + [StringLength(50)] + public string AskBillNum { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + [Key] + [StringLength(50)] + public string PalletNum { get; set; } + [StringLength(50)] + public string VendId { get; set; } + public int? State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + + public DateTime? ShipTime { get; set; } + [StringLength(50)] + public string ShipUser { get; set; } + public DateTime? ReceiveTime { get; set; } + [StringLength(50)] + public string ReceiveUser { get; set; } + + [StringLength(50)] + public string ErpBillNum { get; set; } + public int? ModType { get; set; } + //[StringLength(50)] + //public string Contacter { get; set; } + [StringLength(50)] + public string Buyer { get; set; } + [StringLength(50)] + public string BuyerPhone { get; set; } + [StringLength(50)] + public string VendName { get; set; } + [StringLength(50)] + public string ModType_DESC { get; set; } + [StringLength(50)] + public string Site { get; set; } + [StringLength(50)] + public string State_DESC { get; set; } + + [StringLength(50)] + public string PlateNumber { get; set; } + + [StringLength(50)] + public string Site_Desc { get; set; } + + public string ReceivedPort { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_PALLET_DETAIL .cs b/北京北汽/SCP/Models/ScpEntity/V_TB_PALLET_DETAIL .cs new file mode 100644 index 0000000..067ca39 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_PALLET_DETAIL .cs @@ -0,0 +1,84 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class V_TB_PALLET_DETAIL + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + public int PoLine { get; set; } + [StringLength(50)] + public string PartCode { get; set; } + [StringLength(50)] + public string PoUnit { get; set; } + [StringLength(50)] + public string LocUnit { get; set; } + public decimal Price { get; set; } + [StringLength(50)] + public string Currency { get; set; } + public decimal PackQty { get; set; } + public decimal UnConv { get; set; } + [StringLength(50)] + public string DockCode { get; set; } + public int? State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + public DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public DateTime? UpdateTime { get; set; } + [StringLength(50)] + public string UpdateUser { get; set; } + [StringLength(50)] + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + [StringLength(50)] + public string PartDesc1 { get; set; } + [StringLength(50)] + public string CurrencyDesc { get; set; } + [StringLength(50)] + public string Site { get; set; } + [StringLength(50)] + public string VendName { get; set; } + [StringLength(50)] + public string PartDesc2 { get; set; } + [StringLength(50)] + public string AsnBillNum { get; set; } + public decimal Qty { get; set; } + public DateTime? EndTime { get; set; } + [StringLength(50)] + public string VendBatch { get; set; } + public DateTime? ProduceDate { get; set; } + [StringLength(50)] + public string Batch { get; set; } + [StringLength(50)] + public string VendId { get; set; } + [StringLength(50)] + public string AskBillNum { get; set; } + [StringLength(50)] + public string PalletNum { get; set; } + + public Guid Guid { set; get; } + public string ReceivedPort { get; set; } + public string ReceivedPort_Desc { get; set; } + + public string PlateNumber { get; set; } + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_PO.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_PO.cs new file mode 100644 index 0000000..00339fd --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_PO.cs @@ -0,0 +1,64 @@ + + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class V_TB_PO :RecordEntity + { + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [Key] + [StringLength(50)] + public string PoBillNum { get; set; } + [StringLength(50)] + public string ErpBillNum { get; set; } + [StringLength(50)] + public string VendId { get; set; } + public int? ModType { get; set; } + [StringLength(50)] + public string Contacter { get; set; } + [StringLength(50)] + public string Site { get; set; } + [StringLength(50)] + public string Buyer { get; set; } + [StringLength(50)] + public string BuyerPhone { get; set; } + public int? State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + + [StringLength(50)] + public string VendName { get; set; } + + [StringLength(50)] + public string State_DESC { get; set; } + + [StringLength(50)] + public string ModType_DESC { get; set; } + + public DateTime? BeginTime { get; set; } + public DateTime? EndTime { get; set; } + + + [StringLength(50)] + public string Site_Desc { get; set; } + [NotMapped] + public string ReceivedPort { get; set; } + [NotMapped] + public string PartCode { get; set; } + + public string SubSite { get; set; } + + + } + + + + +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_PO_DETAIL.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_PO_DETAIL.cs new file mode 100644 index 0000000..baed813 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_PO_DETAIL.cs @@ -0,0 +1,71 @@ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class V_TB_PO_DETAIL:RecordEntity + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + [StringLength(50)] + public string PoBillNum { get; set; } + public int PoLine { get; set; } + public string PartCode { get; set; } + public decimal PlanQty { get; set; } + public decimal ShippedQty { get; set; } + public decimal ReceivedQty { get; set; } + public string RejectQty { get; set; } + public string ArriveQty { get; set; } + + public Nullable<System.DateTime> BeginTime { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + public string PoUnit { get; set; } + public string LocUnit { get; set; } + public decimal Price { get; set; } + public string Currency { get; set; } + public decimal PackQty { get; set; } + public decimal UnConv { get; set; } + public string DockCode { get; set; } + public int? State { get; set; } + public string Remark { get; set; } + + public string PartDesc1 { get; set; } + public string CurrencyDesc { get; set; } + public string ErpBillNum { get; set; } + public Nullable<int> ModType { get; set; } + public string Contacter { get; set; } + public string Site { get; set; } + public string Buyer { get; set; } + public string BuyerPhone { get; set; } + public string VendName { get; set; } + public string PartDesc2 { get; set; } + + + public string ProjectId { get; set; } + [StringLength(50)] + public string State_DESC { get; set; } + [StringLength(50)] + public string VendId { get; set; } + + public string ReceivedPort { get; set; } + [NotMapped] + public Nullable<decimal> TempQty { get; set; } + + [NotMapped] + public decimal? PublishQty { get; set; } + [NotMapped] + public decimal? ContractPrice { get; set; } + [NotMapped] + public decimal? BlancePrice { get; set; } + public string SubSite { get; set; } + public string PartState { get; set; } + //public decimal AsnQty { get; set; } + //public decimal QJsum { get; set; } + //public decimal vendPackQty { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_PO_DETAIL_CQ.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_PO_DETAIL_CQ.cs new file mode 100644 index 0000000..d55ff04 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_PO_DETAIL_CQ.cs @@ -0,0 +1,70 @@ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class V_TB_PO_DETAIL_CQ : RecordEntity + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + [StringLength(50)] + public string PoBillNum { get; set; } + public int PoLine { get; set; } + public string PartCode { get; set; } + public decimal PlanQty { get; set; } + public decimal ShippedQty { get; set; } + public decimal ReceivedQty { get; set; } + public string RejectQty { get; set; } + public string ArriveQty { get; set; } + + public Nullable<System.DateTime> BeginTime { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + public string PoUnit { get; set; } + public string LocUnit { get; set; } + public decimal Price { get; set; } + public string Currency { get; set; } + public decimal PackQty { get; set; } + public decimal UnConv { get; set; } + public string DockCode { get; set; } + public int? State { get; set; } + public string Remark { get; set; } + + public string PartDesc1 { get; set; } + public string CurrencyDesc { get; set; } + public string ErpBillNum { get; set; } + public Nullable<int> ModType { get; set; } + public string Contacter { get; set; } + public string Site { get; set; } + public string Buyer { get; set; } + public string BuyerPhone { get; set; } + public string VendName { get; set; } + public string PartDesc2 { get; set; } + + + public string ProjectId { get; set; } + [StringLength(50)] + public string State_DESC { get; set; } + [StringLength(50)] + public string VendId { get; set; } + + public string ReceivedPort { get; set; } + [NotMapped] + public Nullable<decimal> TempQty { get; set; } + + [NotMapped] + public decimal? PublishQty { get; set; } + [NotMapped] + public decimal? ContractPrice { get; set; } + [NotMapped] + public decimal? BlancePrice { get; set; } + public string SubSite { get; set; } + public string PartState { get; set; } + public decimal AsnQty { get; set; } + public decimal QJsum { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_PRICE.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_PRICE.cs new file mode 100644 index 0000000..3856f5e --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_PRICE.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models; + + +namespace CK.SCP.Models.ScpEntity +{ + public partial class V_TB_PRICE + { + [Key] + public int UID { get; set; } + public string VendId { get; set; } + public string Site { get; set; } + public string SubSite { get; set; } + public string PartCode { get; set; } + public Nullable<System.DateTime> StartTime { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + public string Curr { get; set; } + public string Unit { get; set; } + [DecimalPrecision(18, 5)] + public decimal Amt { get; set; } + public string Remarks { get; set; } + /// <summary> + /// 状态(已用) + /// </summary> + public string Extend1 { get; set; } + /// <summary> + /// 是否是临时价格(0:否 1:是) + /// </summary> + public string Extend2 { get; set; } + /// <summary> + /// 供应商名称 + /// </summary> + public string Extend3 { get; set; } + [DecimalPrecision(18, 5)] + public decimal SharingPrice { get; set; } + public int TemporaryPrice { get; set; } + public string PartName { get; set; } + /// <summary> + /// 状态 + /// </summary> + public int State { get; set; } + /// <summary> + /// 是否传接口 1是 + /// </summary> + public int IsPost { get; set; } + public string Creator { get; set; } + [NotMapped] + public List<string> UserInAddress { set; get; } + + [NotMapped] + public List<string> UserInVendIds { set; get; } + [NotMapped] + public List<string> UserInSubSite { set; get; } + + [NotMapped] + public List<long> UIDList { set; get; } + public string Flag { get; set; } + [NotMapped] + public string NewStartTime { get; set; } + [NotMapped] + public string NewEndTime { get; set; } + [NotMapped] + public string NewPrice { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_PRICE_DETAIL.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_PRICE_DETAIL.cs new file mode 100644 index 0000000..a1ea5f3 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_PRICE_DETAIL.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models; + + +namespace CK.SCP.Models.ScpEntity +{ + public partial class V_TB_PRICE_DETAIL + { + [Key] + public int UID { get; set; } + public string VendId { get; set; } + public string Site { get; set; } + public string SubSite { get; set; } + public string PartCode { get; set; } + public Nullable<System.DateTime> StartTime { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + public string Curr { get; set; } + public string Unit { get; set; } + [DecimalPrecision(18, 5)] + public decimal Amt { get; set; } + public string Remarks { get; set; } + /// <summary> + /// 状态(已用) + /// </summary> + public string Extend1 { get; set; } + /// <summary> + /// 是否是临时价格(0:否 1:是) + /// </summary> + public string Extend2 { get; set; } + /// <summary> + /// 供应商名称 + /// </summary> + public string Extend3 { get; set; } + [DecimalPrecision(18, 5)] + public decimal SharingPrice { get; set; } + public int TemporaryPrice { get; set; } + public string PartName { get; set; } + /// <summary> + /// 状态 + /// </summary> + public int State { get; set; } + /// <summary> + /// 是否传接口 1是 + /// </summary> + public int IsPost { get; set; } + public string Creator { get; set; } + [NotMapped] + public List<string> UserInAddress { set; get; } + + [NotMapped] + public List<string> UserInVendIds { set; get; } + [NotMapped] + public List<string> UserInSubSite { set; get; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_PRICE_TemporaryPrice.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_PRICE_TemporaryPrice.cs new file mode 100644 index 0000000..020fb3a --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_PRICE_TemporaryPrice.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models; + + +namespace CK.SCP.Models.ScpEntity +{ + public partial class V_TB_PRICE_TemporaryPrice + { + [Key] + public int UID { get; set; } + public string VendId { get; set; } + public string Site { get; set; } + public string SubSite { get; set; } + public string PartCode { get; set; } + public Nullable<System.DateTime> StartTime { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + public string Curr { get; set; } + public string Unit { get; set; } + [DecimalPrecision(18, 5)] + public decimal Amt { get; set; } + public string Remarks { get; set; } + /// <summary> + /// 状态(已用) + /// </summary> + public string Extend1 { get; set; } + /// <summary> + /// 是否是临时价格(0:否 1:是) + /// </summary> + public string Extend2 { get; set; } + /// <summary> + /// 供应商名称 + /// </summary> + public string Extend3 { get; set; } + [DecimalPrecision(18, 5)] + public decimal SharingPrice { get; set; } + public int TemporaryPrice { get; set; } + public string PartName { get; set; } + /// <summary> + /// 状态 + /// </summary> + public int State { get; set; } + /// <summary> + /// 是否传接口 1是 + /// </summary> + public int IsPost { get; set; } + public string Creator { get; set; } + [NotMapped] + public List<string> UserInAddress { set; get; } + + [NotMapped] + public List<string> UserInVendIds { set; get; } + [NotMapped] + public List<string> UserInSubSite { set; get; } + public string Flag { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_QUALITY.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_QUALITY.cs new file mode 100644 index 0000000..fde9860 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_QUALITY.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_TB_QUALITY:RecordEntity + { + [Key] + public long UID { get; set; } + public string Type { get; set; } + + public string Type_Desc { get; set; } + public string Barcode { get; set; } + public string Loccode { get; set; } + public string Pobillnum { get; set; } + public decimal Poline { get; set; } + public string Inspecttype { get; set; } + public string Partcode { get; set; } + public string Batch { get; set; } + public decimal ReceiveQty { get; set; } + public Nullable<decimal> SampleQty { get; set; } + public Nullable<decimal> Inspqty { get; set; } + public Nullable<decimal> Passqty { get; set; } + public Nullable<decimal> Failqty { get; set; } + public Nullable<decimal> Crackqty { get; set; } + public string Inspresult { get; set; } + public string Failreason { get; set; } + public string Vendid { get; set; } + public string Vendbatch { get; set; } + public string state { get; set; } + public Nullable<System.DateTime> Billtime { get; set; } + public string Domain { get; set; } + public string Site { get; set; } + public string By1 { get; set; } + public string By2 { get; set; } + public string By3 { get; set; } + public string PartDesc1 { get; set; } + public string PartDesc2 { get; set; } + public string ProjectId { get; set; } + public Nullable<int> ValidityDays { get; set; } + public string ReceivePort { get; set; } + public Nullable<bool> Ischeck { get; set; } + public string Qlevel { get; set; } + + public string QualityNo { get; set; } + public string VendName { get; set; } + [NotMapped] + public DateTime? BeginTime { get; set; } + [NotMapped] + public DateTime? EndTime { get; set; } + + + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_RECEIVE.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_RECEIVE.cs new file mode 100644 index 0000000..b820d1d --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_RECEIVE.cs @@ -0,0 +1,66 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class V_TB_RECEIVE + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [StringLength(50)] + public string RecvBillNum { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + [StringLength(50)] + public string AsnBillNum { get; set; } + [StringLength(50)] + public string Site { get; set; } + public string SubSite { get; set; } + [StringLength(50)] + public string VendId { get; set; } + public DateTime ShipTime { get; set; } + public int State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + public DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public bool IsDeleted { get; set; } + [StringLength(50)] + public string VendName { get; set; } + [StringLength(50)] + public string OperName { get; set; } + [StringLength(50)] + public string Site_Desc { get; set; } + [StringLength(50)] + public string State_DESC { get; set; } + + public Guid Guid { get; set; } + public string BillType_DESC { get; set; } + [NotMapped] + public List<string> UserInAddress { set; get; } + [NotMapped] + public List<string> UserInSubSite { set; get; } + [NotMapped] + public List<string> UserInVendIds { set; get; } + [NotMapped] + public string ReceiveDetailList { set; get; } + + + public string ErpRecvBillNum { get; set; } + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_RECEIVE_DETAIL.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_RECEIVE_DETAIL.cs new file mode 100644 index 0000000..7444daf --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_RECEIVE_DETAIL.cs @@ -0,0 +1,75 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class V_TB_RECEIVE_DETAIL + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [StringLength(50)] + public string RecvBillNum { get; set; } + public int PoLine { get; set; } + [StringLength(50)] + public string PartCode { get; set; } + [StringLength(50)] + public string Batch { get; set; } + public decimal Qty { get; set; } + [StringLength(50)] + public string DockCode { get; set; } + [StringLength(50)] + public string Remark { get; set; } + public DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public bool IsDeleted { get; set; } + [StringLength(50)] + public string AsnBillNum { get; set; } + [StringLength(50)] + public string Site { get; set; } + public string SubSite { get; set; } + [StringLength(50)] + public string VendId { get; set; } + public DateTime? ShipTime { get; set; } + [StringLength(50)] + public string OperName { get; set; } + [StringLength(50)] + public string PartDesc1 { get; set; } + public int State { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + + public Guid Guid { get; set; } + [StringLength(50)] + public string Unit { get; set; } + [StringLength(50)] + public string VendBatch { get; set; } + [StringLength(50)] + public string PoUnit { get; set; } + [StringLength(50)] + public string LocUnit { get; set; } + public string BillType_DESC { get; set; } + public string ErpRecvBillNum { get; set; } + + public decimal PurCost { set; get; } + public decimal StdCost { set; get; } + + public decimal? Rate { set; get; } + + public decimal? Tax { set; get; } + [NotMapped] + public string ProjectId { set; get; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_RECEIVE_INVOICE.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_RECEIVE_INVOICE.cs new file mode 100644 index 0000000..a725bda --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_RECEIVE_INVOICE.cs @@ -0,0 +1,85 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class V_TB_RECEIVE_INVOICE + { + [Key] + public long UID { get; set; } + public string RecvBillNum { get; set; } + public int PoLine { get; set; } + public string PartCode { get; set; } + public string Batch { get; set; } + public decimal Qty { get; set; } + public string DockCode { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public bool IsDeleted { get; set; } + public System.Guid GUID { get; set; } + public string AsnBillNum { get; set; } + public string Site { get; set; } + public string SubSite { get; set; } + public string VendId { get; set; } + public Nullable<System.DateTime> ShipTime { get; set; } + public string OperName { get; set; } + public string PartDesc1 { get; set; } + public int State { get; set; } + public string PoBillNum { get; set; } + public string VendName { get; set; } + public string Site_Desc { get; set; } + [Column(TypeName = "money")] + public decimal Price { get; set; } + public string Currency { get; set; } + [StringLength(50)] + public string Unit { get; set; } + [StringLength(50)] + public string VendBatch { get; set; } + [StringLength(50)] + public string PoUnit { get; set; } + [StringLength(50)] + public string LocUnit { get; set; } + public string BillType_DESC { get; set; } + public string State_DESC { get; set; } + public Nullable<System.DateTime> BeginTime { get; set; } + + + + public decimal InvQty { get; set; } + public string AskBillNum { get; set; } + + [NotMapped] + public decimal CanQty { get; set; } + + [NotMapped] + public List<string> UserInAddress { set; get; } + + [NotMapped] + public List<string> UserInVendIds { set; get; } + + + [NotMapped] + public List<long> UIDList { set; get; } + + [NotMapped] + public decimal ContractPrice { set; get; } + [NotMapped] + public decimal BlancePrice { set; get; } + [NotMapped] + public decimal DiscountPrice { set; get; } + [NotMapped] + public string DiscountRemark { set; get; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_RECEIVE_LIST.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_RECEIVE_LIST.cs new file mode 100644 index 0000000..213d6da --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_RECEIVE_LIST.cs @@ -0,0 +1,109 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class V_TB_RECEIVE_LIST + { + [Key] + public long UID { get; set; } + public string RecvBillNum { get; set; } + public int PoLine { get; set; } + public string PartCode { get; set; } + public string Batch { get; set; } + public decimal Qty { get; set; } + public string DockCode { get; set; } + public string Remark { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUser { get; set; } + public bool IsDeleted { get; set; } + public System.Guid GUID { get; set; } + public string AsnBillNum { get; set; } + public string Site { get; set; } + public string SubSite { get; set; } + public string VendId { get; set; } + public Nullable<System.DateTime> ShipTime { get; set; } + public string OperName { get; set; } + public string PartDesc1 { get; set; } + public int State { get; set; } + public string PoBillNum { get; set; } + public string VendName { get; set; } + public string Site_Desc { get; set; } + [Column(TypeName = "money")] + public decimal Price { get; set; } + public string Currency { get; set; } + [StringLength(50)] + public string Unit { get; set; } + [StringLength(50)] + public string VendBatch { get; set; } + [StringLength(50)] + public string PoUnit { get; set; } + [StringLength(50)] + public string LocUnit { get; set; } + public string BillType_DESC { get; set; } + public string State_DESC { get; set; } + + public string ProjectId { get; set; } + public Nullable<System.DateTime> BeginTime { get; set; } + + [NotMapped] + public Nullable<System.DateTime> EndTime { get; set; } + + [NotMapped] + public decimal CanQty { get; set; } + + [NotMapped] + public List<string> UserInAddress { set; get; } + + + [NotMapped] + public List<string> UserInSubSite { set; get; } + + [NotMapped] + public List<string> UserInVendIds { set; get; } + [NotMapped] + public int TemporaryPrice { set; get; } + + [NotMapped] + public List<long> UIDList { set; get; } + + [NotMapped] + public decimal ContractPrice { set; get; } + [NotMapped] + public decimal BlancePrice { set; get; } + [NotMapped] + [Column(TypeName = "money")] + public decimal DiscountPrice { set; get; } + [NotMapped] + public string DiscountRemark { set; get; } + [NotMapped] + public bool IsCheck { set; get; } + + public int ModType { set; get; } + + [NotMapped] + public decimal InputQty { set; get; } + + + + + public decimal? StdPrice { set; get; } + + public decimal? PurPrice { set; get; } + public string ErpRecvBillNum { set; get; } + + + public decimal? Tax { set; get; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_REJECT.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_REJECT.cs new file mode 100644 index 0000000..d984c25 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_REJECT.cs @@ -0,0 +1,50 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class V_TB_REJECT + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [StringLength(50)] + public string RjctBillNum { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + [StringLength(50)] + public string AsnBillNum { get; set; } + [StringLength(50)] + public string Site { get; set; } + [StringLength(50)] + public string VendId { get; set; } + public DateTime ShipTime { get; set; } + public int State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + public DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public bool IsDeleted { get; set; } + [StringLength(50)] + public string VendName { get; set; } + [StringLength(50)] + public string OperName { get; set; } + [StringLength(50)] + public string Site_Desc { get; set; } + public string State_DESC { get; set; } + public Guid Guid { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_REJECT_DETAIL.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_REJECT_DETAIL.cs new file mode 100644 index 0000000..bf6cd0e --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_REJECT_DETAIL.cs @@ -0,0 +1,53 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.ScpEntity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + + public partial class V_TB_REJECT_DETAIL + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [StringLength(50)] + public string RjctBillNum { get; set; } + public int PoLine { get; set; } + [StringLength(50)] + public string PartCode { get; set; } + [StringLength(50)] + public string Batch { get; set; } + public decimal Qty { get; set; } + [StringLength(50)] + public string Remark { get; set; } + public DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public bool IsDeleted { get; set; } + [StringLength(50)] + public string AsnBillNum { get; set; } + [StringLength(50)] + public string Site { get; set; } + [StringLength(50)] + public string VendId { get; set; } + public DateTime? ShipTime { get; set; } + [StringLength(50)] + public string OperName { get; set; } + [StringLength(50)] + public string PartDesc1 { get; set; } + public int State { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + + public Guid Guid { get; set; } + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TB_RETURN.cs b/北京北汽/SCP/Models/ScpEntity/V_TB_RETURN.cs new file mode 100644 index 0000000..79083de --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TB_RETURN.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + public class V_TB_RETURN:RecordEntity + { + [Key] + public long UID { get; set; } + public string Type { get; set; } + + public string Type_Desc { get; set; } + public string Barcode { get; set; } + public string Loccode { get; set; } + public string Pobillnum { get; set; } + public decimal Poline { get; set; } + public string Inspecttype { get; set; } + public string Partcode { get; set; } + public string Batch { get; set; } + public decimal ReceiveQty { get; set; } + public Nullable<decimal> SampleQty { get; set; } + public Nullable<decimal> Inspqty { get; set; } + public Nullable<decimal> Passqty { get; set; } + public Nullable<decimal> Failqty { get; set; } + public Nullable<decimal> Crackqty { get; set; } + public string Inspresult { get; set; } + public string Failreason { get; set; } + public string Vendid { get; set; } + public string Vendbatch { get; set; } + public string state { get; set; } + public Nullable<System.DateTime> Billtime { get; set; } + public string Domain { get; set; } + public string Site { get; set; } + public string By1 { get; set; } + public string By2 { get; set; } + public string By3 { get; set; } + public string PartDesc1 { get; set; } + public string PartDesc2 { get; set; } + public string ProjectId { get; set; } + public Nullable<int> ValidityDays { get; set; } + public string ReceivePort { get; set; } + public Nullable<bool> Ischeck { get; set; } + public string Qlevel { get; set; } + + public string QualityNo { get; set; } + public string VendName { get; set; } + + public decimal RejectQty { get; set; } + public string RejectBillNum { get; set; } + public string AsnBillNum { get; set; } + + + [NotMapped] + public DateTime? BeginTime { get; set; } + [NotMapped] + public DateTime? EndTime { get; set; } + + + + + } +} diff --git a/北京北汽/SCP/Models/ScpEntity/V_TIMELY_DELIVERY.cs b/北京北汽/SCP/Models/ScpEntity/V_TIMELY_DELIVERY.cs new file mode 100644 index 0000000..86c9af4 --- /dev/null +++ b/北京北汽/SCP/Models/ScpEntity/V_TIMELY_DELIVERY.cs @@ -0,0 +1,425 @@ +using CK.SCP.Models.Enums; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.ScpEntity +{ + + + + public class V_TB_ASK_RECEIVE + { + + public decimal AskQty { get; set; } + public Nullable<decimal> Qty { get; set; } + public string AskBillNum { get; set; } + public string PoBillNum { get; set; } + public int PoLine { get; set; } + public string PartCode { get; set; } + public Nullable<decimal> Number { get; set; } + public string PartDesc1 { get; set; }// + public bool IsDeleted { get; set; } + public Nullable<System.DateTime> BeginTime { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + [Key] + public long UID { get; set; } + public string Site { get; set; } + public string VendId { get; set; } + + public Nullable<System.DateTime> RecvTime { get; set; } + public Nullable<decimal> ReviceQty { get; set; } + public int? State { get; set; } + + public string ProjectId { get; set; } + + + [NotMapped] + public Nullable<System.DateTime> ShipTime { get; set; } + [NotMapped] + public string CreateUser { get; set; } + + public string Buyer { get; set; } + + [NotMapped] + public DateTime? RecvBeginTime { get; set; } + [NotMapped] + public DateTime? RecvEndTime { get; set; } + + [NotMapped] + public string State_Desc { get; set; } + public string SubSite { get; set; } + + + } + public class TB_ASK_RECEIVE + { + + public decimal AskQty { get; set; } + public Nullable<decimal> Qty { get; set; } + public string AskBillNum { get; set; } + public string PoBillNum { get; set; } + public int PoLine { get; set; } + public string PartCode { get; set; } + public Nullable<decimal> Number { get; set; } + public string PartDesc1 { get; set; }// + public bool IsDeleted { get; set; } + public Nullable<System.DateTime> BeginTime { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + [Key] + public long UID { get; set; } + public string Site { get; set; } + public string VendId { get; set; } + + public Nullable<System.DateTime> RecvTime { get; set; } + public Nullable<decimal> ReviceQty { get; set; } + public int? State { get; set; } + + public string ProjectId { get; set; } + + + [NotMapped] + public Nullable<System.DateTime> ShipTime { get; set; } + [NotMapped] + public string CreateUser { get; set; } + + public string Buyer { get; set; } + + [NotMapped] + public DateTime? RecvBeginTime { get; set; } + [NotMapped] + public DateTime? RecvEndTime { get; set; } + + [NotMapped] + public string State_Desc { get; set; } + + + + //public string SubSite { get; set; } + + + } + public class TB_UNCOMPLETE_TEMPASK + { + + public decimal AskQty { get; set; } + public Nullable<decimal> Qty { get; set; } + public string AskBillNum { get; set; } + public string PoBillNum { get; set; } + public int PoLine { get; set; } + public string PartCode { get; set; } + public Nullable<decimal> Number { get; set; } + public string PartDesc1 { get; set; }// + public bool IsDeleted { get; set; } + public Nullable<System.DateTime> BeginTime { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + [Key] + public long UID { get; set; } + public string Site { get; set; } + public string VendId { get; set; } + + public Nullable<System.DateTime> RecvTime { get; set; } + public Nullable<decimal> ReviceQty { get; set; } + public int? State { get; set; } + + public string ProjectId { get; set; } + + + [NotMapped] + public Nullable<System.DateTime> ShipTime { get; set; } + [NotMapped] + public string CreateUser { get; set; } + + public string Buyer { get; set; } + + [NotMapped] + public DateTime? RecvBeginTime { get; set; } + [NotMapped] + public DateTime? RecvEndTime { get; set; } + + [NotMapped] + public string State_Desc { get; set; } + public string SubSite { get; set; } + + + + + + + + + } + + + + + + + + + + + public partial class TB_PO_PLAN_EXTEND : RecordEntity + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [Key] + [Column(Order = 0)] + public string PoBillNum { get; set; } + [Key] + [Column(Order = 1)] + public string Domain { get; set; } + [Key] + [Column(Order = 5)] + public string Site { get; set; } + [Key] + [Column(Order = 2)] + public DateTime EndTime { get; set; } + + [Key] + [Column(Order = 3)] + public string PartCode { get; set; } + + [Key] + [Column(Order = 4)] + public string Version { get; set; } + + public string ErpBillNum { get; set; } + public string VendId { get; set; } + public Nullable<int> PlanType { get; set; } + public string Contacter { get; set; } + + public string Buyer { get; set; } + + public System.DateTime BeginTime { get; set; } + public string BuyerPhone { get; set; } + public int State { get; set; } + public int PoLine { get; set; } + public decimal PlanQty { get; set; } + public string PoUnit { get; set; } + public string LocUnit { get; set; } + public decimal Price { get; set; } + public string Currency { get; set; } + public decimal PackQty { get; set; } + public decimal UnConv { get; set; } + public string DockCode { get; set; } + public string Remark { get; set; } + public string Extend1 { get; set; } + public string Extend2 { get; set; } + public string Extend3 { get; set; } + + + } + public partial class V_TM_HYANTOLIN_REVIEW + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + [Key] + public string ReviewBillNum { get; set; } + public string RelationReviewNo { get; set; } + public Nullable<int> ReviewType { get; set; } + public Nullable<int> ReviewSite { get; set; } + public string BarCode { get; set; } + public string PartCode { get; set; } + public string Batch { get; set; } + public string ProjectId { get; set; } + public Nullable<decimal> Qty { get; set; } + public string BadCouse { get; set; } + public string ReviewResult { get; set; } + public string UltimateDepart { get; set; } + public string UltimateName { get; set; } + public Nullable<decimal> ClaimAmount { get; set; } + public string OperName { get; set; } + public Nullable<System.DateTime> BillDate { get; set; } + public Nullable<System.DateTime> CreateTime { get; set; } + public Nullable<System.DateTime> ReviewTime { get; set; } + public System.Guid Guid { get; set; } + public string Domain { get; set; } + public Nullable<int> State { get; set; } + public string VendId { get; set; } + public string VendName { get; set; } + public string Currency { get; set; } + + public string Unit { get; set; } + public string PartDesc { get; set; } + + public string CaimGUID { get; set; } + [NotMapped] + [DisplayName("开始时间")] + public DateTime? BeginTime { get; set; } + [NotMapped] + [DisplayName("结束时间")] + public DateTime? EndTime { get; set; } + [NotMapped] + public List<string> UserInAddress { set; get; } + + [NotMapped] + public List<string> UserInVendIds { set; get; } + + + [NotMapped] + public List<int> BillStateList { set; get; } + } + public class TB_CLAIM_APPEND + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + public long UID { set; get; } + /// <summary> + /// 索赔GUID + /// </summary> + public Guid? CaimGUID { set; get; } + /// <summary> + /// 文件名 + /// </summary> + public string FileName { set; get; } + /// <summary> + /// 扩展名 + /// </summary> + public string Extend { set; get; } + /// <summary> + /// 创建时间 + /// </summary> + public DateTime? CreateTime { set; get; } + /// <summary> + /// FileNameMD5文件名称 + /// </summary> + public string FileNameMD5 { set; get; } + + [NotMapped] + public string Link { set; get; } + } + public class TM_HYANTOLIN_REVIEW + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [DisplayName("评审单编号")] + public string ReviewBillNum { get; set; } + + [DisplayName("关联单号")] + public string RelationReviewNo { get; set; } + + + [DisplayName("评审单类型")] + public EnumReviewType ReviewType { get; set; } + + [DisplayName("评审单位置")] + public EnumReviewSite ReviewSite { get; set; } + + [Key] + [Column(Order = 1)] + [DisplayName("标签条码")] + public string BarCode { get; set; } + + [DisplayName("物料号")] + public string PartCode { get; set; } + + [DisplayName("批次")] + public string Batch { get; set; } + + [DisplayName("项目")] + public string ProjectId { get; set; } + + [DisplayName("数量")] + public decimal Qty { get; set; } + + [DisplayName("不合格原因")] + public string BadCouse { get; set; } + + [DisplayName("评审结果")] + public string ReviewResult { get; set; } + + [DisplayName("最终处理部门")] + public string UltimateDepart { get; set; } + + [DisplayName("最终处理名称")] + public string UltimateName { get; set; } + + [DisplayName("索赔金额")] + public decimal ClaimAmount { get; set; } + + [DisplayName("操作员")] + public string OperName { get; set; } + + [DisplayName("审核日期")] + public DateTime BillDate { get; set; } + + [DisplayName("创建时间")] + public DateTime CreateTime { get; set; } + + [DisplayName("审核时间")] + public DateTime ReviewTime { get; set; } + + + [DisplayName("Guid")] + public Guid Guid { get; set; } + + [DisplayName("域")] + public string Domain { get; set; } + + + public int State { get; set; } + [NotMapped] + [DisplayName("开始时间")] + public DateTime? BeginTime { get; set; } + [NotMapped] + [DisplayName("结束时间")] + public DateTime? EndTime { get; set; } + [NotMapped] + public List<string> UserInAddress { set; get; } + + [NotMapped] + public List<string> UserInVendIds { set; get; } + + + [NotMapped] + public List<int> BillStateList { set; get; } + + } + + public class V_TIMELY_DELIVERY + { + public decimal AskQty { get; set; } + public decimal ReduceQty { get; set; } + public Nullable<decimal> Qty { get; set; } + public string AskBillNum { get; set; } + public string PoBillNum { get; set; } + public int PoLine { get; set; } + public string PartCode { get; set; } + public Nullable<decimal> Number { get; set; } + public string PartDesc1 { get; set; } + public System.Guid GUID { get; set; } + public bool IsDeleted { get; set; } + public Nullable<System.DateTime> BeginTime { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + public long UID { get; set; } + public Nullable<int> ValidityDays { get; set; } + public string Site { get; set; } + public string VendId { get; set; } + public Nullable<int> ReviceDelayDay { get; set; } + public Nullable<System.DateTime> RecvTime { get; set; } + public Nullable<decimal> ReviceQty { get; set; } + public Nullable<System.DateTime> shiptime { get; set; } + public string CreateUser { get; set; } + + public string Buyer { get; set; } + + [NotMapped] + public DateTime? RecvBeginTime { get; set; } + [NotMapped] + public DateTime? RecvEndTime { get; set; } + + + public string SubSite { get; set; } + + + } +} diff --git a/北京北汽/SCP/Models/StockIn.cs b/北京北汽/SCP/Models/StockIn.cs new file mode 100644 index 0000000..ad557f6 --- /dev/null +++ b/北京北汽/SCP/Models/StockIn.cs @@ -0,0 +1,18 @@ +using ChangKeTec.Wms.Models.Enums; +using ChangKeTec.Wms.Models.Wms; + +namespace ChangKeTec.Wms.Models +{ + public class StockIn + { + public TS_STOCK_DETAIL TemplateDetail { get; set; } + public string BarCode { get; set; } + public string LocCode { get; set; } + public EnumStockState State { get; set; } + public decimal InQty { get; set; } + public string PartCode { get; set; } + public string Batch { get; set; } + public string Remark { get; set; } + public TransType TransType { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/StockOut.cs b/北京北汽/SCP/Models/StockOut.cs new file mode 100644 index 0000000..16a9d40 --- /dev/null +++ b/北京北汽/SCP/Models/StockOut.cs @@ -0,0 +1,16 @@ +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models +{ + public class StockOut + { + public string BarCode { get; set; } + public string LocCode { get; set; } + public EnumStockState State { get; set; } + public decimal OutQty { get; set; } + public string Batch { get; set; } + public string PartCode { get; set; } + public TransType TransType { get; set; } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/TB_PRICE.cs b/北京北汽/SCP/Models/TB_PRICE.cs new file mode 100644 index 0000000..b3c1cd7 --- /dev/null +++ b/北京北汽/SCP/Models/TB_PRICE.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.ScpEntity +{ + + public partial class TB_PRICE + { + [Key] + public int UID { get; set; } + public string VendId { get; set; } + public string Site { get; set; } + public string PartCode { get; set; } + public Nullable<System.DateTime> StartTime { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + public string Curr { get; set; } + public string Unit { get; set; } + public decimal Amt { get; set; } + public string Remarks { get; set; } + public string Extend1 { get; set; } + public string Extend2 { get; set; } + public string Extend3 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/IControlTable.cs b/北京北汽/SCP/Models/UniApiEntity/IControlTable.cs new file mode 100644 index 0000000..b9b18d0 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/IControlTable.cs @@ -0,0 +1,10 @@ +namespace CK.SCP.Models.UniApiEntity +{ + public interface IControlTable:ITable + { + string TableName { get; set; } + int RowCount { get; set; } + + } + +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/UniApiEntity/IDataTable.cs b/北京北汽/SCP/Models/UniApiEntity/IDataTable.cs new file mode 100644 index 0000000..b8f078e --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/IDataTable.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; + +namespace CK.SCP.Models.UniApiEntity +{ + public interface IDataTable:ITable + { + + DateTime? CreateTime { get; set; } + string CreateUser { get; set; } + DateTime? UpdateTime { get; set; } + string UpdateUser { get; set; } + + } + + public interface IInterfaceGetNew + { + List<IControlTable> GetNewCtrlList(UniApiEntities db); + } + + public interface IInterfaceRead + { + + ITable Read(UniApiEntities db, string seq); + List<ITable> ListRead(UniApiEntities db, string seq); + } + + public interface IInterfaceWrite + { + int Write(UniApiEntities db); + int ListWrite(UniApiEntities db, List<ITable> dataList); + } + + +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/UniApiEntity/ITable.cs b/北京北汽/SCP/Models/UniApiEntity/ITable.cs new file mode 100644 index 0000000..6a3c082 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/ITable.cs @@ -0,0 +1,14 @@ +namespace CK.SCP.Models.UniApiEntity +{ + public interface ITable + { + int UID { get; set; } + string Seq { get; set; } + + string QadRead { get; set; } + string WmsRead { get; set; } + string ScmRead { get; set; } + string MesRead { get; set; } + string Remark { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/UniApiEntity/QadTableName.cs b/北京北汽/SCP/Models/UniApiEntity/QadTableName.cs new file mode 100644 index 0000000..fac6afd --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/QadTableName.cs @@ -0,0 +1,88 @@ +using System.ComponentModel; + +namespace CK.SCP.Models.UniApiEntity +{ + public enum QadTableName + { + [Description("物料信息")] + xxqad_pt_mstr, + [Description("供应商信息")] + xxqad_vd_mstr, + [Description("客户信息")] + xxqad_cm_mstr, + [Description("供应商物料信息")] + xxqad_vp_mstr, + [Description("客户物料物料信息")] + xxqad_sche_mstr, + [Description("采购价格信息")] + xxqad_pprice_det, + [Description("销售价格信息")] + xxqad_sprice_det, + [Description("采购订单信息")] + xxqad_pod_det, + [Description("MRP滚动订单信息")] + xxqad_ppod_det, + [Description("销售订单信息")] + xxqad_sod_det, + [Description("库位信息")] + xxqad_loc_det, + [Description("实时库存明细信息")] + xxqad_ld_det, + [Description("BOM信息")] + xxqad_ps_mstr, + [Description("标准成本信息")] + xxqad_sct_det, + [Description("生产线零件信息")] + xxqad_line_mstr, + [Description("????信息")] + xxqad_repsch_det, + [Description("收货单信息")] + xxqad_prh_det + } + + public enum ScmTableName + { + [Description("采购订单")] + xxscm_pod_det, + [Description("发货单(ASN)")] + xxscm_tx_mstr, + [Description("发货单标签列表")] + xxscm_tx_det, + [Description("发票")] + xxscm_inv_det, + } + + public enum WmsTableName + { + [Description("采购收货")] + xxwms_rc_det, + [Description("采购退货")] + xxwms_rt_det, + [Description("采购到货")] + xxwms_arv_det, + [Description("库存明细")] + xxwms_ld_det, + [Description("库存转移")] + xxwms_tr_det, + [Description("生产回冲")] + xxwms_bk_mstr, + [Description("其它出库")] + xxwms_iss_det, + [Description("其它入库")] + xxwms_rct_det, + [Description("销售结算")] + xxwms_soiss_det, + [Description("盘点调整")] + xxwms_tag_det, + [Description("接口")]//TODO 回头需要改成中间库的表名 + TS_UNI_API, + [Description("库存质量")] + xxwms_qua_det, + [Description("零件价格")] + xxqad_pprice_det + + + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/UniApiEntity/UniApiEntities.cs b/北京北汽/SCP/Models/UniApiEntity/UniApiEntities.cs new file mode 100644 index 0000000..cce528b --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/UniApiEntities.cs @@ -0,0 +1,2185 @@ +using System.Data.Entity; + +namespace CK.SCP.Models.UniApiEntity +{ + [DbConfigurationType(typeof(SqlDbConfiguration))] + public partial class UniApiEntities : DbContext + { + public UniApiEntities(string strConn) + : base(strConn) + { + } + public UniApiEntities() + : base("name=ModelUniApi") + { + } + + public virtual DbSet<xxmes_ctrl> xxmes_ctrl { get; set; } + public virtual DbSet<xxqad_cm_mstr> xxqad_cm_mstr { get; set; } + public virtual DbSet<xxqad_ctrl> xxqad_ctrl { get; set; } + public virtual DbSet<xxqad_ld_det> xxqad_ld_det { get; set; } + public virtual DbSet<xxqad_loc_det> xxqad_loc_det { get; set; } + public virtual DbSet<xxqad_pod_det> xxqad_pod_det { get; set; } + public virtual DbSet<xxqad_pprice_det> xxqad_pprice_det { get; set; } + public virtual DbSet<xxqad_prh_det> xxqad_prh_det { get; set; } + public virtual DbSet<xxqad_ps_mstr> xxqad_ps_mstr { get; set; } + public virtual DbSet<xxqad_pt_mstr> xxqad_pt_mstr { get; set; } + public virtual DbSet<xxqad_sche_mstr> xxqad_sche_mstr { get; set; } + public virtual DbSet<xxqad_sct_det> xxqad_sct_det { get; set; } + public virtual DbSet<xxqad_sod_det> xxqad_sod_det { get; set; } + public virtual DbSet<xxqad_sprice_det> xxqad_sprice_det { get; set; } + public virtual DbSet<xxqad_vd_mstr> xxqad_vd_mstr { get; set; } + public virtual DbSet<xxqad_vp_mstr> xxqad_vp_mstr { get; set; } + public virtual DbSet<xxscm_ctrl> xxscm_ctrl { get; set; } + public virtual DbSet<xxscm_inv_det> xxscm_inv_det { get; set; } + public virtual DbSet<xxscm_pod_det> xxscm_pod_det { get; set; } + public virtual DbSet<xxqad_ppod_det> xxqad_ppod_det { get; set; } + public virtual DbSet<xxscm_tx_det> xxscm_tx_det { get; set; } + public virtual DbSet<xxscm_tx_mstr> xxscm_tx_mstr { get; set; } + public virtual DbSet<xxwms_bk_mstr> xxwms_bk_mstr { get; set; } + public virtual DbSet<xxwms_ctrl> xxwms_ctrl { get; set; } + public virtual DbSet<xxwms_arv_det> xxwms_arv_det { get; set; } + public virtual DbSet<xxwms_iss_det> xxwms_iss_det { get; set; } + public virtual DbSet<xxwms_ld_det> xxwms_ld_det { get; set; } + public virtual DbSet<xxwms_rc_det> xxwms_rc_det { get; set; } + public virtual DbSet<xxwms_rct_det> xxwms_rct_det { get; set; } + public virtual DbSet<xxwms_rt_det> xxwms_rt_det { get; set; } + public virtual DbSet<xxwms_soiss_det> xxwms_soiss_det { get; set; } + public virtual DbSet<xxwms_tag_det> xxwms_tag_det { get; set; } + public virtual DbSet<xxwms_tr_det> xxwms_tr_det { get; set; } + public virtual DbSet<xxwms_qua_det> xxwms_qua_det { get; set; } + public virtual DbSet<xxwms_review_det> xxwms_review_det { get; set; } + + + protected override void OnModelCreating(DbModelBuilder modelBuilder) + { + modelBuilder.Entity<xxwms_review_det>() + .Property(e => e.xxwms_review_seq) + .IsUnicode(false); + + + modelBuilder.Entity<xxmes_ctrl>() + .Property(e => e.xxmes_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxmes_ctrl>() + .Property(e => e.xxmes_table) + .IsUnicode(false); + + modelBuilder.Entity<xxmes_ctrl>() + .Property(e => e.xxmes_qad) + .IsUnicode(false); + + modelBuilder.Entity<xxmes_ctrl>() + .Property(e => e.xxmes_mes) + .IsUnicode(false); + + modelBuilder.Entity<xxmes_ctrl>() + .Property(e => e.xxmes_scm) + .IsUnicode(false); + + modelBuilder.Entity<xxmes_ctrl>() + .Property(e => e.xxmes_wms) + .IsUnicode(false); + + modelBuilder.Entity<xxmes_ctrl>() + .Property(e => e.xxmes_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_addr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_name) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_line1) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_line2) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_line3) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_country) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_city) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_phone) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_fax) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_pst_id) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_attn) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_curr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_promo) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_cm_mstr>() + .Property(e => e.xxqad_cm_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ctrl>() + .Property(e => e.xxqad_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ctrl>() + .Property(e => e.xxqad_table) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ctrl>() + .Property(e => e.xxqad_qad) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ctrl>() + .Property(e => e.xxqad_mes) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ctrl>() + .Property(e => e.xxqad_scm) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ctrl>() + .Property(e => e.xxqad_wms) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ctrl>() + .Property(e => e.xxqad_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_site) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_lot) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_qty) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_amt) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_um) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ld_det>() + .Property(e => e.xxqad_ld_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_site) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_desc) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_type) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_loc_det>() + .Property(e => e.xxqad_loc_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_modtype) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_site) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_desc) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_qty_ord) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_qty_rct) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_qty_std) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_price) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_curr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_loc_um) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_um) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_um_conv) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_vend) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_name) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_attn) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_ship) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_made) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_buyer) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_buyer_phone) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_status) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pod_det>() + .Property(e => e.xxqad_pod_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_list) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_curr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_um) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_amt) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pprice_det>() + .Property(e => e.xxqad_pprice_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_receiver) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_psnbr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_trtype) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_po_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_qty_rcvd) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_qty_ord) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_pur_cost) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_curr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_curr_amt) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_site) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_vend) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_ware_class) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_ware) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_po_um) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_loc_um) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_conv) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_lot) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_vend_batch) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_prh_det>() + .Property(e => e.xxqad_prh_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_comp) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_ref) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_qty_per) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_ps_code) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_rmks1) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_ps_mstr>() + .Property(e => e.xxqad_ps_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_site) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_um) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_desc1) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_desc2) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_dsgn_grp) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_promo) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_part_type) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_group) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_prod_line) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_status) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_pt_mstr>() + .Property(e => e.xxqad_pt_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_custpart) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_cust) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_name) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_desc) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_comment) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sche_mstr>() + .Property(e => e.xxqad_sche_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_site) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_ref) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_cst_tot) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sct_det>() + .Property(e => e.xxqad_sct_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_order) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_cust) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_desc) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_price) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_shipto) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_um) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_site) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_pllist) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_qty_std) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sod_det>() + .Property(e => e.xxqad_sod_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_list) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_curr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_um) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_amt) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_sprice_det>() + .Property(e => e.xxqad_sprice_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_addr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_name) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_line1) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_line2) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_line3) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_country) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_city) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_phone) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_fax) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_pst_id) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_attn) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_curr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_promo) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_type) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vd_mstr>() + .Property(e => e.xxqad_vd_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_addr) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_vend_part) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_site) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_comment) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxqad_vp_mstr>() + .Property(e => e.xxqad_vp_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_ctrl>() + .Property(e => e.xxscm_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_ctrl>() + .Property(e => e.xxscm_table) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_ctrl>() + .Property(e => e.xxscm_qad) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_ctrl>() + .Property(e => e.xxscm_mes) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_ctrl>() + .Property(e => e.xxscm_scm) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_ctrl>() + .Property(e => e.xxscm_wms) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_ctrl>() + .Property(e => e.xxscm_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_vend) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_invoice) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_curr) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_order) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_line) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_receiver) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_asn) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_part) + .IsUnicode(false); + + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_modtype) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_site) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_part) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_desc) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_qty_ord) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_qty_rct) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_qty_std) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_price) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_curr) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_loc_um) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_um) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_um_conv) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_vend) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_name) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_attn) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_ship) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_made) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_buyer) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_buyer_phone) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_status) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_pod_det>() + .Property(e => e.xxscm_pod_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_boxcode) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_vend) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_part) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_batch) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_qty_real) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_det>() + .Property(e => e.xxscm_tx_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_po_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_po_line) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_part) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_qty_total) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_qty_std) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_site) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_vend) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_ware_class) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_ware) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_pprice) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_po_um) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_loc_um) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_conv) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_type) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_vend_batch) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxscm_tx_mstr>() + .Property(e => e.xxscm_tx_status) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_part) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_site) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_line) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_lot) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_qty) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_um) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_bk_mstr>() + .Property(e => e.xxwms_bk_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ctrl>() + .Property(e => e.xxwms_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ctrl>() + .Property(e => e.xxwms_table) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ctrl>() + .Property(e => e.xxwms_qad) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ctrl>() + .Property(e => e.xxwms_mes) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ctrl>() + .Property(e => e.xxwms_scm) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ctrl>() + .Property(e => e.xxwms_wms) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ctrl>() + .Property(e => e.xxwms_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_site) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_part) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_lot) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_qty) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_um) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_reason) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_iss_det>() + .Property(e => e.xxwms_iss_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_site) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_part) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_vend) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_lot) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_vend_batch) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_qty) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_um) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_ld_det>() + .Property(e => e.xxwms_ld_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_ps_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_po_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_part) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_qty_total) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_site) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_vend) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_ware_class) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_ware) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_po_um) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_loc_um) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_conv) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_lot) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_vend_batch) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rc_det>() + .Property(e => e.xxwms_rc_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_site) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_part) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_lot) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_qty) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_um) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_reason) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rct_det>() + .Property(e => e.xxwms_rct_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_po_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_part) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_qty_total) + .HasPrecision(18, 5); + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_taxamt) + .HasPrecision(18, 5); + + + modelBuilder.Entity<xxscm_inv_det>() + .Property(e => e.xxscm_inv_price) + .HasPrecision(18, 5); + + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_site) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_vend) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_ware_class) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_ware) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_po_um) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_loc_um) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_conv) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_lot) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_vend_batch) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_rt_det>() + .Property(e => e.xxwms_rt_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_order) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_part) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_qty) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_lot) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_site) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_soiss_det>() + .Property(e => e.xxwms_soiss_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_part) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_loc) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_lot) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_var_qty) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_site) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_domain) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tag_det>() + .Property(e => e.xxwms_tag_updateur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_seq) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_nbr) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_site) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_part) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_lot) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_qty) + .HasPrecision(18, 5); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_loc1) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_loc2) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_um) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_qadread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_wmsread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_scmread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_mesread) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_rmks) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_createur) + .IsUnicode(false); + + modelBuilder.Entity<xxwms_tr_det>() + .Property(e => e.xxwms_tr_updateur) + .IsUnicode(false); + + } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/UniInterfaceExtention.cs b/北京北汽/SCP/Models/UniApiEntity/UniInterfaceExtention.cs new file mode 100644 index 0000000..e72f8bc --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/UniInterfaceExtention.cs @@ -0,0 +1,729 @@ +namespace CK.SCP.Models.UniApiEntity +{ + /* + /// <summary> + /// WMS系统控制主表 + /// </summary> + public partial class xxwms_ctrl : IControlTable + { + [NotMapped] public int UID { get { return xxwms_uid; } set { xxwms_uid = value; } } + [NotMapped] public string Seq { get { return xxwms_seq; } set { xxwms_seq = value; } } + [NotMapped] public string TableName { get { return xxwms_table; } set { xxwms_table = value; } } + [NotMapped] public int RowCount { get { return xxwms_table_qty; } set { xxwms_table_qty = value; } } + [NotMapped] public string QadRead { get { return xxwms_qad; } set { xxwms_qad = value; } } + [NotMapped] public string WmsRead { get { return xxwms_wms; } set { xxwms_wms = value; } } + [NotMapped] public string ScmRead { get { return xxwms_scm; } set { xxwms_scm = value; } } + [NotMapped] public string MesRead { get { return xxwms_mes; } set { xxwms_mes = value; } } + [NotMapped] public string Remark { get { return xxwms_rmks; } set { xxwms_rmks = value; } } + + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// QAD系统控制主表 + /// </summary> + public partial class xxqad_ctrl : IControlTable + { + [NotMapped] public int UID { get { return xxqad_uid; } set { xxqad_uid = value; } } + + [NotMapped] public string Seq { get { return xxqad_seq; } set { xxqad_seq = value; } } + [NotMapped] public string TableName { get { return xxqad_table; } set { xxqad_table = value; } } + [NotMapped] public int RowCount { get { return xxqad_table_qty; } set { xxqad_table_qty = value; } } + [NotMapped] public string QadRead { get { return xxqad_qad; } set { xxqad_qad = value; } } + [NotMapped] public string WmsRead { get { return xxqad_wms; } set { xxqad_wms = value; } } + [NotMapped] public string ScmRead { get { return xxqad_scm; } set { xxqad_scm = value; } } + [NotMapped] public string MesRead { get { return xxqad_mes; } set { xxqad_mes = value; } } + [NotMapped] public string Remark { get { return xxqad_rmks; } set { xxqad_rmks = value; } } + + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + + } + + /// <summary> + /// SCM系统控制主表 + /// </summary> + public partial class xxscm_ctrl : IControlTable + { + [NotMapped] public int UID { get { return xxscm_uid; } set { xxscm_uid = value; } } + + [NotMapped] public string Seq { get { return xxscm_seq; } set { xxscm_seq = value; } } + [NotMapped] public string TableName { get { return xxscm_table; } set { xxscm_table = value; } } + [NotMapped] public int RowCount { get { return xxscm_table_qty; } set { xxscm_table_qty = value; } } + [NotMapped] public string QadRead { get { return xxscm_qad; } set { xxscm_qad = value; } } + [NotMapped] public string WmsRead { get { return xxscm_wms; } set { xxscm_wms = value; } } + [NotMapped] public string ScmRead { get { return xxscm_scm; } set { xxscm_scm = value; } } + [NotMapped] public string MesRead { get { return xxscm_mes; } set { xxscm_mes = value; } } + [NotMapped] public string Remark { get { return xxscm_rmks; } set { xxscm_rmks = value; } } + + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + */ + + /// <summary> + /// 物料信息 from QAD + /// </summary> + public partial class xxqad_pt_mstr + { +// [NotMapped] public int UID { get { return xxqad_pt_uid; } set { xxqad_pt_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_pt_seq; } set { xxqad_pt_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_pt_qadread; } set { xxqad_pt_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_pt_wmsread; } set { xxqad_pt_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_pt_scmread; } set { xxqad_pt_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_pt_mesread; } set { xxqad_pt_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_pt_rmks; } set { xxqad_pt_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_pt_createdt; } set { xxqad_pt_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_pt_createur; } set { xxqad_pt_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_pt_updatedt; } set { xxqad_pt_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_pt_updateur; } set { xxqad_pt_updateur = value; } } + + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 供应商信息 from QAD + /// </summary> + public partial class xxqad_vd_mstr + { +// [NotMapped] public int UID { get { return xxqad_vd_uid; } set { xxqad_vd_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_vd_seq; } set { xxqad_vd_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_vd_qadread; } set { xxqad_vd_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_vd_wmsread; } set { xxqad_vd_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_vd_scmread; } set { xxqad_vd_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_vd_mesread; } set { xxqad_vd_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_vd_rmks; } set { xxqad_vd_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_vd_createdt; } set { xxqad_vd_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_vd_createur; } set { xxqad_vd_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_vd_updatedt; } set { xxqad_vd_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_vd_updateur; } set { xxqad_vd_updateur = value; } } + + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 客户信息 from QAD + /// </summary> + public partial class xxqad_cm_mstr + { +// [NotMapped] public int UID { get { return xxqad_cm_uid; } set { xxqad_cm_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_cm_seq; } set { xxqad_cm_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_cm_qadread; } set { xxqad_cm_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_cm_wmsread; } set { xxqad_cm_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_cm_scmread; } set { xxqad_cm_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_cm_mesread; } set { xxqad_cm_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_cm_rmks; } set { xxqad_cm_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_cm_createdt; } set { xxqad_cm_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_cm_createur; } set { xxqad_cm_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_cm_updatedt; } set { xxqad_cm_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_cm_updateur; } set { xxqad_cm_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 供应商物料信息 from QAD + /// </summary> + public partial class xxqad_vp_mstr + { +// [NotMapped] public int UID { get { return xxqad_vp_uid; } set { xxqad_vp_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_vp_seq; } set { xxqad_vp_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_vp_qadread; } set { xxqad_vp_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_vp_wmsread; } set { xxqad_vp_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_vp_scmread; } set { xxqad_vp_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_vp_mesread; } set { xxqad_vp_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_vp_rmks; } set { xxqad_vp_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_vp_createdt; } set { xxqad_vp_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_vp_createur; } set { xxqad_vp_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_vp_updatedt; } set { xxqad_vp_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_vp_updateur; } set { xxqad_vp_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + + /// <summary> + /// 供应商物料信息 from QAD + /// </summary> + public partial class xxqad_sche_mstr + { +// [NotMapped] public int UID { get { return xxqad_sche_uid; } set { xxqad_sche_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_sche_seq; } set { xxqad_sche_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_sche_qadread; } set { xxqad_sche_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_sche_wmsread; } set { xxqad_sche_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_sche_scmread; } set { xxqad_sche_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_sche_mesread; } set { xxqad_sche_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_sche_rmks; } set { xxqad_sche_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_sche_createdt; } set { xxqad_sche_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_sche_createur; } set { xxqad_sche_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_sche_updatedt; } set { xxqad_sche_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_sche_updateur; } set { xxqad_sche_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 采购价格信息 from QAD + /// </summary> + public partial class xxqad_pprice_det + { +// [NotMapped] public int UID { get { return xxqad_pprice_uid; } set { xxqad_pprice_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_pprice_seq; } set { xxqad_pprice_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_pprice_qadread; } set { xxqad_pprice_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_pprice_wmsread; } set { xxqad_pprice_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_pprice_scmread; } set { xxqad_pprice_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_pprice_mesread; } set { xxqad_pprice_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_pprice_rmks; } set { xxqad_pprice_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_pprice_createdt; } set { xxqad_pprice_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_pprice_createur; } set { xxqad_pprice_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_pprice_updatedt; } set { xxqad_pprice_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_pprice_updateur; } set { xxqad_pprice_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 销售价格信息 from QAD + /// </summary> + public partial class xxqad_sprice_det + { +// [NotMapped] public int UID { get { return xxqad_sprice_uid; } set { xxqad_sprice_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_sprice_seq; } set { xxqad_sprice_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_sprice_qadread; } set { xxqad_sprice_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_sprice_wmsread; } set { xxqad_sprice_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_sprice_scmread; } set { xxqad_sprice_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_sprice_mesread; } set { xxqad_sprice_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_sprice_rmks; } set { xxqad_sprice_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_sprice_createdt; } set { xxqad_sprice_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_sprice_createur; } set { xxqad_sprice_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_sprice_updatedt; } set { xxqad_sprice_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_sprice_updateur; } set { xxqad_sprice_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 采购订单信息 from QAD + /// </summary> + public partial class xxqad_pod_det + { +// [NotMapped] public int UID { get { return xxqad_pod_uid; } set { xxqad_pod_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_pod_seq; } set { xxqad_pod_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_pod_qadread; } set { xxqad_pod_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_pod_wmsread; } set { xxqad_pod_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_pod_scmread; } set { xxqad_pod_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_pod_mesread; } set { xxqad_pod_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_pod_rmks; } set { xxqad_pod_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_pod_createdt; } set { xxqad_pod_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_pod_createur; } set { xxqad_pod_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_pod_updatedt; } set { xxqad_pod_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_pod_updateur; } set { xxqad_pod_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + + /// <summary> + /// 销售订单信息 from QAD + /// </summary> + public partial class xxqad_sod_det + { +// [NotMapped] public int UID { get { return xxqad_sod_uid; } set { xxqad_sod_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_sod_seq; } set { xxqad_sod_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_sod_qadread; } set { xxqad_sod_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_sod_wmsread; } set { xxqad_sod_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_sod_scmread; } set { xxqad_sod_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_sod_mesread; } set { xxqad_sod_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_sod_rmks; } set { xxqad_sod_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_sod_createdt; } set { xxqad_sod_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_sod_createur; } set { xxqad_sod_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_sod_updatedt; } set { xxqad_sod_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_sod_updateur; } set { xxqad_sod_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 库位信息 from QAD + /// </summary> + public partial class xxqad_loc_det + { +// [NotMapped] public int UID { get { return xxqad_loc_uid; } set { xxqad_loc_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_loc_seq; } set { xxqad_loc_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_loc_qadread; } set { xxqad_loc_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_loc_wmsread; } set { xxqad_loc_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_loc_scmread; } set { xxqad_loc_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_loc_mesread; } set { xxqad_loc_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_loc_rmks; } set { xxqad_loc_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_loc_createdt; } set { xxqad_loc_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_loc_createur; } set { xxqad_loc_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_loc_updatedt; } set { xxqad_loc_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_loc_updateur; } set { xxqad_loc_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 实时库存信息 from QAD + /// </summary> + public partial class xxqad_ld_det + { +// [NotMapped] public int UID { get { return xxqad_ld_uid; } set { xxqad_ld_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_ld_seq; } set { xxqad_ld_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_ld_qadread; } set { xxqad_ld_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_ld_wmsread; } set { xxqad_ld_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_ld_scmread; } set { xxqad_ld_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_ld_mesread; } set { xxqad_ld_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_ld_rmks; } set { xxqad_ld_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_ld_createdt; } set { xxqad_ld_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_ld_createur; } set { xxqad_ld_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_ld_updatedt; } set { xxqad_ld_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_ld_updateur; } set { xxqad_ld_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// BOM信息 from QAD + /// </summary> + public partial class xxqad_ps_mstr + { +// [NotMapped] public int UID { get { return xxqad_ps_uid; } set { xxqad_ps_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_ps_seq; } set { xxqad_ps_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_ps_qadread; } set { xxqad_ps_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_ps_wmsread; } set { xxqad_ps_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_ps_scmread; } set { xxqad_ps_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_ps_mesread; } set { xxqad_ps_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_ps_rmks; } set { xxqad_ps_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_ps_createdt; } set { xxqad_ps_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_ps_createur; } set { xxqad_ps_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_ps_updatedt; } set { xxqad_ps_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_ps_updateur; } set { xxqad_ps_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 标准成本信息 from QAD + /// </summary> + public partial class xxqad_sct_det + { +// [NotMapped] public int UID { get { return xxqad_sct_uid; } set { xxqad_sct_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxqad_sct_seq; } set { xxqad_sct_seq = value; } } +// [NotMapped] public string QadRead { get { return xxqad_sct_qadread; } set { xxqad_sct_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxqad_sct_wmsread; } set { xxqad_sct_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxqad_sct_scmread; } set { xxqad_sct_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxqad_sct_mesread; } set { xxqad_sct_mesread = value; } } +// [NotMapped] public string Remark { get { return xxqad_sct_rmks; } set { xxqad_sct_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxqad_sct_createdt; } set { xxqad_sct_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxqad_sct_createur; } set { xxqad_sct_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxqad_sct_updatedt; } set { xxqad_sct_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxqad_sct_updateur; } set { xxqad_sct_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 库存转移 from WMS + /// </summary> + public partial class xxwms_tr_det + { +// [NotMapped] public int UID { get { return xxwms_tr_uid; } set { xxwms_tr_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxwms_tr_seq; } set { xxwms_tr_seq = value; } } +// [NotMapped] public string QadRead { get { return xxwms_tr_qadread; } set { xxwms_tr_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxwms_tr_wmsread; } set { xxwms_tr_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxwms_tr_scmread; } set { xxwms_tr_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxwms_tr_mesread; } set { xxwms_tr_mesread = value; } } +// [NotMapped] public string Remark { get { return xxwms_tr_rmks; } set { xxwms_tr_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxwms_tr_createdt; } set { xxwms_tr_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxwms_tr_createur; } set { xxwms_tr_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxwms_tr_updatedt; } set { xxwms_tr_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxwms_tr_updateur; } set { xxwms_tr_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 采购入库 from WMS + /// </summary> + public partial class xxwms_rc_det + { +// [NotMapped] public int UID { get { return xxwms_rc_uid; } set { xxwms_rc_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxwms_rc_seq; } set { xxwms_rc_seq = value; } } +// [NotMapped] public string QadRead { get { return xxwms_rc_qadread; } set { xxwms_rc_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxwms_rc_wmsread; } set { xxwms_rc_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxwms_rc_scmread; } set { xxwms_rc_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxwms_rc_mesread; } set { xxwms_rc_mesread = value; } } +// [NotMapped] public string Remark { get { return xxwms_rc_rmks; } set { xxwms_rc_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxwms_rc_createdt; } set { xxwms_rc_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxwms_rc_createur; } set { xxwms_rc_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxwms_rc_updatedt; } set { xxwms_rc_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxwms_rc_updateur; } set { xxwms_rc_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 采购退货 from WMS + /// </summary> + public partial class xxwms_rt_det + { +// [NotMapped] public int UID { get { return xxwms_rt_uid; } set { xxwms_rt_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxwms_rt_seq; } set { xxwms_rt_seq = value; } } +// [NotMapped] public string QadRead { get { return xxwms_rt_qadread; } set { xxwms_rt_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxwms_rt_wmsread; } set { xxwms_rt_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxwms_rt_scmread; } set { xxwms_rt_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxwms_rt_mesread; } set { xxwms_rt_mesread = value; } } +// [NotMapped] public string Remark { get { return xxwms_rt_rmks; } set { xxwms_rt_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxwms_rt_createdt; } set { xxwms_rt_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxwms_rt_createur; } set { xxwms_rt_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxwms_rt_updatedt; } set { xxwms_rt_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxwms_rt_updateur; } set { xxwms_rt_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 库存明细带批次 from WMS + /// </summary> + public partial class xxwms_ld_det + { +// [NotMapped] public int UID { get { return xxwms_ld_uid; } set { xxwms_ld_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxwms_ld_seq; } set { xxwms_ld_seq = value; } } +// [NotMapped] public string QadRead { get { return xxwms_ld_qadread; } set { xxwms_ld_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxwms_ld_wmsread; } set { xxwms_ld_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxwms_ld_scmread; } set { xxwms_ld_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxwms_ld_mesread; } set { xxwms_ld_mesread = value; } } +// [NotMapped] public string Remark { get { return xxwms_ld_rmks; } set { xxwms_ld_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxwms_ld_createdt; } set { xxwms_ld_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxwms_ld_createur; } set { xxwms_ld_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxwms_ld_updatedt; } set { xxwms_ld_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxwms_ld_updateur; } set { xxwms_ld_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 生产回冲 from WMS + /// </summary> + public partial class xxwms_bk_mstr + { +// [NotMapped] public int UID { get { return xxwms_bk_uid; } set { xxwms_bk_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxwms_bk_seq; } set { xxwms_bk_seq = value; } } +// [NotMapped] public string QadRead { get { return xxwms_bk_qadread; } set { xxwms_bk_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxwms_bk_wmsread; } set { xxwms_bk_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxwms_bk_scmread; } set { xxwms_bk_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxwms_bk_mesread; } set { xxwms_bk_mesread = value; } } +// [NotMapped] public string Remark { get { return xxwms_bk_rmks; } set { xxwms_bk_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxwms_bk_createdt; } set { xxwms_bk_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxwms_bk_createur; } set { xxwms_bk_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxwms_bk_updatedt; } set { xxwms_bk_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxwms_bk_updateur; } set { xxwms_bk_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 其它出库 from WMS + /// </summary> + public partial class xxwms_iss_det + { +// [NotMapped] public int UID { get { return xxwms_iss_uid; } set { xxwms_iss_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxwms_iss_seq; } set { xxwms_iss_seq = value; } } +// [NotMapped] public string QadRead { get { return xxwms_iss_qadread; } set { xxwms_iss_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxwms_iss_wmsread; } set { xxwms_iss_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxwms_iss_scmread; } set { xxwms_iss_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxwms_iss_mesread; } set { xxwms_iss_mesread = value; } } +// [NotMapped] public string Remark { get { return xxwms_iss_rmks; } set { xxwms_iss_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxwms_iss_createdt; } set { xxwms_iss_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxwms_iss_createur; } set { xxwms_iss_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxwms_iss_updatedt; } set { xxwms_iss_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxwms_iss_updateur; } set { xxwms_iss_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 其它入库 from WMS + /// </summary> + public partial class xxwms_rct_det + { +// [NotMapped] public int UID { get { return xxwms_rct_uid; } set { xxwms_rct_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxwms_rct_seq; } set { xxwms_rct_seq = value; } } +// [NotMapped] public string QadRead { get { return xxwms_rct_qadread; } set { xxwms_rct_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxwms_rct_wmsread; } set { xxwms_rct_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxwms_rct_scmread; } set { xxwms_rct_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxwms_rct_mesread; } set { xxwms_rct_mesread = value; } } +// [NotMapped] public string Remark { get { return xxwms_rct_rmks; } set { xxwms_rct_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxwms_rct_createdt; } set { xxwms_rct_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxwms_rct_createur; } set { xxwms_rct_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxwms_rct_updatedt; } set { xxwms_rct_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxwms_rct_updateur; } set { xxwms_rct_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 销售结算 from WMS + /// </summary> + public partial class xxwms_soiss_det + { +// [NotMapped] public int UID { get { return xxwms_soiss_uid; } set { xxwms_soiss_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxwms_soiss_seq; } set { xxwms_soiss_seq = value; } } +// [NotMapped] public string QadRead { get { return xxwms_soiss_qadread; } set { xxwms_soiss_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxwms_soiss_wmsread; } set { xxwms_soiss_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxwms_soiss_scmread; } set { xxwms_soiss_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxwms_soiss_mesread; } set { xxwms_soiss_mesread = value; } } +// [NotMapped] public string Remark { get { return xxwms_soiss_rmks; } set { xxwms_soiss_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxwms_soiss_createdt; } set { xxwms_soiss_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxwms_soiss_createur; } set { xxwms_soiss_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxwms_soiss_updatedt; } set { xxwms_soiss_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxwms_soiss_updateur; } set { xxwms_soiss_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 库存盘点 from WMS + /// </summary> + public partial class xxwms_tag_det + { +// [NotMapped] public int UID { get { return xxwms_tag_uid; } set { xxwms_tag_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxwms_tag_seq; } set { xxwms_tag_seq = value; } } +// [NotMapped] public string QadRead { get { return xxwms_tag_qadread; } set { xxwms_tag_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxwms_tag_wmsread; } set { xxwms_tag_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxwms_tag_scmread; } set { xxwms_tag_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxwms_tag_mesread; } set { xxwms_tag_mesread = value; } } +// [NotMapped] public string Remark { get { return xxwms_tag_rmks; } set { xxwms_tag_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxwms_tag_createdt; } set { xxwms_tag_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxwms_tag_createur; } set { xxwms_tag_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxwms_tag_updatedt; } set { xxwms_tag_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxwms_tag_updateur; } set { xxwms_tag_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + + /// <summary> + /// 发货单(ASN) from SCM + /// </summary> + public partial class xxscm_tx_mstr + { +// [NotMapped] public int UID { get { return xxscm_tx_uid; } set { xxscm_tx_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxscm_tx_seq; } set { xxscm_tx_seq = value; } } +// [NotMapped] public string QadRead { get { return xxscm_tx_qadread; } set { xxscm_tx_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxscm_tx_wmsread; } set { xxscm_tx_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxscm_tx_scmread; } set { xxscm_tx_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxscm_tx_mesread; } set { xxscm_tx_mesread = value; } } +// [NotMapped] public string Remark { get { return xxscm_tx_rmks; } set { xxscm_tx_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxscm_tx_createdt; } set { xxscm_tx_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxscm_tx_createur; } set { xxscm_tx_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxscm_tx_updatedt; } set { xxscm_tx_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxscm_tx_updateur; } set { xxscm_tx_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 发货单明细 from SCM + /// </summary> + public partial class xxscm_tx_det + { +// [NotMapped] public int UID { get { return xxscm_tx_uid; } set { xxscm_tx_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxscm_tx_seq; } set { xxscm_tx_seq = value; } } +// [NotMapped] public string QadRead { get { return xxscm_tx_qadread; } set { xxscm_tx_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxscm_tx_wmsread; } set { xxscm_tx_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxscm_tx_scmread; } set { xxscm_tx_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxscm_tx_mesread; } set { xxscm_tx_mesread = value; } } +// [NotMapped] public string Remark { get { return xxscm_tx_rmks; } set { xxscm_tx_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxscm_tx_createdt; } set { xxscm_tx_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxscm_tx_createur; } set { xxscm_tx_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxscm_tx_updatedt; } set { xxscm_tx_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxscm_tx_updateur; } set { xxscm_tx_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 发票 from SCM + /// </summary> + public partial class xxscm_inv_det + { +// [NotMapped] public int UID { get { return xxscm_inv_uid; } set { xxscm_inv_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxscm_inv_seq; } set { xxscm_inv_seq = value; } } +// [NotMapped] public string QadRead { get { return xxscm_inv_qadread; } set { xxscm_inv_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxscm_inv_wmsread; } set { xxscm_inv_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxscm_inv_scmread; } set { xxscm_inv_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxscm_inv_mesread; } set { xxscm_inv_mesread = value; } } +// [NotMapped] public string Remark { get { return xxscm_inv_rmks; } set { xxscm_inv_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxscm_inv_createdt; } set { xxscm_inv_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxscm_inv_createur; } set { xxscm_inv_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxscm_inv_updatedt; } set { xxscm_inv_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxscm_inv_updateur; } set { xxscm_inv_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + /// <summary> + /// 采购订单信息 from QAD + /// </summary> + public partial class xxscm_pod_det + { +// [NotMapped] public int UID { get { return xxscm_pod_uid; } set { xxscm_pod_uid = value; } } +// +// [NotMapped] public string Seq { get { return xxscm_pod_seq; } set { xxscm_pod_seq = value; } } +// [NotMapped] public string QadRead { get { return xxscm_pod_qadread; } set { xxscm_pod_qadread = value; } } +// [NotMapped] public string WmsRead { get { return xxscm_pod_wmsread; } set { xxscm_pod_wmsread = value; } } +// [NotMapped] public string ScmRead { get { return xxscm_pod_scmread; } set { xxscm_pod_scmread = value; } } +// [NotMapped] public string MesRead { get { return xxscm_pod_mesread; } set { xxscm_pod_mesread = value; } } +// [NotMapped] public string Remark { get { return xxscm_pod_rmks; } set { xxscm_pod_rmks = value; } } +// +// [NotMapped] public DateTime? CreateTime { get { return xxscm_pod_createdt; } set { xxscm_pod_createdt = value; } } +// [NotMapped] public string CreateUser { get { return xxscm_pod_createur; } set { xxscm_pod_createur = value; } } +// [NotMapped] public DateTime? UpdateTime { get { return xxscm_pod_updatedt; } set { xxscm_pod_updatedt = value; } } +// [NotMapped] public string UpdateUser { get { return xxscm_pod_updateur; } set { xxscm_pod_updateur = value; } } + public override string ToString() + { + + return EntitiesHelper.GetPropertiesString(this); + } + } + + +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/UniApiEntity/xxbom_code_mstr.cs b/北京北汽/SCP/Models/UniApiEntity/xxbom_code_mstr.cs new file mode 100644 index 0000000..b28ebad --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxbom_code_mstr.cs @@ -0,0 +1,26 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxbom_code_mstr + { + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string xxbom_code_table { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string xxbom_code_value { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string xxbom_code_rmks { get; set; } + + [StringLength(8)] + public string xxbom_domain { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxbom_ctrl.cs b/北京北汽/SCP/Models/UniApiEntity/xxbom_ctrl.cs new file mode 100644 index 0000000..389638d --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxbom_ctrl.cs @@ -0,0 +1,38 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxbom_ctrl + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int xxbom_uid { get; set; } + + [Key] + [StringLength(50)] + public string xxbom_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxbom_table { get; set; } + + public int xxbom_table_qty { get; set; } + + [StringLength(1)] + public string xxbom_qad { get; set; } + + [StringLength(1)] + public string xxbom_mes { get; set; } + + [StringLength(1)] + public string xxbom_scm { get; set; } + + [StringLength(1)] + public string xxbom_wms { get; set; } + + public string xxbom_rmks { get; set; } + + [StringLength(8)] + public string xxbom_domain { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxbom_ps_mstr.cs b/北京北汽/SCP/Models/UniApiEntity/xxbom_ps_mstr.cs new file mode 100644 index 0000000..c281c46 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxbom_ps_mstr.cs @@ -0,0 +1,126 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxbom_ps_mstr + { + [Key] + public int xxbom_ps_UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxbom_ps_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxbom_ps_project { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxbom_ps_par { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxbom_ps_comp { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(12)] + public string xxbom_ps_ref { get; set; } + + public decimal xxbom_ps_qty_per { get; set; } + + public decimal? xxbom_ps_scrp_pct { get; set; } + + public int? xxbom_ps_lt_off { get; set; } + + public DateTime xxbom_ps_start { get; set; } + + public DateTime? xxbom_ps_end { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(24)] + public string xxbom_ps_rmks { get; set; } + + public int xxbom_ps_op { get; set; } + + public int? xxbom_ps_item_no { get; set; } + + public bool? xxbom_ps_mandatory { get; set; } + + public bool? xxbom_ps_exclusive { get; set; } + + [StringLength(8)] + public string xxbom_ps_process { get; set; } + + [StringLength(1)] + public string xxbom_ps_qty_type { get; set; } + + [StringLength(8)] + public string xxbom_ps_user1 { get; set; } + + [StringLength(8)] + public string xxbom_ps_user2 { get; set; } + + public decimal? xxbom_ps_fcst_pct { get; set; } + + public bool? xxbom_ps_default { get; set; } + + [StringLength(8)] + public string xxbom_ps_group { get; set; } + + public bool? xxbom_ps_critical { get; set; } + + public decimal? xxbom_ps_qty_per_b { get; set; } + + [StringLength(2)] + public string xxbom_ps_comp_um { get; set; } + + [StringLength(50)] + public string xxbom_ps_um_conv { get; set; } + + public decimal? xxbom_ps_assay { get; set; } + + [StringLength(8)] + public string xxbom_ps_comm_code { get; set; } + + public bool? xxbom_ps_non_bal { get; set; } + + public bool? xxbom_ps_byproduct { get; set; } + + [StringLength(8)] + public string xxbom_ps_userid { get; set; } + + [Column(TypeName = "date")] + public DateTime? xxbom_ps_mod_date { get; set; } + + public decimal? xxbom_ps_batch_pct { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxbom_ps_qadread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxbom_ps_wmsread { get; set; } + + [StringLength(1)] + public string xxbom_ps_scmread { get; set; } + + public string xxbom_ps_mesread { get; set; } + + public DateTime? xxbom_ps_createdt { get; set; } + + [StringLength(8)] + public string xxbom_ps_createur { get; set; } + + public DateTime? xxbom_ps_updatedt { get; set; } + + [StringLength(8)] + public string xxbom_ps_updateur { get; set; } + + [StringLength(8)] + public string xxbom_ps_domain { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxbom_pt_mstr.cs b/北京北汽/SCP/Models/UniApiEntity/xxbom_pt_mstr.cs new file mode 100644 index 0000000..c8c016f --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxbom_pt_mstr.cs @@ -0,0 +1,154 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxbom_pt_mstr + { + [Key] + public int xxbom_pt_UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxbom_pt_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxbom_pt_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(24)] + public string xxbom_pt_desc1 { get; set; } + + [StringLength(24)] + public string xxbom_pt_desc2 { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxbom_pt_um { get; set; } + + [StringLength(18)] + public string xxbom_pt_draw { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(4)] + public string xxbom_pt_prod_line { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxbom_pt_group { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxbom_pt_part_type { get; set; } + + [StringLength(8)] + public string xxbom_pt_dsgn_grp { get; set; } + + [StringLength(8)] + public string xxbom_pt_promo { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(4)] + public string xxbom_pt_status { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxbom_pt_abc { get; set; } + + public bool? xxbom_pt_iss_pol { get; set; } + + public bool? xxbom_pt_phantom { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxbom_pt_loc { get; set; } + + public int? xxbom_pt_avg_int { get; set; } + + public int? xxbom_pt_cyc_int { get; set; } + + public bool? xxbom_pt_ms { get; set; } + + public bool? xxbom_pt_plan_ord { get; set; } + + public bool? xxbom_pt_mrp { get; set; } + + [StringLength(3)] + public string xxbom_pt_ord_pol { get; set; } + + public decimal? xxbom_pt_ord_qty { get; set; } + + public int? xxbom_pt_ord_per { get; set; } + + public decimal? xxbom_pt_sfty_stk { get; set; } + + public decimal? xxbom_pt_sfty_time { get; set; } + + public decimal? xxbom_pt_rop { get; set; } + + [StringLength(8)] + public string xxbom_pt_buyer { get; set; } + + [StringLength(8)] + public string xxbom_pt_vend { get; set; } + + [StringLength(1)] + public string xxbom_pt_pm_code { get; set; } + + public decimal? xxbom_pt_mfg_lead { get; set; } + + public int? xxbom_pt_pur_lead { get; set; } + + public bool? xxbom_pt_insp_rqd { get; set; } + + public int? xxbom_pt_insp_lead { get; set; } + + public int? xxbom_pt_cum_lead { get; set; } + + public decimal? xxbom_pt_ord_min { get; set; } + + public decimal? xxbom_pt_ord_max { get; set; } + + public decimal? xxbom_pt_ord_mult { get; set; } + + public decimal? xxbom_pt_yield_pct { get; set; } + + public decimal? xxbom_pt_setup { get; set; } + + public decimal? xxbom_pt_setup_ll { get; set; } + + public decimal? xxbom_pt_run_ll { get; set; } + + public decimal? xxbom_pt_run { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxbom_pt_qadread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxbom_pt_wmsread { get; set; } + + [StringLength(1)] + public string xxbom_pt_scmread { get; set; } + + [StringLength(1)] + public string xxbom_pt_mesread { get; set; } + + public string xxbom_pt_rmks { get; set; } + + public DateTime? xxbom_pt_createdt { get; set; } + + [StringLength(8)] + public string xxbom_pt_createur { get; set; } + + public DateTime? xxbom_pt_updatedt { get; set; } + + [StringLength(8)] + public string xxbom_pt_updateur { get; set; } + + [StringLength(8)] + public string xxbom_pt_domain { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxbom_ro_mstr.cs b/北京北汽/SCP/Models/UniApiEntity/xxbom_ro_mstr.cs new file mode 100644 index 0000000..761a1ca --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxbom_ro_mstr.cs @@ -0,0 +1,69 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxbom_ro_mstr + { + [Key] + public int xxbom_ro_UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxbom_ro_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxbom_ro_routing { get; set; } + + public int xxbom_ro_op { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(24)] + public string xxbom_ro_desc { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxbom_ro_wkctr { get; set; } + + public decimal xxbom_ro_run { get; set; } + + public DateTime? xxbom_ro_start { get; set; } + + public DateTime? xxbom_ro_end { get; set; } + + public bool xxbom_ro_milestone { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxbom_ro_qadread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxbom_ro_wmsread { get; set; } + + [StringLength(1)] + public string xxbom_ro_scmread { get; set; } + + [StringLength(1)] + public string xxbom_ro_mesread { get; set; } + + [StringLength(50)] + public string xxbom_ro_rmks { get; set; } + + public DateTime xxbom_ro_createdt { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxbom_ro_createur { get; set; } + + public DateTime xxbom_ro_updatedt { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxbom_ro_updateur { get; set; } + + [StringLength(8)] + public string xxbom_ro_domain { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxmes_ctrl.cs b/北京北汽/SCP/Models/UniApiEntity/xxmes_ctrl.cs new file mode 100644 index 0000000..40d9b2f --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxmes_ctrl.cs @@ -0,0 +1,43 @@ +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxmes_ctrl + { + public int xxmes_ctrl_uid { get; set; } + + [Key] + [StringLength(50)] + public string xxmes_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxmes_table { get; set; } + + public int xxmes_table_qty { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxmes_qad { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxmes_mes { get; set; } + + [StringLength(1)] + public string xxmes_scm { get; set; } + + [StringLength(1)] + public string xxmes_wms { get; set; } + + public string xxmes_rmks { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxmes_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxmes_site { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxqad_cm_mstr.cs b/北京北汽/SCP/Models/UniApiEntity/xxqad_cm_mstr.cs new file mode 100644 index 0000000..39851db --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxqad_cm_mstr.cs @@ -0,0 +1,98 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_cm_mstr + { + [Key] + public int xxqad_cm_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_cm_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_cm_addr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_cm_domain { get; set; } + + [StringLength(8)] + public string xxqad_cm_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(100)] + public string xxqad_cm_name { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(100)] + public string xxqad_cm_line1 { get; set; } + + [StringLength(100)] + public string xxqad_cm_line2 { get; set; } + + [StringLength(100)] + public string xxqad_cm_line3 { get; set; } + + [StringLength(8)] + public string xxqad_cm_country { get; set; } + + [StringLength(8)] + public string xxqad_cm_city { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(15)] + public string xxqad_cm_phone { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(15)] + public string xxqad_cm_fax { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(15)] + public string xxqad_cm_pst_id { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_cm_attn { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(15)] + public string xxqad_cm_curr { get; set; } + + public bool xxqad_cm_active { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxqad_cm_promo { get; set; } + + public int xxqad_cm_type { get; set; } + + [StringLength(1)] + public string xxqad_cm_qadread { get; set; } + + [StringLength(1)] + public string xxqad_cm_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_cm_scmread { get; set; } + + [StringLength(1)] + public string xxqad_cm_mesread { get; set; } + + public string xxqad_cm_rmks { get; set; } + + public DateTime? xxqad_cm_createdt { get; set; } + + [StringLength(8)] + public string xxqad_cm_createur { get; set; } + + public DateTime? xxqad_cm_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_cm_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxqad_ctrl.cs b/北京北汽/SCP/Models/UniApiEntity/xxqad_ctrl.cs new file mode 100644 index 0000000..57ba9c8 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxqad_ctrl.cs @@ -0,0 +1,45 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_ctrl + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int xxqad_uid { get; set; } + + [Key] + [StringLength(50)] + public string xxqad_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_table { get; set; } + + public int xxqad_table_qty { get; set; } + + [StringLength(1)] + public string xxqad_qad { get; set; } + + [StringLength(1)] + public string xxqad_mes { get; set; } + + [StringLength(1)] + public string xxqad_scm { get; set; } + + [StringLength(1)] + public string xxqad_wms { get; set; } + + public string xxqad_rmks { get; set; } + +// public DateTime xxqad_create_time { get; set; } +// +// [Required(AllowEmptyStrings = true)] +// [StringLength(20)] +// public string xxqad_domain { get; set; } + + //[StringLength(8)] + //public string xxqad_site { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxqad_ld_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxqad_ld_det.cs new file mode 100644 index 0000000..4427b54 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxqad_ld_det.cs @@ -0,0 +1,66 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_ld_det + { + [Key] + public int xxqad_ld_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_ld_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_ld_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_ld_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_ld_loc { get; set; } + + [StringLength(8)] + public string xxqad_ld_lot { get; set; } + + public DateTime? xxqad_ld_date { get; set; } + + public DateTime? xxqad_ld_time { get; set; } + + public decimal xxqad_ld_qty { get; set; } + + [StringLength(2)] + public string xxqad_ld_um { get; set; } + + [StringLength(10)] + public string xxqad_ld_domain { get; set; } + + [StringLength(1)] + public string xxqad_ld_qadread { get; set; } + + [StringLength(1)] + public string xxqad_ld_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_ld_scmread { get; set; } + + [StringLength(1)] + public string xxqad_ld_mesread { get; set; } + + public string xxqad_ld_rmks { get; set; } + + public DateTime? xxqad_ld_createdt { get; set; } + + [StringLength(8)] + public string xxqad_ld_createur { get; set; } + + public DateTime? xxqad_ld_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_ld_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxqad_line_mstr.cs b/北京北汽/SCP/Models/UniApiEntity/xxqad_line_mstr.cs new file mode 100644 index 0000000..414668f --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxqad_line_mstr.cs @@ -0,0 +1,69 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_line_mstr + { + [Key] + public int xxqad_line_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_line_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_line_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_line_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_line_ln { get; set; } + + [StringLength(50)] + public string xxqad_line_desc { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_line_part { get; set; } + + [StringLength(3)] + public string xxqad_line_primary { get; set; } + + public int? xxqad_line_rate { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_line_qadread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_line_mesread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_line_wmsread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_line_scmread { get; set; } + + [StringLength(50)] + public string xxqad_line_rmks { get; set; } + + public DateTime xxqad_line_createdt { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_line_createur { get; set; } + + public DateTime? xxqad_line_updatedt { get; set; } + + [StringLength(50)] + public string xxqad_line_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxqad_loc_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxqad_loc_det.cs new file mode 100644 index 0000000..afadb85 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxqad_loc_det.cs @@ -0,0 +1,56 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_loc_det + { + [Key] + public int xxqad_loc_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_loc_seq { get; set; } + + [StringLength(8)] + public string xxqad_loc_loc { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_loc_site { get; set; } + + [StringLength(50)] + public string xxqad_loc_desc { get; set; } + + [StringLength(8)] + public string xxqad_loc_type { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_loc_domain { get; set; } + + [StringLength(1)] + public string xxqad_loc_qadread { get; set; } + + [StringLength(1)] + public string xxqad_loc_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_loc_scmread { get; set; } + + [StringLength(1)] + public string xxqad_loc_mesread { get; set; } + + public string xxqad_loc_rmks { get; set; } + + public DateTime? xxqad_loc_createdt { get; set; } + + [StringLength(8)] + public string xxqad_loc_createur { get; set; } + + public DateTime? xxqad_loc_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_loc_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxqad_pod_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxqad_pod_det.cs new file mode 100644 index 0000000..827889c --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxqad_pod_det.cs @@ -0,0 +1,129 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_pod_det + { + + + [Key] + public int xxqad_pod_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_pod_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_pod_nbr { get; set; } + + public int xxqad_pod_line { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pod_modtype { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_pod_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_pod_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_pod_part { get; set; } + + [StringLength(50)] + public string xxqad_pod_desc { get; set; } + + public decimal xxqad_pod_qty_ord { get; set; } + + public decimal xxqad_pod_qty_rct { get; set; } + + public decimal xxqad_pod_qty_std { get; set; } + + public DateTime xxqad_pod_due_date { get; set; } + + public decimal xxqad_pod_price { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pod_curr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pod_loc_um { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pod_um { get; set; } + + public decimal xxqad_pod_um_conv { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_pod_vend { get; set; } + + [StringLength(100)] + public string xxqad_pod_name { get; set; } + + [StringLength(8)] + public string xxqad_pod_attn { get; set; } + + [StringLength(50)] + public string xxqad_pod_ship { get; set; } + + [StringLength(2)] + public string xxqad_pod_made { get; set; } + + public bool? xxqad_pod_confirm { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_pod_buyer { get; set; } + + [StringLength(20)] + public string xxqad_pod_buyer_phone { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pod_status { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_pod_qadread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_pod_wmsread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_pod_scmread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_pod_mesread { get; set; } + + public string xxqad_pod_rmks { get; set; } + + public DateTime? xxqad_pod_createdt { get; set; } + + [StringLength(50)] + public string xxqad_pod_createur { get; set; } + + public DateTime? xxqad_pod_updatedt { get; set; } + + [StringLength(50)] + public string xxqad_pod_updateur { get; set; } + /* + public string xxqad_pod_type { get; set; } + public string xxqad_pod_wolot { get; set; } + */ + public string xxqad_pod_loc { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxqad_ppod_det .cs b/北京北汽/SCP/Models/UniApiEntity/xxqad_ppod_det .cs new file mode 100644 index 0000000..5442802 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxqad_ppod_det .cs @@ -0,0 +1,51 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_ppod_det + { + [Key] + public int xxqad_ppod_uid { get; set; } + public string xxqad_ppod_seq { get; set; } + public string xxqad_ppod_nbr { get; set; } + public int xxqad_ppod_line { get; set; } + public string xxqad_ppod_rev { get; set; } + public string xxqad_ppod_site { get; set; } + public string xxqad_ppod_domain { get; set; } + public string xxqad_ppod_part { get; set; } + public string xxqad_ppod_desc { get; set; } + public string xxqad_ppod_type { get; set; } + public string xxqad_ppod_wolot { get; set; } + public Nullable<decimal> xxqad_ppod_pricum { get; set; } + + + public Nullable<decimal> xxqad_ppod_reccum { get; set; } + + + public Nullable<decimal> xxqad_ppod_qty_ord { get; set; } + + + + public decimal xxqad_ppod_qty_std { get; set; } + + + public System.DateTime xxqad_ppod_due_date { get; set; } + public string xxqad_ppod_loc_um { get; set; } + public string xxqad_ppod_um { get; set; } + public decimal xxqad_ppod_um_conv { get; set; } + public string xxqad_ppod_vend { get; set; } + public string xxqad_ppod_buyer { get; set; } + public string xxqad_ppod_buyer_phone { get; set; } + public string xxqad_ppod_status { get; set; } + public string xxqad_ppod_qadread { get; set; } + public string xxqad_ppod_wmsread { get; set; } + public string xxqad_ppod_scmread { get; set; } + public string xxqad_ppod_mesread { get; set; } + public string xxqad_ppod_rmks { get; set; } + public Nullable<System.DateTime> xxqad_ppod_createdt { get; set; } + public string xxqad_ppod_createur { get; set; } + public Nullable<System.DateTime> xxqad_ppod_updatedt { get; set; } + public string xxqad_ppod_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxqad_pprice_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxqad_pprice_det.cs new file mode 100644 index 0000000..75b8835 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxqad_pprice_det.cs @@ -0,0 +1,67 @@ +using ChangKeTec.Wms.Models; +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_pprice_det + { + [Key] + public int xxqad_pprice_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_pprice_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pprice_list { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pprice_domain { get; set; } + + [StringLength(8)] + public string xxqad_pprice_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_pprice_part { get; set; } + + public DateTime? xxqad_pprice_start { get; set; } + + public DateTime? xxqad_pprice_end { get; set; } + + [StringLength(8)] + public string xxqad_pprice_curr { get; set; } + + [StringLength(8)] + public string xxqad_pprice_um { get; set; } + [DecimalPrecision(18, 5)] + public decimal xxqad_pprice_amt { get; set; } + + [StringLength(1)] + public string xxqad_pprice_qadread { get; set; } + + [StringLength(1)] + public string xxqad_pprice_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_pprice_scmread { get; set; } + + [StringLength(1)] + public string xxqad_pprice_mesread { get; set; } + + public string xxqad_pprice_rmks { get; set; } + + public DateTime? xxqad_pprice_createdt { get; set; } + + [StringLength(8)] + public string xxqad_pprice_createur { get; set; } + + public DateTime? xxqad_pprice_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_pprice_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxqad_prh_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxqad_prh_det.cs new file mode 100644 index 0000000..23b04f7 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxqad_prh_det.cs @@ -0,0 +1,132 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_prh_det + { + [Key] + public int xxqad_prh_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_prh_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxqad_prh_receiver { get; set; } + + [StringLength(20)] + public string xxqad_prh_psnbr { get; set; } + + public int xxqad_prh_trnbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_prh_trtype { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_prh_po_nbr { get; set; } + + public int xxqad_prh_po_line { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_prh_part { get; set; } + + public decimal xxqad_prh_qty_rcvd { get; set; } + + public decimal xxqad_prh_qty_ord { get; set; } + + + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_prh_curr { get; set; } + + public decimal? xxqad_prh_curr_amt { get; set; } + + public DateTime xxqad_prh_date_ship { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_prh_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_prh_vend { get; set; } + + [StringLength(20)] + public string xxqad_prh_ware_class { get; set; } + + [StringLength(20)] + public string xxqad_prh_ware { get; set; } + + [StringLength(8)] + public string xxqad_prh_loc { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxqad_prh_po_um { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxqad_prh_loc_um { get; set; } + + public decimal xxqad_prh_conv { get; set; } + + [StringLength(20)] + public string xxqad_prh_lot { get; set; } + + [StringLength(20)] + public string xxqad_prh_vend_batch { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_prh_qadread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_prh_wmsread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_prh_scmread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_prh_mesread { get; set; } + + public string xxqad_prh_rmks { get; set; } + + public DateTime xxqad_prh_createdt { get; set; } + + [StringLength(8)] + public string xxqad_prh_createur { get; set; } + + public DateTime? xxqad_prh_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_prh_updateur { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_prh_domain { get; set; } + /// <summary> + /// ɹ۸ + /// </summary> + public decimal? xxqad_prh_pur_cost { get; set; } + /// <summary> + /// ɱ۸ + /// </summary> + public decimal? xxqad_prh_std_cost { get; set; } + + /// <summary> + /// + /// </summary> + public decimal? xxqad_prh_curr_rate { get; set; } + + public string xxqad_prh_taxc { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxqad_ps_mstr.cs b/北京北汽/SCP/Models/UniApiEntity/xxqad_ps_mstr.cs new file mode 100644 index 0000000..78df3a9 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxqad_ps_mstr.cs @@ -0,0 +1,68 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_ps_mstr + { + [Key] + public int xxqad_ps_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_ps_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_ps_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_ps_comp { get; set; } + + [StringLength(36)] + public string xxqad_ps_ref { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_ps_domain { get; set; } + + public DateTime? xxqad_ps_start { get; set; } + + public DateTime? xxqad_ps_end { get; set; } + + public decimal xxqad_ps_qty_per { get; set; } + + [StringLength(50)] + public string xxqad_ps_ps_code { get; set; } + + [StringLength(8)] + public string xxqad_ps_rmks { get; set; } + + public int xxqad_ps_op { get; set; } + + [StringLength(1)] + public string xxqad_ps_qadread { get; set; } + + [StringLength(1)] + public string xxqad_ps_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_ps_scmread { get; set; } + + [StringLength(1)] + public string xxqad_ps_mesread { get; set; } + + public string xxqad_ps_rmks1 { get; set; } + + public DateTime? xxqad_ps_createdt { get; set; } + + [StringLength(8)] + public string xxqad_ps_createur { get; set; } + + public DateTime? xxqad_ps_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_ps_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxqad_pt_mstr.cs b/北京北汽/SCP/Models/UniApiEntity/xxqad_pt_mstr.cs new file mode 100644 index 0000000..311fba1 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxqad_pt_mstr.cs @@ -0,0 +1,85 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_pt_mstr + { + [Key] + public int xxqad_pt_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_pt_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_pt_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pt_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pt_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxqad_pt_um { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(36)] + public string xxqad_pt_desc1 { get; set; } + + [StringLength(36)] + public string xxqad_pt_desc2 { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pt_dsgn_grp { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pt_promo { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pt_part_type { get; set; } + + [StringLength(8)] + public string xxqad_pt_group { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pt_prod_line { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_pt_status { get; set; } + + [StringLength(1)] + public string xxqad_pt_qadread { get; set; } + + [StringLength(1)] + public string xxqad_pt_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_pt_scmread { get; set; } + + [StringLength(1)] + public string xxqad_pt_mesread { get; set; } + + public string xxqad_pt_rmks { get; set; } + + public DateTime? xxqad_pt_createdt { get; set; } + + [StringLength(8)] + public string xxqad_pt_createur { get; set; } + + public DateTime? xxqad_pt_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_pt_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxqad_repsch_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxqad_repsch_det.cs new file mode 100644 index 0000000..1bc9b01 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxqad_repsch_det.cs @@ -0,0 +1,91 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_repsch_det + { + [Key] + [Column(Order = 0)] + public int xxqad_repsch_uid { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string xxqad_repsch_seq { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(8)] + public string xxqad_repsch_domain { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(8)] + public string xxqad_repsch_site { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(8)] + public string xxqad_repsch_line { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(18)] + public string xxqad_repsch_part { get; set; } + + [Key] + [Column(Order = 6)] + public DateTime xxqad_repsch_duedate { get; set; } + + [StringLength(50)] + public string xxqad_repsch_shift { get; set; } + + [Key] + [Column(Order = 7)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int xxqad_repsch_qty { get; set; } + + [Key] + [Column(Order = 8)] + [StringLength(1)] + public string xxqad_repsch_qadread { get; set; } + + [Key] + [Column(Order = 9)] + [StringLength(1)] + public string xxqad_repsch_mesread { get; set; } + + [Key] + [Column(Order = 10)] + [StringLength(1)] + public string xxqad_repsch_scmread { get; set; } + + [Key] + [Column(Order = 11)] + [StringLength(1)] + public string xxqad_repsch_wmsread { get; set; } + + [StringLength(50)] + public string xxqad_repsch_rmks { get; set; } + + [Key] + [Column(Order = 12)] + public DateTime xxqad_repsch_createdt { get; set; } + + [Key] + [Column(Order = 13)] + [StringLength(50)] + public string xxqad_repsch_createur { get; set; } + + [Key] + [Column(Order = 14)] + public DateTime xxqad_repsch_updatedt { get; set; } + + [Key] + [Column(Order = 15)] + [StringLength(50)] + public string xxqad_repsch_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxqad_ro_mstr.cs b/北京北汽/SCP/Models/UniApiEntity/xxqad_ro_mstr.cs new file mode 100644 index 0000000..0720390 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxqad_ro_mstr.cs @@ -0,0 +1,70 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_ro_mstr + { + [Key] + public int xxqad_ro_UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_ro_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_ro_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_ro_routing { get; set; } + + public int xxqad_ro_op { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(24)] + public string xxqad_ro_desc { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_ro_wkctr { get; set; } + + public decimal xxqad_ro_run { get; set; } + + public DateTime? xxqad_ro_start { get; set; } + + public DateTime? xxqad_ro_end { get; set; } + + public bool xxqad_ro_milestone { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_ro_qadread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxqad_ro_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_ro_scmread { get; set; } + + [StringLength(1)] + public string xxqad_ro_mesread { get; set; } + + [StringLength(50)] + public string xxqad_ro_rmks { get; set; } + + public DateTime xxqad_ro_createdt { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_ro_createur { get; set; } + + public DateTime xxqad_ro_updatedt { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_ro_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxqad_sche_mstr.cs b/北京北汽/SCP/Models/UniApiEntity/xxqad_sche_mstr.cs new file mode 100644 index 0000000..a836c65 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxqad_sche_mstr.cs @@ -0,0 +1,63 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_sche_mstr + { + [Key] + public int xxqad_sche_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_sche_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_sche_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_sche_custpart { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_sche_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_sche_cust { get; set; } + + [StringLength(100)] + public string xxqad_sche_name { get; set; } + + [StringLength(100)] + public string xxqad_sche_desc { get; set; } + + public decimal xxqad_sche_comment { get; set; } + + [StringLength(1)] + public string xxqad_sche_qadread { get; set; } + + [StringLength(1)] + public string xxqad_sche_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_sche_scmread { get; set; } + + [StringLength(1)] + public string xxqad_sche_mesread { get; set; } + + public string xxqad_sche_rmks { get; set; } + + public DateTime? xxqad_sche_createdt { get; set; } + + [StringLength(8)] + public string xxqad_sche_createur { get; set; } + + public DateTime? xxqad_sche_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_sche_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxqad_sct_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxqad_sct_det.cs new file mode 100644 index 0000000..ba94da1 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxqad_sct_det.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_sct_det + { + [Key] + public int xxqad_sct_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_sct_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_sct_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_sct_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_sct_domain { get; set; } + + [StringLength(36)] + public string xxqad_sct_ref { get; set; } + + public decimal xxqad_sct_cst_tot { get; set; } + + public DateTime? xxqad_sct_cst_date { get; set; } + + [StringLength(1)] + public string xxqad_sct_qadread { get; set; } + + [StringLength(1)] + public string xxqad_sct_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_sct_scmread { get; set; } + + [StringLength(1)] + public string xxqad_sct_mesread { get; set; } + + public string xxqad_sct_rmks { get; set; } + + public DateTime? xxqad_sct_createdt { get; set; } + + [StringLength(8)] + public string xxqad_sct_createur { get; set; } + + public DateTime? xxqad_sct_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_sct_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxqad_sod_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxqad_sod_det.cs new file mode 100644 index 0000000..15d8abf --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxqad_sod_det.cs @@ -0,0 +1,79 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_sod_det + { + [Key] + public int xxqad_sod_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_sod_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_sod_order { get; set; } + + public int xxqad_sod_line { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_sod_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_sod_cust { get; set; } + + [StringLength(18)] + public string xxqad_sod_part { get; set; } + + [StringLength(48)] + public string xxqad_sod_desc { get; set; } + + public decimal xxqad_sod_price { get; set; } + + [StringLength(50)] + public string xxqad_sod_shipto { get; set; } + + [StringLength(2)] + public string xxqad_sod_um { get; set; } + + [StringLength(8)] + public string xxqad_sod_site { get; set; } + + [StringLength(8)] + public string xxqad_sod_pllist { get; set; } + + [StringLength(8)] + public string xxqad_sod_loc { get; set; } + + [StringLength(10)] + public string xxqad_sod_qty_std { get; set; } + + [StringLength(1)] + public string xxqad_sod_qadread { get; set; } + + [StringLength(1)] + public string xxqad_sod_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_sod_scmread { get; set; } + + [StringLength(1)] + public string xxqad_sod_mesread { get; set; } + + public string xxqad_sod_rmks { get; set; } + + public DateTime? xxqad_sod_createdt { get; set; } + + [StringLength(8)] + public string xxqad_sod_createur { get; set; } + + public DateTime? xxqad_sod_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_sod_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxqad_sprice_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxqad_sprice_det.cs new file mode 100644 index 0000000..14e7a14 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxqad_sprice_det.cs @@ -0,0 +1,65 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_sprice_det + { + [Key] + public int xxqad_sprice_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_sprice_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_sprice_list { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_sprice_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_sprice_domain { get; set; } + + public DateTime xxqad_sprice_start { get; set; } + + public DateTime? xxqad_sprice_end { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(3)] + public string xxqad_sprice_curr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxqad_sprice_um { get; set; } + + public decimal? xxqad_sprice_amt { get; set; } + + [StringLength(1)] + public string xxqad_sprice_qadread { get; set; } + + [StringLength(1)] + public string xxqad_sprice_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_sprice_scmread { get; set; } + + [StringLength(1)] + public string xxqad_sprice_mesread { get; set; } + + public string xxqad_sprice_rmks { get; set; } + + public DateTime? xxqad_sprice_createdt { get; set; } + + [StringLength(8)] + public string xxqad_sprice_createur { get; set; } + + public DateTime? xxqad_sprice_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_sprice_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxqad_vd_mstr.cs b/北京北汽/SCP/Models/UniApiEntity/xxqad_vd_mstr.cs new file mode 100644 index 0000000..fbeef78 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxqad_vd_mstr.cs @@ -0,0 +1,95 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_vd_mstr + { + [Key] + public int xxqad_vd_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_vd_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_vd_addr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_vd_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(100)] + public string xxqad_vd_name { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(100)] + public string xxqad_vd_line1 { get; set; } + + [StringLength(100)] + public string xxqad_vd_line2 { get; set; } + + [StringLength(100)] + public string xxqad_vd_line3 { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_vd_country { get; set; } + + [StringLength(50)] + public string xxqad_vd_city { get; set; } + + [StringLength(50)] + public string xxqad_vd_phone { get; set; } + + [StringLength(50)] + public string xxqad_vd_fax { get; set; } + + [StringLength(15)] + public string xxqad_vd_pst_id { get; set; } + + [StringLength(50)] + public string xxqad_vd_attn { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(15)] + public string xxqad_vd_curr { get; set; } + + public decimal xxqad_vd_tax { get; set; } + + [StringLength(2)] + public string xxqad_vd_promo { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_vd_type { get; set; } + + [StringLength(1)] + public string xxqad_vd_qadread { get; set; } + + [StringLength(1)] + public string xxqad_vd_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_vd_scmread { get; set; } + + [StringLength(1)] + public string xxqad_vd_mesread { get; set; } + + public string xxqad_vd_rmks { get; set; } + + public DateTime? xxqad_vd_createdt { get; set; } + + [StringLength(8)] + public string xxqad_vd_createur { get; set; } + + public DateTime? xxqad_vd_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_vd_updateur { get; set; } + + + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxqad_vp_mstr.cs b/北京北汽/SCP/Models/UniApiEntity/xxqad_vp_mstr.cs new file mode 100644 index 0000000..08ed54c --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxqad_vp_mstr.cs @@ -0,0 +1,91 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxqad_vp_mstr + { + + //public int xxqad_vp_uid { get; set; } + //public string xxqad_vp_seq { get; set; } + //public string xxqad_vp_addr { get; set; } + //public string xxqad_vp_part { get; set; } + //public string xxqad_vp_domain { get; set; } + //public string xxqad_vp_vend_part { get; set; } + //public string xxqad_vp_site { get; set; } + //public decimal xxqad_vp_comment { get; set; } + //public string xxqad_vp_qadread { get; set; } + //public string xxqad_vp_wmsread { get; set; } + //public string xxqad_vp_scmread { get; set; } + //public string xxqad_vp_mesread { get; set; } + //public string xxqad_vp_rmks { get; set; } + //public Nullable<System.DateTime> xxqad_vp_createdt { get; set; } + //public string xxqad_vp_createur { get; set; } + //public Nullable<System.DateTime> xxqad_vp_updatedt { get; set; } + //public string xxqad_vp_updateur { get; set; } + + + + + [Key] + public int xxqad_vp_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxqad_vp_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_vp_addr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxqad_vp_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxqad_vp_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(36)] + public string xxqad_vp_vend_part { get; set; } + + [StringLength(8)] + public string xxqad_vp_site { get; set; } + + public decimal xxqad_vp_comment { get; set; } + + [StringLength(1)] + public string xxqad_vp_qadread { get; set; } + + [StringLength(1)] + public string xxqad_vp_wmsread { get; set; } + + [StringLength(1)] + public string xxqad_vp_scmread { get; set; } + + [StringLength(1)] + public string xxqad_vp_mesread { get; set; } + + public string xxqad_vp_rmks { get; set; } + + public DateTime? xxqad_vp_createdt { get; set; } + + [StringLength(8)] + public string xxqad_vp_createur { get; set; } + + public DateTime? xxqad_vp_updatedt { get; set; } + + [StringLength(8)] + public string xxqad_vp_updateur { get; set; } + + public int? xxqad_vp_vend_lead { get; set; } + + + + + + + + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxscm_ctrl.cs b/北京北汽/SCP/Models/UniApiEntity/xxscm_ctrl.cs new file mode 100644 index 0000000..44e0552 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxscm_ctrl.cs @@ -0,0 +1,30 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxscm_ctrl + { + [Key] + public int xxscm_uid { get; set; } + [StringLength(50)] + public string xxscm_seq { get; set; } + [StringLength(50)] + public string xxscm_domain { get; set; } + [StringLength(50)] + public string xxscm_site { get; set; } + [StringLength(50)] + public string xxscm_table { get; set; } + public int xxscm_table_qty { get; set; } + [StringLength(50)] + public string xxscm_qad { get; set; } + [StringLength(50)] + public string xxscm_mes { get; set; } + [StringLength(50)] + public string xxscm_scm { get; set; } + [StringLength(50)] + public string xxscm_wms { get; set; } + [StringLength(50)] + public string xxscm_rmks { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxscm_inv_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxscm_inv_det.cs new file mode 100644 index 0000000..82ccd71 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxscm_inv_det.cs @@ -0,0 +1,114 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxscm_inv_det + { + + [Key] + public int xxscm_inv_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxscm_inv_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(58)] + public string xxscm_inv_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(58)] + public string xxscm_inv_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxscm_inv_nbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxscm_inv_vend { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxscm_inv_invoice { get; set; } + + public DateTime xxscm_inv_date { get; set; } + + + public string xxscm_inv_curr { get; set; } + + + public string xxscm_inv_order { get; set; } + + + public string xxscm_inv_line { get; set; } + + + public string xxscm_inv_receiver { get; set; } + + [StringLength(50)] + public string xxscm_inv_asn { get; set; } + + [StringLength(50)] + public string xxscm_inv_part { get; set; } + + public decimal xxscm_inv_qty { get; set; } + + public decimal xxscm_inv_price { get; set; } + + public decimal xxscm_inv_taxt { get; set; } + + public decimal xxscm_inv_taxamt { get; set; } + + public decimal xxscm_inv_amt { get; set; } + + [StringLength(1)] + public string xxscm_inv_qadread { get; set; } + + [StringLength(1)] + public string xxscm_inv_wmsread { get; set; } + + [StringLength(1)] + public string xxscm_inv_scmread { get; set; } + + [StringLength(1)] + public string xxscm_inv_mesread { get; set; } + + public string xxscm_inv_rmks { get; set; } + + public DateTime? xxscm_inv_createdt { get; set; } + + + public string xxscm_inv_createur { get; set; } + + public DateTime? xxscm_inv_updatedt { get; set; } + + + public string xxscm_inv_updateur { get; set; } + + public decimal xxscm_inv_holdamt { get; set; } + public string xxscm_inv_acctuser { get; set; } + public string xxscm_inv_comments { get; set; } + + + public decimal xxscm_inv_totamt { get; set; } + + public decimal xxscm_inv_tottax { get; set; } + + public decimal xxscm_inv_tottaxvar { get; set; } + + public decimal xxscm_inv_totdiscount { get; set; } + public string xxscm_inv_project { get; set; } + + + + + + + + + + + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxscm_pod_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxscm_pod_det.cs new file mode 100644 index 0000000..34f1008 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxscm_pod_det.cs @@ -0,0 +1,121 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxscm_pod_det + { + [Key] + public int xxscm_pod_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxscm_pod_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_pod_nbr { get; set; } + + public int xxscm_pod_line { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_pod_modtype { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_pod_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_pod_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxscm_pod_part { get; set; } + + [StringLength(50)] + public string xxscm_pod_desc { get; set; } + + public decimal xxscm_pod_qty_ord { get; set; } + + public decimal xxscm_pod_qty_rct { get; set; } + + public decimal xxscm_pod_qty_std { get; set; } + + public DateTime xxscm_pod_due_date { get; set; } + + public decimal xxscm_pod_price { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_pod_curr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_pod_loc_um { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_pod_um { get; set; } + + public decimal xxscm_pod_um_conv { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_pod_vend { get; set; } + + [StringLength(100)] + public string xxscm_pod_name { get; set; } + + [StringLength(8)] + public string xxscm_pod_attn { get; set; } + + [StringLength(8)] + public string xxscm_pod_ship { get; set; } + + [StringLength(2)] + public string xxscm_pod_made { get; set; } + + public bool xxscm_pod_confirm { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_pod_buyer { get; set; } + + [StringLength(20)] + public string xxscm_pod_buyer_phone { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_pod_status { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxscm_pod_qadread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxscm_pod_wmsread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxscm_pod_scmread { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(1)] + public string xxscm_pod_mesread { get; set; } + + public string xxscm_pod_rmks { get; set; } + + public DateTime? xxscm_pod_createdt { get; set; } + + [StringLength(8)] + public string xxscm_pod_createur { get; set; } + + public DateTime? xxscm_pod_updatedt { get; set; } + + [StringLength(8)] + public string xxscm_pod_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxscm_tx_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxscm_tx_det.cs new file mode 100644 index 0000000..2130def --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxscm_tx_det.cs @@ -0,0 +1,65 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxscm_tx_det + { + [Key] + public int xxscm_tx_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxscm_tx_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_tx_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(200)] + public string xxscm_tx_boxcode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxscm_tx_nbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxscm_tx_vend { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxscm_tx_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxscm_tx_batch { get; set; } + + public decimal xxscm_tx_qty_real { get; set; } + + [StringLength(1)] + public string xxscm_tx_qadread { get; set; } + + [StringLength(1)] + public string xxscm_tx_wmsread { get; set; } + + [StringLength(1)] + public string xxscm_tx_scmread { get; set; } + + [StringLength(1)] + public string xxscm_tx_mesread { get; set; } + + public string xxscm_tx_rmks { get; set; } + + public DateTime? xxscm_tx_createdt { get; set; } + + [StringLength(50)] + public string xxscm_tx_createur { get; set; } + + public DateTime? xxscm_tx_updatedt { get; set; } + + [StringLength(50)] + public string xxscm_tx_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxscm_tx_mstr.cs b/北京北汽/SCP/Models/UniApiEntity/xxscm_tx_mstr.cs new file mode 100644 index 0000000..177ce0b --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxscm_tx_mstr.cs @@ -0,0 +1,104 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxscm_tx_mstr + { + [Key] + public int xxscm_tx_uid { get; set; } + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxscm_tx_seq { get; set; } + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxscm_tx_nbr { get; set; } + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxscm_tx_po_nbr { get; set; } + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxscm_tx_po_line { get; set; } + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxscm_tx_part { get; set; } + public decimal xxscm_tx_qty_total { get; set; } + + public decimal xxscm_tx_qty_std { get; set; } + + public DateTime xxscm_tx_date_ship { get; set; } + + public DateTime xxscm_tx_date_Promise { get; set; } + + public DateTime xxscm_tx_date_due { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxscm_tx_domain { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxscm_tx_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxscm_tx_vend { get; set; } + + [StringLength(20)] + public string xxscm_tx_ware_class { get; set; } + + [StringLength(20)] + public string xxscm_tx_ware { get; set; } + + public decimal xxscm_tx_pprice { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_tx_po_um { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_tx_loc_um { get; set; } + + public decimal xxscm_tx_conv { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxscm_tx_type { get; set; } + + [StringLength(50)] + public string xxscm_tx_vend_batch { get; set; } + [StringLength(50)] + public string xxscm_tx_batch { get; set; } + public DateTime? xxscm_tx_produce_date { get; set; } + [StringLength(1)] + public string xxscm_tx_qadread { get; set; } + + [StringLength(1)] + public string xxscm_tx_wmsread { get; set; } + + [StringLength(1)] + public string xxscm_tx_scmread { get; set; } + + [StringLength(1)] + public string xxscm_tx_mesread { get; set; } + + public string xxscm_tx_rmks { get; set; } + + public DateTime? xxscm_tx_createdt { get; set; } + + [StringLength(50)] + public string xxscm_tx_createur { get; set; } + + public DateTime? xxscm_tx_updatedt { get; set; } + + [StringLength(50)] + public string xxscm_tx_updateur { get; set; } + + [StringLength(50)] + public string xxscm_tx_status { get; set; } + + + + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxwms_arv_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxwms_arv_det.cs new file mode 100644 index 0000000..d778add --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxwms_arv_det.cs @@ -0,0 +1,60 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_arv_det + { + [Key] + public int xxwms_arv_uid { get; set; } + [StringLength(50)] + public string xxwms_arv_seq { get; set; } + [StringLength(20)] + public string xxwms_arv_nbr { get; set; } + [StringLength(20)] + public string xxwms_arv_ps_nbr { get; set; } + [StringLength(8)] + public string xxwms_arv_po_nbr { get; set; } + public int xxwms_arv_po_line { get; set; } + [StringLength(18)] + public string xxwms_arv_part { get; set; } + public decimal xxwms_arv_qty_total { get; set; } + public DateTime xxwms_arv_date_ship { get; set; } + [StringLength(8)] + public string xxwms_arv_site { get; set; } + [StringLength(8)] + public string xxwms_arv_vend { get; set; } + [StringLength(20)] + public string xxwms_arv_ware_class { get; set; } + [StringLength(20)] + public string xxwms_arv_ware { get; set; } + [StringLength(8)] + public string xxwms_arv_loc { get; set; } + [StringLength(2)] + public string xxwms_arv_po_um { get; set; } + [StringLength(2)] + public string xxwms_arv_loc_um { get; set; } + public decimal xxwms_arv_conv { get; set; } + [StringLength(100)] + public string xxwms_arv_lot { get; set; } + [StringLength(20)] + public string xxwms_arv_vend_batch { get; set; } + [StringLength(1)] + public string xxwms_arv_qadread { get; set; } + [StringLength(1)] + public string xxwms_arv_wmsread { get; set; } + [StringLength(1)] + public string xxwms_arv_scmread { get; set; } + [StringLength(1)] + public string xxwms_arv_mesread { get; set; } + public string xxwms_arv_rmks { get; set; } + public DateTime xxwms_arv_createdt { get; set; } + [StringLength(18)] + public string xxwms_arv_createur { get; set; } + public DateTime xxwms_arv_updatedt { get; set; } + [StringLength(18)] + public string xxwms_arv_updateur { get; set; } + [StringLength(18)] + public string xxwms_arv_trtype { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxwms_bk_mstr.cs b/北京北汽/SCP/Models/UniApiEntity/xxwms_bk_mstr.cs new file mode 100644 index 0000000..b4beb26 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxwms_bk_mstr.cs @@ -0,0 +1,84 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_bk_mstr + { + [Key] + public int xxwms_bk_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_bk_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_bk_nbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxwms_bk_part { get; set; } + + public DateTime xxwms_bk_date { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_bk_site { get; set; } + + public int xxwms_bk_op { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_bk_line { get; set; } + + [StringLength(18)] + public string xxwms_bk_lot { get; set; } + + public decimal xxwms_bk_qty { get; set; } + + public decimal xxwms_bk_qty_scrap { get; set; } + + public decimal xxwms_bk_qty_reject { get; set; } + + public decimal xxwms_bk_qty_receipt { get; set; } + + public DateTime xxwms_bk_time { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_bk_loc { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxwms_bk_um { get; set; } + + [StringLength(1)] + public string xxwms_bk_qadread { get; set; } + + [StringLength(1)] + public string xxwms_bk_wmsread { get; set; } + + [StringLength(1)] + public string xxwms_bk_scmread { get; set; } + + [StringLength(1)] + public string xxwms_bk_mesread { get; set; } + + public string xxwms_bk_rmks { get; set; } + + public DateTime? xxwms_bk_createdt { get; set; } + + [StringLength(18)] + public string xxwms_bk_createur { get; set; } + + public DateTime? xxwms_bk_updatedt { get; set; } + + [StringLength(18)] + public string xxwms_bk_updateur { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_bk_domain { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxwms_ctrl.cs b/北京北汽/SCP/Models/UniApiEntity/xxwms_ctrl.cs new file mode 100644 index 0000000..57e90bf --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxwms_ctrl.cs @@ -0,0 +1,56 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_ctrl + { + + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int xxwms_uid { get; set; } + + [Key] + [StringLength(50)] + public string xxwms_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_table { get; set; } + + public int xxwms_table_qty { get; set; } + + [StringLength(1)] + public string xxwms_qad { get; set; } + + [StringLength(1)] + public string xxwms_mes { get; set; } + + [StringLength(1)] + public string xxwms_scm { get; set; } + + [StringLength(1)] + public string xxwms_wms { get; set; } + + public string xxwms_rmks { get; set; } + + public Nullable<System.DateTime> xxwms_create_time { get; set; } + + + [StringLength(20)] + public string xxwms_domain { get; set; } + + [StringLength(8)] + public string xxwms_site { get; set; } + + + + + + + + + + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxwms_iss_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxwms_iss_det.cs new file mode 100644 index 0000000..9c3af5d --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxwms_iss_det.cs @@ -0,0 +1,79 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_iss_det + { + [Key] + public int xxwms_iss_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_iss_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_iss_nbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_iss_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxwms_iss_part { get; set; } + + [StringLength(10)] + public string xxwms_iss_lot { get; set; } + + public decimal xxwms_iss_qty { get; set; } + + public DateTime xxwms_iss_date { get; set; } + + public DateTime xxwms_iss_time { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_iss_loc { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxwms_iss_um { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(100)] + public string xxwms_iss_reason { get; set; } + + [StringLength(1)] + public string xxwms_iss_qadread { get; set; } + + [StringLength(1)] + public string xxwms_iss_wmsread { get; set; } + + [StringLength(1)] + public string xxwms_iss_scmread { get; set; } + + [StringLength(1)] + public string xxwms_iss_mesread { get; set; } + + public string xxwms_iss_rmks { get; set; } + + public DateTime? xxwms_iss_createdt { get; set; } + + [StringLength(18)] + public string xxwms_iss_createur { get; set; } + + public DateTime? xxwms_iss_updatedt { get; set; } + + [StringLength(18)] + public string xxwms_iss_updateur { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_iss_domain { get; set; } + + [StringLength(8)] + public string xxwms_iss_project { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxwms_ld_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxwms_ld_det.cs new file mode 100644 index 0000000..a534241 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxwms_ld_det.cs @@ -0,0 +1,77 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_ld_det + { + [Key] + public int xxwms_ld_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_ld_seq { get; set; } + [StringLength(50)] + public string xxwms_ld_barcode { get; set; } + [Required(AllowEmptyStrings = true)] + [StringLength(4)] + public string xxwms_ld_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxwms_ld_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_ld_vend { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_ld_loc { get; set; } + + [StringLength(20)] + public string xxwms_ld_lot { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_ld_vend_batch { get; set; } + + public decimal xxwms_ld_qty { get; set; } + + public DateTime xxwms_ld_date { get; set; } + + public DateTime xxwms_ld_time { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxwms_ld_um { get; set; } + + [StringLength(1)] + public string xxwms_ld_qadread { get; set; } + + [StringLength(1)] + public string xxwms_ld_wmsread { get; set; } + + [StringLength(1)] + public string xxwms_ld_scmread { get; set; } + + [StringLength(1)] + public string xxwms_ld_mesread { get; set; } + + public string xxwms_ld_rmks { get; set; } + + public DateTime? xxwms_ld_createdt { get; set; } + + [StringLength(18)] + public string xxwms_ld_createur { get; set; } + + public DateTime? xxwms_ld_updatedt { get; set; } + + [StringLength(18)] + public string xxwms_ld_updateur { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_ld_domain { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxwms_qua_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxwms_qua_det.cs new file mode 100644 index 0000000..24aa8be --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxwms_qua_det.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_qua_det + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int xxwms_qua_uid { get; set; } + + public string xxwms_qua_seq { get; set; } + public string xxwms_qua_nbr { get; set; } + public string xxwms_qua_infotype { get; set; } + public string xxwms_qua_barcode { get; set; } + public string xxwms_qua_loccode { get; set; } + public string xxwms_qua_pobillnum { get; set; } + public Nullable<decimal> xxwms_qua_poline { get; set; } + public string xxwms_qua_inspecttype { get; set; } + public string xxwms_qua_partcode { get; set; } + public string xxwms_qua_partdesc { get; set; } + public string xxwms_qua_batch { get; set; } + public decimal xxwms_qua_receiveqty { get; set; } + public decimal xxwms_qua_sampleqty { get; set; } + public decimal xxwms_qua_inspqty { get; set; } + public decimal xxwms_qua_passqty { get; set; } + public decimal xxwms_qua_failqty { get; set; } + public decimal xxwms_qua_crackqty { get; set; } + public string xxwms_qua_inspresult { get; set; } + public string xxwms_qua_failreason { get; set; } + public string xxwms_qua_vendid { get; set; } + public string xxwms_qua_vendbatch { get; set; } + public string xxwms_qua_state { get; set; } + public System.DateTime xxwms_qua_billtime { get; set; } + public string xxwms_qua_domain { get; set; } + public string xxwms_qua_site { get; set; } + public string xxwms_qua_by1 { get; set; } + public string xxwms_qua_by2 { get; set; } + public string xxwms_qua_by3 { get; set; } + public string xxwms_qua_scpread { get; set; } + public string xxwms_qua_qadread { get; set; } + public string xxwms_qua_wmsread { get; set; } + public string xxwms_qua_scmread { get; set; } + public string xxwms_qua_mesread { get; set; } + public string xxwms_qua_rmks { get; set; } + public Nullable<System.DateTime> xxwms_qua_createdt { get; set; } + public string xxwms_qua_createur { get; set; } + public Nullable<System.DateTime> xxwms_qua_updatedt { get; set; } + public string xxwms_qua_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxwms_rc_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxwms_rc_det.cs new file mode 100644 index 0000000..e38853c --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxwms_rc_det.cs @@ -0,0 +1,98 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_rc_det + { + [Key] + public int xxwms_rc_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_rc_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_rc_nbr { get; set; } + + [StringLength(20)] + public string xxwms_rc_ps_nbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_rc_po_nbr { get; set; } + + public int xxwms_rc_po_line { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxwms_rc_part { get; set; } + + public decimal xxwms_rc_qty_total { get; set; } + + public DateTime xxwms_rc_date_ship { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_rc_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_rc_vend { get; set; } + + [StringLength(20)] + public string xxwms_rc_ware_class { get; set; } + + [StringLength(20)] + public string xxwms_rc_ware { get; set; } + + [StringLength(8)] + public string xxwms_rc_loc { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_rc_po_um { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_rc_loc_um { get; set; } + + public decimal xxwms_rc_conv { get; set; } + + [StringLength(20)] + public string xxwms_rc_lot { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_rc_vend_batch { get; set; } + + [StringLength(1)] + public string xxwms_rc_qadread { get; set; } + + [StringLength(1)] + public string xxwms_rc_wmsread { get; set; } + + [StringLength(1)] + public string xxwms_rc_scmread { get; set; } + + [StringLength(1)] + public string xxwms_rc_mesread { get; set; } + + public string xxwms_rc_rmks { get; set; } + + public DateTime? xxwms_rc_createdt { get; set; } + + [StringLength(18)] + public string xxwms_rc_createur { get; set; } + + public DateTime? xxwms_rc_updatedt { get; set; } + + [StringLength(18)] + public string xxwms_rc_updateur { get; set; } + + + [StringLength(20)] + public string xxwms_rc_domain { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxwms_rct_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxwms_rct_det.cs new file mode 100644 index 0000000..7336e4d --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxwms_rct_det.cs @@ -0,0 +1,79 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_rct_det + { + [Key] + public int xxwms_rct_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_rct_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_rct_nbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_rct_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxwms_rct_part { get; set; } + + [StringLength(8)] + public string xxwms_rct_lot { get; set; } + + public decimal xxwms_rct_qty { get; set; } + + public DateTime xxwms_rct_date { get; set; } + + public DateTime xxwms_rct_time { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_rct_loc { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxwms_rct_um { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(100)] + public string xxwms_rct_reason { get; set; } + + [StringLength(1)] + public string xxwms_rct_qadread { get; set; } + + [StringLength(1)] + public string xxwms_rct_wmsread { get; set; } + + [StringLength(1)] + public string xxwms_rct_scmread { get; set; } + + [StringLength(1)] + public string xxwms_rct_mesread { get; set; } + + public string xxwms_rct_rmks { get; set; } + + public DateTime? xxwms_rct_createdt { get; set; } + + [StringLength(18)] + public string xxwms_rct_createur { get; set; } + + public DateTime? xxwms_rct_updatedt { get; set; } + + [StringLength(18)] + public string xxwms_rct_updateur { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_rct_domain { get; set; } + + [StringLength(8)] + public string xxwms_rct_project { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxwms_review_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxwms_review_det.cs new file mode 100644 index 0000000..3ddc161 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxwms_review_det.cs @@ -0,0 +1,115 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_review_det + { + [Key] + [DisplayName("UID")] + public int xxwms_review_uid { get; set; } + + + [DisplayName("评审单编号")] + public string xxwms_review_seq { get; set; } + + + [DisplayName("评审单编号")] + public string xxwms_review_nbr { get; set; } + + [DisplayName("关联单号")] + public string xxwms_review_relationnbr { get; set; } + + + [DisplayName("评审单类型")] + public string xxwms_review_reviewtype { get; set; } + + [DisplayName("评审单位置")] + public string xxwms_review_reviewsite { get; set; } + + + [DisplayName("标签条码")] + public string xxwms_review_barcode { get; set; } + + [DisplayName("物料号")] + public string xxwms_review_partcode { get; set; } + + [DisplayName("批次")] + public string xxwms_review_batch { get; set; } + + [DisplayName("项目")] + public string xxwms_review_projectid { get; set; } + + [DisplayName("数量")] + public decimal xxwms_review_qty { get; set; } + + [DisplayName("不合格原因")] + public string xxwms_review_badcouse { get; set; } + + [DisplayName("评审结果")] + public string xxwms_review_reviewresult { get; set; } + + [DisplayName("最终处理部门")] + public string xxwms_review_ultimatedepart { get; set; } + + [DisplayName("最终处理名称")] + public string xxwms_review_ultimatename { get; set; } + + [DisplayName("索赔金额")] + public decimal xxwms_review_claimamount { get; set; } + + [DisplayName("操作员")] + public string xxwms_review_opername { get; set; } + + [DisplayName("审核日期")] + public DateTime xxwms_review_billdate { get; set; } + + [DisplayName("创建时间")] + public DateTime xxwms_review_createtime { get; set; } + + [DisplayName("审核时间")] + public DateTime xxwms_review_reviewtime { get; set; } + + + [StringLength(1)] + [DisplayName("QAD读取")] + public string xxwms_review_qadread { get; set; } + + [StringLength(1)] + [DisplayName("wms读取")] + public string xxwms_review_wmsread { get; set; } + + [StringLength(1)] + [DisplayName("scm读取")] + public string xxwms_review_scmread { get; set; } + + [StringLength(1)] + [DisplayName("mes读取")] + public string xxwms_review_mesread { get; set; } + + [DisplayName("创建日期")] + public DateTime? xxwms_review_createdt { get; set; } + + [StringLength(18)] + [DisplayName("创建用户")] + public string xxwms_review_createur { get; set; } + + [DisplayName("更新日期")] + public DateTime? xxwms_review_updatedt { get; set; } + + [StringLength(18)] + [DisplayName("更新用户")] + public string xxwms_review_updateur { get; set; } + + + [StringLength(20)] + [DisplayName("域")] + public string xxwms_review_domain { get; set; } + + + [StringLength(20)] + [DisplayName("地点")] + public string xxwms_review_site { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxwms_rt_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxwms_rt_det.cs new file mode 100644 index 0000000..8f72521 --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxwms_rt_det.cs @@ -0,0 +1,94 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_rt_det + { + [Key] + public int xxwms_rt_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_rt_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_rt_nbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_rt_po_nbr { get; set; } + + public int xxwms_rt_po_line { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxwms_rt_part { get; set; } + + public decimal xxwms_rt_qty_total { get; set; } + + public DateTime xxwms_rt_date_ship { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_rt_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_rt_vend { get; set; } + + [StringLength(20)] + public string xxwms_rt_ware_class { get; set; } + + [StringLength(20)] + public string xxwms_rt_ware { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_rt_loc { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + public string xxwms_rt_po_um { get; set; } + + [StringLength(2)] + public string xxwms_rt_loc_um { get; set; } + + public decimal xxwms_rt_conv { get; set; } + + [StringLength(50)] + public string xxwms_rt_lot { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_rt_vend_batch { get; set; } + + [StringLength(1)] + public string xxwms_rt_qadread { get; set; } + + [StringLength(1)] + public string xxwms_rt_wmsread { get; set; } + + [StringLength(1)] + public string xxwms_rt_scmread { get; set; } + + [StringLength(1)] + public string xxwms_rt_mesread { get; set; } + + public string xxwms_rt_rmks { get; set; } + + public DateTime? xxwms_rt_createdt { get; set; } + + [StringLength(18)] + public string xxwms_rt_createur { get; set; } + + public DateTime? xxwms_rt_updatedt { get; set; } + + [StringLength(18)] + public string xxwms_rt_updateur { get; set; } + + [StringLength(20)] + public string xxwms_rt_domain { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxwms_soiss_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxwms_soiss_det.cs new file mode 100644 index 0000000..ed346dd --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxwms_soiss_det.cs @@ -0,0 +1,72 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_soiss_det + { + [Key] + public int xxwms_soiss_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_soiss_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_soiss_nbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(10)] + public string xxwms_soiss_order { get; set; } + + public int xxwms_soiss_line { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxwms_soiss_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_soiss_loc { get; set; } + + public DateTime xxwms_soiss_date { get; set; } + + public decimal xxwms_soiss_qty { get; set; } + + [StringLength(8)] + public string xxwms_soiss_lot { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_soiss_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_soiss_domain { get; set; } + + [StringLength(1)] + public string xxwms_soiss_qadread { get; set; } + + [StringLength(1)] + public string xxwms_soiss_wmsread { get; set; } + + [StringLength(1)] + public string xxwms_soiss_scmread { get; set; } + + [StringLength(1)] + public string xxwms_soiss_mesread { get; set; } + + public string xxwms_soiss_rmks { get; set; } + + public DateTime? xxwms_soiss_createdt { get; set; } + + [StringLength(18)] + public string xxwms_soiss_createur { get; set; } + + public DateTime? xxwms_soiss_updatedt { get; set; } + + [StringLength(18)] + public string xxwms_soiss_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxwms_tag_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxwms_tag_det.cs new file mode 100644 index 0000000..1ad668f --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxwms_tag_det.cs @@ -0,0 +1,66 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_tag_det + { + [Key] + public int xxwms_tag_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_tag_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_tag_nbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxwms_tag_part { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_tag_loc { get; set; } + + [StringLength(8)] + public string xxwms_tag_lot { get; set; } + + public DateTime xxwms_tag_date { get; set; } + + public decimal xxwms_tag_var_qty { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_tag_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_tag_domain { get; set; } + + [StringLength(1)] + public string xxwms_tag_qadread { get; set; } + + [StringLength(1)] + public string xxwms_tag_wmsread { get; set; } + + [StringLength(1)] + public string xxwms_tag_scmread { get; set; } + + [StringLength(1)] + public string xxwms_tag_mesread { get; set; } + + public string xxwms_tag_rmks { get; set; } + + public DateTime? xxwms_tag_createdt { get; set; } + + [StringLength(18)] + public string xxwms_tag_createur { get; set; } + + public DateTime? xxwms_tag_updatedt { get; set; } + + [StringLength(18)] + public string xxwms_tag_updateur { get; set; } + } +} diff --git a/北京北汽/SCP/Models/UniApiEntity/xxwms_tr_det.cs b/北京北汽/SCP/Models/UniApiEntity/xxwms_tr_det.cs new file mode 100644 index 0000000..4902dfb --- /dev/null +++ b/北京北汽/SCP/Models/UniApiEntity/xxwms_tr_det.cs @@ -0,0 +1,74 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace CK.SCP.Models.UniApiEntity +{ + public partial class xxwms_tr_det + { + [Key] + public int xxwms_tr_uid { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string xxwms_tr_seq { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_tr_nbr { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_tr_site { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(18)] + public string xxwms_tr_part { get; set; } + + [StringLength(18)] + public string xxwms_tr_lot { get; set; } + + public decimal xxwms_tr_qty { get; set; } + + public DateTime xxwms_tr_date { get; set; } + + public DateTime xxwms_tr_time { get; set; } + + [StringLength(8)] + public string xxwms_tr_loc1 { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(8)] + public string xxwms_tr_loc2 { get; set; } + + [StringLength(2)] + public string xxwms_tr_um { get; set; } + + [StringLength(1)] + public string xxwms_tr_qadread { get; set; } + + [StringLength(1)] + public string xxwms_tr_wmsread { get; set; } + + [StringLength(1)] + public string xxwms_tr_scmread { get; set; } + + [StringLength(1)] + public string xxwms_tr_mesread { get; set; } + + public string xxwms_tr_rmks { get; set; } + + public DateTime? xxwms_tr_createdt { get; set; } + + [StringLength(18)] + public string xxwms_tr_createur { get; set; } + + public DateTime? xxwms_tr_updatedt { get; set; } + + [StringLength(18)] + public string xxwms_tr_updateur { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string xxwms_tr_domain { get; set; } + } +} diff --git a/北京北汽/SCP/Models/VinStockIn.cs b/北京北汽/SCP/Models/VinStockIn.cs new file mode 100644 index 0000000..01b3c66 --- /dev/null +++ b/北京北汽/SCP/Models/VinStockIn.cs @@ -0,0 +1,24 @@ +using ChangKeTec.Wms.Models.Enums; +using ChangKeTec.Wms.Models.Wms; + +namespace ChangKeTec.Wms.Models +{ + public class VinStockIn + { + public TS_VIN_STOCK TemplateDetail { get; set; } + public string PartCode { get; set; } + public string VinCode { get; set; } + public string LocCode { get; set; } + public EnumStockState VinState { get; set; } + public decimal InQty { get; set; } + } + + public class VinStockOut + { + public string PartCode { get; set; } + public string VinCode { get; set; } + public string LocCode { get; set; } + public EnumStockState VinState { get; set; } + public decimal OutQty { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsCache.cs b/北京北汽/SCP/Models/WmsCache.cs new file mode 100644 index 0000000..a00c142 --- /dev/null +++ b/北京北汽/SCP/Models/WmsCache.cs @@ -0,0 +1,1003 @@ +using System; +using System.Collections.Generic; +using System.Data.Entity; +using System.Globalization; +using System.Linq; +using System.Reflection; +using System.Threading.Tasks; +//using ChangKeTec.Utils; +using ChangKeTec.Wms.Models.Enums; +//using ChangKeTec.Wms.Models.Power; +using ChangKeTec.Wms.Models.Wms; +using CK.SCP.Models; +using CK.SCP.Utils; +using CK.SCP.Models.Enums; + +namespace ChangKeTec.Wms.Models +{ + public static class WmsCache + { + + + private static readonly WmsEntities WmsDb = EntitiesFactory.CreateWmsInstance(); + #region Private + + private static WmsConfig _config; + private static List<TA_PART> _partList; + private static List<TA_WORKLINE> _worklineList; + private static List<TA_BILLTYPE> _billTypeList; + private static List<TA_STORE_WHSE> _whseList; + private static List<TT_PART_GROUP> _partGroupList; + private static List<TA_STORE_GROUP> _storeGroupList; + private static List<TA_STORE_LOCATION> _locList; + private static List<TA_CELL> _cellList; + private static List<TA_CUST_PART> _custPartList; + private static List<TA_VEND_PART> _vendPartList; + private static List<TA_CUSTOMER> _custList; + private static List<TA_VENDER> _vendList; + private static List<TT_SHIFT> _shiftList; + private static List<TA_TEAM> _teamList; + // private static List<TA_MACHINE> _machineList; + private static List<TT_UNIT> _unitList; + private static List<TT_CURRENCY> _currencyList; + private static List<TT_PROJECT> _projectList; + private static List<TA_BOM> _bomList; + private static List<TA_CUST_BOM> _custBomList; + private static List<TA_ERP_LOC> _erpLocList; + private static List<TA_SALE_PRICE> _salePriceList; + private static List<TA_PURCHASE_PRICE> _purchasePriceList; + // private static List<TT_SUB_BILLTYPE> _subBilltypeList; + private static List<TA_OTHER_INOUT_REASON> _otherInoutReasonList; + private static List<TT_FAIL_TYPE> _failTypeList; + private static List<TT_CONTAINER_TYPE> _containerTypeList; + private static List<TA_DELIVER_DEST> _deliverdestList; + private static List<TA_DEST_LOC> _destlocList; + private static List<TM_CQBMPT_PART_RELATION> _cqBmptPartRelationList; + private static List<TM_CQBMPT_PAINT_FAILEDREASON> _cqBmptFailedReasonList; + private static List<TA_PARTGROUP_INSPECTER> _partGroupInsList; + + private static List<TA_PAYMENT_DAY> _paymentDayList; + + #endregion + + + public static WmsConfig Config + { + get { return _config ?? (_config = GetConfig(WmsDb)); } + set { _config = value; } + } + + public static List<TA_CONFIG> GetDbConfigList(WmsEntities db) + { + return db.TA_CONFIG.OrderByDescending(p => p.UID).ToList(); + } + + + private static WmsConfig GetConfig(WmsEntities db) + { + var config = new WmsConfig(); + var peroperties = config.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance); + var configList = GetDbConfigList(db); + foreach (var pi in peroperties) + { + var piName = pi.Name.ToUpper(); + foreach (var cfg in configList) + { + if (cfg.ParamName != piName) continue; + var value = ListHelper.ConvertToType(cfg.ParamValue, pi.PropertyType); + if (!pi.CanWrite) continue; + try + { + pi.SetValue(config, value, null); + break; + } + catch (Exception ex) + { + MessageHelper.ShowEx(ex); + throw; + } + } + } + return config; + } + + private static void SetConfig(WmsEntities db, WmsConfig config) + { + + var peroperties = config.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance); + var configList = GetDbConfigList(db); + foreach (var pi in peroperties) + { + var piName = pi.Name.ToUpper(); + if (configList.Any(p => p.ParamName.ToUpper() == piName)) continue; + var cfg = new TA_CONFIG + { + ParamName = piName, + ParamValue = pi.GetValue(Config, null).ToString(), + State = 1, + Remark = piName, + }; + db.TA_CONFIG.Add(cfg); + } + EntitiesFactory.SaveDb(db); + } + + #region Public + + public static List<TA_PART> PartList + { + get + { + if (_partList == null || _partList.Count == 0) + { + _partList = WmsDb.TA_PART.Where(p=>p.PartKind!="AST").ToList(); + } + return _partList; + } + set { _partList = value; } + } + + public static List<TA_WORKLINE> WorklineList + { + get + { + if (_worklineList == null || _worklineList.Count == 0) + { + _worklineList = WmsDb.TA_WORKLINE.ToList(); + } + return _worklineList; + } + set { _worklineList = value; } + } + + public static List<TA_BILLTYPE> BillTypeList + { + get + { + if (_billTypeList == null || _billTypeList.Count == 0) + { + _billTypeList = WmsDb.TA_BILLTYPE.ToList(); + } + return _billTypeList; + } + set { _billTypeList = value; } + } + + public static List<TA_STORE_WHSE> WhseList + { + get + { + if (_whseList == null || _whseList.Count == 0) + { + _whseList = WmsDb.TA_STORE_WHSE.ToList(); + } + return _whseList; + } + set { _whseList = value; } + } + + public static List<EnumItem> AreaList => EnumHelper.EnumToList<EnumStoreArea>(); + + public static List<TT_PART_GROUP> PartGroupList + { + get + { + if (_partGroupList == null || _partGroupList.Count == 0) + { + _partGroupList = WmsDb.TT_PART_GROUP.ToList(); + } + return _partGroupList; + } + set { _partGroupList = value; } + } + + public static List<TA_STORE_GROUP> StoreGroupList + { + get + { + if (_storeGroupList == null || _storeGroupList.Count == 0) + { + _storeGroupList = WmsDb.TA_STORE_GROUP.ToList(); + } + return _storeGroupList; + } + set { _storeGroupList = value; } + } + + public static List<TA_STORE_LOCATION> LocList + { + get + { + if (_locList == null || _locList.Count == 0) + { + _locList = WmsDb.TA_STORE_LOCATION.ToList(); + } + return _locList; + } + set { _locList = value; } + } + + public static List<TA_CELL> CellList + { + get + { + if (_cellList == null || _cellList.Count == 0) + { + _cellList = WmsDb.TA_CELL.ToList(); + } + return _cellList; + } + set { _cellList = value; } + } + + public static List<TA_CUST_PART> CustPartList + { + get + { + if (_custPartList == null || _custPartList.Count == 0) + { + _custPartList = WmsDb.TA_CUST_PART.ToList(); + } + return _custPartList; + } + set { _custPartList = value; } + } + + public static List<TA_VEND_PART> VendPartList + { + get + { + if (_vendPartList == null || _vendPartList.Count == 0) + { + _vendPartList = WmsDb.TA_VEND_PART.ToList(); + } + return _vendPartList; + } + set { _vendPartList = value; } + } + + public static List<TA_CUSTOMER> CustomerList + { + get + { + if (_custList == null || _custList.Count == 0) + { + _custList = WmsDb.TA_CUSTOMER.ToList(); + } + return _custList; + } + set { _custList = value; } + } + + public static List<TA_VENDER> VenderList + { + get + { + if (_vendList == null || _vendList.Count == 0) + { + _vendList = WmsDb.TA_VENDER.ToList(); + } + return _vendList; + } + set { _vendList = value; } + } + + public static List<TT_SHIFT> ShiftList + { + get + { + if (_shiftList == null || _shiftList.Count == 0) + { + _shiftList = WmsDb.TT_SHIFT.ToList(); + } + return _shiftList; + } + set { _shiftList = value; } + } + + public static List<TA_TEAM> TeamList + { + get + { + if (_teamList == null || _teamList.Count == 0) + { + _teamList = WmsDb.TA_TEAM.ToList(); + } + return _teamList; + } + set { _teamList = value; } + } + + + public static List<TT_UNIT> UnitList + { + get + { + if (_unitList == null || _unitList.Count == 0) + { + _unitList = WmsDb.TT_UNIT.ToList(); + } + return _unitList; + } + set { _unitList = value; } + } + + public static List<TT_CURRENCY> CurrencyList + { + get + { + if (_currencyList == null || _currencyList.Count == 0) + { + _currencyList = WmsDb.TT_CURRENCY.ToList(); + } + return _currencyList; + } + set { _currencyList = value; } + } + + public static List<TT_PROJECT> ProjectList + { + get + { + if (_projectList == null || _projectList.Count == 0) + { + _projectList = WmsDb.TT_PROJECT.ToList(); + } + return _projectList; + } + set { _projectList = value; } + } + + public static List<TA_BOM> BomList + { + get + { + if (_bomList == null || _bomList.Count == 0) + { + _bomList = WmsDb.TA_BOM.ToList(); + } + return _bomList; + } + } + + public static List<TA_CUST_BOM> CustBomList + { + get + { + if (_custBomList == null || _custBomList.Count == 0) + { + _custBomList = WmsDb.TA_CUST_BOM.ToList(); + } + return _custBomList; + } + set { _custBomList = value; } + } + + public static List<TA_ERP_LOC> ErpLocList + { + get + { + if (_erpLocList == null || _erpLocList.Count == 0) + { + _erpLocList = WmsDb.TA_ERP_LOC.ToList(); + } + return _erpLocList; + } + set { _erpLocList = value; } + } + + public static List<TA_SALE_PRICE> SalePriceList + { + get + { + if (_salePriceList == null || _salePriceList.Count == 0) + { + _salePriceList = WmsDb.TA_SALE_PRICE.ToList(); + } + return _salePriceList; + } + set { _salePriceList = value; } + } + + public static List<TA_PURCHASE_PRICE> PurchasePriceList + { + get + { + if (_purchasePriceList == null || _purchasePriceList.Count == 0) + { + _purchasePriceList = WmsDb.TA_PURCHASE_PRICE.ToList(); + } + return _purchasePriceList; + } + set { _purchasePriceList = value; } + } + + public static List<TA_DELIVER_DEST> DeliverDestList + { + get + { + if (_deliverdestList == null || _deliverdestList.Count == 0) + { + _deliverdestList = WmsDb.TA_DELIVER_DEST.ToList(); + } + return _deliverdestList; + } + } + + + public static List<TA_OTHER_INOUT_REASON> OtherInoutReasonList + { + get + { + if (_otherInoutReasonList == null || _otherInoutReasonList.Count == 0) + { + _otherInoutReasonList = WmsDb.TA_OTHER_INOUT_REASON.Where(p => p.State == (int)DataState.Enabled).ToList(); + } + return _otherInoutReasonList; + } + set { _otherInoutReasonList = value; } + } + public static List<TT_FAIL_TYPE> FailTypeList + { + get + { + if (_failTypeList == null || _failTypeList.Count == 0) + { + _failTypeList = WmsDb.TT_FAIL_TYPE.ToList(); + } + return _failTypeList; + } + set { _failTypeList = value; } + } + + + public static List<TT_CONTAINER_TYPE> ContainerTypeList + { + get + { + if (_containerTypeList == null || _containerTypeList.Count == 0) + { + _containerTypeList = WmsDb.TT_CONTAINER_TYPE.ToList(); + } + return _containerTypeList; + } + set { _containerTypeList = value; } + } + + public static List<TA_DEST_LOC> DestLocList + { + get + { + if (_destlocList == null || _destlocList.Count == 0) + { + _destlocList = WmsDb.TA_DEST_LOC.ToList(); + } + return _destlocList; + } + } + + public static List<TM_CQBMPT_PART_RELATION> CqBmptPartRelationList + { + get + { + if (_cqBmptPartRelationList == null || _cqBmptPartRelationList.Count == 0) + { + _cqBmptPartRelationList = WmsDb.TM_CQBMPT_PART_RELATION.ToList(); + } + return _cqBmptPartRelationList; + } + set { _cqBmptPartRelationList = value; } + } + + public static List<TM_CQBMPT_PAINT_FAILEDREASON> CqBmptFailedReasonList + { + get + { + if (_cqBmptFailedReasonList == null || _cqBmptFailedReasonList.Count == 0) + { + _cqBmptFailedReasonList = WmsDb.TM_CQBMPT_PAINT_FAILEDREASON.ToList(); + } + return _cqBmptFailedReasonList; + } + set { _cqBmptFailedReasonList = value; } + } + + public static List<TA_PARTGROUP_INSPECTER> PartGroupInsList + { + get + { + if (_partGroupInsList == null || _partGroupInsList.Count == 0) + { + _partGroupInsList = WmsDb.TA_PARTGROUP_INSPECTER.ToList(); + } + return _partGroupInsList; + } + } + + + public static List<TA_PAYMENT_DAY> PaymentDayList + { + get + { + if (_paymentDayList == null || _paymentDayList.Count == 0) + { + _paymentDayList = WmsDb.TA_PAYMENT_DAY.ToList(); + } + return _paymentDayList; + } + set { _paymentDayList = value; } + } + + #endregion + + + public static DateTime GetServerTime() + { + var time = DateTime.Now; + try + { + time = WmsDb.TA_CONFIG.Select(p => DateTime.Now).First(); + } + catch (Exception ex) + { + MessageHelper.ShowEx(ex); + } + return time; + } + + #region Loc + + public static string GetErpLoc(string locCode) + { + var loc = LocList.SingleOrDefault(p => p.LocCode == locCode); + var str = loc?.ErpLocCode; + str = str != null && str.Length > 8 ? str.Substring(0, 8) : str; + return str ?? string.Empty; + } + + public static string GetErpSite(string locCode) + { + var erploc = ErpLocList.SingleOrDefault(p => p.ErpLocCode == GetErpLoc(locCode)); + return erploc?.Site ?? "CAAIFJ"; + } + + public static string GetAreaCode(string locCode) + { + var loc = LocList.SingleOrDefault(p => p.LocCode == locCode); + return loc?.AreaCode ?? string.Empty; + } + + public static string GetErpLocCode(string locCode) + { + return LocList.SingleOrDefault(p => p.LocCode == locCode)?.ErpLocCode ?? string.Empty; + } + + public static string GetLocName(string locCode) + { + return LocList.SingleOrDefault(p => p.LocCode == locCode)?.LocName ?? string.Empty; + } + + #endregion + + public static void Refresh(WmsEntities db) + { + try + { + Config = GetConfig(db); + SetConfig(db, Config); + _partList = db.TA_PART.Where(p => p.PartKind != "AST").ToList(); + _storeGroupList = db.TA_STORE_GROUP.ToList(); + _locList = db.TA_STORE_LOCATION.ToList(); + _custPartList = db.TA_CUST_PART.ToList(); + _vendPartList = db.TA_VEND_PART.ToList(); + _custList = db.TA_CUSTOMER.ToList(); + _vendList = db.TA_VENDER.ToList(); + _billTypeList = db.TA_BILLTYPE.ToList(); + _worklineList = db.TA_WORKLINE.ToList(); + _whseList = db.TA_STORE_WHSE.ToList(); + _teamList = db.TA_TEAM.ToList(); + _erpLocList = db.TA_ERP_LOC.ToList(); + _salePriceList = db.TA_SALE_PRICE.ToList(); + _purchasePriceList = db.TA_PURCHASE_PRICE.ToList(); + _partGroupList = db.TT_PART_GROUP.ToList(); + + _shiftList = db.TT_SHIFT.ToList(); + _unitList = db.TT_UNIT.ToList(); + _currencyList = db.TT_CURRENCY.ToList(); + _projectList = db.TT_PROJECT.ToList(); + _paymentDayList = db.TA_PAYMENT_DAY.ToList(); + + // _subBilltypeList = db.TT_SUB_BILLTYPE.Where(p => p.State == (int)DataState.Enabled).ToList(); + _otherInoutReasonList = db.TA_OTHER_INOUT_REASON.Where(p => p.State == (int)DataState.Enabled).ToList(); + _failTypeList = db.TT_FAIL_TYPE.ToList(); + _containerTypeList = db.TT_CONTAINER_TYPE.ToList(); + + _bomList = db.TA_BOM.ToList(); + _custBomList = db.TA_CUST_BOM.ToList(); + _cqBmptPartRelationList = db.TM_CQBMPT_PART_RELATION.ToList(); + + if (Config.项目名称 == ProjectName.锦州锦恒.ToString()) + { + _deliverdestList = db.TA_DELIVER_DEST.ToList(); + _destlocList = db.TA_DEST_LOC.ToList(); + } + } + catch (Exception ex) + { + + throw new Exception( + $"系统无法连接到{GlobalConfig.WmsDatabase.数据库类型}数据库:{GlobalConfig.WmsDatabase.服务器地址},请检查配置的服务器,数据库,用户名和密码等信息是否正确。{Environment.NewLine}{ex.Message}"); + + } + + } + + public static async Task RefreshAsync(WmsEntities db) + { + try + { + Config = GetConfig(db); + SetConfig(db, Config); + _partList = await db.TA_PART.Where(p => p.PartKind != "AST").ToListAsync(); + _storeGroupList = await db.TA_STORE_GROUP.ToListAsync(); + _locList = await db.TA_STORE_LOCATION.ToListAsync(); + _custPartList = await db.TA_CUST_PART.ToListAsync(); + _vendPartList = await db.TA_VEND_PART.ToListAsync(); + _custList = await db.TA_CUSTOMER.ToListAsync(); + _vendList = await db.TA_VENDER.ToListAsync(); + _billTypeList = await db.TA_BILLTYPE.ToListAsync(); + _worklineList = await db.TA_WORKLINE.ToListAsync(); + _whseList = await db.TA_STORE_WHSE.ToListAsync(); + _teamList = await db.TA_TEAM.ToListAsync(); + _erpLocList = await db.TA_ERP_LOC.ToListAsync(); + _salePriceList = await db.TA_SALE_PRICE.ToListAsync(); + _purchasePriceList = await db.TA_PURCHASE_PRICE.ToListAsync(); + _partGroupList = await db.TT_PART_GROUP.ToListAsync(); + + _shiftList = await db.TT_SHIFT.ToListAsync(); + _unitList = await db.TT_UNIT.ToListAsync(); + _currencyList = await db.TT_CURRENCY.ToListAsync(); + _projectList = await db.TT_PROJECT.ToListAsync(); + _paymentDayList = await db.TA_PAYMENT_DAY.ToListAsync(); + + + // _subBilltypeList = await db.TT_SUB_BILLTYPE.Where(p => p.State == (int)DataState.Enabled).ToListAsync(); + _otherInoutReasonList = await db.TA_OTHER_INOUT_REASON.Where(p => p.State == (int)DataState.Enabled).ToListAsync(); + _failTypeList = await db.TT_FAIL_TYPE.ToListAsync(); + _containerTypeList = await db.TT_CONTAINER_TYPE.ToListAsync(); + + _bomList = await db.TA_BOM.ToListAsync(); + _custBomList = await db.TA_CUST_BOM.ToListAsync(); + + if (Config.项目名称 == ProjectName.锦州锦恒.ToString()) + { + _deliverdestList = await db.TA_DELIVER_DEST.ToListAsync(); + _destlocList = await db.TA_DEST_LOC.ToListAsync(); + } + } + catch (Exception ex) + { + + throw new Exception( + $"系统无法连接到{GlobalConfig.WmsDatabase.数据库类型}数据库:{GlobalConfig.WmsDatabase.服务器地址},请检查配置的服务器,数据库,用户名和密码等信息是否正确。{Environment.NewLine}{ex.Message}"); + + } + + } + + public static string GetReason(int reasonCode) + { + var sub = OtherInoutReasonList.SingleOrDefault(p => p.ReasonCode == reasonCode); + return sub?.ErpReasonCode ?? string.Empty; + } + + #region Part + + public static int GetValidateDays(string partCode) + { + var part = GetPart(partCode); + return part?.ValidityDays ?? 36500; + } + + public static string GetUnit(string partCode) + { + var part = GetPart(partCode); + return part?.Unit ?? string.Empty; + } + + public static string GetProjectId(string partCode) + { + var part = GetPart(partCode); + return part?.ProjectId ?? string.Empty; + } + + public static string GetDoubleLinePartDesc(string partCode) + { + var part = GetPart(partCode); + if (part == null) return string.Empty; + return part.PartDesc1 + Environment.NewLine + part.PartDesc2; + } + + public static InspectType GetInspectType(string partCode) + { + var part = GetPart(partCode); + return part?.InspectType ?? 0; + } + + public static string GetPartTypeDesc(TA_PART part) + { + EnumPartType partType; + return Enum.TryParse(part.PartType, true, out partType) ? EnumHelper.GetDesc(partType) : string.Empty; + } + + public static string GetPartKindDesc(TA_PART part) + { + EnumPartKind partKind; + return Enum.TryParse(part.PartKind, true, out partKind) ? EnumHelper.GetDesc(partKind) : string.Empty; + } + + public static string GetPartStateDesc(TA_PART part) + { + PartState partState; + return Enum.TryParse(part.State, true, out partState) ? EnumHelper.GetDesc(partState) : string.Empty; + } + + public static string GetPartGroupName(TA_PART part) + { + return PartGroupList.SingleOrDefault(p => p.GroupCode == part.PartGroup)?.GroupName ?? + string.Empty; + } + + public static string GetProjectName(TA_PART part) + { + return ProjectList.SingleOrDefault(p => p.ProjectId == part.ProjectId)?.ProjectName ?? + string.Empty; + } + + public static string GetPartDesc(TA_PART part) + { + return part.PartDesc1 + " " + part.PartDesc2; + } + + public static string GetPartDesc(string partCode) + { + var part = GetPart(partCode); + if (part == null) return string.Empty; + return GetPartDesc(part); + } + + public static string GetPartDesc1(string partCode) + { + return PartList.SingleOrDefault(p => p.PartCode == partCode)?.PartDesc1 ?? string.Empty; + } + + public static string GetPartDesc2(string partCode) + { + return PartList.SingleOrDefault(p => p.PartCode == partCode)?.PartDesc2 ?? string.Empty; + } + + public static string GetPartType(string partCode) + { + return PartList.SingleOrDefault(p => p.PartCode == partCode)?.PartType ?? string.Empty; + } + + public static string GetPartKind(string partCode) + { + return PartList.SingleOrDefault(p => p.PartCode == partCode)?.PartKind ?? string.Empty; + } + + public static int GetProcessIdFromPart(string partCode) + { + var process= PartList.SingleOrDefault(p => p.PartCode == partCode)?.Process ?? string.Empty; + int processId = 0; + int.TryParse(process, out processId); + return processId; + } + public static string GetLineIdFromPart(string partCode) + { + return PartList.SingleOrDefault(p => p.PartCode == partCode)?.Source ?? string.Empty; + } + public static TA_PART GetPart(string partCode) + { + return PartList.SingleOrDefault(p => p.PartCode == partCode); + } + + public static TA_PART GetPartByErpPartCode(string erpPartCode) + { + return PartList.SingleOrDefault(p => p.ErpPartCode == erpPartCode); + } + + public static string GetErpPartCode(string partCode) + { + return PartList.SingleOrDefault(p => p.PartCode == partCode)?.ErpPartCode ?? string.Empty; + } + + public static string GetConfigration(string partCode) + { + return PartList.SingleOrDefault(p => p.PartCode == partCode)?.Configuration ?? string.Empty; + } + + public static string GetCustPartCode(string custId, string partCode) + { + var custPart = + CustPartList.FirstOrDefault(p => p.CustId == custId && p.PartCode == partCode) ?? + CustPartList.FirstOrDefault(p => p.PartCode == partCode); + return custPart == null ? "" : custPart.CustPartCode; + } + + public static string GetVendPartCode(string vendId, string partCode) + { + var vendPart = + VendPartList.FirstOrDefault(p => p.VendId == vendId && p.PartCode == partCode) ?? + VendPartList.FirstOrDefault(p => p.PartCode == partCode); + return vendPart == null ? "" : vendPart.VendPartCode; + } + + public static decimal GetMaxQty(string partCode) + { + return PartList.SingleOrDefault(p => p.PartCode == partCode)?.MaxQty ?? 0; + } + + public static decimal GetMinQty(string partCode) + { + return PartList.SingleOrDefault(p => p.PartCode == partCode)?.MinQty ?? 0; + } + + public static decimal GetSafeQty(string partCode) + { + return PartList.SingleOrDefault(p => p.PartCode == partCode)?.SafeQty ?? 0; + } + + public static string GetCustPartDesc(string custPartCode) + { + return CustPartList.SingleOrDefault(p => p.CustPartCode == custPartCode)?.CustPartName ?? ""; + } + + public static string GetPartGroup(string partCode) + { + return PartList.SingleOrDefault(p => p.PartCode == partCode)?.PartGroup ?? string.Empty; + + } + + public static TA_PART GetPartByCustPartCode(string custId, string custPartCode) + { + var custPart = + CustPartList.FirstOrDefault(p => p.CustId == custId && p.CustPartCode == custPartCode) ?? + CustPartList.FirstOrDefault(p => p.CustPartCode == custPartCode); + if (custPart == null) + return null; + var part = PartList.SingleOrDefault(p => p.PartCode == custPart.PartCode); + return part; + } + + public static decimal GetLinesidePackQty(string partCode) + { + return PartList.SingleOrDefault(p => p.PartCode == partCode)?.LinesidePackQty ?? 0; + } + + public static decimal GetStockPackQty(string partCode) + { + return PartList.SingleOrDefault(p => p.PartCode == partCode)?.StockPackQty ?? 0; + } + + #endregion + + public static string GetVenderName(string vendId) + { + return VenderList.SingleOrDefault(p => p.VendId == vendId)?.VendName ?? string.Empty; + } + + public static string GetCustName(string custId) + { + return CustomerList.SingleOrDefault(p => p.CustId == custId)?.CustName ?? string.Empty; + } + + public static string GetSelfCode(string custId) + { + return CustomerList.SingleOrDefault(p => p.CustId == custId)?.SelfCode ?? string.Empty; + } + + public static string GetWorkLineName(string lineId) + { + return WorklineList.SingleOrDefault(p => p.LineId == lineId)?.LineName ?? string.Empty; + } + + public static string GetShiftName(string shiftId) + { + return ShiftList.SingleOrDefault(p => p.ShiftId == shiftId)?.ShiftName ?? string.Empty; + } + + public static string GetTeamName(string teamId) + { + return TeamList.SingleOrDefault(p => p.TeamId == teamId)?.TeamName ?? string.Empty; + } + + public static string GetVendAbbr(string vendId) + { + return VenderList.SingleOrDefault(p => p.VendId == vendId)?.VendAbbCode ?? string.Empty; + } + + public static string GetColorName(string paintPartCode) + { + return CqBmptPartRelationList.FirstOrDefault(p => p.PaintPartCode == paintPartCode)?.ColorName ?? + string.Empty; + } + + public static string GetColorName(string injectionPartCode, string colorCode) + { + return + CqBmptPartRelationList.FirstOrDefault( + p => p.InjectionPartCode == injectionPartCode && p.ColorCode == colorCode)?.ColorName ?? string.Empty; + } + +// public static string GetWorkLineFromLocCode(string lineId) +// { +// return WorklineList.SingleOrDefault(p => p.LineId == lineId)?.InLocCode ?? string.Empty; +// } +// +// public static string GetWorkLineToLocCode(string lineId) +// { +// return WorklineList.SingleOrDefault(p => p.LineId == lineId)?.OutLocCode ?? string.Empty; +// } + + public static void TestWmsDbConntction() + { + try + { + WmsDb.Database.ExecuteSqlCommand("select getdate()"); + } + catch (Exception ex) + { + + throw new Exception( + $"系统无法连接到{GlobalConfig.WmsDatabase.数据库类型}数据库:{GlobalConfig.WmsDatabase},请检查配置的服务器,数据库,用户名和密码等信息是否正确。" + ex); + + } + } + + public static string GetErpLineId(string lineId) + { + return WorklineList.SingleOrDefault(p => p.LineId == lineId)?.ErpLineId ?? string.Empty; + } + + public static int GetProcessIdFromLine(string lineId) + { + return WorklineList.SingleOrDefault(p => p.LineId == lineId)?.ProcessId ?? 10; + } + + public static string GetDestName(string destCode) + { + return DestLocList.SingleOrDefault(p => p.SaleLocCode == destCode)?.DestName ?? ""; + } + + public static string GetServerTimeString() + { + return GetServerTime().ToString(Config.日期时间格式); + } + + + public static decimal GetPartPrice(string partCode) + { + var poDetail = WmsDb.TF_PO_DETAIL.OrderByDescending(p => p.UID).FirstOrDefault(p => p.PartCode == partCode); + return poDetail?.Price / poDetail?.UmConv ?? 0; + } + + + private static readonly List<TB_BILL> TbBillList = new List<TB_BILL>(); + public static TB_BILL GetBillVendId(string billNum) + { + var bill = TbBillList.FirstOrDefault(p => p.BillNum == billNum); + if (bill == null) + { + { + bill = WmsDb.TB_BILL.FirstOrDefault(p => p.BillNum == billNum); + if (bill != null) + TbBillList.Add(bill); + } + } + return bill; + } + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsConfig.cs b/北京北汽/SCP/Models/WmsConfig.cs new file mode 100644 index 0000000..1fd0374 --- /dev/null +++ b/北京北汽/SCP/Models/WmsConfig.cs @@ -0,0 +1,74 @@ +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models +{ + public class WmsConfig + { + public string QAD域 { get; set; } = "CH"; + public string QAD地点 { get; set; } = "CH0101"; + public string WMS接口数据流水号格式 { get; set; } = "yyMMdd_HHmmss"; + public string 二维码格式 { get; set; } = "1"; + public string EDI客户编号 { get; set; } = "CHN03"; + public string EDI本公司在客户的供应商编号 { get; set; } = "AEHQQ"; + public string EDI客户位置 { get; set; } = "3010"; + public bool 寄存件在收货时不生成QAD接口 { get; set; } = false; + public string 日期时间格式 { get; set; } = "yyyy-MM-dd HH:mm:ss"; + public string 标签模板目录 { get; set; } = @"BarcodeTemplate"; + public string 单据模板目录 { get; set; } = @"PrintTemplate"; + public string 导入模板目录 { get; set; } = @"ImportTemplate"; + public string 采购件标签模板 { get; set; } = @"Material.grf"; + public string 制造件标签模板 { get; set; } = @"Product.grf"; + public string 客户标签模板 { get; set; } = "CustProduct.grf"; + public string 唯一码标签模板 { get; set; } = @"Unique.grf"; + public string 盘点标签模板 { get; set; } = "Check.grf"; + public string 默认零件标签模板 { get; set; } = @"Part.grf"; + public string 默认库位标签模板 { get; set; } = @"Location.grf"; + public string 半成品标签模板 { get; set; } = "SemiProduct.grf"; + public string 默认器具标签模板 { get; set; } = "Eqpt.grf"; + public string 默认位置标签模板 { get; set; } = "Cell.grf"; + public bool 成品生成报检单 { get; set; } = false; + public bool 委外收货生成报检单 { get; set; } = true; + public bool 回冲线边库原料 { get; set; } = false; + public bool 原料自动确认发料单 { get; set; } = true; + public bool 成品自动确认发料单 { get; set; } = true; + public bool 使用小车库位 { get; set; } = false; + + public string 原料小车库位 { get; set; } = "RAW_FORKLIFT"; + public string 成品小车库位 { get; set; } = "FG_FORKLIFT"; + public string CsAntolinCKPT零件号 { get; set; } = "COCKPIT"; + public string CsAntolinCKPT项目编号 { get; set; } = "X261CC"; + public string CsAntolinVIN线边库位 { get; set; } = "VIN-WIP"; + public string CsAntolinVIN成品库位 { get; set; } = "VIN-FG"; + public string CsAntolinVIN销售库位 { get; set; } = "VIN-SALE"; + public string CsAntolinCKPT销售订单编号 { get; set; } = "X261CC"; + public string 不生成接口数据的零件号列表 { get; set; } = "ELL00095-A,PLL02432-A,FAL00100-A"; + public bool 盘点完成自动调整库存 { get; set; } = false; + public bool 叫料单自动生成备料单 { get; set; } = false; + public string JIT中转库位 { get; set; } = "INSPECT"; + public string 空批次编号 { get; set; } = ".999999"; + public string 生产叫料库区列表 { get; set; } = $"{ EnumStoreArea.FG},{ EnumStoreArea.HF},{ EnumStoreArea.RAW},{EnumStoreArea.AST}"; + public bool 预览打印单据 { get; set; } = true; + public bool 按照库存状态变更ERP库位 { get; set; } = false; + public bool 线边库去批 { get; set; } = false; + public bool 条码包含供应商简称 { get; set; } = false; + public string 条码分隔符 { get; set; } = "."; + public string 条码序列号格式 { get; set; } = "000000"; + public string CqBmpt喷涂上线库 { get; set; } = "3216"; + public string CqBmpt预装上线库 { get; set; } = "3222"; + public string CqBmpt装配上线库 { get; set; } = "3225"; + public string 项目名称 { get; set; } = "锦恒项目"; + public string WMS用户名 { get; set; } = "WmsUser"; + public string MES用户名 { get; set; } = "MesUser"; + public string VIN用户名 { get; set; } = "VinUser"; + public string EDI用户名 { get; set; } = "EdiUser"; + public string JIS用户名 { get; set; } = "jisUser"; + public string PDA按钮行数 { get; set; } = "6"; + public string PDA按钮列数 { get; set; } = "2"; + public string 订单导出Excel文件密码 { get; set; } = "ChangkeTec2018"; + public string 菜单类型 { get; set; } = "Left"; + public int 检验单明细数量 { get; set; } = 0; + public bool 按零件号拆分检验单 { get; set; } = false; + public bool 弹出提示信息 { get; set; } = false; + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/CqbmptFilterInfo.cs b/北京北汽/SCP/Models/WmsEntity/CqbmptFilterInfo.cs new file mode 100644 index 0000000..c2cf684 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/CqbmptFilterInfo.cs @@ -0,0 +1,84 @@ +#region 引用命名 +using ChangKeTec.Wms.Models.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +#endregion + +namespace ChangKeTec.Wms.Models.Wms +{ + public class CqbmptFilterInfo + { + public DateTime ReciveBegin { get; set; } + + public DateTime ReceiveEnd { get; set; } + + public EnumCqbmptProcess Process { get; set; } + + //public EnumCqbmptCurState Phase { get; set; } + + public DateTime ReviewBegin { get; set; } + + public DateTime ReviewEnd { get; set; } + + public decimal Qty { get; set; } + + public List<string> ReceiverList { get; set; } = new List<string>(); + + public List<string> ReviewerList { get; set; } = new List<string>(); + + public List<string> ReasonList { get; set; } = new List<string>(); + + /// <summary> + /// 零件状态 + /// </summary> + public List<EnumCqbmptPartType> PartStateList { get; set; } = new List<EnumCqbmptPartType>(); + + /// <summary> + /// 评审类型 + /// </summary> + //public List<EnumCqbmptReviewType> ReviewTypeList { get; set; } = new List<EnumCqbmptReviewType>(); + + /// <summary> + /// 评审结果 + /// </summary> + //public List<EnumReviewState> ReviewResultList { get; set; } = new List<EnumReviewState>(); + + /// <summary> + /// 油漆件零件号 + /// </summary> + public List<CqbmPart> PartCodeList { get; set; } = new List<CqbmPart>(); + } + + public class CqbmPart + { + public string 零件号 { get; set; } + + public string 描述一 { get; set; } + + public string 描述二 { get; set; } + + public override string ToString() + { + return 零件号; + } + } + + public class CqbmptReason + { + public string 不合格原因 { get; set; } + + public EnumCqbmptProcess 工序 { get; set; } + + public int 状态 { get; set; } + + public string 备注 { get; set; } + + public override string ToString() + { + return 不合格原因; + } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/DecimalPrecisionAttributeConvention.cs b/北京北汽/SCP/Models/WmsEntity/DecimalPrecisionAttributeConvention.cs new file mode 100644 index 0000000..b419a1c --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/DecimalPrecisionAttributeConvention.cs @@ -0,0 +1,26 @@ +using System; +using System.Data.Entity.ModelConfiguration.Configuration; +using System.Data.Entity.ModelConfiguration.Conventions; + +namespace ChangKeTec.Wms.Models +{ + /// <summary> + /// 用于modelBuilder全局设置自定义精度属性 + /// </summary> + public class DecimalPrecisionAttributeConvention + : PrimitivePropertyAttributeConfigurationConvention<DecimalPrecisionAttribute> + { + public override void Apply(ConventionPrimitivePropertyConfiguration configuration, DecimalPrecisionAttribute attribute) + { + if (attribute.Precision < 1 || attribute.Precision > 38) + { + throw new InvalidOperationException("Precision must be between 1 and 38."); + } + if (attribute.Scale > attribute.Precision) + { + throw new InvalidOperationException("Scale must be between 0 and the Precision value."); + } + configuration.HasPrecision(attribute.Precision, attribute.Scale); + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/EDI_ASN_DETAIL.cs b/北京北汽/SCP/Models/WmsEntity/EDI_ASN_DETAIL.cs new file mode 100644 index 0000000..a637dee --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/EDI_ASN_DETAIL.cs @@ -0,0 +1,27 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models +{ + public class EDI_ASN_DETAIL + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + public string ASNNO { get; set; }//ASN编号,每年不重复,最长8位 + public string ASNDATE { get; set; }//ASN日期 + public string SLCODE { get; set; }//供应商编码 + public string BYCODE { get; set; }//收货方编码 + public string GATENO { get; set; }//到货门编码 + public string GATENM { get; set; }//到货门名称 + public string DOCKNO { get; set; }//到货口编码 + public string SLMONO { get; set; }//供应商内部物料编码 + public int MQTTY { get; set; }//物料数量 + public string BYMPO { get; set; }//买方订单编码 + public string BYMNO { get; set; }//买方物料编码 同供应商物料编码 + public bool isRead { get; set; } + + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/HyAntolin/DeliverAskSummary.cs b/北京北汽/SCP/Models/WmsEntity/HyAntolin/DeliverAskSummary.cs new file mode 100644 index 0000000..fb9e6be --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/HyAntolin/DeliverAskSummary.cs @@ -0,0 +1,44 @@ +using System; +using System.ComponentModel; + +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + + public partial class DeliverSummary + { + + [DisplayName("ͻID")] + public string CustId { get; set; } + + + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + + [DisplayName("λ")] + public string CellCode { get; set; } + + + [DisplayName("Ŀλ")] + public string ToLocCode { get; set; } + + [DisplayName("ͻϺ")] + public string CustPartCode { get; set; } + + + [DisplayName("ָ")] + public decimal PlanQty { get; set; } + + + [DisplayName("")] + public decimal Qty { get; set; } + + + [DisplayName("״̬")] + public EnumStockState State { get; set; } + + + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/HyAntolin/HY_PICK_FACT_SUMMARY.cs b/北京北汽/SCP/Models/WmsEntity/HyAntolin/HY_PICK_FACT_SUMMARY.cs new file mode 100644 index 0000000..8d75092 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/HyAntolin/HY_PICK_FACT_SUMMARY.cs @@ -0,0 +1,41 @@ +using System; +using System.ComponentModel; + +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + + public partial class HY_PICK_FACT_SUMMARY + { + + [DisplayName("")] + public DateTime BillDate { get; set; } + + + [DisplayName("Ŀλ")] + public string CellCode { get; set; } + + [DisplayName("Ŀλ")] + public string ToLocCode { get; set; } + + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + + // [DisplayName("")] + // public string Batch { get; set; } + [DisplayName("ϼ")] + public decimal Qty { get; set; } + + + + [DisplayName("ܼ")] + public decimal PartSumPrice { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/HyAntolin/HY_TB_PICK_FACT.cs b/北京北汽/SCP/Models/WmsEntity/HyAntolin/HY_TB_PICK_FACT.cs new file mode 100644 index 0000000..ad15961 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/HyAntolin/HY_TB_PICK_FACT.cs @@ -0,0 +1,24 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + + [NotMapped] + public partial class HY_TB_PICK_FACT : TB_PICK_FACT + { + + [DisplayName("ﵥ")] + public decimal PartPrice { get; set; } + + [DisplayName("۸λ")] + public string PartUnit { get; set; } + + + [DisplayName("ܼ")] + public decimal PartSumPrice => PartPrice * Qty; + + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/StockWhereCondition.cs b/北京北汽/SCP/Models/WmsEntity/StockWhereCondition.cs new file mode 100644 index 0000000..e19f29d --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/StockWhereCondition.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class StockWhereCondition + { + public string BarCode { get; set; } + public string LocCode { get; set; } + public string PartCode { get; set; } + public string Batch { get; set; } +// public EnumStockState State { get; set; } + public string EqptCode { get; set; } + public List<string> AreaCodes { get; set; } + public List<EnumStockState> States { get; set; }=new List<EnumStockState>{}; + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TA_BILLTYPE.cs b/北京北汽/SCP/Models/WmsEntity/TA_BILLTYPE.cs new file mode 100644 index 0000000..68ced3d --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_BILLTYPE.cs @@ -0,0 +1,71 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_BILLTYPE + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + [DisplayName( "ͱ")] + public EnumBillType BillType { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName( "")] + public string TypeName { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName( "")] + public string TypeDesc { get; set; } + + [DisplayName( "״̬")] + public int State { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName( "ǰ׺")] + public string Prefix { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(500)] + [DisplayName( "ݱŹ")] + public string BillNumRule { get; set; } + + [DisplayName( "")] + public int LastNumber { get; set; } + + [StringLength(50)] + [DisplayName( "󵥾ݱ")] + public string LastBillNum { get; set; } + + [DisplayName( "󵥾ʱ")] + public DateTime LastBillTime { get; set; } + + [StringLength(500)] + [DisplayName( "ӡģļ")] + public string PrintTemplateFileName { get; set; } + + [StringLength(500)] + [DisplayName( "ģļ")] + public string ImportTemplateFileName { get; set; } + + + public bool IsCalc { get; set; } + + [StringLength(50)] + [DisplayName( "ָ")] + public string Sep { get; set; } + + [DisplayName( "ӡ")] + public int PaperOrientation { get; set; } = 0; + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TA_BOM.cs b/北京北汽/SCP/Models/WmsEntity/TA_BOM.cs new file mode 100644 index 0000000..8ac252e --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_BOM.cs @@ -0,0 +1,45 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_BOM + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ܳϺ")] + public string PartCode { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string SubPartCode { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal Qty { get; set; } + + [Key] + [Column(Order = 2, TypeName = "date")] + [DisplayName("Ч")] + public DateTime BeginDate { get; set; } + + [Column(TypeName = "date")] + [DisplayName("ʧЧ")] + public DateTime EndDate { get; set; } + + [DisplayName("Ƿǹؼ")] + public bool IsKeyPart { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TA_CELL.cs b/北京北汽/SCP/Models/WmsEntity/TA_CELL.cs new file mode 100644 index 0000000..346ad5f --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_CELL.cs @@ -0,0 +1,92 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + + public partial class TA_CELL + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("λñ")] + public string CellCode { get; set; } + + [StringLength(50)] + [DisplayName("λ")] + public string CellDesc { get; set; } + + [DisplayName("λ")] + public int CellType { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ӧ")] + public string LineId { get; set; } = ""; + + + [StringLength(50)] + [DisplayName("Ӧͻ")] + public string CustId { get; set; } = ""; + + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ӧλ")] + public string LocCode { get; set; } = ""; + + + + [DisplayName("Ĭʱ")] + public int DefaultMinutes { get; set; } = 60; + + [StringLength(50)] + [DisplayName("ע")] + public string Remark { get; set; } + } + public partial class TA_CELL1 + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("λñ")] + public string CellCode { get; set; } + + [StringLength(50)] + [DisplayName("λ")] + public string CellDesc { get; set; } + + [DisplayName("λ")] + public int CellType { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ӧ")] + public string LineId { get; set; } = ""; + + + [StringLength(50)] + [DisplayName("Ӧͻ")] + public string CustId { get; set; } = ""; + + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ӧλ")] + public string LocCode { get; set; } = ""; + + + + [DisplayName("Ĭʱ")] + public int DefaultMinutes { get; set; } = 60; + + [StringLength(50)] + [DisplayName("ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TA_CELL_PART.cs b/北京北汽/SCP/Models/WmsEntity/TA_CELL_PART.cs new file mode 100644 index 0000000..cb3ef9f --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_CELL_PART.cs @@ -0,0 +1,41 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_CELL_PART + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("λñ")] + public string CellCode { get; set; } + + //[StringLength(50)] + //[DisplayName("λ")] + //public string CellDesc => WmsCache.GetCellDesc(CellCode); + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + + [DisplayName("״̬")] + public int State { get; set; } + + [StringLength(50)] + [DisplayName("ע")] + public string Remark { get; set; } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TA_CONFIG.cs b/北京北汽/SCP/Models/WmsEntity/TA_CONFIG.cs new file mode 100644 index 0000000..4a6ad76 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_CONFIG.cs @@ -0,0 +1,29 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_CONFIG + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("")] + public string ParamName { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName( "ֵ")] + public string ParamValue { get; set; } + + [DisplayName( "״̬")] + public int State { get; set; } + + [StringLength(500)] + [DisplayName( "ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TA_CUSTOMER.cs b/北京北汽/SCP/Models/WmsEntity/TA_CUSTOMER.cs new file mode 100644 index 0000000..8389db0 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_CUSTOMER.cs @@ -0,0 +1,81 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_CUSTOMER + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("ͻ")] + public string CustId { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("ͻ")] + public string CustName { get; set; } + + [StringLength(50)] + [DisplayName("ͻ")] + public string CustType { get; set; } + + [StringLength(50)] + [DisplayName("ERPͻ")] + public string ErpCode { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string Country { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string City { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string Currency { get; set; } + + [StringLength(50)] + public string Promo { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(200)] + [DisplayName("ַ")] + public string Address { get; set; } + + [StringLength(50)] + [DisplayName("ʱ")] + public string ZipCode { get; set; } + + [StringLength(50)] + [DisplayName("ϵ")] + public string Contacter { get; set; } + + [StringLength(50)] + [DisplayName("ϵ绰")] + public string Phone { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string Fax { get; set; } + + [StringLength(50)] + [DisplayName("ʼ")] + public string Email { get; set; } + + [DisplayName("״̬")] + public int State { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + + [StringLength(50)] + [DisplayName("ڿͻӦ̱")] + public string SelfCode { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TA_CUST_BOM.cs b/北京北汽/SCP/Models/WmsEntity/TA_CUST_BOM.cs new file mode 100644 index 0000000..a447406 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_CUST_BOM.cs @@ -0,0 +1,45 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_CUST_BOM + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ܳϺ")] + public string PartCode { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string SubPartCode { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal Qty { get; set; } + + [Key] + [Column(Order = 2, TypeName = "date")] + [DisplayName("Ч")] + public DateTime BeginDate { get; set; } + + [Column(TypeName = "date")] + [DisplayName("ʧЧ")] + public DateTime EndDate { get; set; } + + [DisplayName("Ƿؼ")] + public bool IsKeyPart { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TA_CUST_PART.cs b/北京北汽/SCP/Models/WmsEntity/TA_CUST_PART.cs new file mode 100644 index 0000000..9e76a7a --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_CUST_PART.cs @@ -0,0 +1,132 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Newtonsoft.Json; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_CUST_PART + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ͻ")] + public string CustId { get; set; } + [NotMapped] + [JsonIgnore] + [DisplayName("ͻ")] + public string CustName => WmsCache.GetCustName(CustId); + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("ͻϺ")] + public string CustPartCode { get; set; } + + [StringLength(200)] + [DisplayName("ͻ")] + public string CustPartName { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + + [NotMapped] + [JsonIgnoreAttribute] + [DisplayName("ERPϺ")] + public string ErpPartCode => WmsCache.GetErpPartCode(PartCode); + [NotMapped] + [JsonIgnoreAttribute] + [DisplayName("һ")] + public string PartDesc1 => WmsCache.GetPartDesc1(PartCode); + [NotMapped] + [JsonIgnoreAttribute] + [DisplayName("")] + public string PartDesc2 => WmsCache.GetPartDesc2(PartCode); + [NotMapped] + [JsonIgnoreAttribute] + [DisplayName("Ŀ")] + public string ProjectId => WmsCache.GetProjectId(PartCode); + [NotMapped] + [JsonIgnoreAttribute] + [DisplayName("λ")] + public string Unit => WmsCache.GetUnit(PartCode); + [NotMapped] + [JsonIgnoreAttribute] + [DisplayName("")] + public string PartType => WmsCache.GetPartType(PartCode); + [NotMapped] + [JsonIgnoreAttribute] + [DisplayName("")] + public string PartKind => WmsCache.GetPartKind(PartCode); + [DisplayName("ͻ")] + public decimal CustPackQty { get; set; } + + [StringLength(50)] + [DisplayName("ͻ̳ߴ")] + public string CustPalletSize { get; set; } + + [Column(TypeName = "money")] + [DisplayName("ͻ")] + public decimal CustPalletCapacity { get; set; } + + [DisplayName("ͻ")] + public int CustPalletQty { get; set; } + + [DisplayName("״̬")] + public int State { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + + public TA_CUST_PART_S ToS() + { + return new TA_CUST_PART_S + { + CustId = CustId, + CustPartCode = CustPartCode, + CustPartName = CustPartName, + PartCode = PartCode, + CustPackQty = CustPackQty, + State = State, + Remark = Remark, + }; + + } + } + + public partial class TA_CUST_PART_S + { + + + [Key] + public string CustId { get; set; } + + [Key] + [DisplayName("ͻϺ")] + public string CustPartCode { get; set; } + + [DisplayName("ͻ")] + public string CustPartName { get; set; } + + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + + [DisplayName("ͻ")] + public decimal CustPackQty { get; set; } + + [DisplayName("״̬")] + public int State { get; set; } + + [DisplayName("ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TA_DELIVER_DEST.cs b/北京北汽/SCP/Models/WmsEntity/TA_DELIVER_DEST.cs new file mode 100644 index 0000000..2a78be6 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_DELIVER_DEST.cs @@ -0,0 +1,48 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_DELIVER_DEST + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("ص")] + public string DestCode { get; set; } + + [StringLength(50)] + [DisplayName("ص")] + public string DestName { get; set; } + + [StringLength(50)] + [DisplayName("´")] + public string OfficeName { get; set; } + + [StringLength(50)] + [DisplayName("ϵ")] + public string ReceivePerson { get; set; } + + [StringLength(50)] + [DisplayName("ϵʽ")] + public string ReceivePersonTel { get; set; } + + [StringLength(200)] + [DisplayName("ַ")] + public string ReceiveAddress { get; set; } + + [StringLength(50)] + [DisplayName("λ")] + public string RoadOutLoc { get; set; } + + [StringLength(50)] + [DisplayName("˻ؿλ")] + public string RoadReturnLoc { get; set; } + + [StringLength(50)] + public string StockLoc { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TA_DEST_LOC.cs b/北京北汽/SCP/Models/WmsEntity/TA_DEST_LOC.cs new file mode 100644 index 0000000..8331b86 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_DEST_LOC.cs @@ -0,0 +1,26 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_DEST_LOC + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + + [StringLength(50)] + [DisplayName("´")] + public string DestName { get; set; } + + [StringLength(50)] + [DisplayName("ۿλ")] + public string SaleLocCode { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TA_ERP_LOC.cs b/北京北汽/SCP/Models/WmsEntity/TA_ERP_LOC.cs new file mode 100644 index 0000000..1959d56 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_ERP_LOC.cs @@ -0,0 +1,33 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_ERP_LOC + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("ERPλ")] + public string ErpLocCode { get; set; } + + [StringLength(50)] + [DisplayName("λ")] + public string LocDesc { get; set; } + + [StringLength(50)] + [DisplayName("λ")] + public string LocType { get; set; } + + [StringLength(50)] + [DisplayName("ص")] + public string Site { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string Domain { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TA_ERP_STANDARD_COST.cs b/北京北汽/SCP/Models/WmsEntity/TA_ERP_STANDARD_COST.cs new file mode 100644 index 0000000..c97a1ff --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_ERP_STANDARD_COST.cs @@ -0,0 +1,26 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_ERP_STANDARD_COST + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [StringLength(50)] + public string ErpSite { get; set; } + + [Key] + [StringLength(50)] + public string PartCode { get; set; } + + public decimal? StandardCost { get; set; } + + public DateTime? CostDate { get; set; } + + [StringLength(50)] + public string Domain { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TA_OTHER_INOUT_REASON.cs b/北京北汽/SCP/Models/WmsEntity/TA_OTHER_INOUT_REASON.cs new file mode 100644 index 0000000..52d5e8a --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_OTHER_INOUT_REASON.cs @@ -0,0 +1,33 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_OTHER_INOUT_REASON + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + [DisplayName("ԭ")] + public int ReasonCode { get; set; } + + [DisplayName("")] + public EnumBillType BillType { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("ԭ")] + public string ReasonDesc { get; set; } + + [StringLength(50)] + [DisplayName("ERPԭ")] + public string ErpReasonCode { get; set; } + + [DisplayName("״̬")] + public int State { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TA_PART.cs b/北京北汽/SCP/Models/WmsEntity/TA_PART.cs new file mode 100644 index 0000000..e5434e6 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_PART.cs @@ -0,0 +1,226 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; +using CK.SCP.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + + + public partial class TA_PART + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public long UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("ERPϺ")] + public string ErpPartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [DisplayName("һ")] + public string PartDesc1 { get; set; } + + [Required(AllowEmptyStrings = true)] + [DisplayName("")] + public string PartDesc2 { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ŀ")] + public string ProjectId { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("λ")] + public string Unit { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string PartType { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string PartKind { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string PartGroup { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(10)] + [DisplayName("״̬")] + public string State { get; set; } + + [DisplayName("")] + public EnumManageType ManageType { get; set; } + + [DisplayName("")] + public InspectType InspectType { get; set; } + + + [StringLength(100)] + [DisplayName("Ϣ")] + public string Configuration { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal MaxQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("С")] + public decimal MinQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("ȫ")] + public decimal SafeQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("߰װ")] + public decimal ContainerQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("洢")] + public decimal StockPackQty { get; set; } = 1; + + [Column(TypeName = "money")] + [DisplayName("߱߰װ")] + public decimal LinesidePackQty { get; set; } = 1; + + [DisplayName("Ч")] + public int ValidityDays { get; set; } = 365; + + [StringLength(50)] + [DisplayName("ջ")] + public string ReceivePort { get; set; } + + [StringLength(50)] + [DisplayName("Ĭջλ")] + public string DefaultReceiveLocCode { get; set; } + + [DisplayName("")] + public EnumDistributionType DistributionType { get; set; } + + [StringLength(50)] + [DisplayName("QLevel")] + public string QLevel { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string Process { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string CertificateOfQuality { get; set; } + + [DisplayName("ǷĴ")] + public bool IsConsign { get; set; } + + [DisplayName("Ƿ")] + public bool IsDeposit { get; set; } + + [DisplayName("Ƿ뼯")] + public bool IsTransfer { get; set; } + + [StringLength(50)] + [DisplayName("Ա")] + public string StoreKeeper { get; set; } + + [StringLength(50)] + [DisplayName("Ա")] + public string Inspecter { get; set; } + + [Column(TypeName = "money")] + [DisplayName("Ʒ")] + public decimal SamplePercent { get; set; } + + [StringLength(50)] + [DisplayName("ǩģ")] + public string LabelTemplate { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string PalletSize { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string Promo { get; set; } + + [StringLength(50)] + [DisplayName("QAD")] + public string Source { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + + [StringLength(50)] + [DisplayName("ģ")] + public string PalletTemplate { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal SingleWeight { get; set; } + + [StringLength(50)] + [DisplayName("ͼ")] + public string DrawingNumber { get; set; } + + [DisplayName("ʱǷϲ")] + public bool IsAskMerge { get; set; } + } + public partial class TA_PART_S + { + public long UID { get; set; } + + [Key] + public string PartCode { get; set; } + public string ErpPartCode { get; set; } + public string PartDesc1 { get; set; } + public string PartDesc2 { get; set; } + public string ProjectId { get; set; } + public string Unit { get; set; } + public string PartType { get; set; } + public string PartKind { get; set; } + public string State { get; set; } + public EnumManageType ManageType { get; set; } + public InspectType InspectType { get; set; } + public string Configuration { get; set; } + // public decimal MaxQty { get; set; } + // public decimal MinQty { get; set; } + // public decimal SafeQty { get; set; } + // public decimal ContainerQty { get; set; } + public decimal StockPackQty { get; set; } + public decimal LinesidePackQty { get; set; } + // public int ValidityDays { get; set; } + // public string ReceivePort { get; set; } + public string DefaultReceiveLocCode { get; set; } + public EnumDistributionType DistributionType { get; set; } + // public string QLevel { get; set; } + // public string Process { get; set; } + // public string CertificateOfQuality { get; set; } + // public bool IsConsign { get; set; } + // public bool IsDeposit { get; set; } + // public bool IsTransfer { get; set; } + // public string StoreKeeper { get; set; } + // public string Inspecter { get; set; } + // public decimal SamplePercent { get; set; } + // public string LabelTemplate { get; set; } + // public string PalletSize { get; set; } + // public string Promo { get; set; } + // public string Source { get; set; } + // public string Remark { get; set; } + // public string PalletTemplate { get; set; } + // public decimal SingleWeight { get; set; } + public string PartGroup { get; set; } + } + + +} diff --git a/北京北汽/SCP/Models/WmsEntity/TA_PARTGROUP_INSPECTER.cs b/北京北汽/SCP/Models/WmsEntity/TA_PARTGROUP_INSPECTER.cs new file mode 100644 index 0000000..84292be --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_PARTGROUP_INSPECTER.cs @@ -0,0 +1,24 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_PARTGROUP_INSPECTER + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + + [StringLength(50)] + [DisplayName("")] + + public string PartGroupCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ա")] + public string Inspecter { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TA_PART_UNIT_CONVERSION.cs b/北京北汽/SCP/Models/WmsEntity/TA_PART_UNIT_CONVERSION.cs new file mode 100644 index 0000000..ee7b2e3 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_PART_UNIT_CONVERSION.cs @@ -0,0 +1,40 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + + +namespace ChangKeTec.Wms.Models.Wms +{ + + + public partial class TA_PART_UNIT_CONVERSION + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public long UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("λ1")] + public string Unit1 { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("λ2")] + public string Unit2 { get; set; } + + [Column(TypeName = "money")] + [DisplayName("ת")] + public decimal Conversion { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TA_PAYMENT_DAY.cs b/北京北汽/SCP/Models/WmsEntity/TA_PAYMENT_DAY.cs new file mode 100644 index 0000000..5b90920 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_PAYMENT_DAY.cs @@ -0,0 +1,43 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_PAYMENT_DAY + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [DisplayName( "")] + public int BillYear { get; set; } + + [DisplayName( "")] + public int BillMonth { get; set; } + + [DisplayName( "")] + public int BillDay { get; set; } + + [DisplayName( "ʱ")] + public int BillHour { get; set; } + + [DisplayName( "ڷ")] + public int BillMinute { get; set; } + + + public DateTime BeginTime { get; set; } + + + public DateTime EndTime { get; set; } + + [DisplayName( "״̬")] + public int State { get; set; } + + [StringLength(500)] + [DisplayName( "ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TA_PURCHASE_PRICE.cs b/北京北汽/SCP/Models/WmsEntity/TA_PURCHASE_PRICE.cs new file mode 100644 index 0000000..80ed326 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_PURCHASE_PRICE.cs @@ -0,0 +1,54 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_PURCHASE_PRICE + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("Ӧ̱")] + public string VendId { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string Currency { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("λ")] + public string Unit { get; set; } + + [Column(TypeName = "money")] + [DisplayName("۸")] + public decimal Price { get; set; } + + [Key] + [Column(Order = 2, TypeName = "date")] + [DisplayName("Ч")] + public DateTime BeginDate { get; set; } + + [Column(TypeName = "date")] + [DisplayName("ʧЧ")] + public DateTime EndDate { get; set; } + + [DisplayName("״̬")] + public int State { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TA_SALE_PRICE.cs b/北京北汽/SCP/Models/WmsEntity/TA_SALE_PRICE.cs new file mode 100644 index 0000000..6adec51 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_SALE_PRICE.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_SALE_PRICE + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ͻ")] + public string CustId { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string Currency { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("λ")] + public string Unit { get; set; } + + [Column(TypeName = "money")] + [DisplayName("۸")] + public decimal Price { get; set; } + + [Key] + [Column(Order = 2, TypeName = "date")] + [DisplayName("Ч")] + public DateTime BeginDate { get; set; } + + [Column(TypeName = "date")] + [DisplayName("ʧЧ")] + public DateTime EndDate { get; set; } + + [DisplayName("״̬")] + public int State { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TA_STORE_GROUP.cs b/北京北汽/SCP/Models/WmsEntity/TA_STORE_GROUP.cs new file mode 100644 index 0000000..c54f33b --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_STORE_GROUP.cs @@ -0,0 +1,44 @@ +using CK.SCP.Models; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_STORE_GROUP + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("λ")] + public string GroupCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("λ")] + public string GroupName { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("λ")] + public string GroupType { get; set; } + + [StringLength(50)] + [DisplayName("ֿ")] + public string WhseCode { get; set; } + + [DisplayName("״̬")] + public int State { get; set; } + + [StringLength(500)] + [DisplayName("")] + public string Remark { get; set; } + + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TA_STORE_LOCATION.cs b/北京北汽/SCP/Models/WmsEntity/TA_STORE_LOCATION.cs new file mode 100644 index 0000000..f4cad2c --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_STORE_LOCATION.cs @@ -0,0 +1,80 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_STORE_LOCATION + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [DisplayName("״̬")] + + public int State { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("λ")] + public string LocCode { get; set; } + + [StringLength(50)] + [DisplayName("λ")] + public string LocName { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("ERPλ")] + public string ErpLocCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string AreaCode { get; set; } + + [StringLength(50)] + [DisplayName("λ")] + public string GroupCode { get; set; } + + [StringLength(50)] + [DisplayName("λ")] + public string LocType { get; set; } + + [StringLength(50)] + [DisplayName("Ĭ")] + public string DefaultPartCode { get; set; } + + [DisplayName("")] + public bool IsEnableNegativeStock { get; set; } + + [DisplayName("ԶƳ")] + public bool AutoRemoveZeroStockDetail { get; set; } + + [DisplayName("")] + public int MaxBoxQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("ռðٷְ")] + public decimal StoredPercent { get; set; } + + [DisplayName("")] + public bool IsEnableMix { get; set; } + + [StringLength(50)] + [DisplayName("Ŀ")] + public string ProjectId { get; set; } + + [StringLength(50)] + [DisplayName("Ա")] + public string StoreKeeper { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + + //[NotMapped] + //[StringLength(50)] + //[DisplayName("ֿ")] + //public string WhseCode => WmsCache.GetWhseCode(GroupCode); + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TA_STORE_WHSE.cs b/北京北汽/SCP/Models/WmsEntity/TA_STORE_WHSE.cs new file mode 100644 index 0000000..d551659 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_STORE_WHSE.cs @@ -0,0 +1,47 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_STORE_WHSE + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("ֿ")] + public string WhseCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("ֿ")] + public string WhseName { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(200)] + [DisplayName("ַֿ")] + public string WhseAddress { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("ֿ")] + public string WhseType { get; set; } + +// [StringLength(50)] +// [DisplayName("ERP")] +// public string ErpDomain { get; set; } + + [StringLength(50)] + [DisplayName("ERPص")] + public string ErpSite { get; set; } + + [DisplayName("״̬")] + public int State { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TA_TEAM.cs b/北京北汽/SCP/Models/WmsEntity/TA_TEAM.cs new file mode 100644 index 0000000..469c34a --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_TEAM.cs @@ -0,0 +1,39 @@ +using CK.SCP.Models; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_TEAM + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("")] + public string TeamId { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string TeamName { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string LineId { get; set; } + + [DisplayName("״̬")] + public int State { get; set; } + + [StringLength(200)] + [DisplayName("ע")] + public string Remark { get; set; } + + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TA_VENDER.cs b/北京北汽/SCP/Models/WmsEntity/TA_VENDER.cs new file mode 100644 index 0000000..b22285e --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_VENDER.cs @@ -0,0 +1,78 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +// + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_VENDER + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("Ӧ̱")] + public string VendId { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ӧ")] + public string VendName { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(2)] + [DisplayName("Ӧֶ")] + public string VendAbbCode { get; set; } + + [StringLength(50)] + [DisplayName("Ӧ")] + public string VendType { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string Country { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string City { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string Currency { get; set; } + + [StringLength(50)] + public string Promo { get; set; } + + [StringLength(120)] + [DisplayName("ַ")] + public string Address { get; set; } + + [StringLength(50)] + [DisplayName("ʱ")] + public string ZipCode { get; set; } + + [StringLength(50)] + [DisplayName("ϵ")] + public string Contacter { get; set; } + + [StringLength(50)] + [DisplayName("ϵ绰")] + public string Phone { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string Fax { get; set; } + + [StringLength(50)] + [DisplayName("ʼ")] + public string Email { get; set; } + + [DisplayName("״̬")] + public int State { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TA_VEND_PART.cs b/北京北汽/SCP/Models/WmsEntity/TA_VEND_PART.cs new file mode 100644 index 0000000..3bcf0a6 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_VEND_PART.cs @@ -0,0 +1,104 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Newtonsoft.Json; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_VEND_PART + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public long UID { get; set; } + [Key] + [Column(Order = 2)] + [StringLength(50)] + [DisplayName("Ӧ")] + public string VendPartCode { get; set; } + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("Ӧ̱")] + public string VendId { get; set; } + + [NotMapped] + [DisplayName("Ӧ")] + [JsonIgnore] + public string VenderName => WmsCache.GetVenderName(VendId); + + [NotMapped] + [DisplayName("Ӧֶ")] + [JsonIgnoreAttribute] + public string VendAbbCode => WmsCache.GetVendAbbr(VendId); + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [JsonIgnoreAttribute] + [DisplayName("һ")] + public string PartDesc1 => WmsCache.GetPartDesc1(PartCode); + + [NotMapped] + [JsonIgnoreAttribute] + [DisplayName("")] + public string PartDesc2 => WmsCache.GetPartDesc2(PartCode); + + + [DisplayName("Ӧ̱")] + public decimal VendPackQty { get; set; } + + [StringLength(50)] + [DisplayName("ɹλ")] + public string PoUnit { get; set; } + + [DisplayName("״̬")] + public int State { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + + public TA_VEND_PART_S ToS() + { + return new TA_VEND_PART_S + { + VendPartCode = VendPartCode, + VendId = VendId, + PartCode= PartCode, + VendPackQty= VendPackQty, + PoUnit= PoUnit, + State= State, + Remark= Remark, + }; + } + } + public partial class TA_VEND_PART_S + { + + [DisplayName("Ӧ")] + public string VendPartCode { get; set; } + + [DisplayName("Ӧ̱")] + public string VendId { get; set; } + + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [DisplayName("Ӧ̱")] + public decimal VendPackQty { get; set; } + + [StringLength(50)] + [DisplayName("ɹλ")] + public string PoUnit { get; set; } + + [DisplayName("״̬")] + public int State { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TA_WORKLINE.cs b/北京北汽/SCP/Models/WmsEntity/TA_WORKLINE.cs new file mode 100644 index 0000000..56f9317 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TA_WORKLINE.cs @@ -0,0 +1,58 @@ +using CK.SCP.Models; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TA_WORKLINE + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("߱")] + public string LineId { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string LineName { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string LineType { get; set; } + + [DisplayName("ERP߱")] + public string ErpLineId { get; set; } = "1000"; + + [DisplayName("ERP")] + public int ProcessId { get; set; } = 10; + [DisplayName("״̬")] + public int State { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ͽλ")] + public string InLocCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("깤λ")] + public string OutLocCode { get; set; } + + [DisplayName("׼ʱ")] + public int PrepareMins { get; set; } + + [StringLength(200)] + [DisplayName("ע")] + public string Remark { get; set; } + + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_ATTACHMENT.cs b/北京北汽/SCP/Models/WmsEntity/TB_ATTACHMENT.cs new file mode 100644 index 0000000..13e104b --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_ATTACHMENT.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.WmsEntity +{ + using System; + using System.Collections.Generic; + + public partial class TB_ATTACHMENT + { + public int UID { get; set; } + public string OriginalFileName { get; set; } + public string FilePath { get; set; } + public string FileUrl { get; set; } + public string FolderName { get; set; } + public string FileName { get; set; } + public long FileSize { get; set; } + public string FileType { get; set; } + public Nullable<byte> Type { get; set; } + public Nullable<byte> FileStoreMode { get; set; } + public string Creator { get; set; } + public Nullable<System.DateTime> CreateTime { get; set; } + public string ModifiedBy { get; set; } + public Nullable<System.DateTime> ModifiedTime { get; set; } + public Nullable<bool> IsDeleted { get; set; } + public Nullable<int> MainId { get; set; } + public byte[] FileContent { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_BILL.cs b/北京北汽/SCP/Models/WmsEntity/TB_BILL.cs new file mode 100644 index 0000000..36de7f5 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_BILL.cs @@ -0,0 +1,131 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +//using ChangKeTec.Utils; +using ChangKeTec.Wms.Models.Enums; +using CK.SCP.Utils; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_BILL + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + [Display(AutoGenerateField = false)] + [ScaffoldColumn(false)] + public int UID { get; set; } + + [NotMapped] + public string ״̬ => ((EnumBillState) State).ToString(); + + [Key] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } = ""; + + [StringLength(50)] + [DisplayName("ԭʼ")] + public string SourceBillNum { get; set; } = ""; + + [StringLength(50)] + [DisplayName("ԭʼ2")] + public string SourceBillNum2 { get; set; } = ""; + + [StringLength(50)] + [DisplayName("ԭʼ3")] + public string SourceBillNum3 { get; set; } = ""; + + [DisplayName("")] + [NotMapped] + public string BillTypeName => EnumHelper.GetDesc(BillType); + + [DisplayName("")] + [NotMapped] + public string SubBillTypeName => SubBillType.ToString(); + + [DisplayName("ʱ")] + public DateTime BillTime { get; set; } + + [StringLength(50)] + [DisplayName("ʼʱ")] + public string StartTime { get; set; } + + [StringLength(50)] + [DisplayName("ʱ")] + public string FinishTime { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ա")] + public string OperName { get; set; } + + [DisplayName("ϸ")] + public int DetailQty { get; set; } + + [StringLength(50)] + [DisplayName("Ӧ̱")] + public string VendId { get; set; } + + [NotMapped] + [DisplayName("Ӧ")] + public string VendName => WmsCache.GetVenderName(VendId); + + [StringLength(50)] + [DisplayName("ͻ")] + + public string CustId { get; set; } + + [NotMapped] + [DisplayName("ͻ")] + public string CustName => WmsCache.GetCustName(CustId); + + [StringLength(50)] + [DisplayName("Ŀ")] + public string ProjectId { get; set; } + + [StringLength(50)] + [DisplayName("䷽ʽ")] + + public string TransportType { get; set; } + + [StringLength(50)] + [DisplayName("ƺ")] + + public string TruckNum { get; set; } + + [StringLength(50)] + [DisplayName("ű")] + + public string GateCode { get; set; } + + [StringLength(50)] + [DisplayName("")] + + public string GateName { get; set; } + + [StringLength(50)] + [DisplayName("ڱ")] + + public string DockCode { get; set; } + + + [DisplayName("ע")] + public string Remark { get; set; } + + + public EnumBillState State { get; set; } + + public EnumBillType BillType { get; set; } + + + public EnumSubBillType SubBillType { get; set; } + + + public Guid GUID { get; set; } = Guid.NewGuid(); + + public TB_BILL() + { + + } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_CHECK.cs b/北京北汽/SCP/Models/WmsEntity/TB_CHECK.cs new file mode 100644 index 0000000..bd37f64 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_CHECK.cs @@ -0,0 +1,140 @@ +using ChangKeTec.Wms.Models.Enums; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +//using ChangKeTec.Wms.Models.Enums; +// + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_CHECK + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [NotMapped] + public string ̵״̬ => CheckState.ToString(); + + [NotMapped] + public string ̵ => CheckResult.ToString(); + + [DisplayName("")] + [NotMapped] + public decimal DiffQty => _ignoreCheckStateList.Contains(CheckState) ? 0 : FinalCheckQty - BookQty; + + private readonly List<EnumCheckState> _ignoreCheckStateList = new List<EnumCheckState> + { + EnumCheckState.δ̵, + EnumCheckState.̵, + EnumCheckState. + }; + + + [DisplayName("")] + [NotMapped] + public decimal DiffAmount => DiffQty * PartPrice; + + + [Key] + [Required(AllowEmptyStrings = true)] + [StringLength(500)] + [DisplayName("̵ǩ")] + public string TagCode { get; set; } + + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("̵λ")] + public string LocCode { get; set; } = ""; + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string BarCode { get; set; } = ""; + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } = ""; + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string Batch { get; set; } = ""; + + [DisplayName("״̬")] + public EnumStockState StockState { get; set; } = EnumStockState.ϸ; + + [DisplayName("ϼ۸")] + public decimal PartPrice { get; set; } + + [StringLength(50)] + [DisplayName("ߺ")] + public string EqptCode { get; set; } = ""; + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal BookQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("̵")] + public decimal FinalCheckQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal CheckQty { get; set; } + + [DisplayName("ʱ")] + public DateTime CheckTime { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string CheckOper { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal ReCheckQty { get; set; } + + [DisplayName("ʱ")] + public DateTime ReCheckTime { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string ReCheckOper { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal SupCheckQty { get; set; } + + [DisplayName("ʱ")] + public DateTime SupCheckTime { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string SupCheckOper { get; set; } + + + public EnumCheckState CheckState { get; set; } + + + public EnumCheckResult CheckResult { get; set; } + + [DisplayName("Ӧ̱")] + public string VendId { get; set; } + + [DisplayName("Ӧ")] + public string VendBatch { get; set; } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TB_CHECK_DETAIL.cs b/北京北汽/SCP/Models/WmsEntity/TB_CHECK_DETAIL.cs new file mode 100644 index 0000000..9c6de7c --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_CHECK_DETAIL.cs @@ -0,0 +1,136 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_CHECK_DETAIL + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [NotMapped] + public string ̵״̬ => CheckState.ToString(); + + [DisplayName("")] + [NotMapped] + public decimal DiffQty => GetDiffQty(); + + private decimal GetDiffQty() + { + if (CheckState == EnumCheckState.δ̵) + return 0; + else + return FinalCheckQty - BookQty; + } + [DisplayName("")] + [NotMapped] + public decimal DiffAmount => GetDiffAmount(); + + private decimal GetDiffAmount() + { + var price = WmsCache.GetPartPrice(PartCode); + return price * DiffQty; + } + + [Key] + [Column(Order=0)] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("̵λ")] + public string BillLocCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("λ")] + public string BookLocCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("ʵʿλ")] + public string CheckLocCode { get; set; } + + [Key] + [Column(Order = 2)] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string BarCode { get; set; } + + [Key] + [Column(Order = 3)] + [DisplayName("״̬")] + public EnumStockState State { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + public string => WmsCache.GetPartDesc(PartCode); + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string Batch { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("ߺ")] + public string EqptCode { get; set; } = ""; + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal BookQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("̵")] + public decimal FinalCheckQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal CheckQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal ReCheckQty { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("̵ʱ")] + public string CheckTime { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("̵")] + public string OperName { get; set; } + + + [StringLength(50)] + [DisplayName("Ӧ̱")] + public string VendId { get; set; } + + [StringLength(50)] + [DisplayName("Ӧ")] + public string VendBatch { get; set; } + + [DisplayName("")] + public DateTime? ProduceDate { get; set; } + + + public EnumCheckState CheckState { get; set; } + + + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_CHECK_LOC.cs b/北京北汽/SCP/Models/WmsEntity/TB_CHECK_LOC.cs new file mode 100644 index 0000000..9bf5b04 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_CHECK_LOC.cs @@ -0,0 +1,67 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; +// + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_CHECK_LOC + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [NotMapped] + public string ״̬ => CheckState.ToString(); + + public EnumCheckResult CheckResult { get; set; } + + [NotMapped] + public string => CheckResult.ToString(); + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("̵λ")] + public string LocCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ƶ")] + public string OperName { get; set; } + + [DisplayName("ʱ")] + public DateTime BillTime { get; set; } + + [StringLength(50)] + [DisplayName("̵㿪ʼʱ")] + public string CheckBeginTime { get; set; } + + [StringLength(50)] + [DisplayName("̵ʱ")] + public string CheckEndTime { get; set; } + + [StringLength(50)] + [DisplayName("̿ʼʱ")] + public string ReCheckBeginTime { get; set; } + + [StringLength(50)] + [DisplayName("̽ʱ")] + public string ReCheckEndTime { get; set; } + + + public EnumCheckState CheckState { get; set; } + + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_CONTAINER_INOUT.cs b/北京北汽/SCP/Models/WmsEntity/TB_CONTAINER_INOUT.cs new file mode 100644 index 0000000..4c1dce0 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_CONTAINER_INOUT.cs @@ -0,0 +1,32 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_CONTAINER_INOUT + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string VendId { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CantainerType { get; set; } + + public int UpdateQty { get; set; } + + public DateTime UpdateTime { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string OperName { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_DELIVER_ASK.cs b/北京北汽/SCP/Models/WmsEntity/TB_DELIVER_ASK.cs new file mode 100644 index 0000000..7a741b1 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_DELIVER_ASK.cs @@ -0,0 +1,85 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; +// + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_DELIVER_ASK + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [Key] + [Column(Order = 2)] + [StringLength(50)] + [DisplayName("λ")] + public string CellCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ŀλ")] + public string ToLocCode { get; set; } + + [NotMapped] + [DisplayName("λ")] + public string LocDesc => WmsCache.GetLocName(ToLocCode); + + [StringLength(50)] + [DisplayName("ͻϺ")] + public string CustPartCode { get; set; } + + [Column(TypeName = "money")] + [DisplayName("ָ")] + + public decimal PlanQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal Qty { get; set; } + + + [DisplayName("״̬")] + public EnumStockState State { get; set; } + + + [DisplayName("ֹʱ")] + public DateTime EndTime { get; set; } + + + + [StringLength(200)] + [DisplayName("ע")] + public string Remark { get; set; } + + [NotMapped] + [DisplayName("ƻԱ")] + public string Planner { get; set; } + + [NotMapped] + + public string PartGroup { get; set; } + + [NotMapped] + [DisplayName("ʱ")] + public DateTime BillTime { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_DELIVER_PLAN.cs b/北京北汽/SCP/Models/WmsEntity/TB_DELIVER_PLAN.cs new file mode 100644 index 0000000..939b29a --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_DELIVER_PLAN.cs @@ -0,0 +1,165 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_DELIVER_PLAN + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ƻ")] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [DisplayName("ƻ")] + public DateTime DeliverDate { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc1(PartCode); + + [StringLength(50)] + [DisplayName("ͻ")] + public string CustId { get; set; } + + [NotMapped] + [DisplayName("ͻϺ")] + public string CustPartCode => WmsCache.GetCustPartCode(CustId, PartCode); + + [Column(TypeName = "money")] + [DisplayName("ƻ")] + public decimal PlanQty { get; set; } + +// [NotMapped] +// [Column(TypeName = "money")] +// [DisplayName("")] +// public decimal AskedQty { get; set; } + + + [Column(TypeName = "money")] + [DisplayName("ѷ")] + public decimal DeliverQty { get; set; } + + [NotMapped] + [DisplayName("")] + public decimal FinishPercent =>(PlanQty == 0 ? 0 : DeliverQty / PlanQty); + + public string ״̬ => ((EnumBillState)State).ToString(); + + + [DisplayName("ƻ")] + public int DeliverYear { get; set; } + + [DisplayName("ƻ")] + public int DeliverMonth { get; set; } + + [DisplayName("ƻ")] + public int DeliverWeek { get; set; } + + + [DisplayName("Ŀ")] + [NotMapped] + public string ProjectId => WmsCache.GetProjectId(PartCode); + + [DisplayName("۶")] + public string SoBillNum { get; set; } + + [DisplayName("۶")] + public int SoLineNum { get; set; } + + [DisplayName("ƻԱ")] + public string Planner { get; set; } + + public EnumBillState State { get; set; } + + [StringLength(200)] + [DisplayName("ע")] + public string Remark { get; set; } + + [NotMapped] + public DateTime BillTime { get; set; } + } + + public class TB_DELIVER_PLAN_WEEK + { + [DisplayName("")] + public int DeliverYear { get; set; } + + [DisplayName("")] + public int DeliverWeek { get; set; } + + [DisplayName("Ŀ")] + public string ProjectId { get; set; } + + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [DisplayName("ͻ")] + public string CustId { get; set; } + + [DisplayName("ͻϺ")] + public string CustPartCode => WmsCache.GetCustPartCode(CustId, PartCode); + + [DisplayName("ƻ")] + public decimal PlanQty { get; set; } + + [DisplayName("")] + public decimal DeliverQty { get; set; } + + [DisplayName("")] + public decimal FinishPercent => (PlanQty == 0 ? 0 : DeliverQty / PlanQty); + + } + + public class TB_DELIVER_PLAN_MONTH + { + [DisplayName("")] + public int DeliverYear { get; set; } + + [DisplayName("")] + public int DeliverMonth { get; set; } + + [DisplayName("Ŀ")] + public string ProjectId { get; set; } + + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [DisplayName("ͻ")] + public string CustId { get; set; } + + [DisplayName("ͻϺ")] + public string CustPartCode => WmsCache.GetCustPartCode(CustId, PartCode); + + [DisplayName("ƻ")] + public decimal PlanQty { get; set; } + + [DisplayName("")] + public decimal DeliverQty { get; set; } + + [DisplayName("")] + public decimal FinishPercent => (PlanQty == 0 ? 0 : DeliverQty/ PlanQty); + + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_DETAIL.cs b/北京北汽/SCP/Models/WmsEntity/TB_DETAIL.cs new file mode 100644 index 0000000..4d49388 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_DETAIL.cs @@ -0,0 +1,86 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_DETAIL + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string BillNum { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string PoBillNum { get; set; } + + public int PoLineNum { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string BarCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string PartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string Batch { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string FromLocCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string ToLocCode { get; set; } + + [Column(TypeName = "money")] + public decimal Qty { get; set; } + + public int FromStockState { get; set; } + + public int ToStockState { get; set; } + + [StringLength(50)] + public string EqptCode { get; set; } + + [StringLength(50)] + public string EqptType { get; set; } + + [Column(TypeName = "date")] + public DateTime? ShipDate { get; set; } + + [Column(TypeName = "date")] + public DateTime? ReceiveDate { get; set; } + + [Column(TypeName = "date")] + public DateTime? ProduceDate { get; set; } + + [StringLength(50)] + public string VendId { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + [StringLength(50)] + public string LocUnit { get; set; } + + public DateTime? BillTime { get; set; } + + public DateTime? EndTime { get; set; } + + public int? BillState { get; set; } + + [StringLength(200)] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_EQPT_LOAD.cs b/北京北汽/SCP/Models/WmsEntity/TB_EQPT_LOAD.cs new file mode 100644 index 0000000..8c42c7d --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_EQPT_LOAD.cs @@ -0,0 +1,48 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_EQPT_LOAD + { + [Key] + public int UID { get; set; } + + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [StringLength(50)] + [DisplayName("߱")] + public string EqptCode { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string BarCode { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string PartCode { get; set; } + + [StringLength(20)] + [DisplayName("")] + public string Batch { get; set; } + + [StringLength(50)] + [DisplayName("λ")] + public string LocCode { get; set; } + + [DisplayName("")] + public decimal Qty { get; set; } + + [DatabaseGenerated(DatabaseGeneratedOption.None)] + [DisplayName("״̬")] + public EnumStockState State { get; set; } + + [StringLength(200)] + [DisplayName("ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_INSPECT.cs b/北京北汽/SCP/Models/WmsEntity/TB_INSPECT.cs new file mode 100644 index 0000000..a9fd3ae --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_INSPECT.cs @@ -0,0 +1,123 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; +using CK.SCP.Models.Enums; +// + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_INSPECT + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("")] + public string BarCode { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + [DisplayName("λ")] + public string LocCode { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + [DisplayName("")] + public string PoBillNum { get; set; } + + [Key] + [Column(Order = 4)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + [DisplayName("")] + public int PoLine { get; set; } + + [DisplayName("")] + public InspectType InspectType { get; set; } + + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("ӦϺ")] + public string VendPartCode => WmsCache.GetVendPartCode(VendId, PartCode); + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string Batch { get; set; } + + [Column(TypeName = "money")] + [DisplayName("ջ")] + public decimal ReceiveQty { get; set; } + + + [Column(TypeName = "money")] + [DisplayName("Ʒ")] + public decimal SampleQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal InspQty { get; set; } + + + [Column(TypeName = "money")] + [DisplayName("ϸ")] + public decimal PassQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("ϸ")] + public decimal FailQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("ƻ")] + public decimal CrackQty { get; set; } + + + public int InspResult { get; set; } + + [NotMapped] + public string => ((InspectResult) InspResult).ToString(); + + [StringLength(50)] + [DisplayName("ϸԭ")] + public string FailReason { get; set; } + + [StringLength(50)] + [DisplayName("Ӧ̱")] + public string VendId { get; set; } + + [StringLength(200)] + [DisplayName("Ӧ")] + public string VendBatch { get; set; } + + [DisplayName("״̬")] + public EnumStockState State { get; set; } + [DisplayName("ע")] + public string Remark { get; set; } + + [NotMapped] + public string PartGroup => WmsCache.GetPartGroup(PartCode); + + public DateTime BillTime { get; set; } = DateTime.Now; + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_INSPECT_FAIL.cs b/北京北汽/SCP/Models/WmsEntity/TB_INSPECT_FAIL.cs new file mode 100644 index 0000000..50906e7 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_INSPECT_FAIL.cs @@ -0,0 +1,45 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_INSPECT_FAIL + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string BarCode { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string LocCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string PartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string Batch { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string FailType { get; set; } + + [Column(TypeName = "money")] + public decimal FailQty { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_MATERIAL_ASK.cs b/北京北汽/SCP/Models/WmsEntity/TB_MATERIAL_ASK.cs new file mode 100644 index 0000000..0464da7 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_MATERIAL_ASK.cs @@ -0,0 +1,75 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_MATERIAL_ASK + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed )] + public int UID { get; set; } + + [NotMapped] + public string ״̬ => ((EnumBillState) State).ToString(); + + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ϵ")] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [Key] + [Column(Order = 2)] + [StringLength(50)] + [DisplayName("λ")] + public string CellCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ŀλ")] + public string ToLocCode { get; set; } + + [NotMapped] + [DisplayName("λ")] + public string LocDesc => WmsCache.GetLocName(ToLocCode); + + [StringLength(50)] + [DisplayName("߱")] + public string LineId { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal Qty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal PlanQty { get; set; } + + [DisplayName("ֹʱ")] + public DateTime EndTime { get; set; } + + + public int State { get; set; } + + [StringLength(200)] + [DisplayName("ע")] + public string Remark { get; set; } + + [NotMapped] + public DateTime BillTime { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_MATERIAL_BACK.cs b/北京北汽/SCP/Models/WmsEntity/TB_MATERIAL_BACK.cs new file mode 100644 index 0000000..3a2e159 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_MATERIAL_BACK.cs @@ -0,0 +1,69 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_MATERIAL_BACK + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("")] + public string BarCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + [NotMapped] + + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string FromBatch { get; set; } + [Required(AllowEmptyStrings = true)] + + [StringLength(20)] + public string ToBatch { get; set; } + + [StringLength(50)] + public string FromLocCode { get; set; } + + [StringLength(50)] + public string ToLocCode { get; set; } + + [Column(TypeName = "money")] + public decimal Qty { get; set; } + + [StringLength(50)] + public string EqptCode { get; set; } + + [StringLength(200)] + public string Remark { get; set; } + + public EnumStockState State { get; set; } + + [Column(TypeName = "date")] + public DateTime ProduceDate { get; set; } + + [StringLength(50)] + public string VendId { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_MATERIAL_RECEIVE.cs b/北京北汽/SCP/Models/WmsEntity/TB_MATERIAL_RECEIVE.cs new file mode 100644 index 0000000..4be2b15 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_MATERIAL_RECEIVE.cs @@ -0,0 +1,117 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_MATERIAL_RECEIVE + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ջ")] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("")] + public string PoBillNum { get; set; } + + [Key] + [Column(Order = 2)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + [DisplayName("")] + public int PoLineNum { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + [DisplayName("")] + public string BarCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("ӦϺ")] + public string VendPartCode => WmsCache.GetVendPartCode(VendId, PartCode); + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + [DisplayName("")] + public string Batch { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Դλ")] + public string FromLocCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ŀλ")] + public string ToLocCode { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal Qty { get; set; } + + [StringLength(50)] + [DisplayName("ߺ")] + public string EqptCode { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string EqptType { get; set; } + + [StringLength(4000)] + [DisplayName("ע")] + public string Remark { get; set; } + + + public EnumStockState State { get; set; } + + [DisplayName("ʱ")] + public DateTime? ShipDate { get; set; } + + [DisplayName("ջʱ")] + public DateTime ReceiveDate { get; set; } + + [Column(TypeName = "date")] + [DisplayName("")] + public DateTime ProduceDate { get; set; } + + [StringLength(50)] + [DisplayName("Ӧ̱")] + public string VendId { get; set; } + + [StringLength(50)] + [DisplayName("Ӧ")] + public string VendBatch { get; set; } + + [StringLength(50)] + [DisplayName("ɹλ")] + public string PoUnit { get; set; } + + [StringLength(50)] + [DisplayName("洢λ")] + public string LocUnit { get; set; } + + [NotMapped] + [DisplayName("ʱ")] + public DateTime BillTime { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_MATERIAL_RETURN.cs b/北京北汽/SCP/Models/WmsEntity/TB_MATERIAL_RETURN.cs new file mode 100644 index 0000000..4610a91 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_MATERIAL_RETURN.cs @@ -0,0 +1,99 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_MATERIAL_RETURN + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("")] + public string BarCode { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + [DisplayName("")] + public string PoBillNum { get; set; } + + [Key] + [Column(Order = 3)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + [DisplayName("")] + public int PoLineNum { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + [DisplayName("")] + public string Batch { get; set; } + + [StringLength(50)] + [DisplayName("Դλ")] + public string FromLocCode { get; set; } + + [StringLength(50)] + [DisplayName("Ŀλ")] + public string ToLocCode { get; set; } = ""; + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal Qty { get; set; } + + [StringLength(50)] + [DisplayName("߱")] + public string EqptCode { get; set; } + + [StringLength(200)] + [DisplayName("ע")] + public string Remark { get; set; } + + [DisplayName("״̬")] + public EnumStockState State { get; set; } + + [Column(TypeName = "date")] + [DisplayName("")] + public DateTime ProduceDate { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string EqptType { get; set; } + + [StringLength(50)] + [DisplayName("Ӧ")] + public string VendBatch { get; set; } + + [StringLength(50)] + [DisplayName("λ")] + public string LocUnit { get; set; } + + [StringLength(50)] + [DisplayName("ɹλ")] + public string PoUnit { get; set; } + + [NotMapped] + [DisplayName("ʱ")] + public DateTime BillTime { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_OFFICE_OUT.cs b/北京北汽/SCP/Models/WmsEntity/TB_OFFICE_OUT.cs new file mode 100644 index 0000000..00e92fe --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_OFFICE_OUT.cs @@ -0,0 +1,41 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_OFFICE_OUT + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string BillNum { get; set; } + + [StringLength(50)] + public string PartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CustPartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string Batch { get; set; } + + [StringLength(50)] + public string FromLocCode { get; set; } + + [StringLength(50)] + public string ToLocCode { get; set; } + + [Column(TypeName = "money")] + public decimal OutQty { get; set; } + + [StringLength(200)] + public string Remark { get; set; } + + public int State { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_OFFICE_RECIVE.cs b/北京北汽/SCP/Models/WmsEntity/TB_OFFICE_RECIVE.cs new file mode 100644 index 0000000..f0658c6 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_OFFICE_RECIVE.cs @@ -0,0 +1,43 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_OFFICE_RECIVE + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string BillNum { get; set; } + + [StringLength(50)] + public string PartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CustPartCode { get; set; } + + [StringLength(50)] + public string Batch { get; set; } + + [StringLength(50)] + public string FromLocCode { get; set; } + + [StringLength(50)] + public string ToLocCode { get; set; } + + [Column(TypeName = "money")] + public decimal DeliverQty { get; set; } + + [Column(TypeName = "money")] + public decimal ReciveQty { get; set; } + + [StringLength(200)] + public string Remark { get; set; } + + public int State { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_OM_PLAN.cs b/北京北汽/SCP/Models/WmsEntity/TB_OM_PLAN.cs new file mode 100644 index 0000000..b183801 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_OM_PLAN.cs @@ -0,0 +1,52 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_OM_PLAN + { + [Key] + [Column(Order = 0)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string BillNum { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string PartCode { get; set; } + + [Key] + [Column(Order = 3, TypeName = "money")] + public decimal PlanQty { get; set; } + + [Key] + [Column(Order = 4, TypeName = "money")] + public decimal OpenQty { get; set; } + + [Key] + [Column(Order = 5, TypeName = "money")] + public decimal ClosedQty { get; set; } + + [StringLength(50)] + public string BeginTime { get; set; } + + [StringLength(50)] + public string EndTime { get; set; } + + [Key] + [Column(Order = 6)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int State { get; set; } + + [StringLength(50)] + public string Remark { get; set; } + + [StringLength(50)] + public string VendId { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_OTHER_INOUT.cs b/北京北汽/SCP/Models/WmsEntity/TB_OTHER_INOUT.cs new file mode 100644 index 0000000..b79ed70 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_OTHER_INOUT.cs @@ -0,0 +1,83 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_OTHER_INOUT + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("")] + public string BarCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + [DisplayName("")] + public string Batch { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + [DisplayName("Դλ")] + public string FromLocCode { get; set; } = ""; + + [Key] + [Column(Order = 3)] + [StringLength(50)] + [DisplayName("Ŀλ")] + public string ToLocCode { get; set; } = ""; + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal Qty { get; set; } + + [StringLength(50)] + [DisplayName("߱")] + public string EqptCode { get; set; } + + [DisplayName("״̬")] + public EnumStockState State { get; set; } + + [Column(TypeName = "date")] + [DisplayName("")] + public DateTime ProduceDate { get; set; } + + [StringLength(50)] + [DisplayName("λ")] + public string Unit { get; set; } + + [StringLength(200)] + [DisplayName("ע")] + public string Remark { get; set; } + + [DisplayName("ʱ")] + [NotMapped] + + public DateTime BillTime { get; set; } = DateTime.Now; + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_OTHER_INOUT_SHEET.cs b/北京北汽/SCP/Models/WmsEntity/TB_OTHER_INOUT_SHEET.cs new file mode 100644 index 0000000..c7f80cc --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_OTHER_INOUT_SHEET.cs @@ -0,0 +1,94 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_OTHER_INOUT_SHEET + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [DisplayName("单据时间")] + [NotMapped] + public DateTime? BillTime => BillHelper.GetBillTime(BillNum); + + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("单据号")] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("箱码")] + public string BarCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("物料号")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("物料描述")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("批次")] + public string Batch { get; set; } + + [Column(TypeName = "money")] + [DisplayName("数量")] + public decimal Qty { get; set; } + + [StringLength(50)] + [DisplayName("来源库位")] + public string FromLocCode { get; set; } + + [StringLength(50)] + [DisplayName("目标库位")] + public string ToLocCode { get; set; } + + + + //[StringLength(50)] + //[DisplayName("器具编号")] + //public string EqptCode { get; set; } + + [DisplayName("物料状态")] + + public int State { get; set; } + + //[Column(TypeName = "date")] + //[DisplayName("生产日期")] + //[ListBindable(false)] + //public DateTime ProduceDate { get; set; } + + //[StringLength(50)] + //[DisplayName("单位")] + //[ListBindable(false)] + //public string Unit { get; set; } + + //[StringLength(200)] + //[DisplayName("备注")] + //[ListBindable(false)] + //public string Remark { get; set; } + + //InOutState + [DisplayName("出入库")] + + public int InOutState { get; set; } + + [DisplayName("扫描数量")] + public decimal ScanQty { get; set; } + + [StringLength(200)] + [DisplayName("备注")] + public string Memo { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_PACK_UNPACK.cs b/北京北汽/SCP/Models/WmsEntity/TB_PACK_UNPACK.cs new file mode 100644 index 0000000..028e951 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_PACK_UNPACK.cs @@ -0,0 +1,82 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_PACK_UNPACK + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + [DisplayName("")] + public string Batch { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal Qty { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Դ")] + public string FromBarCode { get; set; } + + [StringLength(50)] + [DisplayName("Ŀ")] + public string ToBarCode { get; set; } + + [StringLength(50)] + [DisplayName("Դλ")] + public string FromLocCode { get; set; } + + [StringLength(50)] + [DisplayName("Ŀλ")] + public string ToLocCode { get; set; } + + [StringLength(50)] + [DisplayName("Դ")] + public string FromEqptCode { get; set; } + + [StringLength(50)] + [DisplayName("Ŀ")] + public string ToEqptCode { get; set; } + + [StringLength(200)] + [DisplayName("ע")] + public string Remark { get; set; } + + [DisplayName("״̬")] + public EnumStockState State { get; set; } + + [Column(TypeName = "date")] + [DisplayName("")] + public DateTime ProduceDate { get; set; } + + [StringLength(50)] + [DisplayName("Ӧ̱")] + public string VendId { get; set; } + + [StringLength(50)] + [DisplayName("Ӧ")] + public string VendBatch { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_PICK_FACT.cs b/北京北汽/SCP/Models/WmsEntity/TB_PICK_FACT.cs new file mode 100644 index 0000000..19a450c --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_PICK_FACT.cs @@ -0,0 +1,116 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_PICK_FACT + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("")] + public string BarCode { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + [DisplayName("Ŀλ")] + public string CellCode { get; set; } = ""; + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ŀλ")] + public string ToLocCode { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string LineId { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string Batch { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal Qty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal PlanQty { get; set; } + + [Key] + [Column(Order = 3)] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Դλ")] + public string FromLocCode { get; set; } + + [DisplayName("ʱ")] + public DateTime PickTime { get; set; } = DateTime.Now; + + [DisplayName("Ҫʱ")] + public DateTime EndTime { get; set; } = DateTime.Now.AddHours(1); + + [StringLength(50)] + [DisplayName("Ӧ")] + public string VendPartCode { get; set; } + + [StringLength(50)] + [DisplayName("ͻ")] + public string CustPartCode { get; set; } + + [StringLength(50)] + [DisplayName("߱")] + public string EqptCode { get; set; } + + [StringLength(50)] + [DisplayName("Ӧ̱")] + public string VendId { get; set; } + + [StringLength(50)] + [DisplayName("Ӧ")] + public string VendBatch { get; set; } + + [Column(TypeName = "date")] + [DisplayName("")] + public DateTime? ProduceDate { get; set; } = DateTime.Now.Date; + + [DisplayName("״̬")] + public EnumStockState State { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartGroup => WmsCache.GetPartGroup(PartCode); + + [StringLength(200)] + [DisplayName("ע")] + public string Remark { get; set; } + + [NotMapped] + public DateTime BillTime { get; set; } + } + + +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_PICK_INVOICE.cs b/北京北汽/SCP/Models/WmsEntity/TB_PICK_INVOICE.cs new file mode 100644 index 0000000..cb17f5b --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_PICK_INVOICE.cs @@ -0,0 +1,50 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace CK.SCP.Models.WmsEntity +{ + using System; + using System.Collections.Generic; + + public partial class TB_PICK_INVOICE + { + public int UID { get; set; } + public string BillNum { get; set; } + public string ProjectId { get; set; } + public string TransportType { get; set; } + public string TruckNum { get; set; } + public string Remark { get; set; } + public string BarCode { get; set; } + public string PartCode { get; set; } + public string PartDesc { get; set; } + public string Batch { get; set; } + public string Creator { get; set; } + public Nullable<System.DateTime> CreateTime { get; set; } + public string ModifiedBy { get; set; } + public Nullable<System.DateTime> ModifiedTime { get; set; } + public Nullable<bool> IsDeleted { get; set; } + public Nullable<decimal> Qty { get; set; } + public string SourceBillNum { get; set; } + public string SourceBillNum2 { get; set; } + public string SourceBillNum3 { get; set; } + public Nullable<System.DateTime> PickTime { get; set; } + public string VendPartCode { get; set; } + public string CustPartCode { get; set; } + public string EqptCode { get; set; } + public string VendId { get; set; } + public string VendBatch { get; set; } + public Nullable<System.DateTime> ProduceDate { get; set; } + public int State { get; set; } + public Nullable<System.DateTime> BillTime { get; set; } + public Nullable<System.DateTime> EndTime { get; set; } + public string PartUnit { get; set; } + public Nullable<decimal> PartPrice { get; set; } + public string ToBarCode { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_PICK_PLAN.cs b/北京北汽/SCP/Models/WmsEntity/TB_PICK_PLAN.cs new file mode 100644 index 0000000..84401ff --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_PICK_PLAN.cs @@ -0,0 +1,104 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_PICK_PLAN + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("Ŀλ")] + public string CellCode { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + + [Key] + [Column(Order = 3)] + [StringLength(50)] + [DisplayName("")] + public string Batch { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + [DisplayName("Դλ")] + public string FromLocCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ŀλ")] + public string ToLocCode { get; set; } + + [NotMapped] + [DisplayName("Դλ")] + + public string FromLocName => WmsCache.GetLocName(FromLocCode); + + [NotMapped] + [DisplayName("Ŀλ")] + + public string ToLocName => WmsCache.GetLocName(ToLocCode); + + [NotMapped] + [DisplayName("ӦϺ")] + public string VendPartCode => WmsCache.GetVendPartCode("", PartCode); + + [NotMapped] + [DisplayName("ͻϺ")] + public string CustPartCode => WmsCache.GetCustPartCode("", PartCode); + + + [StringLength(50)] + [DisplayName("")] + public string LineId { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal Qty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal PickedQty { get; set; } + + + [DisplayName("ֹʱ")] + public DateTime EndTime { get; set; } + + [DisplayName("״̬")] + public EnumStockState State { get; set; } + + [StringLength(200)] + [DisplayName("ע")] + public string Remark { get; set; } + + //[NotMapped] [DisplayName("Ա")] + //public string StoreKeeper => WmsCache.GetPartStoreKeeper(PartCode); + + [NotMapped] + public DateTime BillTime { get; set; } + } + +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_PRODUCE_PLAN.cs b/北京北汽/SCP/Models/WmsEntity/TB_PRODUCE_PLAN.cs new file mode 100644 index 0000000..fbd0f51 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_PRODUCE_PLAN.cs @@ -0,0 +1,74 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_PRODUCE_PLAN + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [Key] + [Column(Order = 2)] + [StringLength(50)] + [DisplayName("")] + public string LineId { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string Batch { get; set; } + + [Column(TypeName = "money")] + [DisplayName("ƻ")] + public decimal PlanQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal OpenQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal ClosedQty { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string TeamName { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string ShiftName { get; set; } + + [StringLength(50)] + [DisplayName("ʼʱ")] + public string BeginTime { get; set; } + + [StringLength(50)] + [DisplayName("ʱ")] + public string EndTime { get; set; } + + [DisplayName("״̬")] + public EnumFormState State { get; set; } + + [StringLength(50)] + [DisplayName("ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_PRODUCT_RECEIVE.cs b/北京北汽/SCP/Models/WmsEntity/TB_PRODUCT_RECEIVE.cs new file mode 100644 index 0000000..3e98258 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_PRODUCT_RECEIVE.cs @@ -0,0 +1,118 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_PRODUCT_RECEIVE + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [StringLength(50)] + [DisplayName("ƻ")] + + public string PpBillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("")] + public string BarCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [NotMapped] + [DisplayName("ͻϺ")] + public string CustPartCode => WmsCache.GetCustPartCode("", PartCode); + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + [DisplayName("")] + public string Batch { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Դλ")] + public string FromLocCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ŀλ")] + public string ToLocCode { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal Qty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("ϸ")] + public decimal GoodQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal ScrapQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("ϸ")] + public decimal InvalidQty { get; set; } + + [StringLength(50)] + [DisplayName("߱")] + public string EqptCode { get; set; } = ""; + + [StringLength(4000)] + [DisplayName("ע")] + public string Remark { get; set; } + + [DisplayName("״̬")] + public EnumStockState State { get; set; } + + [DisplayName("ջʱ")] + public DateTime ReceiveDate { get; set; } + + [Column(TypeName = "date")] + [DisplayName("")] + public DateTime ProduceDate { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string LineId { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string ShiftName { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string TeamName { get; set; } + + [StringLength(50)] + [DisplayName("λ")] + public string Unit { get; set; } + + [StringLength(4000)] + [DisplayName("׷ݱ")] + public string TraceBackCode { get; set; } + + [NotMapped] + public DateTime BillTime { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_PRODUCT_REPAIR.cs b/北京北汽/SCP/Models/WmsEntity/TB_PRODUCT_REPAIR.cs new file mode 100644 index 0000000..31249dd --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_PRODUCT_REPAIR.cs @@ -0,0 +1,73 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_PRODUCT_REPAIR + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("")] + public string BarCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + [DisplayName("")] + public string Batch { get; set; } + + [StringLength(50)] + [DisplayName("Դλ")] + public string FromLocCode { get; set; } + + [StringLength(50)] + [DisplayName("Ŀλ")] + public string ToLocCode { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal Qty { get; set; } + + [StringLength(50)] + [DisplayName("߱")] + public string EqptCode { get; set; } + + [DisplayName("߱")] + public string LineId { get; set; } + + [StringLength(200)] + [DisplayName("ע")] + public string Remark { get; set; } + + [DisplayName("״̬")] + public EnumStockState State { get; set; } + + [Column(TypeName = "date")] + [DisplayName("")] + public DateTime ProduceDate { get; set; } + + [NotMapped] + public DateTime BillTime { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_PRODUCT_RETURN.cs b/北京北汽/SCP/Models/WmsEntity/TB_PRODUCT_RETURN.cs new file mode 100644 index 0000000..9a95896 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_PRODUCT_RETURN.cs @@ -0,0 +1,65 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_PRODUCT_RETURN + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("")] + public string BarCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + [DisplayName("")] + public string Batch { get; set; } + + [StringLength(50)] + [DisplayName("Դλ")] + public string FromLocCode { get; set; } + + [StringLength(50)] + [DisplayName("Ŀλ")] + public string ToLocCode { get; set; } + + [Column(TypeName = "money")] + public decimal Qty { get; set; } + + [StringLength(50)] + [DisplayName("߱")] + public string EqptCode { get; set; } + + [StringLength(200)] + [DisplayName("ע")] + public string Remark { get; set; } + + [DisplayName("״̬")] + public int State { get; set; } + + [Column(TypeName = "date")] + [DisplayName("")] + public DateTime ProduceDate { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_PRODUCT_SELL.cs b/北京北汽/SCP/Models/WmsEntity/TB_PRODUCT_SELL.cs new file mode 100644 index 0000000..f083865 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_PRODUCT_SELL.cs @@ -0,0 +1,66 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_PRODUCT_SELL + { + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("۶")] + public string SoBillNum { get; set; } + + [DisplayName("")] + public int SoLineNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("")] + public string BarCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string Batch { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Դλ")] + public string FromLocCode { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal Qty { get; set; } + + [StringLength(50)] + [DisplayName("߱")] + public string EqptCode { get; set; } + + [DisplayName("״̬")] + public int State { get; set; } + + [StringLength(200)] + [DisplayName("ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TB_STOCK_MOVE.cs b/北京北汽/SCP/Models/WmsEntity/TB_STOCK_MOVE.cs new file mode 100644 index 0000000..d85b390 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TB_STOCK_MOVE.cs @@ -0,0 +1,121 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TB_STOCK_MOVE + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("")] + public string BarCode { get; set; } + + [StringLength(50)] + [DisplayName("Ŀ")] + public string ToBarCode { get; set; } + + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + [DisplayName("Դ")] + public string FromBatch { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + [DisplayName("Ŀ")] + public string ToBatch { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Դλ")] + public string FromLocCode { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + [DisplayName("Ŀλ")] + public string ToLocCode { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal Qty { get; set; } + +// [StringLength(50)] +// public string EqptCode { get; set; } + + + [StringLength(50)] + [DisplayName("Դ")] + public string FromEqptCode { get; set; } + + [StringLength(50)] + [DisplayName("Ŀ")] + public string ToEqptCode { get; set; } + + + [DisplayName("Դ״̬")] + public EnumStockState FromState { get; set; } + + [DisplayName("Ŀ״̬")] + public EnumStockState ToState { get; set; } + + [StringLength(50)] + [DisplayName("Ӧ̱")] + public string VendId { get; set; } + + [StringLength(50)] + [DisplayName("Ӧ")] + public string VendBatch { get; set; } + + [StringLength(200)] + [DisplayName("ע")] + public string Remark { get; set; } + + [NotMapped] + public string PartGroup => WmsCache.GetPartGroup(PartCode); + + [DisplayName("ʱ")] + + public DateTime BillTime { get; set; } = DateTime.Now; + +// [NotMapped] +// [DisplayName("ERP")] +// public string ErpPartCode => WmsCache.GetErpPartCode(PartCode); +// [NotMapped] +// [DisplayName("")] +// public string ProjectId => WmsCache.GetProjectId(PartCode); +// [NotMapped] +// [DisplayName("λ")] +// public string Unit => WmsCache.GetUnit(PartCode); +// [NotMapped] +// [DisplayName("")] +// public string EnumPartType => WmsCache.GetPartType(PartCode); +// [NotMapped] +// [DisplayName("")] +// public string EnumPartKind => WmsCache.GetPartKind(PartCode); + + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TF_ASN.cs b/北京北汽/SCP/Models/WmsEntity/TF_ASN.cs new file mode 100644 index 0000000..a9c14d3 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TF_ASN.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TF_ASN + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [NotMapped] + public string ״̬ => ((EnumFormState)State).ToString(); + + [Key] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + + public EnumBillType BillType { get; set; } + + [DisplayName("ʱ")] + public DateTime BillTime { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string PoBillNum { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ӧ̱")] + public string VendId { get; set; } + + [NotMapped] + public string Ӧ => WmsCache.GetVenderName(VendId); + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ա")] + public string OperName { get; set; } + + [DisplayName("ʱ")] + public DateTime ShipTime { get; set; } + + + public int State { get; set; } + + + [StringLength(50)] + [DisplayName("ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TF_ASN_DETAIL.cs b/北京北汽/SCP/Models/WmsEntity/TF_ASN_DETAIL.cs new file mode 100644 index 0000000..966832b --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TF_ASN_DETAIL.cs @@ -0,0 +1,86 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TF_ASN_DETAIL + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [NotMapped] + public string ״̬ => ((EnumFormState)State).ToString(); + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("")] + public string PoBillNum { get; set; } + + [Key] + [Column(Order = 2)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + [DisplayName("")] + public int PoLineNum { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + public string => WmsCache.GetPartDesc(PartCode); + + [Key] + [Column(Order = 4)] + [StringLength(50)] + [DisplayName("")] + public string Batch { get; set; } + + [StringLength(50)] + [DisplayName("Ӧ")] + public string VendBatch { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal BillQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("ѽ")] + public decimal ClosedQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("δ")] + [NotMapped] + public decimal OpenQty => BillQty - ClosedQty; + [StringLength(50)] + [DisplayName("ɹλ")] + public string PoUnit { get; set; } + + [StringLength(50)] + [DisplayName("洢λ")] + public string LocUnit { get; set; } + + [Column(TypeName = "money")] + [DisplayName("ɹ۸")] + public decimal Price { get; set; } + + [StringLength(50)] + [DisplayName("ߺ")] + public string EqptCode { get; set; } + + + public int State { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TF_PO.cs b/北京北汽/SCP/Models/WmsEntity/TF_PO.cs new file mode 100644 index 0000000..a44f2c4 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TF_PO.cs @@ -0,0 +1,74 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TF_PO + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [NotMapped] + public string ״̬ => ((EnumFormState)State).ToString(); + + [Key] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + + public EnumBillType BillType { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ӧ̱")] + public string VendId { get; set; } + + [NotMapped] + [DisplayName("Ӧ")] + public string VendName => WmsCache.GetVenderName(VendId); + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ա")] + public string OperName { get; set; } + + [DisplayName("ʱ")] + public DateTime BillTime { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string ModType { get; set; } + + [StringLength(50)] + [DisplayName("ϵ")] + public string Contacter { get; set; } + + [StringLength(50)] + [DisplayName("ջص")] + public string ShipToSite { get; set; } + + [StringLength(50)] + + public string Promo { get; set; } + + [StringLength(50)] + [DisplayName("ɹԱ")] + public string Buyer { get; set; } + + [StringLength(50)] + [DisplayName("ɹԱ绰")] + public string BuyerPhone { get; set; } + + + public int State { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TF_PO_DETAIL.cs b/北京北汽/SCP/Models/WmsEntity/TF_PO_DETAIL.cs new file mode 100644 index 0000000..802fb46 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TF_PO_DETAIL.cs @@ -0,0 +1,132 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using ChangKeTec.Wms.Models.Enums; +using CK.SCP.Models; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TF_PO_DETAIL + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [NotMapped] + public string ϸ״̬ => ((EnumFormState)State).ToString(); + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("")] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + [DisplayName("к")] + public int LineNum { get; set; } + + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("һ")] + public string PartDesc1 => WmsCache.GetPartDesc1(PartCode); + + [NotMapped] + [DisplayName("")] + public string PartDesc2 => WmsCache.GetPartDesc2(PartCode); + + [NotMapped] + [DisplayName("Ӧ")] + public string VendPartCode => WmsCache.GetVendPartCode(VendId, PartCode); + + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal BillQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("ѽ")] + public decimal ClosedQty { get; set; } + + [NotMapped] + [DisplayName("δ")] + public decimal OpenQty => BillQty - ClosedQty; + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal PackQty { get; set; } + + [StringLength(50)] + [DisplayName("ɹλ")] + public string PoUnit { get; set; } + + [StringLength(50)] + [DisplayName("洢λ")] + public string LocUnit { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal Price { get; set; } + + [NotMapped] + [DisplayName("")] + public DateTime? BillTIme => GetBillTime(BillNum); + + [Column(TypeName = "date")] + [DisplayName("ֹ")] + public DateTime? DueDate { get; set; } + + + public int State { get; set; } + + + [StringLength(200)] + [DisplayName("ע")] + public string Remark { get; set; } + + public decimal UmConv { get; set; } = 1; + + [NotMapped] + [DisplayName("Ӧ̱")] + public string VendId => GetVendId(BillNum); + + [NotMapped] + [DisplayName("Ӧ")] + public string VendName => WmsCache.GetVenderName(VendId); + + [NotMapped] + [DisplayName("Ӧ̼")] + public string VendAbbr => WmsCache.GetVendAbbr(VendId); + + //[NotMapped] + //[DisplayName("QLevel")] + //public string QLevel => WmsCache.GetPartQlevel(PartCode); + + + List<TF_PO> _poList = new List<TF_PO>(); + private string GetVendId(string billNum) + { + var db = EntitiesFactory.CreateWmsInstance(); + if (_poList.Count == 0) + _poList = db.TF_PO.ToList(); + var po = _poList.FirstOrDefault(p => p.BillNum == billNum); + return po?.VendId ?? ""; + } + private DateTime? GetBillTime(string billNum) + { + var db = EntitiesFactory.CreateWmsInstance(); + if (_poList.Count == 0) + _poList = db.TF_PO.ToList(); + var po = _poList.FirstOrDefault(p => p.BillNum == billNum); + return po?.BillTime; + } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TF_SO.cs b/北京北汽/SCP/Models/WmsEntity/TF_SO.cs new file mode 100644 index 0000000..6e2847b --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TF_SO.cs @@ -0,0 +1,56 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TF_SO + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [NotMapped] + public string ״̬ => ((EnumFormState)State).ToString(); + + [Key] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + + public EnumBillType BillType { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(200)] + [DisplayName("ͻ")] + public string CustId { get; set; } + + [NotMapped] + public string ͻ => WmsCache.GetCustName(CustId); + + [StringLength(50)] + [DisplayName("Ա")] + public string OperName { get; set; } + + [DisplayName("ʱ")] + public DateTime BillTime { get; set; } + + [Column(TypeName = "date")] + [DisplayName("ʼʱ")] + public DateTime? BeginDate { get; set; } + + [Column(TypeName = "date")] + [DisplayName("ֹʱ")] + public DateTime? EndDate { get; set; } + + + public int State { get; set; } + + [StringLength(50)] + [DisplayName("ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TF_SO_DETAIL.cs b/北京北汽/SCP/Models/WmsEntity/TF_SO_DETAIL.cs new file mode 100644 index 0000000..e066693 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TF_SO_DETAIL.cs @@ -0,0 +1,58 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TF_SO_DETAIL + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + [NotMapped] + public string ״̬ => ((EnumFormState)State).ToString(); + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + [DisplayName("к")] + public int LineNum { get; set; } + + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal BillQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("ѽ")] + public decimal ClosedQty { get; set; } + + [StringLength(50)] + [DisplayName("λ")] + public string Unit { get; set; } + + [Column(TypeName = "money")] + [DisplayName("۸")] + public decimal Price { get; set; } + + + public int State { get; set; } + + [StringLength(200)] + [DisplayName("ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TL_BASEDATA.cs b/北京北汽/SCP/Models/WmsEntity/TL_BASEDATA.cs new file mode 100644 index 0000000..9c3bcf9 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TL_BASEDATA.cs @@ -0,0 +1,46 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TL_BASEDATA + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(80)] + [DisplayName("Ա")] + public string OperName { get; set; } + + [DisplayName("־ʱ")] + public DateTime LogTime { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("־")] + public string LogType { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string DataType { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(4000)] + [DisplayName("ԭֵ")] + public string OldValue { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(4000)] + [DisplayName("ֵ")] + public string NewValue { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TL_BILL.cs b/北京北汽/SCP/Models/WmsEntity/TL_BILL.cs new file mode 100644 index 0000000..4c5c9b9 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TL_BILL.cs @@ -0,0 +1,32 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TL_BILL + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(80)] + public string OperName { get; set; } + + public DateTime LogTime { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string LogType { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string BillNum { get; set; } + + public EnumBillType BillType { get; set; } + + public string Message { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TL_EXCEPTION.cs b/北京北汽/SCP/Models/WmsEntity/TL_EXCEPTION.cs new file mode 100644 index 0000000..817579b --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TL_EXCEPTION.cs @@ -0,0 +1,23 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TL_EXCEPTION + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + public DateTime LogTime { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string LogType { get; set; } + + public string Message { get; set; } + + public string CompleteString { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TL_INTERFACE.cs b/北京北汽/SCP/Models/WmsEntity/TL_INTERFACE.cs new file mode 100644 index 0000000..782db14 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TL_INTERFACE.cs @@ -0,0 +1,73 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TL_INTERFACE + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + + [DisplayName("־ʱ")] + public DateTime LogTime { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string ServerName { get; set; }//APS,MES,EDI,JIS + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("ͻ")] + public string ClientName { get; set; }//APS,MES,EDI,JIS + + [DisplayName("")] + public EnumRequestType RequestType { get; set; }//GET,PUT + + [DisplayName("ݸʽ")] + public EnumDataFormat DataFormat { get; set; }//DATASET,JSON + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string MethodName { get; set; } + + [DisplayName("")] + public string ParamValue { get; set; } + + [DisplayName("ֵ")] + public string ReturnValue { get; set; } + + [DisplayName("״̬")] + public EnumLogState State { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + } + + public enum EnumRequestType + { + PUT =0, + GET =1, + } + + public enum EnumDataFormat + { + CSV = 0, + JSON = 1, + XML = 2, + DATASET = 3, + DB =4, + } + + public enum EnumLogState + { + FAILED = 0, + SUCESS = 1, + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TL_OPER.cs b/北京北汽/SCP/Models/WmsEntity/TL_OPER.cs new file mode 100644 index 0000000..e5a263a --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TL_OPER.cs @@ -0,0 +1,33 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TL_OPER + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(80)] + public string OperCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string OperName { get; set; } + + public DateTime LogTime { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string LogType { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(200)] + public string LogSite { get; set; } + + public string Message { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TL_TRANSACTION.cs b/北京北汽/SCP/Models/WmsEntity/TL_TRANSACTION.cs new file mode 100644 index 0000000..ed9ef34 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TL_TRANSACTION.cs @@ -0,0 +1,119 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Runtime.CompilerServices; +using ChangKeTec.Wms.Models.Enums; +using CK.SCP.Utils; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TL_TRANSACTION + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + [DisplayName("Ա")] + [Required(AllowEmptyStrings = true)] + [StringLength(80)] + public string OperName { get; set; } + + [DisplayName("־ʱ")] public DateTime LogTime { get; set; } + + [DisplayName("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string BarCode { get; set; } + + + [DisplayName("ݱ")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string BillNum { get; set; } + + + [DisplayName("")] + public EnumBillType BillType { get; set; } + + [NotMapped] + [DisplayName("")] + public string StrBillType => EnumHelper.GetDesc(BillType); + + + [DisplayName("")] + public int SubBillType { get; set; } = 0; + + [NotMapped] + [DisplayName("")] + public string StrSubBillType => GetStringSubBillType(SubBillType); + + + + [DisplayName("")] public int TransType { get; set; } + + [DisplayName("Ϻ")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string PartCode { get; set; } + + [NotMapped] [DisplayName("")] public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [DisplayName("")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string Batch { get; set; } + + [DisplayName("")] + [Column(TypeName = "money")] + public decimal Qty { get; set; } + + [DisplayName("״̬")] public EnumStockState State { get; set; } + + + [DisplayName("λ")] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string LocCode { get; set; } + + [DisplayName("")] [NotMapped] public string AreaCode => WmsCache.GetAreaCode(LocCode); + + [NotMapped] public string ErpLocCode => WmsCache.GetErpLocCode(LocCode); + + [DisplayName("ߺ")] + [StringLength(50)] + public string EqptCode { get; set; } + + [DisplayName("Ӧ̱")] + [StringLength(50)] + public string VendId { get; set; } + + + [DisplayName("Ӧ")] + [StringLength(50)] + public string VendBatch { get; set; } + + [DisplayName("ע")] + [StringLength(500)] + public string Remark { get; set; } + + private string GetStringSubBillType(int subBillType) + { + string strSubBillType = string.Empty; + try + + { + var enumSubBillType = (EnumSubBillType) subBillType; + strSubBillType = EnumHelper.GetDesc(enumSubBillType); + } + catch (Exception) + { + // ignored + } + + return strSubBillType; + } + } + + +} diff --git a/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_AQLSTANDARD.cs b/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_AQLSTANDARD.cs new file mode 100644 index 0000000..4f7acd9 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_AQLSTANDARD.cs @@ -0,0 +1,29 @@ +#region 引用命名 +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +#endregion + +namespace ChangKeTec.Wms.Models.Wms +{ + public class TM_CQBMPT_AQLSTANDARD + { + [Key] + [Column(Order = 0)] + public decimal AQL { get; set; } + + [Key] + [Column(Order = 1)] + public int minCnt { get; set; } + + [Key] + [Column(Order = 2)] + public int maxCnt { get; set; } + + public int sampleCnt { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_INJECTION_MACHINE.cs b/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_INJECTION_MACHINE.cs new file mode 100644 index 0000000..9cef814 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_INJECTION_MACHINE.cs @@ -0,0 +1,76 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TM_CQBMPT_INJECTION_MACHINE + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("̨")] + public string MachineId { get; set; } + + [StringLength(50)] + [DisplayName("ƷϺ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("Ʒ")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [StringLength(50)] + [DisplayName("ģ߱߰")] + public string MouldId { get; set; } + + [StringLength(50)] + [DisplayName("Ϣ")] + public string ShiftInfo { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string TeamName { get; set; } + + [StringLength(50)] + [DisplayName("Ա")] + public string OperName { get; set; } + + [StringLength(50)] + [DisplayName("ԭϺ")] + public string RawPartCode { get;set; } + + [NotMapped] + [DisplayName("ԭ")] + public string RawPartDesc => WmsCache.GetPartDesc(RawPartCode); + + [StringLength(50)] + [DisplayName("Ͳ")] + public string RecommandTankId { get; set; } + + [StringLength(50)] + [DisplayName("Ͳ")] + public string TankId { get; set; } + + [NotMapped] + public string ״̬ => ((ConnState)State).ToString(); + + + public int State { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + + public string GetState(int state) + { + return state == 0 ? "δ" : ""; + } + } + + +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_INJECTION_REPORT.cs b/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_INJECTION_REPORT.cs new file mode 100644 index 0000000..7a1ba57 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_INJECTION_REPORT.cs @@ -0,0 +1,60 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TM_CQBMPT_INJECTION_REPORT + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("机台编号")] + public string MachineId { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("班次信息")] + public string ShiftInfo { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + [DisplayName("产品物料号")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("产品物料描述")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [StringLength(50)] + [DisplayName("班组")] + public string TeamName { get; set; } + + [DisplayName("计划数量")] + public decimal PlanQty { get; set; } + + [DisplayName("完工数量")] + public decimal FinishQty => GoodQty + ToMarketQty + ScrapQty; + + [DisplayName("合格数量")] + public decimal GoodQty { get; set; } + + [DisplayName("市场件数量")] + public decimal ToMarketQty { get; set; } + + [DisplayName("报废数量")] + public decimal ScrapQty { get; set; } + + [DisplayName("报告日期")] + public DateTime ReportTime { get; set; } = DateTime.Now; + + [NotMapped] + public string 合格率 => $"{(FinishQty == 0 ? 0 : (GoodQty + ToMarketQty)/FinishQty):P}"; + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_INJECTION_TANK.cs b/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_INJECTION_TANK.cs new file mode 100644 index 0000000..9f29476 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_INJECTION_TANK.cs @@ -0,0 +1,69 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TM_CQBMPT_INJECTION_RAW_TANK + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("Ͳ")] + public string TankId { get; set; } + + [DisplayName("")] + public decimal Capacity { get; set; } + + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [StringLength(50)] + [DisplayName("")] + public string Batch { get; set; } + + [StringLength(50)] + [DisplayName("Ӧ̱")] + public string VendId { get; set; } + + [NotMapped] + public string Ӧ => WmsCache.GetVenderName(VendId); + + [StringLength(50)] + [DisplayName("Ӧ")] + public string VendBatch { get; set; } + + [DisplayName("")] + public decimal Qty { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string UpdateOper { get; set; } + + [DisplayName("ʱ")] + public DateTime UpdateTime { get; set; } + + [DisplayName("")] + public decimal UpdateQty { get; set; } + + [NotMapped] + [DisplayName("̨")] + public string MachineIds { get; set; } + + + [DisplayName("״̬")] + public int State { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_PAINT_FAILEDREASON.cs b/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_PAINT_FAILEDREASON.cs new file mode 100644 index 0000000..fd7fb0d --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_PAINT_FAILEDREASON.cs @@ -0,0 +1,35 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TM_CQBMPT_PAINT_FAILEDREASON + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("不合格原因")] + + public string FailedReason { get; set; } + + [Key] + [Column(Order = 1)] + [DisplayName("工序")] + public EnumCqbmptProcess Process { get; set; } + + [DisplayName("状态")] + public int State { get; set; } + + [StringLength(500)] + [DisplayName("备注")] + + public string Remark { get; set; } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_PART_RELATION.cs b/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_PART_RELATION.cs new file mode 100644 index 0000000..ab40fa9 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_PART_RELATION.cs @@ -0,0 +1,45 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TM_CQBMPT_PART_RELATION + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [StringLength(50)] + [DisplayName("Ϻ")] + public string PaintPartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PaintPartDesc => WmsCache.GetPartDesc(PaintPartCode); + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ܼϺ")] + public string InjectionPartCode { get; set; } + + [NotMapped] + [DisplayName("ܼ")] + public string InjectionPartDesc => WmsCache.GetPartDesc(InjectionPartCode); + + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("ɫ")] + public string ColorCode { get; set; } + + [StringLength(50)] + [DisplayName("ɫ")] + public string ColorName { get; set; } + + [StringLength(50)] + [DisplayName("ɫ")] + public string ColorPartCode { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_PRODUCE_PLAN.cs b/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_PRODUCE_PLAN.cs new file mode 100644 index 0000000..39ec60d --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_PRODUCE_PLAN.cs @@ -0,0 +1,70 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TM_CQBMPT_PRODUCE_PLAN + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("")] + public string ShiftInfo { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + [DisplayName("")] + public string LineId { get; set; } + + + [Key] + [Column(Order = 3)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [StringLength(50)] + [DisplayName("")] + public string Batch { get; set; } + + [Column(TypeName = "money")] + [DisplayName("ƻ")] + public decimal PlanQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal OnlineQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("ϸ")] + public decimal GooddQty { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string TeamName { get; set; } + + [DisplayName("״̬")] + public EnumFormState State { get; set; } + + [StringLength(50)] + [DisplayName("ע")] + public string Remark { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_SCAN_LOG.cs b/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_SCAN_LOG.cs new file mode 100644 index 0000000..ae36ce1 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_SCAN_LOG.cs @@ -0,0 +1,101 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TM_CQBMPT_SCAN_LOG + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + + public int UID { get; set; } + + + [StringLength(50)] + [DisplayName("Ψһ")] + public string BarCode { get; set; } + + [DisplayName("")] + public EnumCqbmptProcess Process { get; set; } + + //[DisplayName("")] + //public EnumCqbmptFormType FormType { get; set; } = EnumCqbmptFormType.; + + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + + [StringLength(50)] + [DisplayName("ԭϺ")] + + public string RawPartCode { get; set; } + + [NotMapped] + [DisplayName("ԭ")] + + public string RawPartDesc => WmsCache.GetPartDesc(RawPartCode); + + [StringLength(50)] + [DisplayName("")] + public string Batch { get; set; } + + [DisplayName("")] + + public decimal Qty { get; set; } + + [StringLength(50)] + [DisplayName("ɨ")] + public string ScanOper { get; set; } + + [DisplayName("ɨʱ")] + public DateTime ScanTime { get; set; } + + [DisplayName("")] + public string TeamName { get; set; } + + [StringLength(50)] + [DisplayName("Ϣ")] + public string ShiftInfo { get; set; } + + [StringLength(4000)] + [DisplayName("ϸλ")] + public string FailedAreas { get; set; } + + [StringLength(4000)] + [DisplayName("ϸԭ")] + public string FailedReasons { get; set; } + + + public int Type { get; set; } + + [NotMapped] + public string => ((EnumCqbmptPartType)Type).ToString(); + + [DisplayName("״̬")] + public EnumCqbmptState State { get; set; } + + [DisplayName("׹")] + public int PolishTimes { get; set; } + + [StringLength(4000)] + [DisplayName("ע")] + public string Remark { get; set; } + + [DisplayName("Ϣ")] + public string DataInfo { get; set; } + + public TM_CQBMPT_SCAN_LOG() + { + + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_TRACEBACK.cs b/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_TRACEBACK.cs new file mode 100644 index 0000000..a879849 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TM_CQBMPT_TRACEBACK.cs @@ -0,0 +1,128 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; +using CK.SCP.Models; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TM_CQBMPT_TRACEBACK + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("唯一码")] + public string BarCode { get; set; } + + [Key] + [Column(Order = 1)] + + [DisplayName("工序")] + public EnumCqbmptProcess Process { get; set; } + + + //[DisplayName("操作类型")] + //public EnumCqbmptFormType FormType { get; set; } = EnumCqbmptFormType.无; + + [StringLength(50)] + [DisplayName("物料号")] + public string PartCode { get; set; } = ""; + [NotMapped] + [DisplayName("物料描述")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [StringLength(50)] + [DisplayName("原料物料号")] + public string RawPartCode { get; set; } = ""; + + [NotMapped] + [DisplayName("原料物料描述")] + public string RawPartDesc => WmsCache.GetPartDesc(RawPartCode); + + + [StringLength(50)] + [DisplayName("批次")] + public string Batch { get; set; } + + [DisplayName("数量")] + public decimal Qty { get; set; } + + [StringLength(50)] + [DisplayName("配置信息")] + public string DataInfo { get; set; } = ""; + + [StringLength(50)] + [DisplayName("生产线")] + public string LineId { get; set; } = ""; + + [StringLength(50)] + [DisplayName("班次信息")] + public string ShiftInfo { get; set; } + + [StringLength(50)] + [DisplayName("班组")] + public string TeamName { get; set; } + + [StringLength(4000)] + [DisplayName("不合格位置")] + public string FailedAreas { get; set; } + + [StringLength(4000)] + [DisplayName("不合格原因")] + public string FailedReasons { get; set; } + + + [StringLength(50)] + [DisplayName("创建人")] + public string CreateOper { get; set; } + + [DisplayName("创建时间")] + public DateTime CreateTime { get; set; } + + [StringLength(50)] + [DisplayName("更新人")] + public string UpdateOper { get; set; } + + + [DisplayName("更新时间")] + public DateTime? UpdateTime { get; set; } + + [DisplayName("抛光次数")] + public int PolishTimes { get; set; } = 0; + + + + public int Type { get; set; } = 0; + + [NotMapped] + public string 类型 => ((EnumCqbmptPartType)Type).ToString(); + + [DisplayName("状态")] + public EnumCqbmptState State { get; set; } + + [DisplayName("是否已提交")] + public bool IsCommit { get; set; } = false; + + [StringLength(4000)] + [DisplayName("备注")] + public string Remark { get; set; } + + [DisplayName("滑橇位置")] + public int SkidPosition { get; set; } = 0; + + [DisplayName("滑橇编号")] + public string SkidId { get; set; } + + public TM_CQBMPT_TRACEBACK() + { } + + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TM_TJANTOLIN_ASK.cs b/北京北汽/SCP/Models/WmsEntity/TM_TJANTOLIN_ASK.cs new file mode 100644 index 0000000..d8a228b --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TM_TJANTOLIN_ASK.cs @@ -0,0 +1,98 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; +//using ChangKeTec.Wms.Models.TjAntolin; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TM_TJANTOLIN_ASK + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("")] + public string TaskId { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [StringLength(50)] + [DisplayName("Դλ")] + public string FromLoc { get; set; } + + + [StringLength(50)] + [DisplayName("")] + public string OrderId { get; set; } // + + [DisplayName("˳")] + public int OrderSeq { get; set; } //˳ + + [StringLength(50)] + [DisplayName("Ͽλ")] + public string AskLocCode { get; set; } //Ͽλ + + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal Qty { get; set; } + + + //[DisplayName("״̬")] + //public EnumTjAntolinState State { get; set; } //״̬(0:δ,1:Ѷ) + + [StringLength(50)] + [DisplayName("ע")] + public string Remark { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string Vehicle { get; set; } // APSṩ + + [StringLength(50)] + [DisplayName("")] + public string Configuration { get; set; } // APSṩ + + [StringLength(50)] + [DisplayName("ģͺ")] + public string LaminationModule { get; set; } // ģͺ APSṩ + + [StringLength(50)] + [DisplayName("ΰƤͷ")] + public string BeltlineSkinStitch { get; set; } // ΰƤͷ APSṩ + + [StringLength(50)] + [DisplayName("ΰƤͷ")] + public string MidfieldSkinStitch { get; set; } // ΰƤͷ APSṩ + + [StringLength(50)] + [DisplayName("ŷ")] + public string Direction { get; set; } // ŷ APSṩ + + [StringLength(50)] + [DisplayName("")] + public string PairCode { get; set; } // APSṩ + + [StringLength(50)] + [DisplayName("Դ")] + public string Resource { get; set; } // Դ APSṩ + + [StringLength(50)] + [DisplayName("Runner")] + public string HighLowRunner { get; set; } // Runner APSṩ + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TM_TJANTOLIN_MATERIAL_INIT.cs b/北京北汽/SCP/Models/WmsEntity/TM_TJANTOLIN_MATERIAL_INIT.cs new file mode 100644 index 0000000..5142847 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TM_TJANTOLIN_MATERIAL_INIT.cs @@ -0,0 +1,89 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; +//using ChangKeTec.Wms.Models.TjAntolin; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TM_TJANTOLIN_MATERIAL_INIT + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("")] + public string OrderId { get; set; } + + [Key] + [Column(Order = 1)] + [DisplayName("˳")] + public int PrdSeq { get; set; } // ˳ MESṩ + + [DisplayName("")] + public DateTime Date { get; set; } // APSṩ + + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [Column(TypeName = "money")] + [DisplayName("ƻ")] + public decimal PlanQty { get; set; } + + //[DisplayName("״̬")] + //public EnumTjAntolinState State { get; set; } + + [StringLength(50)] + [DisplayName("ע")] + public string Remark { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string Vehicle { get; set; } // APSṩ + + [StringLength(50)] + [DisplayName("")] + public string Configuration { get; set; } // APSṩ + + [StringLength(50)] + [DisplayName("ŷ")] + public string Direction { get; set; } // ŷ APSṩ + + + // [StringLength(50)] + // [DisplayName("ģͺ")] + // public string LaminationModule { get; set; } // ģͺ APSṩ + // + // [StringLength(50)] + // [DisplayName("ΰƤͷ")] + // public string BeltlineSkinStitch { get; set; } // ΰƤͷ APSṩ + // + // [StringLength(50)] + // [DisplayName("ΰƤͷ")] + // public string MidfieldSkinStitch { get; set; } // ΰƤͷ APSṩ + + + // [StringLength(50)] + // [DisplayName("")] + // public string PairCode { get; set; } // APSṩ + // + // [StringLength(50)] + // [DisplayName("Դ")] + // public string Resource { get; set; } // Դ APSṩ + // + // [StringLength(50)] + // [DisplayName("Runner")] + // public string HighLowRunner { get; set; } // Runner APSṩ + + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TM_TJANTOLIN_PICK.cs b/北京北汽/SCP/Models/WmsEntity/TM_TJANTOLIN_PICK.cs new file mode 100644 index 0000000..9c5535a --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TM_TJANTOLIN_PICK.cs @@ -0,0 +1,63 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +//using ChangKeTec.Wms.Models.TjAntolin; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TM_TJANTOLIN_PICK + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("")] + public string TaskId { get; set; } + + [StringLength(50)] + [DisplayName("Դλ")] + public string FromLoc { get; set; } + + [StringLength(50)] + [DisplayName("Ŀλ")] + public string ToLoc { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + + [StringLength(50)] + [DisplayName("")] + public string Batch { get; set; } + + [Column(TypeName = "money")] + [DisplayName("Ҫ")] + public decimal AskQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal PickQty { get; set; } + + //[DisplayName("״̬")] + //public EnumTjAntolinState State { get; set; } //״̬(0:δ,1:Ѷ) + + [StringLength(50)] + [DisplayName("ע")] + public string Remark { get; set; } + + public DateTime AskTime { get; set; } + public DateTime EndTime { get; set; } + public string EqptCode { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TM_TJANTOLIN_PRODUCE_PLAN.cs b/北京北汽/SCP/Models/WmsEntity/TM_TJANTOLIN_PRODUCE_PLAN.cs new file mode 100644 index 0000000..8743cca --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TM_TJANTOLIN_PRODUCE_PLAN.cs @@ -0,0 +1,86 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TM_TJANTOLIN_PRODUCE_PLAN + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("")] + public string OrderId { get; set; } + + [Key] + [Column(Order = 1)] + [DisplayName("˳")] + public int PrdSeq { get; set; } // ˳ MESṩ + + [DisplayName("")] + public DateTime Date { get; set; } // APSṩ + + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [Column(TypeName = "money")] + [DisplayName("ƻ")] + public decimal PlanQty { get; set; } + + [DisplayName("״̬")] + public EnumFormState State { get; set; } + + [StringLength(50)] + [DisplayName("ע")] + public string Remark { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string Vehicle { get; set; } // APSṩ + + [StringLength(50)] + [DisplayName("")] + public string Configuration { get; set; } // APSṩ + + [StringLength(50)] + [DisplayName("ŷ")] + public string Direction { get; set; } // ŷ APSṩ + + // [StringLength(50)] + // [DisplayName("ģͺ")] + // public string LaminationModule { get; set; } // ģͺ APSṩ + // + // [StringLength(50)] + // [DisplayName("ΰƤͷ")] + // public string BeltlineSkinStitch { get; set; } // ΰƤͷ APSṩ + // + // [StringLength(50)] + // [DisplayName("ΰƤͷ")] + // public string MidfieldSkinStitch { get; set; } // ΰƤͷ APSṩ + + // [StringLength(50)] + // [DisplayName("")] + // public string PairCode { get; set; } // APSṩ + // + // [StringLength(50)] + // [DisplayName("Դ")] + // public string Resource { get; set; } // Դ APSṩ + // + // [StringLength(50)] + // [DisplayName("Runner")] + // public string HighLowRunner { get; set; } // Runner APSṩ + + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TR_BALANCE_COMPARE.cs b/北京北汽/SCP/Models/WmsEntity/TR_BALANCE_COMPARE.cs new file mode 100644 index 0000000..f89e8ee --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TR_BALANCE_COMPARE.cs @@ -0,0 +1,31 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TR_BALANCE_COMPARE + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public long UID { get; set; } + + [Key] + [StringLength(50)] + public string ReportId { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateName { get; set; } + + public DateTime CreateTime { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CompFileName { get; set; } + + ////public EnumDataState State { get; set; } + + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TR_BALANCE_COMPARE_PART.cs b/北京北汽/SCP/Models/WmsEntity/TR_BALANCE_COMPARE_PART.cs new file mode 100644 index 0000000..ad4ab3d --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TR_BALANCE_COMPARE_PART.cs @@ -0,0 +1,62 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TR_BALANCE_COMPARE_PART + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string ReportId { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string VinCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string SubPartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string ProjectId { get; set; } + + [Column(TypeName = "money")] + public decimal SendPrice { get; set; } + + [Column(TypeName = "money")] + public decimal BalancePrice { get; set; } + + [Column(TypeName = "money")] + public decimal DiffPrice { get; set; } + + [Column(TypeName = "money")] + public decimal SendQty { get; set; } + + [Column(TypeName = "money")] + public decimal BalanceQty { get; set; } + + [Column(TypeName = "money")] + public decimal DiffQty { get; set; } + + [Column(TypeName = "money")] + public decimal SendAmount { get; set; } + + [Column(TypeName = "money")] + public decimal BalanceAmount { get; set; } + + [Column(TypeName = "money")] + public decimal DiffAmount { get; set; } + + [Column(TypeName = "date")] + public DateTime? SendDate { get; set; } + + [Column(TypeName = "date")] + public DateTime? BalanceDate { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TR_BALANCE_COMPARE_VIN.cs b/北京北汽/SCP/Models/WmsEntity/TR_BALANCE_COMPARE_VIN.cs new file mode 100644 index 0000000..45c8f58 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TR_BALANCE_COMPARE_VIN.cs @@ -0,0 +1,51 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TR_BALANCE_COMPARE_VIN + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public long UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string ReportId { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string VinCode { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string PartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string ProjectId { get; set; } + + [Column(TypeName = "date")] + public DateTime? SendDate { get; set; } + + [Column(TypeName = "date")] + public DateTime? BalanceDate { get; set; } + + [Column(TypeName = "money")] + public decimal SendQty { get; set; } + + [Column(TypeName = "money")] + public decimal BalanceQty { get; set; } + + [Column(TypeName = "money")] + public decimal DiffQty { get; set; } + + public int VinState { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_BARCODE.cs b/北京北汽/SCP/Models/WmsEntity/TS_BARCODE.cs new file mode 100644 index 0000000..99b01da --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_BARCODE.cs @@ -0,0 +1,217 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_BARCODE + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public long UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("")] + public string BarCode { get; set; } + + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName( "Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + + [DisplayName( "")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [NotMapped] + [DisplayName( "һ")] + public string PartDesc1 => WmsCache.GetPartDesc1(PartCode); + [NotMapped] + [DisplayName( "")] + public string PartDesc2 => WmsCache.GetPartDesc2(PartCode); + + [NotMapped] + [DisplayName( "ERPϺ")] + public string ErpPartCode => WmsCache.GetErpPartCode(PartCode); + + [NotMapped] + [DisplayName( "Ŀ")] + public string ProjectId => WmsCache.GetProjectId(PartCode); + + [NotMapped] + [DisplayName( "λ")] + public string Unit => WmsCache.GetUnit(PartCode); + + + [StringLength(50)] + [DisplayName( "ӦϺ")] + public string VendPartCode { get; set; } + + [StringLength(50)] + [DisplayName( "ͻϺ")] + public string CustPartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName( "")] + public string Batch { get; set; } + + [DisplayName( "")] + public EnumManageType ManageType { get; set; } + + [DisplayName( "")] + public DateTime ProduceDate { get; set; } = DateTime.Now.Date; + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("ˮ")] + public string SerialNum { get; set; } = ""; + + [Column(TypeName = "money")] + [DisplayName( "")] + public decimal Qty { get; set; } + + [DisplayName( "")] + public int BarCodeType { get; set; } + + [DisplayName( "")] + public string PartType => WmsCache.GetPartType(PartCode); + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName( "")] + public string PartKind => WmsCache.GetPartKind(PartCode); + + [NotMapped] + [DisplayName( "")] + public string PartGroup => WmsCache.GetPartGroup(PartCode); + + [NotMapped] + [DisplayName( "Ϣ")] + public string Configuration => WmsCache.GetConfigration(PartCode); + + [Required(AllowEmptyStrings = true)] + [StringLength(500)] + [DisplayName( "Ϣ")] + public string FullBarCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("ݺ")] + public string BillNum { get; set; } = ""; + + [DisplayName("")] + public int BillLine { get; set; } = 1; + + [StringLength(50)] + [DisplayName("Ӧ̱")] + public string VendId { get; set; } = ""; + + [NotMapped] + [DisplayName( "Ӧ")] + public string VendName => WmsCache.GetVenderName(VendId); + + [NotMapped] + [DisplayName( "")] + public string LineName => WmsCache.GetWorkLineName(VendId); + + [NotMapped] + [DisplayName( "ͻ")] + public string CustName => WmsCache.GetCustName(VendId); + + [NotMapped] + [DisplayName( "ҷ")] + public string SelfCode => WmsCache.GetSelfCode(VendId); + + [StringLength(50)] + [DisplayName( "Ӧ")] + public string VendBatch { get; set; } + + [StringLength(50)] + [DisplayName( "α")] + public string ShiftId { get; set; } + + [NotMapped] + [DisplayName( "")] + public string ShiftName => WmsCache.GetShiftName(ShiftId); + + [StringLength(50)] + [DisplayName( "")] + public string TeamId { get; set; } + + [NotMapped] + [DisplayName( "")] + public string TeamName => WmsCache.GetTeamName(TeamId); + + [StringLength(50)] + [DisplayName( "߱")] + public string EqptCode { get; set; } + + [StringLength(50)] + [DisplayName( "")] + public string EqptType { get; set; } + + [DisplayName( "")] + public decimal PackQty { get; set; } + + [DisplayName( "ʱ")] + public DateTime CreateTime { get; set; } = DateTime.Now; + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName( "")] + public string CreateOper { get; set; } + + [DisplayName( "ʱ")] + public DateTime UpdateTime { get; set; } = DateTime.Now; + + [Column(TypeName = "money")] + [DisplayName( "")] + public decimal UpdateQty { get; set; } + + [DisplayName( "ӡ")] + public int PrintCount { get; set; } + + [StringLength(50)] + public string QLevel { get; set; } + + [StringLength(50)] + public string Process { get; set; } + + [StringLength(50)] + public string CertificateOfQuality { get; set; } + + [StringLength(50)] + public string DeliverDest { get; set; } + + [DisplayName( "״̬")] + public int State { get; set; } + + [StringLength(500)] + [DisplayName( "ע")] + public string Remark { get; set; } + + //[NotMapped] + //[DisplayName("λ2")] + //public string Unit2 => WmsCache.GetUnit2(PartCode); + + //[NotMapped] + //[DisplayName("ת")] + //public decimal Conversion => WmsCache.GetConversion(PartCode); + + //[NotMapped] + //[DisplayName("2")] + //public decimal Qty2 =>(Conversion == 1? Qty : Math.Round(Qty / Conversion,1,MidpointRounding.AwayFromZero)); + + //[NotMapped] + //[DisplayName("Ա")] + //public string Inspecter => WmsCache.GetPartInspecter(PartCode); + } + + +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_BARCODE_RULE.cs b/北京北汽/SCP/Models/WmsEntity/TS_BARCODE_RULE.cs new file mode 100644 index 0000000..147ef14 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_BARCODE_RULE.cs @@ -0,0 +1,32 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_BARCODE_RULE + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string PartCode { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string RuleBatch { get; set; } + + public int LastNumber { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(500)] + public string LastBarCode { get; set; } + + public DateTime LastTime { get; set; } + + public int State { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_CONTAINER.cs b/北京北汽/SCP/Models/WmsEntity/TS_CONTAINER.cs new file mode 100644 index 0000000..cda2605 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_CONTAINER.cs @@ -0,0 +1,31 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_CONTAINER + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string VendId { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string CantainerType { get; set; } + + public int Qty { get; set; } + + public int? UpdateQty { get; set; } + + public DateTime? UpdateTime { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_EQUIPMENT.cs b/北京北汽/SCP/Models/WmsEntity/TS_EQUIPMENT.cs new file mode 100644 index 0000000..bb9bb31 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_EQUIPMENT.cs @@ -0,0 +1,73 @@ +using CK.SCP.Models; +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_EQUIPMENT + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public long UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("̱")] + public string EqptCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [DisplayName("ڿλ")] + [StringLength(50)] + public string LocCode { get; set; } + + [DisplayName("")] + public decimal Capacity { get; set; } + + [DisplayName("")] + public int UsedQty { get; set; } + + [DisplayName("ʱ")] + public DateTime UpdateTime { get; set; } + + [DisplayName("״̬")] + public int State { get; set; } + + [Required(AllowEmptyStrings = true)] + + [DisplayName("")] + [StringLength(50)] + public string Type { get; set; } + + [Required(AllowEmptyStrings = true)] + + [DisplayName("ͺ")] + [StringLength(50)] + public string Model { get; set; } + + + public int MaintainQty { get; set; } + + [StringLength(500)] + + public string Remark { get; set; } + + + public bool NeedMaintain { get; set; } + + + public int MaintainDuration { get; set; } + + + public DateTime BeginTime { get; set; } + + + public DateTime MaintainTIme { get; set; } + + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_EQUIPMENT_BARCODE.cs b/北京北汽/SCP/Models/WmsEntity/TS_EQUIPMENT_BARCODE.cs new file mode 100644 index 0000000..367eda4 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_EQUIPMENT_BARCODE.cs @@ -0,0 +1,110 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_EQUIPMENT_BARCODE + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public long UID { get; set; } + + [Key] + [StringLength(50)] + public string BarCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(500)] + public string FullBarCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string PartCode { get; set; } + + [StringLength(50)] + public string VendPartCode { get; set; } + + [StringLength(50)] + public string CustPartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string Batch { get; set; } + + public int ManageType { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string SerialNum { get; set; } + + [Column(TypeName = "money")] + public decimal Qty { get; set; } + + public int BarCodeType { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string PartKind { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string BillNum { get; set; } + + public int BillLine { get; set; } + + [StringLength(50)] + public string VendId { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + [StringLength(50)] + public string EqptCode { get; set; } + + [StringLength(50)] + public string EqptType { get; set; } + + public DateTime CreateTime { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateOper { get; set; } + + public DateTime UpdateTime { get; set; } + + [Column(TypeName = "money")] + public decimal UpdateQty { get; set; } + + public int PrintCount { get; set; } + + [StringLength(50)] + public string ProduceBatch { get; set; } + + [Column(TypeName = "date")] + public DateTime? ProduceDate { get; set; } + + [StringLength(50)] + public string ProduceDevice { get; set; } + + [StringLength(50)] + public string DeliverLoc { get; set; } + + [StringLength(100)] + public string CustName { get; set; } + + [StringLength(100)] + public string CustPartName { get; set; } + + public int? BinQty { get; set; } + + [Column(TypeName = "money")] + public decimal? EachWeight { get; set; } + + public string BinSize { get; set; } + + [StringLength(50)] + public string SupplyCode { get; set; } + + public int State { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_ERP_STOCK.cs b/北京北汽/SCP/Models/WmsEntity/TS_ERP_STOCK.cs new file mode 100644 index 0000000..09db758 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_ERP_STOCK.cs @@ -0,0 +1,45 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_ERP_STOCK + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string ErpLocCode { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string ErpPartCode { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string Batch { get; set; } + + [Column(TypeName = "money")] + public decimal Qty { get; set; } + + public int State { get; set; } + + [StringLength(200)] + public string Remark { get; set; } + + [StringLength(50)] + public string RefCode { get; set; } + + public DateTime? UpdateDate { get; set; } + + public DateTime? UpdateTime { get; set; } + + [StringLength(50)] + public string Unit { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_LINE_ROTATE.cs b/北京北汽/SCP/Models/WmsEntity/TS_LINE_ROTATE.cs new file mode 100644 index 0000000..3a66d9d --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_LINE_ROTATE.cs @@ -0,0 +1,27 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_LINE_ROTATE + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public long UID { get; set; } + + [StringLength(50)] + public string PartCode { get; set; } + + [Column(TypeName = "money")] + public decimal Qty { get; set; } + + [Column(TypeName = "money")] + public decimal BinQty { get; set; } + + public DateTime PlanDate { get; set; } + + [StringLength(50)] + public string BillNum { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_NOTIFY.cs b/北京北汽/SCP/Models/WmsEntity/TS_NOTIFY.cs new file mode 100644 index 0000000..77e0f2f --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_NOTIFY.cs @@ -0,0 +1,44 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_NOTIFY + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName( "ݱ")] + public string BillNum { get; set; } + + [DisplayName( "ʾ")] + public int NotifyType { get; set; } + + [DisplayName( "ʾϢ")] + public string NotifyString { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName( "")] + public string CreateOperName { get; set; } + + [DisplayName( "ʱ")] + public DateTime CreateTime { get; set; } + + [StringLength(50)] + [DisplayName( "ر")] + public string CloseOperName { get; set; } + + [DisplayName( "رʱ")] + public DateTime? CloseTime { get; set; } + + [DisplayName( "״̬")] + public EnumBillState State { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_PART_WHSE_STOCK.cs b/北京北汽/SCP/Models/WmsEntity/TS_PART_WHSE_STOCK.cs new file mode 100644 index 0000000..052a2a7 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_PART_WHSE_STOCK.cs @@ -0,0 +1,61 @@ +#region 引用命名 +using ChangKeTec.Wms.Models.Enums; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +#endregion + +namespace ChangKeTec.Wms.Models.Wms +{ + /// <summary> + /// 零件仓库库存表 + /// </summary> + public partial class TS_PART_WHSE_STOCK + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("物料号")] + public string PartCode { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("仓库编号")] + public string WhseCode { get; set; } + + [Column(TypeName = "money")] + [DisplayName("最大库存")] + public decimal MaxQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("最小库存")] + public decimal MinQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("安全库存")] + public decimal SafeQty { get; set; } + + [Column(TypeName = "money")] + [DisplayName("库存数量")] + public decimal StockQty { get; set; } + + //[DisplayName("状态")] + //public EnumPartWhseStockState State { get; set; } + + [StringLength(500)] + [DisplayName("备注")] + public string Remark { get; set; } + + [DisplayName("更新时间")] + public DateTime UpdateTime { get; set; } = DateTime.Now; + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_SEQ_DETAIL.cs b/北京北汽/SCP/Models/WmsEntity/TS_SEQ_DETAIL.cs new file mode 100644 index 0000000..002e546 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_SEQ_DETAIL.cs @@ -0,0 +1,55 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_SEQ_DETAIL + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public long UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string BillNum { get; set; } + + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string SourceBillNum { get; set; } + + [Key] + [Column(Order = 1)] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string PartCode { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string Batch { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string LocCode { get; set; } + + + [StringLength(50)] + public string BarCode { get; set; } + public decimal Qty { get; set; } + + [StringLength(50)] + public string ProjectId { get; set; } + + [StringLength(50)] + public string State { get; set; } + + [StringLength(50)] + public string CustPartCode { get; set; } + [StringLength(50)] + public string PalletCode { get; set; } + + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TS_SORT_BILL.cs b/北京北汽/SCP/Models/WmsEntity/TS_SORT_BILL.cs new file mode 100644 index 0000000..b2f0871 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_SORT_BILL.cs @@ -0,0 +1,41 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ +/* + public partial class TS_SORT_BILL + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public long UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string CreateOper { get; set; } + + [DisplayName("ʱ")] + public DateTime CreateTime { get; set; } + + [StringLength(50)] + [DisplayName("ִ")] + public string ProcessOper { get; set; } + + [DisplayName("ִʱ")] + public DateTime? ProcessTime { get; set; } + + [DisplayName("״̬")] + public int State { get; set; } + + [DisplayName("ע")] + public string Remark { get; set; } + } +*/ +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_SORT_DETAIL.cs b/北京北汽/SCP/Models/WmsEntity/TS_SORT_DETAIL.cs new file mode 100644 index 0000000..c0bdf44 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_SORT_DETAIL.cs @@ -0,0 +1,81 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_SORT_DETAIL + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public long UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [DisplayName("к")] + public int LineNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("VIN")] + public string VinCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("˳")] + public string SeqNum { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc1(PartCode); + + [DisplayName("")] + public string BarCode { get; set; } + + [StringLength(50)] + [DisplayName("ͻϺ")] + public string CustPartCode { get; set; } + + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ŀ")] + public string ProjectId { get; set; } + + [StringLength(50)] + [DisplayName("FYON NUMBER")] + public string FyonNum { get; set; } + + [StringLength(50)] + [DisplayName("SUPPLIER")] + public string VendId { get; set; } + + [StringLength(50)] + [DisplayName("DOCK")] + public string Dock { get; set; } + + [StringLength(50)] + [DisplayName("DISPATCH DATE")] + public string DispatchDate { get; set; } + + + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("״̬")] + public string State { get; set; } + + [NotMapped] + public string PartGroup { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_STOCK_CUST.cs b/北京北汽/SCP/Models/WmsEntity/TS_STOCK_CUST.cs new file mode 100644 index 0000000..e840b1a --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_STOCK_CUST.cs @@ -0,0 +1,156 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_STOCK_CUST + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public long UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("")] + public string BarCode { get; set; } = ""; + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("λ")] + public string LocCode { get; set; } = ""; + + [StringLength(50)] + [DisplayName("")] + public string AreaCode { get; set; } + + [Key] + [Column(Order = 2)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + [DisplayName("״̬")] + public EnumStockState State { get; set; } = EnumStockState.ϸ; + + [Key] + [Column(Order = 3)] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } = ""; + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string Batch { get; set; } = ""; + + [Column(TypeName = "money")] + [DisplayName("")] + + public decimal Qty { get; set; } + + [StringLength(50)] + [Required(AllowEmptyStrings = true)] + [DisplayName("ߺ")] + public string EqptCode { get; set; } = ""; + + [NotMapped] + [DisplayName("һ")] + public string PartDesc1 => WmsCache.GetPartDesc1(PartCode); + [NotMapped] + [DisplayName("")] + public string PartDesc2 => WmsCache.GetPartDesc2(PartCode); + [NotMapped] + [DisplayName("Ŀ")] + public string ProjectId => WmsCache.GetProjectId(PartCode); + [NotMapped] + [DisplayName("λ")] + public string Unit => WmsCache.GetUnit(PartCode); + + [StringLength(50)] + [Required(AllowEmptyStrings = true)] + [DisplayName("Ӧ̱")] + public string VendId { get; set; } = ""; + + [NotMapped] + public string Ӧ => WmsCache.GetVenderName(VendId); + + [StringLength(50)] + [Required(AllowEmptyStrings = true)] + [DisplayName("Ӧ")] + public string VendBatch { get; set; } = ""; + + [NotMapped] + [DisplayName("ERPλ")] + public string ErpLocCode => WmsCache.GetErpLocCode(LocCode); + + [StringLength(50)] + + public string PlanOrderId { get; set; } + + + [Column(TypeName = "money")] + + public decimal Amount { get; set; } + + + [DisplayName("ջʱ")] + + public DateTime ReceiveDate { get; set; } + + [Column(TypeName = "date")] + [DisplayName("")] + public DateTime ProduceDate { get; set; } + + [Column(TypeName = "date")] + [DisplayName("ʧЧ")] + public DateTime OverdueDate { get; set; } + + [DisplayName("ʱ")] + public DateTime UpdateTime { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal UpdateQty { get; set; } + + [StringLength(50)] + [DisplayName("׷ݱ")] + public string TracebackCode { get; set; } + + + public int VinState { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + + public TS_STOCK_DETAIL ToDetail() + { + return new TS_STOCK_DETAIL + { + BarCode = BarCode, + LocCode = LocCode, + AreaCode = AreaCode, + PartCode = PartCode, + Batch = Batch, + VendId = VendId, + EqptCode = EqptCode, + PlanOrderId = PlanOrderId, + State = State, + Qty = 0, + Amount = Amount, + ProduceDate = ProduceDate, + OverdueDate = OverdueDate, + UpdateTime = UpdateTime, + UpdateQty = 0, + TracebackCode = TracebackCode, + ReceiveDate = ReceiveDate, + VendBatch = VendBatch, + + VinState = VinState + }; + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TS_STOCK_DETAIL.cs b/北京北汽/SCP/Models/WmsEntity/TS_STOCK_DETAIL.cs new file mode 100644 index 0000000..893c933 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_STOCK_DETAIL.cs @@ -0,0 +1,130 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_STOCK_DETAIL + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public long UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("")] + public string BarCode { get; set; } = ""; + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("λ")] + public string LocCode { get; set; } = ""; + + [StringLength(50)] + [DisplayName("")] + public string AreaCode { get; set; } + + [Key] + [Column(Order = 2)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + [DisplayName("״̬")] + public EnumStockState State { get; set; } = EnumStockState.ϸ; + + [Key] + [Column(Order = 3)] + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } = ""; + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string Batch { get; set; } = ""; + + [Column(TypeName = "money")] + [DisplayName("")] + + public decimal Qty { get; set; } + + [StringLength(50)] + [Required(AllowEmptyStrings = true)] + [DisplayName("ߺ")] + public string EqptCode { get; set; } = ""; + + [NotMapped] + [DisplayName("һ")] + public string PartDesc1 => WmsCache.GetPartDesc1(PartCode); + [NotMapped] + [DisplayName("")] + public string PartDesc2 => WmsCache.GetPartDesc2(PartCode); + [NotMapped] + [DisplayName("Ŀ")] + public string ProjectId => WmsCache.GetProjectId(PartCode); + [NotMapped] + [DisplayName("λ")] + public string Unit => WmsCache.GetUnit(PartCode); + + [StringLength(50)] + [Required(AllowEmptyStrings = true)] + [DisplayName("Ӧ̱")] + public string VendId { get; set; } = ""; + + [NotMapped] + public string Ӧ => WmsCache.GetVenderName(VendId); + + [StringLength(50)] + [Required(AllowEmptyStrings = true)] + [DisplayName("Ӧ")] + public string VendBatch { get; set; } = ""; + + [NotMapped] + [DisplayName("ERPλ")] + public string ErpLocCode => WmsCache.GetErpLocCode(LocCode); + + [StringLength(50)] + + public string PlanOrderId { get; set; } + + + [Column(TypeName = "money")] + + public decimal Amount { get; set; } + + + [DisplayName("ջʱ")] + + public DateTime ReceiveDate { get; set; } + + [Column(TypeName = "date")] + [DisplayName("")] + public DateTime ProduceDate { get; set; } + + [Column(TypeName = "date")] + [DisplayName("ʧЧ")] + public DateTime OverdueDate { get; set; } + + [DisplayName("ʱ")] + public DateTime UpdateTime { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal UpdateQty { get; set; } + + [StringLength(50)] + [DisplayName("׷ݱ")] + public string TracebackCode { get; set; } + + + public int VinState { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_STOCK_FREEZE.cs b/北京北汽/SCP/Models/WmsEntity/TS_STOCK_FREEZE.cs new file mode 100644 index 0000000..6309fdd --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_STOCK_FREEZE.cs @@ -0,0 +1,41 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_STOCK_FREEZE + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("ݱ")] + public string BillNum { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [NotMapped] + [DisplayName("")] + public string PartDesc => WmsCache.GetPartDesc(PartCode); + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("λ")] + public string LocCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string Batch { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal Qty { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_TRACEBACK.cs b/北京北汽/SCP/Models/WmsEntity/TS_TRACEBACK.cs new file mode 100644 index 0000000..aa4178d --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_TRACEBACK.cs @@ -0,0 +1,54 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_TRACEBACK + { + public int UID { get; set; } + + [Key] + [StringLength(50)] + public string BarCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string PartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string Batch { get; set; } + + [Column(TypeName = "money")] + public decimal Qty { get; set; } + + [StringLength(50)] + public string ProjectId { get; set; } + [StringLength(50)] + public string TracebackCode { get; set; } + [StringLength(50)] + public string WorklineId { get; set; } + [StringLength(50)] + public string TeamId { get; set; } + [StringLength(50)] + public string ShiftId { get; set; } + [StringLength(50)] + public string Worker { get; set; } + [StringLength(4000)] + public string MaterialInfo { get; set; } + + [Column(TypeName = "xml")] + public string TracebackData { get; set; } + + public DateTime CreateTime { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + + public string SourceBillNum { get; set; } + public EnumBillState State { get; set; } + public string BillNum { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_TRACEBACK_MATERIAL.cs b/北京北汽/SCP/Models/WmsEntity/TS_TRACEBACK_MATERIAL.cs new file mode 100644 index 0000000..9ee7d7f --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_TRACEBACK_MATERIAL.cs @@ -0,0 +1,52 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_TRACEBACK_MATERIAL + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string BarCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string PartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string Batch { get; set; } + + [Column(TypeName = "money")] + public decimal Qty { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string SubBarCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string SubPartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string SubBatch { get; set; } + [StringLength(50)] + public string SubVendId { get; set; } + [StringLength(50)] + public string SubVendBatch { get; set; } + + [Column(TypeName = "money")] + public decimal SubQty { get; set; } + + public string FromLocCode { get; set; } + + public EnumBillState State { get; set; } + public string BillNum { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_UNI_API.cs b/北京北汽/SCP/Models/WmsEntity/TS_UNI_API.cs new file mode 100644 index 0000000..642c320 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_UNI_API.cs @@ -0,0 +1,103 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_UNI_API + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string InterfaceType { get; set; } + + [StringLength(50)] + public string TableName { get; set; } + + public EnumBillType BillType { get; set; } + + public EnumSubBillType SubBillType { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string BillNum { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string PartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string Batch { get; set; } + + [StringLength(50)] + public string FromLoc { get; set; } + + [StringLength(50)] + public string ToLoc { get; set; } + + [StringLength(8)] + public string FromErpLoc { get; set; } + + [StringLength(8)] + public string ToErpLoc { get; set; } + + public decimal Qty { get; set; } + + public decimal GoodQty { get; set; } + + public decimal ScrapQty { get; set; } = 0; + + public decimal InvalidQty { get; set; } = 0; + + public EnumBillState State { get; set; } + + [StringLength(50)] + public string CreateOper { get; set; } + + public DateTime CreateTime { get; set; } + + public DateTime PutTime { get; set; } + + [StringLength(50)] + public string CustId { get; set; } + + [StringLength(50)] + public string VendId { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + [StringLength(50)] + public string LocUnit { get; set; } + + public DateTime ValidDate { get; set; } + + [StringLength(50)] + public string ErpBillNum { get; set; } + + public int ErpLineNum { get; set; } + + [StringLength(50)] + public string EqptCode { get; set; } + + [StringLength(50)] + public string EqptType { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + [StringLength(50)] + public string WorklineId { get; set; } + + public int ProcessId { get; set; } + [StringLength(50)] + public string SourceBillNum { get; set; } + + + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_UNI_API_HIS.cs b/北京北汽/SCP/Models/WmsEntity/TS_UNI_API_HIS.cs new file mode 100644 index 0000000..17aee53 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_UNI_API_HIS.cs @@ -0,0 +1,101 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_UNI_API_HIS + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string InterfaceType { get; set; } + + [StringLength(50)] + public string TableName { get; set; } + + public EnumBillType BillType { get; set; } + + public EnumSubBillType SubBillType { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string BillNum { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string PartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string Batch { get; set; } + + [StringLength(50)] + public string FromLoc { get; set; } + + [StringLength(50)] + public string ToLoc { get; set; } + + [StringLength(8)] + public string FromErpLoc { get; set; } + + [StringLength(8)] + public string ToErpLoc { get; set; } + + public decimal Qty { get; set; } + + public decimal GoodQty { get; set; } + + public decimal ScrapQty { get; set; } = 0; + + public decimal InvalidQty { get; set; } = 0; + + public EnumBillState State { get; set; } + + [StringLength(50)] + public string CreateOper { get; set; } + + public DateTime CreateTime { get; set; } + + public DateTime PutTime { get; set; } + + [StringLength(50)] + public string CustId { get; set; } + + [StringLength(50)] + public string VendId { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + [StringLength(50)] + public string LocUnit { get; set; } + + public DateTime ValidDate { get; set; } + + [StringLength(50)] + public string ErpBillNum { get; set; } + + public int ErpLineNum { get; set; } + + [StringLength(50)] + public string EqptCode { get; set; } + + [StringLength(50)] + public string EqptType { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + + [StringLength(50)] + public string WorklineId { get; set; } + public int ProcessId { get; set; } + + [StringLength(50)] + public string SourceBillNum { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_UNKNOW_CUSTPART.cs b/北京北汽/SCP/Models/WmsEntity/TS_UNKNOW_CUSTPART.cs new file mode 100644 index 0000000..3745ea2 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_UNKNOW_CUSTPART.cs @@ -0,0 +1,28 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_UNKNOW_CUSTPART + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CustPartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string ProjectId { get; set; } + + public DateTime FoundTime { get; set; } + + //public EnumDataState State { get; set; } + + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_VIN.cs b/北京北汽/SCP/Models/WmsEntity/TS_VIN.cs new file mode 100644 index 0000000..f91b451 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_VIN.cs @@ -0,0 +1,50 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_VIN + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + [StringLength(50)] + public string SourceId { get; set; } + + [StringLength(50)] + public string EqptCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string VinCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string PartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string Batch { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string ProjectId { get; set; } + + [StringLength(50)] + public string PlanOrderId { get; set; } + + public int Flag { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateOper { get; set; } + + public DateTime CreateTime { get; set; } + + public int ErrorCode { get; set; } + + public string ErrorText { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_VIN_HIS.cs b/北京北汽/SCP/Models/WmsEntity/TS_VIN_HIS.cs new file mode 100644 index 0000000..6718ac9 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_VIN_HIS.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_VIN_HIS + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + [StringLength(50)] + public string SourceId { get; set; } + + [StringLength(50)] + public string EqptCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string VinCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string PartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string Batch { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string ProjectId { get; set; } + + [StringLength(50)] + public string PlanOrderId { get; set; } + + public int Flag { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string CreateOper { get; set; } + + public DateTime CreateTime { get; set; } + + public int ErrorCode { get; set; } + + public string ErrorText { get; set; } + + public DateTime ExecTime { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_VIN_PART.cs b/北京北汽/SCP/Models/WmsEntity/TS_VIN_PART.cs new file mode 100644 index 0000000..548f589 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_VIN_PART.cs @@ -0,0 +1,60 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_VIN_PART + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public long UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string VinCode { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string ProjectId { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string CustPartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string ErpPartCode { get; set; } + + [NotMapped] + public string PartDesc1 => WmsCache.GetPartDesc1(ErpPartCode); + + [NotMapped] + public string PartDesc2 => WmsCache.GetPartDesc2(ErpPartCode); + + [NotMapped] + public string PartType => WmsCache.GetPartType(ErpPartCode); + + [NotMapped] + public string PartKind => WmsCache.GetPartKind(ErpPartCode); + + [Column(TypeName = "money")] + public decimal Qty { get; set; } + + [Column(TypeName = "money")] + public decimal UnitPrice { get; set; } + + [Column(TypeName = "money")] + public decimal Amount { get; set; } + + public int VinState { get; set; } + + public DateTime ReceiveTime { get; set; } + + public DateTime DeliverTime { get; set; } + + public DateTime BalanceTime { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_VIN_PART_MOVE.cs b/北京北汽/SCP/Models/WmsEntity/TS_VIN_PART_MOVE.cs new file mode 100644 index 0000000..84be7c2 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_VIN_PART_MOVE.cs @@ -0,0 +1,62 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_VIN_PART_MOVE + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string BarCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string PartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(20)] + public string Batch { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string FromLocCode { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string ToLocCode { get; set; } + + [Column(TypeName = "money")] + public decimal Qty { get; set; } + + [StringLength(50)] + public string EqptCode { get; set; } + + [StringLength(200)] + public string Remark { get; set; } + + public int State { get; set; } + + [Column(TypeName = "date")] + public DateTime ProduceDate { get; set; } + + [StringLength(50)] + public string Unit { get; set; } + + [StringLength(50)] + public string VendId { get; set; } + + [StringLength(50)] + public string VendBatch { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TS_VIN_STOCK.cs b/北京北汽/SCP/Models/WmsEntity/TS_VIN_STOCK.cs new file mode 100644 index 0000000..84193e2 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TS_VIN_STOCK.cs @@ -0,0 +1,56 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TS_VIN_STOCK + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public long UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string PartCode { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string VinCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string LocCode { get; set; } + + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + public string ProjectId { get; set; } + + [StringLength(50)] + public string EqptCode { get; set; } + + [StringLength(50)] + public string PlanOrderId { get; set; } + + [Column(TypeName = "money")] + public decimal Qty { get; set; } + + [Column(TypeName = "money")] + public decimal Amount { get; set; } + + [Column(TypeName = "date")] + public DateTime ReceiveDate { get; set; } + + [Column(TypeName = "date")] + public DateTime SendDate { get; set; } + + [Column(TypeName = "date")] + public DateTime BalanceDate { get; set; } + + public EnumStockState VinState { get; set; } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TT_CONTAINER_TYPE.cs b/北京北汽/SCP/Models/WmsEntity/TT_CONTAINER_TYPE.cs new file mode 100644 index 0000000..5ef0695 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TT_CONTAINER_TYPE.cs @@ -0,0 +1,29 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TT_CONTAINER_TYPE + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("")] + public string TypeCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string TypeName { get; set; } + + [DisplayName("״̬")] + public int State { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TT_CURRENCY.cs b/北京北汽/SCP/Models/WmsEntity/TT_CURRENCY.cs new file mode 100644 index 0000000..054d88f --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TT_CURRENCY.cs @@ -0,0 +1,27 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TT_CURRENCY + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + + [DisplayName("")] + + public string Currency { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string CurrencyDesc { get; set; } + + [StringLength(50)] + [DisplayName("ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TT_FAIL_TYPE.cs b/北京北汽/SCP/Models/WmsEntity/TT_FAIL_TYPE.cs new file mode 100644 index 0000000..06a90eb --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TT_FAIL_TYPE.cs @@ -0,0 +1,29 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TT_FAIL_TYPE + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("ϸԭ")] + public string TypeCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("ϸ")] + public string TypeName { get; set; } + + [DisplayName("״̬")] + public int State { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TT_PART_GROUP.cs b/北京北汽/SCP/Models/WmsEntity/TT_PART_GROUP.cs new file mode 100644 index 0000000..deb6e95 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TT_PART_GROUP.cs @@ -0,0 +1,36 @@ +using CK.SCP.Models; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TT_PART_GROUP + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("")] + + public string GroupCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string GroupName { get; set; } + + [DisplayName("״̬")] + public int State { get; set; } + + [StringLength(50)] + [DisplayName("ע")] + public string Remark { get; set; } + + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TT_PROJECT.cs b/北京北汽/SCP/Models/WmsEntity/TT_PROJECT.cs new file mode 100644 index 0000000..bd6a233 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TT_PROJECT.cs @@ -0,0 +1,32 @@ +using CK.SCP.Models; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TT_PROJECT + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("Ŀ")] + public string ProjectId { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ŀ")] + public string ProjectName { get; set; } + + [StringLength(50)] + [DisplayName("ע")] + public string Remark { get; set; } + + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TT_SHIFT.cs b/北京北汽/SCP/Models/WmsEntity/TT_SHIFT.cs new file mode 100644 index 0000000..e3c099c --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TT_SHIFT.cs @@ -0,0 +1,41 @@ +using CK.SCP.Models; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TT_SHIFT + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("α")] + public string ShiftId { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string ShiftName { get; set; } + + [DisplayName("ʼʱ")] + public decimal BeginHour { get; set; } + + [DisplayName("ʱ")] + public decimal EndHour { get; set; } + + [DisplayName("״̬")] + public int State { get; set; } + + [StringLength(200)] + [DisplayName("ע")] + public string Remark { get; set; } + + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TT_UNIT.cs b/北京北汽/SCP/Models/WmsEntity/TT_UNIT.cs new file mode 100644 index 0000000..2405c0f --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TT_UNIT.cs @@ -0,0 +1,22 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class TT_UNIT + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public int UID { get; set; } + + [Key] + [StringLength(50)] + [DisplayName("λ")] + + public string Unit { get; set; } + + [StringLength(200)] + [DisplayName("ע")] + public string Remak { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/TableSchema.cs b/北京北汽/SCP/Models/WmsEntity/TableSchema.cs new file mode 100644 index 0000000..69c6b92 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TableSchema.cs @@ -0,0 +1,9 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + diff --git a/北京北汽/SCP/Models/WmsEntity/TableSchema.tt b/北京北汽/SCP/Models/WmsEntity/TableSchema.tt new file mode 100644 index 0000000..e3f57f4 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TableSchema.tt @@ -0,0 +1,733 @@ +<#@ template language="C#" debug="false" hostspecific="true"#> +<#@ include file="EF6.Utility.CS.ttinclude"#><#@ + output extension=".cs"#><# + +const string inputFile = @"Wms_Antolin.edmx"; +var textTransform = DynamicTextTransformation.Create(this); +var code = new CodeGenerationTools(this); +var ef = new MetadataTools(this); +var typeMapper = new TypeMapper(code, ef, textTransform.Errors); +var fileManager = EntityFrameworkTemplateFileManager.Create(this); +var itemCollection = new EdmMetadataLoader(textTransform.Host, textTransform.Errors).CreateEdmItemCollection(inputFile); +var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef); + +if (!typeMapper.VerifyCaseInsensitiveTypeUniqueness(typeMapper.GetAllGlobalItems(itemCollection), inputFile)) +{ + return string.Empty; +} + +WriteHeader(codeStringGenerator, fileManager); + +foreach (var entity in typeMapper.GetItemsToGenerate<EntityType>(itemCollection)) +{ + fileManager.StartNewFile(entity.Name + ".cs"); + BeginNamespace(code); +#> +<#=codeStringGenerator.UsingDirectives(inHeader: false)#> +<#=codeStringGenerator.EntityClassOpening(entity)#> +{ +<# + var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(entity); + var collectionNavigationProperties = typeMapper.GetCollectionNavigationProperties(entity); + var complexProperties = typeMapper.GetComplexProperties(entity); + + if (propertiesWithDefaultValues.Any() || collectionNavigationProperties.Any() || complexProperties.Any()) + { +#> + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public <#=code.Escape(entity)#>() + { +<# + foreach (var edmProperty in propertiesWithDefaultValues) + { +#> + this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>; +<# + } + + foreach (var navigationProperty in collectionNavigationProperties) + { +#> + this.<#=code.Escape(navigationProperty)#> = new HashSet<<#=typeMapper.GetTypeName(navigationProperty.ToEndMember.GetEntityType())#>>(); +<# + } + + foreach (var complexProperty in complexProperties) + { +#> + this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>(); +<# + } +#> + } + +<# + } + + var simpleProperties = typeMapper.GetSimpleProperties(entity); + if (simpleProperties.Any()) + { + foreach (var edmProperty in simpleProperties) + { +#> + <#=codeStringGenerator.Property(edmProperty)#> +<# + } + } + + if (complexProperties.Any()) + { +#> + +<# + foreach(var complexProperty in complexProperties) + { +#> + <#=codeStringGenerator.Property(complexProperty)#> +<# + } + } + + var navigationProperties = typeMapper.GetNavigationProperties(entity); + if (navigationProperties.Any()) + { +#> + +<# + foreach (var navigationProperty in navigationProperties) + { + if (navigationProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many) + { +#> + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] +<# + } +#> + <#=codeStringGenerator.NavigationProperty(navigationProperty)#> +<# + } + } +#> +} +<# + EndNamespace(code); +} + +foreach (var complex in typeMapper.GetItemsToGenerate<ComplexType>(itemCollection)) +{ + fileManager.StartNewFile(complex.Name + ".cs"); + BeginNamespace(code); +#> +<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#> +<#=Accessibility.ForType(complex)#> partial class <#=code.Escape(complex)#> +{ +<# + var complexProperties = typeMapper.GetComplexProperties(complex); + var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(complex); + + if (propertiesWithDefaultValues.Any() || complexProperties.Any()) + { +#> + public <#=code.Escape(complex)#>() + { +<# + foreach (var edmProperty in propertiesWithDefaultValues) + { +#> + this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>; +<# + } + + foreach (var complexProperty in complexProperties) + { +#> + this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>(); +<# + } +#> + } + +<# + } + + var simpleProperties = typeMapper.GetSimpleProperties(complex); + if (simpleProperties.Any()) + { + foreach(var edmProperty in simpleProperties) + { +#> + <#=codeStringGenerator.Property(edmProperty)#> +<# + } + } + + if (complexProperties.Any()) + { +#> + +<# + foreach(var edmProperty in complexProperties) + { +#> + <#=codeStringGenerator.Property(edmProperty)#> +<# + } + } +#> +} +<# + EndNamespace(code); +} + +foreach (var enumType in typeMapper.GetEnumItemsToGenerate(itemCollection)) +{ + fileManager.StartNewFile(enumType.Name + ".cs"); + BeginNamespace(code); +#> +<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#> +<# + if (typeMapper.EnumIsFlags(enumType)) + { +#> +[Flags] +<# + } +#> +<#=codeStringGenerator.EnumOpening(enumType)#> +{ +<# + var foundOne = false; + + foreach (MetadataItem member in typeMapper.GetEnumMembers(enumType)) + { + foundOne = true; +#> + <#=code.Escape(typeMapper.GetEnumMemberName(member))#> = <#=typeMapper.GetEnumMemberValue(member)#>, +<# + } + + if (foundOne) + { + this.GenerationEnvironment.Remove(this.GenerationEnvironment.Length - 3, 1); + } +#> +} +<# + EndNamespace(code); +} + +fileManager.Process(); + +#> +<#+ + +public void WriteHeader(CodeStringGenerator codeStringGenerator, EntityFrameworkTemplateFileManager fileManager) +{ + fileManager.StartHeader(); +#> +//------------------------------------------------------------------------------ +// <auto-generated> +// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#> +// +// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#> +// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#> +// </auto-generated> +//------------------------------------------------------------------------------ +<#=codeStringGenerator.UsingDirectives(inHeader: true)#> +<#+ + fileManager.EndBlock(); +} + +public void BeginNamespace(CodeGenerationTools code) +{ + var codeNamespace = code.VsNamespaceSuggestion(); + if (!String.IsNullOrEmpty(codeNamespace)) + { +#> +namespace <#=code.EscapeNamespace(codeNamespace)#> +{ +<#+ + PushIndent(" "); + } +} + +public void EndNamespace(CodeGenerationTools code) +{ + if (!String.IsNullOrEmpty(code.VsNamespaceSuggestion())) + { + PopIndent(); +#> +} +<#+ + } +} + +public const string TemplateId = "CSharp_DbContext_Types_EF6"; + +public class CodeStringGenerator +{ + private readonly CodeGenerationTools _code; + private readonly TypeMapper _typeMapper; + private readonly MetadataTools _ef; + + public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef) + { + ArgumentNotNull(code, "code"); + ArgumentNotNull(typeMapper, "typeMapper"); + ArgumentNotNull(ef, "ef"); + + _code = code; + _typeMapper = typeMapper; + _ef = ef; + } + + public string Property(EdmProperty edmProperty) + { + return string.Format( + CultureInfo.InvariantCulture, + "{0} {1} {2} {{ {3}get; {4}set; }}", + Accessibility.ForProperty(edmProperty), + _typeMapper.GetTypeName(edmProperty.TypeUsage), + _code.Escape(edmProperty), + _code.SpaceAfter(Accessibility.ForGetter(edmProperty)), + _code.SpaceAfter(Accessibility.ForSetter(edmProperty))); + } + + public string NavigationProperty(NavigationProperty navProp) + { + var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType()); + return string.Format( + CultureInfo.InvariantCulture, + "{0} {1} {2} {{ {3}get; {4}set; }}", + AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)), + navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType, + _code.Escape(navProp), + _code.SpaceAfter(Accessibility.ForGetter(navProp)), + _code.SpaceAfter(Accessibility.ForSetter(navProp))); + } + + public string AccessibilityAndVirtual(string accessibility) + { + return accessibility + (accessibility != "private" ? " virtual" : ""); + } + + public string EntityClassOpening(EntityType entity) + { + return string.Format( + CultureInfo.InvariantCulture, + "{0} {1}partial class {2}{3}", + Accessibility.ForType(entity), + _code.SpaceAfter(_code.AbstractOption(entity)), + _code.Escape(entity), + _code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType))); + } + + public string EnumOpening(SimpleType enumType) + { + return string.Format( + CultureInfo.InvariantCulture, + "{0} enum {1} : {2}", + Accessibility.ForType(enumType), + _code.Escape(enumType), + _code.Escape(_typeMapper.UnderlyingClrType(enumType))); + } + + public void WriteFunctionParameters(EdmFunction edmFunction, Action<string, string, string, string> writeParameter) + { + var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef); + foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable)) + { + var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null"; + var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")"; + var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))"; + writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit); + } + } + + public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace) + { + var parameters = _typeMapper.GetParameters(edmFunction); + + return string.Format( + CultureInfo.InvariantCulture, + "{0} IQueryable<{1}> {2}({3})", + AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)), + _typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace), + _code.Escape(edmFunction), + string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray())); + } + + public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace) + { + var parameters = _typeMapper.GetParameters(edmFunction); + + return string.Format( + CultureInfo.InvariantCulture, + "return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});", + _typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace), + edmFunction.NamespaceName, + edmFunction.Name, + string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()), + _code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()))); + } + + public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption) + { + var parameters = _typeMapper.GetParameters(edmFunction); + var returnType = _typeMapper.GetReturnType(edmFunction); + + var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()); + if (includeMergeOption) + { + paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption"; + } + + return string.Format( + CultureInfo.InvariantCulture, + "{0} {1} {2}({3})", + AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)), + returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">", + _code.Escape(edmFunction), + paramList); + } + + public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption) + { + var parameters = _typeMapper.GetParameters(edmFunction); + var returnType = _typeMapper.GetReturnType(edmFunction); + + var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())); + if (includeMergeOption) + { + callParams = ", mergeOption" + callParams; + } + + return string.Format( + CultureInfo.InvariantCulture, + "return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});", + returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">", + edmFunction.Name, + callParams); + } + + public string DbSet(EntitySet entitySet) + { + return string.Format( + CultureInfo.InvariantCulture, + "{0} virtual DbSet<{1}> {2} {{ get; set; }}", + Accessibility.ForReadOnlyProperty(entitySet), + _typeMapper.GetTypeName(entitySet.ElementType), + _code.Escape(entitySet)); + } + + public string UsingDirectives(bool inHeader, bool includeCollections = true) + { + return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion()) + ? string.Format( + CultureInfo.InvariantCulture, + "{0}using System;{1}" + + "{2}", + inHeader ? Environment.NewLine : "", + includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "", + inHeader ? "" : Environment.NewLine) + : ""; + } +} + +public class TypeMapper +{ + private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName"; + + private readonly System.Collections.IList _errors; + private readonly CodeGenerationTools _code; + private readonly MetadataTools _ef; + + public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors) + { + ArgumentNotNull(code, "code"); + ArgumentNotNull(ef, "ef"); + ArgumentNotNull(errors, "errors"); + + _code = code; + _ef = ef; + _errors = errors; + } + + public static string FixNamespaces(string typeName) + { + return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial."); + } + + public string GetTypeName(TypeUsage typeUsage) + { + return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null); + } + + public string GetTypeName(EdmType edmType) + { + return GetTypeName(edmType, isNullable: null, modelNamespace: null); + } + + public string GetTypeName(TypeUsage typeUsage, string modelNamespace) + { + return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace); + } + + public string GetTypeName(EdmType edmType, string modelNamespace) + { + return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace); + } + + public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace) + { + if (edmType == null) + { + return null; + } + + var collectionType = edmType as CollectionType; + if (collectionType != null) + { + return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace)); + } + + var typeName = _code.Escape(edmType.MetadataProperties + .Where(p => p.Name == ExternalTypeNameAttributeName) + .Select(p => (string)p.Value) + .FirstOrDefault()) + ?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ? + _code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) : + _code.Escape(edmType)); + + if (edmType is StructuralType) + { + return typeName; + } + + if (edmType is SimpleType) + { + var clrType = UnderlyingClrType(edmType); + if (!IsEnumType(edmType)) + { + typeName = _code.Escape(clrType); + } + + typeName = FixNamespaces(typeName); + + return clrType.IsValueType && isNullable == true ? + String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) : + typeName; + } + + throw new ArgumentException("edmType"); + } + + public Type UnderlyingClrType(EdmType edmType) + { + ArgumentNotNull(edmType, "edmType"); + + var primitiveType = edmType as PrimitiveType; + if (primitiveType != null) + { + return primitiveType.ClrEquivalentType; + } + + if (IsEnumType(edmType)) + { + return GetEnumUnderlyingType(edmType).ClrEquivalentType; + } + + return typeof(object); + } + + public object GetEnumMemberValue(MetadataItem enumMember) + { + ArgumentNotNull(enumMember, "enumMember"); + + var valueProperty = enumMember.GetType().GetProperty("Value"); + return valueProperty == null ? null : valueProperty.GetValue(enumMember, null); + } + + public string GetEnumMemberName(MetadataItem enumMember) + { + ArgumentNotNull(enumMember, "enumMember"); + + var nameProperty = enumMember.GetType().GetProperty("Name"); + return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null); + } + + public System.Collections.IEnumerable GetEnumMembers(EdmType enumType) + { + ArgumentNotNull(enumType, "enumType"); + + var membersProperty = enumType.GetType().GetProperty("Members"); + return membersProperty != null + ? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null) + : Enumerable.Empty<MetadataItem>(); + } + + public bool EnumIsFlags(EdmType enumType) + { + ArgumentNotNull(enumType, "enumType"); + + var isFlagsProperty = enumType.GetType().GetProperty("IsFlags"); + return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null); + } + + public bool IsEnumType(GlobalItem edmType) + { + ArgumentNotNull(edmType, "edmType"); + + return edmType.GetType().Name == "EnumType"; + } + + public PrimitiveType GetEnumUnderlyingType(EdmType enumType) + { + ArgumentNotNull(enumType, "enumType"); + + return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null); + } + + public string CreateLiteral(object value) + { + if (value == null || value.GetType() != typeof(TimeSpan)) + { + return _code.CreateLiteral(value); + } + + return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks); + } + + public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable<string> types, string sourceFile) + { + ArgumentNotNull(types, "types"); + ArgumentNotNull(sourceFile, "sourceFile"); + + var hash = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase); + if (types.Any(item => !hash.Add(item))) + { + _errors.Add( + new CompilerError(sourceFile, -1, -1, "6023", + String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict")))); + return false; + } + return true; + } + + public IEnumerable<SimpleType> GetEnumItemsToGenerate(IEnumerable<GlobalItem> itemCollection) + { + return GetItemsToGenerate<SimpleType>(itemCollection) + .Where(e => IsEnumType(e)); + } + + public IEnumerable<T> GetItemsToGenerate<T>(IEnumerable<GlobalItem> itemCollection) where T: EdmType + { + return itemCollection + .OfType<T>() + .Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName)) + .OrderBy(i => i.Name); + } + + public IEnumerable<string> GetAllGlobalItems(IEnumerable<GlobalItem> itemCollection) + { + return itemCollection + .Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i)) + .Select(g => GetGlobalItemName(g)); + } + + public string GetGlobalItemName(GlobalItem item) + { + if (item is EdmType) + { + return ((EdmType)item).Name; + } + else + { + return ((EntityContainer)item).Name; + } + } + + public IEnumerable<EdmProperty> GetSimpleProperties(EntityType type) + { + return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type); + } + + public IEnumerable<EdmProperty> GetSimpleProperties(ComplexType type) + { + return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type); + } + + public IEnumerable<EdmProperty> GetComplexProperties(EntityType type) + { + return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type); + } + + public IEnumerable<EdmProperty> GetComplexProperties(ComplexType type) + { + return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type); + } + + public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(EntityType type) + { + return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null); + } + + public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(ComplexType type) + { + return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null); + } + + public IEnumerable<NavigationProperty> GetNavigationProperties(EntityType type) + { + return type.NavigationProperties.Where(np => np.DeclaringType == type); + } + + public IEnumerable<NavigationProperty> GetCollectionNavigationProperties(EntityType type) + { + return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many); + } + + public FunctionParameter GetReturnParameter(EdmFunction edmFunction) + { + ArgumentNotNull(edmFunction, "edmFunction"); + + var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters"); + return returnParamsProperty == null + ? edmFunction.ReturnParameter + : ((IEnumerable<FunctionParameter>)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault(); + } + + public bool IsComposable(EdmFunction edmFunction) + { + ArgumentNotNull(edmFunction, "edmFunction"); + + var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute"); + return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null); + } + + public IEnumerable<FunctionImportParameter> GetParameters(EdmFunction edmFunction) + { + return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef); + } + + public TypeUsage GetReturnType(EdmFunction edmFunction) + { + var returnParam = GetReturnParameter(edmFunction); + return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage); + } + + public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption) + { + var returnType = GetReturnType(edmFunction); + return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType; + } +} + +public static void ArgumentNotNull<T>(T arg, string name) where T : class +{ + if (arg == null) + { + throw new ArgumentNullException(name); + } +} +#> \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/TableSchema1.cs b/北京北汽/SCP/Models/WmsEntity/TableSchema1.cs new file mode 100644 index 0000000..69c6b92 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/TableSchema1.cs @@ -0,0 +1,9 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// </auto-generated> +//------------------------------------------------------------------------------ + diff --git a/北京北汽/SCP/Models/WmsEntity/VB_INSPECT.cs b/北京北汽/SCP/Models/WmsEntity/VB_INSPECT.cs new file mode 100644 index 0000000..a76fe1d --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VB_INSPECT.cs @@ -0,0 +1,118 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VB_INSPECT + { + [Key] + [Column(Order = 0)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string BillNum { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string BarCode { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string LocCode { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string PoBillNum { get; set; } + + [Key] + [Column(Order = 5)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int PoLine { get; set; } + + [Key] + [Column(Order = 6)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int InspectType { get; set; } + + [Key] + [Column(Order = 7)] + [StringLength(50)] + public string PartCode { get; set; } + + [Key] + [Column(Order = 8)] + [StringLength(50)] + public string Batch { get; set; } + + [Key] + [Column(Order = 9, TypeName = "money")] + public decimal ReceiveQty { get; set; } + + [Key] + [Column(Order = 10, TypeName = "money")] + public decimal InspQty { get; set; } + + [Key] + [Column(Order = 11, TypeName = "money")] + public decimal SampleQty { get; set; } + + [Key] + [Column(Order = 12, TypeName = "money")] + public decimal PassQty { get; set; } + + [Key] + [Column(Order = 13, TypeName = "money")] + public decimal FailQty { get; set; } + + [Key] + [Column(Order = 14, TypeName = "money")] + public decimal CrackQty { get; set; } + + [Key] + [Column(Order = 15)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int InspResult { get; set; } + + [StringLength(50)] + public string FailReason { get; set; } + + [StringLength(200)] + public string VendBatch { get; set; } + + public string Remark { get; set; } + + [Key] + [Column(Order = 16)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int State { get; set; } + + [StringLength(50)] + public string VendId { get; set; } + + [StringLength(50)] + public string Unit { get; set; } + + [StringLength(50)] + public string PartType { get; set; } + [StringLength(50)] + public string PartKind { get; set; } + [StringLength(50)] + public string PartGroup { get; set; } + [StringLength(50)] + public string ProjectId { get; set; } + [StringLength(50)] + public string PartDesc1 { get; set; } + [StringLength(50)] + public string PartDesc2 { get; set; } + + public DateTime BillTime { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VB_STOCK_MOVE.cs b/北京北汽/SCP/Models/WmsEntity/VB_STOCK_MOVE.cs new file mode 100644 index 0000000..3bb068e --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VB_STOCK_MOVE.cs @@ -0,0 +1,64 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VB_STOCK_MOVE + { + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string BarCode { get; set; } + + [StringLength(50)] + public string PartCode { get; set; } + + [StringLength(20)] + public string FromBatch { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string FromLocCode { get; set; } + + [StringLength(50)] + public string ToLocCode { get; set; } + + [StringLength(20)] + public string ToBatch { get; set; } + + [Key] + [Column(Order = 4, TypeName = "money")] + public decimal Qty { get; set; } + + public DateTime BillTime { get; set; } + + public string BillNum { get; set; } + + public string VendId { get; set; } + + [StringLength(50)] + public string ErpPartCode { get; set; } + + public string PartDesc1 { get; set; } + + public string PartDesc2 { get; set; } + + [StringLength(50)] + public string ProjectId { get; set; } + + [StringLength(50)] + public string Unit { get; set; } + + [StringLength(50)] + public string PartGroup { get; set; } + + [StringLength(50)] + public string PartType { get; set; } + + [StringLength(50)] + public string PartKind { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_ASN.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_ASN.cs new file mode 100644 index 0000000..d4df85f --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_ASN.cs @@ -0,0 +1,54 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_ASN + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 单据类型 { get; set; } + + [Key] + [Column(Order = 4)] + public DateTime 单据时间 { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(50)] + public string 采购订单号 { get; set; } + + [Key] + [Column(Order = 6)] + [StringLength(50)] + public string 供应商 { get; set; } + + [Key] + [Column(Order = 7)] + [StringLength(50)] + public string 操作员 { get; set; } + + [Key] + [Column(Order = 8)] + public DateTime 发货时间 { get; set; } + + [StringLength(50)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_ASN_DETAIL.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_ASN_DETAIL.cs new file mode 100644 index 0000000..d447341 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_ASN_DETAIL.cs @@ -0,0 +1,63 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_ASN_DETAIL + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 订单号 { get; set; } + + [Key] + [Column(Order = 4)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 订单行号 { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(50)] + public string 物料号 { get; set; } + + [Key] + [Column(Order = 6)] + [StringLength(50)] + public string 批次 { get; set; } + + [Key] + [Column(Order = 7, TypeName = "money")] + public decimal 发货数量 { get; set; } + + [Key] + [Column(Order = 8, TypeName = "money")] + public decimal 已结数量 { get; set; } + + [StringLength(50)] + public string 器具号 { get; set; } + + [Key] + [Column(Order = 9, TypeName = "money")] + public decimal 采购价格 { get; set; } + + [StringLength(50)] + public string 采购单位 { get; set; } + + [StringLength(50)] + public string 存储单位 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_BASEDATA_LOG.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_BASEDATA_LOG.cs new file mode 100644 index 0000000..89fd995 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_BASEDATA_LOG.cs @@ -0,0 +1,45 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_BASEDATA_LOG + { + [Key] + [Column(Order = 0)] + public long UID { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(80)] + public string 操作员 { get; set; } + + [Key] + [Column(Order = 2)] + public DateTime 日志时间 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 日志类型 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 数据类型 { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(4000)] + public string 原值 { get; set; } + + [Key] + [Column(Order = 6)] + [StringLength(4000)] + public string 新值 { get; set; } + + [StringLength(500)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_BILL.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_BILL.cs new file mode 100644 index 0000000..1988d1a --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_BILL.cs @@ -0,0 +1,63 @@ +namespace ChangKeTec.Wms.Models.Wms +{ + /* + public partial class VIEW_BILL + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [StringLength(50)] + public string 来源单据号 { get; set; } + + [StringLength(50)] + public string 来源单据号2 { get; set; } + + [Key] + [Column(Order = 3)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 单据类型 { get; set; } + + [Key] + [Column(Order = 4)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 单据子类型 { get; set; } + + [Key] + [Column(Order = 5)] + public DateTime 单据时间 { get; set; } + + [StringLength(50)] + public string 开始时间 { get; set; } + + [StringLength(50)] + public string 完成时间 { get; set; } + + [Key] + [Column(Order = 6)] + [StringLength(50)] + public string 创建人 { get; set; } + + [StringLength(50)] + public string 供应商编号 { get; set; } + + [StringLength(50)] + public string 客户编号 { get; set; } + + [StringLength(50)] + public string 项目编号 { get; set; } + + public string 备注 { get; set; } + } + */ +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_BILL_LOG.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_BILL_LOG.cs new file mode 100644 index 0000000..2c88e45 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_BILL_LOG.cs @@ -0,0 +1,39 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_BILL_LOG + { + [Key] + [Column(Order = 0)] + public long UID { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(80)] + public string 操作员 { get; set; } + + [Key] + [Column(Order = 2)] + public DateTime 日志时间 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 日志类型 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 5)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 单据类型 { get; set; } + + public string 日志信息 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_CQWKSAFEQTY.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_CQWKSAFEQTY.cs new file mode 100644 index 0000000..a519c21 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_CQWKSAFEQTY.cs @@ -0,0 +1,38 @@ +#region 引用命名 +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +#endregion + +namespace ChangKeTec.Wms.Models.Wms +{ + public class VIEW_CQWKSAFEQTY + { + [Key] + [StringLength(50)] + public string 物料号 { get; set; } + + [StringLength(50)] + public string 仓库名称 { get; set; } + + [Column(TypeName = "money")] + public decimal? 最大库存 { get; set; } + + [Column(TypeName = "money")] + public decimal? 最小库存 { get; set; } + + [Column(TypeName = "money")] + public decimal? 安全库存 { get; set; } + + [Column(TypeName = "money")] + public decimal? 当前库存 { get; set; } + + [StringLength(500)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_CalOverdue_DAYS.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_CalOverdue_DAYS.cs new file mode 100644 index 0000000..492bb07 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_CalOverdue_DAYS.cs @@ -0,0 +1,56 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_CalOverdue_DAYS + { + public int? 安全天数 { get; set; } + public int? 在库天数 { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string 箱号 { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string 所在库位 { get; set; } + + [StringLength(50)] + public string 物料号 { get; set; } + + [StringLength(50)] + public string 描述一 { get; set; } + [StringLength(50)] + public string 描述二 { get; set; } + + [StringLength(50)] + public string 批次 { get; set; } + + [StringLength(50)] + public string 项目号 { get; set; } + + [StringLength(50)] + public string 供应商 { get; set; } + + + public decimal 数量 { get; set; } + + public DateTime 入库日期 { get; set; } + + [StringLength(50)] + public string 产品品种 { get; set; } + [StringLength(50)] + public string 保管员 { get; set; } + + public int 有效期 { get; set; } + [Column(TypeName = "date")] + public DateTime 生产日期 { get; set; } + + [Column(TypeName = "date")] + public DateTime 过期日期 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_DELIVER_PICK_SUM.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_DELIVER_PICK_SUM.cs new file mode 100644 index 0000000..e3a18ad --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_DELIVER_PICK_SUM.cs @@ -0,0 +1,35 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_DELIVER_PICK_SUM + { + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string BillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string PartCode { get; set; } + + [StringLength(50)] + public string CustPartCode { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string ToLocCode { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string Batch { get; set; } + + [Key] + [Column(Order = 4, TypeName = "money")] + public decimal Qty { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_DELIVER_PLAN.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_DELIVER_PLAN.cs new file mode 100644 index 0000000..8addf5f --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_DELIVER_PLAN.cs @@ -0,0 +1,50 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_DELIVER_PLAN + { + [Key] + public int UID { get; set; } + + [StringLength(50)] + public string 单据号 { get; set; } + + [StringLength(50)] + public string 零件号 { get; set; } + + [StringLength(50)] + public string 目标位置 { get; set; } + + [StringLength(50)] + public string 目标库位 { get; set; } + + [StringLength(50)] + public string 客户零件号 { get; set; } + + public decimal 数量 { get; set; } + + + + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + + public DateTime 截止时间 { get; set; } + [StringLength(50)] + public string 运输方式 { get; set; } + [StringLength(50)] + public string 车牌号 { get; set; } + [StringLength(50)] + public string 收货门号 { get; set; } + [StringLength(50)] + public string 收货门名称 { get; set; } + [StringLength(50)] + public string 收货口号 { get; set; } + + [StringLength(200)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_EQPT_LOAD.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_EQPT_LOAD.cs new file mode 100644 index 0000000..4ff35e1 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_EQPT_LOAD.cs @@ -0,0 +1,54 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_EQPT_LOAD + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 器具号 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 箱号 { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(50)] + public string 物料号 { get; set; } + + [Key] + [Column(Order = 6)] + [StringLength(20)] + public string 批次 { get; set; } + + [Key] + [Column(Order = 7)] + [StringLength(50)] + public string 库位号 { get; set; } + + [Key] + [Column(Order = 8, TypeName = "money")] + public decimal 数量 { get; set; } + + [StringLength(200)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_INSPECT.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_INSPECT.cs new file mode 100644 index 0000000..a222eeb --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_INSPECT.cs @@ -0,0 +1,106 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_INSPECT + { + [NotMapped] + public string 检验结果 => ((InspectResult) InspResult).ToString(); + + [Key] + [Column(Order = 11, TypeName = "money")] + public decimal 报检数 { get; set; } + + + [Key] + [Column(Order = 13, TypeName = "money")] + public decimal 合格数 { get; set; } + + [Key] + [Column(Order = 14, TypeName = "money")] + public decimal 不合格数 { get; set; } + [StringLength(50)] + public string 不合格原因 { get; set; } + + [Key] + [Column(Order = 15, TypeName = "money")] + public decimal 破坏数 { get; set; } + [Key] + [Column(Order = 0)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 订单号 { get; set; } + + [Key] + [Column(Order = 4)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 订单行 { get; set; } + + [Key] + [Column(Order = 5)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 检验类型 { get; set; } + + [Key] + [Column(Order = 6)] + [StringLength(50)] + public string 箱号 { get; set; } + + [Key] + [Column(Order = 7)] + [StringLength(50)] + public string 库位号 { get; set; } + + [Key] + [Column(Order = 8)] + [StringLength(50)] + public string 物料号 { get; set; } + + public string 描述一 { get; set; } + + public string 描述二 { get; set; } + + [Key] + [Column(Order = 9)] + [StringLength(50)] + public string 批次 { get; set; } + + [Key] + [Column(Order = 10, TypeName = "money")] + public decimal 收货数 { get; set; } + + + [Key] + [Column(Order = 12, TypeName = "money")] + public decimal 样本数 { get; set; } + + + [StringLength(50)] + public string 供应商编号 { get; set; } + + [StringLength(200)] + public string 供应商批次 { get; set; } + + public string 备注 { get; set; } + public string 项目编号 { get; set; } + public string 单位 { get; set; } + public int InspResult { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_INTERFACE.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_INTERFACE.cs new file mode 100644 index 0000000..ff412dc --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_INTERFACE.cs @@ -0,0 +1,48 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_INTERFACE + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 接口类型 { get; set; } + + [Key] + [Column(Order = 3)] + public string 接口文本 { get; set; } + + [StringLength(500)] + public string 备注 { get; set; } + + [Key] + [Column(Order = 4)] + public DateTime 创建时间 { get; set; } + + [Key] + [Column(Order = 5)] + public DateTime 执行时间 { get; set; } + + [Key] + [Column(Order = 6)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 7)] + [StringLength(50)] + public string 单据类型 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_INTERFACE_HIS.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_INTERFACE_HIS.cs new file mode 100644 index 0000000..c0835f8 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_INTERFACE_HIS.cs @@ -0,0 +1,48 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_INTERFACE_HIS + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 接口类型 { get; set; } + + [Key] + [Column(Order = 3)] + public string 接口文本 { get; set; } + + [StringLength(500)] + public string 备注 { get; set; } + + [Key] + [Column(Order = 4)] + public DateTime 创建时间 { get; set; } + + [Key] + [Column(Order = 5)] + public DateTime 执行时间 { get; set; } + + [Key] + [Column(Order = 6)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 7)] + [StringLength(50)] + public string 单据类型 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_INVENTORY_DETAIL.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_INVENTORY_DETAIL.cs new file mode 100644 index 0000000..e45f9e4 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_INVENTORY_DETAIL.cs @@ -0,0 +1,101 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_INVENTORY_DETAIL + { + [Key] + [Column(Order = 0)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int UID { get; set; } + + [Key] + [Column(Order = 1, TypeName = "money")] + public decimal 差异数 { get; set; } + + [Column(TypeName = "money")] + public decimal? 差异率 { get; set; } + + public decimal? 差异金额 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 标签号 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 物料号 { get; set; } + + public string 描述一 { get; set; } + + public string 描述二 { get; set; } + + [StringLength(50)] + public string 物料类型 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 批次 { get; set; } + + [Key] + [Column(Order = 5)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 物料状态 { get; set; } + + public decimal? 成本价格 { get; set; } + + [Key] + [Column(Order = 6)] + [StringLength(50)] + public string 账面库位 { get; set; } + + [Key] + [Column(Order = 7)] + [StringLength(50)] + public string 盘点库位 { get; set; } + + [Key] + [Column(Order = 8, TypeName = "money")] + public decimal 账面数 { get; set; } + + [Key] + [Column(Order = 9, TypeName = "money")] + public decimal 初盘数 { get; set; } + + [Key] + [Column(Order = 10, TypeName = "money")] + public decimal 重盘数 { get; set; } + + [Key] + [Column(Order = 11, TypeName = "money")] + public decimal 入库数 { get; set; } + + [Key] + [Column(Order = 12, TypeName = "money")] + public decimal 出库数 { get; set; } + + [Key] + [Column(Order = 13)] + [StringLength(50)] + public string 盘点时间 { get; set; } + + [Key] + [Column(Order = 14)] + [StringLength(50)] + public string 操作员 { get; set; } + + [Key] + [Column(Order = 15)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 16)] + [StringLength(50)] + public string 单据库位 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_INVENTORY_LOC.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_INVENTORY_LOC.cs new file mode 100644 index 0000000..c07741f --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_INVENTORY_LOC.cs @@ -0,0 +1,54 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_INVENTORY_LOC + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 库位号 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 操作员 { get; set; } + + [Key] + [Column(Order = 5)] + public DateTime 操作时间 { get; set; } + + [StringLength(50)] + public string 初盘开始时间 { get; set; } + + [StringLength(50)] + public string 初盘结束时间 { get; set; } + + [StringLength(50)] + public string 重盘开始时间 { get; set; } + + [StringLength(50)] + public string 重盘结束时间 { get; set; } + + [Key] + [Column(Order = 6)] + [StringLength(500)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_MATERIAL_ASK.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_MATERIAL_ASK.cs new file mode 100644 index 0000000..9d51578 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_MATERIAL_ASK.cs @@ -0,0 +1,53 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_MATERIAL_ASK + { + [Key] + [Column(Order = 0)] +// [ScaffoldColumn(false)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 物料号 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 叫料位置 { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(50)] + public string 目标库位 { get; set; } + + [StringLength(50)] + public string 生产线 { get; set; } + + [Key] + [Column(Order = 6, TypeName = "money")] + public decimal 数量 { get; set; } + + [Key] + [Column(Order = 7)] + public DateTime 截止时间 { get; set; } + + [StringLength(200)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_MATERIAL_BACK.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_MATERIAL_BACK.cs new file mode 100644 index 0000000..bfe7f63 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_MATERIAL_BACK.cs @@ -0,0 +1,53 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_MATERIAL_BACK + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 箱号 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 物料号 { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(20)] + public string 批次 { get; set; } + + [StringLength(50)] + public string 来源库位 { get; set; } + + [StringLength(50)] + public string 目标库位 { get; set; } + + [Key] + [Column(Order = 6, TypeName = "money")] + public decimal 数量 { get; set; } + + [StringLength(50)] + public string 器具号 { get; set; } + + [StringLength(200)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_MATERIAL_RECEIVE.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_MATERIAL_RECEIVE.cs new file mode 100644 index 0000000..1d3c3db --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_MATERIAL_RECEIVE.cs @@ -0,0 +1,82 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_MATERIAL_RECEIVE + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 采购订单号 { get; set; } + + [Key] + [Column(Order = 4)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 订单行 { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(50)] + public string 箱号 { get; set; } + + [Key] + [Column(Order = 6)] + [StringLength(50)] + public string 物料号 { get; set; } + + [Key] + [Column(Order = 7)] + [StringLength(20)] + public string 批次 { get; set; } + + [StringLength(50)] + public string 供应商批次 { get; set; } + + [Key] + [Column(Order = 8)] + [StringLength(50)] + public string 来源库位 { get; set; } + + [Key] + [Column(Order = 9)] + [StringLength(50)] + public string 目标库位 { get; set; } + + [Key] + [Column(Order = 10, TypeName = "money")] + public decimal 数量 { get; set; } + + [StringLength(50)] + public string 器具号 { get; set; } + + [Key] + [Column(Order = 11, TypeName = "date")] + public DateTime 收货日期 { get; set; } + + [Key] + [Column(Order = 12, TypeName = "date")] + public DateTime 生产日期 { get; set; } + + [StringLength(50)] + public string 器具编号 { get; set; } + + [StringLength(200)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_MATERIAL_RETURN.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_MATERIAL_RETURN.cs new file mode 100644 index 0000000..b6fa199 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_MATERIAL_RETURN.cs @@ -0,0 +1,53 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_MATERIAL_RETURN + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 箱号 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 物料号 { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(20)] + public string 批次 { get; set; } + + [StringLength(50)] + public string 来源库位 { get; set; } + + [StringLength(50)] + public string 目标库位 { get; set; } + + [Key] + [Column(Order = 6, TypeName = "money")] + public decimal 数量 { get; set; } + + [StringLength(50)] + public string 器具号 { get; set; } + + [StringLength(200)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_NOTIFY.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_NOTIFY.cs new file mode 100644 index 0000000..7914cff --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_NOTIFY.cs @@ -0,0 +1,48 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_NOTIFY + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 提示类型 { get; set; } + + [Key] + [Column(Order = 4)] + public string 提示信息 { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(50)] + public string 创建人 { get; set; } + + [Key] + [Column(Order = 6)] + public DateTime 创建时间 { get; set; } + + [StringLength(50)] + public string 关闭人 { get; set; } + + [Key] + [Column(Order = 7)] + public DateTime 关闭时间 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_OM_PLAN.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_OM_PLAN.cs new file mode 100644 index 0000000..45f0df2 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_OM_PLAN.cs @@ -0,0 +1,52 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_OM_PLAN + { + [Key] + [Column(Order = 0)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 物料号 { get; set; } + + [StringLength(50)] + public string 委外商 { get; set; } + + [Key] + [Column(Order = 4, TypeName = "money")] + public decimal 计划数 { get; set; } + + [Key] + [Column(Order = 5, TypeName = "money")] + public decimal 未完成数 { get; set; } + + [Key] + [Column(Order = 6, TypeName = "money")] + public decimal 完成数 { get; set; } + + [StringLength(50)] + public string 开始时间 { get; set; } + + [StringLength(50)] + public string 结束时间 { get; set; } + + [StringLength(50)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_OPER_LOG.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_OPER_LOG.cs new file mode 100644 index 0000000..b9dacb2 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_OPER_LOG.cs @@ -0,0 +1,39 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_OPER_LOG + { + [Key] + [Column(Order = 0)] + public long UID { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(80)] + public string 工号 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 操作员 { get; set; } + + [Key] + [Column(Order = 3)] + public DateTime 日志时间 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 日志类型 { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(200)] + public string 客户端 { get; set; } + + public string 日志信息 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_OTHER_INOUT.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_OTHER_INOUT.cs new file mode 100644 index 0000000..8b7d92e --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_OTHER_INOUT.cs @@ -0,0 +1,53 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_OTHER_INOUT + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 箱号 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 物料号 { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(20)] + public string 批次 { get; set; } + + [StringLength(50)] + public string 来源库位 { get; set; } + + [StringLength(50)] + public string 目标库位 { get; set; } + + [Key] + [Column(Order = 6, TypeName = "money")] + public decimal 数量 { get; set; } + + [StringLength(50)] + public string 器具号 { get; set; } + + [StringLength(200)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_PACK_UNPACK.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_PACK_UNPACK.cs new file mode 100644 index 0000000..ecb77be --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_PACK_UNPACK.cs @@ -0,0 +1,59 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_PACK_UNPACK + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 物料号 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(20)] + public string 批次 { get; set; } + + [Key] + [Column(Order = 5, TypeName = "money")] + public decimal 数量 { get; set; } + + [Key] + [Column(Order = 6)] + [StringLength(50)] + public string 来源标签号 { get; set; } + + [StringLength(50)] + public string 目标标签号 { get; set; } + + [StringLength(50)] + public string 来源库位 { get; set; } + + [StringLength(50)] + public string 目标库位 { get; set; } + + [StringLength(50)] + public string 来源器具号 { get; set; } + + [StringLength(50)] + public string 目标库位号 { get; set; } + + [StringLength(200)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_PICK_FACT.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_PICK_FACT.cs new file mode 100644 index 0000000..6a178af --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_PICK_FACT.cs @@ -0,0 +1,72 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_PICK_FACT + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 标签号 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 叫料位置 { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(50)] + public string 目标库位 { get; set; } + + [StringLength(50)] + public string 生产线 { get; set; } + + [Key] + [Column(Order = 6)] + [StringLength(50)] + public string 物料号 { get; set; } + + [Key] + [Column(Order = 7)] + [StringLength(50)] + public string 批次 { get; set; } + + [Key] + [Column(Order = 8, TypeName = "money")] + public decimal 数量 { get; set; } + + [Key] + [Column(Order = 9)] + [StringLength(50)] + public string 来源库位 { get; set; } + + [Key] + [Column(Order = 10)] + [StringLength(50)] + public string 拣货时间 { get; set; } + + [Key] + [Column(Order = 11)] + public DateTime 截止时间 { get; set; } + + [StringLength(200)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_PICK_PLAN.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_PICK_PLAN.cs new file mode 100644 index 0000000..10f7727 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_PICK_PLAN.cs @@ -0,0 +1,62 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_PICK_PLAN + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 叫料位置 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 物料号 { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(50)] + public string 批次 { get; set; } + + [Key] + [Column(Order = 6)] + [StringLength(50)] + public string 来源库位 { get; set; } + + [Key] + [Column(Order = 7)] + [StringLength(50)] + public string 目标库位 { get; set; } + + [StringLength(50)] + public string 生产线 { get; set; } + + [Key] + [Column(Order = 8, TypeName = "money")] + public decimal 数量 { get; set; } + + [Key] + [Column(Order = 9)] + public DateTime 截止时间 { get; set; } + + [StringLength(200)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_PO.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_PO.cs new file mode 100644 index 0000000..b72b81a --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_PO.cs @@ -0,0 +1,63 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_PO + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 单据类型 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 供应商 { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(50)] + public string 操作员 { get; set; } + + [Key] + [Column(Order = 6)] + public DateTime 单据时间 { get; set; } + + [StringLength(500)] + public string 备注 { get; set; } + + [StringLength(50)] + public string 订单类型 { get; set; } + + [StringLength(50)] + public string 联系人 { get; set; } + + [StringLength(50)] + public string 发往地点 { get; set; } + + [StringLength(50)] + public string 国内国外 { get; set; } + + [StringLength(50)] + public string 采购人 { get; set; } + + [StringLength(50)] + public string 采购人电话 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_PO_DETAIL.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_PO_DETAIL.cs new file mode 100644 index 0000000..d54599e --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_PO_DETAIL.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_PO_DETAIL + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 行号 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 物料号 { get; set; } + + [Key] + [Column(Order = 5, TypeName = "money")] + public decimal 订单数量 { get; set; } + + [Key] + [Column(Order = 6, TypeName = "money")] + public decimal 已收货数量 { get; set; } + + [Key] + [Column(Order = 7, TypeName = "money")] + public decimal 采购价格 { get; set; } + + [StringLength(50)] + public string 采购单位 { get; set; } + + [StringLength(50)] + public string 存储单位 { get; set; } + + [Column(TypeName = "date")] + public DateTime? 到期日 { get; set; } + + [StringLength(200)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_PRODUCE_PLAN.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_PRODUCE_PLAN.cs new file mode 100644 index 0000000..b9688af --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_PRODUCE_PLAN.cs @@ -0,0 +1,59 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_PRODUCE_PLAN + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 物料号 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 生产线 { get; set; } + + [Key] + [Column(Order = 5, TypeName = "money")] + public decimal 计划数 { get; set; } + + [Key] + [Column(Order = 6, TypeName = "money")] + public decimal 未完成数 { get; set; } + + [Key] + [Column(Order = 7, TypeName = "money")] + public decimal 完成数 { get; set; } + + [StringLength(50)] + public string 班组 { get; set; } + + [StringLength(50)] + public string 班次 { get; set; } + + [StringLength(50)] + public string 开始时间 { get; set; } + + [StringLength(50)] + public string 结束时间 { get; set; } + + [StringLength(50)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_PRODUCT_DETAIL.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_PRODUCT_DETAIL.cs new file mode 100644 index 0000000..b478374 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_PRODUCT_DETAIL.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_PRODUCT_DETAIL + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public long UID { get; set; } + + [StringLength(50)] + public string PartCode { get; set; } + + public decimal qty { get; set; } + + public System.DateTime? LogTime { get; set; } + + public string status { get; set; } + + [StringLength(50)] + public string VendId { get; set; } + + [NotMapped] + public DateTime? BeginTime { get; set; } + + [NotMapped] + public DateTime? EndTime { get; set; } + + [NotMapped] + public List<string> UserInVendIds { set; get; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_PRODUCT_RECEIVE.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_PRODUCT_RECEIVE.cs new file mode 100644 index 0000000..ba4f8b0 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_PRODUCT_RECEIVE.cs @@ -0,0 +1,75 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_PRODUCT_RECEIVE + { + [Key] + [Column(Order = 0)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [StringLength(50)] + public string 计划单号 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 箱号 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 物料号 { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(20)] + public string 批次 { get; set; } + + [Key] + [Column(Order = 6)] + [StringLength(50)] + public string 来源库位 { get; set; } + + [Key] + [Column(Order = 7)] + [StringLength(50)] + public string 目标库位 { get; set; } + + [Key] + [Column(Order = 8, TypeName = "money")] + public decimal 数量 { get; set; } + + [StringLength(50)] + public string 器具号 { get; set; } + + [StringLength(200)] + public string 备注 { get; set; } + + [Key] + [Column(Order = 9, TypeName = "date")] + public DateTime 生产日期 { get; set; } + + [StringLength(50)] + public string 生产线 { get; set; } + + [StringLength(50)] + public string 班次 { get; set; } + + [StringLength(50)] + public string 班组 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_PRODUCT_REPAIR.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_PRODUCT_REPAIR.cs new file mode 100644 index 0000000..dfb8a71 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_PRODUCT_REPAIR.cs @@ -0,0 +1,53 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_PRODUCT_REPAIR + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 箱号 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 物料号 { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(20)] + public string 批次 { get; set; } + + [StringLength(50)] + public string 来源库位 { get; set; } + + [StringLength(50)] + public string 目标库位 { get; set; } + + [Key] + [Column(Order = 6, TypeName = "money")] + public decimal 数量 { get; set; } + + [StringLength(50)] + public string 器具号 { get; set; } + + [StringLength(200)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_PRODUCT_RETURN.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_PRODUCT_RETURN.cs new file mode 100644 index 0000000..31098fc --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_PRODUCT_RETURN.cs @@ -0,0 +1,53 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_PRODUCT_RETURN + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 箱号 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 物料号 { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(20)] + public string 批次 { get; set; } + + [StringLength(50)] + public string 来源库位 { get; set; } + + [StringLength(50)] + public string 目标库位 { get; set; } + + [Key] + [Column(Order = 6, TypeName = "money")] + public decimal 数量 { get; set; } + + [StringLength(50)] + public string 器具号 { get; set; } + + [StringLength(200)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_PRODUCT_SELL.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_PRODUCT_SELL.cs new file mode 100644 index 0000000..e811665 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_PRODUCT_SELL.cs @@ -0,0 +1,58 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_PRODUCT_SELL + { + [Key] + [Column(Order = 0)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 销售订单号 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 箱号 { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(50)] + public string 物料号 { get; set; } + + [Key] + [Column(Order = 6)] + [StringLength(50)] + public string 批次 { get; set; } + + [Key] + [Column(Order = 7)] + [StringLength(50)] + public string 来源库位 { get; set; } + + [Key] + [Column(Order = 8, TypeName = "money")] + public decimal 数量 { get; set; } + + [StringLength(50)] + public string 器具号 { get; set; } + + [StringLength(200)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_SEQ_DETAIL.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_SEQ_DETAIL.cs new file mode 100644 index 0000000..4ca14d4 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_SEQ_DETAIL.cs @@ -0,0 +1,34 @@ +using System.ComponentModel.DataAnnotations; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_SEQ_DETAIL + { + [Key] + public long UID { get; set; } + + public string 状态 { get; set; } + + [StringLength(50)] + public string 单据号 { get; set; } + + [StringLength(50)] + public string 发运单号 { get; set; } + [StringLength(50)] + public string 批次 { get; set; } + + [StringLength(50)] + public string 物料号 { get; set; } + + public decimal 数量 { get; set; } + + public string 库位 { get; set; } + public string 箱码 { get; set; } + [StringLength(50)] + public string 项目编码 { get; set; } + [StringLength(50)] + public string 客户零件号 { get; set; } + [StringLength(50)] + public string 货架号 { get; set; } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_SO.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_SO.cs new file mode 100644 index 0000000..dd0b224 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_SO.cs @@ -0,0 +1,43 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_SO + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 单据类型 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(200)] + public string 客户 { get; set; } + + [StringLength(50)] + public string 操作员 { get; set; } + + [Key] + [Column(Order = 5)] + public DateTime 单据时间 { get; set; } + + [StringLength(50)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_SORT_BILL.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_SORT_BILL.cs new file mode 100644 index 0000000..feeca2c --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_SORT_BILL.cs @@ -0,0 +1,41 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_SORT_BILL + { + [Key] + [Column(Order = 0)] + public long UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 创建人 { get; set; } + + [Key] + [Column(Order = 4)] + public DateTime 创建时间 { get; set; } + + [StringLength(50)] + public string 执行人 { get; set; } + + [Key] + [Column(Order = 5)] + public DateTime 执行时间 { get; set; } + + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_SORT_DETAIL.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_SORT_DETAIL.cs new file mode 100644 index 0000000..ef97416 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_SORT_DETAIL.cs @@ -0,0 +1,42 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_SORT_DETAIL + { + [Key] + [Column(Order = 0)] + public long UID { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string VIN码 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 序列号 { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(50)] + public string 物料号 { get; set; } + + [Key] + [Column(Order = 6)] + [StringLength(50)] + public string 项目编码 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_SO_DETAIL.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_SO_DETAIL.cs new file mode 100644 index 0000000..4c598a4 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_SO_DETAIL.cs @@ -0,0 +1,50 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_SO_DETAIL + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 3)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 行号 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 物料号 { get; set; } + + [Key] + [Column(Order = 5, TypeName = "money")] + public decimal 订单数量 { get; set; } + + [Key] + [Column(Order = 6, TypeName = "money")] + public decimal 已发货数量 { get; set; } + + [StringLength(50)] + public string 单位 { get; set; } + + [Key] + [Column(Order = 7, TypeName = "money")] + public decimal 价格 { get; set; } + + [StringLength(200)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_STOCK.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_STOCK.cs new file mode 100644 index 0000000..f86c78c --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_STOCK.cs @@ -0,0 +1,66 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; +using CK.SCP.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_STOCK + { + [NotMapped] + public string 状态 => ((StockState)State).ToString(); + + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string 物料号 { get; set; } + + + public string 描述1 { get; set; } + + public string 描述2 { get; set; } + + [Key] + [Column(TypeName = "money",Order=1)] + public decimal? 数量 { get; set; } + + [StringLength(50)] + public string 单位 { get; set; } + + [StringLength(50)] + public string 库区 { get; set; } + +// [Key] +// [Column(Order = 0)] +// [StringLength(50)] +// public string 库位 { get; set; } + + [Key] + [StringLength(50)] + [Column(Order = 2)] + public string 供应商 { get; set; } + + [StringLength(50)] + public string 项目 { get; set; } + + [StringLength(50)] + public string 类型 { get; set; } + + [StringLength(50)] + public string 种类 { get; set; } + + [Column(TypeName = "money")] + public decimal? 最大库存 { get; set; } + + [Column(TypeName = "money")] + public decimal? 最小库存 { get; set; } + + [Column(TypeName = "money")] + public decimal? 安全库存 { get; set; } + + [Key] + [Column(Order = 3)] + public int State { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_STOCKDETAIL_DAYS.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_STOCKDETAIL_DAYS.cs new file mode 100644 index 0000000..d86206e --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_STOCKDETAIL_DAYS.cs @@ -0,0 +1,59 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_STOCKDETAIL_DAYS + { + + + public int? 在库天数 { get; set; } + public int? 安全天数 { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string 箱号 { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string 所在库位 { get; set; } + + [StringLength(50)] + public string 物料号 { get; set; } + + [StringLength(50)] + public string 描述一 { get; set; } + [StringLength(50)] + public string 描述二 { get; set; } + + [StringLength(50)] + public string 批次 { get; set; } + + [StringLength(50)] + public string 项目号 { get; set; } + + [StringLength(50)] + public string 供应商 { get; set; } + + + public decimal 数量 { get; set; } + + public DateTime 入库日期 { get; set; } + + [StringLength(50)] + public string 产品品种 { get; set; } + [StringLength(50)] + public string 保管员 { get; set; } + + public int 有效期 { get; set; } + [Column(TypeName = "date")] + public DateTime 生产日期 { get; set; } + + [Column(TypeName = "date")] + public DateTime 过期日期 { get; set; } + + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_STOCK_DETAIL.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_STOCK_DETAIL.cs new file mode 100644 index 0000000..73f029e --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_STOCK_DETAIL.cs @@ -0,0 +1,84 @@ +namespace ChangKeTec.Wms.Models.Wms +{ + /* + public partial class VIEW_STOCK_DETAIL + { + [Key] + [Column(Order = 0)] + public long UID { get; set; } + + [NotMapped] + public string 状态 => ((StockState)State).ToString(); + + [StringLength(50)] + public string 物料号 { get; set; } + + [StringLength(50)] + public string 描述一 { get; set; } + + [StringLength(50)] + public string 描述二 { get; set; } + + [StringLength(50)] + public string 批次 { get; set; } + + [StringLength(50)] + public string 供应商批次 { get; set; } + + + + [StringLength(50)] + public string 单位 { get; set; } + + [Column(TypeName = "money")] + public decimal 数量 { get; set; } + + [StringLength(500)] + public string 备注 { get; set; } + + [StringLength(50)] + public string 库区 { get; set; } + + [StringLength(50)] + public string 库位 { get; set; } + + [StringLength(50)] + public string 箱码 { get; set; } + [StringLength(50)] + public string 项目编号 { get; set; } + + [StringLength(50)] + public string 供应商 { get; set; } + + + public DateTime 接收日期 { get; set; } + + public DateTime 生产日期 { get; set; } + + public DateTime 失效日期 { get; set; } + + public DateTime 更新时间 { get; set; } + + [Column(TypeName = "money")] + public decimal 更新数量 { get; set; } + + [StringLength(50)] + public string 追溯号 { get; set; } + + + [StringLength(50)] + public string 器具号 { get; set; } + + [StringLength(50)] + public string 计划顺序号 { get; set; } + + [Column(TypeName = "money")] + public decimal 价格 { get; set; } + + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int VIN状态 { get; set; } + + public int State { get; set; } + } + */ +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_STOCK_DETAIL_SUM.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_STOCK_DETAIL_SUM.cs new file mode 100644 index 0000000..58f8beb --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_STOCK_DETAIL_SUM.cs @@ -0,0 +1,32 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_STOCK_DETAIL_SUM + { + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string 库位 { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public string 零件号 { get; set; } + + [StringLength(50)] + public string 批次 { get; set; } + + [Key] + [Column(Order = 2, TypeName = "money")] + public decimal 库存数量 { get; set; } + + [StringLength(100)] + public string 零件描述1 { get; set; } + + [StringLength(100)] + public string 零件描述2 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_STOCK_FREEZE.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_STOCK_FREEZE.cs new file mode 100644 index 0000000..da9cc99 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_STOCK_FREEZE.cs @@ -0,0 +1,36 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_STOCK_FREEZE + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 库位 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 物料号 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 批次 { get; set; } + + [Key] + [Column(Order = 5, TypeName = "money")] + public decimal 数量 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_STOCK_GROUP.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_STOCK_GROUP.cs new file mode 100644 index 0000000..12166fc --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_STOCK_GROUP.cs @@ -0,0 +1,40 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_STOCK_GROUP + { + [Key] + [StringLength(50)] + public string 物料号 { get; set; } + + public string 物料描述一 { get; set; } + + public string 物料描述二 { get; set; } + + [StringLength(50)] + public string 项目编号 { get; set; } + + [StringLength(50)] + public string 物料种类 { get; set; } + + [StringLength(50)] + public string 物料类型 { get; set; } + + [StringLength(50)] + public string 单位 { get; set; } + + [Column(TypeName = "money")] + public decimal? 最大库存 { get; set; } + + [Column(TypeName = "money")] + public decimal? 最小库存 { get; set; } + + [Column(TypeName = "money")] + public decimal? 安全库存 { get; set; } + + [Column(TypeName = "money")] + public decimal? 当前库存 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_STOCK_MOVE.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_STOCK_MOVE.cs new file mode 100644 index 0000000..41ccd12 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_STOCK_MOVE.cs @@ -0,0 +1,79 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; +using CK.SCP.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_STOCK_MOVE + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + public string 原状态 => ((StockState) 来源状态).ToString(); + public string 新状态 => ((StockState)目标状态).ToString(); + [Key] + [Column(Order = 3)] + [StringLength(50)] +// [DisplayName("hahaha")] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(50)] + public string 箱号 { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(50)] + public string 物料号 { get; set; } + + //public string 物料描述 => GlobalCache.GetPartDesc(物料号); + + [Key] + [Column(Order = 6)] + [StringLength(20)] + public string 来源批次 { get; set; } + + [StringLength(20)] + public string 目标批次 { get; set; } + + [Key] + [Column(Order = 7)] + [StringLength(50)] + public string 来源库位 { get; set; } + + [Key] + [Column(Order = 8)] + [StringLength(50)] + public string 目标库位 { get; set; } + + [Key] + [Column(Order = 9, TypeName = "money")] + public decimal 数量 { get; set; } + + [StringLength(50)] + public string 器具号 { get; set; } + + [StringLength(200)] + public string 备注 { get; set; } + + [StringLength(50)] + public string 供应商编号 { get; set; } + + [StringLength(50)] + public string 供应商批次 { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + + public int 来源状态 { get; set; } + + [Key] + [Column(Order = 2)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 目标状态 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_STOCK_VEND.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_STOCK_VEND.cs new file mode 100644 index 0000000..9a8ca76 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_STOCK_VEND.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_STOCK_VEND + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public long UID { get; set; } + + [StringLength(50)] + public string PartCode { get; set; } + [StringLength(50)] + public string PartDesc1 { get; set; } + + public decimal qty { get; set; } + + public string VendId { get; set; } + + [NotMapped] + public List<string> UserInVendIds { set; get; } + + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_STORE_WHSE.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_STORE_WHSE.cs new file mode 100644 index 0000000..619fee9 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_STORE_WHSE.cs @@ -0,0 +1,40 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VIEW_STORE_WHSE + { + [Key] + [Column(Order = 0)] + public int UID { get; set; } + + [Key] + [Column(Order = 1)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 状态 { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string 仓库编号 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 仓库名称 { get; set; } + + [Key] + [Column(Order = 4)] + [StringLength(200)] + public string 仓库地址 { get; set; } + + [Key] + [Column(Order = 5)] + [StringLength(50)] + public string 仓库类型 { get; set; } + + [StringLength(500)] + public string 备注 { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VIEW_TRANSACTION.cs b/北京北汽/SCP/Models/WmsEntity/VIEW_TRANSACTION.cs new file mode 100644 index 0000000..67f2aa5 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VIEW_TRANSACTION.cs @@ -0,0 +1,91 @@ +namespace ChangKeTec.Wms.Models.Wms +{ + /* + public partial class VIEW_TRANSACTION + { + [Key] + [Column(Order = 0)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public long UID { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(80)] + public string 操作员 { get; set; } + + [Key] + [Column(Order = 2)] + public DateTime 日志时间 { get; set; } + + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string 单据号 { get; set; } + + [Key] + [Column(Order = 4)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public int 单据类型 { get; set; } + + [NotMapped] + public string 单据类型名称 => EnumHelper.GetDescription((BillType) 单据类型); + + [Key] + [Column(Order = 5)] + [StringLength(50)] + public string 箱号 { get; set; } + + [Key] + [Column(Order = 6)] + [StringLength(50)] + public string 物料号 { get; set; } + + [StringLength(50)] + public string 描述一 { get; set; } + [StringLength(50)] + public string 描述二 { get; set; } + + [Key] + [Column(Order = 7)] + [StringLength(50)] + public string 批次 { get; set; } + + [Key] + [Column(Order = 8, TypeName = "money")] + public decimal 数量 { get; set; } + + [Key] + [Column(Order = 9)] + [StringLength(50)] + public string 库位 { get; set; } + + [StringLength(50)] + public string 器具号 { get; set; } + [StringLength(50)] + public string 供应商编号 { get; set; } + + public int? 单据子类型 { get; set; } + + [StringLength(50)] + public string 供应商名称 { get; set; } + [StringLength(50)] + public string 供应商批次 { get; set; } + [StringLength(500)] + public string 备注 { get; set; } + + [StringLength(50)] + public string 库区 { get; set; } + + [NotMapped] + public string 库区名称 + { + get + { + StoreArea area; + Enum.TryParse(库区, true, out area); + return EnumHelper.GetDescription(area); + } + } + } + */ +} diff --git a/北京北汽/SCP/Models/WmsEntity/VS_STOCK.cs b/北京北汽/SCP/Models/WmsEntity/VS_STOCK.cs new file mode 100644 index 0000000..0d84895 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VS_STOCK.cs @@ -0,0 +1,71 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VS_STOCK + { + + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string PartCode { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string Batch { get; set; } + + [Key] + [Column(Order = 2)] + [StringLength(50)] + public string LocCode { get; set; } + + [Key] + [Column(Order = 3)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public EnumStockState State { get; set; } + + [Key] + [Column(TypeName = "money" ,Order=4)] + public decimal? Qty { get; set; } + + public string PartDesc1 { get; set; } + + public string PartDesc2 { get; set; } + + [StringLength(50)] + public string ProjectId { get; set; } + + [StringLength(50)] + public string Unit { get; set; } + + [StringLength(50)] + public string PartType { get; set; } + + [StringLength(50)] + public string PartKind { get; set; } + + [Key] + [StringLength(50)] + [Column(Order = 5)] + public string VendId { get; set; } + + [Column(TypeName = "money")] + public decimal? MaxQty { get; set; } + + [Column(TypeName = "money")] + public decimal? MinQty { get; set; } + + [Column(TypeName = "money")] + public decimal? SafeQty { get; set; } + + [StringLength(50)] + public string ErpLocCode { get; set; } + + [StringLength(50)] + public string AreaCode { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VS_STOCK_CONVERSION.cs b/北京北汽/SCP/Models/WmsEntity/VS_STOCK_CONVERSION.cs new file mode 100644 index 0000000..146d5f5 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VS_STOCK_CONVERSION.cs @@ -0,0 +1,42 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VS_STOCK_CONVERSION + { + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + //[Key] + //[Column(Order = 1)] + //[StringLength(50)] + //public string Batch { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("λ")] + public string LocCode { get; set; } + [DisplayName("һ")] + public string PartDesc1 { get; set; } + [DisplayName("")] + public string PartDesc2 { get; set; } + [DisplayName("1")] + public decimal? Qty { get; set; } + [DisplayName("λ1")] + public string Unit { get; set; } + [DisplayName("2")] + public decimal? Qty2 { get; set; } + + [DisplayName("λ2")] + public string Unit2 { get; set; } + [DisplayName("ת")] + public decimal? Conversion { get; set; } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/VS_STOCK_DETAIL.cs b/北京北汽/SCP/Models/WmsEntity/VS_STOCK_DETAIL.cs new file mode 100644 index 0000000..afe82a7 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/VS_STOCK_DETAIL.cs @@ -0,0 +1,126 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using ChangKeTec.Wms.Models.Enums; + + +namespace ChangKeTec.Wms.Models.Wms +{ + public partial class VS_STOCK_DETAIL + { + [DatabaseGenerated(DatabaseGeneratedOption.Computed)] + public long UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + [DisplayName("")] + public string BarCode { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + [DisplayName("λ")] + public string LocCode { get; set; } + + + [Key] + [Column(Order = 2)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + [DisplayName("״̬")] + public EnumStockState State { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("Ϻ")] + public string PartCode { get; set; } + + [Required(AllowEmptyStrings = true)] + [StringLength(50)] + [DisplayName("")] + public string Batch { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + + public decimal Qty { get; set; } + + [StringLength(50)] + [Required(AllowEmptyStrings = true)] + [DisplayName("Ӧ̱")] + public string VendId { get; set; } = ""; + + [DisplayName("Ӧ")] + public string VendName { get; set; } + + [StringLength(50)] + [Required(AllowEmptyStrings = true)] + [DisplayName("Ӧ")] + public string VendBatch { get; set; } = ""; + + [DisplayName("һ")] + public string PartDesc1 { get; set; } + + [DisplayName("")] + public string PartDesc2 { get; set; } + + [DisplayName("Ŀ")] + public string ProjectId { get; set; } + + [DisplayName("λ")] + public string Unit { get; set; } + + [StringLength(50)] + [DisplayName("")] + public string AreaCode { get; set; } + + [DisplayName("ERPλ")] + public string ErpLocCode { get; set; } + + [StringLength(50)] + [Required(AllowEmptyStrings = true)] + [DisplayName("ߺ")] + public string EqptCode { get; set; } = ""; + + [StringLength(50)] + + public string PlanOrderId { get; set; } + + + [Column(TypeName = "money")] + + public decimal Amount { get; set; } + + + [DisplayName("ջʱ")] + public DateTime ReceiveDate { get; set; } + + [Column(TypeName = "date")] + [DisplayName("")] + public DateTime ProduceDate { get; set; } + + [Column(TypeName = "date")] + [DisplayName("ʧЧ")] + public DateTime OverdueDate { get; set; } + + [DisplayName("ʱ")] + public DateTime UpdateTime { get; set; } + + [Column(TypeName = "money")] + [DisplayName("")] + public decimal UpdateQty { get; set; } + + [StringLength(50)] + [DisplayName("׷ݱ")] + public string TracebackCode { get; set; } + + + public int VinState { get; set; } + + [StringLength(500)] + [DisplayName("ע")] + public string Remark { get; set; } + + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsEntity/WmsEntities.cs b/北京北汽/SCP/Models/WmsEntity/WmsEntities.cs new file mode 100644 index 0000000..a50443e --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/WmsEntities.cs @@ -0,0 +1,997 @@ +using System.Data.Entity.Infrastructure; +using System.Data.Entity; +using CK.SCP.Models; + +namespace ChangKeTec.Wms.Models.Wms +{ + + [DbConfigurationType(typeof(SqlDbConfiguration))] + public partial class WmsEntities : DbContext + { + public WmsEntities(string strConn) + : base(strConn) + { + } + public WmsEntities() + : base("name=ModelWms") + { + // Database.SetInitializer(new CreateDatabaseIfNotExists<WmsEntities>()); + } + + public virtual DbSet<VIEW_PRODUCT_DETAIL> VIEW_PRODUCT_DETAIL { get; set; } + public virtual DbSet<VIEW_STOCK_VEND> VIEW_STOCK_VEND { get; set; } + public virtual DbSet<TA_BILLTYPE> TA_BILLTYPE { get; set; } + public virtual DbSet<TA_BOM> TA_BOM { get; set; } + public virtual DbSet<TA_CELL> TA_CELL { get; set; } + public virtual DbSet<TA_CELL1> TA_CELL1 { get; set; } + public virtual DbSet<TA_CELL_PART> TA_CELL_PART { get; set; } + public virtual DbSet<TA_CONFIG> TA_CONFIG { get; set; } + public virtual DbSet<TA_CUST_BOM> TA_CUST_BOM { get; set; } + public virtual DbSet<TA_CUST_PART> TA_CUST_PART { get; set; } + public virtual DbSet<TA_CUSTOMER> TA_CUSTOMER { get; set; } + public virtual DbSet<TA_DELIVER_DEST> TA_DELIVER_DEST { get; set; } + public virtual DbSet<TA_ERP_LOC> TA_ERP_LOC { get; set; } + public virtual DbSet<TA_ERP_STANDARD_COST> TA_ERP_STANDARD_COST { get; set; } + public virtual DbSet<TA_PART> TA_PART { get; set; } + public virtual DbSet<TA_PART_UNIT_CONVERSION> TA_PART_UNIT_CONVERSION { get; set; } + public virtual DbSet<TA_PAYMENT_DAY> TA_PAYMENT_DAY { get; set; } + public virtual DbSet<TA_PURCHASE_PRICE> TA_PURCHASE_PRICE { get; set; } + public virtual DbSet<TA_SALE_PRICE> TA_SALE_PRICE { get; set; } + public virtual DbSet<TA_STORE_GROUP> TA_STORE_GROUP { get; set; } + public virtual DbSet<TA_STORE_LOCATION> TA_STORE_LOCATION { get; set; } + public virtual DbSet<TA_STORE_WHSE> TA_STORE_WHSE { get; set; } + public virtual DbSet<TA_TEAM> TA_TEAM { get; set; } + public virtual DbSet<TA_VEND_PART> TA_VEND_PART { get; set; } + public virtual DbSet<TA_VENDER> TA_VENDER { get; set; } + public virtual DbSet<TA_WORKLINE> TA_WORKLINE { get; set; } + public virtual DbSet<TA_DEST_LOC> TA_DEST_LOC { get; set; } + public virtual DbSet<TB_BILL> TB_BILL { get; set; } + public virtual DbSet<TB_CONTAINER_INOUT> TB_CONTAINER_INOUT { get; set; } + public virtual DbSet<TB_DELIVER_ASK> TB_DELIVER_ASK { get; set; } + public virtual DbSet<TB_DELIVER_PLAN> TB_DELIVER_PLAN { get; set; } + public virtual DbSet<TB_DETAIL> TB_DETAIL { get; set; } + public virtual DbSet<TB_INSPECT> TB_INSPECT { get; set; } + public virtual DbSet<TB_INSPECT_FAIL> TB_INSPECT_FAIL { get; set; } + public virtual DbSet<TB_CHECK_DETAIL> TB_CHECK_DETAIL { get; set; } + public virtual DbSet<TB_CHECK> TB_CHECK { get; set; } + public virtual DbSet<TB_CHECK_LOC> TB_CHECK_LOC { get; set; } + public virtual DbSet<TB_MATERIAL_ASK> TB_MATERIAL_ASK { get; set; } + public virtual DbSet<TB_MATERIAL_RECEIVE> TB_MATERIAL_RECEIVE { get; set; } + public virtual DbSet<TB_MATERIAL_RETURN> TB_MATERIAL_RETURN { get; set; } + public virtual DbSet<TB_OTHER_INOUT> TB_OTHER_INOUT { get; set; } + public virtual DbSet<TB_OTHER_INOUT_SHEET> TB_OTHER_INOUT_SHEET { get; set; } + public virtual DbSet<TB_OFFICE_OUT> TB_OFFICE_OUT { get; set; } + public virtual DbSet<TB_OFFICE_RECIVE> TB_OFFICE_RECIVE { get; set; } + public virtual DbSet<TB_PACK_UNPACK> TB_PACK_UNPACK { get; set; } + public virtual DbSet<TB_PICK_FACT> TB_PICK_FACT { get; set; } + public virtual DbSet<TB_PICK_PLAN> TB_PICK_PLAN { get; set; } + public virtual DbSet<TB_PRODUCE_PLAN> TB_PRODUCE_PLAN { get; set; } + public virtual DbSet<TB_PRODUCT_RECEIVE> TB_PRODUCT_RECEIVE { get; set; } + public virtual DbSet<TB_PRODUCT_REPAIR> TB_PRODUCT_REPAIR { get; set; } +// public virtual DbSet<TB_PRODUCT_RETURN> TB_PRODUCT_RETURN { get; set; } + public virtual DbSet<TB_PRODUCT_SELL> TB_PRODUCT_SELL { get; set; } + public virtual DbSet<TB_STOCK_MOVE> TB_STOCK_MOVE { get; set; } + public virtual DbSet<TF_ASN> TF_ASN { get; set; } + public virtual DbSet<TF_ASN_DETAIL> TF_ASN_DETAIL { get; set; } + public virtual DbSet<TF_PO> TF_PO { get; set; } + public virtual DbSet<TF_PO_DETAIL> TF_PO_DETAIL { get; set; } + public virtual DbSet<TF_SO> TF_SO { get; set; } + public virtual DbSet<TF_SO_DETAIL> TF_SO_DETAIL { get; set; } + public virtual DbSet<TL_BASEDATA> TL_BASEDATA { get; set; } + public virtual DbSet<TL_INTERFACE> TL_INTERFACE { get; set; } + public virtual DbSet<TL_BILL> TL_BILL { get; set; } + public virtual DbSet<TL_EXCEPTION> TL_EXCEPTION { get; set; } + public virtual DbSet<TL_OPER> TL_OPER { get; set; } + public virtual DbSet<TL_TRANSACTION> TL_TRANSACTION { get; set; } + public virtual DbSet<TR_BALANCE_COMPARE> TR_BALANCE_COMPARE { get; set; } + public virtual DbSet<TR_BALANCE_COMPARE_PART> TR_BALANCE_COMPARE_PART { get; set; } + public virtual DbSet<TR_BALANCE_COMPARE_VIN> TR_BALANCE_COMPARE_VIN { get; set; } +// public virtual DbSet<TR_SCM> TR_SCM { get; set; } + public virtual DbSet<TS_BARCODE> TS_BARCODE { get; set; } + public virtual DbSet<TS_BARCODE_RULE> TS_BARCODE_RULE { get; set; } + public virtual DbSet<TS_CONTAINER> TS_CONTAINER { get; set; } + public virtual DbSet<TS_EQUIPMENT> TS_EQUIPMENT { get; set; } + public virtual DbSet<TS_EQUIPMENT_BARCODE> TS_EQUIPMENT_BARCODE { get; set; } + public virtual DbSet<TS_ERP_STOCK> TS_ERP_STOCK { get; set; } + public virtual DbSet<TS_NOTIFY> TS_NOTIFY { get; set; } +// public virtual DbSet<TS_SORT_BILL> TS_SORT_BILL { get; set; } + public virtual DbSet<TS_SORT_DETAIL> TS_SORT_DETAIL { get; set; } + public virtual DbSet<TS_SEQ_DETAIL> TS_SEQ_DETAIL { get; set; } + public virtual DbSet<TS_STOCK_DETAIL> TS_STOCK_DETAIL { get; set; } + public virtual DbSet<TS_STOCK_CUST> TS_STOCK_CUST { get; set; } + public virtual DbSet<VS_STOCK_DETAIL> VS_STOCK_DETAIL { get; set; } + public virtual DbSet<TM_CQBMPT_PART_RELATION> TM_CQBMPT_PART_RELATION { get; set; } + public virtual DbSet<TM_CQBMPT_SCAN_LOG> TM_CQBMPT_SCAN_LOG { get; set; } + public virtual DbSet<TM_CQBMPT_INJECTION_RAW_TANK> TM_CQBMPT_INJECTION_RAW_TANK { get; set; } + public virtual DbSet<TM_CQBMPT_INJECTION_MACHINE> TM_CQBMPT_INJECTION_MACHINE { get; set; } + public virtual DbSet<TM_CQBMPT_INJECTION_REPORT> TM_CQBMPT_INJECTION_REPORT { get; set; } + public virtual DbSet<TM_CQBMPT_TRACEBACK> TM_CQBMPT_TRACEBACK { get; set; } + public virtual DbSet<TM_CQBMPT_PAINT_FAILEDREASON> TM_CQBMPT_PAINT_FAILEDREASON { get; set; } + public virtual DbSet<TM_CQBMPT_PRODUCE_PLAN> TM_CQBMPT_PRODUCE_PLAN { get; set; } + //public virtual DbSet<TM_CQBMPT_RECEIVE_DETAIL> TM_CQBMPT_RECEIVE_DETAIL { get; set; } + public virtual DbSet<TM_CQBMPT_AQLSTANDARD> TM_CQBMPT_AQLSTANDARD { get; set; } + public virtual DbSet<TM_TJANTOLIN_PRODUCE_PLAN> TM_TJANTOLIN_PRODUCE_PLAN { get; set; } + public virtual DbSet<TM_TJANTOLIN_MATERIAL_INIT> TM_TJANTOLIN_MATERIAL_INIT { get; set; } + public virtual DbSet<TM_TJANTOLIN_ASK> TM_TJANTOLIN_ASK { get; set; } + public virtual DbSet<TM_TJANTOLIN_PICK> TM_TJANTOLIN_PICK { get; set; } + public virtual DbSet<TS_VIN_STOCK> TS_VIN_STOCK { get; set; } + public virtual DbSet<TS_STOCK_FREEZE> TS_STOCK_FREEZE { get; set; } + public virtual DbSet<TS_TRACEBACK> TS_TRACEBACK { get; set; } + public virtual DbSet<TS_TRACEBACK_MATERIAL> TS_TRACEBACK_MATERIAL { get; set; } + public virtual DbSet<TS_UNI_API> TS_UNI_API { get; set; } + public virtual DbSet<TS_UNI_API_HIS> TS_UNI_API_HIS { get; set; } + public virtual DbSet<TS_UNKNOW_CUSTPART> TS_UNKNOW_CUSTPART { get; set; } + public virtual DbSet<TS_VIN> TS_VIN { get; set; } + public virtual DbSet<TS_VIN_HIS> TS_VIN_HIS { get; set; } + public virtual DbSet<TS_VIN_PART> TS_VIN_PART { get; set; } + public virtual DbSet<TS_VIN_PART_MOVE> TS_VIN_PART_MOVE { get; set; } + public virtual DbSet<EDI_ASN_DETAIL> EDI_ASN_DETAIL { get; set; } + public virtual DbSet<TT_CONTAINER_TYPE> TT_CONTAINER_TYPE { get; set; } + public virtual DbSet<TT_CURRENCY> TT_CURRENCY { get; set; } + public virtual DbSet<TT_FAIL_TYPE> TT_FAIL_TYPE { get; set; } + public virtual DbSet<TT_PROJECT> TT_PROJECT { get; set; } + public virtual DbSet<TT_SHIFT> TT_SHIFT { get; set; } + public virtual DbSet<TT_PART_GROUP> TT_PART_GROUP { get; set; } + public virtual DbSet<TA_OTHER_INOUT_REASON> TA_OTHER_INOUT_REASON { get; set; } + public virtual DbSet<TT_UNIT> TT_UNIT { get; set; } + public virtual DbSet<TB_EQPT_LOAD> TB_EQPT_LOAD { get; set; } + public virtual DbSet<TB_OM_PLAN> TB_OM_PLAN { get; set; } + public virtual DbSet<TA_PARTGROUP_INSPECTER> TA_PARTGROUP_INSPECTER { get; set; } + // public virtual DbSet<VB_INSPECT> VB_INSPECT { get; set; } + // public virtual DbSet<VB_STOCK_MOVE> VB_STOCK_MOVE { get; set; } + // public virtual DbSet<VIEW_ASN> VIEW_ASN { get; set; } + // public virtual DbSet<VIEW_ASN_DETAIL> VIEW_ASN_DETAIL { get; set; } + // public virtual DbSet<VIEW_BASEDATA_LOG> VIEW_BASEDATA_LOG { get; set; } + // public virtual DbSet<VIEW_BILL> VIEW_BILL { get; set; } + // public virtual DbSet<VIEW_BILL_LOG> VIEW_BILL_LOG { get; set; } + public virtual DbSet<VIEW_CalOverdue_DAYS> VIEW_CalOverdue_DAYS { get; set; } + // public virtual DbSet<VIEW_DELIVER_PLAN> VIEW_DELIVER_PLAN { get; set; } + // public virtual DbSet<VIEW_EQPT_LOAD> VIEW_EQPT_LOAD { get; set; } + // public virtual DbSet<VIEW_INSPECT> VIEW_INSPECT { get; set; } + // public virtual DbSet<VIEW_INTERFACE> VIEW_INTERFACE { get; set; } + // public virtual DbSet<VIEW_INTERFACE_HIS> VIEW_INTERFACE_HIS { get; set; } + // public virtual DbSet<VIEW_MATERIAL_ASK> VIEW_MATERIAL_ASK { get; set; } + // public virtual DbSet<VIEW_MATERIAL_BACK> VIEW_MATERIAL_BACK { get; set; } + // public virtual DbSet<VIEW_MATERIAL_RECEIVE> VIEW_MATERIAL_RECEIVE { get; set; } + // public virtual DbSet<VIEW_MATERIAL_RETURN> VIEW_MATERIAL_RETURN { get; set; } + // public virtual DbSet<VIEW_NOTIFY> VIEW_NOTIFY { get; set; } + // public virtual DbSet<VIEW_OM_PLAN> VIEW_OM_PLAN { get; set; } + // public virtual DbSet<VIEW_OPER_LOG> VIEW_OPER_LOG { get; set; } + // public virtual DbSet<VIEW_OTHER_INOUT> VIEW_OTHER_INOUT { get; set; } + // public virtual DbSet<VIEW_PACK_UNPACK> VIEW_PACK_UNPACK { get; set; } + // public virtual DbSet<VIEW_PICK_FACT> VIEW_PICK_FACT { get; set; } + // public virtual DbSet<VIEW_PICK_PLAN> VIEW_PICK_PLAN { get; set; } + // public virtual DbSet<VIEW_PO> VIEW_PO { get; set; } + // public virtual DbSet<VIEW_PO_DETAIL> VIEW_PO_DETAIL { get; set; } + // public virtual DbSet<VIEW_PRODUCE_PLAN> VIEW_PRODUCE_PLAN { get; set; } + // public virtual DbSet<VIEW_PRODUCT_RECEIVE> VIEW_PRODUCT_RECEIVE { get; set; } + // public virtual DbSet<VIEW_PRODUCT_REPAIR> VIEW_PRODUCT_REPAIR { get; set; } + // public virtual DbSet<VIEW_PRODUCT_RETURN> VIEW_PRODUCT_RETURN { get; set; } + // public virtual DbSet<VIEW_PRODUCT_SELL> VIEW_PRODUCT_SELL { get; set; } + // public virtual DbSet<VIEW_SO> VIEW_SO { get; set; } + // public virtual DbSet<VIEW_SO_DETAIL> VIEW_SO_DETAIL { get; set; } + // public virtual DbSet<VIEW_SORT_BILL> VIEW_SORT_BILL { get; set; } + // public virtual DbSet<VIEW_SORT_DETAIL> VIEW_SORT_DETAIL { get; set; } + // public virtual DbSet<VIEW_SEQ_DETAIL> VIEW_SEQ_DETAIL { get; set; } + // public virtual DbSet<VIEW_STOCK> VIEW_STOCK { get; set; } + // public virtual DbSet<VIEW_STOCK_DETAIL> VIEW_STOCK_DETAIL { get; set; } + // public virtual DbSet<VIEW_STOCK_FREEZE> VIEW_STOCK_FREEZE { get; set; } + public virtual DbSet<VIEW_STOCK_GROUP> VIEW_STOCK_GROUP { get; set; } + // public virtual DbSet<VIEW_STOCK_MOVE> VIEW_STOCK_MOVE { get; set; } + public virtual DbSet<VIEW_STOCKDETAIL_DAYS> VIEW_STOCKDETAIL_DAYS { get; set; } +// public virtual DbSet<VIEW_STOCK_DETAIL_SUM> VIEW_STOCK_DETAIL_SUM { get; set; } + // public virtual DbSet<VIEW_STORE_WHSE> VIEW_STORE_WHSE { get; set; } + // public virtual DbSet<VIEW_TRANSACTION> VIEW_TRANSACTION { get; set; } + public virtual DbSet<VS_STOCK> VS_STOCK { get; set; } + public virtual DbSet<VIEW_DELIVER_PICK_SUM> VIEW_DELIVER_PICK_SUM { get; set; } + public virtual DbSet<TS_LINE_ROTATE> TS_LINE_ROTATE { get; set; } + public virtual DbSet<VS_STOCK_CONVERSION> VS_STOCK_CONVERSION { get; set; } + + public virtual DbSet<TS_PART_WHSE_STOCK> TS_PART_WHSE_STOCK { get; set; } + + public virtual DbSet<VIEW_CQWKSAFEQTY> VIEW_CQWKSAFEQTY { get; set; } + + protected override void OnModelCreating(DbModelBuilder modelBuilder) + { + modelBuilder.Conventions.Add(new DecimalPrecisionAttributeConvention()); + base.OnModelCreating(modelBuilder); + + modelBuilder.Entity<TA_BILLTYPE>() + .Property(e => e.Sep) + .IsUnicode(false); + + modelBuilder.Entity<TA_BOM>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TA_CUST_BOM>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TA_CUST_PART>() + .Property(e => e.CustPackQty) + .HasPrecision(18, 5); + + modelBuilder.Entity<TA_CUST_PART>() + .Property(e => e.CustPalletCapacity) + .HasPrecision(19, 4); + + modelBuilder.Entity<TA_ERP_STANDARD_COST>() + .Property(e => e.StandardCost) + .HasPrecision(18, 5); + + modelBuilder.Entity<TA_PART>() + .Property(e => e.State) + .IsUnicode(false); + + modelBuilder.Entity<TA_PART>() + .Property(e => e.MaxQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TA_PART>() + .Property(e => e.MinQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TA_PART>() + .Property(e => e.SafeQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TA_PART>() + .Property(e => e.ContainerQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TA_PART>() + .Property(e => e.StockPackQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TA_PART>() + .Property(e => e.LinesidePackQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TA_PART>() + .Property(e => e.SamplePercent) + .HasPrecision(19, 4); + + modelBuilder.Entity<TA_PART>() + .Property(e => e.SingleWeight) + .HasPrecision(19, 4); + modelBuilder.Entity<TA_PART_UNIT_CONVERSION>() + .Property(e => e.Conversion) + .HasPrecision(19, 4); + + // modelBuilder.Entity<TA_PAYMENT_DAY>() + // .Property(e => e.BillYear) + // .IsUnicode(false); + // + // modelBuilder.Entity<TA_PAYMENT_DAY>() + // .Property(e => e.BillMonth) + // .IsUnicode(false); + // + // modelBuilder.Entity<TA_PAYMENT_DAY>() + // .Property(e => e.BillDay) + // .IsUnicode(false); + // + // modelBuilder.Entity<TA_PAYMENT_DAY>() + // .Property(e => e.BillHour) + // .IsUnicode(false); + + modelBuilder.Entity<TA_PURCHASE_PRICE>() + .Property(e => e.Price) + .HasPrecision(19, 4); + + modelBuilder.Entity<TA_SALE_PRICE>() + .Property(e => e.Price) + .HasPrecision(19, 4); + + modelBuilder.Entity<TA_STORE_LOCATION>() + .Property(e => e.StoredPercent) + .HasPrecision(19, 4); + + modelBuilder.Entity<TA_VEND_PART>() + .Property(e => e.VendPackQty) + .HasPrecision(18, 5); + + modelBuilder.Entity<TA_VENDER>() + .Property(e => e.VendAbbCode) + .IsUnicode(false); + + modelBuilder.Entity<TB_DELIVER_ASK>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_DETAIL>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_INSPECT>() + .Property(e => e.ReceiveQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_INSPECT>() + .Property(e => e.InspQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_INSPECT>() + .Property(e => e.SampleQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_INSPECT>() + .Property(e => e.PassQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_INSPECT>() + .Property(e => e.FailQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_INSPECT>() + .Property(e => e.CrackQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_INSPECT_FAIL>() + .Property(e => e.FailQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_CHECK_DETAIL>() + .Property(e => e.BookQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_CHECK_DETAIL>() + .Property(e => e.CheckQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_CHECK_DETAIL>() + .Property(e => e.ReCheckQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_MATERIAL_ASK>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_MATERIAL_RECEIVE>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_MATERIAL_RETURN>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_OTHER_INOUT>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_PACK_UNPACK>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_PICK_FACT>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_PICK_PLAN>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_PRODUCE_PLAN>() + .Property(e => e.PlanQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_PRODUCE_PLAN>() + .Property(e => e.OpenQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_PRODUCE_PLAN>() + .Property(e => e.ClosedQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_PRODUCT_RECEIVE>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_PRODUCT_REPAIR>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + + modelBuilder.Entity<TB_PRODUCT_SELL>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_STOCK_MOVE>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TF_ASN_DETAIL>() + .Property(e => e.BillQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TF_ASN_DETAIL>() + .Property(e => e.ClosedQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TF_ASN_DETAIL>() + .Property(e => e.Price) + .HasPrecision(19, 4); + + modelBuilder.Entity<TF_PO_DETAIL>() + .Property(e => e.BillQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TF_PO_DETAIL>() + .Property(e => e.ClosedQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TF_PO_DETAIL>() + .Property(e => e.PackQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TF_PO_DETAIL>() + .Property(e => e.Price) + .HasPrecision(19, 4); + + modelBuilder.Entity<TF_SO_DETAIL>() + .Property(e => e.BillQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TF_SO_DETAIL>() + .Property(e => e.ClosedQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TF_SO_DETAIL>() + .Property(e => e.Price) + .HasPrecision(19, 4); + + modelBuilder.Entity<TL_BASEDATA>() + .Property(e => e.LogType) + .IsUnicode(false); + + modelBuilder.Entity<TL_BASEDATA>() + .Property(e => e.DataType) + .IsUnicode(false); + + modelBuilder.Entity<TL_OPER>() + .Property(e => e.LogType) + .IsUnicode(false); + + modelBuilder.Entity<TL_TRANSACTION>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TR_BALANCE_COMPARE_PART>() + .Property(e => e.SendPrice) + .HasPrecision(19, 4); + + modelBuilder.Entity<TR_BALANCE_COMPARE_PART>() + .Property(e => e.BalancePrice) + .HasPrecision(19, 4); + + modelBuilder.Entity<TR_BALANCE_COMPARE_PART>() + .Property(e => e.DiffPrice) + .HasPrecision(19, 4); + + modelBuilder.Entity<TR_BALANCE_COMPARE_PART>() + .Property(e => e.SendQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TR_BALANCE_COMPARE_PART>() + .Property(e => e.BalanceQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TR_BALANCE_COMPARE_PART>() + .Property(e => e.DiffQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TR_BALANCE_COMPARE_PART>() + .Property(e => e.SendAmount) + .HasPrecision(19, 4); + + modelBuilder.Entity<TR_BALANCE_COMPARE_PART>() + .Property(e => e.BalanceAmount) + .HasPrecision(19, 4); + + modelBuilder.Entity<TR_BALANCE_COMPARE_PART>() + .Property(e => e.DiffAmount) + .HasPrecision(19, 4); + + modelBuilder.Entity<TR_BALANCE_COMPARE_VIN>() + .Property(e => e.SendQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TR_BALANCE_COMPARE_VIN>() + .Property(e => e.BalanceQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TR_BALANCE_COMPARE_VIN>() + .Property(e => e.DiffQty) + .HasPrecision(19, 4); + + /* modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.BarCode) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.FullBarCode) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.PartCode) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.VendPartCode) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.CustPartCode) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.Batch) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.SerialNum) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.EnumPartKind) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.BillNum) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.VendId) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.EqptCode) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.EqptType) + .IsUnicode(false); + + modelBuilder.Entity<TS_BARCODE>() + .Property(e => e.UpdateQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TS_EQUIPMENT>() + .Property(e => e.EqptCode) + .IsUnicode(false); + */ + + modelBuilder.Entity<TS_EQUIPMENT_BARCODE>() + .Property(e => e.BarCode) + .IsUnicode(false); + + modelBuilder.Entity<TS_EQUIPMENT_BARCODE>() + .Property(e => e.FullBarCode) + .IsUnicode(false); + + modelBuilder.Entity<TS_EQUIPMENT_BARCODE>() + .Property(e => e.PartCode) + .IsUnicode(false); + + modelBuilder.Entity<TS_EQUIPMENT_BARCODE>() + .Property(e => e.VendPartCode) + .IsUnicode(false); + + modelBuilder.Entity<TS_EQUIPMENT_BARCODE>() + .Property(e => e.CustPartCode) + .IsUnicode(false); + + modelBuilder.Entity<TS_EQUIPMENT_BARCODE>() + .Property(e => e.Batch) + .IsUnicode(false); + + modelBuilder.Entity<TS_EQUIPMENT_BARCODE>() + .Property(e => e.SerialNum) + .IsUnicode(false); + + modelBuilder.Entity<TS_EQUIPMENT_BARCODE>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TS_EQUIPMENT_BARCODE>() + .Property(e => e.PartKind) + .IsUnicode(false); + + modelBuilder.Entity<TS_EQUIPMENT_BARCODE>() + .Property(e => e.BillNum) + .IsUnicode(false); + + modelBuilder.Entity<TS_EQUIPMENT_BARCODE>() + .Property(e => e.VendId) + .IsUnicode(false); + + modelBuilder.Entity<TS_EQUIPMENT_BARCODE>() + .Property(e => e.EqptCode) + .IsUnicode(false); + + modelBuilder.Entity<TS_EQUIPMENT_BARCODE>() + .Property(e => e.EqptType) + .IsUnicode(false); + + modelBuilder.Entity<TS_EQUIPMENT_BARCODE>() + .Property(e => e.UpdateQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TS_EQUIPMENT_BARCODE>() + .Property(e => e.EachWeight) + .HasPrecision(19, 4); + + modelBuilder.Entity<TS_EQUIPMENT_BARCODE>() + .Property(e => e.BinSize) + .IsUnicode(false); + + modelBuilder.Entity<TS_ERP_STOCK>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TM_CQBMPT_AQLSTANDARD>() + .Property(e => e.AQL) + .HasPrecision(19, 4); + + /* modelBuilder.Entity<TS_INTERFACE>() + .Property(e => e.BillNum) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE>() + .Property(e => e.EnumBillType) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE>() + .Property(e => e.p01) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE>() + .Property(e => e.p02) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE>() + .Property(e => e.p03) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE>() + .Property(e => e.p04) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE>() + .Property(e => e.p05) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE>() + .Property(e => e.p06) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE>() + .Property(e => e.p07) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE>() + .Property(e => e.p08) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE>() + .Property(e => e.p09) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE>() + .Property(e => e.p10) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE>() + .Property(e => e.p11) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE>() + .Property(e => e.p12) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE>() + .Property(e => e.p13) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE>() + .Property(e => e.p14) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE>() + .Property(e => e.p15) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE>() + .Property(e => e.p16) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE>() + .Property(e => e.p17) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE>() + .Property(e => e.p18) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE>() + .Property(e => e.p19) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE>() + .Property(e => e.p20) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE_HIS>() + .Property(e => e.BillNum) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE_HIS>() + .Property(e => e.EnumBillType) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE_HIS>() + .Property(e => e.p01) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE_HIS>() + .Property(e => e.p02) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE_HIS>() + .Property(e => e.p03) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE_HIS>() + .Property(e => e.p04) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE_HIS>() + .Property(e => e.p05) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE_HIS>() + .Property(e => e.p06) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE_HIS>() + .Property(e => e.p07) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE_HIS>() + .Property(e => e.p08) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE_HIS>() + .Property(e => e.p09) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE_HIS>() + .Property(e => e.p10) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE_HIS>() + .Property(e => e.p11) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE_HIS>() + .Property(e => e.p12) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE_HIS>() + .Property(e => e.p13) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE_HIS>() + .Property(e => e.p14) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE_HIS>() + .Property(e => e.p15) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE_HIS>() + .Property(e => e.p16) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE_HIS>() + .Property(e => e.p17) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE_HIS>() + .Property(e => e.p18) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE_HIS>() + .Property(e => e.p19) + .IsUnicode(false); + + modelBuilder.Entity<TS_INTERFACE_HIS>() + .Property(e => e.p20) + .IsUnicode(false); + */ +// modelBuilder.Entity<TS_STOCK_DETAIL>() +// .Property(e => e.Qty) +// .HasPrecision(19, 4); + + modelBuilder.Entity<TS_STOCK_DETAIL>() + .Property(e => e.Amount) + .HasPrecision(19, 4); + + modelBuilder.Entity<TS_STOCK_DETAIL>() + .Property(e => e.UpdateQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TS_STOCK_FREEZE>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TS_TRACEBACK>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TS_TRACEBACK_MATERIAL>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TS_TRACEBACK_MATERIAL>() + .Property(e => e.SubQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TS_UNI_API>() + .Property(e => e.FromErpLoc) + .IsUnicode(false); + + modelBuilder.Entity<TS_UNI_API>() + .Property(e => e.ToErpLoc) + .IsUnicode(false); + + modelBuilder.Entity<TS_UNI_API>() + .Property(e => e.Qty) + .HasPrecision(18, 5); + + modelBuilder.Entity<TS_UNI_API_HIS>() + .Property(e => e.FromErpLoc) + .IsUnicode(false); + + modelBuilder.Entity<TS_UNI_API_HIS>() + .Property(e => e.ToErpLoc) + .IsUnicode(false); + + modelBuilder.Entity<TS_UNI_API_HIS>() + .Property(e => e.Qty) + .HasPrecision(18, 5); + + modelBuilder.Entity<TS_VIN_PART>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TS_VIN_PART>() + .Property(e => e.UnitPrice) + .HasPrecision(19, 4); + + modelBuilder.Entity<TS_VIN_PART>() + .Property(e => e.Amount) + .HasPrecision(19, 4); + + modelBuilder.Entity<TS_VIN_PART_MOVE>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + + modelBuilder.Entity<TB_EQPT_LOAD>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_OM_PLAN>() + .Property(e => e.PlanQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_OM_PLAN>() + .Property(e => e.OpenQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<TB_OM_PLAN>() + .Property(e => e.ClosedQty) + .HasPrecision(19, 4); + + // modelBuilder.Entity<VB_INSPECT>() + // .Property(e => e.ReceiveQty) + // .HasPrecision(19, 4); + // + // modelBuilder.Entity<VB_INSPECT>() + // .Property(e => e.InspQty) + // .HasPrecision(19, 4); + // + // modelBuilder.Entity<VB_INSPECT>() + // .Property(e => e.SampleQty) + // .HasPrecision(19, 4); + // + // modelBuilder.Entity<VB_INSPECT>() + // .Property(e => e.PassQty) + // .HasPrecision(19, 4); + // + // modelBuilder.Entity<VB_INSPECT>() + // .Property(e => e.FailQty) + // .HasPrecision(19, 4); + // + // modelBuilder.Entity<VB_INSPECT>() + // .Property(e => e.CrackQty) + // .HasPrecision(19, 4); + + + modelBuilder.Entity<VIEW_CalOverdue_DAYS>() + .Property(e => e.数量) + .HasPrecision(19, 4); + + + + // modelBuilder.Entity<VIEW_OM_PLAN>() + // .Property(e => e.计划数) + // .HasPrecision(19, 4); + // + // modelBuilder.Entity<VIEW_OM_PLAN>() + // .Property(e => e.未完成数) + // .HasPrecision(19, 4); + // + // modelBuilder.Entity<VIEW_OM_PLAN>() + // .Property(e => e.完成数) + // .HasPrecision(19, 4); + + + + modelBuilder.Entity<VIEW_STOCK_GROUP>() + .Property(e => e.最大库存) + .HasPrecision(19, 4); + + modelBuilder.Entity<VIEW_STOCK_GROUP>() + .Property(e => e.最小库存) + .HasPrecision(19, 4); + + modelBuilder.Entity<VIEW_STOCK_GROUP>() + .Property(e => e.安全库存) + .HasPrecision(19, 4); + + modelBuilder.Entity<VIEW_STOCK_GROUP>() + .Property(e => e.当前库存) + .HasPrecision(19, 4); + + modelBuilder.Entity<VIEW_STOCKDETAIL_DAYS>() + .Property(e => e.数量) + .HasPrecision(19, 4); + + // modelBuilder.Entity<VIEW_TRANSACTION>() + // .Property(e => e.数量) + // .HasPrecision(19, 4); + + modelBuilder.Entity<VS_STOCK>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + + modelBuilder.Entity<VS_STOCK>() + .Property(e => e.MaxQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<VS_STOCK>() + .Property(e => e.MinQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<VS_STOCK>() + .Property(e => e.SafeQty) + .HasPrecision(19, 4); + + modelBuilder.Entity<VS_STOCK_CONVERSION>() + .Property(e => e.Qty) + .HasPrecision(19, 4); + modelBuilder.Entity<VS_STOCK_CONVERSION>() + .Property(e => e.Qty2) + .HasPrecision(19, 4); + modelBuilder.Entity<VS_STOCK_CONVERSION>() + .Property(e => e.Conversion) + .HasPrecision(19, 2); + } + } +} diff --git a/北京北汽/SCP/Models/WmsEntity/WmsExtention.cs b/北京北汽/SCP/Models/WmsEntity/WmsExtention.cs new file mode 100644 index 0000000..61abad4 --- /dev/null +++ b/北京北汽/SCP/Models/WmsEntity/WmsExtention.cs @@ -0,0 +1,1449 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using ChangKeTec.Wms.Models.Enums; +using CK.SCP.Models; +using CK.SCP.Models.Enums; + +namespace ChangKeTec.Wms.Models.Wms +{ + + public partial class TB_INSPECT + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + } + + public partial class TB_CHECK_DETAIL + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + } + + public partial class TB_PICK_FACT + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + public TB_MATERIAL_RECEIVE ToMaterialReceive(TF_PO_DETAIL poDetail) + { + + + var part = WmsCache.GetPart(PartCode); + if (part == null) + { + throw new WmsException(ErrorCode.DataNotFound, PartCode, "零件号未找到"); + } + return new TB_MATERIAL_RECEIVE + { + BarCode = BarCode, + PartCode = PartCode, + Batch = Batch, + FromLocCode = FromLocCode, + ToLocCode = ToLocCode, + Qty = Qty, + State = State, + VendBatch = VendBatch, + PoBillNum = poDetail.BillNum, + PoLineNum = poDetail.LineNum, + PoUnit = poDetail.PoUnit, + LocUnit = part.Unit + }; + } + + public TB_STOCK_MOVE ToStockMove() + { + var part = WmsCache.GetPart(PartCode); + if (part == null) + { + throw new WmsException(ErrorCode.DataNotFound, PartCode, "零件号未找到"); + } + return new TB_STOCK_MOVE + { + BillNum = BillNum, + BarCode = BarCode, + PartCode = PartCode, + FromBatch = Batch, + ToBatch = Batch, + FromLocCode = FromLocCode, + ToLocCode = ToLocCode, + Qty = Qty, + FromState = State, + ToState = State, + VendBatch = VendBatch, + VendId = VendId, + FromEqptCode = EqptCode, + ToEqptCode = "" + }; + } + + + public TB_STOCK_MOVE ToStockMove(string asnNumb, EnumStockState toState) + { + var part = WmsCache.GetPart(PartCode); + if (part == null) + { + throw new WmsException(ErrorCode.DataNotFound, PartCode, "零件号未找到"); + } + return new TB_STOCK_MOVE + { + BillNum= BillNum, + BarCode = BarCode, + PartCode = PartCode, + FromBatch = Batch, + ToBatch = asnNumb, + FromLocCode = FromLocCode, + ToLocCode = ToLocCode, + Qty = Qty, + FromState = State, + ToState = toState, + VendBatch = VendBatch, + VendId = VendId, + FromEqptCode = EqptCode, + ToEqptCode = "", + ToBarCode = BarCode.Substring(0,BarCode.IndexOf('.')+1) + asnNumb + }; + } + + + } + + public partial class TB_PICK_INVOICE + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + + } + + public partial class TB_MATERIAL_BACK + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + public TB_STOCK_MOVE ToStockMove() + { + + return new TB_STOCK_MOVE + { + BarCode = BarCode, + PartCode = PartCode, + FromBatch = FromBatch, + ToBatch = ToBatch,//TODO 来源批次为空批 + FromLocCode = FromLocCode, + ToLocCode = ToLocCode, + Qty = Qty, + FromEqptCode = EqptCode, + ToEqptCode = EqptCode, + FromState = State, + ToState = State, + // Unit = WmsCache.GetUnit(this.PartCode), + // ProduceDate = this.ProduceDate, + VendBatch = VendBatch, + VendId = VendId + }; + + } + } + + public partial class TB_MATERIAL_RETURN + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + public TS_STOCK_DETAIL ToStockDetailOut(TB_BILL bill) + { + return new TS_STOCK_DETAIL + { + BarCode = BarCode, + PartCode = PartCode, + + Batch = Batch, + EqptCode = EqptCode, + LocCode = FromLocCode, + AreaCode = WmsCache.GetAreaCode(FromLocCode), + Qty = Qty, + UpdateQty = -Qty, //出库更新数量为负 + VendId = bill.VendId, + State = State, + ProduceDate = ProduceDate, + OverdueDate = ProduceDate.AddDays(WmsCache.GetValidateDays(PartCode)), + VendBatch = VendBatch + }; + } + } + + public partial class TB_PRODUCT_REPAIR + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + public TB_STOCK_MOVE ToStockMove() + { + + return new TB_STOCK_MOVE + { + BarCode = BarCode, + PartCode = PartCode, + FromBatch = Batch, + ToBatch = Batch, + FromLocCode = FromLocCode, + ToLocCode = ToLocCode, + Qty = Qty, + FromEqptCode = EqptCode, + ToEqptCode = EqptCode, + FromState = State, + ToState = State + // Unit = WmsCache.GetUnit(this.PartCode), + // ProduceDate = this.ProduceDate, + }; + + } + + public TS_STOCK_DETAIL ToStockDetailIn(WmsEntities db,string partcode, EnumStockState state) + { + var stockDetail = + db.TS_STOCK_DETAIL.SingleOrDefault( + p => p.BarCode == BarCode && p.PartCode == partcode && p.LocCode == ToLocCode && p.State == State); + if (stockDetail != null) + { + var detailIn = stockDetail.Clone(); + detailIn.Qty = Qty; + detailIn.UpdateQty = Qty; + detailIn.EqptCode = EqptCode; + return detailIn; + } + return new TS_STOCK_DETAIL + { + BarCode = BarCode, + PartCode = partcode, + Batch = Batch, + EqptCode = EqptCode, + LocCode = ToLocCode, + AreaCode = WmsCache.GetAreaCode(ToLocCode), + Qty = Qty, + UpdateQty = Qty, + State = state, + ReceiveDate = DateTime.Now, + Remark = PartCode, + }; + + } + } + + /* public partial class TB_PRODUCT_RETURN + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + public TS_STOCK_DETAIL ToStockDetailIn(TB_BILL bill) + { + return new TS_STOCK_DETAIL + { + BarCode = BarCode, + PartCode = PartCode, + + Batch = Batch, + EqptCode = EqptCode, + LocCode = ToLocCode, + AreaCode = WmsCache.GetAreaCode(ToLocCode), + Qty = Qty, + UpdateQty = Qty, + VendId = bill.VendId, + ProduceDate = ProduceDate, + OverdueDate = ProduceDate.AddDays(WmsCache.GetValidateDays(PartCode)), + State = EnumStockState.隔离 + }; + } + + public TB_STOCK_MOVE ToStockMove() + { + + return new TB_STOCK_MOVE + { + BarCode = BarCode, + PartCode = PartCode, + FromBatch = Batch, + ToBatch = Batch, + FromLocCode = FromLocCode, + ToLocCode = ToLocCode, + Qty = Qty, + FromEqptCode = EqptCode, + ToEqptCode = EqptCode, + FromState = State, + ToState = State + // Unit = WmsCache.GetUnit(this.PartCode), + // ProduceDate = this.ProduceDate, + }; + } + }*/ + + public partial class TB_OTHER_INOUT + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + public TS_STOCK_DETAIL ToStockDetailIn(TB_BILL bill) + { + var part = WmsCache.GetPart(PartCode); + if (part == null) + { + throw new WmsException(ErrorCode.DataNotFound, PartCode, "零件号未找到"); + } + return new TS_STOCK_DETAIL + { + BarCode = BarCode, + PartCode = PartCode, + + Batch = Batch, + EqptCode = EqptCode, + LocCode = ToLocCode, + AreaCode = WmsCache.GetAreaCode(ToLocCode), + Qty = Qty, + UpdateQty = Qty, + VendId = bill.VendId, + ProduceDate = ProduceDate, + OverdueDate = ProduceDate.AddDays(WmsCache.GetValidateDays(PartCode)), + State = State, + ReceiveDate = DateTime.Now, + VendBatch = Batch, + Remark = Remark + + }; + } + + public TS_STOCK_DETAIL ToStockDetailOut(TB_BILL bill) + { + return new TS_STOCK_DETAIL + { + BarCode = BarCode, + PartCode = PartCode, + + Batch = Batch, + EqptCode = EqptCode, + LocCode = FromLocCode, + AreaCode = WmsCache.GetAreaCode(FromLocCode), + Qty = Qty, + UpdateQty = -Qty, //出库更新数量为负 + VendId = bill.VendId, + ProduceDate = ProduceDate, + OverdueDate = ProduceDate.AddDays(WmsCache.GetValidateDays(PartCode)), + State = State, + ReceiveDate = DateTime.Now, + VendBatch = Batch + + }; + } + } + + public partial class TA_PAYMENT_DAY + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + } + + public partial class TS_VIN_PART + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + + + public TB_PRODUCT_SELL ToProductSell(string erpSoNum, TS_STOCK_DETAIL detail) + { + return new TB_PRODUCT_SELL + { + SoBillNum = erpSoNum, + BarCode = detail.BarCode + "." + CustPartCode, + PartCode = CustPartCode, + Batch = VinCode, + FromLocCode = detail.LocCode, + Qty = Qty, + EqptCode = detail.EqptCode, + State = VinState + }; + } + } + + public partial class TS_VIN_STOCK + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + public TS_VIN_STOCK Clone() + { + return new TS_VIN_STOCK + { + PartCode = PartCode, + VinCode = VinCode, + LocCode = LocCode, + ProjectId = ProjectId, + EqptCode = EqptCode, + PlanOrderId = PlanOrderId, + Qty = Qty, + Amount = Amount, + ReceiveDate = ReceiveDate, + SendDate = SendDate, + BalanceDate = BalanceDate, + VinState = VinState + }; + } + + public VinStockIn ToStockIn(decimal inQty, EnumStockState vinState) + { + return new VinStockIn + { + PartCode = PartCode, + VinCode = VinCode, + LocCode = LocCode, + InQty = inQty, + VinState = vinState, + TemplateDetail = this + }; + } + + public VinStockOut ToStockOut(decimal outQty) + { + return new VinStockOut + { + PartCode = PartCode, + VinCode = VinCode, + LocCode = LocCode, + OutQty = outQty, + VinState = VinState + }; + } + } + + public partial class TS_STOCK_DETAIL + { + // public EnumStockState StockState => (EnumStockState) State; + // + // public string DescStockState => EnumHelper.GetDesc(EnumStockState); + + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + public TS_VIN ToTsVinSell(string erpSoNum, string operName) + { + return new TS_VIN + { + CreateOper = operName, + CreateTime = DateTime.Now, + SourceId = erpSoNum, + EqptCode = EqptCode, + VinCode = Batch, + Batch = Batch, + Flag = 2, + PlanOrderId = PlanOrderId, + PartCode = PartCode, + ProjectId = WmsCache.GetProjectId(PartCode) + }; + } + + public TB_PRODUCT_SELL ToProductSell(string erpSoNum, decimal qty) + { + return new TB_PRODUCT_SELL + { + SoBillNum = erpSoNum, + BarCode = BarCode, + PartCode = PartCode, + Batch = Batch, + FromLocCode = LocCode, + Qty = qty, + EqptCode = EqptCode, + State = 0, + Remark = "" + }; + } + + public TB_CHECK_DETAIL ToCheckDetail(TB_CHECK_LOC locBill) + { + return new TB_CHECK_DETAIL + { + BillNum = locBill.BillNum, + BillLocCode = locBill.LocCode, + BookLocCode = locBill.LocCode, + CheckLocCode = "", + OperName = "", + BarCode = BarCode, + PartCode = PartCode, + Batch = Batch, + EqptCode = EqptCode??"", + BookQty = Qty, + CheckQty = 0, + ReCheckQty = 0, + CheckTime = WmsCache.GetServerTimeString(), + State = State, + VendId = VendId, + VendBatch = VendBatch, + ProduceDate = ProduceDate, + +// EnumCheckState = EnumCheckState.新增, + }; + } + + public TS_STOCK_DETAIL Clone() + { + return new TS_STOCK_DETAIL + { + BarCode = BarCode, + LocCode = LocCode, + AreaCode = AreaCode, + PartCode = PartCode, + Batch = Batch, + VendId = VendId, + EqptCode = EqptCode, + PlanOrderId = PlanOrderId, + State = State, + Qty = 0, + Amount = Amount, + ProduceDate = ProduceDate, + OverdueDate = OverdueDate, + UpdateTime = UpdateTime, + UpdateQty = 0, + TracebackCode = TracebackCode, + ReceiveDate = ReceiveDate, + VendBatch = VendBatch, + + VinState = VinState + }; + } + + public TS_STOCK_CUST ToCust() + { + return new TS_STOCK_CUST + { + BarCode = BarCode, + LocCode = LocCode, + AreaCode = AreaCode, + PartCode = PartCode, + Batch = Batch, + VendId = VendId, + EqptCode = EqptCode, + PlanOrderId = PlanOrderId, + State = State, + Qty = 0, + Amount = Amount, + ProduceDate = ProduceDate, + OverdueDate = OverdueDate, + UpdateTime = UpdateTime, + UpdateQty = 0, + TracebackCode = TracebackCode, + ReceiveDate = ReceiveDate, + VendBatch = VendBatch, + + VinState = VinState + }; + } + + + + public TB_STOCK_MOVE ToStockMove( EnumStockState toState) + { + return new TB_STOCK_MOVE + { BarCode = BarCode, + PartCode = PartCode, + FromBatch = Batch, + ToBatch = Batch, + FromLocCode = LocCode, + ToLocCode = LocCode, + Qty = Qty, + FromState = State, + ToState = toState, + VendBatch = VendBatch, + VendId = VendId, + FromEqptCode = EqptCode, + ToEqptCode = EqptCode, + ToBarCode = BarCode + }; + } + + + public StockIn ToStockIn(decimal inQty, EnumStockState state, string remark,EnumTransType transType) + { + return new StockIn + { + BarCode = BarCode, + PartCode = PartCode, + Batch = Batch, + LocCode = LocCode, + State = state, + InQty = inQty, + Remark = remark, + TemplateDetail = this, + TransType = transType + + }; + } + + + public StockOut ToStockOut(decimal outQty,EnumTransType transType) + { + return new StockOut + { + BarCode = BarCode, + PartCode = PartCode, + Batch = Batch, + LocCode = LocCode, + State = State, + OutQty = outQty, + TransType = transType + + }; + } + + public TS_STOCK_DETAIL ToNewStockDetail() + { + return new TS_STOCK_DETAIL + { + BarCode = PartCode, + LocCode = LocCode, + AreaCode = AreaCode, + PartCode = PartCode, + Batch = Batch, + VendId = VendId, + EqptCode = EqptCode, + PlanOrderId = PlanOrderId, + State = State, + Qty = 0, + Amount = Amount, + ProduceDate = ProduceDate, + OverdueDate = OverdueDate, + UpdateTime = UpdateTime, + UpdateQty = 0, + TracebackCode = TracebackCode, + ReceiveDate = ReceiveDate, + VendBatch = VendBatch, + + VinState = VinState + + }; + } + } + + public class EnumTransType + { + public static implicit operator TransType(EnumTransType v) + { + throw new NotImplementedException(); + } + } + + public partial class TB_BILL + { + + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + public TB_BILL ToInspectBill(EnumSubBillType subBillType) + { + return new TB_BILL + { + // BillNum = "IS."+this.BillNum, + SourceBillNum = BillNum, + SourceBillNum2 = SourceBillNum, + BillType = EnumBillType.Inspect, + OperName = OperName, + VendId = VendId, + SubBillType = subBillType, + GUID = Guid.NewGuid(), + }; + } + } + + public partial class TB_MATERIAL_RECEIVE + { + + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + public TS_STOCK_DETAIL ToStockDetailIn(TB_BILL bill) + { + var part = WmsCache.GetPart(PartCode); + if (part == null) + { + throw new WmsException(ErrorCode.DataNotFound, PartCode, "零件未找到"); + } + var stock = new TS_STOCK_DETAIL + { + BarCode = BarCode, + PartCode = PartCode, + Batch = Batch, + EqptCode = EqptCode, + LocCode = ToLocCode, + AreaCode = WmsCache.GetAreaCode(ToLocCode), + Qty = Qty, + UpdateQty = Qty, + VendId = bill.VendId, + ProduceDate = ProduceDate, + OverdueDate = (ProduceDate).AddDays(WmsCache.GetValidateDays(PartCode)), + ReceiveDate = ReceiveDate, + VendBatch = VendBatch, + Remark = Remark + }; + + stock.State = part.InspectType == (int)InspectType.No ? EnumStockState.合格 : EnumStockState.待检; + + + return stock; + } + + public TB_INSPECT ToInspect(TB_BILL bill) + { + + return new TB_INSPECT + { + BarCode = BarCode, + PartCode = PartCode, + Batch = Batch, + LocCode = ToLocCode, + InspectType = WmsCache.GetInspectType(PartCode), + ReceiveQty = Qty, + SampleQty = Qty, + InspQty = Qty, + PassQty = 0, + VendBatch = VendBatch, + VendId = VendId, + PoBillNum = PoBillNum, + PoLine = PoLineNum, + State = State, + }; + } + + public TB_PICK_FACT ToPickFact(TB_BILL bill, string fromLocCode,string toLocCode) + { + return new TB_PICK_FACT + { + BarCode = BarCode, + PartCode = PartCode, + Batch = Batch, + FromLocCode = fromLocCode, + ToLocCode = toLocCode, + Qty = Qty, + EqptCode = EqptCode, + State = EnumStockState.合格, + VendId = bill.VendId, + VendBatch = VendBatch, + Remark = Remark + + }; + } + + } + + public partial class TB_PRODUCT_RECEIVE + { + + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + public TS_STOCK_DETAIL ToStockDetailIn() + { + var part = WmsCache.GetPart(PartCode); + if (part == null) + { + throw new WmsException(ErrorCode.DataNotFound, PartCode, $"零件号 {PartCode} 未找到"); + } + if (part.State != PartState.A.ToString()) + { + throw new WmsException(ErrorCode.DataNotFound, PartCode, $"零件状态 {part.State} 无法收货"); + } + + var detail = new TS_STOCK_DETAIL + { + BarCode = BarCode, + PartCode = PartCode, + + Batch = Batch, + EqptCode = EqptCode, + LocCode = ToLocCode, + AreaCode = WmsCache.GetAreaCode(ToLocCode), + Qty = Qty, + UpdateQty = Qty, + ProduceDate = ProduceDate, + OverdueDate = (ProduceDate).AddDays(WmsCache.GetValidateDays(PartCode)), + ReceiveDate = ReceiveDate, + + VendId = LineId, + TracebackCode = TraceBackCode, + Remark = Remark + }; + if (GoodQty > 0) + { + if (WmsCache.Config.成品生成报检单) + { + detail.State = part.InspectType == (int) InspectType.No ? EnumStockState.合格 : EnumStockState.待检; + } + else + { + detail.State = EnumStockState.合格; + } + } + else if (ScrapQty > 0) + detail.State = EnumStockState.生产报废; + else if (InvalidQty > 0) + detail.State = EnumStockState.其它报废; + + + return detail; + } + + public TB_INSPECT ToInspect() + { + + return new TB_INSPECT + { + BarCode = BarCode, + PartCode = PartCode, + Batch = Batch, + LocCode = ToLocCode, + InspectType = WmsCache.GetInspectType(PartCode), + ReceiveQty = Qty, + InspQty = Qty, + SampleQty = Qty, + PassQty = 0, + State = State, + }; + } + + public TS_STOCK_DETAIL ToStockDetailOut() + { + var part = WmsCache.GetPart(PartCode); + if (part == null) + { + throw new WmsException(ErrorCode.DataNotFound, PartCode, $"零件号 {PartCode} 未找到"); + } + if (part.State != PartState.A.ToString()) + { + throw new WmsException(ErrorCode.DataNotFound, PartCode, $"零件状态 {part.State} 无法收货"); + } + + var detail = new TS_STOCK_DETAIL + { + BarCode = BarCode, + PartCode = PartCode, + + Batch = Batch, + EqptCode = EqptCode, + LocCode = ToLocCode, + AreaCode = WmsCache.GetAreaCode(ToLocCode), + Qty = Qty, + UpdateQty = Qty, + ProduceDate = ProduceDate, + OverdueDate = (ProduceDate).AddDays(WmsCache.GetValidateDays(PartCode)), + ReceiveDate = ReceiveDate, + State = EnumStockState.合格, + VendId = LineId, + TracebackCode = TraceBackCode, + Remark = Remark + }; + + + return detail; + } + } + + public partial class TB_PRODUCT_SELL + { + + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + public TS_STOCK_DETAIL ToStockDetailOut() + { + return new TS_STOCK_DETAIL + { + BarCode = BarCode, + PartCode = PartCode, + + Batch = Batch, + EqptCode = EqptCode, + LocCode = FromLocCode, + AreaCode = WmsCache.GetAreaCode(FromLocCode), + Qty = Qty, + UpdateQty = -Qty, //出库更新数量为负 + State = EnumStockState.合格, + VendBatch = Batch + + + }; + } + + } + + public partial class TB_STOCK_MOVE + { + + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + private TS_STOCK_DETAIL ToStockDetailIn(TS_STOCK_DETAIL stockDetail ) + { + if (stockDetail == null) + return new TS_STOCK_DETAIL + { + BarCode =string.IsNullOrEmpty(ToBarCode)?BarCode:ToBarCode, + PartCode = PartCode, + Batch = ToBatch, + EqptCode = ToEqptCode, + LocCode = ToLocCode, + AreaCode = WmsCache.GetAreaCode(ToLocCode), + Qty = Qty, + UpdateQty = Qty, + // ProduceDate = this.ProduceDate, + // OverdueDate = (this.ProduceDate).AddDays(WmsCache.GetValidateDays(this.PartCode)), + State = ToState, + ReceiveDate = DateTime.Now, + VendBatch = VendBatch, + VendId = VendId + //TODO 以下字段如何获取 + // TracebackCode = this.TracebackCode, + // VinState = this.VinState, + // Amount = this.Amount, + // UpdateTime = this.UpdateTime, + // PlanOrderId = this.PlanOrderId, + }; + var detailIn = stockDetail.Clone(); + detailIn.Qty = Qty; + detailIn.UpdateQty = Qty; + detailIn.EqptCode = ToEqptCode; + return detailIn; + } + + public StockOut ToStockOut() + { + return new StockOut + { + BarCode = BarCode, + PartCode = PartCode, + Batch = FromBatch, + LocCode = FromLocCode, + State = FromState, + OutQty = Qty, + //TransType = EnumTransType.None, + }; + } + + public StockIn ToStockIn(TS_STOCK_DETAIL stockDetail) + { + //取得目标库位信息 + string area = WmsCache.GetAreaCode(ToLocCode); + + //获得设定的库存状态 + var state = ToState; + + //集中特殊处理的库位对应的状态 + if (area == EnumStoreArea.HOLD.ToString()) + { + state = EnumStockState.隔离; + } + else if (area == EnumStoreArea.SCRAP.ToString()) + { + state = EnumStockState.生产报废; + } + else if (area == EnumStoreArea.INVALID.ToString()) + { + state = EnumStockState.其它报废; + } + + //生成对应的入库信息 + var stockIn = new StockIn + { + BarCode =string.IsNullOrEmpty(ToBarCode)?BarCode:ToBarCode, + PartCode = PartCode, + LocCode = ToLocCode, + State = state, + InQty = Qty, + Remark = Remark, + TemplateDetail = ToStockDetailIn(stockDetail), + //TransType = EnumTransType.None + }; + if (WmsCache.Config.线边库去批 && area == EnumStoreArea.WIP.ToString()) + { + var part = WmsCache.GetPart(stockIn.TemplateDetail.PartCode); + + var barcode = stockIn.TemplateDetail.PartCode + WmsCache.Config.空批次编号; + if (part.ManageType == EnumManageType.单包装) + barcode += "."; + stockIn.BarCode = barcode; + stockIn.TemplateDetail.BarCode = barcode; + stockIn.TemplateDetail.Batch = ""; + } + + return stockIn; + } + + public TB_INSPECT ToInspect() + { + + return new TB_INSPECT + { + BarCode = BarCode, + PartCode = PartCode, + Batch = ToBatch, + LocCode = ToLocCode, +// InspectType = WmsCache.GetInspectType(PartCode), + InspectType = InspectType.All, + ReceiveQty = Qty, + InspQty = Qty, + SampleQty = Qty, + PassQty = 0, + State = ToState, + }; + } + } + + public partial class TB_PACK_UNPACK + { + + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + public TS_STOCK_DETAIL ToStockDetailOut() + { + return new TS_STOCK_DETAIL + { + BarCode = FromBarCode, + PartCode = PartCode, + + Batch = Batch, + EqptCode = FromEqptCode, + LocCode = FromLocCode, + AreaCode = WmsCache.GetAreaCode(FromLocCode), + Qty = Qty, + UpdateQty = -Qty, //出库更新数量为负 + ProduceDate = ProduceDate, + OverdueDate = ProduceDate.AddDays(WmsCache.GetValidateDays(PartCode)), + State = State, + ReceiveDate = DateTime.Now, + VendBatch = Batch + + + }; + } + + + public TS_STOCK_DETAIL ToStockDetailIn(WmsEntities db) + { + + var stockDetail = db.TS_STOCK_DETAIL.SingleOrDefault(p => p.BarCode == ToBarCode &&p.PartCode==PartCode && p.LocCode == ToLocCode && p.State == State); + if (stockDetail != null) + { + var detailIn = stockDetail.Clone(); + detailIn.Qty = Qty; + detailIn.UpdateQty = Qty; + detailIn.EqptCode = ToEqptCode; + return detailIn; + } + return new TS_STOCK_DETAIL + { + BarCode = ToBarCode, + PartCode = PartCode, + + Batch = Batch, + EqptCode = ToEqptCode, + LocCode = ToLocCode, + AreaCode = WmsCache.GetAreaCode(ToLocCode), + Qty = Qty, + UpdateQty = Qty, + ReceiveDate = DateTime.Now, + ProduceDate = ProduceDate, + OverdueDate = (ProduceDate).AddDays(WmsCache.GetValidateDays(PartCode)), + State = State, + + VendBatch = VendBatch, + VendId = VendId + //TODO 以下字段如何获取 + // TracebackCode = this.TracebackCode, + // VinState = this.VinState, + // Amount = this.Amount, + // UpdateTime = this.UpdateTime, + // PlanOrderId = this.PlanOrderId, + }; + } + + public StockOut ToStockOut() + { + return new StockOut + { + BarCode = FromBarCode, + PartCode = PartCode, + Batch = Batch, + LocCode = FromLocCode, + State = State, + OutQty = Qty, + //TransType = EnumTransType.None, + }; + } + + public StockIn ToStockIn(WmsEntities db) + { + return new StockIn + { + BarCode = ToBarCode, + PartCode = PartCode, + Batch = Batch, + LocCode = ToLocCode, + State = State, + InQty = Qty, + TemplateDetail = ToStockDetailIn(db), + Remark = Remark, + //TransType = EnumTransType.None + }; + } + } + + public partial class TL_OPER + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + } + + public partial class TA_PART + { + + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + public TA_PART_S ToS() + { + return new TA_PART_S + { + PartCode = PartCode, + ErpPartCode = ErpPartCode, + PartDesc1 = PartDesc1, + PartDesc2 = PartDesc2, + ProjectId = ProjectId, + Unit = Unit, + PartKind = PartKind, + ManageType = ManageType, + InspectType = InspectType, + State = State, + Configuration = Configuration, + LinesidePackQty = LinesidePackQty, + PartType = PartType, + DefaultReceiveLocCode = DefaultReceiveLocCode, + DistributionType = DistributionType, + PartGroup = PartGroup, + StockPackQty = StockPackQty + }; + + } + } + + + public partial class TA_STORE_LOCATION + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + } + + public partial class TA_BILLTYPE + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + } + + public partial class TA_CONFIG + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + } + + public partial class TS_INTERFACE + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + } + + public partial class TS_VIN + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + public TB_BILL ToBill(EnumBillType billType) + { + return new TB_BILL + { + BillType = billType, + OperName = CreateOper, + SourceBillNum = VinCode, + SourceBillNum2 = PlanOrderId, + ProjectId = ProjectId, + StartTime = CreateTime.ToString(), + GUID = Guid.NewGuid(), + }; + } + + public TS_STOCK_DETAIL ToStockDetailIn(string toLocCode, decimal amount) + { + // var tsStockDetail = new TS_STOCK_DETAIL + // { + // BarCode = this.VinCode + "." + this.PartCode, + // PlanOrderId = this.PlanOrderId, + // + // PartCode = this.PartCode, + // Batch = this.Batch, + // EqptCode = this.EqptCode, + // LocCode = toLocCode, + // UpdateTime = DateTime.Now, + // // State = (int)VinState.Received, + // Amount = amount, + // Qty = 0, + // UpdateQty = 1, + // }; + // var part = WmsCache.GetPart( this.PartCode); + return new TS_STOCK_DETAIL + { + BarCode = GetBarCode(), + PlanOrderId = PlanOrderId, + + PartCode = PartCode, + Batch = Batch, + EqptCode = EqptCode, + LocCode = toLocCode, + AreaCode = WmsCache.GetAreaCode(toLocCode), + UpdateTime = DateTime.Now, + Amount = amount, + Qty = 1, + UpdateQty = 1, + ProduceDate = CreateTime, + OverdueDate = CreateTime.AddDays(WmsCache.GetValidateDays(PartCode)), + State = EnumStockState.合格, + ReceiveDate = DateTime.Now, + VinState = (int)VinState.Received, + Remark = "" + }; + + } + + public TS_VIN_HIS ToVinHis() + { + return new TS_VIN_HIS + { + SourceId = SourceId, + EqptCode = EqptCode, + CreateOper = CreateOper, + CreateTime = CreateTime, + Flag = Flag, + VinCode = VinCode, + PartCode = PartCode, + ProjectId = WmsCache.GetProjectId(PartCode), + PlanOrderId = PlanOrderId, + Batch = Batch, + ExecTime = DateTime.Now, + ErrorCode = ErrorCode, + ErrorText = ErrorText + }; + } + + public string GetBarCode() + { + return PartCode.Trim() + "." + Batch.Trim(); + } + } + + public partial class TS_VIN_HIS + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + } + + public partial class TS_SORT_DETAIL + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + public TS_VIN ToTsVinReceive(string operName) + { + return new TS_VIN + { + CreateOper = operName, + CreateTime = DateTime.Now, + SourceId = BillNum, + EqptCode = "", + VinCode = VinCode, + Batch = VinCode, + Flag = 0, + PlanOrderId = SeqNum, + PartCode = PartCode, + ProjectId = ProjectId + }; + } + + public TS_VIN ToTsVinDeliver(string operName) + { + return new TS_VIN + { + CreateOper = operName, + CreateTime = DateTime.Now, + SourceId = BillNum, + EqptCode = "", + VinCode = VinCode, + Batch = VinCode, + Flag = 1, + PlanOrderId = SeqNum, + PartCode = PartCode, + ProjectId = ProjectId + }; + } + + } + + public partial class TR_BALANCE_COMPARE_VIN + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + } + + public partial class TA_VENDER + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + } + + public partial class TS_UNI_API + { + public override string ToString() + { + return EntitiesHelper.GetPropertiesString(this); + } + + public TS_UNI_API_HIS ToHis() + { + return new TS_UNI_API_HIS + { + InterfaceType = InterfaceType, + TableName = TableName, + BillType = BillType, + SubBillType = SubBillType, + BillNum = BillNum, + PartCode = PartCode, + Batch = Batch, + FromLoc = FromLoc, + ToLoc = ToLoc, + FromErpLoc = FromErpLoc, + ToErpLoc = ToErpLoc, + Qty = Qty, + GoodQty = GoodQty, + ScrapQty = ScrapQty, + InvalidQty = InvalidQty, + State = State, + CreateOper = CreateOper, + CreateTime = CreateTime, + PutTime = PutTime, + CustId = CustId, + VendId = VendId, + PoUnit = PoUnit, + LocUnit = LocUnit, + ValidDate = ValidDate, + ErpBillNum = ErpBillNum, + ErpLineNum = ErpLineNum, + EqptCode = EqptCode, + EqptType = EqptType, + VendBatch = VendBatch, + WorklineId = WorklineId, + ProcessId = ProcessId, + SourceBillNum = SourceBillNum + }; + } + } + + public partial class TB_OFFICE_RECIVE + { + public StockIn ToStockIn(decimal inQty, TS_STOCK_DETAIL stockdetail, string remark = "") + { + return new StockIn + { + BarCode = PartCode, + PartCode = PartCode, + Batch = Batch, + LocCode = ToLocCode, + State = stockdetail.State, + InQty = ReciveQty, + Remark = remark, + TemplateDetail = stockdetail, + //TransType = EnumTransType.None + }; + } + } + + public partial class TB_OFFICE_OUT + { + public StockOut ToStockOut(TS_STOCK_DETAIL stockdetail) + { + return new StockOut() + { + BarCode = PartCode, + PartCode = PartCode, + Batch = Batch, + LocCode = FromLocCode, + State = stockdetail.State, + OutQty = OutQty, + //TransType = EnumTransType.Out + }; + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/WmsException.cs b/北京北汽/SCP/Models/WmsException.cs new file mode 100644 index 0000000..34866f2 --- /dev/null +++ b/北京北汽/SCP/Models/WmsException.cs @@ -0,0 +1,86 @@ +using System; +using System.Text; +using ChangKeTec.Wms.Models.Enums; +using CK.SCP.Utils; +//using ChangKeTec.Utils; + +namespace ChangKeTec.Wms.Models +{ + /* + public class ReturnResult + { + private const string SP = ";"; + public ResultCode ResultCode { get; set; } + public string IndexString { get; set; } + public string ResultString { get; set; } + + public ReturnResult() + { + ResultCode = Enums.ResultCode.Success; + IndexString = ""; + ResultString = ""; + + } + + public ReturnResult(ResultCode code,string index,string text) + { + ResultCode = code; + IndexString = index; + ResultString = text; + + } + + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append(EnumHelper.GetDesc(ResultCode)+SP); + sb.Append(IndexString+SP); + sb.Append(ResultString+SP); + return sb.ToString(); + } + } + */ + [Serializable] //声明为可序列化的 因为要写入文件中 + public class WmsException : ApplicationException//由用户程序引发,用于派生自定义的异常类型 + { + private const string SP = ";"; + // private ResultCode _code; + // private string _indexString; + public ErrorCode Code { get; set; } + public string IndexString { get; set; } + + public Exception Ex { get; set; } + /// <summary> + /// 默认构造函数 + /// </summary> + public WmsException() + { + } + + public WmsException(ErrorCode code, string indexString = null, string message = null, Exception inner = null) + : base(message, inner) + { + Code = code; + IndexString = indexString; + Ex = inner; + } + + // public WmsException(System.Runtime.Serialization.SerializationInfo info, + // System.Runtime.Serialization.StreamingContext context) : base(info, context) + // { + // _indexString = info.GetString(IndexString); + // } + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append(EnumHelper.GetDesc(Code) + SP); + if (!string.IsNullOrEmpty(IndexString)) + sb.Append(IndexString + SP); + if (!string.IsNullOrEmpty(Message)) + sb.Append(Message + SP); + if (Ex != null) + sb.Append(Ex); + return sb.ToString(); + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/Models/packages.config b/北京北汽/SCP/Models/packages.config new file mode 100644 index 0000000..2cd31a5 --- /dev/null +++ b/北京北汽/SCP/Models/packages.config @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="EntityFramework" version="6.2.0" targetFramework="net452" /> + <package id="EntityFramework.zh-Hans" version="6.2.0" targetFramework="net452" /> + <package id="Newtonsoft.Json" version="10.0.3" targetFramework="net452" /> +</packages> \ No newline at end of file diff --git a/北京北汽/SCP/SCP.csproj b/北京北汽/SCP/SCP.csproj index af297d1..a412241 100644 --- a/北京北汽/SCP/SCP.csproj +++ b/北京北汽/SCP/SCP.csproj @@ -210,6 +210,7 @@ <Content Include="Admin\user_select_title.aspx" /> <Content Include="Admin\user_view.aspx" /> <Content Include="App_Data\nwind.xml" /> + <Content Include="Change_password.aspx" /> <Content Include="default_hb.aspx" /> <Content Include="html5\HtmlPage1.html" /> <Content Include="res\css\error.css" /> @@ -247,8 +248,10 @@ <Content Include="Views\BasicData\SCP_MoldSharing.aspx" /> <Content Include="Views\BasicData\SCP_PRICE_DETAIL.aspx" /> <Content Include="Views\BasicData\SCP_PRICE_EDIT.aspx" /> + <Content Include="Views\BasicData\SCP_PRICE_TemporaryPrice.aspx" /> <Content Include="Views\BasicData\SCP_RECIVE_PORT.aspx" /> <Content Include="Views\BasicData\SCP_TA_VEND_PART.aspx" /> + <Content Include="Views\BasicData\SCP_TB_Address.aspx" /> <Content Include="Views\BasicData\SCP_VenderUser.aspx" /> <Content Include="Views\BasicData\Supplier.aspx" /> <Content Include="Views\BasicData\SupplierUser.aspx" /> @@ -2905,13 +2908,10 @@ <Content Include="Handlers\MakeVerifyCode.ashx" /> <Content Include="Views\PlanData\SCP_PO_CQ.aspx" /> <Content Include="Views\PlanData\SCP_PO_DETAIL_CQ.aspx" /> - <Content Include="WebService1.asmx" /> <None Include="Properties\PublishProfiles\COM.pubxml" /> <None Include="Scripts\jquery-1.10.2.intellisense.js" /> <Content Include="main.aspx" /> <Content Include="NotImply.aspx" /> - <Content Include="Views\BasicData\WebService1.asmx" /> - <Content Include="Views\BasicData\WebService2.asmx" /> <Content Include="Views\ExChangeCenter\EC_COM.aspx" /> <Content Include="Views\ExChangeCenter\EC_CONTROLLER.aspx" /> <Content Include="Views\ExChangeCenter\EC_CONTROLLER_ASN.aspx" /> @@ -4914,6 +4914,13 @@ <DependentUpon>About.aspx</DependentUpon> </Compile> <Compile Include="App_Start\RouteConfig.cs" /> + <Compile Include="Change_password.aspx.cs"> + <DependentUpon>Change_password.aspx</DependentUpon> + <SubType>ASPXCodeBehind</SubType> + </Compile> + <Compile Include="Change_password.aspx.designer.cs"> + <DependentUpon>Change_password.aspx</DependentUpon> + </Compile> <Compile Include="Common\MailHelper.cs" /> <Compile Include="Common\ReportHelper.cs" /> <Compile Include="default_hb.aspx.cs"> @@ -5068,6 +5075,13 @@ <Compile Include="Views\BasicData\SCP_PRICE_EDIT.aspx.designer.cs"> <DependentUpon>SCP_PRICE_EDIT.aspx</DependentUpon> </Compile> + <Compile Include="Views\BasicData\SCP_PRICE_TemporaryPrice.aspx.cs"> + <DependentUpon>SCP_PRICE_TemporaryPrice.aspx</DependentUpon> + <SubType>ASPXCodeBehind</SubType> + </Compile> + <Compile Include="Views\BasicData\SCP_PRICE_TemporaryPrice.aspx.designer.cs"> + <DependentUpon>SCP_PRICE_TemporaryPrice.aspx</DependentUpon> + </Compile> <Compile Include="Views\BasicData\SCP_RECIVE_PORT.aspx.cs"> <DependentUpon>SCP_RECIVE_PORT.aspx</DependentUpon> <SubType>ASPXCodeBehind</SubType> @@ -5082,6 +5096,13 @@ <Compile Include="Views\BasicData\SCP_TA_VEND_PART.aspx.designer.cs"> <DependentUpon>SCP_TA_VEND_PART.aspx</DependentUpon> </Compile> + <Compile Include="Views\BasicData\SCP_TB_Address.aspx.cs"> + <DependentUpon>SCP_TB_Address.aspx</DependentUpon> + <SubType>ASPXCodeBehind</SubType> + </Compile> + <Compile Include="Views\BasicData\SCP_TB_Address.aspx.designer.cs"> + <DependentUpon>SCP_TB_Address.aspx</DependentUpon> + </Compile> <Compile Include="Views\BasicData\SCP_VenderUser.aspx.cs"> <DependentUpon>SCP_VenderUser.aspx</DependentUpon> <SubType>ASPXCodeBehind</SubType> @@ -5198,14 +5219,6 @@ <Compile Include="NotImply.aspx.designer.cs"> <DependentUpon>NotImply.aspx</DependentUpon> </Compile> - <Compile Include="Views\BasicData\WebService1.asmx.cs"> - <DependentUpon>WebService1.asmx</DependentUpon> - <SubType>Component</SubType> - </Compile> - <Compile Include="Views\BasicData\WebService2.asmx.cs"> - <DependentUpon>WebService2.asmx</DependentUpon> - <SubType>Component</SubType> - </Compile> <Compile Include="Views\ExChangeCenter\EC_COM.aspx.cs"> <DependentUpon>EC_COM.aspx</DependentUpon> <SubType>ASPXCodeBehind</SubType> @@ -6535,10 +6548,6 @@ <Compile Include="Views\青岛一汽法雷奥\SupplierData\SCP_TS_BARCODE.aspx.designer.cs"> <DependentUpon>SCP_TS_BARCODE.aspx</DependentUpon> </Compile> - <Compile Include="WebService1.asmx.cs"> - <DependentUpon>WebService1.asmx</DependentUpon> - <SubType>Component</SubType> - </Compile> </ItemGroup> <ItemGroup> <Folder Include="Business\Models\" /> diff --git a/北京北汽/SCP/SCP/About.aspx b/北京北汽/SCP/SCP/About.aspx new file mode 100644 index 0000000..024a180 --- /dev/null +++ b/北京北汽/SCP/SCP/About.aspx @@ -0,0 +1,46 @@ +INSERT INTO [SCP_CS].[dbo].[TA_VENDER] + ([VendId] + ,[VendName] + ,[VendAbbCode] + ,[VendType] + ,[Country] + ,[City] + ,[Currency] + ,[Address] + ,[ZipCode] + ,[Contacter] + ,[Phone] + ,[Fax] + ,[Email] + ,[State] + ,[Remark] + ,[Tax] + ,[Site] + ,[ReceiveTimeScope]) + SELECT + A. [VendId] + ,A.[VendName] + ,A.[VendAbbCode] + ,A.[VendType] + ,A.[Country] + ,A.[City] + ,A.[Currency] + ,A.[Address] + ,A.[ZipCode] + ,A.[Contacter] + ,A.[Phone] + ,A.[Fax] + ,A.[Email] + ,A.[State] + ,A.[Remark] + ,A.[Tax] + ,A.[Site] + ,A.[ReceiveTimeScope] + + + FROM TA_QUERY A INNER JOIN TA_VENDER B ON A.VENDID=B.VendId AND A.SITE=B.Site + + WHERE A.SITE='cns' +GO + + diff --git a/北京北汽/SCP/SCP/About.aspx.cs b/北京北汽/SCP/SCP/About.aspx.cs new file mode 100644 index 0000000..d158cf6 --- /dev/null +++ b/北京北汽/SCP/SCP/About.aspx.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace SCP +{ + public partial class About : Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/SCP/About.aspx.designer.cs b/北京北汽/SCP/SCP/About.aspx.designer.cs new file mode 100644 index 0000000..3f978ba --- /dev/null +++ b/北京北汽/SCP/SCP/About.aspx.designer.cs @@ -0,0 +1,17 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 此代码是由工具生成的。 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace SCP +{ + + + public partial class About + { + } +} diff --git a/北京北汽/SCP/SCP/Admin/MakeInitUser.aspx b/北京北汽/SCP/SCP/Admin/MakeInitUser.aspx new file mode 100644 index 0000000..fae0311 --- /dev/null +++ b/北京北汽/SCP/SCP/Admin/MakeInitUser.aspx @@ -0,0 +1,37 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MakeInitUser.aspx.cs" Inherits="SCP.Admin.MakeInitUser" %> + +<!DOCTYPE html> + +<html xmlns="http://www.w3.org/1999/xhtml"> +<head runat="server"> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> + <title> + + +
+ + + + + + + + + + + + + + + + + + + + diff --git a/北京北汽/SCP/SCP/Admin/MakeInitUser.aspx.cs b/北京北汽/SCP/SCP/Admin/MakeInitUser.aspx.cs new file mode 100644 index 0000000..34dc1c6 --- /dev/null +++ b/北京北汽/SCP/SCP/Admin/MakeInitUser.aspx.cs @@ -0,0 +1,161 @@ +using CK.SCP.Models.AppBoxEntity; +using CK.SCP.Models.AppBoxEntity.ExcelImportEntity; +using CK.SCP.Utils; +using FineUI; +using System; +using System.Collections.Generic; +using System.Data; +using System.IO; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace SCP.Admin +{ + public partial class MakeInitUser : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + + } + + protected void BTN_Make_Click(object sender, EventArgs e) + { + try + { + var vendList = SCPDB.TA_VENDER.ToList(); + List list = new List(); + foreach (var itm in vendList) + { + APPBOX_USER_EXCEL excel = new APPBOX_USER_EXCEL(); + excel.登录名称 = itm.VendId; + excel.密码 = "666666"; + excel.性别 = "男"; + excel.姓名 = itm.VendName; + excel.电子邮件 = itm.VendId + "@163.com"; + excel.供应商编号 = itm.VendId; + excel.所属地点 = itm.Site; + list.Add(excel); + } + List _ls = new List(); + list.ForEach(itm => + { + var userList = DB.Users.Where(p => p.Name == itm.登录名称).ToList(); + if(userList.Count==0) + { + User item = new User(); + item.Name = itm.登录名称 + "@" + itm.所属地点; + item.Password = PasswordUtil.CreateDbPassword(itm.密码.Trim()); + item.ChineseName = itm.姓名.Trim(); + item.Gender = itm.性别; + item.CompanyEmail = itm.电子邮件.Trim(); + item.Email = itm.电子邮件.Trim(); + item.Remark = itm.所属地点; + item.Enabled = true; + item.CreateTime = DateTime.Now; + item.SupplierCode = itm.供应商编号; + if (!string.IsNullOrEmpty(itm.供应商编号)) + { + var _role = DB.Roles.Where(p => p.Name == "供应商").FirstOrDefault(); + if (_role != null) + { + item.Roles = new List(); + int[] roleIDs = new int[] { _role.ID }; + + AddEntities(item.Roles, roleIDs); + } + item.SupplierCode = itm.供应商编号; + } + DB.Users.Add(item); + } + + + }); + if (DB.SaveChanges() != -1) + { + + } + } + catch (Exception ex) + { + Alert.Show(ex.Message); + } + + } + + + protected void BTN_Rel_Click(object sender, EventArgs e) + { + + } + + protected void Button1_Click(object sender, EventArgs e) + { + try + { + + var _userlist = DB.Users.ToList(); + foreach (var itm in _userlist) + { + if (!string.IsNullOrEmpty(itm.Remark)) + { + var _factory = itm.Remark; + var _f = DB.TA_FACTORY.Where(p => p.FactoryId == _factory).FirstOrDefault(); + int[] titleIDs = new int[] { _f.ID }; + + AddEntities(itm.TA_FACTORY, titleIDs); + + } + + + } + DB.SaveChanges(); + } + catch (Exception ex) + { + Alert.Show(ex.Message); + return; + } + } + + protected void Button2_Click(object sender, EventArgs e) + { + try + { + var _userlist = DB.Users.ToList(); + foreach (var itm in _userlist) + { + if (!string.IsNullOrEmpty(itm.Remark)) + { + + + var _VenderUsers = DB.VenderUsers.Where(p => p.UserId == itm.ID).ToList(); + if (_VenderUsers != null && _VenderUsers.Count > 0) + { + DB.VenderUsers.RemoveRange(_VenderUsers); + } + List _vList = new List(); + VenderUsers _vus = new VenderUsers(); + _vus.UserId = itm.ID; + _vus.VenderId = itm.Name.Split('@')[0]; + _vList.Add(_vus); + if (_vList.Count > 0) + { + var ls = _vList.Where(p => p.UserId > 0 && !string.IsNullOrEmpty(p.VenderId)); + DB.VenderUsers.AddRange(ls.ToArray()); + } + } + + } + DB.SaveChanges(); + + } + catch (Exception ex) + { + Alert.Show(ex.Message); + return; + } + } + } +} \ No newline at end of file diff --git a/北京北汽/SCP/SCP/Admin/MakeInitUser.aspx.designer.cs b/北京北汽/SCP/SCP/Admin/MakeInitUser.aspx.designer.cs new file mode 100644 index 0000000..02558da --- /dev/null +++ b/北京北汽/SCP/SCP/Admin/MakeInitUser.aspx.designer.cs @@ -0,0 +1,96 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace SCP.Admin { + + + public partial class MakeInitUser { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Panel Panel1; + + /// + /// Form2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Form Form2; + + /// + /// FormRow1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.FormRow FormRow1; + + /// + /// BTN_Make 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button BTN_Make; + + /// + /// Button2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button Button2; + + /// + /// Button1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button Button1; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Window Window1; + } +} diff --git a/北京北汽/SCP/SCP/Admin/config.aspx b/北京北汽/SCP/SCP/Admin/config.aspx new file mode 100644 index 0000000..b00ec68 --- /dev/null +++ b/北京北汽/SCP/SCP/Admin/config.aspx @@ -0,0 +1,45 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="config.aspx.cs" Inherits="SCP.admin.config" %> + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/北京北汽/SCP/SCP/Admin/config.aspx.cs b/北京北汽/SCP/SCP/Admin/config.aspx.cs new file mode 100644 index 0000000..4887ea2 --- /dev/null +++ b/北京北汽/SCP/SCP/Admin/config.aspx.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using Newtonsoft.Json.Linq; +using FineUI; + + +namespace SCP.admin +{ + public partial class config : PageBase + { + #region ViewPower + + /// + /// 本页面的浏览权限,空字符串表示本页面不受权限控制 + /// + public override string ViewPower + { + get + { + return "CoreConfigView"; + } + } + + #endregion + + #region Page_Load + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + LoadData(); + } + } + + private void LoadData() + { + // 权限检查 + CheckPowerWithButton("CoreConfigEdit", btnSave); + + + tbxTitle.Text = ConfigHelper.Title; + nbxPageSize.Text = ConfigHelper.PageSize.ToString(); + tbxHelpList.Text = StringUtil.GetJSBeautifyString(ConfigHelper.HelpList); + ddlMenuType.SelectedValue = ConfigHelper.MenuType; + ddlTheme.SelectedValue = ConfigHelper.Theme; + + } + + #endregion + + #region Events + + protected void btnSave_OnClick(object sender, EventArgs e) + { + // 在操作之前进行权限检查 + if (!CheckPower("CoreConfigEdit")) + { + CheckPowerFailWithAlert(); + return; + } + + string helpListStr = tbxHelpList.Text.Trim(); + try + { + JArray.Parse(helpListStr); + } + catch (Exception) + { + tbxHelpList.MarkInvalid("格式不正确,必须是JSON字符串!"); + + return; + } + + + + ConfigHelper.Title = tbxTitle.Text.Trim(); + ConfigHelper.PageSize = Convert.ToInt32(nbxPageSize.Text.Trim()); + ConfigHelper.HelpList = helpListStr; + ConfigHelper.MenuType = ddlMenuType.SelectedValue; + ConfigHelper.Theme = ddlTheme.SelectedValue; + ConfigHelper.SaveAll(); + + //Alert.ShowInTop("修改系统配置成功(点击确定刷新页面)!", String.Empty, "top.window.location.reload(false);"); + + PageContext.RegisterStartupScript("top.window.location.reload(false);"); + } + + #endregion + } +} diff --git a/北京北汽/SCP/SCP/Admin/config.aspx.designer.cs b/北京北汽/SCP/SCP/Admin/config.aspx.designer.cs new file mode 100644 index 0000000..b9c67c3 --- /dev/null +++ b/北京北汽/SCP/SCP/Admin/config.aspx.designer.cs @@ -0,0 +1,105 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace SCP.admin { + + + public partial class config { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Panel Panel1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.SimpleForm SimpleForm1; + + /// + /// tbxTitle 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox tbxTitle; + + /// + /// ddlTheme 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DropDownList ddlTheme; + + /// + /// ddlMenuType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DropDownList ddlMenuType; + + /// + /// nbxPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.NumberBox nbxPageSize; + + /// + /// tbxHelpList 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextArea tbxHelpList; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnSave; + } +} diff --git a/北京北汽/SCP/SCP/Admin/default.aspx b/北京北汽/SCP/SCP/Admin/default.aspx new file mode 100644 index 0000000..afb5239 --- /dev/null +++ b/北京北汽/SCP/SCP/Admin/default.aspx @@ -0,0 +1,81 @@ +<%@ Page Language="C#" EnableEventValidation="false" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="SCP.admin._default" %> + + + + + + + + +
+ + + + + + + + + + + <%-- + --%> + + <%-- --%> + + <%-- + --%> + + + + + + <%-- + + + + + --%> + + + + + + + + + + + + +